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_Service.h
25 // Author : Francis KLOSS
28 #ifndef SUPERVGUI_Service_H
29 #define SUPERVGUI_Service_H
32 #include "SUPERVGUI_Def.h"
33 #include <qtabwidget.h>
34 #include <qhgroupbox.h>
35 #include <qwidgetstack.h>
38 //*****************************************************
39 // Pane for Python script editing
40 //*****************************************************
41 class SUPERVGUI_PythonEditPane: public QFrame {
45 SUPERVGUI_PythonEditPane(QWidget* theParent);
46 ~SUPERVGUI_PythonEditPane() {};
48 QString getFuncName();
51 { return (myText->paragraphs() > 1); }
53 SUPERV_Strings getFunction();
54 void setFunction(SUPERV_Strings theStr);
62 //QLineEdit* myNameEdt;
63 //QLineEdit* myParamEdt;
65 //QLineEdit* myOutParamEdt;
66 QPushButton* myNextBtn;
68 QTextStream* myIStream;
73 //*****************************************************
74 // Dialog box for node creation
75 //*****************************************************
77 class SUPERVGUI_Service: public QDialog {
81 SUPERVGUI_Service(SALOME_NamingService* ns);
87 void showEvent(QShowEvent* theEvent);
93 void tabChanged(QWidget *);
94 void addComputeNode();
95 void addFactoryNode();
97 void typeNodeSelected(int theRow);
100 QListView* components;
101 SALOME_NamingService* naming;
103 QWidgetStack* myStackWidget;
107 SUPERVGUI_PythonEditPane* myScriptPane;
109 SUPERVGUI_PythonEditPane* myInitPane;
110 SUPERVGUI_PythonEditPane* myMorePane;
111 SUPERVGUI_PythonEditPane* myNextPane;
113 QTabWidget* myTabPane;
116 QComboBox* myTypeCombo;
122 class SUPERVGUI_EditPythonDlg: public QDialog {
126 SUPERVGUI_EditPythonDlg(bool isLoop = false);
127 ~SUPERVGUI_EditPythonDlg() {};
129 // Not Loop functions
130 QString getFuncName()
131 { return myEditPane->getFuncName(); }
134 { return myEditPane->isDefined(); }
136 SUPERV_Strings getFunction()
137 { return myEditPane->getFunction(); }
139 void setFunction(SUPERV_Strings theStr)
140 { myEditPane->setFunction(theStr); }
143 QString getInitFuncName()
144 { return myInitPane->getFuncName(); }
146 SUPERV_Strings getInitFunction()
147 { return myInitPane->getFunction(); }
149 void setInitFunction(SUPERV_Strings theStr)
150 { myInitPane->setFunction(theStr); }
153 QString getMoreFuncName()
154 { return myMorePane->getFuncName(); }
156 SUPERV_Strings getMoreFunction()
157 { return myMorePane->getFunction(); }
159 void setMoreFunction(SUPERV_Strings theStr)
160 { myMorePane->setFunction(theStr); }
163 QString getNextFuncName()
164 { return myNextPane->getFuncName(); }
166 SUPERV_Strings getNextFunction()
167 { return myNextPane->getFunction(); }
169 void setNextFunction(SUPERV_Strings theStr)
170 { myNextPane->setFunction(theStr); }
173 SUPERVGUI_PythonEditPane* myEditPane;
174 SUPERVGUI_PythonEditPane* myInitPane;
175 SUPERVGUI_PythonEditPane* myMorePane;
176 SUPERVGUI_PythonEditPane* myNextPane;