Version: 9.16.0
Yacsgui_Resource Class Reference

#include <Yacsgui_Resource.hxx>

Collaboration diagram for Yacsgui_Resource:

Public Member Functions

 Yacsgui_Resource (SUIT_ResourceMgr *r)
 
virtual void createPreferences (Yacsgui *swm)
 
virtual void preferencesChanged (const QString &sect, const QString &name)
 
virtual void preferencesChanged ()
 

Protected Member Functions

int integerValue (const QString &name, const int def=0) const
 
double doubleValue (const QString &name, const double def=0) const
 
bool booleanValue (const QString &name, const bool def=false) const
 
QFont fontValue (const QString &name, const QFont &def=QFont()) const
 
QColor colorValue (const QString &name, const QColor &def=QColor()) const
 
QColor colorValue (const QString &name, const Qt::GlobalColor c) const
 
QColor colorValue (const QString &name, const int h, const int s, const int v) const
 
QString stringValue (const QString &name, const QString &def=QString()) const
 
void setValue (const QString &name, const int val)
 
void setValue (const QString &name, const double val)
 
void setValue (const QString &name, const bool val)
 
void setValue (const QString &name, const QFont &val)
 
void setValue (const QString &name, const QColor &val)
 
void setValue (const QString &name, const QString &val)
 

Protected Attributes

SUIT_ResourceMgr * _resource
 

Detailed Description

Definition at line 30 of file Yacsgui_Resource.hxx.

Constructor & Destructor Documentation

◆ Yacsgui_Resource()

Yacsgui_Resource::Yacsgui_Resource ( SUIT_ResourceMgr *  r)

Definition at line 32 of file Yacsgui_Resource.cxx.

33{
34 DEBTRACE("Yacsgui_Resource::Yacsgui_Resource");
35 _resource = r;
36}
#define DEBTRACE(msg)
Definition: YacsTrace.hxx:31
SUIT_ResourceMgr * _resource

References _resource, DEBTRACE, and testCppPluginInvokation::r.

Member Function Documentation

◆ booleanValue()

bool Yacsgui_Resource::booleanValue ( const QString &  name,
const bool  def = false 
) const
protected

Definition at line 49 of file Yacsgui_Resource.cxx.

49 {
50 return _resource->booleanValue(RESOURCE_YACS, name, def);
51}
#define RESOURCE_YACS

References _resource, and RESOURCE_YACS.

Referenced by preferencesChanged().

◆ colorValue() [1/3]

QColor Yacsgui_Resource::colorValue ( const QString &  name,
const int  h,
const int  s,
const int  v 
) const
protected

Definition at line 66 of file Yacsgui_Resource.cxx.

66 {
67 QColor col;
68 col.setHsv(h, s, v);
69 return colorValue(name, col);
70}
QColor colorValue(const QString &name, const QColor &def=QColor()) const
def h(x, y, destx, desty)
Definition: graph.py:272

References colorValue(), and gui.graph::h().

◆ colorValue() [2/3]

QColor Yacsgui_Resource::colorValue ( const QString &  name,
const QColor &  def = QColor() 
) const
protected

Definition at line 57 of file Yacsgui_Resource.cxx.

57 {
58 return _resource->colorValue(RESOURCE_YACS, name, def);
59}

References _resource, and RESOURCE_YACS.

Referenced by colorValue(), and preferencesChanged().

◆ colorValue() [3/3]

QColor Yacsgui_Resource::colorValue ( const QString &  name,
const Qt::GlobalColor  c 
) const
protected

Definition at line 61 of file Yacsgui_Resource.cxx.

61 {
62 QColor col(c);
63 return colorValue(name, col);
64}

References gui.CONNECTOR::c, and colorValue().

◆ createPreferences()

void Yacsgui_Resource::createPreferences ( Yacsgui swm)
virtual

Definition at line 106 of file Yacsgui_Resource.cxx.

