1 // Copyright (C) 2009-2016 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #include "HEXABLOCKGUI_Resource.hxx"
22 #include "Resource.hxx"
23 #include "HEXABLOCKGUI.hxx"
24 #include <SUIT_ResourceMgr.h>
30 #include "HEXABLOCKGUI_Trace.hxx"
32 #define RESOURCE_HEXABLOCK "HEXABLOCK"
34 using namespace HEXABLOCK::GUI;
37 HEXABLOCKGUI_Resource::HEXABLOCKGUI_Resource(SUIT_ResourceMgr* r)
39 DEBTRACE("HEXABLOCKGUI_Resource::HEXABLOCKGUI_Resource");
46 int HEXABLOCKGUI_Resource::integerValue(const QString& name, const int def) const {
47 return _resource->integerValue(RESOURCE_HEXABLOCK, name, def);
50 double HEXABLOCKGUI_Resource::doubleValue(const QString& name, const double def) const {
51 return _resource->doubleValue(RESOURCE_HEXABLOCK, name, def);
54 bool HEXABLOCKGUI_Resource::booleanValue(const QString& name, const bool def) const {
55 return _resource->booleanValue(RESOURCE_HEXABLOCK, name, def);
58 QFont HEXABLOCKGUI_Resource::fontValue(const QString& name, const QFont& def) const {
59 return _resource->fontValue(RESOURCE_HEXABLOCK, name, def);
62 QColor HEXABLOCKGUI_Resource::colorValue(const QString& name, const QColor& def) const {
63 return _resource->colorValue(RESOURCE_HEXABLOCK, name, def);
66 QColor HEXABLOCKGUI_Resource::colorValue(const QString& name, const Qt::GlobalColor c) const {
68 return colorValue(name, col);
71 QColor HEXABLOCKGUI_Resource::colorValue(const QString& name, const int h, const int s, const int v) const {
74 return colorValue(name, col);
77 QString HEXABLOCKGUI_Resource::stringValue(const QString& name, const QString& def) const {
78 return _resource->stringValue(RESOURCE_HEXABLOCK, name, def);
84 void HEXABLOCKGUI_Resource::setValue( const QString& name, const int val ) {
85 _resource->setValue(RESOURCE_HEXABLOCK, name, val);
88 void HEXABLOCKGUI_Resource::setValue( const QString& name, const double val ) {
89 _resource->setValue(RESOURCE_HEXABLOCK, name, val);
92 void HEXABLOCKGUI_Resource::setValue( const QString& name, const bool val ) {
93 _resource->setValue(RESOURCE_HEXABLOCK, name, val);
96 void HEXABLOCKGUI_Resource::setValue( const QString& name, const QFont& val ) {
97 _resource->setValue(RESOURCE_HEXABLOCK, name, val);
100 void HEXABLOCKGUI_Resource::setValue( const QString& name, const QColor& val ) {
101 _resource->setValue(RESOURCE_HEXABLOCK, name, val);
104 void HEXABLOCKGUI_Resource::setValue( const QString& name, const QString& val ) {
105 _resource->setValue(RESOURCE_HEXABLOCK, name, val);
108 // Create preferences
109 // ------------------
111 void HEXABLOCKGUI_Resource::createPreferences(HEXABLOCKGUI* swm)
114 DEBTRACE("createPreferences");
115 // --- General tab ---
116 int genTab = swm->addPreference( QObject::tr( "PREF_TAB_GENERAL" ) );
118 int componentGroup = swm->addPreference( QObject::tr( "PREF_GROUP_COMPONENT" ), genTab );
120 swm->addPreference( QObject::tr( _COMPONENT_INSTANCE_NEW ), componentGroup, LightApp_Preferences::Bool, RESOURCE_HEXABLOCK, _COMPONENT_INSTANCE_NEW );
121 swm->addPreference( "Python Script Font", componentGroup, LightApp_Preferences::Font, RESOURCE_HEXABLOCK, "font" );
122 swm->addPreference( "User catalog", componentGroup, LightApp_Preferences::File, RESOURCE_HEXABLOCK, "userCatalog" );
123 swm->addPreference( "Auto Compute Links", componentGroup, LightApp_Preferences::Bool, RESOURCE_HEXABLOCK, "autoComputeLinks" );
124 swm->addPreference( "Simplify Links", componentGroup, LightApp_Preferences::Bool, RESOURCE_HEXABLOCK, "simplifyLink" );
125 swm->addPreference( "Better Separation for Links", componentGroup, LightApp_Preferences::Bool, RESOURCE_HEXABLOCK, "addRowCols" );
126 swm->addPreference( "Ensure Node Visible When Moved", componentGroup, LightApp_Preferences::Bool, RESOURCE_HEXABLOCK, "ensureVisibleWhenMoved" );
127 swm->addPreference( "Tabified Panels Up", componentGroup, LightApp_Preferences::Bool, RESOURCE_HEXABLOCK, "tabPanelsUp" );
130 int linkTab = swm->addPreference( QObject::tr( "Link colors" ) );
132 int idGroup = swm->addPreference( QObject::tr( "PREF_GROUP_GENERAL" ), linkTab );
133 swm->setPreferenceProperty( idGroup, "columns", 1 );
135 swm->addPreference( QObject::tr( "Link draw color" ), idGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, "link_draw_color" );
136 swm->addPreference( QObject::tr( "Link select color" ), idGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, "link_select_color" );
137 swm->addPreference( QObject::tr( "Stream link draw color" ), idGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, "stream_link_draw_color" );
138 swm->addPreference( QObject::tr( "Stream link select color" ), idGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, "stream_link_select_color" );
139 swm->addPreference( QObject::tr( "Control link draw color" ), idGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, "control_link_draw_color" );
140 swm->addPreference( QObject::tr( "Control link select color" ), idGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, "control_link_select_color" );
141 swm->addPreference( QObject::tr( "Emphasis link color" ), idGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, "emphasizeBrushColor" );
143 swm->addPreference( QObject::tr( "link pen darkness" ), idGroup, LightApp_Preferences::Integer, RESOURCE_HEXABLOCK, "link_pen_darkness" );
145 // --- nodes without color states ---
146 int nodeTab = swm->addPreference( QObject::tr( "PREF_TAB_NODE" ) );
148 int nodeSubtab = swm->addPreference( QObject::tr( "PREF_GROUP_SCENE" ), nodeTab );
149 swm->setPreferenceProperty(nodeSubtab , "columns", 2);
151 swm->addPreference( QObject::tr( "Pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _Scene_pen );
152 swm->addPreference( QObject::tr( "Brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _Scene_brush );
153 swm->addPreference( QObject::tr( "High pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _Scene_hiPen );
154 swm->addPreference( QObject::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _Scene_hiBrush );
156 nodeSubtab = swm->addPreference( QObject::tr( "PREF_GROUP_BLOC" ), nodeTab );
157 swm->setPreferenceProperty(nodeSubtab , "columns", 2);
159 swm->addPreference( QObject::tr( "Pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ComposedNode_pen );
160 swm->addPreference( QObject::tr( "Brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ComposedNode_brush );
161 swm->addPreference( QObject::tr( "High pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ComposedNode_hiPen );
162 swm->addPreference( QObject::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ComposedNode_hiBrush );
164 nodeSubtab = swm->addPreference( QObject::tr( "PREF_GROUP_NODE" ), nodeTab );
165 swm->setPreferenceProperty(nodeSubtab , "columns", 2);
167 swm->addPreference( QObject::tr( "Pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ElementaryNode_pen );
168 swm->addPreference( QObject::tr( "Brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ElementaryNode_brush );
169 swm->addPreference( QObject::tr( "High pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ElementaryNode_hiPen );
170 swm->addPreference( QObject::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ElementaryNode_hiBrush );
172 nodeSubtab = swm->addPreference( QObject::tr( "PREF_GROUP_HEADER" ), nodeTab );
173 swm->setPreferenceProperty(nodeSubtab , "columns", 2);
175 swm->addPreference( QObject::tr( "Pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _Header_pen );
176 swm->addPreference( QObject::tr( "Brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _Header_brush );
177 swm->addPreference( QObject::tr( "High pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _Header_hiPen );
178 swm->addPreference( QObject::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _Header_hiBrush );
180 nodeSubtab = swm->addPreference( QObject::tr( "PREF_GROUP_CONTROL" ), nodeTab );
181 swm->setPreferenceProperty(nodeSubtab , "columns", 2);
183 swm->addPreference( QObject::tr( "Pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _CtrlPort_pen );
184 swm->addPreference( QObject::tr( "Brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _CtrlPort_brush );
185 swm->addPreference( QObject::tr( "High pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _CtrlPort_hiPen );
186 swm->addPreference( QObject::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _CtrlPort_hiBrush );
188 nodeSubtab = swm->addPreference( QObject::tr( "PREF_GROUP_PORT" ), nodeTab );
189 swm->setPreferenceProperty(nodeSubtab , "columns", 2);
191 swm->addPreference( QObject::tr( "Pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _DataPort_pen );
192 swm->addPreference( QObject::tr( "Brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _DataPort_brush );
193 swm->addPreference( QObject::tr( "High pen" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _DataPort_hiPen );
194 swm->addPreference( QObject::tr( "High brush" ), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _DataPort_hiBrush );
196 nodeSubtab = swm->addPreference( QObject::tr( "PREF_GROUP_DRAG" ), nodeTab );
197 swm->setPreferenceProperty(nodeSubtab, "columns", 1);
199 swm->addPreference( QObject::tr( "On dragging"), nodeSubtab, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, __dragOver );
201 // --- Color of state of nodes ---
202 int stateTab = swm->addPreference( QObject::tr( "PREF_TAB_STATE" ) );
204 int editGroup = swm->addPreference( QObject::tr( "PREF_GROUP_EDIT" ), stateTab );
205 swm->setPreferenceProperty( editGroup, "columns", 1 );
207 swm->addPreference( QObject::tr( _editedNodeBrushColor ), editGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _editedNodeBrushColor );
208 swm->addPreference( QObject::tr( _normalNodeBrushColor ), editGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _normalNodeBrushColor );
209 swm->addPreference( QObject::tr( _runNodeBrushColor ), editGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _runNodeBrushColor );
210 swm->addPreference( QObject::tr( _validNodeColor ), editGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _validNodeColor );
211 swm->addPreference( QObject::tr( _invalidNodeColor ), editGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _invalidNodeColor );
213 int runGroup = swm->addPreference( QObject::tr( "PREF_GROUP_RUN" ), stateTab );
214 swm->setPreferenceProperty( runGroup, "columns", 2 );
216 swm->addPreference( QObject::tr( _NOTYETINITIALIZED ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _NOTYETINITIALIZED );
217 swm->addPreference( QObject::tr( _INITIALISED ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _INITIALISED );
218 swm->addPreference( QObject::tr( _RUNNING ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _RUNNING );
219 swm->addPreference( QObject::tr( _WAITINGTASKS ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _WAITINGTASKS );
220 swm->addPreference( QObject::tr( _PAUSED ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _PAUSED );
221 swm->addPreference( QObject::tr( _FINISHED ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _FINISHED );
222 swm->addPreference( QObject::tr( _STOPPED ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _STOPPED );
223 swm->addPreference( QObject::tr( _UNKNOWN ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _UNKNOWN );
225 swm->addPreference( QObject::tr( _UNDEFINED ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _UNDEFINED );
226 swm->addPreference( QObject::tr( _INVALID ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _INVALID );
227 swm->addPreference( QObject::tr( _READY ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _READY );
228 swm->addPreference( QObject::tr( _TOLOAD ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _TOLOAD );
229 swm->addPreference( QObject::tr( _LOADED ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _LOADED );
230 swm->addPreference( QObject::tr( _TOACTIVATE ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _TOACTIVATE );
231 swm->addPreference( QObject::tr( _ACTIVATED ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ACTIVATED );
232 swm->addPreference( QObject::tr( _DESACTIVATED ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _DESACTIVATED );
233 swm->addPreference( QObject::tr( _DONE ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _DONE );
234 swm->addPreference( QObject::tr( _SUSPENDED ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _SUSPENDED );
235 swm->addPreference( QObject::tr( _LOADFAILED ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _LOADFAILED );
236 swm->addPreference( QObject::tr( _EXECFAILED ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _EXECFAILED );
237 swm->addPreference( QObject::tr( _PAUSE ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _PAUSE );
238 swm->addPreference( QObject::tr( _INTERNALERR ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _INTERNALERR );
239 swm->addPreference( QObject::tr( _DISABLED ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _DISABLED );
240 swm->addPreference( QObject::tr( _FAILED ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _FAILED );
241 swm->addPreference( QObject::tr( _ERROR ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _ERROR );
242 swm->addPreference( QObject::tr( _DEFAULT ), runGroup, LightApp_Preferences::Color, RESOURCE_HEXABLOCK, _DEFAULT );
246 void HEXABLOCKGUI_Resource::preferencesChanged()
248 DEBTRACE("preferencesChanged");
250 // Notice: it is here for updating the view, etc.
253 Resource::COMPONENT_INSTANCE_NEW = booleanValue(_COMPONENT_INSTANCE_NEW, COMPONENTINSTANCENEW);
254 Resource::pythonfont = fontValue( "font" ,PYTHONFONT);
255 Resource::userCatalog = stringValue( "userCatalog" ,USERCATALOG);
256 Resource::autoComputeLinks = booleanValue("autoComputeLinks", AUTOCOMPUTELINKS);
257 Resource::simplifyLink = booleanValue("simplifyLink", SIMPLIFYLINK);
258 Resource::addRowCols = booleanValue("addRowCols", ADDROWCOLS);
259 Resource::ensureVisibleWhenMoved = booleanValue("ensureVisibleWhenMoved", ENSUREVISIBLEWHENMOVED);
260 Resource::tabPanelsUp = booleanValue("tabPanelsUp", TABPANELSUP);
262 // Color of state of nodes
263 Resource::editedNodeBrushColor = colorValue(_editedNodeBrushColor, EDITEDNODEBRUSHCOLOR);
264 Resource::normalNodeBrushColor = colorValue(_normalNodeBrushColor, NORMALNODEBRUSHCOLOR);
265 Resource::runNodeBrushColor = colorValue(_runNodeBrushColor , RUNNODEBRUSHCOLOR);
266 Resource::validNodeColor = colorValue(_validNodeColor , VALIDNODECOLOR);
267 Resource::invalidNodeColor = colorValue(_invalidNodeColor , INVALIDNODECOLOR);
269 Resource::NOTYETINITIALIZED = colorValue(_NOTYETINITIALIZED , NOTYETINITIALIZED_);
270 Resource::INITIALISED = colorValue(_INITIALISED , INITIALISED_);
271 Resource::RUNNING = colorValue(_RUNNING , RUNNING_ );
272 Resource::WAITINGTASKS = colorValue(_WAITINGTASKS , WAITINGTASKS_);
273 Resource::PAUSED = colorValue(_PAUSED , PAUSED_ );
274 Resource::FINISHED = colorValue(_FINISHED , FINISHED_ );
275 Resource::STOPPED = colorValue(_STOPPED , STOPPED_ );
276 Resource::UNKNOWN = colorValue(_UNKNOWN , UNKNOWN_ );
278 Resource::UNDEFINED = colorValue(_UNDEFINED , UNDEFINED_ );
279 Resource::INVALID = colorValue(_INVALID , INVALID_ );
280 Resource::READY = colorValue(_READY , READY_ );
281 Resource::TOLOAD = colorValue(_TOLOAD , TOLOAD_ );
282 Resource::LOADED = colorValue(_LOADED , LOADED_ );
283 Resource::TOACTIVATE = colorValue(_TOACTIVATE , TOACTIVATE_ );
284 Resource::ACTIVATED = colorValue(_ACTIVATED , ACTIVATED_ );
285 Resource::DESACTIVATED = colorValue(_DESACTIVATED , DESACTIVATED_);
286 Resource::DONE = colorValue(_DONE , DONE_ );
287 Resource::SUSPENDED = colorValue(_SUSPENDED , SUSPENDED_ );
288 Resource::LOADFAILED = colorValue(_LOADFAILED , LOADFAILED_ );
289 Resource::EXECFAILED = colorValue(_EXECFAILED , EXECFAILED_ );
290 Resource::PAUSE = colorValue(_PAUSE , PAUSE_ );
291 Resource::INTERNALERR = colorValue(_INTERNALERR , INTERNALERR_ );
292 Resource::DISABLED = colorValue(_DISABLED , DISABLED_ );
293 Resource::FAILED = colorValue(_FAILED , FAILED_ );
294 Resource::ERROR = colorValue(_ERROR , ERROR_ );
295 Resource::DEFAULT = colorValue(_DEFAULT , DEFAULT_ );
298 Resource::link_draw_color = colorValue("link_draw_color" , LINKDRAW_COLOR );
299 Resource::stream_link_draw_color = colorValue("stream_link_draw_color" , STREAMLINKDRAW_COLOR );
300 Resource::link_select_color = colorValue("link_select_color" , LINK_SELECT_COLOR );
301 Resource::stream_link_select_color = colorValue("stream_link_select_color" , STREAMLINK_SELECT_COLOR);
302 Resource::control_link_draw_color = colorValue("control_link_draw_color" , CTRLLINKDRAW_COLOR );
303 Resource::control_link_select_color = colorValue("control_link_select_color", CTRLLINK_SELECT_COLOR );
304 Resource::emphasizeBrushColor = colorValue("emphasizeBrushColor" , EMPHASIZEBRUSHCOLOR );
306 Resource::link_pen_darkness = integerValue("link_pen_darkness", LINK_PEN_DARKNESS );
309 Resource::Scene_pen = colorValue(_Scene_pen, Scene_pen_ );
310 Resource::Scene_hiPen = colorValue(_Scene_hiPen, Scene_hiPen_ );
311 Resource::Scene_brush = colorValue(_Scene_brush, Scene_brush_ );
312 Resource::Scene_hiBrush = colorValue(_Scene_hiBrush, Scene_hiBrush_ );
313 Resource::ComposedNode_brush = colorValue(_ComposedNode_brush, ComposedNode_brush_ );
314 Resource::ComposedNode_hiBrush = colorValue(_ComposedNode_hiBrush, ComposedNode_hiBrush_ );
315 Resource::ComposedNode_pen = colorValue(_ComposedNode_pen, ComposedNode_pen_ );
316 Resource::ComposedNode_hiPen = colorValue(_ComposedNode_hiPen, ComposedNode_hiPen_ );
317 Resource::ElementaryNode_brush = colorValue(_ElementaryNode_brush, ElementaryNode_brush_ );
318 Resource::ElementaryNode_hiBrush = colorValue(_ElementaryNode_hiBrush, ElementaryNode_hiBrush_);
319 Resource::ElementaryNode_pen = colorValue(_ElementaryNode_pen, ElementaryNode_pen_ );
320 Resource::ElementaryNode_hiPen = colorValue(_ElementaryNode_hiPen, ElementaryNode_hiPen_ );
321 Resource::Header_brush = colorValue(_Header_brush, Header_brush_ );
322 Resource::Header_hiBrush = colorValue(_Header_hiBrush, Header_hiBrush_ );
323 Resource::Header_pen = colorValue(_Header_pen, Header_pen_ );
324 Resource::Header_hiPen = colorValue(_Header_hiPen, Header_hiPen_ );
325 Resource::CtrlPort_brush = colorValue(_CtrlPort_brush, CtrlPort_brush_ );
326 Resource::CtrlPort_hiBrush = colorValue(_CtrlPort_hiBrush, CtrlPort_hiBrush_ );
327 Resource::CtrlPort_pen = colorValue(_CtrlPort_pen, CtrlPort_pen_ );
328 Resource::CtrlPort_hiPen = colorValue(_CtrlPort_hiPen, CtrlPort_hiPen_ );
329 Resource::DataPort_brush = colorValue(_DataPort_brush, DataPort_brush_ );
330 Resource::DataPort_hiBrush = colorValue(_DataPort_hiBrush, DataPort_hiBrush_ );
331 Resource::DataPort_pen = colorValue(_DataPort_pen, DataPort_pen_ );
332 Resource::DataPort_hiPen = colorValue(_DataPort_hiPen, DataPort_hiPen_ );
334 Resource::dragOver = colorValue(__dragOver, dragOver_ );
337 void HEXABLOCKGUI_Resource::preferencesChanged( const QString& sect, const QString& name )
339 if( sect==RESOURCE_HEXABLOCK )
341 preferencesChanged();