Version: 8.3.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 ( SUIT_ResourceMgr *  r)

Definition at line 32 of file Yacsgui_Resource.cxx.

References DEBTRACE.

33 {
34  DEBTRACE("Yacsgui_Resource::Yacsgui_Resource");
35  _resource = r;
36 }

Member Function Documentation

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

Definition at line 49 of file Yacsgui_Resource.cxx.

References RESOURCE_YACS.

49  {
50  return _resource->booleanValue(RESOURCE_YACS, name, def);
51 }
QColor Yacsgui_Resource::colorValue ( const QString &  name,
const QColor &  def = QColor() 
) const
protected

Definition at line 57 of file Yacsgui_Resource.cxx.

References RESOURCE_YACS.

57  {
58  return _resource->colorValue(RESOURCE_YACS, name, def);
59 }
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 }
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 }
void Yacsgui_Resource::createPreferences ( Yacsgui swm)
virtual

Definition at line 106 of file Yacsgui_Resource.cxx.

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().

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 }
double Yacsgui_Resource::doubleValue ( const QString &  name,
const double  def = 0 
) const
protected

Definition at line 45 of file Yacsgui_Resource.cxx.

References RESOURCE_YACS.

45  {
46  return _resource->doubleValue(RESOURCE_YACS, name, def);
47 }
QFont Yacsgui_Resource::fontValue ( const QString &  name,
const QFont &  def = QFont() 
) const
protected

Definition at line 53 of file Yacsgui_Resource.cxx.

References RESOURCE_YACS.

53  {
54  return _resource->fontValue(RESOURCE_YACS, name, def);
55 }
int Yacsgui_Resource::integerValue ( const QString &  name,
const int  def = 0 
) const
protected

Definition at line 41 of file Yacsgui_Resource.cxx.

References RESOURCE_YACS.

41  {
42  return _resource->integerValue(RESOURCE_YACS, name, def);
43 }
void Yacsgui_Resource::preferencesChanged ( const QString &  sect,
const QString &  name 
)
virtual

Definition at line 381 of file Yacsgui_Resource.cxx.

References RESOURCE_YACS.

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

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