107{
108 DEBTRACE("createPreferences");
109 // --- General tab ---
110 int genTab = swm->addPreference( Yacsgui::tr( "PREF_TAB_GENERAL" ) );
111
112 int presentationGroup = swm->addPreference( "Presentation", genTab );
113 swm->setPreferenceProperty(presentationGroup , "columns", 2);
114
115 swm->addPreference( "Auto Compute Links", presentationGroup, LightApp_Preferences::Bool, RESOURCE_YACS, "autoComputeLinks" );
116 swm->addPreference( "Simplify Links", presentationGroup, LightApp_Preferences::Bool, RESOURCE_YACS, "simplifyLink" );
117 swm->addPreference( "Better Separation for Links", presentationGroup, LightApp_Preferences::Bool, RESOURCE_YACS, "addRowCols" );
118 swm->addPreference( "Ensure Node Visible When Moved", presentationGroup, LightApp_Preferences::Bool, RESOURCE_YACS, "ensureVisibleWhenMoved" );
119 swm->addPreference( "Tabified Panels Up", presentationGroup, LightApp_Preferences::Bool, RESOURCE_YACS, "tabPanelsUp" );
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" );
123
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 );
132
133 stringsList.clear();
134 indexesList.clear();
135
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 );
140
141 int pythonGroup = swm->addPreference( "Python", genTab );
142
143 swm->addPreference( "Python Script Font", pythonGroup, LightApp_Preferences::Font, RESOURCE_YACS, "font" );
144 swm->addPreference( "Python External Editor", pythonGroup, LightApp_Preferences::String, RESOURCE_YACS, "pythonExternalEditor" );
145
146 int catalogGroup = swm->addPreference( "Catalogs", genTab );
147
148 swm->addPreference( "User catalog", catalogGroup, LightApp_Preferences::File, RESOURCE_YACS, "userCatalog" );
149
150 int componentGroup = swm->addPreference( Yacsgui::tr( "PREF_GROUP_COMPONENT" ), genTab );
151
152 swm->addPreference( Yacsgui::tr( _COMPONENT_INSTANCE_NEW ), componentGroup, LightApp_Preferences::Bool, RESOURCE_YACS, _COMPONENT_INSTANCE_NEW );
153
154 // Link colors tab
155 int linkTab = swm->addPreference( Yacsgui::tr( "Link colors" ) );
156
157 int idGroup = swm->addPreference( Yacsgui::tr( "PREF_GROUP_GENERAL" ), linkTab );
158 swm->setPreferenceProperty( idGroup, "columns", 1 );
159
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" );
167
168 swm->addPreference( Yacsgui::tr( "link pen darkness" ), idGroup, LightApp_Preferences::Integer, RESOURCE_YACS, "link_pen_darkness" );
169 swm->addPreference( Yacsgui::tr( "link thickness" ), idGroup, LightApp_Preferences::Double, RESOURCE_YACS, "link_thickness" );
170 swm->addPreference( Yacsgui::tr( "link separation weight" ), idGroup, LightApp_Preferences::Integer, RESOURCE_YACS, "link_separation_weight" );
171
172 // --- node colors tab ---
173 int nodeTab = swm->addPreference( Yacsgui::tr( "PREF_TAB_NODE" ) );
174
175 int nodeSubtab = swm->addPreference( Yacsgui::tr( "PREF_GROUP_SCENE" ), nodeTab );
176 swm->setPreferenceProperty(nodeSubtab , "columns", 2);
177
178 swm->addPreference( Yacsgui::tr( "Pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _Scene_pen );
179 swm->addPreference( Yacsgui::tr( "Brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _Scene_brush );
180 swm->addPreference( Yacsgui::tr( "High pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _Scene_hiPen );
181 swm->addPreference( Yacsgui::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _Scene_hiBrush );
182
183 nodeSubtab = swm->addPreference( Yacsgui::tr( "PREF_GROUP_BLOC" ), nodeTab );
184 swm->setPreferenceProperty(nodeSubtab , "columns", 2);
185
186 swm->addPreference( Yacsgui::tr( "Pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _ComposedNode_pen );
187 swm->addPreference( Yacsgui::tr( "Brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _ComposedNode_brush );
188 swm->addPreference( Yacsgui::tr( "High pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _ComposedNode_hiPen );
189 swm->addPreference( Yacsgui::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _ComposedNode_hiBrush );
190
191 nodeSubtab = swm->addPreference( Yacsgui::tr( "PREF_GROUP_NODE" ), nodeTab );
192 swm->setPreferenceProperty(nodeSubtab , "columns", 2);
193
194 swm->addPreference( Yacsgui::tr( "Pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _ElementaryNode_pen );
195 swm->addPreference( Yacsgui::tr( "Brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _ElementaryNode_brush );
196 swm->addPreference( Yacsgui::tr( "High pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _ElementaryNode_hiPen );
197 swm->addPreference( Yacsgui::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _ElementaryNode_hiBrush );
198
199 nodeSubtab = swm->addPreference( Yacsgui::tr( "PREF_GROUP_HEADER" ), nodeTab );
200 swm->setPreferenceProperty(nodeSubtab , "columns", 2);
201
202 swm->addPreference( Yacsgui::tr( "Pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _Header_pen );
203 swm->addPreference( Yacsgui::tr( "Brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _Header_brush );
204 swm->addPreference( Yacsgui::tr( "High pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _Header_hiPen );
205 swm->addPreference( Yacsgui::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _Header_hiBrush );
206
207 nodeSubtab = swm->addPreference( Yacsgui::tr( "PREF_GROUP_CONTROL" ), nodeTab );
208 swm->setPreferenceProperty(nodeSubtab , "columns", 2);
209
210 swm->addPreference( Yacsgui::tr( "Pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _CtrlPort_pen );
211 swm->addPreference( Yacsgui::tr( "Brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _CtrlPort_brush );
212 swm->addPreference( Yacsgui::tr( "High pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _CtrlPort_hiPen );
213 swm->addPreference( Yacsgui::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _CtrlPort_hiBrush );
214
215 nodeSubtab = swm->addPreference( Yacsgui::tr( "PREF_GROUP_PORT" ), nodeTab );
216 swm->setPreferenceProperty(nodeSubtab , "columns", 2);
217
218 swm->addPreference( Yacsgui::tr( "Pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _DataPort_pen );
219 swm->addPreference( Yacsgui::tr( "Brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _DataPort_brush );
220 swm->addPreference( Yacsgui::tr( "High pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _DataPort_hiPen );
221 swm->addPreference( Yacsgui::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _DataPort_hiBrush );
222
223 nodeSubtab = swm->addPreference( "Datastream port", nodeTab );
224 swm->setPreferenceProperty(nodeSubtab , "columns", 2);
225
226 swm->addPreference( Yacsgui::tr( "Pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _DataStreamPort_pen );
227 swm->addPreference( Yacsgui::tr( "Brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _DataStreamPort_brush );
228 swm->addPreference( Yacsgui::tr( "High pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _DataStreamPort_hiPen );
229 swm->addPreference( Yacsgui::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, _DataStreamPort_hiBrush );
230
231 nodeSubtab = swm->addPreference( Yacsgui::tr( "PREF_GROUP_DRAG" ), nodeTab );
232 swm->setPreferenceProperty(nodeSubtab, "columns", 1);
233
234 swm->addPreference( Yacsgui::tr( "On dragging"), nodeSubtab, LightApp_Preferences::Color, RESOURCE_YACS, __dragOver );
235
236 // --- Color of state of nodes tab ---
237 int stateTab = swm->addPreference( Yacsgui::tr( "PREF_TAB_STATE" ) );
238
239 int editGroup = swm->addPreference( Yacsgui::tr( "PREF_GROUP_EDIT" ), stateTab );
240 swm->setPreferenceProperty( editGroup, "columns", 1 );
241
242 swm->addPreference( Yacsgui::tr( _editedNodeBrushColor ), editGroup, LightApp_Preferences::Color, RESOURCE_YACS, _editedNodeBrushColor );
243 swm->addPreference( Yacsgui::tr( _normalNodeBrushColor ), editGroup, LightApp_Preferences::Color, RESOURCE_YACS, _normalNodeBrushColor );
244 swm->addPreference( Yacsgui::tr( _runNodeBrushColor ), editGroup, LightApp_Preferences::Color, RESOURCE_YACS, _runNodeBrushColor );
245 swm->addPreference( Yacsgui::tr( _validNodeColor ), editGroup, LightApp_Preferences::Color, RESOURCE_YACS, _validNodeColor );
246 swm->addPreference( Yacsgui::tr( _invalidNodeColor ), editGroup, LightApp_Preferences::Color, RESOURCE_YACS, _invalidNodeColor );
247
248 int runGroup = swm->addPreference( Yacsgui::tr( "PREF_GROUP_RUN" ), stateTab );
249 swm->setPreferenceProperty( runGroup, "columns", 2 );
250
251 swm->addPreference( Yacsgui::tr( _NOTYETINITIALIZED ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _NOTYETINITIALIZED );
252 swm->addPreference( Yacsgui::tr( _INITIALISED ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _INITIALISED );
253 swm->addPreference( Yacsgui::tr( _RUNNING ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _RUNNING );
254 swm->addPreference( Yacsgui::tr( _WAITINGTASKS ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _WAITINGTASKS );
255 swm->addPreference( Yacsgui::tr( _PAUSED ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _PAUSED );
256 swm->addPreference( Yacsgui::tr( _FINISHED ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _FINISHED );
257 swm->addPreference( Yacsgui::tr( _STOPPED ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _STOPPED );
258 swm->addPreference( Yacsgui::tr( _UNKNOWN ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _UNKNOWN );
259
260 swm->addPreference( Yacsgui::tr( _UNDEFINED ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _UNDEFINED );
261 swm->addPreference( Yacsgui::tr( _INVALID ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _INVALID );
262 swm->addPreference( Yacsgui::tr( _READY ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _READY );
263 swm->addPreference( Yacsgui::tr( _TOLOAD ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _TOLOAD );
264 swm->addPreference( Yacsgui::tr( _LOADED ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _LOADED );
265 swm->addPreference( Yacsgui::tr( _TOACTIVATE ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _TOACTIVATE );
266 swm->addPreference( Yacsgui::tr( _ACTIVATED ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _ACTIVATED );
267 swm->addPreference( Yacsgui::tr( _DESACTIVATED ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _DESACTIVATED );
268 swm->addPreference( Yacsgui::tr( _DONE ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _DONE );
269 swm->addPreference( Yacsgui::tr( _SUSPENDED ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _SUSPENDED );
270 swm->addPreference( Yacsgui::tr( _LOADFAILED ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _LOADFAILED );
271 swm->addPreference( Yacsgui::tr( _EXECFAILED ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _EXECFAILED );
272 swm->addPreference( Yacsgui::tr( _PAUSE ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _PAUSE );
273 swm->addPreference( Yacsgui::tr( _INTERNALERR ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _INTERNALERR );
274 swm->addPreference( Yacsgui::tr( _DISABLED ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _DISABLED );
275 swm->addPreference( Yacsgui::tr( _FAILED ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _FAILED );
276 swm->addPreference( Yacsgui::tr( _ERROR ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _ERROR );
277 swm->addPreference( Yacsgui::tr( _DEFAULT ), runGroup, LightApp_Preferences::Color, RESOURCE_YACS, _DEFAULT );
278}
#define _DEFAULT
Definition: Resource.hxx:68
#define _Scene_pen
Definition: Resource.hxx:70
#define _ComposedNode_hiPen
Definition: Resource.hxx:77
#define _DESACTIVATED
Definition: Resource.hxx:58
#define _ComposedNode_brush
Definition: Resource.hxx:74
#define _validNodeColor
Definition: Resource.hxx:39
#define _UNKNOWN
Definition: Resource.hxx:49
#define _WAITINGTASKS
Definition: Resource.hxx:45
#define _Scene_brush
Definition: Resource.hxx:72
#define _CtrlPort_hiBrush
Definition: Resource.hxx:87
#define _SUSPENDED
Definition: Resource.hxx:60
#define _INVALID
Definition: Resource.hxx:52
#define _PAUSE
Definition: Resource.hxx:63
#define _TOACTIVATE
Definition: Resource.hxx:56
#define _ElementaryNode_hiBrush
Definition: Resource.hxx:79
#define _ComposedNode_pen
Definition: Resource.hxx:76
#define _DataStreamPort_pen
Definition: Resource.hxx:96
#define _COMPONENT_INSTANCE_NEW
Definition: Resource.hxx:31
#define _ACTIVATED
Definition: Resource.hxx:57
#define _PAUSED
Definition: Resource.hxx:46
#define _Scene_hiBrush
Definition: Resource.hxx:73
#define _invalidNodeColor
Definition: Resource.hxx:40
#define _DONE
Definition: Resource.hxx:59
#define _ERROR
Definition: Resource.hxx:67
#define _ElementaryNode_brush
Definition: Resource.hxx:78
#define _DataPort_hiBrush
Definition: Resource.hxx:91
#define _INTERNALERR
Definition: Resource.hxx:64
#define _DataStreamPort_brush
Definition: Resource.hxx:94
#define _CtrlPort_brush
Definition: Resource.hxx:86
#define _Scene_hiPen
Definition: Resource.hxx:71
#define _Header_brush
Definition: Resource.hxx:82
#define _Header_hiPen
Definition: Resource.hxx:85
#define _DataPort_pen
Definition: Resource.hxx:92
#define _DataStreamPort_hiPen
Definition: Resource.hxx:97
#define _INITIALISED
Definition: Resource.hxx:43
#define _Header_hiBrush
Definition: Resource.hxx:83
#define _editedNodeBrushColor
Definition: Resource.hxx:36
#define _CtrlPort_pen
Definition: Resource.hxx:88
#define _READY
Definition: Resource.hxx:53
#define _FAILED
Definition: Resource.hxx:66
#define _ComposedNode_hiBrush
Definition: Resource.hxx:75
#define _normalNodeBrushColor
Definition: Resource.hxx:37
#define __dragOver
Definition: Resource.hxx:99
#define _ElementaryNode_pen
Definition: Resource.hxx:80
#define _DataStreamPort_hiBrush
Definition: Resource.hxx:95
#define _DataPort_hiPen
Definition: Resource.hxx:93
#define _CtrlPort_hiPen
Definition: Resource.hxx:89
#define _TOLOAD
Definition: Resource.hxx:54
#define _EXECFAILED
Definition: Resource.hxx:62
#define _Header_pen
Definition: Resource.hxx:84
#define _runNodeBrushColor
Definition: Resource.hxx:38
#define _FINISHED
Definition: Resource.hxx:47
#define _DataPort_brush
Definition: Resource.hxx:90
#define _RUNNING
Definition: Resource.hxx:44
#define _ElementaryNode_hiPen
Definition: Resource.hxx:81
#define _UNDEFINED
Definition: Resource.hxx:51
#define _LOADFAILED
Definition: Resource.hxx:61
#define _STOPPED
Definition: Resource.hxx:48
#define _DISABLED
Definition: Resource.hxx:65
#define _NOTYETINITIALIZED
Definition: Resource.hxx:42
#define _LOADED
Definition: Resource.hxx:55

References __dragOver, _ACTIVATED, _COMPONENT_INSTANCE_NEW, _ComposedNode_brush, _ComposedNode_hiBrush, _ComposedNode_hiPen, _ComposedNode_pen, _CtrlPort_brush, _CtrlPort_hiBrush, _CtrlPort_hiPen, _CtrlPort_pen, _DataPort_brush, _DataPort_hiBrush, _DataPort_hiPen, _DataPort_pen, _DataStreamPort_brush, _DataStreamPort_hiBrush, _DataStreamPort_hiPen, _DataStreamPort_pen, _DEFAULT, _DESACTIVATED, _DISABLED, _DONE, _editedNodeBrushColor, _ElementaryNode_brush, _ElementaryNode_hiBrush, _ElementaryNode_hiPen, _ElementaryNode_pen, _ERROR, _EXECFAILED, _FAILED, _FINISHED, _Header_brush, _Header_hiBrush, _Header_hiPen, _Header_pen, _INITIALISED, _INTERNALERR, _INVALID, _invalidNodeColor, _LOADED, _LOADFAILED, _normalNodeBrushColor, _NOTYETINITIALIZED, _PAUSE, _PAUSED, _READY, _RUNNING, _runNodeBrushColor, _Scene_brush, _Scene_hiBrush, _Scene_hiPen, _Scene_pen, _STOPPED, _SUSPENDED, _TOACTIVATE, _TOLOAD, _UNDEFINED, _UNKNOWN, _validNodeColor, _WAITINGTASKS, YACS::ENGINE::Bool, DEBTRACE, YACS::ENGINE::Double, RESOURCE_YACS, and YACS::ENGINE::String.

Referenced by Yacsgui::createPreferences().

◆ doubleValue()

double Yacsgui_Resource::doubleValue ( const QString &  name,
const double  def = 0 
) const
protected

Definition at line 45 of file Yacsgui_Resource.cxx.

45 {
46 return _resource->doubleValue(RESOURCE_YACS, name, def);
47}

References _resource, and RESOURCE_YACS.

Referenced by preferencesChanged().

◆ fontValue()

QFont Yacsgui_Resource::fontValue ( const QString &  name,
const QFont &  def = QFont() 
) const
protected

Definition at line 53 of file Yacsgui_Resource.cxx.

53 {
54 return _resource->fontValue(RESOURCE_YACS, name, def);
55}

References _resource, and RESOURCE_YACS.

Referenced by preferencesChanged().

◆ integerValue()

int Yacsgui_Resource::integerValue ( const QString &  name,
const int  def = 0 
) const
protected

Definition at line 41 of file Yacsgui_Resource.cxx.

41 {
42 return _resource->integerValue(RESOURCE_YACS, name, def);
43}

References _resource, and RESOURCE_YACS.

Referenced by preferencesChanged().

◆ preferencesChanged() [1/2]

void Yacsgui_Resource::preferencesChanged ( )
virtual

Definition at line 280 of file Yacsgui_Resource.cxx.

281{
282 DEBTRACE("preferencesChanged");
283
284 // Notice: it is here for updating the view, etc.
285
286 // General resource
287 Resource::COMPONENT_INSTANCE_NEW = booleanValue(_COMPONENT_INSTANCE_NEW, COMPONENTINSTANCENEW);
288 Resource::pythonfont = fontValue( "font" ,PYTHONFONT);
289 Resource::pythonExternalEditor = stringValue( "pythonExternalEditor" ,PYTHONEXTERNALEDITOR);
290 Resource::userCatalog = stringValue( "userCatalog" ,USERCATALOG);
291 Resource::autoComputeLinks = booleanValue("autoComputeLinks", AUTOCOMPUTELINKS);
292 Resource::simplifyLink = booleanValue("simplifyLink", SIMPLIFYLINK);
293 Resource::addRowCols = booleanValue("addRowCols", ADDROWCOLS);
294 Resource::ensureVisibleWhenMoved = booleanValue("ensureVisibleWhenMoved", ENSUREVISIBLEWHENMOVED);
295 Resource::tabPanelsUp = booleanValue("tabPanelsUp", TABPANELSUP);
296 Resource::dockWidgetPriority = integerValue( "dockWidgetPriority" , DOCKWIDGETPRIORITY);
297 Resource::progressBarColor = colorValue("progressBarColor", PROGRESSBARCOLOR);
298 Resource::progressBarLabel = integerValue( "progressBarLabel" , PROGRESSBARLABEL);
299
300 // Color of state of nodes
301 Resource::editedNodeBrushColor = colorValue(_editedNodeBrushColor, EDITEDNODEBRUSHCOLOR);
302 Resource::normalNodeBrushColor = colorValue(_normalNodeBrushColor, NORMALNODEBRUSHCOLOR);
303 Resource::runNodeBrushColor = colorValue(_runNodeBrushColor , RUNNODEBRUSHCOLOR);
304 Resource::validNodeColor = colorValue(_validNodeColor , VALIDNODECOLOR);
305 Resource::invalidNodeColor = colorValue(_invalidNodeColor , INVALIDNODECOLOR);
306
315
333 Resource::DEFAULT = colorValue(_DEFAULT , DEFAULT_ );
334
335 // Color of links
336 Resource::link_draw_color = colorValue("link_draw_color" , LINKDRAW_COLOR );
337 Resource::stream_link_draw_color = colorValue("stream_link_draw_color" , STREAMLINKDRAW_COLOR );
338 Resource::link_select_color = colorValue("link_select_color" , LINK_SELECT_COLOR );
339 Resource::stream_link_select_color = colorValue("stream_link_select_color" , STREAMLINK_SELECT_COLOR);
340 Resource::control_link_draw_color = colorValue("control_link_draw_color" , CTRLLINKDRAW_COLOR );
341 Resource::control_link_select_color = colorValue("control_link_select_color", CTRLLINK_SELECT_COLOR );
342 Resource::emphasizeBrushColor = colorValue("emphasizeBrushColor" , EMPHASIZEBRUSHCOLOR );
343
344 Resource::link_pen_darkness = integerValue("link_pen_darkness", LINK_PEN_DARKNESS );
345 Resource::link_separation_weight = integerValue("link_separation_weight", LINK_SEPARATION_WEIGHT );
346 Resource::link_thickness = doubleValue("link_thickness", LINK_THICKNESS );
347
348 // Color of nodes
349 Resource::Scene_pen = colorValue(_Scene_pen, Scene_pen_ );
350 Resource::Scene_hiPen = colorValue(_Scene_hiPen, Scene_hiPen_ );
351 Resource::Scene_brush = colorValue(_Scene_brush, Scene_brush_ );
352 Resource::Scene_hiBrush = colorValue(_Scene_hiBrush, Scene_hiBrush_ );
353 Resource::ComposedNode_brush = colorValue(_ComposedNode_brush, ComposedNode_brush_ );
354 Resource::ComposedNode_hiBrush = colorValue(_ComposedNode_hiBrush, ComposedNode_hiBrush_ );
355 Resource::ComposedNode_pen = colorValue(_ComposedNode_pen, ComposedNode_pen_ );
356 Resource::ComposedNode_hiPen = colorValue(_ComposedNode_hiPen, ComposedNode_hiPen_ );
357 Resource::ElementaryNode_brush = colorValue(_ElementaryNode_brush, ElementaryNode_brush_ );
358 Resource::ElementaryNode_hiBrush = colorValue(_ElementaryNode_hiBrush, ElementaryNode_hiBrush_);
359 Resource::ElementaryNode_pen = colorValue(_ElementaryNode_pen, ElementaryNode_pen_ );
360 Resource::ElementaryNode_hiPen = colorValue(_ElementaryNode_hiPen, ElementaryNode_hiPen_ );
361 Resource::Header_brush = colorValue(_Header_brush, Header_brush_ );
362 Resource::Header_hiBrush = colorValue(_Header_hiBrush, Header_hiBrush_ );
363 Resource::Header_pen = colorValue(_Header_pen, Header_pen_ );
364 Resource::Header_hiPen = colorValue(_Header_hiPen, Header_hiPen_ );
365 Resource::CtrlPort_brush = colorValue(_CtrlPort_brush, CtrlPort_brush_ );
366 Resource::CtrlPort_hiBrush = colorValue(_CtrlPort_hiBrush, CtrlPort_hiBrush_ );
367 Resource::CtrlPort_pen = colorValue(_CtrlPort_pen, CtrlPort_pen_ );
368 Resource::CtrlPort_hiPen = colorValue(_CtrlPort_hiPen, CtrlPort_hiPen_ );
369 Resource::DataPort_brush = colorValue(_DataPort_brush, DataPort_brush_ );
370 Resource::DataPort_hiBrush = colorValue(_DataPort_hiBrush, DataPort_hiBrush_ );
371 Resource::DataPort_pen = colorValue(_DataPort_pen, DataPort_pen_ );
372 Resource::DataPort_hiPen = colorValue(_DataPort_hiPen, DataPort_hiPen_ );
373 Resource::DataStreamPort_brush = colorValue(_DataStreamPort_brush, DataStreamPort_brush_ );
374 Resource::DataStreamPort_hiBrush = colorValue(_DataStreamPort_hiBrush, DataStreamPort_hiBrush_);
375 Resource::DataStreamPort_pen = colorValue(_DataStreamPort_pen, DataStreamPort_pen_ );
376 Resource::DataStreamPort_hiPen = colorValue(_DataStreamPort_hiPen, DataStreamPort_hiPen_ );
377
378 Resource::dragOver = colorValue(__dragOver, dragOver_ );
379}
#define UNKNOWN_
Definition: Resource.hxx:133
#define DESACTIVATED_
Definition: Resource.hxx:142
#define FINISHED_
Definition: Resource.hxx:131
#define RUNNODEBRUSHCOLOR
Definition: Resource.hxx:120
#define STREAMLINKDRAW_COLOR
Definition: Resource.hxx:156
#define LINK_SEPARATION_WEIGHT
Definition: Resource.hxx:162
#define ADDROWCOLS
Definition: Resource.hxx:108
#define CtrlPort_hiPen_
Definition: Resource.hxx:183
#define VALIDNODECOLOR
Definition: Resource.hxx:121
#define DataPort_hiPen_
Definition: Resource.hxx:187
#define DataStreamPort_hiBrush_
Definition: Resource.hxx:189
#define CtrlPort_brush_
Definition: Resource.hxx:180
#define FAILED_
Definition: Resource.hxx:150
#define AUTOCOMPUTELINKS
Definition: Resource.hxx:110
#define ElementaryNode_pen_
Definition: Resource.hxx:174
#define CTRLLINK_SELECT_COLOR
Definition: Resource.hxx:159
#define PAUSE_
Definition: Resource.hxx:147
#define READY_
Definition: Resource.hxx:137
#define PAUSED_
Definition: Resource.hxx:130
#define COMPONENTINSTANCENEW
Definition: Resource.hxx:104
#define CTRLLINKDRAW_COLOR
Definition: Resource.hxx:158
#define ComposedNode_pen_
Definition: Resource.hxx:170
#define ComposedNode_hiPen_
Definition: Resource.hxx:171
#define Header_hiBrush_
Definition: Resource.hxx:177
#define ACTIVATED_
Definition: Resource.hxx:141
#define STREAMLINK_SELECT_COLOR
Definition: Resource.hxx:157
#define LOADED_
Definition: Resource.hxx:139
#define DONE_
Definition: Resource.hxx:143
#define ComposedNode_hiBrush_
Definition: Resource.hxx:169
#define DOCKWIDGETPRIORITY
Definition: Resource.hxx:114
#define DataPort_brush_
Definition: Resource.hxx:184
#define ERROR_
Definition: Resource.hxx:151
#define STOPPED_
Definition: Resource.hxx:132
#define ElementaryNode_hiPen_
Definition: Resource.hxx:175
#define LINK_SELECT_COLOR
Definition: Resource.hxx:155
#define PROGRESSBARLABEL
Definition: Resource.hxx:116
#define NOTYETINITIALIZED_
Definition: Resource.hxx:126
#define TABPANELSUP
Definition: Resource.hxx:113
#define INVALID_
Definition: Resource.hxx:136
#define Header_hiPen_
Definition: Resource.hxx:179
#define LINKDRAW_COLOR
Definition: Resource.hxx:154
#define Scene_hiPen_
Definition: Resource.hxx:165
#define DEFAULT_
Definition: Resource.hxx:152
#define DISABLED_
Definition: Resource.hxx:149
#define DataPort_hiBrush_
Definition: Resource.hxx:185
#define DataStreamPort_pen_
Definition: Resource.hxx:190
#define DataStreamPort_brush_
Definition: Resource.hxx:188
#define UNDEFINED_
Definition: Resource.hxx:135
#define INTERNALERR_
Definition: Resource.hxx:148
#define LOADFAILED_
Definition: Resource.hxx:145
#define TOLOAD_
Definition: Resource.hxx:138
#define EXECFAILED_
Definition: Resource.hxx:146
#define TOACTIVATE_
Definition: Resource.hxx:140
#define PYTHONFONT
Definition: Resource.hxx:105
#define EDITEDNODEBRUSHCOLOR
Definition: Resource.hxx:118
#define PYTHONEXTERNALEDITOR
Definition: Resource.hxx:106
#define ElementaryNode_hiBrush_
Definition: Resource.hxx:173
#define Scene_hiBrush_
Definition: Resource.hxx:167
#define INITIALISED_
Definition: Resource.hxx:127
#define DataStreamPort_hiPen_
Definition: Resource.hxx:191
#define Scene_brush_
Definition: Resource.hxx:166
#define dragOver_
Definition: Resource.hxx:193
#define EMPHASIZEBRUSHCOLOR
Definition: Resource.hxx:124
#define NORMALNODEBRUSHCOLOR
Definition: Resource.hxx:119
#define SIMPLIFYLINK
Definition: Resource.hxx:111
#define LINK_PEN_DARKNESS
Definition: Resource.hxx:160
#define USERCATALOG
Definition: Resource.hxx:107
#define ElementaryNode_brush_
Definition: Resource.hxx:172
#define ENSUREVISIBLEWHENMOVED
Definition: Resource.hxx:112
#define ComposedNode_brush_
Definition: Resource.hxx:168
#define SUSPENDED_
Definition: Resource.hxx:144
#define Header_brush_
Definition: Resource.hxx:176
#define DataPort_pen_
Definition: Resource.hxx:186
#define INVALIDNODECOLOR
Definition: Resource.hxx:122
#define Header_pen_
Definition: Resource.hxx:178
#define WAITINGTASKS_
Definition: Resource.hxx:129
#define PROGRESSBARCOLOR
Definition: Resource.hxx:115
#define LINK_THICKNESS
Definition: Resource.hxx:161
#define RUNNING_
Definition: Resource.hxx:128
#define CtrlPort_pen_
Definition: Resource.hxx:182
#define CtrlPort_hiBrush_
Definition: Resource.hxx:181
#define Scene_pen_
Definition: Resource.hxx:164
int integerValue(const QString &name, const int def=0) const
QString stringValue(const QString &name, const QString &def=QString()) const
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
@ RUNNING
Definition: define.hxx:67
@ PAUSED
Definition: define.hxx:69
@ WAITINGTASKS
Definition: define.hxx:68
@ INITIALISED
Definition: define.hxx:66
@ NOTYETINITIALIZED
Definition: define.hxx:65
@ FINISHED
Definition: define.hxx:70
@ STOPPED
Definition: define.hxx:71
@ INVALID
Definition: define.hxx:36
@ FAILED
Definition: define.hxx:51
@ UNDEFINED
Definition: define.hxx:35
@ DESACTIVATED
Definition: define.hxx:42
@ EXECFAILED
Definition: define.hxx:46
@ TOLOAD
Definition: define.hxx:38
@ LOADED
Definition: define.hxx:39
@ READY
Definition: define.hxx:37
@ ACTIVATED
Definition: define.hxx:41
@ INTERNALERR
Definition: define.hxx:49
@ DONE
Definition: define.hxx:43
@ TOACTIVATE
Definition: define.hxx:40
@ SUSPENDED
Definition: define.hxx:44
@ PAUSE
Definition: define.hxx:47
@ DISABLED
Definition: define.hxx:50
@ LOADFAILED
Definition: define.hxx:45
@ ERROR
Definition: define.hxx:52

References __dragOver, _ACTIVATED, _COMPONENT_INSTANCE_NEW, _ComposedNode_brush, _ComposedNode_hiBrush, _ComposedNode_hiPen, _ComposedNode_pen, _CtrlPort_brush, _CtrlPort_hiBrush, _CtrlPort_hiPen, _CtrlPort_pen, _DataPort_brush, _DataPort_hiBrush, _DataPort_hiPen, _DataPort_pen, _DataStreamPort_brush, _DataStreamPort_hiBrush, _DataStreamPort_hiPen, _DataStreamPort_pen, _DEFAULT, _DESACTIVATED, _DISABLED, _DONE, _editedNodeBrushColor, _ElementaryNode_brush, _ElementaryNode_hiBrush, _ElementaryNode_hiPen, _ElementaryNode_pen, _ERROR, _EXECFAILED, _FAILED, _FINISHED, _Header_brush, _Header_hiBrush, _Header_hiPen, _Header_pen, _INITIALISED, _INTERNALERR, _INVALID, _invalidNodeColor, _LOADED, _LOADFAILED, _normalNodeBrushColor, _NOTYETINITIALIZED, _PAUSE, _PAUSED, _READY, _RUNNING, _runNodeBrushColor, _Scene_brush, _Scene_hiBrush, _Scene_hiPen, _Scene_pen, _STOPPED, _SUSPENDED, _TOACTIVATE, _TOLOAD, _UNDEFINED, _UNKNOWN, _validNodeColor, _WAITINGTASKS, YACS::ACTIVATED, ACTIVATED_, ADDROWCOLS, AUTOCOMPUTELINKS, booleanValue(), colorValue(), COMPONENTINSTANCENEW, ComposedNode_brush_, ComposedNode_hiBrush_, ComposedNode_hiPen_, ComposedNode_pen_, CTRLLINK_SELECT_COLOR, CTRLLINKDRAW_COLOR, CtrlPort_brush_, CtrlPort_hiBrush_, CtrlPort_hiPen_, CtrlPort_pen_, DataPort_brush_, DataPort_hiBrush_, DataPort_hiPen_, DataPort_pen_, DataStreamPort_brush_, DataStreamPort_hiBrush_, DataStreamPort_hiPen_, DataStreamPort_pen_, DEBTRACE, DEFAULT_, YACS::DESACTIVATED, DESACTIVATED_, YACS::DISABLED, DISABLED_, DOCKWIDGETPRIORITY, YACS::DONE, DONE_, doubleValue(), dragOver_, EDITEDNODEBRUSHCOLOR, ElementaryNode_brush_, ElementaryNode_hiBrush_, ElementaryNode_hiPen_, ElementaryNode_pen_, EMPHASIZEBRUSHCOLOR, ENSUREVISIBLEWHENMOVED, YACS::ERROR, ERROR_, YACS::EXECFAILED, EXECFAILED_, YACS::FAILED, FAILED_, YACS::FINISHED, FINISHED_, fontValue(), Header_brush_, Header_hiBrush_, Header_hiPen_, Header_pen_, YACS::INITIALISED, INITIALISED_, integerValue(), YACS::INTERNALERR, INTERNALERR_, YACS::INVALID, INVALID_, INVALIDNODECOLOR, LINK_PEN_DARKNESS, LINK_SELECT_COLOR, LINK_SEPARATION_WEIGHT, LINK_THICKNESS, LINKDRAW_COLOR, YACS::LOADED, LOADED_, YACS::LOADFAILED, LOADFAILED_, NORMALNODEBRUSHCOLOR, YACS::NOTYETINITIALIZED, NOTYETINITIALIZED_, YACS::PAUSE, PAUSE_, YACS::PAUSED, PAUSED_, PROGRESSBARCOLOR, PROGRESSBARLABEL, PYTHONEXTERNALEDITOR, PYTHONFONT, YACS::READY, READY_, YACS::RUNNING, RUNNING_, RUNNODEBRUSHCOLOR, Scene_brush_, Scene_hiBrush_, Scene_hiPen_, Scene_pen_, SIMPLIFYLINK, YACS::STOPPED, STOPPED_, STREAMLINK_SELECT_COLOR, STREAMLINKDRAW_COLOR, stringValue(), YACS::SUSPENDED, SUSPENDED_, TABPANELSUP, YACS::TOACTIVATE, TOACTIVATE_, YACS::TOLOAD, TOLOAD_, YACS::UNDEFINED, UNDEFINED_, YACS::HMI::UNKNOWN, UNKNOWN_, USERCATALOG, VALIDNODECOLOR, YACS::WAITINGTASKS, and WAITINGTASKS_.

Referenced by preferencesChanged().

◆ preferencesChanged() [2/2]

void Yacsgui_Resource::preferencesChanged ( const QString &  sect,
const QString &  name 
)
virtual

Definition at line 381 of file Yacsgui_Resource.cxx.

382{
383 if( sect==RESOURCE_YACS )
384 {
386 }
387}
virtual void preferencesChanged()

References preferencesChanged(), and RESOURCE_YACS.

Referenced by Yacsgui::preferencesChanged(), and Yacsgui::setResource().

◆ setValue() [1/6]

void Yacsgui_Resource::setValue ( const QString &  name,
const bool  val 
)
protected

Definition at line 87 of file Yacsgui_Resource.cxx.

87 {
88 _resource->setValue(RESOURCE_YACS, name, val);
89}

References _resource, and RESOURCE_YACS.

◆ setValue() [2/6]

void Yacsgui_Resource::setValue ( const QString &  name,
const double  val 
)
protected

Definition at line 83 of file Yacsgui_Resource.cxx.

83 {
84 _resource->setValue(RESOURCE_YACS, name, val);
85}

References _resource, and RESOURCE_YACS.

◆ setValue() [3/6]

void Yacsgui_Resource::setValue ( const QString &  name,
const int  val 
)
protected

Definition at line 79 of file Yacsgui_Resource.cxx.

79 {
80 _resource->setValue(RESOURCE_YACS, name, val);
81}

References _resource, and RESOURCE_YACS.

◆ setValue() [4/6]

void Yacsgui_Resource::setValue ( const QString &  name,
const QColor &  val 
)
protected

Definition at line 95 of file Yacsgui_Resource.cxx.

95 {
96 _resource->setValue(RESOURCE_YACS, name, val);
97}

References _resource, and RESOURCE_YACS.

◆ setValue() [5/6]

void Yacsgui_Resource::setValue ( const QString &  name,
const QFont &  val 
)
protected

Definition at line 91 of file Yacsgui_Resource.cxx.

91 {
92 _resource->setValue(RESOURCE_YACS, name, val);
93}

References _resource, and RESOURCE_YACS.

◆ setValue() [6/6]

void Yacsgui_Resource::setValue ( const QString &  name,
const QString &  val 
)
protected

Definition at line 99 of file Yacsgui_Resource.cxx.

99 {
100 _resource->setValue(RESOURCE_YACS, name, val);
101}

References _resource, and RESOURCE_YACS.

◆ stringValue()

QString Yacsgui_Resource::stringValue ( const QString &  name,
const QString &  def = QString() 
) const
protected

Definition at line 72 of file Yacsgui_Resource.cxx.

72 {
73 return _resource->stringValue(RESOURCE_YACS, name, def);
74}

References _resource, and RESOURCE_YACS.

Referenced by preferencesChanged().

Member Data Documentation

◆ _resource

SUIT_ResourceMgr* Yacsgui_Resource::_resource
protected

The documentation for this class was generated from the following files: