1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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
22 // SMESH SMESHGUI : GUI for SMESH component
23 // File : SMESHGUI_RevolutionDlg.h
24 // Author : Michael ZORIN, Open CASCADE S.A.S.
26 #ifndef SMESHGUI_REVOLUTIONDLG_H
27 #define SMESHGUI_REVOLUTIONDLG_H
30 #include "SMESH_SMESHGUI.hxx"
37 #include <SALOMEconfig.h>
38 #include CORBA_SERVER_HEADER(SMESH_Mesh)
47 class SalomeApp_IntSpinBox;
48 class SMESHGUI_IdValidator;
49 class SMESHGUI_SpinBox;
51 class SMESHGUI_FilterDlg;
54 class LightApp_SelectionMgr;
55 class SMESH_LogicalFilter;
57 class SMESHGUI_MeshEditPreview;
61 //=================================================================================
62 // class : SMESHGUI_RevolutionDlg
64 //=================================================================================
65 class SMESHGUI_EXPORT SMESHGUI_RevolutionDlg : public QDialog
70 SMESHGUI_RevolutionDlg( SMESHGUI* );
71 ~SMESHGUI_RevolutionDlg();
74 enum {NONE_SELECT, POINT_SELECT, FACE_SELECT};
76 void Init( bool = true);
77 void closeEvent( QCloseEvent* );
78 void enterEvent( QEvent* ); /* mouse enter the QWidget */
79 void hideEvent( QHideEvent* ); /* ESC key */
80 void keyPressEvent( QKeyEvent* );
81 int GetConstructorId();
86 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
87 SMESHGUI_IdValidator* myIdValidator;
88 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
89 int myNbOkElements; /* to check when elements are defined */
91 QWidget* myEditCurrentArgument; /* Current argument */
92 SVTK_Selector* mySelector;
94 SMESH::SMESH_IDSource_var mySelectedObject;
97 SMESH::SMESH_Mesh_var myMesh;
99 SMESH_LogicalFilter* myMeshOrSubMeshOrGroupFilter;
100 SMESHGUI_MeshEditPreview* mySimulation;
101 SALOME_Actor* myPreviewActor;
103 QGroupBox* ConstructorsBox;
104 QButtonGroup* GroupConstructors;
105 QRadioButton* RadioButton1;
106 QRadioButton* RadioButton2;
107 QGroupBox* GroupButtons;
108 QPushButton* buttonOk;
109 QPushButton* buttonCancel;
110 QPushButton* buttonApply;
111 QPushButton* buttonHelp;
112 QGroupBox* GroupArguments;
113 QGroupBox* GroupAxis;
114 QLabel* TextLabelElements;
115 QPushButton* SelectElementsButton;
116 QLineEdit* LineEditElements;
117 QCheckBox* CheckBoxMesh;
118 QCheckBox* MakeGroupsCheck;
119 QGroupBox* GroupAngleBox;
120 QButtonGroup* GroupAngle;
121 QRadioButton* RadioButton3;
122 QRadioButton* RadioButton4;
123 QCheckBox* CheckBoxPreview;
125 QLabel* TextLabelPoint;
126 QPushButton* SelectPointButton;
128 SMESHGUI_SpinBox* SpinBox_X;
130 SMESHGUI_SpinBox* SpinBox_Y;
132 SMESHGUI_SpinBox* SpinBox_Z;
133 QLabel* TextLabelVector;
134 QPushButton* SelectVectorButton;
136 SMESHGUI_SpinBox* SpinBox_DX;
138 SMESHGUI_SpinBox* SpinBox_DY;
140 SMESHGUI_SpinBox* SpinBox_DZ;
142 QLabel* TextLabelAngle;
143 SMESHGUI_SpinBox* SpinBox_Angle;
144 QLabel* TextLabelNbSteps;
145 SalomeApp_IntSpinBox* SpinBox_NbSteps;
146 QLabel* TextLabelTolerance;
147 SMESHGUI_SpinBox* SpinBox_Tolerance;
149 QMenu* SelectVectorMenu;
150 QMap<QAction*,int> myMenuActions;
151 int myVectorDefinition;
154 QString myHelpFileName;
156 QPushButton* myFilterBtn;
157 SMESHGUI_FilterDlg* myFilterDlg;
160 void ConstructorsClicked( int );
162 void ClickOnCancel();
165 void SetEditCurrentArgument();
166 void SelectionIntoArgument();
167 void DeactivateActiveDialog();
168 void ActivateThisDialog();
169 void onTextChange( const QString& );
170 void onAngleTextChange( const QString& );
171 void onSelectMesh( bool );
172 void onVectorChanged();
173 void toDisplaySimulation();
174 void onDisplaySimulation( bool );
175 void onSelectVectorMenu( QAction* );
176 void onSelectVectorButton();
180 #endif // SMESHGUI_REVOLUTIONDLG_H