1 // Copyright (C) 2007-2010 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
23 // SMESH SMESHGUI : GUI for SMESH component
24 // File : SMESHGUI_RevolutionDlg.h
25 // Author : Michael ZORIN, Open CASCADE S.A.S.
27 #ifndef SMESHGUI_REVOLUTIONDLG_H
28 #define SMESHGUI_REVOLUTIONDLG_H
31 #include "SMESH_SMESHGUI.hxx"
33 // SALOME GUI includes
34 #include <SALOME_InteractiveObject.hxx>
41 #include <SALOMEconfig.h>
42 #include CORBA_SERVER_HEADER(SMESH_Mesh)
51 class SalomeApp_IntSpinBox;
52 class SMESHGUI_IdValidator;
53 class SMESHGUI_SpinBox;
55 class SMESHGUI_FilterDlg;
58 class LightApp_SelectionMgr;
59 class SMESH_LogicalFilter;
61 class SMESHGUI_MeshEditPreview;
65 //=================================================================================
66 // class : SMESHGUI_RevolutionDlg
68 //=================================================================================
69 class SMESHGUI_EXPORT SMESHGUI_RevolutionDlg : public QDialog
74 SMESHGUI_RevolutionDlg( SMESHGUI* );
75 ~SMESHGUI_RevolutionDlg();
80 enum {NONE_SELECT, POINT_SELECT, FACE_SELECT};
82 void Init( bool = true);
83 void closeEvent( QCloseEvent* );
84 void enterEvent( QEvent* ); /* mouse enter the QWidget */
85 void keyPressEvent( QKeyEvent* );
86 int GetConstructorId();
91 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
92 SMESHGUI_IdValidator* myIdValidator;
93 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
94 int myNbOkElements; /* to check when elements are defined */
96 QWidget* myEditCurrentArgument; /* Current argument */
97 SVTK_Selector* mySelector;
98 Handle(SALOME_InteractiveObject) myIO;
100 SMESH::SMESH_IDSource_var mySelectedObject;
103 SMESH::SMESH_Mesh_var myMesh;
104 SMESH_Actor* myActor;
105 SMESH_LogicalFilter* myMeshOrSubMeshOrGroupFilter;
106 SMESHGUI_MeshEditPreview* mySimulation;
107 SALOME_Actor* myPreviewActor;
109 QGroupBox* ConstructorsBox;
110 QButtonGroup* GroupConstructors;
111 QRadioButton* RadioButton1;
112 QRadioButton* RadioButton2;
113 QGroupBox* GroupButtons;
114 QPushButton* buttonOk;
115 QPushButton* buttonCancel;
116 QPushButton* buttonApply;
117 QPushButton* buttonHelp;
118 QGroupBox* GroupArguments;
119 QGroupBox* GroupAxis;
120 QLabel* TextLabelElements;
121 QPushButton* SelectElementsButton;
122 QLineEdit* LineEditElements;
123 QCheckBox* CheckBoxMesh;
124 QCheckBox* MakeGroupsCheck;
125 QGroupBox* GroupAngleBox;
126 QButtonGroup* GroupAngle;
127 QRadioButton* RadioButton3;
128 QRadioButton* RadioButton4;
129 QCheckBox* CheckBoxPreview;
131 QLabel* TextLabelPoint;
132 QPushButton* SelectPointButton;
134 SMESHGUI_SpinBox* SpinBox_X;
136 SMESHGUI_SpinBox* SpinBox_Y;
138 SMESHGUI_SpinBox* SpinBox_Z;
139 QLabel* TextLabelVector;
140 QPushButton* SelectVectorButton;
142 SMESHGUI_SpinBox* SpinBox_DX;
144 SMESHGUI_SpinBox* SpinBox_DY;
146 SMESHGUI_SpinBox* SpinBox_DZ;
148 QLabel* TextLabelAngle;
149 SMESHGUI_SpinBox* SpinBox_Angle;
150 QLabel* TextLabelNbSteps;
151 SalomeApp_IntSpinBox* SpinBox_NbSteps;
152 QLabel* TextLabelTolerance;
153 SMESHGUI_SpinBox* SpinBox_Tolerance;
155 QMenu* SelectVectorMenu;
156 QMap<QAction*,int> myMenuActions;
157 int myVectorDefinition;
160 QString myHelpFileName;
163 QPushButton* myFilterBtn;
164 SMESHGUI_FilterDlg* myFilterDlg;
167 void ConstructorsClicked( int );
169 void ClickOnCancel();
172 void SetEditCurrentArgument();
173 void SelectionIntoArgument();
174 void DeactivateActiveDialog();
175 void ActivateThisDialog();
176 void onTextChange( const QString& );
177 void onAngleTextChange( const QString& );
178 void onSelectMesh( bool );
179 void onVectorChanged();
180 void toDisplaySimulation();
181 void onDisplaySimulation( bool );
182 void onSelectVectorMenu( QAction* );
183 void onSelectVectorButton();
187 #endif // SMESHGUI_REVOLUTIONDLG_H