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();
98 void typeNodeSelected(int theRow);
102 QListView* components;
103 SALOME_NamingService* naming;
105 QWidgetStack* myStackWidget;
109 SUPERVGUI_PythonEditPane* myScriptPane;
111 SUPERVGUI_PythonEditPane* myInitPane;
112 SUPERVGUI_PythonEditPane* myMorePane;
113 SUPERVGUI_PythonEditPane* myNextPane;
115 QListView* myMacroPane;
118 QTabWidget* myTabPane;
121 QComboBox* myTypeCombo;
127 class SUPERVGUI_EditPythonDlg: public QDialog {
131 SUPERVGUI_EditPythonDlg(bool isLoop = false);
132 ~SUPERVGUI_EditPythonDlg() {};
134 // Not Loop functions
135 QString getFuncName()
136 { return myEditPane->getFuncName(); }
139 { return myEditPane->isDefined(); }
141 SUPERV_Strings getFunction()
142 { return myEditPane->getFunction(); }
144 void setFunction(SUPERV_Strings theStr)
145 { myEditPane->setFunction(theStr); }
148 QString getInitFuncName()
149 { return myInitPane->getFuncName(); }
151 SUPERV_Strings getInitFunction()
152 { return myInitPane->getFunction(); }
154 void setInitFunction(SUPERV_Strings theStr)
155 { myInitPane->setFunction(theStr); }
158 QString getMoreFuncName()
159 { return myMorePane->getFuncName(); }
161 SUPERV_Strings getMoreFunction()
162 { return myMorePane->getFunction(); }
164 void setMoreFunction(SUPERV_Strings theStr)
165 { myMorePane->setFunction(theStr); }
168 QString getNextFuncName()
169 { return myNextPane->getFuncName(); }
171 SUPERV_Strings getNextFunction()
172 { return myNextPane->getFunction(); }
174 void setNextFunction(SUPERV_Strings theStr)
175 { myNextPane->setFunction(theStr); }
178 SUPERVGUI_PythonEditPane* myEditPane;
179 SUPERVGUI_PythonEditPane* myInitPane;
180 SUPERVGUI_PythonEditPane* myMorePane;
181 SUPERVGUI_PythonEditPane* myNextPane;