X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSUPERVGUI%2FSUPERVGUI_CanvasControlNode.h;h=ddb250ea79430b09ab59c27854886d34acd6f91b;hb=refs%2Ftags%2FV4_1_2rc3;hp=686fcbf151cf985eff4301c42857fec1bfcc89e7;hpb=7d3931c54614b3d73351551e662ccbd3be07a0d8;p=modules%2Fsuperv.git diff --git a/src/SUPERVGUI/SUPERVGUI_CanvasControlNode.h b/src/SUPERVGUI/SUPERVGUI_CanvasControlNode.h index 686fcbf..ddb250e 100644 --- a/src/SUPERVGUI/SUPERVGUI_CanvasControlNode.h +++ b/src/SUPERVGUI/SUPERVGUI_CanvasControlNode.h @@ -1,6 +1,23 @@ // SUPERV SUPERVGUI : GUI for Supervisor component // -// Copyright (C) 2003 OPEN CASCADE +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : SUPERVGUI_CanvasControlNode.h // Author : Natalia KOPNOVA @@ -9,7 +26,6 @@ #ifndef SUPERVGUI_CanvasControlNode_H #define SUPERVGUI_CanvasControlNode_H -using namespace std; #include "SUPERVGUI_Def.h" #include "SUPERVGUI_CanvasNode.h" #include @@ -19,36 +35,48 @@ class SUPERVGUI_CanvasComputeNode : public SUPERVGUI_CanvasNode { Q_OBJECT public: - SUPERVGUI_CanvasComputeNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode); + static SUPERVGUI_CanvasComputeNode* Create (SUIT_ResourceMgr*, QObject* theParent, + SUPERVGUI_Main* theMain, SUPERV_CNode theNode); virtual ~SUPERVGUI_CanvasComputeNode() {} virtual QPopupMenu* getPopupMenu(QWidget* theParent); + + protected: + SUPERVGUI_CanvasComputeNode (SUIT_ResourceMgr*, QObject* theParent, + SUPERVGUI_Main* theMain, SUPERV_CNode theNode); }; class SUPERVGUI_CanvasMacroNode : public SUPERVGUI_CanvasComputeNode { Q_OBJECT public: - SUPERVGUI_CanvasMacroNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode); + static SUPERVGUI_CanvasMacroNode* Create (SUIT_ResourceMgr*, QObject* theParent, + SUPERVGUI_Main* theMain, SUPERV_CNode theNode); virtual ~SUPERVGUI_CanvasMacroNode() {} virtual QPopupMenu* getPopupMenu(QWidget* theParent); public slots: + virtual void remove(); // mkr : IPAL11549 void openSubGraph(); void exportDataflow(); protected: + SUPERVGUI_CanvasMacroNode (SUIT_ResourceMgr*, QObject* theParent, + SUPERVGUI_Main* theMain, SUPERV_CNode theNode); + virtual SUPERVGUI_CanvasNodePrs* createPrs() const; }; class SUPERVGUI_CanvasEndNode; -class SUPERVGUI_CanvasStartNode : public SUPERVGUI_CanvasNode { +class SUPERVGUI_CanvasStartNode : public SUPERVGUI_CanvasNode +{ Q_OBJECT public: - SUPERVGUI_CanvasStartNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode); + static SUPERVGUI_CanvasStartNode* Create (SUIT_ResourceMgr*, QObject* theParent, + SUPERVGUI_Main* theMain, SUPERV_CNode theNode); virtual ~SUPERVGUI_CanvasStartNode() {} virtual bool setNodeName(QString aName); @@ -60,11 +88,15 @@ class SUPERVGUI_CanvasStartNode : public SUPERVGUI_CanvasNode { public slots: virtual void remove(); - virtual void addInputPort(); - virtual void addOutputPort(); + // mkr : IPAL9815 : commented the following code + /*virtual void addInputPort(); + virtual void addOutputPort();*/ virtual void pastePort(); protected: + SUPERVGUI_CanvasStartNode (SUIT_ResourceMgr*, QObject* theParent, + SUPERVGUI_Main* theMain, SUPERV_CNode theNode); + virtual SUPERVGUI_CanvasNodePrs* createPrs() const; protected slots: @@ -75,7 +107,6 @@ class SUPERVGUI_CanvasStartNode : public SUPERVGUI_CanvasNode { void setCoupled(SUPERVGUI_CanvasEndNode* theEnd) { myCoupled = theEnd; } SUPERVGUI_CanvasEndNode* myCoupled; - }; @@ -83,23 +114,28 @@ class SUPERVGUI_CanvasEndNode : public SUPERVGUI_CanvasNode { Q_OBJECT public: - SUPERVGUI_CanvasEndNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode, - SUPERVGUI_CanvasStartNode* theStart); + static SUPERVGUI_CanvasEndNode* Create (SUIT_ResourceMgr*, QObject* theParent, + SUPERVGUI_Main* theMain, SUPERV_CNode theNode, + SUPERVGUI_CanvasStartNode* theStart); virtual ~SUPERVGUI_CanvasEndNode() {} SUPERVGUI_CanvasStartNode* getCoupled() const { return myCoupled; } virtual QPopupMenu* getPopupMenu(QWidget* theParent); - public slots: - virtual void addInputPort(); + // mkr : IPAL9815 : commented the following code + /*public slots: + virtual void addInputPort();*/ protected: + SUPERVGUI_CanvasEndNode (SUIT_ResourceMgr*, QObject* theParent, + SUPERVGUI_Main* theMain, SUPERV_CNode theNode, + SUPERVGUI_CanvasStartNode* theStart); + virtual SUPERVGUI_CanvasNodePrs* createPrs() const; private: SUPERVGUI_CanvasStartNode* myCoupled; - }; @@ -107,7 +143,8 @@ class SUPERVGUI_CanvasGotoNode : public SUPERVGUI_CanvasNode { Q_OBJECT public: - SUPERVGUI_CanvasGotoNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode); + static SUPERVGUI_CanvasGotoNode* Create (SUIT_ResourceMgr*, QObject* theParent, + SUPERVGUI_Main* theMain, SUPERV_CNode theNode); virtual ~SUPERVGUI_CanvasGotoNode() {} virtual QPopupMenu* getPopupMenu(QWidget* theParent); @@ -116,6 +153,9 @@ class SUPERVGUI_CanvasGotoNode : public SUPERVGUI_CanvasNode { void linkToNode(); protected: + SUPERVGUI_CanvasGotoNode (SUIT_ResourceMgr*, QObject* theParent, + SUPERVGUI_Main* theMain, SUPERV_CNode theNode); + virtual SUPERVGUI_CanvasNodePrs* createPrs() const; }; @@ -123,20 +163,27 @@ class SUPERVGUI_CanvasCellNode : public SUPERVGUI_CanvasNode { Q_OBJECT public: - SUPERVGUI_CanvasCellNode(QObject* theParent, - SUPERVGUI_Main* theMain, - SUPERV_CNode theNode); + static SUPERVGUI_CanvasCellNode* Create (SUIT_ResourceMgr*, QObject* theParent, + SUPERVGUI_Main* theMain, + SUPERV_CNode theNode); virtual ~SUPERVGUI_CanvasCellNode(); - virtual QPopupMenu* getPopupMenu(QWidget* theParent); + // asv : 26.01.05 : everything moved to CanvasNode::getPopupMenu() + //virtual QPopupMenu* getPopupMenu(QWidget* theParent); void setPairCell(SUPERVGUI_CanvasCellNode* thePairCell); SUPERVGUI_CanvasCellNode* getPairCell(); - virtual void sync(); - virtual bool setNodeName(QString aName); + virtual void sync(); + + // asv : 26.01.05 : decided to remove all "edition" operations on nodes in Table view + //virtual bool setNodeName(QString aName); protected: + SUPERVGUI_CanvasCellNode (SUIT_ResourceMgr*, QObject* theParent, + SUPERVGUI_Main* theMain, + SUPERV_CNode theNode); + virtual SUPERVGUI_CanvasNodePrs* createPrs() const; protected: @@ -145,25 +192,31 @@ class SUPERVGUI_CanvasCellNode : public SUPERVGUI_CanvasNode { private: bool myIsControl; bool myIsStart; - }; -class SUPERVGUI_CanvasCellEndNode: public SUPERVGUI_CanvasCellNode { +class SUPERVGUI_CanvasCellEndNode : public SUPERVGUI_CanvasCellNode { public: - SUPERVGUI_CanvasCellEndNode(QObject* theParent, - SUPERVGUI_Main* theMain, - SUPERV_CNode theNode, - SUPERVGUI_CanvasCellNode* theStart); + static SUPERVGUI_CanvasCellEndNode* Create (SUIT_ResourceMgr*, QObject* theParent, + SUPERVGUI_Main* theMain, + SUPERV_CNode theNode, + SUPERVGUI_CanvasCellNode* theStart); virtual ~SUPERVGUI_CanvasCellEndNode() {} - virtual bool setNodeName(QString theName); + // asv : 26.01.05 : decided to remove all "edition" operations on nodes in Table view + //virtual bool setNodeName(QString theName); + + protected: + SUPERVGUI_CanvasCellEndNode (SUIT_ResourceMgr*, QObject* theParent, + SUPERVGUI_Main* theMain, + SUPERV_CNode theNode, + SUPERVGUI_CanvasCellNode* theStart); }; -/** +/** * Taken from SUPERVGUI_ControlNode.h without change */ -class SUPERVGUI_SelectInlineDlg: public QDialog { +class SUPERVGUI_SelectInlineDlg : public QDialog { Q_OBJECT public: