1 // SMESH SMESHGUI : GUI for SMESH 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 // File : SMESHGUI_RevolutionDlg.h
25 // Author : Michael ZORIN
29 #ifndef DIALOGBOX_REVOLUTION_H
30 #define DIALOGBOX_REVOLUTION_H
32 #include "SMESH_SMESHGUI.hxx"
34 #include "LightApp_SelectionMgr.h"
36 #include "SMESH_LogicalFilter.hxx"
50 class SMESHGUI_SpinBox;
53 class SMESHGUI_SpinBox;
54 class SVTK_ViewWindow;
57 class SMESHGUI_MeshEditPreview;
60 #include <SALOMEconfig.h>
61 #include CORBA_SERVER_HEADER(SMESH_Mesh)
64 //=================================================================================
65 // class : SMESHGUI_RevolutionDlg
67 //=================================================================================
68 class SMESHGUI_EXPORT SMESHGUI_RevolutionDlg : public QDialog
73 SMESHGUI_RevolutionDlg (SMESHGUI*,
77 ~SMESHGUI_RevolutionDlg();
80 void Init (bool ResetControls = true);
81 void closeEvent (QCloseEvent*);
82 void enterEvent (QEvent*); /* mouse enter the QWidget */
83 void hideEvent (QHideEvent*); /* ESC key */
84 void keyPressEvent(QKeyEvent*);
85 int GetConstructorId();
88 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
89 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
90 int myNbOkElements; /* to check when elements are defined */
92 QWidget* myEditCurrentArgument; /* Current argument */
93 SVTK_Selector* mySelector;
96 SMESH::SMESH_Mesh_var myMesh;
98 SMESH_LogicalFilter* myMeshOrSubMeshOrGroupFilter;
99 SMESHGUI_MeshEditPreview* mySimulation;
100 SALOME_Actor* myPreviewActor;
102 QButtonGroup* GroupConstructors;
103 QRadioButton* RadioButton1;
104 QRadioButton* RadioButton2;
105 QGroupBox* GroupButtons;
106 QPushButton* buttonOk;
107 QPushButton* buttonCancel;
108 QPushButton* buttonApply;
109 QPushButton* buttonHelp;
110 QGroupBox* GroupArguments;
111 QGroupBox* GroupAxis;
112 QLabel* TextLabelElements;
113 QPushButton* SelectElementsButton;
114 QLineEdit* LineEditElements;
115 QCheckBox* CheckBoxMesh;
116 QCheckBox* MakeGroupsCheck;
117 QButtonGroup* GroupAngle;
118 QRadioButton* RadioButton3;
119 QRadioButton* RadioButton4;
120 QCheckBox* CheckBoxPreview;
122 QLabel* TextLabelPoint;
123 QPushButton* SelectPointButton;
125 SMESHGUI_SpinBox* SpinBox_X;
127 SMESHGUI_SpinBox* SpinBox_Y;
129 SMESHGUI_SpinBox* SpinBox_Z;
130 QLabel* TextLabelVector;
131 QPushButton* SelectVectorButton;
133 SMESHGUI_SpinBox* SpinBox_DX;
135 SMESHGUI_SpinBox* SpinBox_DY;
137 SMESHGUI_SpinBox* SpinBox_DZ;
139 QLabel* TextLabelAngle;
140 SMESHGUI_SpinBox* SpinBox_Angle;
141 QLabel* TextLabelNbSteps;
142 QSpinBox* SpinBox_NbSteps;
143 QLabel* TextLabelTolerance;
144 SMESHGUI_SpinBox* SpinBox_Tolerance;
146 QString myHelpFileName;
150 void ConstructorsClicked (int constructorId);
152 void ClickOnCancel();
155 void SetEditCurrentArgument();
156 void SelectionIntoArgument();
157 void DeactivateActiveDialog();
158 void ActivateThisDialog();
159 void onTextChange (const QString&);
160 void onSelectMesh (bool toSelectMesh);
161 void onVectorChanged();
162 void toDisplaySimulation();
163 void onDisplaySimulation(bool toDisplayPreview);
166 QGridLayout* SMESHGUI_RevolutionDlgLayout;
167 QGridLayout* GroupConstructorsLayout;
168 QGridLayout* GroupButtonsLayout;
169 QGridLayout* GroupArgumentsLayout;
172 #endif // DIALOGBOX_REVOLUTION_H