Salome HOME
Updated copyright comment
[modules/hexablock.git] / src / HEXABLOCKGUI / Resource.cxx
1 // Copyright (C) 2009-2024  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
22 using namespace HEXABLOCK::GUI;
23
24 // Statics for general resources
25 // -----------------------------
26
27 bool Resource::COMPONENT_INSTANCE_NEW = COMPONENTINSTANCENEW;
28 QString Resource::userCatalog = USERCATALOG;
29 bool Resource::addRowCols = ADDROWCOLS;
30 bool Resource::straightLinks = STRAIGHTLINKS;
31 bool Resource::autoComputeLinks = AUTOCOMPUTELINKS;
32 bool Resource::simplifyLink = SIMPLIFYLINK;
33 bool Resource::ensureVisibleWhenMoved = ENSUREVISIBLEWHENMOVED;
34
35 // Statics for color of states
36 // ---------------------------
37
38 QColor Resource::editedNodeBrushColor = EDITEDNODEBRUSHCOLOR;
39 QColor Resource::normalNodeBrushColor = NORMALNODEBRUSHCOLOR;
40 QColor Resource::runNodeBrushColor    = RUNNODEBRUSHCOLOR;
41 QColor Resource::validNodeColor       = VALIDNODECOLOR;
42 QColor Resource::invalidNodeColor     = INVALIDNODECOLOR;
43
44 QColor Resource::emphasizeBrushColor  = EMPHASIZEBRUSHCOLOR;
45
46 QColor Resource::NOTYETINITIALIZED    = NOTYETINITIALIZED_;
47 QColor Resource::INITIALISED          = INITIALISED_;
48 QColor Resource::RUNNING              = RUNNING_;
49 QColor Resource::WAITINGTASKS         = WAITINGTASKS_;
50 QColor Resource::PAUSED               = PAUSED_;
51 QColor Resource::FINISHED             = FINISHED_;
52 QColor Resource::STOPPED              = STOPPED_;
53 QColor Resource::UNKNOWN              = UNKNOWN_;
54
55 QColor Resource::UNDEFINED            = UNDEFINED_;
56 QColor Resource::INVALID              = INVALID_;
57 QColor Resource::READY                = READY_;
58 QColor Resource::TOLOAD               = TOLOAD_;
59 QColor Resource::LOADED               = LOADED_;
60 QColor Resource::TOACTIVATE           = TOACTIVATE_;
61 QColor Resource::ACTIVATED            = ACTIVATED_;
62 QColor Resource::DESACTIVATED         = DESACTIVATED_;
63 QColor Resource::DONE                 = DONE_;
64 QColor Resource::SUSPENDED            = SUSPENDED_;
65 QColor Resource::LOADFAILED           = LOADFAILED_;
66 QColor Resource::EXECFAILED           = EXECFAILED_;
67 QColor Resource::PAUSE                = PAUSE_;
68 QColor Resource::INTERNALERR          = INTERNALERR_;
69 QColor Resource::DISABLED             = DISABLED_;
70 QColor Resource::FAILED               = FAILED_;
71 QColor Resource::ERROR                = ERROR_;
72 QColor Resource::DEFAULT              = DEFAULT_;
73
74 // Statics for color of links
75 // --------------------------
76
77 QFont  Resource::pythonfont = PYTHONFONT;
78
79 QColor Resource::link_draw_color           = LINKDRAW_COLOR;
80 QColor Resource::stream_link_draw_color    = STREAMLINKDRAW_COLOR;
81 QColor Resource::stream_link_select_color  = STREAMLINK_SELECT_COLOR;
82 QColor Resource::link_select_color         = LINK_SELECT_COLOR;
83 QColor Resource::control_link_select_color = CTRLLINK_SELECT_COLOR;
84 QColor Resource::control_link_draw_color   = CTRLLINKDRAW_COLOR;
85
86 int Resource::link_pen_darkness            = LINK_PEN_DARKNESS;
87
88 // Statics for color of nodes
89 // --------------------------
90
91 QColor Resource::Scene_pen              = Scene_pen_;
92 QColor Resource::Scene_hiPen            = Scene_hiPen_;
93 QColor Resource::Scene_brush            = Scene_brush_;
94 QColor Resource::Scene_hiBrush          = Scene_hiBrush_;
95 QColor Resource::ComposedNode_brush     = ComposedNode_brush_;
96 QColor Resource::ComposedNode_hiBrush   = ComposedNode_hiBrush_;
97 QColor Resource::ComposedNode_pen       = ComposedNode_pen_;
98 QColor Resource::ComposedNode_hiPen     = ComposedNode_hiPen_;
99 QColor Resource::ElementaryNode_brush   = ElementaryNode_brush_;
100 QColor Resource::ElementaryNode_hiBrush = ElementaryNode_hiBrush_;
101 QColor Resource::ElementaryNode_pen     = ElementaryNode_pen_;
102 QColor Resource::ElementaryNode_hiPen   = ElementaryNode_hiPen_;
103 QColor Resource::Header_brush           = Header_brush_;
104 QColor Resource::Header_hiBrush         = Header_hiBrush_;
105 QColor Resource::Header_pen             = Header_pen_;
106 QColor Resource::Header_hiPen           = Header_hiPen_;
107 QColor Resource::CtrlPort_brush         = CtrlPort_brush_;
108 QColor Resource::CtrlPort_hiBrush       = CtrlPort_hiBrush_;
109 QColor Resource::CtrlPort_pen           = CtrlPort_pen_;
110 QColor Resource::CtrlPort_hiPen         = CtrlPort_hiPen_;
111 QColor Resource::DataPort_brush         = DataPort_brush_;
112 QColor Resource::DataPort_hiBrush       = DataPort_hiBrush_;
113 QColor Resource::DataPort_pen           = DataPort_pen_;
114 QColor Resource::DataPort_hiPen         = DataPort_hiPen_;
115
116 QColor Resource::dragOver               = dragOver_;
117
118 // Statics for geometry values for nodes
119 // -------------------------------------
120
121 int Resource::CtrlPort_Width  = 24;
122 int Resource::CtrlPort_Height = 20;
123 int Resource::DataPort_Width  = 72;
124 int Resource::DataPort_Height = 25;
125
126 int Resource::Thickness       =  1;
127
128 int Resource::Border_Margin   =  4;
129 int Resource::Space_Margin    =  2;
130
131 int Resource::Line_Space      =  2;
132 int Resource::Line_Width      =  2;
133
134 int Resource::Text_DX         =  3;
135
136 int Resource::Corner_Margin   = ( Resource::Border_Margin + Resource::Space_Margin );
137 int Resource::Header_Height   = ( Resource::Corner_Margin + Resource::CtrlPort_Height + Resource::Line_Space + Resource::Line_Width + Resource::Line_Space );
138 int Resource::Radius          =  3;
139
140 bool Resource::tabPanelsUp = TABPANELSUP;
141
142 // Constructor
143 // -----------
144
145 Resource::Resource()
146 {
147 }