1 // File : SUPERVGUI_Port.h
2 // Created : 25 / 10 / 2001
3 // Author : Francis KLOSS
8 #ifndef SUPERVGUI_Port_H
9 #define SUPERVGUI_Port_H
11 //#include "SUPERVGUI_Point.h"
12 #include "SUPERVGUI_Label.h"
13 #include "SUPERVGUI_Def.h"
14 #include "SALOME_Selection.h"
19 class SUPERVGUI_Port: public SUPERVGUI_Label {
23 SUPERVGUI_Port(QWidget* parent, SUPERVGUI_Main* m, SUPERV_Port p);
24 virtual ~SUPERVGUI_Port();
26 SUPERV_Port getPort();
28 virtual QPoint getConnectPnt();
29 virtual void deleteLinks() = 0;
32 SUPERVGUI_Main* getMain() { return main;}
39 virtual void deletePort();
50 SALOME_Selection* mySelection;
55 void showPopup(QMouseEvent* e);
61 class SUPERVGUI_GetValueDlg;
62 class SUPERVGUI_PortIn: public SUPERVGUI_Port {
66 SUPERVGUI_PortIn(QWidget* parent, SUPERVGUI_Main* m, SUPERV_Port p);
67 virtual ~SUPERVGUI_PortIn();
69 bool eventFilter( QObject* o, QEvent* e );
72 void setValue(const char* id);
73 virtual QPoint getConnectPnt();
75 void setLinkPrs(SUPERVGUI_Link* theLink);
77 SUPERVGUI_Link* getLinkPrs()
78 { return myLinkPrs; };
85 void onDeleteLink(SUPERVGUI_Link*);
91 SUPERVGUI_Link* myLinkPrs;
92 SUPERVGUI_GetValueDlg* myDlg;
99 class SUPERVGUI_PortOut: public SUPERVGUI_Port {
103 SUPERVGUI_PortOut(QWidget* parent, SUPERVGUI_Main* m, SUPERV_Port p);
104 virtual ~SUPERVGUI_PortOut();
108 bool isInStudy() { return study; };
109 void setStudyState(bool theIsInStudy) { study = theIsInStudy; };
110 virtual QPoint getConnectPnt();
112 void addLinkPrs(SUPERVGUI_Link* theLink);
114 SUPERVGUI_Link* getLinkPrs(int theNum)
115 { return myLinksList.at(theNum); };
117 int getLinkPrsCount()
118 { return myLinksList.count(); };
126 void sketch(QMouseEvent* e);
127 void onDeleteLink(SUPERVGUI_Link*);
133 QPtrList<SUPERVGUI_Link> myLinksList;
137 class SUPERVGUI_PortInESNode: public SUPERVGUI_Port {
141 SUPERVGUI_PortInESNode(QWidget* parent, SUPERVGUI_Main* m, SUPERV_Port p);
142 virtual ~SUPERVGUI_PortInESNode();
144 bool eventFilter( QObject* o, QEvent* e );
147 void setValue(const char* id);
148 virtual QPoint getConnectPnt();
150 void setLinkPrs(SUPERVGUI_Link* theLink);
152 SUPERVGUI_Link* getLinkPrs(int theNum)
153 { return myLinksList.at(theNum); };
155 int getLinkPrsCount()
156 { return myLinksList.count(); };
164 void onDeleteLink(SUPERVGUI_Link*);
170 QPtrList<SUPERVGUI_Link> myLinksList;
171 SUPERVGUI_GetValueDlg* myDlg;