Definition at line 280 of file Yacsgui_Resource.cxx.

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::HMI::Resource::ACTIVATED, ACTIVATED_, ADDROWCOLS, YACS::HMI::Resource::addRowCols, AUTOCOMPUTELINKS, YACS::HMI::Resource::autoComputeLinks, YACS::HMI::Resource::COMPONENT_INSTANCE_NEW, COMPONENTINSTANCENEW, YACS::HMI::Resource::ComposedNode_brush, ComposedNode_brush_, YACS::HMI::Resource::ComposedNode_hiBrush, ComposedNode_hiBrush_, YACS::HMI::Resource::ComposedNode_hiPen, ComposedNode_hiPen_, YACS::HMI::Resource::ComposedNode_pen, ComposedNode_pen_, YACS::HMI::Resource::control_link_draw_color, YACS::HMI::Resource::control_link_select_color, CTRLLINK_SELECT_COLOR, CTRLLINKDRAW_COLOR, YACS::HMI::Resource::CtrlPort_brush, CtrlPort_brush_, YACS::HMI::Resource::CtrlPort_hiBrush, CtrlPort_hiBrush_, YACS::HMI::Resource::CtrlPort_hiPen, CtrlPort_hiPen_, YACS::HMI::Resource::CtrlPort_pen, CtrlPort_pen_, YACS::HMI::Resource::DataPort_brush, DataPort_brush_, YACS::HMI::Resource::DataPort_hiBrush, DataPort_hiBrush_, YACS::HMI::Resource::DataPort_hiPen, DataPort_hiPen_, YACS::HMI::Resource::DataPort_pen, DataPort_pen_, YACS::HMI::Resource::DataStreamPort_brush, DataStreamPort_brush_, YACS::HMI::Resource::DataStreamPort_hiBrush, DataStreamPort_hiBrush_, YACS::HMI::Resource::DataStreamPort_hiPen, DataStreamPort_hiPen_, YACS::HMI::Resource::DataStreamPort_pen, DataStreamPort_pen_, DEBTRACE, YACS::HMI::Resource::DEFAULT, DEFAULT_, YACS::HMI::Resource::DESACTIVATED, DESACTIVATED_, YACS::HMI::Resource::DISABLED, DISABLED_, DOCKWIDGETPRIORITY, YACS::HMI::Resource::dockWidgetPriority, YACS::HMI::Resource::DONE, DONE_, YACS::HMI::Resource::dragOver, dragOver_, EDITEDNODEBRUSHCOLOR, YACS::HMI::Resource::editedNodeBrushColor, YACS::HMI::Resource::ElementaryNode_brush, ElementaryNode_brush_, YACS::HMI::Resource::ElementaryNode_hiBrush, ElementaryNode_hiBrush_, YACS::HMI::Resource::ElementaryNode_hiPen, ElementaryNode_hiPen_, YACS::HMI::Resource::ElementaryNode_pen, ElementaryNode_pen_, EMPHASIZEBRUSHCOLOR, YACS::HMI::Resource::emphasizeBrushColor, ENSUREVISIBLEWHENMOVED, YACS::HMI::Resource::ensureVisibleWhenMoved, YACS::HMI::Resource::ERROR, ERROR_, YACS::HMI::Resource::EXECFAILED, EXECFAILED_, YACS::HMI::Resource::FAILED, FAILED_, YACS::HMI::Resource::FINISHED, FINISHED_, YACS::HMI::Resource::Header_brush, Header_brush_, YACS::HMI::Resource::Header_hiBrush, Header_hiBrush_, YACS::HMI::Resource::Header_hiPen, Header_hiPen_, YACS::HMI::Resource::Header_pen, Header_pen_, YACS::HMI::Resource::INITIALISED, INITIALISED_, YACS::HMI::Resource::INTERNALERR, INTERNALERR_, YACS::HMI::Resource::INVALID, INVALID_, INVALIDNODECOLOR, YACS::HMI::Resource::invalidNodeColor, YACS::HMI::Resource::link_draw_color, LINK_PEN_DARKNESS, YACS::HMI::Resource::link_pen_darkness, LINK_SELECT_COLOR, YACS::HMI::Resource::link_select_color, LINK_SEPARATION_WEIGHT, YACS::HMI::Resource::link_separation_weight, LINK_THICKNESS, YACS::HMI::Resource::link_thickness, LINKDRAW_COLOR, YACS::HMI::Resource::LOADED, LOADED_, YACS::HMI::Resource::LOADFAILED, LOADFAILED_, NORMALNODEBRUSHCOLOR, YACS::HMI::Resource::normalNodeBrushColor, YACS::HMI::Resource::NOTYETINITIALIZED, NOTYETINITIALIZED_, YACS::HMI::Resource::PAUSE, PAUSE_, YACS::HMI::Resource::PAUSED, PAUSED_, PROGRESSBARCOLOR, YACS::HMI::Resource::progressBarColor, PROGRESSBARLABEL, YACS::HMI::Resource::progressBarLabel, PYTHONEXTERNALEDITOR, YACS::HMI::Resource::pythonExternalEditor, PYTHONFONT, YACS::HMI::Resource::pythonfont, YACS::HMI::Resource::READY, READY_, YACS::HMI::Resource::RUNNING, RUNNING_, RUNNODEBRUSHCOLOR, YACS::HMI::Resource::runNodeBrushColor, YACS::HMI::Resource::Scene_brush, Scene_brush_, YACS::HMI::Resource::Scene_hiBrush, Scene_hiBrush_, YACS::HMI::Resource::Scene_hiPen, Scene_hiPen_, YACS::HMI::Resource::Scene_pen, Scene_pen_, SIMPLIFYLINK, YACS::HMI::Resource::simplifyLink, YACS::HMI::Resource::STOPPED, STOPPED_, YACS::HMI::Resource::stream_link_draw_color, YACS::HMI::Resource::stream_link_select_color, STREAMLINK_SELECT_COLOR, STREAMLINKDRAW_COLOR, YACS::HMI::Resource::SUSPENDED, SUSPENDED_, TABPANELSUP, YACS::HMI::Resource::tabPanelsUp, YACS::HMI::Resource::TOACTIVATE, TOACTIVATE_, YACS::HMI::Resource::TOLOAD, TOLOAD_, YACS::HMI::Resource::UNDEFINED, UNDEFINED_, YACS::HMI::Resource::UNKNOWN, UNKNOWN_, USERCATALOG, YACS::HMI::Resource::userCatalog, VALIDNODECOLOR, YACS::HMI::Resource::validNodeColor, YACS::HMI::Resource::WAITINGTASKS, and WAITINGTASKS_.

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 }
void Yacsgui_Resource::setValue ( const QString &  name,
const int  val 
)
protected

Definition at line 79 of file Yacsgui_Resource.cxx.

References RESOURCE_YACS.

79  {
80  _resource->setValue(RESOURCE_YACS, name, val);
81 }
void Yacsgui_Resource::setValue ( const QString &  name,
const double  val 
)
protected

Definition at line 83 of file Yacsgui_Resource.cxx.

References RESOURCE_YACS.

83  {
84  _resource->setValue(RESOURCE_YACS, name, val);
85 }
void Yacsgui_Resource::setValue ( const QString &  name,
const bool  val 
)
protected

Definition at line 87 of file Yacsgui_Resource.cxx.

References RESOURCE_YACS.

87  {
88  _resource->setValue(RESOURCE_YACS, name, val);
89 }
void Yacsgui_Resource::setValue ( const QString &  name,
const QFont &  val 
)
protected

Definition at line 91 of file Yacsgui_Resource.cxx.

References RESOURCE_YACS.

91  {
92  _resource->setValue(RESOURCE_YACS, name, val);
93 }
void Yacsgui_Resource::setValue ( const QString &  name,
const QColor &  val 
)
protected

Definition at line 95 of file Yacsgui_Resource.cxx.

References RESOURCE_YACS.

95  {
96  _resource->setValue(RESOURCE_YACS, name, val);
97 }
void Yacsgui_Resource::setValue ( const QString &  name,
const QString &  val 
)
protected

Definition at line 99 of file Yacsgui_Resource.cxx.

References RESOURCE_YACS.

99  {
100  _resource->setValue(RESOURCE_YACS, name, val);
101 }
QString Yacsgui_Resource::stringValue ( const QString &  name,
const QString &  def = QString() 
) const
protected

Definition at line 72 of file Yacsgui_Resource.cxx.

References RESOURCE_YACS.

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

Member Data Documentation

SUIT_ResourceMgr* Yacsgui_Resource::_resource
protected

Definition at line 56 of file Yacsgui_Resource.hxx.


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