1 // Copyright (C) 2007-2012 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"
32 #include "SMESHGUI_PreviewDlg.h"
34 // SALOME GUI includes
35 #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 SMESHGUI_PreviewDlg
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_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;
129 QLabel* TextLabelPoint;
130 QPushButton* SelectPointButton;
132 SMESHGUI_SpinBox* SpinBox_X;
134 SMESHGUI_SpinBox* SpinBox_Y;
136 SMESHGUI_SpinBox* SpinBox_Z;
137 QLabel* TextLabelVector;
138 QPushButton* SelectVectorButton;
140 SMESHGUI_SpinBox* SpinBox_DX;
142 SMESHGUI_SpinBox* SpinBox_DY;
144 SMESHGUI_SpinBox* SpinBox_DZ;
146 QLabel* TextLabelAngle;
147 SMESHGUI_SpinBox* SpinBox_Angle;
148 QLabel* TextLabelNbSteps;
149 SalomeApp_IntSpinBox* SpinBox_NbSteps;
150 QLabel* TextLabelTolerance;
151 SMESHGUI_SpinBox* SpinBox_Tolerance;
153 QMenu* SelectVectorMenu;
154 QMap<QAction*,int> myMenuActions;
155 int myVectorDefinition;
158 QString myHelpFileName;
161 QPushButton* myFilterBtn;
162 SMESHGUI_FilterDlg* myFilterDlg;
165 virtual void onDisplaySimulation( bool );
168 void ConstructorsClicked( int );
170 void ClickOnCancel();
173 void SetEditCurrentArgument();
174 void SelectionIntoArgument();
175 void DeactivateActiveDialog();
176 void ActivateThisDialog();
177 void onTextChange( const QString& );
178 void onAngleTextChange( const QString& );
179 void onSelectMesh( bool );
180 void onVectorChanged();
181 void onSelectVectorMenu( QAction* );
182 void onSelectVectorButton();
186 #endif // SMESHGUI_REVOLUTIONDLG_H