1 // File : GeometryGUI_VectorDlg.h
3 // Author : Lucien PIGNOLONI
5 // Module : GeometryGUI
6 // Copyright : OPEN CASCADE
10 #ifndef DIALOGBOX_VECTOR_H
11 #define DIALOGBOX_VECTOR_H
13 #include "SALOME_Selection.h"
14 #include "GEOM_ShapeTypeFilter.hxx"
15 #include "GeometryGUI_SpinBox.h"
18 #include <TopoDS_Shape.hxx>
19 #include <TopoDS_Compound.hxx>
20 #include <BRepBuilderAPI_MakeEdge.hxx>
21 #include <BRep_Builder.hxx>
22 #include <Precision.hxx>
42 //=================================================================================
43 // class : GeometryGUI_VectorDlg
45 //=================================================================================
46 class GeometryGUI_VectorDlg : public QDialog
51 GeometryGUI_VectorDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
52 ~GeometryGUI_VectorDlg();
54 bool AddArrowToSimulation( TopoDS_Shape& modifiedShape ) ;
58 void closeEvent( QCloseEvent* e ) ;
59 void enterEvent( QEvent* e);
60 void Init( SALOME_Selection* Sel ) ; /* mouse enter the QWidget */
62 GEOM::GEOM_Gen_var myGeom ; /* Current Geom object */
63 GeometryGUI* myGeomGUI ; /* Current GeomGUI object */
64 TopoDS_Shape mySimulationTopoDs; /* Shape used for simulation display */
65 SALOME_Selection* mySelection ; /* User shape selection */
66 gp_Pnt myPoint1 ; /* Points containing the vector */
71 bool myOkPoint1 ; /* Are true when myPoint is defined */
73 QWidget* myEditCurrentArgument; /* Current LineEdit or Spin box */
74 int myConstructorId ; /* Current constructor id = radio button id */
75 Handle(GEOM_ShapeTypeFilter) myVertexFilter; /* Filter selection */
76 Handle(GEOM_ShapeTypeFilter) myEdgeFilter; /* Filter selection */
78 QGroupBox* GroupPoints;
79 QPushButton* SelectButtonPt1;
80 QPushButton* SelectButtonPt2;
84 QButtonGroup* GroupConstructors;
85 QRadioButton* Constructor2;
86 QRadioButton* Constructor1;
88 QGroupBox* GroupButtons;
89 QPushButton* buttonApply;
90 QPushButton* buttonOk;
91 QPushButton* buttonCancel;
93 QLineEdit* LineEditPt1;
94 QLineEdit* LineEditPt2;
96 QGroupBox* GroupCoordinates;
98 GeometryGUI_SpinBox* SpinBox_DX ;
99 GeometryGUI_SpinBox* SpinBox_DY ;
100 GeometryGUI_SpinBox* SpinBox_DZ ;
101 QLabel* TextLabel_DZ;
102 QLabel* TextLabel_DX;
103 QLabel* TextLabel_DY;
105 QCheckBox* CheckBoxReverseVector;
109 void ConstructorsClicked(int constructorId);
111 void ClickOnCancel();
113 void SetEditCurrentArgument() ;
114 void SelectionIntoArgument() ;
115 void LineEditReturnPressed() ;
116 void DeactivateActiveDialog() ;
117 void ActivateThisDialog() ;
118 void ReverseVector(int state) ;
119 void ValueChangedInSpinBox( double newValue ) ;
123 QGridLayout* GeometryGUI_VectorDlgLayout;
124 QGridLayout* GroupPointsLayout;
125 QGridLayout* GroupButtonsLayout;
126 QGridLayout* GroupConstructorsLayout;
127 QGridLayout* GroupCoordinatesLayout;
131 #endif // DIALOGBOX_VECTOR_H