1 // File : GeometryGUI_ChamferDlg.h
3 // Author : Damien COQUERET
6 // Copyright : OPEN CASCADE 2002
9 #ifndef DIALOGBOX_CHAMFER_H
10 #define DIALOGBOX_CHAMFER_H
12 #include "SALOME_Selection.h"
13 #include "GEOM_ShapeTypeFilter.hxx"
14 #include "GeometryGUI_SpinBox.h"
19 #include <qvalidator.h>
21 // Open CASCADE Includes
22 #include <AIS_InteractiveContext.hxx>
37 //=================================================================================
38 // class : GeometryGUI_ChamferDlg
40 //=================================================================================
41 class GeometryGUI_ChamferDlg : public QDialog
46 GeometryGUI_ChamferDlg( QWidget* parent = 0,
48 SALOME_Selection* Sel = 0,
49 Handle (AIS_InteractiveContext) ic = 0,
53 ~GeometryGUI_ChamferDlg();
57 void Init( SALOME_Selection* Sel, Handle (AIS_InteractiveContext) ic ) ;
58 void closeEvent( QCloseEvent* e ) ;
59 void enterEvent( QEvent* e);
60 void ResetStateOfDialog() ;
62 /* Interactive and local context management see also : bool myUseLocalContext() */
63 Handle (AIS_InteractiveContext) myIC ; /* Interactive context */
64 Standard_Integer myLocalContextId ; /* identify a local context used by this method */
65 bool myUseLocalContext ; /* true when this method as opened a local context */
67 QDoubleValidator *myVa ; /* Double validator for numeric input */
68 QDoubleValidator *myVb ; /* Double validator for numeric input */
70 GEOM::GEOM_Gen_var myGeom ; /* Current Geom object */
71 GeometryGUI* myGeomGUI ; /* Current GeomGUI object */
72 SALOME_Selection* mySelection ; /* User shape selection */
74 TopoDS_Shape myShape ;
78 QLineEdit* myEditCurrentArgument; /* Current LineEdit */
79 int myConstructorId ; /* Current constructor id = radio button id */
82 TopoDS_Shape mySimulationTopoDs ; /* Shape used for simulation display */
90 QButtonGroup* GroupConstructors;
92 QRadioButton* Constructor1;
93 QRadioButton* Constructor2;
94 QRadioButton* Constructor3;
96 QGroupBox* GroupButtons;
97 QPushButton* buttonOk;
98 QPushButton* buttonCancel;
99 QPushButton* buttonApply;
102 QPushButton* SelectButtonC1A1;
103 QLineEdit* LineEditC1A1;
104 QLabel* TextLabelC1A1;
105 GeometryGUI_SpinBox* SpinBox_C1A2 ;
106 QLabel* TextLabelC1A2;
107 GeometryGUI_SpinBox* SpinBox_C1A3 ;
108 QLabel* TextLabelC1A3;
111 QPushButton* SelectButtonC2A1;
112 QLineEdit* LineEditC2A1;
113 QLabel* TextLabelC2A1;
114 GeometryGUI_SpinBox* SpinBox_C2A2 ;
115 QLabel* TextLabelC2A2;
116 GeometryGUI_SpinBox* SpinBox_C2A3;
117 QLabel* TextLabelC2A3;
120 QPushButton* SelectButtonC3A1;
121 QLineEdit* LineEditC3A1;
122 QLabel* TextLabelC3A1;
123 GeometryGUI_SpinBox* SpinBox_C3A2 ;
124 QLabel* TextLabelC3A2;
125 GeometryGUI_SpinBox* SpinBox_C3A3;
126 QLabel* TextLabelC3A3;
130 void ConstructorsClicked(int constructorId);
132 void ClickOnCancel();
134 void SetEditCurrentArgument() ;
135 void SelectionIntoArgument() ;
136 void LineEditReturnPressed() ;
137 void DeactivateActiveDialog() ;
138 void ActivateThisDialog() ;
139 void ValueChangedInSpinBox( double newValue ) ;
143 QGridLayout* GeometryGUI_ChamferDlgLayout;
144 QGridLayout* GroupButtonsLayout;
145 QGridLayout* GroupConstructorsLayout;
146 QGridLayout* GroupC1Layout;
147 QGridLayout* GroupC2Layout;
148 QGridLayout* GroupC3Layout;
151 #endif // DIALOGBOX_CHAMFER_H