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