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();
65 virtual void pastePort();
68 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
71 virtual void onDestroyed(QObject*);
74 friend class SUPERVGUI_CanvasEndNode;
75 void setCoupled(SUPERVGUI_CanvasEndNode* theEnd) { myCoupled = theEnd; }
77 SUPERVGUI_CanvasEndNode* myCoupled;
82 class SUPERVGUI_CanvasEndNode : public SUPERVGUI_CanvasNode {
86 SUPERVGUI_CanvasEndNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode,
87 SUPERVGUI_CanvasStartNode* theStart);
88 virtual ~SUPERVGUI_CanvasEndNode() {}
90 SUPERVGUI_CanvasStartNode* getCoupled() const { return myCoupled; }
92 virtual QPopupMenu* getPopupMenu(QWidget* theParent);
95 virtual void addInputPort();
98 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
101 SUPERVGUI_CanvasStartNode* myCoupled;
106 class SUPERVGUI_CanvasGotoNode : public SUPERVGUI_CanvasNode {
110 SUPERVGUI_CanvasGotoNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
111 virtual ~SUPERVGUI_CanvasGotoNode() {}
113 virtual QPopupMenu* getPopupMenu(QWidget* theParent);
119 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
122 class SUPERVGUI_CanvasCellNode : public SUPERVGUI_CanvasNode {
126 SUPERVGUI_CanvasCellNode(QObject* theParent,
127 SUPERVGUI_Main* theMain,
128 SUPERV_CNode theNode);
129 virtual ~SUPERVGUI_CanvasCellNode();
131 // asv : 26.01.05 : everything moved to CanvasNode::getPopupMenu()
132 //virtual QPopupMenu* getPopupMenu(QWidget* theParent);
134 void setPairCell(SUPERVGUI_CanvasCellNode* thePairCell);
135 SUPERVGUI_CanvasCellNode* getPairCell();
139 // asv : 26.01.05 : decided to remove all "edition" operations on nodes in Table view
140 //virtual bool setNodeName(QString aName);
143 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
146 SUPERVGUI_CanvasCellNode* myPairCell; //for ControlNodes
154 class SUPERVGUI_CanvasCellEndNode: public SUPERVGUI_CanvasCellNode {
157 SUPERVGUI_CanvasCellEndNode(QObject* theParent,
158 SUPERVGUI_Main* theMain,
159 SUPERV_CNode theNode,
160 SUPERVGUI_CanvasCellNode* theStart);
161 virtual ~SUPERVGUI_CanvasCellEndNode() {}
163 // asv : 26.01.05 : decided to remove all "edition" operations on nodes in Table view
164 //virtual bool setNodeName(QString theName);
168 * Taken from SUPERVGUI_ControlNode.h without change
170 class SUPERVGUI_SelectInlineDlg: public QDialog {
174 SUPERVGUI_SelectInlineDlg(SUPERVGUI_Main* theMain);
175 virtual ~SUPERVGUI_SelectInlineDlg() {};
177 QString getName() { return myCombo->currentText(); }