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"
36 #include <qcombobox.h>
41 class SUPERVGUI_Node: public QFrame {
45 SUPERVGUI_Node(QWidget* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
46 virtual ~SUPERVGUI_Node();
48 bool eventFilter( QObject* o, QEvent* e );
51 virtual void hideAll()=0;
52 virtual void showAll()=0;
53 virtual void deleteLinks() {};
54 virtual void setNodeName(QString aName);
56 SUPERV_CNode getEngine()
59 SUPERVGUI_Main* getMain()
67 SUPERV::KindOfNode getNodeType()
68 { return myNode->Kind(); }
70 SUPERV_CNode getComputingNode()
73 SUPERV_FNode getFactoryNode()
74 { return SUPERV::FNode::_narrow(myNode); }
76 SUPERV_INode getInlineNode()
77 { return SUPERV::INode::_narrow(myNode); }
79 SUPERV_GNode getGotoNode()
80 { return SUPERV::GNode::_narrow(myNode); }
82 SUPERV_LNode getLoopNode()
83 { return SUPERV::LNode::_narrow(myNode); }
85 SUPERV_ELNode getEndLoopNode()
86 { return SUPERV::ELNode::_narrow(myNode); }
88 SUPERV_SNode getSwitchNode()
89 { return SUPERV::SNode::_narrow(myNode); }
91 SUPERV_ESNode getEndSwitchNode()
92 { return SUPERV::ESNode::_narrow(myNode); }
95 SUPERV_Port createInPort();
96 SUPERV_Port createOutPort();
99 void mousePressEvent(QMouseEvent* e);
102 void suspendResume();
108 virtual void rename();
109 virtual void remove();
110 void changeInformation();
113 void setWarning(bool b);
114 void setStep(bool b);
115 void setTrace(bool b);
116 void setVerbose(bool b);
117 void showPopup(QMouseEvent* e);
119 virtual void addInputPort();
120 virtual void addOutputPort();
121 virtual void editFunction();
124 virtual void setState(SUPERV::GraphState theState);
127 SUPERVGUI_Main* myMain;
129 //SUPERVGUI_Label* myTitle;
130 SUPERVGUI_Label* myTime;
131 SUPERVGUI_Label* myStatus;
134 QPopupMenu* myRunPopup;
142 SUPERVGUI_BrowseNodeDlg* aBrowseDlg;
155 * Port parameters dialog definition
157 class SUPERVGUI_PortParamsDlg: public QDialog {
161 SUPERVGUI_PortParamsDlg();
162 ~SUPERVGUI_PortParamsDlg() {};
164 QString getName() { return myNameTxt->text(); }
165 QString getType() { return myTypeTxt->currentText(); }
168 QLineEdit* myNameTxt;
169 QComboBox* myTypeTxt;