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 SUPERVGUI_CanvasComputeNode( SUIT_ResourceMgr*, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
39 virtual ~SUPERVGUI_CanvasComputeNode() {}
41 virtual QPopupMenu* getPopupMenu(QWidget* theParent);
44 class SUPERVGUI_CanvasMacroNode : public SUPERVGUI_CanvasComputeNode {
48 SUPERVGUI_CanvasMacroNode( SUIT_ResourceMgr*, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
49 virtual ~SUPERVGUI_CanvasMacroNode() {}
51 virtual QPopupMenu* getPopupMenu(QWidget* theParent);
54 virtual void remove(); // mkr : IPAL11549
56 void exportDataflow();
59 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
63 class SUPERVGUI_CanvasEndNode;
64 class SUPERVGUI_CanvasStartNode : public SUPERVGUI_CanvasNode {
68 SUPERVGUI_CanvasStartNode( SUIT_ResourceMgr*, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
69 virtual ~SUPERVGUI_CanvasStartNode() {}
71 virtual bool setNodeName(QString aName);
73 SUPERVGUI_CanvasEndNode* getCoupled() const { return myCoupled; }
75 virtual QPopupMenu* getPopupMenu(QWidget* theParent);
78 virtual void remove();
80 // mkr : IPAL9815 : commented the following code
81 /*virtual void addInputPort();
82 virtual void addOutputPort();*/
83 virtual void pastePort();
86 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
89 virtual void onDestroyed(QObject*);
92 friend class SUPERVGUI_CanvasEndNode;
93 void setCoupled(SUPERVGUI_CanvasEndNode* theEnd) { myCoupled = theEnd; }
95 SUPERVGUI_CanvasEndNode* myCoupled;
100 class SUPERVGUI_CanvasEndNode : public SUPERVGUI_CanvasNode {
104 SUPERVGUI_CanvasEndNode( SUIT_ResourceMgr*, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode,
105 SUPERVGUI_CanvasStartNode* theStart);
106 virtual ~SUPERVGUI_CanvasEndNode() {}
108 SUPERVGUI_CanvasStartNode* getCoupled() const { return myCoupled; }
110 virtual QPopupMenu* getPopupMenu(QWidget* theParent);
112 // mkr : IPAL9815 : commented the following code
114 virtual void addInputPort();*/
117 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
120 SUPERVGUI_CanvasStartNode* myCoupled;
125 class SUPERVGUI_CanvasGotoNode : public SUPERVGUI_CanvasNode {
129 SUPERVGUI_CanvasGotoNode( SUIT_ResourceMgr*, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
130 virtual ~SUPERVGUI_CanvasGotoNode() {}
132 virtual QPopupMenu* getPopupMenu(QWidget* theParent);
138 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
141 class SUPERVGUI_CanvasCellNode : public SUPERVGUI_CanvasNode {
145 SUPERVGUI_CanvasCellNode( SUIT_ResourceMgr*, QObject* theParent,
146 SUPERVGUI_Main* theMain,
147 SUPERV_CNode theNode);
148 virtual ~SUPERVGUI_CanvasCellNode();
150 // asv : 26.01.05 : everything moved to CanvasNode::getPopupMenu()
151 //virtual QPopupMenu* getPopupMenu(QWidget* theParent);
153 void setPairCell(SUPERVGUI_CanvasCellNode* thePairCell);
154 SUPERVGUI_CanvasCellNode* getPairCell();
158 // asv : 26.01.05 : decided to remove all "edition" operations on nodes in Table view
159 //virtual bool setNodeName(QString aName);
162 virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
165 SUPERVGUI_CanvasCellNode* myPairCell; //for ControlNodes
173 class SUPERVGUI_CanvasCellEndNode: public SUPERVGUI_CanvasCellNode {
176 SUPERVGUI_CanvasCellEndNode( SUIT_ResourceMgr*, QObject* theParent,
177 SUPERVGUI_Main* theMain,
178 SUPERV_CNode theNode,
179 SUPERVGUI_CanvasCellNode* theStart);
180 virtual ~SUPERVGUI_CanvasCellEndNode() {}
182 // asv : 26.01.05 : decided to remove all "edition" operations on nodes in Table view
183 //virtual bool setNodeName(QString theName);
187 * Taken from SUPERVGUI_ControlNode.h without change
189 class SUPERVGUI_SelectInlineDlg: public QDialog {
193 SUPERVGUI_SelectInlineDlg(SUPERVGUI_Main* theMain);
194 virtual ~SUPERVGUI_SelectInlineDlg() {};
196 QString getName() { return myCombo->currentText(); }