1 // GEOM GEOMGUI : GUI for Geometry component
3 // Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : GeometryGUI_MultiRotationDlg.h
25 // Author : Damien COQUERET
29 #ifndef DIALOGBOX_MULTIROTATION_H
30 #define DIALOGBOX_MULTIROTATION_H
33 #include "SALOME_Selection.h"
34 #include "GEOM_ShapeTypeFilter.hxx"
35 #include "GEOM_EdgeFilter.hxx"
36 #include "GeometryGUI_SpinBox.h"
44 #include <qvalidator.h>
59 //=================================================================================
60 // class : GeometryGUI_MultiRotationDlg
62 //=================================================================================
63 class GeometryGUI_MultiRotationDlg : public QDialog
68 GeometryGUI_MultiRotationDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
69 ~GeometryGUI_MultiRotationDlg();
73 GEOM::GEOM_Gen_var myGeom ; /* Current Geom object */
74 GeometryGUI* myGeomGUI ; /* Current GeomGUI object */
75 TopoDS_Shape mySimulationTopoDs ; /* Shape used for simulation display */
76 SALOME_Selection* mySelection ; /* User shape selection */
78 GEOM::GEOM_Shape_var myGeomShape ; /* is myBase */
84 Standard_Real myStep ;
92 QLineEdit* myEditCurrentArgument; /* Current LineEdit */
93 int myConstructorId ; /* Current constructor id = radio button id */
94 Handle(GEOM_EdgeFilter) myEdgeFilter; /* Filter selection */
96 void closeEvent( QCloseEvent* e ) ;
97 void enterEvent( QEvent* e);
98 void Init( SALOME_Selection* Sel ) ;
99 void MakeMultiRotationSimulationAndDisplay() ;
101 QButtonGroup* GroupConstructors;
102 QRadioButton* Constructor1;
103 QRadioButton* Constructor2;
105 QGroupBox* GroupButtons;
106 QPushButton* buttonOk;
107 QPushButton* buttonCancel;
108 QPushButton* buttonApply;
111 QPushButton* SelectButtonC1A1;
112 QPushButton* SelectButtonC1A2;
113 QLabel* TextLabelC1A1;
114 QLabel* TextLabelC1A2;
115 QLabel* TextLabelC1A3;
116 QLineEdit* LineEditC1A1;
117 QLineEdit* LineEditC1A2;
118 QSpinBox* SpinBox_C1A3; /* int : Nb times */
121 QPushButton* SelectButtonC2A1;
122 QPushButton* SelectButtonC2A2;
123 QLabel* TextLabelC2A1;
124 QLabel* TextLabelC2A2;
125 QLabel* TextLabelC2A3;
126 QLabel* TextLabelC2A4;
127 QLabel* TextLabelC2A5;
128 QLabel* TextLabelC2A6;
130 QLineEdit* LineEditC2A1;
131 QLineEdit* LineEditC2A2;
132 GeometryGUI_SpinBox* SpinBox_C2A3 ; /* double : angle */
133 QSpinBox* SpinBox_C2A4; /* int : Nb times 1 */
134 GeometryGUI_SpinBox* SpinBox_C2A5 ; /* double : step value */
135 QSpinBox* SpinBox_C2A6; /* int : Nb times 2 */
137 QCheckBox* CheckBoxReverse;
141 void ConstructorsClicked(int constructorId);
143 void ClickOnCancel();
145 void SetEditCurrentArgument() ;
146 void SelectionIntoArgument() ;
147 void LineEditReturnPressed() ;
148 void DeactivateActiveDialog() ;
149 void ActivateThisDialog() ;
150 void ReverseAngle(int) ;
151 void ValueChangedInSpinBox( double newValue ) ; /* for GeometryGUI_SpinBox */
152 void ValueChangedInt( int newIntValue ) ; /* for QT spin box ! not const ! */
155 QGridLayout* GeometryGUI_MultiRotationDlgLayout;
156 QGridLayout* GroupConstructorsLayout;
157 QGridLayout* GroupButtonsLayout;
158 QGridLayout* GroupC1Layout;
159 QGridLayout* GroupC2Layout;
162 #endif // DIALOGBOX_MULTIROTATION_H