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.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : SUPERVGUI_CanvasControlNode.h
23 // Author : Natalia KOPNOVA
26 #ifndef SUPERVGUI_CanvasControlNode_H
27 #define SUPERVGUI_CanvasControlNode_H
29 #include "SUPERVGUI_Def.h"
30 #include "SUPERVGUI_CanvasNode.h"
32 #include <qcombobox.h>
34 class SUPERVGUI_CanvasComputeNode : public SUPERVGUI_CanvasNode {
38 static SUPERVGUI_CanvasComputeNode* Create (SUIT_ResourceMgr*, QObject* theParent,
39 SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
40 virtual ~SUPERVGUI_CanvasComputeNode() {}
42 virtual QPopupMenu* getPopupMenu(QWidget* theParent);
45 SUPERVGUI_CanvasComputeNode (SUIT_ResourceMgr*, QObject* theParent,
46 SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
49 class SUPERVGUI_CanvasMacroNode : public SUPERVGUI_CanvasComputeNode {
53 static SUPERVGUI_CanvasMacroNode* Create (SUIT_ResourceMgr*, QObject* theParent,
54 SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
55 virtual ~SUPERVGUI_CanvasMacroNode() {}
57 virtual QPopupMenu* getPopupMenu(QWidget* theParent);
60 virtual void remove(); // mkr : IPAL11549
62 void exportDataflow();
65 SUPERVGUI_CanvasMacroNode (SUIT_ResourceMgr*, QObject* theParent,
66 SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
68 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
72 class SUPERVGUI_CanvasEndNode;
73 class SUPERVGUI_CanvasStartNode : public SUPERVGUI_CanvasNode
78 static SUPERVGUI_CanvasStartNode* Create (SUIT_ResourceMgr*, QObject* theParent,
79 SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
80 virtual ~SUPERVGUI_CanvasStartNode() {}
82 virtual bool setNodeName(QString aName);
84 SUPERVGUI_CanvasEndNode* getCoupled() const { return myCoupled; }
86 virtual QPopupMenu* getPopupMenu(QWidget* theParent);
89 virtual void remove();
91 // mkr : IPAL9815 : commented the following code
92 /*virtual void addInputPort();
93 virtual void addOutputPort();*/
94 virtual void pastePort();
97 SUPERVGUI_CanvasStartNode (SUIT_ResourceMgr*, QObject* theParent,
98 SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
100 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
103 virtual void onDestroyed(QObject*);
106 friend class SUPERVGUI_CanvasEndNode;
107 void setCoupled(SUPERVGUI_CanvasEndNode* theEnd) { myCoupled = theEnd; }
109 SUPERVGUI_CanvasEndNode* myCoupled;
113 class SUPERVGUI_CanvasEndNode : public SUPERVGUI_CanvasNode {
117 static SUPERVGUI_CanvasEndNode* Create (SUIT_ResourceMgr*, QObject* theParent,
118 SUPERVGUI_Main* theMain, SUPERV_CNode theNode,
119 SUPERVGUI_CanvasStartNode* theStart);
120 virtual ~SUPERVGUI_CanvasEndNode() {}
122 SUPERVGUI_CanvasStartNode* getCoupled() const { return myCoupled; }
124 virtual QPopupMenu* getPopupMenu(QWidget* theParent);
126 // mkr : IPAL9815 : commented the following code
128 virtual void addInputPort();*/
131 SUPERVGUI_CanvasEndNode (SUIT_ResourceMgr*, QObject* theParent,
132 SUPERVGUI_Main* theMain, SUPERV_CNode theNode,
133 SUPERVGUI_CanvasStartNode* theStart);
135 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
138 SUPERVGUI_CanvasStartNode* myCoupled;
142 class SUPERVGUI_CanvasGotoNode : public SUPERVGUI_CanvasNode {
146 static SUPERVGUI_CanvasGotoNode* Create (SUIT_ResourceMgr*, QObject* theParent,
147 SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
148 virtual ~SUPERVGUI_CanvasGotoNode() {}
150 virtual QPopupMenu* getPopupMenu(QWidget* theParent);
156 SUPERVGUI_CanvasGotoNode (SUIT_ResourceMgr*, QObject* theParent,
157 SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
159 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
162 class SUPERVGUI_CanvasCellNode : public SUPERVGUI_CanvasNode {
166 static SUPERVGUI_CanvasCellNode* Create (SUIT_ResourceMgr*, QObject* theParent,
167 SUPERVGUI_Main* theMain,
168 SUPERV_CNode theNode);
169 virtual ~SUPERVGUI_CanvasCellNode();
171 // asv : 26.01.05 : everything moved to CanvasNode::getPopupMenu()
172 //virtual QPopupMenu* getPopupMenu(QWidget* theParent);
174 void setPairCell(SUPERVGUI_CanvasCellNode* thePairCell);
175 SUPERVGUI_CanvasCellNode* getPairCell();
179 // asv : 26.01.05 : decided to remove all "edition" operations on nodes in Table view
180 //virtual bool setNodeName(QString aName);
183 SUPERVGUI_CanvasCellNode (SUIT_ResourceMgr*, QObject* theParent,
184 SUPERVGUI_Main* theMain,
185 SUPERV_CNode theNode);
187 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
190 SUPERVGUI_CanvasCellNode* myPairCell; //for ControlNodes
197 class SUPERVGUI_CanvasCellEndNode : public SUPERVGUI_CanvasCellNode {
200 static SUPERVGUI_CanvasCellEndNode* Create (SUIT_ResourceMgr*, QObject* theParent,
201 SUPERVGUI_Main* theMain,
202 SUPERV_CNode theNode,
203 SUPERVGUI_CanvasCellNode* theStart);
204 virtual ~SUPERVGUI_CanvasCellEndNode() {}
206 // asv : 26.01.05 : decided to remove all "edition" operations on nodes in Table view
207 //virtual bool setNodeName(QString theName);
210 SUPERVGUI_CanvasCellEndNode (SUIT_ResourceMgr*, QObject* theParent,
211 SUPERVGUI_Main* theMain,
212 SUPERV_CNode theNode,
213 SUPERVGUI_CanvasCellNode* theStart);
217 * Taken from SUPERVGUI_ControlNode.h without change
219 class SUPERVGUI_SelectInlineDlg : public QDialog {
223 SUPERVGUI_SelectInlineDlg(SUPERVGUI_Main* theMain);
224 virtual ~SUPERVGUI_SelectInlineDlg() {};
226 QString getName() { return myCombo->currentText(); }