Version: 9.16.0
Resource.cxx
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#include "Resource.hxx"
21
22using namespace YACS::HMI;
23
24// Statics for general resources
25// -----------------------------
26
27bool Resource::COMPONENT_INSTANCE_NEW = COMPONENTINSTANCENEW;
28QString Resource::userCatalog = USERCATALOG;
29QString Resource::pythonExternalEditor = PYTHONEXTERNALEDITOR;
30bool Resource::addRowCols = ADDROWCOLS;
31bool Resource::straightLinks = STRAIGHTLINKS;
32bool Resource::autoComputeLinks = AUTOCOMPUTELINKS;
33bool Resource::simplifyLink = SIMPLIFYLINK;
34bool Resource::ensureVisibleWhenMoved = ENSUREVISIBLEWHENMOVED;
35int Resource::dockWidgetPriority = DOCKWIDGETPRIORITY;
36QColor Resource::progressBarColor = PROGRESSBARCOLOR;
37int Resource::progressBarLabel = PROGRESSBARLABEL;
38QFont Resource::pythonfont = PYTHONFONT;
39
40// Statics for color of states
41// ---------------------------
42
43QColor Resource::editedNodeBrushColor = EDITEDNODEBRUSHCOLOR;
44QColor Resource::normalNodeBrushColor = NORMALNODEBRUSHCOLOR;
45QColor Resource::runNodeBrushColor = RUNNODEBRUSHCOLOR;
46QColor Resource::validNodeColor = VALIDNODECOLOR;
47QColor Resource::invalidNodeColor = INVALIDNODECOLOR;
48
49QColor Resource::emphasizeBrushColor = EMPHASIZEBRUSHCOLOR;
50
59
62QColor Resource::READY = READY_;
68QColor Resource::DONE = DONE_;
72QColor Resource::PAUSE = PAUSE_;
76QColor Resource::ERROR = ERROR_;
77QColor Resource::DEFAULT = DEFAULT_;
78
79// Statics for color of links
80// --------------------------
81
82QColor Resource::link_draw_color = LINKDRAW_COLOR;
83QColor Resource::stream_link_draw_color = STREAMLINKDRAW_COLOR;
84QColor Resource::stream_link_select_color = STREAMLINK_SELECT_COLOR;
85QColor Resource::link_select_color = LINK_SELECT_COLOR;
86QColor Resource::control_link_select_color = CTRLLINK_SELECT_COLOR;
87QColor Resource::control_link_draw_color = CTRLLINKDRAW_COLOR;
88
89int Resource::link_pen_darkness = LINK_PEN_DARKNESS;
90int Resource::link_separation_weight = LINK_SEPARATION_WEIGHT;
91double Resource::link_thickness = LINK_THICKNESS;
92
93// Statics for color of nodes
94// --------------------------
95
96QColor Resource::Scene_pen = Scene_pen_;
97QColor Resource::Scene_hiPen = Scene_hiPen_;
98QColor Resource::Scene_brush = Scene_brush_;
99QColor Resource::Scene_hiBrush = Scene_hiBrush_;
100QColor Resource::ComposedNode_brush = ComposedNode_brush_;
101QColor Resource::ComposedNode_hiBrush = ComposedNode_hiBrush_;
102QColor Resource::ComposedNode_pen = ComposedNode_pen_;
103QColor Resource::ComposedNode_hiPen = ComposedNode_hiPen_;
104QColor Resource::ElementaryNode_brush = ElementaryNode_brush_;
105QColor Resource::ElementaryNode_hiBrush = ElementaryNode_hiBrush_;
106QColor Resource::ElementaryNode_pen = ElementaryNode_pen_;
107QColor Resource::ElementaryNode_hiPen = ElementaryNode_hiPen_;
108QColor Resource::Header_brush = Header_brush_;
109QColor Resource::Header_hiBrush = Header_hiBrush_;
110QColor Resource::Header_pen = Header_pen_;
111QColor Resource::Header_hiPen = Header_hiPen_;
112QColor Resource::CtrlPort_brush = CtrlPort_brush_;
113QColor Resource::CtrlPort_hiBrush = CtrlPort_hiBrush_;
114QColor Resource::CtrlPort_pen = CtrlPort_pen_;
115QColor Resource::CtrlPort_hiPen = CtrlPort_hiPen_;
116QColor Resource::DataPort_brush = DataPort_brush_;
117QColor Resource::DataPort_hiBrush = DataPort_hiBrush_;
118QColor Resource::DataPort_pen = DataPort_pen_;
119QColor Resource::DataPort_hiPen = DataPort_hiPen_;
120QColor Resource::DataStreamPort_brush = DataStreamPort_brush_;
121QColor Resource::DataStreamPort_hiBrush = DataStreamPort_hiBrush_;
122QColor Resource::DataStreamPort_pen = DataStreamPort_pen_;
123QColor Resource::DataStreamPort_hiPen = DataStreamPort_hiPen_;
124
125QColor Resource::dragOver = dragOver_;
126
127// Statics for geometry values for nodes
128// -------------------------------------
129
130int Resource::CtrlPort_Width = 24;
131int Resource::CtrlPort_Height = 20;
132int Resource::DataPort_Width = 72;
133int Resource::DataPort_Height = 25;
134
135int Resource::Thickness = 1;
136
137int Resource::Border_Margin = 4;
138int Resource::Space_Margin = 2;
139
140int Resource::Line_Space = 2;
141int Resource::Line_Width = 2;
142
143int Resource::Text_DX = 3;
144
145int Resource::Corner_Margin = ( Resource::Border_Margin + Resource::Space_Margin );
146int Resource::Header_Height = ( Resource::Corner_Margin + Resource::CtrlPort_Height + Resource::Line_Space + Resource::Line_Width + Resource::Line_Space );
147int Resource::Radius = 3;
148
149int Resource::progressBar_Height = 20;
150
151bool Resource::tabPanelsUp = TABPANELSUP;
152
153// Constructor
154// -----------
155
156Resource::Resource()
157{
158}
#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 STRAIGHTLINKS
Definition: Resource.hxx:109
#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
@ 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