1 // File : GeometryGUI_PrismDlg.h
3 // Author : Lucien PIGNOLONI
5 // Module : GeometryGUI
6 // Copyright : OPEN CASCADE
10 #ifndef DIALOGBOX_PRISM_H
11 #define DIALOGBOX_PRISM_H
13 #include "SALOME_Selection.h"
14 #include "GEOM_ShapeTypeFilter.hxx"
15 #include "GeometryGUI_SpinBox.h"
17 #include <BRepPrimAPI_MakePrism.hxx>
35 //=================================================================================
36 // class : GeometryGUI_PrismDlg
38 //=================================================================================
39 class GeometryGUI_PrismDlg : public QDialog
44 GeometryGUI_PrismDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
45 ~GeometryGUI_PrismDlg();
49 void Init( SALOME_Selection* Sel ) ;
50 void closeEvent( QCloseEvent* e ) ;
51 void enterEvent( QEvent* e);
52 void MakePrismSimulationAndDisplay( const TopoDS_Shape& S) ;
54 GEOM::GEOM_Gen_var myGeom ; /* Current Geom object */
55 GeometryGUI* myGeomGUI ; /* Current GeomGUI object */
56 TopoDS_Shape mySimulationTopoDs; /* Shape used for simulation display */
57 SALOME_Selection* mySelection ; /* User shape selection */
61 Standard_Real myHeight ; /* Height used for prism (extrusion) */
62 TopoDS_Shape myBaseTopo ; /* topology used as base of prism */
63 GEOM::GEOM_Shape_var myGeomShape ; /* that is myBaseTopo */
65 bool myOkLine ; /* to check when arguments myDx, myDy, myDz are defined */
66 QLineEdit* myEditCurrentArgument; /* Current LineEdit */
67 int myConstructorId ; /* Current constructor id = radio button id */
68 Handle(GEOM_ShapeTypeFilter) myEdgeFilter; /* Filters selection */
70 QButtonGroup* GroupConstructors;
71 QRadioButton* Constructor1;
72 QGroupBox* GroupConstructor1;
74 QLineEdit* LineEditC1A1Base;
75 QLineEdit* LineEditC1A2Line;
76 QPushButton* SelectButtonC1A1Base;
77 QPushButton* SelectButtonC1A2Line;
78 QLabel* TextLabelBase;
79 QLabel* TextLabelVector;
80 GeometryGUI_SpinBox* SpinBox_C1A3Height;
81 QCheckBox* CheckBoxC3A1Reverse;
82 QLabel* TextLabelHeight;
84 QGroupBox* GroupButtons;
85 QPushButton* buttonApply;
86 QPushButton* buttonOk;
87 QPushButton* buttonCancel;
91 void ConstructorsClicked(int constructorId);
95 void SetEditCurrentArgument() ;
96 void SelectionIntoArgument() ;
97 void LineEditReturnPressed() ;
98 void DeactivateActiveDialog() ;
99 void ActivateThisDialog() ;
100 void ReverseVector(int state) ;
101 void ValueChangedInSpinBox( double newValue ) ;
104 QGridLayout* GeometryGUI_PrismDlgLayout;
105 QGridLayout* GroupConstructorsLayout;
106 QGridLayout* GroupConstructor1Layout;
107 QGridLayout* GroupButtonsLayout;
110 #endif // DIALOGBOX_PRISM_H