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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SUPERVGUI_Node.h
25 // Author : Francis KLOSS
28 #ifndef SUPERVGUI_Node_H
29 #define SUPERVGUI_Node_H
32 #include "SUPERVGUI_Def.h"
33 #include "SUPERVGUI_Label.h"
35 #include "SUPERVGUI_BrowseNodeDlg.h"
39 class SUPERVGUI_Node: public QFrame {
43 SUPERVGUI_Node(QWidget* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
44 virtual ~SUPERVGUI_Node();
46 bool eventFilter( QObject* o, QEvent* e );
49 virtual void hideAll()=0;
50 virtual void showAll()=0;
51 virtual void deleteLinks() {};
52 virtual void setNodeName(QString aName);
54 SUPERV_CNode getEngine()
57 SUPERVGUI_Main* getMain()
65 SUPERV::KindOfNode getNodeType()
66 { return myNode->Kind(); }
68 SUPERV_CNode getComputingNode()
71 SUPERV_FNode getFactoryNode()
72 { return SUPERV::FNode::_narrow(myNode); }
74 SUPERV_INode getInlineNode()
75 { return SUPERV::INode::_narrow(myNode); }
77 SUPERV_GNode getGotoNode()
78 { return SUPERV::GNode::_narrow(myNode); }
80 SUPERV_LNode getLoopNode()
81 { return SUPERV::LNode::_narrow(myNode); }
83 SUPERV_ELNode getEndLoopNode()
84 { return SUPERV::ELNode::_narrow(myNode); }
86 SUPERV_SNode getSwitchNode()
87 { return SUPERV::SNode::_narrow(myNode); }
89 SUPERV_ESNode getEndSwitchNode()
90 { return SUPERV::ESNode::_narrow(myNode); }
93 SUPERV_Port createInPort();
94 SUPERV_Port createOutPort();
97 void mousePressEvent(QMouseEvent* e);
100 void suspendResume();
106 virtual void rename();
107 virtual void remove();
108 void changeInformation();
111 void setWarning(bool b);
112 void setStep(bool b);
113 void setTrace(bool b);
114 void setVerbose(bool b);
115 void showPopup(QMouseEvent* e);
117 virtual void addInputPort();
118 virtual void addOutputPort();
119 virtual void editFunction();
122 virtual void setState(SUPERV::GraphState theState);
125 SUPERVGUI_Main* myMain;
127 //SUPERVGUI_Label* myTitle;
128 SUPERVGUI_Label* myTime;
129 SUPERVGUI_Label* myStatus;
132 QPopupMenu* myRunPopup;
140 SUPERVGUI_BrowseNodeDlg* aBrowseDlg;
153 * Port parameters dialog definition
155 class SUPERVGUI_PortParamsDlg: public QDialog {
159 SUPERVGUI_PortParamsDlg();
160 ~SUPERVGUI_PortParamsDlg() {};
162 QString getName() { return myNameTxt->text(); }
163 QString getType() { return myTypeTxt->text(); }
166 QLineEdit* myNameTxt;
167 QLineEdit* myTypeTxt;