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"
32 // SALOME GUI includes
33 #include <SALOME_InteractiveObject.hxx>
40 #include <SALOMEconfig.h>
41 #include CORBA_SERVER_HEADER(SMESH_Mesh)
50 class SalomeApp_IntSpinBox;
51 class SMESHGUI_IdValidator;
52 class SMESHGUI_SpinBox;
54 class SMESHGUI_FilterDlg;
57 class LightApp_SelectionMgr;
58 class SMESH_LogicalFilter;
60 class SMESHGUI_MeshEditPreview;
64 //=================================================================================
65 // class : SMESHGUI_RevolutionDlg
67 //=================================================================================
68 class SMESHGUI_EXPORT SMESHGUI_RevolutionDlg : public QDialog
73 SMESHGUI_RevolutionDlg( SMESHGUI* );
74 ~SMESHGUI_RevolutionDlg();
79 enum {NONE_SELECT, POINT_SELECT, FACE_SELECT};
81 void Init( bool = true);
82 void closeEvent( QCloseEvent* );
83 void enterEvent( QEvent* ); /* mouse enter the QWidget */
84 void keyPressEvent( QKeyEvent* );
85 int GetConstructorId();
90 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
91 SMESHGUI_IdValidator* myIdValidator;
92 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
93 int myNbOkElements; /* to check when elements are defined */
95 QWidget* myEditCurrentArgument; /* Current argument */
96 SVTK_Selector* mySelector;
97 Handle(SALOME_InteractiveObject) myIO;
99 SMESH::SMESH_IDSource_var mySelectedObject;
102 SMESH::SMESH_Mesh_var myMesh;
103 SMESH_Actor* myActor;
104 SMESH_LogicalFilter* myMeshOrSubMeshOrGroupFilter;
105 SMESHGUI_MeshEditPreview* mySimulation;
106 SALOME_Actor* myPreviewActor;
108 QGroupBox* ConstructorsBox;
109 QButtonGroup* GroupConstructors;
110 QRadioButton* RadioButton1;
111 QRadioButton* RadioButton2;
112 QGroupBox* GroupButtons;
113 QPushButton* buttonOk;
114 QPushButton* buttonCancel;
115 QPushButton* buttonApply;
116 QPushButton* buttonHelp;
117 QGroupBox* GroupArguments;
118 QGroupBox* GroupAxis;
119 QLabel* TextLabelElements;
120 QPushButton* SelectElementsButton;
121 QLineEdit* LineEditElements;
122 QCheckBox* CheckBoxMesh;
123 QCheckBox* MakeGroupsCheck;
124 QGroupBox* GroupAngleBox;
125 QButtonGroup* GroupAngle;
126 QRadioButton* RadioButton3;
127 QRadioButton* RadioButton4;
128 QCheckBox* CheckBoxPreview;
130 QLabel* TextLabelPoint;
131 QPushButton* SelectPointButton;
133 SMESHGUI_SpinBox* SpinBox_X;
135 SMESHGUI_SpinBox* SpinBox_Y;
137 SMESHGUI_SpinBox* SpinBox_Z;
138 QLabel* TextLabelVector;
139 QPushButton* SelectVectorButton;
141 SMESHGUI_SpinBox* SpinBox_DX;
143 SMESHGUI_SpinBox* SpinBox_DY;
145 SMESHGUI_SpinBox* SpinBox_DZ;
147 QLabel* TextLabelAngle;
148 SMESHGUI_SpinBox* SpinBox_Angle;
149 QLabel* TextLabelNbSteps;
150 SalomeApp_IntSpinBox* SpinBox_NbSteps;
151 QLabel* TextLabelTolerance;
152 SMESHGUI_SpinBox* SpinBox_Tolerance;
154 QMenu* SelectVectorMenu;
155 QMap<QAction*,int> myMenuActions;
156 int myVectorDefinition;
159 QString myHelpFileName;
162 QPushButton* myFilterBtn;
163 SMESHGUI_FilterDlg* myFilterDlg;
166 void ConstructorsClicked( int );
168 void ClickOnCancel();
171 void SetEditCurrentArgument();
172 void SelectionIntoArgument();
173 void DeactivateActiveDialog();
174 void ActivateThisDialog();
175 void onTextChange( const QString& );
176 void onAngleTextChange( const QString& );
177 void onSelectMesh( bool );
178 void onVectorChanged();
179 void toDisplaySimulation();
180 void onDisplaySimulation( bool );
181 void onSelectVectorMenu( QAction* );
182 void onSelectVectorButton();
186 #endif // SMESHGUI_REVOLUTIONDLG_H