1 // SUPERV SUPERVGUI : GUI for Supervisor component
3 // Copyright (C) 2003 CEA/DEN, EDF R&D
7 // File : SUPERVGUI_Def.h
8 // Author : Vitaly SMETANNIKOV
11 #ifndef SUPERVGUI_DEF_H
12 #define SUPERVGUI_DEF_H
15 // Nom du noeud de supervision dans l'etude
16 // ----------------------------------------
18 #define STUDY_SUPERVISION "SUPERV"
20 #define STUDY_PORT_IN "In"
21 #define STUDY_PORT_OUT "Out"
23 // Nom d'un nouveau Dataflow
24 // -------------------------
26 #define MAIN_NEW "aNewDataFlow"
28 #define MAIN_COLOR QColor(165, 255, 176)
29 #define MAIN_TITLE QColor( 63, 213, 255)
30 #define MAIN_CTRL QColor(255, 108, 106)
31 #define MAIN_BACK QColor(NODE_RED, NODE_GREEN, NODE_BLUE)
33 // Taille du dataflow sous forme de graphe
34 // ---------------------------------------
36 #define GRAPH_WIDTH 3500
37 #define GRAPH_HEIGHT 3500
39 #define GRAPH_MAX 245e5
41 // Taille du dataflow sous forme de tableau
42 // ----------------------------------------
44 #define ARRAY_WIDTH 1500
45 #define ARRAY_HEIGHT 3000
47 #define CELL_WIDTH 270
48 #define CELL_WIDTH_PART 90
49 #define CELL_HEIGHT 25
56 NODE_Waiting "Waiting", 035, 192, 255, true, true, true, true bleu
57 NODE_Running "Running", 032, 210, 032, true, true, true, true vert
58 NODE_Suspended "Suspended", 255, 180, 000, false, true, true, true orange
59 NODE_Done "Finished", 255, 158, 255, true, false, true, false violet
60 NODE_Errored "Aborted", 255, 000, 000, true, false, true, false rouge
61 NODE_Killed "Killed", 255, 000, 000, true, false, b, !b rouge
62 NODE_Editing "", NODE_RED, NODE_GREEN, NODE_BLUE, true, false, true, false fond
67 #define NODE_GREEN 249
77 #define PORT_HEIGHT 28
79 // Taille des points carres constituant les lignes entre les noeuds
80 // ----------------------------------------------------------------
83 #define POINT_SIZE_HALF 2
85 // Taille et couleurs des liens
86 // ----------------------------
90 #define LINK_DATA QColor( 0, 0, 0), LINK_WIDTH
91 #define LINK_CTRL MAIN_CTRL , LINK_WIDTH
92 #define LINK_SKCH QColor(255, 0, 230), LINK_WIDTH
94 // Taille des labels des noeuds
95 // ----------------------------
97 #define LABEL_WIDTH 160
98 #define LABEL_HEIGHT 20
100 // Taille de la boite de filtre de notification
101 // --------------------------------------------
103 #define NOTIFICATION_WIDTH 250
104 #define NOTIFICATION_HEIGHT 450
106 // Names of control ports
107 // -------------------------
108 #define OUTVOID "OutVoid"
109 #define INVOID "InVoid"
111 // Convention pour la souris
112 // -------------------------
116 // Trace pour l'aide a la mise au point
117 // ------------------------------------
119 //#define DEBUG_MODE_COMPIL
121 #ifdef DEBUG_MODE_COMPIL
123 #define Trace(m) MESSAGE(m);
140 #include <qobjectlist.h>
142 #include <qmainwindow.h>
143 #include <qscrollview.h>
146 #include <qfiledialog.h>
147 #include <qinputdialog.h>
148 #include <qmessagebox.h>
150 #include <qpopupmenu.h>
152 #include <qpainter.h>
154 #include <qmultilineedit.h>
155 #include <qlistview.h>
156 #include <qpushbutton.h>
157 #include <qcheckbox.h>
159 //VRV: porting on Qt 3.0.5
160 #if QT_VERSION >= 0x030005
163 //VRV: porting on Qt 3.0.5
165 // Acces au moteur de supervision
166 // ------------------------------
168 #include "utilities.h"
170 #include "SALOME_LifeCycleCORBA.hxx"
171 #include CORBA_CLIENT_HEADER(SUPERV)
172 #include CORBA_SERVER_HEADER(SALOMEDS)
173 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
175 #define SUPERV_Engine SUPERV::SuperG_var
177 #define SUPERV_Graph SUPERV::Graph_var
179 #define SUPERV_CNode SUPERV::CNode_var
180 #define SUPERV_FNode SUPERV::FNode_var
181 #define SUPERV_INode SUPERV::INode_var
182 #define SUPERV_SNode SUPERV::SNode_var
183 #define SUPERV_LNode SUPERV::LNode_var
184 #define SUPERV_GNode SUPERV::GNode_var
185 #define SUPERV_ELNode SUPERV::ELNode_var
186 #define SUPERV_ESNode SUPERV::ESNode_var
188 #define SUPERV_Links SUPERV::ListOfLinks_var
189 #define SUPERV_Ports SUPERV::ListOfPorts_var
190 #define SUPERV_Nodes SUPERV::ListOfNodes_var
191 #define SUPERV_Strings SUPERV::ListOfStrings_var
193 #define SUPERV_Link SUPERV::Link_var
194 #define SUPERV_Date SUPERV::SDate
195 #define SUPERV_Port SUPERV::Port_var
197 #define SUPERV_Editing SUPERV::EditingState
198 #define SUPERV_Running SUPERV::RunningState
199 #define SUPERV_Suspend SUPERV::SuspendState
200 #define SUPERV_Done SUPERV::DoneState
201 #define SUPERV_Error SUPERV::ErrorState
202 #define SUPERV_Kill SUPERV::KillState
203 #define SUPERV_Stop SUPERV::StopState
204 #define SUPERV_Ready SUPERV::ReadyState
205 #define SUPERV_Waiting SUPERV::WaitingState
207 //#define SUPERV_Event SUPERV::GraphEvent
208 //#define SUPERV_State SUPERV::GraphState
210 #define SUPERV_isNull(oc) (CORBA::is_nil(oc))
213 enum GraphViewType { GRAPH, CONTROLFLOW, TABLE };
214 //enum NodeType { COMPUTE, SWITCH, LOOP, GOTO, LABEL };