1 // Copyright (C) 2007-2013 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();
78 enum {NONE_SELECT, POINT_SELECT, FACE_SELECT};
80 void Init( bool = true);
81 void enterEvent( QEvent* ); /* mouse enter the QWidget */
82 void keyPressEvent( QKeyEvent* );
83 int GetConstructorId();
88 SMESHGUI_IdValidator* myIdValidator;
89 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
90 int myNbOkElements; /* to check when elements are defined */
92 QWidget* myEditCurrentArgument; /* Current argument */
93 SVTK_Selector* mySelector;
94 Handle(SALOME_InteractiveObject) myIO;
96 SMESH::SMESH_IDSource_var mySelectedObject;
99 SMESH::SMESH_Mesh_var myMesh;
100 SMESH_Actor* myActor;
101 SMESH_LogicalFilter* myMeshOrSubMeshOrGroupFilter;
102 SMESHGUI_MeshEditPreview* mySimulation;
103 SALOME_Actor* myPreviewActor;
105 QGroupBox* ConstructorsBox;
106 QButtonGroup* GroupConstructors;
107 QRadioButton* RadioButton1;
108 QRadioButton* RadioButton2;
109 QGroupBox* GroupButtons;
110 QPushButton* buttonOk;
111 QPushButton* buttonCancel;
112 QPushButton* buttonApply;
113 QPushButton* buttonHelp;
114 QGroupBox* GroupArguments;
115 QGroupBox* GroupAxis;
116 QLabel* TextLabelElements;
117 QPushButton* SelectElementsButton;
118 QLineEdit* LineEditElements;
119 QCheckBox* CheckBoxMesh;
120 QCheckBox* MakeGroupsCheck;
121 QGroupBox* GroupAngleBox;
122 QButtonGroup* GroupAngle;
123 QRadioButton* RadioButton3;
124 QRadioButton* RadioButton4;
126 QLabel* TextLabelPoint;
127 QPushButton* SelectPointButton;
129 SMESHGUI_SpinBox* SpinBox_X;
131 SMESHGUI_SpinBox* SpinBox_Y;
133 SMESHGUI_SpinBox* SpinBox_Z;
134 QLabel* TextLabelVector;
135 QPushButton* SelectVectorButton;
137 SMESHGUI_SpinBox* SpinBox_DX;
139 SMESHGUI_SpinBox* SpinBox_DY;
141 SMESHGUI_SpinBox* SpinBox_DZ;
143 QLabel* TextLabelAngle;
144 SMESHGUI_SpinBox* SpinBox_Angle;
145 QLabel* TextLabelNbSteps;
146 SalomeApp_IntSpinBox* SpinBox_NbSteps;
147 QLabel* TextLabelTolerance;
148 SMESHGUI_SpinBox* SpinBox_Tolerance;
150 QMenu* SelectVectorMenu;
151 QMap<QAction*,int> myMenuActions;
152 int myVectorDefinition;
155 QString myHelpFileName;
158 QPushButton* myFilterBtn;
159 SMESHGUI_FilterDlg* myFilterDlg;
162 virtual void onDisplaySimulation( bool );
163 virtual void reject();
166 void ConstructorsClicked( int );
170 void SetEditCurrentArgument();
171 void SelectionIntoArgument();
172 void DeactivateActiveDialog();
173 void ActivateThisDialog();
174 void onTextChange( const QString& );
175 void onAngleTextChange( const QString& );
176 void onSelectMesh( bool );
177 void onVectorChanged();
178 void onSelectVectorMenu( QAction* );
179 void onSelectVectorButton();
183 #endif // SMESHGUI_REVOLUTIONDLG_H