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)
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();
84 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
85 SMESHGUI_IdValidator* myIdValidator;
86 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
87 int myNbOkElements; /* to check when elements are defined */
89 QWidget* myEditCurrentArgument; /* Current argument */
90 SVTK_Selector* mySelector;
93 SMESH::SMESH_Mesh_var myMesh;
95 SMESH_LogicalFilter* myMeshOrSubMeshOrGroupFilter;
96 SMESHGUI_MeshEditPreview* mySimulation;
97 SALOME_Actor* myPreviewActor;
99 QGroupBox* ConstructorsBox;
100 QButtonGroup* GroupConstructors;
101 QRadioButton* RadioButton1;
102 QRadioButton* RadioButton2;
103 QGroupBox* GroupButtons;
104 QPushButton* buttonOk;
105 QPushButton* buttonCancel;
106 QPushButton* buttonApply;
107 QPushButton* buttonHelp;
108 QGroupBox* GroupArguments;
109 QGroupBox* GroupAxis;
110 QLabel* TextLabelElements;
111 QPushButton* SelectElementsButton;
112 QLineEdit* LineEditElements;
113 QCheckBox* CheckBoxMesh;
114 QCheckBox* MakeGroupsCheck;
115 QGroupBox* GroupAngleBox;
116 QButtonGroup* GroupAngle;
117 QRadioButton* RadioButton3;
118 QRadioButton* RadioButton4;
119 QCheckBox* CheckBoxPreview;
121 QLabel* TextLabelPoint;
122 QPushButton* SelectPointButton;
124 SMESHGUI_SpinBox* SpinBox_X;
126 SMESHGUI_SpinBox* SpinBox_Y;
128 SMESHGUI_SpinBox* SpinBox_Z;
129 QLabel* TextLabelVector;
130 QPushButton* SelectVectorButton;
132 SMESHGUI_SpinBox* SpinBox_DX;
134 SMESHGUI_SpinBox* SpinBox_DY;
136 SMESHGUI_SpinBox* SpinBox_DZ;
138 QLabel* TextLabelAngle;
139 SMESHGUI_SpinBox* SpinBox_Angle;
140 QLabel* TextLabelNbSteps;
141 QSpinBox* SpinBox_NbSteps;
142 QLabel* TextLabelTolerance;
143 SMESHGUI_SpinBox* SpinBox_Tolerance;
145 QMenu* SelectVectorMenu;
146 QMap<QAction*,int> myMenuActions;
147 int myVectorDefinition;
150 QString myHelpFileName;
152 SMESHGUI_FilterDlg* myFilterDlg;
155 void ConstructorsClicked( int );
157 void ClickOnCancel();
160 void SetEditCurrentArgument();
161 void SelectionIntoArgument();
162 void DeactivateActiveDialog();
163 void ActivateThisDialog();
164 void onTextChange( const QString& );
165 void onSelectMesh( bool );
166 void onVectorChanged();
167 void toDisplaySimulation();
168 void onDisplaySimulation( bool );
169 void onSelectVectorMenu( QAction* );
170 void onSelectVectorButton();
174 #endif // SMESHGUI_REVOLUTIONDLG_H