]> SALOME platform Git repositories - modules/superv.git/blob - src/SUPERVGUI/SUPERVGUI_ControlNode.h
Salome HOME
NRI : First integration.
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI_ControlNode.h
1 //  File      : SUPERVGUI_ControlNode.h
2 //  Created   : 14 / 01 / 2003
3 //  Author    : Vitaly SMETANNIKOV
4 //  Project   : SALOME 
5 //  Module    : SUPERVGUI
6 //  Copyright : Open CASCADE 
7
8 #ifndef SUPERVGUI_ControlNode_H
9 #define SUPERVGUI_ControlNode_H
10
11 #include "SUPERVGUI_GraphNode.h"
12 #include <qlayout.h>
13 #include <qdialog.h>
14 #include <qcombobox.h>
15
16
17 class SUPERVGUI_EndControlNode;
18
19
20 /**
21  * Start node of Switch and Loop
22  */
23 class SUPERVGUI_StartControlNode: public SUPERVGUI_GraphNode {
24   Q_OBJECT
25
26  public:
27   SUPERVGUI_StartControlNode(QWidget* theParent, SUPERVGUI_Main* theMain, 
28                              SUPERV_CNode theNode);
29   virtual ~SUPERVGUI_StartControlNode() {};
30
31   virtual void hideAll();
32   virtual void showAll();
33   virtual void updateShape();
34   virtual void deletePort(SUPERVGUI_Port* thePort);
35
36   void setEndNode(SUPERVGUI_EndControlNode* theEndNode);
37
38   virtual QPoint getOutConnectPnt();
39
40  public slots:
41   void switchPorts();
42   virtual void rename();
43   virtual void remove();
44   virtual void addInputPort();
45   virtual void addOutputPort();
46
47  private:
48   void setShape();
49
50   SUPERVGUI_EndControlNode* myEndNode;
51   int myPortsItem;
52 };
53
54
55
56
57 /**
58  * End node of Switch and Loop
59  */
60 class SUPERVGUI_EndControlNode: public SUPERVGUI_GraphNode {
61   Q_OBJECT
62
63  public:
64   SUPERVGUI_EndControlNode(QWidget* theParent, SUPERVGUI_Main* theMain, 
65                              SUPERV_CNode theNode, SUPERVGUI_StartControlNode* theStart);
66   virtual ~SUPERVGUI_EndControlNode() {};
67
68   virtual void hideAll();
69   virtual void showAll();
70   virtual void updateShape();
71
72   virtual QPoint getInConnectPnt();
73
74  public slots:
75   void switchPorts();
76
77  private:
78   void setShape();
79
80   SUPERVGUI_StartControlNode* myStartNode;
81   int myPortsItem;
82 };
83
84
85 class SUPERVGUI_SelectInlineDlg:  public QDialog {
86   Q_OBJECT
87
88  public:
89   SUPERVGUI_SelectInlineDlg(SUPERVGUI_Main* theMain);
90   virtual ~SUPERVGUI_SelectInlineDlg() {};
91
92   QString getName() { return myCombo->currentText(); }
93
94  private:
95   QComboBox* myCombo;
96 };
97
98
99 /**
100  * GOTO node
101  */
102 class SUPERVGUI_GotoNode: public SUPERVGUI_GraphNode {
103   Q_OBJECT
104
105  public:
106   SUPERVGUI_GotoNode(QWidget* theParent, SUPERVGUI_Main* theMain, 
107                              SUPERV_CNode theNode);
108   virtual ~SUPERVGUI_GotoNode() {};
109
110   virtual void hideAll();
111   virtual void showAll();
112   virtual void updateShape();
113
114   void setLinkedNode(char* theNodeName);
115
116  public slots:
117    void linkToNode();
118
119  private:
120   void setShape();
121   
122   
123 };
124
125
126 #endif