1 // File : GeometryGUI_PlaneDlg.h
3 // Author : Lucien PIGNOLONI
5 // Module : GeometryGUI
6 // Copyright : OPEN CASCADE
10 #ifndef DIALOGBOX_PLANE_H
11 #define DIALOGBOX_PLANE_H
13 #include "SALOME_Selection.h"
14 #include "GEOM_ShapeTypeFilter.hxx"
15 #include "GEOM_FaceFilter.hxx"
16 #include "GeometryGUI_SpinBox.h"
18 #include <BRepBuilderAPI_MakeFace.hxx>
37 //=================================================================================
38 // class : GeometryGUI_PlaneDlg
40 //=================================================================================
41 class GeometryGUI_PlaneDlg : public QDialog
46 GeometryGUI_PlaneDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
47 ~GeometryGUI_PlaneDlg();
51 void Init( SALOME_Selection* Sel ) ;
52 void closeEvent( QCloseEvent* e ) ;
53 void enterEvent( QEvent* e);
55 GEOM::GEOM_Gen_var myGeom ; /* Current Geom object */
56 GeometryGUI* myGeomGUI ; /* Current GeomGUI object */
57 TopoDS_Shape mySimulationTopoDs; /* Shape used for simulation display */
58 SALOME_Selection* mySelection ; /* User shape selection */
59 gp_Pnt myPoint1 ; /* Point on the plane */
64 Standard_Real myTrimSize ;
66 bool myOkPoint1 ; /* true when argument is defined */
68 bool myOkCoordinates ;
70 QLineEdit* myEditCurrentArgument; /* Current LineEdit */
71 int myConstructorId ; /* Current constructor id = radio button id */
73 Handle(GEOM_ShapeTypeFilter) myVertexFilter; /* Filters selection */
74 Handle(GEOM_ShapeTypeFilter) myEdgeFilter; /* Filters selection */
75 Handle(GEOM_FaceFilter) myFaceFilter; /* Filters selection */
78 QButtonGroup* GroupConstructors;
79 QRadioButton* Constructor1;
80 QRadioButton* Constructor2;
81 QRadioButton* Constructor3;
83 // Constructor with a point + direction (vector)
84 QGroupBox* GroupPointDirection;
87 QPushButton* SelectButtonPt1;
88 QLineEdit* LineEditPt1;
90 QLabel* TextLabelDirection;
91 QPushButton* SelectButtonDirection;
92 QLineEdit* LineEditDirection;
94 QLabel* TextLabelC1Size;
95 GeometryGUI_SpinBox* SpinBox_C1Size ;
97 // Constructor with a point + dx, dy, dz coordinates
98 QGroupBox* GroupPointPlusCoordinates;
100 QLabel* TextLabelPt2;
101 QPushButton* SelectButtonPt2;
102 QLineEdit* LineEditPt2;
104 QLabel* TextLabelCoordinates;
105 QLabel* TextLabel_DX;
106 QLabel* TextLabel_DY;
107 QLabel* TextLabel_DZ;
108 GeometryGUI_SpinBox* SpinBox_DX ;
109 GeometryGUI_SpinBox* SpinBox_DY ;
110 GeometryGUI_SpinBox* SpinBox_DZ ;
112 QLabel* TextLabelC2Size;
113 GeometryGUI_SpinBox* SpinBox_C2Size ;
115 // Constructor with a face
116 QGroupBox* GroupFace;
118 QLabel* TextLabelFace;
119 QPushButton* SelectButtonFace;
120 QLineEdit* LineEditFace;
122 QLabel* TextLabelC3Size;
123 GeometryGUI_SpinBox* SpinBox_C3Size ;
126 QGroupBox* GroupButtons;
127 QPushButton* buttonApply;
128 QPushButton* buttonOk;
129 QPushButton* buttonCancel;
133 void ConstructorsClicked(int constructorId);
135 void ClickOnCancel();
137 void SetEditCurrentArgument() ;
138 void SelectionIntoArgument() ;
139 void LineEditReturnPressed() ;
140 void DeactivateActiveDialog() ;
141 void ActivateThisDialog() ;
142 void MakePlaneSimulationAndDisplay( const gp_Pnt& P,
143 const Standard_Real dx,
144 const Standard_Real dy,
145 const Standard_Real dz,
146 const Standard_Real trimSize ) ;
147 void ValueChangedInSpinBox( double newValue ) ;
151 QGridLayout* GeometryGUI_PlaneDlgLayout;
152 QGridLayout* GroupButtonsLayout;
153 QGridLayout* GroupPointDirectionLayout;
154 QGridLayout* GroupConstructorsLayout;
155 QGridLayout* GroupPointPlusCoordinatesLayout;
156 QGridLayout* GroupFaceLayout;
157 QHBoxLayout* Layout2 ;
160 #endif // DIALOGBOX_PLANE_H