Version: 9.16.0
Resource.hxx
Go to the documentation of this file.
1// Copyright (C) 2006-2026 CEA, EDF
2//
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.
7//
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.
12//
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
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef _RESOURCE_HXX_
21#define _RESOURCE_HXX_
22
23#include "GenericGuiExport.hxx"
24
25#include <QColor>
26#include <QFont>
27
28// Define the general names of the resources
29// -----------------------------------------
30
31#define _COMPONENT_INSTANCE_NEW "COMPONENT_INSTANCE_NEW"
32
33// Define the names of the resources for colors
34// --------------------------------------------
35
36#define _editedNodeBrushColor "editedNodeBrushColor"
37#define _normalNodeBrushColor "normalNodeBrushColor"
38#define _runNodeBrushColor "runNodeBrushColor"
39#define _validNodeColor "validNodeColor"
40#define _invalidNodeColor "invalidNodeColor"
41
42#define _NOTYETINITIALIZED "NOTYETINITIALIZED"
43#define _INITIALISED "INITIALISED"
44#define _RUNNING "RUNNING"
45#define _WAITINGTASKS "WAITINGTASKS"
46#define _PAUSED "PAUSED"
47#define _FINISHED "FINISHED"
48#define _STOPPED "STOPPED"
49#define _UNKNOWN "UNKNOWN"
50
51#define _UNDEFINED "UNDEFINED"
52#define _INVALID "INVALID"
53#define _READY "READY"
54#define _TOLOAD "TOLOAD"
55#define _LOADED "LOADED"
56#define _TOACTIVATE "TOACTIVATE"
57#define _ACTIVATED "ACTIVATED"
58#define _DESACTIVATED "DESACTIVATED"
59#define _DONE "DONE"
60#define _SUSPENDED "SUSPENDED"
61#define _LOADFAILED "LOADFAILED"
62#define _EXECFAILED "EXECFAILED"
63#define _PAUSE "PAUSE"
64#define _INTERNALERR "INTERNALERR"
65#define _DISABLED "DISABLED"
66#define _FAILED "FAILED"
67#define _ERROR "ERROR"
68#define _DEFAULT "DEFAULT"
69
70#define _Scene_pen "Scene_pen"
71#define _Scene_hiPen "Scene_hiPen"
72#define _Scene_brush "Scene_brush"
73#define _Scene_hiBrush "Scene_hiBrush"
74#define _ComposedNode_brush "ComposedNode_brush"
75#define _ComposedNode_hiBrush "ComposedNode_hiBrush"
76#define _ComposedNode_pen "ComposedNode_pen"
77#define _ComposedNode_hiPen "ComposedNode_hiPen"
78#define _ElementaryNode_brush "ElementaryNode_brush"
79#define _ElementaryNode_hiBrush "ElementaryNode_hiBrush"
80#define _ElementaryNode_pen "ElementaryNode_pen"
81#define _ElementaryNode_hiPen "ElementaryNode_hiPen"
82#define _Header_brush "Header_brush"
83#define _Header_hiBrush "Header_hiBrush"
84#define _Header_pen "Header_pen"
85#define _Header_hiPen "Header_hiPen"
86#define _CtrlPort_brush "CtrlPort_brush"
87#define _CtrlPort_hiBrush "CtrlPort_hiBrush"
88#define _CtrlPort_pen "CtrlPort_pen"
89#define _CtrlPort_hiPen "CtrlPort_hiPen"
90#define _DataPort_brush "DataPort_brush"
91#define _DataPort_hiBrush "DataPort_hiBrush"
92#define _DataPort_pen "DataPort_pen"
93#define _DataPort_hiPen "DataPort_hiPen"
94#define _DataStreamPort_brush "DataStreamPort_brush"
95#define _DataStreamPort_hiBrush "DataStreamPort_hiBrush"
96#define _DataStreamPort_pen "DataStreamPort_pen"
97#define _DataStreamPort_hiPen "DataStreamPort_hiPen"
98
99#define __dragOver "dragOver"
100
101// Default values
102// --------------
103
104#define COMPONENTINSTANCENEW true
105#define PYTHONFONT QFont("Courier")
106#define PYTHONEXTERNALEDITOR ""
107#define USERCATALOG "YACSUserCatalog.xml"
108#define ADDROWCOLS true
109#define STRAIGHTLINKS false
110#define AUTOCOMPUTELINKS true
111#define SIMPLIFYLINK true
112#define ENSUREVISIBLEWHENMOVED true
113#define TABPANELSUP true
114#define DOCKWIDGETPRIORITY 0
115#define PROGRESSBARCOLOR Qt::darkGreen
116#define PROGRESSBARLABEL 2
117
118#define EDITEDNODEBRUSHCOLOR QColor(255, 255, 190)
119#define NORMALNODEBRUSHCOLOR QColor(230, 235, 255)
120#define RUNNODEBRUSHCOLOR QColor(205, 218, 255)
121#define VALIDNODECOLOR QColor(128, 255, 128)
122#define INVALIDNODECOLOR QColor(255, 128, 128)
123
124#define EMPHASIZEBRUSHCOLOR QColor( 0, 255, 0)
125
126#define NOTYETINITIALIZED_ QColor(255, 243, 205)
127#define INITIALISED_ QColor(230, 255, 205)
128#define RUNNING_ QColor(205, 255, 218)
129#define WAITINGTASKS_ QColor(205, 255, 255)
130#define PAUSED_ QColor(205, 218, 255)
131#define FINISHED_ QColor(230, 205, 255)
132#define STOPPED_ QColor(255, 205, 243)
133#define UNKNOWN_ QColor(255, 205, 205)
134
135#define UNDEFINED_ Qt::lightGray
136#define INVALID_ Qt::red
137#define READY_ Qt::gray
138#define TOLOAD_ Qt::darkYellow
139#define LOADED_ Qt::darkMagenta
140#define TOACTIVATE_ Qt::darkCyan
141#define ACTIVATED_ Qt::darkBlue
142#define DESACTIVATED_ Qt::gray
143#define DONE_ Qt::darkGreen
144#define SUSPENDED_ Qt::gray
145#define LOADFAILED_ QColor(255, 0, 170)
146#define EXECFAILED_ QColor(255, 85, 0)
147#define PAUSE_ QColor(0, 255, 255)
148#define INTERNALERR_ QColor(255, 0, 85)
149#define DISABLED_ QColor(255, 170, 0)
150#define FAILED_ QColor(170, 85, 0)
151#define ERROR_ QColor(255, 0, 0)
152#define DEFAULT_ Qt::lightGray
153
154#define LINKDRAW_COLOR QColor( 0, 0, 192)
155#define LINK_SELECT_COLOR QColor(192, 192, 255)
156#define STREAMLINKDRAW_COLOR QColor(192, 192, 0)
157#define STREAMLINK_SELECT_COLOR QColor(255, 255, 192)
158#define CTRLLINKDRAW_COLOR QColor(192, 0, 192)
159#define CTRLLINK_SELECT_COLOR QColor(255, 192, 255)
160#define LINK_PEN_DARKNESS 150
161#define LINK_THICKNESS 1.0
162#define LINK_SEPARATION_WEIGHT 10
163
164#define Scene_pen_ QColor( 0, 0, 128)
165#define Scene_hiPen_ QColor( 0, 0, 190)
166#define Scene_brush_ QColor(128, 128, 128)
167#define Scene_hiBrush_ QColor(190, 190, 190)
168#define ComposedNode_brush_ QColor(213, 213, 213)
169#define ComposedNode_hiBrush_ QColor(225, 225, 225)
170#define ComposedNode_pen_ QColor(120, 120, 120)
171#define ComposedNode_hiPen_ QColor( 60, 60, 60)
172#define ElementaryNode_brush_ QColor(189, 230, 185)
173#define ElementaryNode_hiBrush_ QColor(209, 255, 205)
174#define ElementaryNode_pen_ QColor( 15, 180, 0)
175#define ElementaryNode_hiPen_ QColor( 11, 128, 0)
176#define Header_brush_ QColor(215, 220, 238)
177#define Header_hiBrush_ QColor(161, 178, 238)
178#define Header_pen_ QColor(120, 120, 120)
179#define Header_hiPen_ QColor( 60, 60, 60)
180#define CtrlPort_brush_ QColor(205, 210, 227)
181#define CtrlPort_hiBrush_ QColor(161, 176, 227)
182#define CtrlPort_pen_ QColor(120, 120, 120)
183#define CtrlPort_hiPen_ QColor( 60, 60, 60)
184#define DataPort_brush_ QColor(158, 227, 151)
185#define DataPort_hiBrush_ QColor(127, 227, 116)
186#define DataPort_pen_ QColor( 15, 180, 0)
187#define DataPort_hiPen_ QColor( 11, 128, 0)
188#define DataStreamPort_brush_ QColor(158, 227, 151)
189#define DataStreamPort_hiBrush_ QColor(127, 227, 116)
190#define DataStreamPort_pen_ QColor( 15, 180, 0)
191#define DataStreamPort_hiPen_ QColor( 11, 128, 0)
192
193#define dragOver_ QColor(255, 0, 0)
194
195// Define Resource class
196// ---------------------
197
198namespace YACS {
199 namespace HMI {
201 public:
202 Resource();
203
204 public:
205 // General resource
207 static QString userCatalog;
208 static QString pythonExternalEditor;
209 static bool addRowCols;
210 static bool straightLinks;
211 static bool autoComputeLinks;
212 static bool simplifyLink;
215 static QColor progressBarColor;
217
218 // Colors of state of nodes
219 static QColor editedNodeBrushColor;
220 static QColor normalNodeBrushColor;
221 static QColor runNodeBrushColor;
222 static QColor validNodeColor;
223 static QColor invalidNodeColor;
224
225 static QColor emphasizeBrushColor;
226
227 static QColor NOTYETINITIALIZED;
228 static QColor INITIALISED;
229 static QColor RUNNING;
230 static QColor WAITINGTASKS;
231 static QColor PAUSED;
232 static QColor FINISHED;
233 static QColor STOPPED;
234 static QColor UNKNOWN;
235
236 static QColor UNDEFINED;
237 static QColor INVALID;
238 static QColor READY;
239 static QColor TOLOAD;
240 static QColor LOADED;
241 static QColor TOACTIVATE;
242 static QColor ACTIVATED;
243 static QColor DESACTIVATED;
244 static QColor DONE;
245 static QColor SUSPENDED;
246 static QColor LOADFAILED;
247 static QColor EXECFAILED;
248 static QColor PAUSE;
249 static QColor INTERNALERR;
250 static QColor DISABLED;
251 static QColor FAILED;
252 static QColor ERROR;
253 static QColor DEFAULT;
254
255 // Python font
256 static QFont pythonfont;
257
258 // Link colors
259 static QColor link_draw_color;
261 static QColor link_select_color;
265
268 static double link_thickness;
269
270 // Node colors
271 static QColor Scene_pen;
272 static QColor Scene_hiPen;
273 static QColor Scene_brush;
274 static QColor Scene_hiBrush;
275 static QColor ComposedNode_brush;
276 static QColor ComposedNode_hiBrush;
277 static QColor ComposedNode_pen;
278 static QColor ComposedNode_hiPen;
279 static QColor ElementaryNode_brush;
281 static QColor ElementaryNode_pen;
282 static QColor ElementaryNode_hiPen;
283 static QColor Header_brush;
284 static QColor Header_hiBrush;
285 static QColor Header_pen;
286 static QColor Header_hiPen;
287 static QColor CtrlPort_brush;
288 static QColor CtrlPort_hiBrush;
289 static QColor CtrlPort_pen;
290 static QColor CtrlPort_hiPen;
291 static QColor DataPort_brush;
292 static QColor DataPort_hiBrush;
293 static QColor DataPort_pen;
294 static QColor DataPort_hiPen;
295 static QColor DataStreamPort_brush;
297 static QColor DataStreamPort_pen;
298 static QColor DataStreamPort_hiPen;
299
300 static QColor dragOver;
301
302 // Node parameters
303 static int CtrlPort_Width;
304 static int CtrlPort_Height;
305 static int DataPort_Width;
306 static int DataPort_Height;
307
308 static int Thickness;
309
310 static int Border_Margin;
311 static int Space_Margin;
312
313 static int Line_Space;
314 static int Line_Width;
315
316 static int Text_DX;
317
318 static int Corner_Margin;
319 static int Header_Height;
320 static int Radius;
321
323
324 static bool tabPanelsUp;
325 };
326 }
327}
328
329#endif
#define GENERICGUI_EXPORT
static int DataPort_Width
Definition: Resource.hxx:305
static int Line_Width
Definition: Resource.hxx:314
static QColor Header_brush
Definition: Resource.hxx:283
static bool simplifyLink
Definition: Resource.hxx:212
static QColor CtrlPort_hiBrush
Definition: Resource.hxx:288
static QColor DESACTIVATED
Definition: Resource.hxx:243
static QColor ElementaryNode_hiPen
Definition: Resource.hxx:282
static int Corner_Margin
Definition: Resource.hxx:318
static QFont pythonfont
Definition: Resource.hxx:256
static int CtrlPort_Width
Definition: Resource.hxx:303
static QColor DONE
Definition: Resource.hxx:244
static QColor control_link_draw_color
Definition: Resource.hxx:263
static int dockWidgetPriority
Definition: Resource.hxx:214
static QColor Scene_brush
Definition: Resource.hxx:273
static QColor Scene_hiBrush
Definition: Resource.hxx:274
static QColor PAUSED
Definition: Resource.hxx:231
static int Border_Margin
Definition: Resource.hxx:310
static QColor ACTIVATED
Definition: Resource.hxx:242
static bool straightLinks
Definition: Resource.hxx:210
static QColor DataPort_brush
Definition: Resource.hxx:291
static bool COMPONENT_INSTANCE_NEW
Definition: Resource.hxx:206
static QColor ElementaryNode_pen
Definition: Resource.hxx:281
static QColor WAITINGTASKS
Definition: Resource.hxx:230
static bool tabPanelsUp
Definition: Resource.hxx:324
static QColor Scene_hiPen
Definition: Resource.hxx:272
static QColor NOTYETINITIALIZED
Definition: Resource.hxx:227
static QColor DISABLED
Definition: Resource.hxx:250
static int link_pen_darkness
Definition: Resource.hxx:266
static QColor FAILED
Definition: Resource.hxx:251
static QColor INVALID
Definition: Resource.hxx:237
static QColor DataStreamPort_hiBrush
Definition: Resource.hxx:296
static QColor DataPort_hiBrush
Definition: Resource.hxx:292
static bool addRowCols
Definition: Resource.hxx:209
static QColor DataStreamPort_hiPen
Definition: Resource.hxx:298
static int CtrlPort_Height
Definition: Resource.hxx:304
static QColor ComposedNode_brush
Definition: Resource.hxx:275
static QColor control_link_select_color
Definition: Resource.hxx:264
static QColor EXECFAILED
Definition: Resource.hxx:247
static QColor FINISHED
Definition: Resource.hxx:232
static QColor UNDEFINED
Definition: Resource.hxx:236
static QColor INTERNALERR
Definition: Resource.hxx:249
static QColor progressBarColor
Definition: Resource.hxx:215
static int progressBarLabel
Definition: Resource.hxx:216
static QColor emphasizeBrushColor
Definition: Resource.hxx:225
static QColor DataStreamPort_pen
Definition: Resource.hxx:297
static QColor Scene_pen
Definition: Resource.hxx:271
static QColor link_draw_color
Definition: Resource.hxx:259
static int DataPort_Height
Definition: Resource.hxx:306
static QString userCatalog
Definition: Resource.hxx:207
static QColor DataPort_pen
Definition: Resource.hxx:293
static int Text_DX
Definition: Resource.hxx:316
static QColor LOADED
Definition: Resource.hxx:240
static QColor RUNNING
Definition: Resource.hxx:229
static int Space_Margin
Definition: Resource.hxx:311
static QColor DataStreamPort_brush
Definition: Resource.hxx:295
static QColor stream_link_draw_color
Definition: Resource.hxx:260
static QColor READY
Definition: Resource.hxx:238
static int link_separation_weight
Definition: Resource.hxx:267
static QColor stream_link_select_color
Definition: Resource.hxx:262
static bool autoComputeLinks
Definition: Resource.hxx:211
static int Thickness
Definition: Resource.hxx:308
static QColor DEFAULT
Definition: Resource.hxx:253
static int Header_Height
Definition: Resource.hxx:319
static QColor Header_hiPen
Definition: Resource.hxx:286
static QColor normalNodeBrushColor
Definition: Resource.hxx:220
static QColor TOACTIVATE
Definition: Resource.hxx:241
static QColor STOPPED
Definition: Resource.hxx:233
static QColor UNKNOWN
Definition: Resource.hxx:234
static QColor editedNodeBrushColor
Definition: Resource.hxx:219
static QColor ElementaryNode_brush
Definition: Resource.hxx:279
static QColor dragOver
Definition: Resource.hxx:300
static QColor validNodeColor
Definition: Resource.hxx:222
static QColor Header_pen
Definition: Resource.hxx:285
static QColor CtrlPort_pen
Definition: Resource.hxx:289
static QColor INITIALISED
Definition: Resource.hxx:228
static QColor ComposedNode_hiPen
Definition: Resource.hxx:278
static QColor runNodeBrushColor
Definition: Resource.hxx:221
static QColor LOADFAILED
Definition: Resource.hxx:246
static QColor ElementaryNode_hiBrush
Definition: Resource.hxx:280
static QColor SUSPENDED
Definition: Resource.hxx:245
static int Line_Space
Definition: Resource.hxx:313
static double link_thickness
Definition: Resource.hxx:268
static QColor ComposedNode_hiBrush
Definition: Resource.hxx:276
static QString pythonExternalEditor
Definition: Resource.hxx:208
static QColor invalidNodeColor
Definition: Resource.hxx:223
static QColor link_select_color
Definition: Resource.hxx:261
static bool ensureVisibleWhenMoved
Definition: Resource.hxx:213
static int progressBar_Height
Definition: Resource.hxx:322
static QColor CtrlPort_hiPen
Definition: Resource.hxx:290
static QColor Header_hiBrush
Definition: Resource.hxx:284
static QColor CtrlPort_brush
Definition: Resource.hxx:287
static QColor TOLOAD
Definition: Resource.hxx:239
static QColor DataPort_hiPen
Definition: Resource.hxx:294
static QColor ComposedNode_pen
Definition: Resource.hxx:277
static QColor ERROR
Definition: Resource.hxx:252
static int Radius
Definition: Resource.hxx:320
static QColor PAUSE
Definition: Resource.hxx:248