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
20 #ifndef _RESOURCE_HXX_
21 #define _RESOURCE_HXX_
23 #include "HEXABLOCKGUI_Export.hxx"
28 // Define the general names of the resources
29 // -----------------------------------------
31 #define _COMPONENT_INSTANCE_NEW "COMPONENT_INSTANCE_NEW"
33 // Define the names of the resources for colors
34 // --------------------------------------------
36 #define _editedNodeBrushColor "editedNodeBrushColor"
37 #define _normalNodeBrushColor "normalNodeBrushColor"
38 #define _runNodeBrushColor "runNodeBrushColor"
39 #define _validNodeColor "validNodeColor"
40 #define _invalidNodeColor "invalidNodeColor"
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"
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"
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"
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"
95 #define __dragOver "dragOver"
100 #define COMPONENTINSTANCENEW true
101 #define PYTHONFONT QFont("Courier")
102 #define USERCATALOG "HEXABLOCKUserCatalog.xml"
103 #define ADDROWCOLS true
104 #define STRAIGHTLINKS false
105 #define AUTOCOMPUTELINKS true
106 #define SIMPLIFYLINK true
107 #define ENSUREVISIBLEWHENMOVED true
108 #define TABPANELSUP true
110 #define EDITEDNODEBRUSHCOLOR QColor(255, 255, 190)
111 #define NORMALNODEBRUSHCOLOR QColor(230, 235, 255)
112 #define RUNNODEBRUSHCOLOR QColor(205, 218, 255)
113 #define VALIDNODECOLOR QColor(128, 255, 128)
114 #define INVALIDNODECOLOR QColor(255, 128, 128)
116 #define EMPHASIZEBRUSHCOLOR QColor( 0, 255, 0)
118 #define NOTYETINITIALIZED_ QColor(255, 243, 205)
119 #define INITIALISED_ QColor(230, 255, 205)
120 #define RUNNING_ QColor(205, 255, 218)
121 #define WAITINGTASKS_ QColor(205, 255, 255)
122 #define PAUSED_ QColor(205, 218, 255)
123 #define FINISHED_ QColor(230, 205, 255)
124 #define STOPPED_ QColor(255, 205, 243)
125 #define UNKNOWN_ QColor(255, 205, 205)
127 #define UNDEFINED_ Qt::lightGray
128 #define INVALID_ Qt::red
129 #define READY_ Qt::gray
130 #define TOLOAD_ Qt::darkYellow
131 #define LOADED_ Qt::darkMagenta
132 #define TOACTIVATE_ Qt::darkCyan
133 #define ACTIVATED_ Qt::darkBlue
134 #define DESACTIVATED_ Qt::gray
135 #define DONE_ Qt::darkGreen
136 #define SUSPENDED_ Qt::gray
137 #define LOADFAILED_ QColor(255, 0, 170)
138 #define EXECFAILED_ QColor(255, 85, 0)
139 #define PAUSE_ QColor(0, 255, 255)
140 #define INTERNALERR_ QColor(255, 0, 85)
141 #define DISABLED_ QColor(255, 170, 0)
142 #define FAILED_ QColor(170, 85, 0)
143 #define ERROR_ QColor(255, 0, 0)
144 #define DEFAULT_ Qt::lightGray
146 #define LINKDRAW_COLOR QColor( 0, 0, 192)
147 #define LINK_SELECT_COLOR QColor(192, 192, 255)
148 #define STREAMLINKDRAW_COLOR QColor(192, 192, 0)
149 #define STREAMLINK_SELECT_COLOR QColor(255, 255, 192)
150 #define CTRLLINKDRAW_COLOR QColor(192, 0, 192)
151 #define CTRLLINK_SELECT_COLOR QColor(255, 192, 255)
152 #define LINK_PEN_DARKNESS 150
154 #define Scene_pen_ QColor( 0, 0, 128)
155 #define Scene_hiPen_ QColor( 0, 0, 190)
156 #define Scene_brush_ QColor(128, 128, 128)
157 #define Scene_hiBrush_ QColor(190, 190, 190)
158 #define ComposedNode_brush_ QColor(213, 213, 213)
159 #define ComposedNode_hiBrush_ QColor(225, 225, 225)
160 #define ComposedNode_pen_ QColor(120, 120, 120)
161 #define ComposedNode_hiPen_ QColor( 60, 60, 60)
162 #define ElementaryNode_brush_ QColor(189, 230, 185)
163 #define ElementaryNode_hiBrush_ QColor(209, 255, 205)
164 #define ElementaryNode_pen_ QColor( 15, 180, 0)
165 #define ElementaryNode_hiPen_ QColor( 11, 128, 0)
166 #define Header_brush_ QColor(215, 220, 238)
167 #define Header_hiBrush_ QColor(161, 178, 238)
168 #define Header_pen_ QColor(120, 120, 120)
169 #define Header_hiPen_ QColor( 60, 60, 60)
170 #define CtrlPort_brush_ QColor(205, 210, 227)
171 #define CtrlPort_hiBrush_ QColor(161, 176, 227)
172 #define CtrlPort_pen_ QColor(120, 120, 120)
173 #define CtrlPort_hiPen_ QColor( 60, 60, 60)
174 #define DataPort_brush_ QColor(158, 227, 151)
175 #define DataPort_hiBrush_ QColor(127, 227, 116)
176 #define DataPort_pen_ QColor( 15, 180, 0)
177 #define DataPort_hiPen_ QColor( 11, 128, 0)
179 #define dragOver_ QColor(255, 0, 0)
181 // Define Resource class
182 // ---------------------
184 namespace HEXABLOCK {
186 class HEXABLOCK_EXPORT Resource {
192 static bool COMPONENT_INSTANCE_NEW;
193 static QString userCatalog;
194 static bool addRowCols;
195 static bool straightLinks;
196 static bool autoComputeLinks;
197 static bool simplifyLink;
198 static bool ensureVisibleWhenMoved;
200 // Colors of state of nodes
201 static QColor editedNodeBrushColor;
202 static QColor normalNodeBrushColor;
203 static QColor runNodeBrushColor;
204 static QColor validNodeColor;
205 static QColor invalidNodeColor;
207 static QColor emphasizeBrushColor;
209 static QColor NOTYETINITIALIZED;
210 static QColor INITIALISED;
211 static QColor RUNNING;
212 static QColor WAITINGTASKS;
213 static QColor PAUSED;
214 static QColor FINISHED;
215 static QColor STOPPED;
216 static QColor UNKNOWN;
218 static QColor UNDEFINED;
219 static QColor INVALID;
221 static QColor TOLOAD;
222 static QColor LOADED;
223 static QColor TOACTIVATE;
224 static QColor ACTIVATED;
225 static QColor DESACTIVATED;
227 static QColor SUSPENDED;
228 static QColor LOADFAILED;
229 static QColor EXECFAILED;
231 static QColor INTERNALERR;
232 static QColor DISABLED;
233 static QColor FAILED;
235 static QColor DEFAULT;
238 static QFont pythonfont;
241 static QColor link_draw_color;
242 static QColor stream_link_draw_color;
243 static QColor link_select_color;
244 static QColor stream_link_select_color;
245 static QColor control_link_draw_color;
246 static QColor control_link_select_color;
248 static int link_pen_darkness;
251 static QColor Scene_pen;
252 static QColor Scene_hiPen;
253 static QColor Scene_brush;
254 static QColor Scene_hiBrush;
255 static QColor ComposedNode_brush;
256 static QColor ComposedNode_hiBrush;
257 static QColor ComposedNode_pen;
258 static QColor ComposedNode_hiPen;
259 static QColor ElementaryNode_brush;
260 static QColor ElementaryNode_hiBrush;
261 static QColor ElementaryNode_pen;
262 static QColor ElementaryNode_hiPen;
263 static QColor Header_brush;
264 static QColor Header_hiBrush;
265 static QColor Header_pen;
266 static QColor Header_hiPen;
267 static QColor CtrlPort_brush;
268 static QColor CtrlPort_hiBrush;
269 static QColor CtrlPort_pen;
270 static QColor CtrlPort_hiPen;
271 static QColor DataPort_brush;
272 static QColor DataPort_hiBrush;
273 static QColor DataPort_pen;
274 static QColor DataPort_hiPen;
276 static QColor dragOver;
279 static int CtrlPort_Width;
280 static int CtrlPort_Height;
281 static int DataPort_Width;
282 static int DataPort_Height;
284 static int Thickness;
286 static int Border_Margin;
287 static int Space_Margin;
289 static int Line_Space;
290 static int Line_Width;
294 static int Corner_Margin;
295 static int Header_Height;
298 static bool tabPanelsUp;