1 // File : SUPERVGUI_Main.h
2 // Created : 24 / 10 / 2001
3 // Author : Francis KLOSS
8 #ifndef SUPERVGUI_Main_H
9 #define SUPERVGUI_Main_H
11 //#include "SUPERVGUI.h"
12 #include "SUPERVGraph_ViewFrame.h"
13 #include "SUPERVGUI_Array.h"
14 #include "SUPERVGUI_Graph.h"
15 #include "QAD_Desktop.h"
16 #include "SUPERVGUI_Port.h"
19 class QAD_ObjectBrowser;
21 class NOTIFICATION_Consumer;
24 class SUPERVGUI_Main: public SUPERVGraph_View {
28 SUPERVGUI_Main(SUPERVGraph_ViewFrame*, QAD_Desktop*, bool fromIOR);
29 SUPERVGUI_Main(SUPERVGraph_ViewFrame*, QAD_Desktop*, bool isModify, const char* filename);
30 SUPERVGUI_Main(SUPERVGraph_ViewFrame*, QAD_Desktop*, SUPERV_Graph);
31 virtual ~SUPERVGUI_Main();
38 bool exportDataflow(QString theFile);
40 bool putDataStudy(SUPERV_Port port, const char* inout);
41 void setData(SUPERVGUI_PortIn* p);
43 SUPERVGUI_Graph* getGraph();
44 SUPERVGUI_Array* getArray();
45 SUPERV_Graph getDataflow();
46 QAD_Message* getMessage();
47 QAD_Study* getStudy();
49 void showPopup(QPopupMenu* p, QMouseEvent* e);
51 void ActivatePanning();
54 void setHashCode(QString theCode)
55 { myHashCode = theCode; };
58 { return myHashCode; };
62 { if (SUPERV_isNull(dataflow)) return false;
63 return !dataflow->IsReadOnly(); };
65 bool isFromStudy() { return myIsFromStudy; }
66 void setAsFromStudy(bool theToStudy);
67 void checkIsInStudy();
69 void addComputeNode(SUPERV_CNode theNode);
70 void addControlNode(SUPERV_CNode theStartNode, SUPERV_CNode theEndNode);
71 void addGOTONode(SUPERV_CNode theNode);
73 void setPaletteBackgroundColor(const QColor& color);
75 void lockedGraph(bool theLock) { myIsLocked = theLock; }
76 bool isLocked() { return myIsLocked; }
85 void changeInformation();
89 void showContolFlow();
90 void filterNotification();
93 void chooseData(QListViewItem* item);
96 void init(QAD_Desktop* parent);
97 void StartTimer(const char* m);
98 void StopTimer(const char* m);
99 void syncNotification();
100 bool isFiltered(char* graph, char* node, char* type, char* message, char* sender, long counter, char* date, long stamp);
102 SUPERV_Graph dataflow;
104 QAD_ObjectBrowser* objectBrowser;
105 QAD_Message* message;
106 SUPERVGUI_Graph* graph;
109 GraphViewType myCurrentView;
110 SUPERVGUI_Array* array;
113 SUPERVGUI_PortIn* portIn;
120 SALOME_NamingService* myNService;
121 QDateTime myRunTime; // mpv 23.12.2002: we need time of running of dataflow
122 // for right Study document modification
123 /* notification data */
124 NOTIFICATION_Consumer* notification;
127 QString myLogFileName;