1 // File : GeometryGUI_BoxDlg.h
3 // Author : Lucien PIGNOLONI
5 // Module : GeometryGUI
6 // Copyright : OPEN CASCADE
10 #ifndef DIALOGBOX_BOX_H
11 #define DIALOGBOX_BOX_H
13 #include "SALOME_Selection.h"
14 #include "GEOM_ShapeTypeFilter.hxx"
17 #include <BRepPrimAPI_MakeBox.hxx>
18 #include <Precision.hxx>
35 class GeometryGUI_SpinBox;
39 //=================================================================================
40 // class : GeometryGUI_BoxDlg
42 //=================================================================================
43 class GeometryGUI_BoxDlg : public QDialog
48 GeometryGUI_BoxDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
49 ~GeometryGUI_BoxDlg();
53 void closeEvent( QCloseEvent* e ) ;
54 void enterEvent( QEvent* e );
55 void Init(SALOME_Selection* Sel) ;
56 bool TestBoxDimensions( gp_Pnt P1, gp_Pnt P2 ) ;
58 GEOM::GEOM_Gen_var myGeom ; /* Current GeomI object */
59 GeometryGUI* myGeomGUI ; /* Current GeomGUI object */
60 TopoDS_Shape mySimulationTopoDs ; /* Shape used for simulation display */
61 SALOME_Selection* mySelection ; /* User shape selection */
62 gp_Pnt myPoint1 ; /* Points containing the vector */
64 bool myOkPoint1 ; /* true when myPoint is defined */
66 int myConstructorId ; /* Current constructor id = radio button id */
67 QLineEdit* myEditCurrentArgument; /* Current LineEdit */
68 Handle(GEOM_ShapeTypeFilter) myVertexFilter; /* filter for selection */
71 QButtonGroup* GroupConstructors;
72 QRadioButton* Constructor1;
73 QRadioButton* Constructor2;
75 QGroupBox* GroupButtons;
76 QPushButton* buttonApply;
77 QPushButton* buttonOk;
78 QPushButton* buttonCancel;
80 QGroupBox* GroupPoints;
81 QPushButton* SelectButtonPt1;
82 QPushButton* SelectButtonPt2;
83 QLineEdit* LineEditPt2;
84 QLineEdit* LineEditPt1;
88 QGroupBox* GroupDimensions ;
89 QLabel* TextLabel_DX ;
90 QLabel* TextLabel_DY ;
91 QLabel* TextLabel_DZ ;
93 GeometryGUI_SpinBox* SpinBox_DX ;
94 GeometryGUI_SpinBox* SpinBox_DY ;
95 GeometryGUI_SpinBox* SpinBox_DZ ;
99 void ConstructorsClicked(int constructorId);
101 void ClickOnCancel();
103 void SetEditCurrentArgument() ;
104 void SelectionIntoArgument() ;
105 void LineEditReturnPressed() ;
106 void DeactivateActiveDialog() ;
107 void ActivateThisDialog() ;
108 void ValueChangedInSpinBox( double newValue ) ;
112 QGridLayout* GeometryGUI_BoxDlgLayout;
113 QGridLayout* GroupConstructorsLayout;
114 QGridLayout* GroupButtonsLayout;
115 QGridLayout* GroupPointsLayout;
116 QGridLayout* GroupDimensionsLayout;
120 #endif // DIALOGBOX_BOX_H