1 // SUPERV SUPERVGUI : GUI for Supervisor component
3 // Copyright (C) 2003 OPEN CASCADE
5 // File : SUPERVGUI_CanvasControlNode.h
6 // Author : Natalia KOPNOVA
9 #ifndef SUPERVGUI_CanvasControlNode_H
10 #define SUPERVGUI_CanvasControlNode_H
13 #include "SUPERVGUI_Def.h"
14 #include "SUPERVGUI_CanvasNode.h"
16 #include <qcombobox.h>
18 class SUPERVGUI_CanvasComputeNode : public SUPERVGUI_CanvasNode {
22 SUPERVGUI_CanvasComputeNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
23 virtual ~SUPERVGUI_CanvasComputeNode() {}
25 virtual QPopupMenu* getPopupMenu(QWidget* theParent);
28 class SUPERVGUI_CanvasMacroNode : public SUPERVGUI_CanvasComputeNode {
32 SUPERVGUI_CanvasMacroNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
33 virtual ~SUPERVGUI_CanvasMacroNode() {}
35 virtual QPopupMenu* getPopupMenu(QWidget* theParent);
39 void exportDataflow();
42 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
46 class SUPERVGUI_CanvasEndNode;
47 class SUPERVGUI_CanvasStartNode : public SUPERVGUI_CanvasNode {
51 SUPERVGUI_CanvasStartNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
52 virtual ~SUPERVGUI_CanvasStartNode() {}
54 virtual bool setNodeName(QString aName);
56 SUPERVGUI_CanvasEndNode* getCoupled() const { return myCoupled; }
58 virtual QPopupMenu* getPopupMenu(QWidget* theParent);
61 virtual void remove();
63 virtual void addInputPort();
64 virtual void addOutputPort();
67 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
70 virtual void onDestroyed(QObject*);
73 friend class SUPERVGUI_CanvasEndNode;
74 void setCoupled(SUPERVGUI_CanvasEndNode* theEnd) { myCoupled = theEnd; }
76 SUPERVGUI_CanvasEndNode* myCoupled;
81 class SUPERVGUI_CanvasEndNode : public SUPERVGUI_CanvasNode {
85 SUPERVGUI_CanvasEndNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode,
86 SUPERVGUI_CanvasStartNode* theStart);
87 virtual ~SUPERVGUI_CanvasEndNode() {}
89 SUPERVGUI_CanvasStartNode* getCoupled() const { return myCoupled; }
91 virtual QPopupMenu* getPopupMenu(QWidget* theParent);
94 virtual void addInputPort();
97 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
100 SUPERVGUI_CanvasStartNode* myCoupled;
105 class SUPERVGUI_CanvasGotoNode : public SUPERVGUI_CanvasNode {
109 SUPERVGUI_CanvasGotoNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
110 virtual ~SUPERVGUI_CanvasGotoNode() {}
112 virtual QPopupMenu* getPopupMenu(QWidget* theParent);
118 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
121 class SUPERVGUI_CanvasCellNode : public SUPERVGUI_CanvasNode {
125 SUPERVGUI_CanvasCellNode(QObject* theParent,
126 SUPERVGUI_Main* theMain,
127 SUPERV_CNode theNode);
128 virtual ~SUPERVGUI_CanvasCellNode() {}
130 virtual QPopupMenu* getPopupMenu(QWidget* theParent);
132 void setPairCell(SUPERVGUI_CanvasCellNode* thePairCell);
133 SUPERVGUI_CanvasCellNode* getPairCell();
136 //virtual bool setNodeName(QString aName);
139 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
142 SUPERVGUI_CanvasCellNode* myPairCell; //for ControlNodes
150 class SUPERVGUI_CanvasCellEndNode: public SUPERVGUI_CanvasCellNode {
153 SUPERVGUI_CanvasCellEndNode(QObject* theParent,
154 SUPERVGUI_Main* theMain,
155 SUPERV_CNode theNode,
156 SUPERVGUI_CanvasCellNode* theStart);
157 virtual ~SUPERVGUI_CanvasCellEndNode() {}
161 * Taken from SUPERVGUI_ControlNode.h without change
163 class SUPERVGUI_SelectInlineDlg: public QDialog {
167 SUPERVGUI_SelectInlineDlg(SUPERVGUI_Main* theMain);
168 virtual ~SUPERVGUI_SelectInlineDlg() {};
170 QString getName() { return myCombo->currentText(); }