1 // SUPERV SUPERVGUI : GUI for Supervisor component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SUPERVGUI_Main.h
25 // Author : Francis KLOSS
28 #ifndef SUPERVGUI_Main_H
29 #define SUPERVGUI_Main_H
31 //#include "SUPERVGUI.h"
32 #include "SUPERVGraph_ViewFrame.h"
33 #include "SUPERVGUI_Array.h"
34 #include "SUPERVGUI_Graph.h"
35 #include "QAD_Desktop.h"
36 #include "SUPERVGUI_Port.h"
39 class QAD_ObjectBrowser;
41 class NOTIFICATION_Consumer;
44 class SUPERVGUI_Main: public SUPERVGraph_View {
48 SUPERVGUI_Main(SUPERVGraph_ViewFrame*, QAD_Desktop*, bool fromIOR);
49 SUPERVGUI_Main(SUPERVGraph_ViewFrame*, QAD_Desktop*, bool isModify, const char* filename);
50 SUPERVGUI_Main(SUPERVGraph_ViewFrame*, QAD_Desktop*, SUPERV_Graph);
51 virtual ~SUPERVGUI_Main();
58 bool exportDataflow(QString theFile);
60 bool putDataStudy(SUPERV_Port port, const char* inout);
61 void setData(SUPERVGUI_PortIn* p);
63 SUPERVGUI_Graph* getGraph();
64 SUPERVGUI_Array* getArray();
65 SUPERV_Graph getDataflow();
66 QAD_Message* getMessage();
67 QAD_Study* getStudy();
69 void showPopup(QPopupMenu* p, QMouseEvent* e);
71 void ActivatePanning();
74 void setHashCode(QString theCode)
75 { myHashCode = theCode; };
78 { return myHashCode; };
82 { if (SUPERV_isNull(dataflow)) return false;
83 return !dataflow->IsReadOnly(); };
85 bool isFromStudy() { return myIsFromStudy; }
86 void setAsFromStudy(bool theToStudy);
87 void checkIsInStudy();
89 void addComputeNode(SUPERV_CNode theNode);
90 void addControlNode(SUPERV_CNode theStartNode, SUPERV_CNode theEndNode);
91 void addGOTONode(SUPERV_CNode theNode);
93 void setPaletteBackgroundColor(const QColor& color);
95 void lockedGraph(bool theLock) { myIsLocked = theLock; }
96 bool isLocked() { return myIsLocked; }
105 void changeInformation();
108 void showFullGraph();
109 void showContolFlow();
110 void filterNotification();
113 void chooseData(QListViewItem* item);
116 void init(QAD_Desktop* parent);
117 void StartTimer(const char* m);
118 void StopTimer(const char* m);
119 void syncNotification();
120 bool isFiltered(char* graph, char* node, char* type, char* message, char* sender, long counter, char* date, long stamp);
122 SUPERV_Graph dataflow;
124 QAD_ObjectBrowser* objectBrowser;
125 QAD_Message* message;
126 SUPERVGUI_Graph* graph;
129 GraphViewType myCurrentView;
130 SUPERVGUI_Array* array;
133 SUPERVGUI_PortIn* portIn;
140 SALOME_NamingService* myNService;
141 QDateTime myRunTime; // mpv 23.12.2002: we need time of running of dataflow
142 // for right Study document modification
143 /* notification data */
144 NOTIFICATION_Consumer* notification;
147 QString myLogFileName;