23 #include <SUIT_ResourceMgr.h>
28 #define RESOURCE_YACS "YACS"
30 using namespace YACS::HMI;
34 DEBTRACE(
"Yacsgui_Resource::Yacsgui_Resource");
63 return colorValue(name, col);
69 return colorValue(name, col);
110 int genTab = swm->addPreference( Yacsgui::tr(
"PREF_TAB_GENERAL" ) );
112 int presentationGroup = swm->addPreference(
"Presentation", genTab );
113 swm->setPreferenceProperty(presentationGroup ,
"columns", 2);
120 int priority = swm->addPreference(
"DockWidget priority", presentationGroup, LightApp_Preferences::Selector,
RESOURCE_YACS,
"dockWidgetPriority" );
121 swm->addPreference(
"Progress bar color", presentationGroup, LightApp_Preferences::Color,
RESOURCE_YACS,
"progressBarColor" );
122 int progressLabel = swm->addPreference(
"Progress bar label", presentationGroup, LightApp_Preferences::Selector,
RESOURCE_YACS,
"progressBarLabel" );
124 QStringList stringsList;
125 stringsList.append(
"Horizontal" );
126 stringsList.append(
"Vertical" );
127 QList<QVariant> indexesList;
128 indexesList.append(0);
129 indexesList.append(1);
130 swm->setPreferenceProperty( priority,
"strings", stringsList );
131 swm->setPreferenceProperty( priority,
"indexes", indexesList );
136 stringsList <<
"Percentage: \"50%\"" <<
"Nb.steps: \"5/10\"" <<
"Both: \"50% (5/10)\"";
137 indexesList << 0 << 1 << 2;
138 swm->setPreferenceProperty( progressLabel,
"strings", stringsList );
139 swm->setPreferenceProperty( progressLabel,
"indexes", indexesList );
141 int pythonGroup = swm->addPreference(
"Python", genTab );
143 swm->addPreference(
"Python Script Font", pythonGroup, LightApp_Preferences::Font,
RESOURCE_YACS,
"font" );
146 int catalogGroup = swm->addPreference(
"Catalogs", genTab );
148 swm->addPreference(
"User catalog", catalogGroup, LightApp_Preferences::File,
RESOURCE_YACS,
"userCatalog" );
150 int componentGroup = swm->addPreference( Yacsgui::tr(
"PREF_GROUP_COMPONENT" ), genTab );
155 int linkTab = swm->addPreference( Yacsgui::tr(
"Link colors" ) );
157 int idGroup = swm->addPreference( Yacsgui::tr(
"PREF_GROUP_GENERAL" ), linkTab );
158 swm->setPreferenceProperty( idGroup,
"columns", 1 );
160 swm->addPreference( Yacsgui::tr(
"Link draw color" ), idGroup, LightApp_Preferences::Color,
RESOURCE_YACS,
"link_draw_color" );
161 swm->addPreference( Yacsgui::tr(
"Link select color" ), idGroup, LightApp_Preferences::Color,
RESOURCE_YACS,
"link_select_color" );
162 swm->addPreference( Yacsgui::tr(
"Stream link draw color" ), idGroup, LightApp_Preferences::Color,
RESOURCE_YACS,
"stream_link_draw_color" );
163 swm->addPreference( Yacsgui::tr(
"Stream link select color" ), idGroup, LightApp_Preferences::Color,
RESOURCE_YACS,
"stream_link_select_color" );
164 swm->addPreference( Yacsgui::tr(
"Control link draw color" ), idGroup, LightApp_Preferences::Color,
RESOURCE_YACS,
"control_link_draw_color" );
165 swm->addPreference( Yacsgui::tr(
"Control link select color" ), idGroup, LightApp_Preferences::Color,
RESOURCE_YACS,
"control_link_select_color" );
166 swm->addPreference( Yacsgui::tr(
"Emphasis link color" ), idGroup, LightApp_Preferences::Color,
RESOURCE_YACS,
"emphasizeBrushColor" );
168 swm->addPreference( Yacsgui::tr(
"link pen darkness" ), idGroup, LightApp_Preferences::Integer,
RESOURCE_YACS,
"link_pen_darkness" );
170 swm->addPreference( Yacsgui::tr(
"link separation weight" ), idGroup, LightApp_Preferences::Integer,
RESOURCE_YACS,
"link_separation_weight" );
173 int nodeTab = swm->addPreference( Yacsgui::tr(
"PREF_TAB_NODE" ) );
175 int nodeSubtab = swm->addPreference( Yacsgui::tr(
"PREF_GROUP_SCENE" ), nodeTab );
176 swm->setPreferenceProperty(nodeSubtab ,
"columns", 2);
178 swm->addPreference( Yacsgui::tr(
"Pen" ), nodeSubtab, LightApp_Preferences::Color,
RESOURCE_YACS,
_Scene_pen );
183 nodeSubtab = swm->addPreference( Yacsgui::tr(
"PREF_GROUP_BLOC" ), nodeTab );
184 swm->setPreferenceProperty(nodeSubtab ,
"columns", 2);
191 nodeSubtab = swm->addPreference( Yacsgui::tr(
"PREF_GROUP_NODE" ), nodeTab );
192 swm->setPreferenceProperty(nodeSubtab ,
"columns", 2);
199 nodeSubtab = swm->addPreference( Yacsgui::tr(
"PREF_GROUP_HEADER" ), nodeTab );
200 swm->setPreferenceProperty(nodeSubtab ,
"columns", 2);
207 nodeSubtab = swm->addPreference( Yacsgui::tr(
"PREF_GROUP_CONTROL" ), nodeTab );
208 swm->setPreferenceProperty(nodeSubtab ,
"columns", 2);
215 nodeSubtab = swm->addPreference( Yacsgui::tr(
"PREF_GROUP_PORT" ), nodeTab );
216 swm->setPreferenceProperty(nodeSubtab ,
"columns", 2);
223 nodeSubtab = swm->addPreference(
"Datastream port", nodeTab );
224 swm->setPreferenceProperty(nodeSubtab ,
"columns", 2);
231 nodeSubtab = swm->addPreference( Yacsgui::tr(
"PREF_GROUP_DRAG" ), nodeTab );
232 swm->setPreferenceProperty(nodeSubtab,
"columns", 1);
234 swm->addPreference( Yacsgui::tr(
"On dragging"), nodeSubtab, LightApp_Preferences::Color,
RESOURCE_YACS,
__dragOver );
237 int stateTab = swm->addPreference( Yacsgui::tr(
"PREF_TAB_STATE" ) );
239 int editGroup = swm->addPreference( Yacsgui::tr(
"PREF_GROUP_EDIT" ), stateTab );
240 swm->setPreferenceProperty( editGroup,
"columns", 1 );
248 int runGroup = swm->addPreference( Yacsgui::tr(
"PREF_GROUP_RUN" ), stateTab );
249 swm->setPreferenceProperty( runGroup,
"columns", 2 );
385 preferencesChanged();