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_BoxDlg.h
25 // Author : Lucien PIGNOLONI
29 #ifndef DIALOGBOX_BOX_H
30 #define DIALOGBOX_BOX_H
32 #include "SALOME_Selection.h"
33 #include "GEOM_ShapeTypeFilter.hxx"
36 #include <BRepPrimAPI_MakeBox.hxx>
37 #include <Precision.hxx>
54 class GeometryGUI_SpinBox;
58 //=================================================================================
59 // class : GeometryGUI_BoxDlg
61 //=================================================================================
62 class GeometryGUI_BoxDlg : public QDialog
67 GeometryGUI_BoxDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
68 ~GeometryGUI_BoxDlg();
72 void closeEvent( QCloseEvent* e ) ;
73 void enterEvent( QEvent* e );
74 void Init(SALOME_Selection* Sel) ;
75 bool TestBoxDimensions( gp_Pnt P1, gp_Pnt P2 ) ;
77 GEOM::GEOM_Gen_var myGeom ; /* Current GeomI object */
78 GeometryGUI* myGeomGUI ; /* Current GeomGUI object */
79 TopoDS_Shape mySimulationTopoDs ; /* Shape used for simulation display */
80 SALOME_Selection* mySelection ; /* User shape selection */
81 gp_Pnt myPoint1 ; /* Points containing the vector */
83 bool myOkPoint1 ; /* true when myPoint is defined */
85 int myConstructorId ; /* Current constructor id = radio button id */
86 QLineEdit* myEditCurrentArgument; /* Current LineEdit */
87 Handle(GEOM_ShapeTypeFilter) myVertexFilter; /* filter for selection */
90 QButtonGroup* GroupConstructors;
91 QRadioButton* Constructor1;
92 QRadioButton* Constructor2;
94 QGroupBox* GroupButtons;
95 QPushButton* buttonApply;
96 QPushButton* buttonOk;
97 QPushButton* buttonCancel;
99 QGroupBox* GroupPoints;
100 QPushButton* SelectButtonPt1;
101 QPushButton* SelectButtonPt2;
102 QLineEdit* LineEditPt2;
103 QLineEdit* LineEditPt1;
104 QLabel* TextLabelPt1;
105 QLabel* TextLabelPt2;
107 QGroupBox* GroupDimensions ;
108 QLabel* TextLabel_DX ;
109 QLabel* TextLabel_DY ;
110 QLabel* TextLabel_DZ ;
112 GeometryGUI_SpinBox* SpinBox_DX ;
113 GeometryGUI_SpinBox* SpinBox_DY ;
114 GeometryGUI_SpinBox* SpinBox_DZ ;
118 void ConstructorsClicked(int constructorId);
120 void ClickOnCancel();
122 void SetEditCurrentArgument() ;
123 void SelectionIntoArgument() ;
124 void LineEditReturnPressed() ;
125 void DeactivateActiveDialog() ;
126 void ActivateThisDialog() ;
127 void ValueChangedInSpinBox( double newValue ) ;
131 QGridLayout* GeometryGUI_BoxDlgLayout;
132 QGridLayout* GroupConstructorsLayout;
133 QGridLayout* GroupButtonsLayout;
134 QGridLayout* GroupPointsLayout;
135 QGridLayout* GroupDimensionsLayout;
139 #endif // DIALOGBOX_BOX_H