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_ChamferDlg.h
25 // Author : Damien COQUERET
29 #ifndef DIALOGBOX_CHAMFER_H
30 #define DIALOGBOX_CHAMFER_H
32 #include "SALOME_Selection.h"
33 #include "GEOM_ShapeTypeFilter.hxx"
34 #include "GeometryGUI_SpinBox.h"
39 #include <qvalidator.h>
41 // Open CASCADE Includes
42 #include <AIS_InteractiveContext.hxx>
57 //=================================================================================
58 // class : GeometryGUI_ChamferDlg
60 //=================================================================================
61 class GeometryGUI_ChamferDlg : public QDialog
66 GeometryGUI_ChamferDlg( QWidget* parent = 0,
68 SALOME_Selection* Sel = 0,
69 Handle (AIS_InteractiveContext) ic = 0,
73 ~GeometryGUI_ChamferDlg();
77 void Init( SALOME_Selection* Sel, Handle (AIS_InteractiveContext) ic ) ;
78 void closeEvent( QCloseEvent* e ) ;
79 void enterEvent( QEvent* e);
80 void ResetStateOfDialog() ;
82 /* Interactive and local context management see also : bool myUseLocalContext() */
83 Handle (AIS_InteractiveContext) myIC ; /* Interactive context */
84 Standard_Integer myLocalContextId ; /* identify a local context used by this method */
85 bool myUseLocalContext ; /* true when this method as opened a local context */
87 QDoubleValidator *myVa ; /* Double validator for numeric input */
88 QDoubleValidator *myVb ; /* Double validator for numeric input */
90 GEOM::GEOM_Gen_var myGeom ; /* Current Geom object */
91 GeometryGUI* myGeomGUI ; /* Current GeomGUI object */
92 SALOME_Selection* mySelection ; /* User shape selection */
94 TopoDS_Shape myShape ;
98 QLineEdit* myEditCurrentArgument; /* Current LineEdit */
99 int myConstructorId ; /* Current constructor id = radio button id */
102 TopoDS_Shape mySimulationTopoDs ; /* Shape used for simulation display */
110 QButtonGroup* GroupConstructors;
112 QRadioButton* Constructor1;
113 QRadioButton* Constructor2;
114 QRadioButton* Constructor3;
116 QGroupBox* GroupButtons;
117 QPushButton* buttonOk;
118 QPushButton* buttonCancel;
119 QPushButton* buttonApply;
122 QPushButton* SelectButtonC1A1;
123 QLineEdit* LineEditC1A1;
124 QLabel* TextLabelC1A1;
125 GeometryGUI_SpinBox* SpinBox_C1A2 ;
126 QLabel* TextLabelC1A2;
127 GeometryGUI_SpinBox* SpinBox_C1A3 ;
128 QLabel* TextLabelC1A3;
131 QPushButton* SelectButtonC2A1;
132 QLineEdit* LineEditC2A1;
133 QLabel* TextLabelC2A1;
134 GeometryGUI_SpinBox* SpinBox_C2A2 ;
135 QLabel* TextLabelC2A2;
136 GeometryGUI_SpinBox* SpinBox_C2A3;
137 QLabel* TextLabelC2A3;
140 QPushButton* SelectButtonC3A1;
141 QLineEdit* LineEditC3A1;
142 QLabel* TextLabelC3A1;
143 GeometryGUI_SpinBox* SpinBox_C3A2 ;
144 QLabel* TextLabelC3A2;
145 GeometryGUI_SpinBox* SpinBox_C3A3;
146 QLabel* TextLabelC3A3;
150 void ConstructorsClicked(int constructorId);
152 void ClickOnCancel();
154 void SetEditCurrentArgument() ;
155 void SelectionIntoArgument() ;
156 void LineEditReturnPressed() ;
157 void DeactivateActiveDialog() ;
158 void ActivateThisDialog() ;
159 void ValueChangedInSpinBox( double newValue ) ;
163 QGridLayout* GeometryGUI_ChamferDlgLayout;
164 QGridLayout* GroupButtonsLayout;
165 QGridLayout* GroupConstructorsLayout;
166 QGridLayout* GroupC1Layout;
167 QGridLayout* GroupC2Layout;
168 QGridLayout* GroupC3Layout;
171 #endif // DIALOGBOX_CHAMFER_H