23 #include <SUIT_ResourceMgr.h>
28 #define RESOURCE_YACS "YACS"
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();
#define RUNNODEBRUSHCOLOR
#define STREAMLINKDRAW_COLOR
#define LINK_SEPARATION_WEIGHT
#define DataStreamPort_hiBrush_
#define ElementaryNode_pen_
#define CTRLLINK_SELECT_COLOR
#define _ComposedNode_hiPen
#define COMPONENTINSTANCENEW
#define _ComposedNode_brush
#define CTRLLINKDRAW_COLOR
#define _CtrlPort_hiBrush
#define ComposedNode_pen_
#define ComposedNode_hiPen_
#define _ElementaryNode_hiBrush
#define _ComposedNode_pen
#define _DataStreamPort_pen
#define _COMPONENT_INSTANCE_NEW
#define STREAMLINK_SELECT_COLOR
#define ComposedNode_hiBrush_
#define _invalidNodeColor
#define DOCKWIDGETPRIORITY
#define _ElementaryNode_brush
#define ElementaryNode_hiPen_
#define LINK_SELECT_COLOR
#define _DataPort_hiBrush
#define NOTYETINITIALIZED_
#define _DataStreamPort_brush
#define DataPort_hiBrush_
#define DataStreamPort_pen_
#define DataStreamPort_brush_
#define _DataStreamPort_hiPen
#define _editedNodeBrushColor
#define _ComposedNode_hiBrush
#define _normalNodeBrushColor
#define _ElementaryNode_pen
#define _DataStreamPort_hiBrush
#define EDITEDNODEBRUSHCOLOR
#define PYTHONEXTERNALEDITOR
#define ElementaryNode_hiBrush_
#define DataStreamPort_hiPen_
#define _runNodeBrushColor
#define EMPHASIZEBRUSHCOLOR
#define NORMALNODEBRUSHCOLOR
#define LINK_PEN_DARKNESS
#define ElementaryNode_brush_
#define ENSUREVISIBLEWHENMOVED
#define ComposedNode_brush_
#define _ElementaryNode_hiPen
#define _NOTYETINITIALIZED
#define CtrlPort_hiBrush_
static QColor Header_brush
static QColor CtrlPort_hiBrush
static QColor DESACTIVATED
static QColor ElementaryNode_hiPen
static QColor control_link_draw_color
static int dockWidgetPriority
static QColor Scene_brush
static QColor Scene_hiBrush
static QColor DataPort_brush
static bool COMPONENT_INSTANCE_NEW
static QColor ElementaryNode_pen
static QColor WAITINGTASKS
static QColor Scene_hiPen
static QColor NOTYETINITIALIZED
static int link_pen_darkness
static QColor DataStreamPort_hiBrush
static QColor DataPort_hiBrush
static QColor DataStreamPort_hiPen
static QColor ComposedNode_brush
static QColor control_link_select_color
static QColor INTERNALERR
static QColor progressBarColor
static int progressBarLabel
static QColor emphasizeBrushColor
static QColor DataStreamPort_pen
static QColor link_draw_color
static QString userCatalog
static QColor DataPort_pen
static QColor DataStreamPort_brush
static QColor stream_link_draw_color
static int link_separation_weight
static QColor stream_link_select_color
static bool autoComputeLinks
static QColor Header_hiPen
static QColor normalNodeBrushColor
static QColor editedNodeBrushColor
static QColor ElementaryNode_brush
static QColor validNodeColor
static QColor CtrlPort_pen
static QColor INITIALISED
static QColor ComposedNode_hiPen
static QColor runNodeBrushColor
static QColor ElementaryNode_hiBrush
static double link_thickness
static QColor ComposedNode_hiBrush
static QString pythonExternalEditor
static QColor invalidNodeColor
static QColor link_select_color
static bool ensureVisibleWhenMoved
static QColor CtrlPort_hiPen
static QColor Header_hiBrush
static QColor CtrlPort_brush
static QColor DataPort_hiPen
static QColor ComposedNode_pen
int integerValue(const QString &name, const int def=0) const
void setValue(const QString &name, const int val)
virtual void createPreferences(Yacsgui *swm)
QString stringValue(const QString &name, const QString &def=QString()) const
virtual void preferencesChanged()
QColor colorValue(const QString &name, const QColor &def=QColor()) const
Yacsgui_Resource(SUIT_ResourceMgr *r)
double doubleValue(const QString &name, const double def=0) const
QFont fontValue(const QString &name, const QFont &def=QFont()) const
bool booleanValue(const QString &name, const bool def=false) const
def h(x, y, destx, desty)