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 );
50 void syncOnEvent(SUPERV::GraphState theStateFromEvent);
52 virtual void hideAll()=0;
53 virtual void showAll()=0;
54 virtual void deleteLinks() {};
55 virtual void setNodeName(QString aName);
57 SUPERV_CNode getEngine()
60 SUPERVGUI_Main* getMain()
68 SUPERV::KindOfNode getNodeType()
69 { return myNode->Kind(); }
71 SUPERV_CNode getComputingNode()
74 SUPERV_FNode getFactoryNode()
75 { return SUPERV::FNode::_narrow(myNode); }
77 SUPERV_INode getInlineNode()
78 { return SUPERV::INode::_narrow(myNode); }
80 SUPERV_GNode getGotoNode()
81 { return SUPERV::GNode::_narrow(myNode); }
83 SUPERV_LNode getLoopNode()
84 { return SUPERV::LNode::_narrow(myNode); }
86 SUPERV_ELNode getEndLoopNode()
87 { return SUPERV::ELNode::_narrow(myNode); }
89 SUPERV_SNode getSwitchNode()
90 { return SUPERV::SNode::_narrow(myNode); }
92 SUPERV_ESNode getEndSwitchNode()
93 { return SUPERV::ESNode::_narrow(myNode); }
96 SUPERV_Port createInPort();
97 SUPERV_Port createOutPort();
100 void mousePressEvent(QMouseEvent* e);
103 void suspendResume();
109 virtual void rename();
110 virtual void remove();
111 void changeInformation();
114 void setWarning(bool b);
115 void setStep(bool b);
116 void setTrace(bool b);
117 void setVerbose(bool b);
118 void showPopup(QMouseEvent* e);
120 virtual void addInputPort();
121 virtual void addOutputPort();
122 virtual void editFunction();
125 virtual void setState(SUPERV::GraphState theState);
128 SUPERVGUI_Main* myMain;
130 //SUPERVGUI_Label* myTitle;
131 SUPERVGUI_Label* myTime;
132 SUPERVGUI_Label* myStatus;
135 QPopupMenu* myRunPopup;
143 SUPERVGUI_BrowseNodeDlg* aBrowseDlg;
157 * Port parameters dialog definition
159 class SUPERVGUI_PortParamsDlg: public QDialog {
163 SUPERVGUI_PortParamsDlg();
164 ~SUPERVGUI_PortParamsDlg() {};
166 QString getName() { return myNameTxt->text(); }
167 QString getType() { return myTypeTxt->currentText(); }
170 QLineEdit* myNameTxt;
171 QComboBox* myTypeTxt;