1 // File : GeometryGUI_CommonDlg.h
3 // Author : Lucien PIGNOLONI
5 // Module : GeometryGUI
6 // Copyright : OPEN CASCADE
10 #ifndef DIALOGBOX_COMMON_H
11 #define DIALOGBOX_COMMON_H
13 #include "SALOME_Selection.h"
14 #include "GEOM_ShapeTypeFilter.hxx"
16 #include <BRepAlgoAPI_Common.hxx>
34 //=================================================================================
35 // class : GeometryGUI_CommonDlg
37 //=================================================================================
38 class GeometryGUI_CommonDlg : public QDialog
43 GeometryGUI_CommonDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
44 ~GeometryGUI_CommonDlg();
48 void Init( SALOME_Selection* Sel ) ;
49 void closeEvent( QCloseEvent* e ) ;
50 void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */
52 GEOM::GEOM_Gen_var myGeom ; /* Current GeomI object */
53 GeometryGUI* myGeomGUI ; /* Current GeomGUI object */
54 SALOME_Selection* mySelection ; /* User shape selection */
55 TopoDS_Shape myShape1 ; /* topology used */
56 TopoDS_Shape myShape2 ; /* topology used */
57 GEOM::GEOM_Shape_var myGeomShape1 ; /* is myShape1 */
58 GEOM::GEOM_Shape_var myGeomShape2 ; /* is myShape2 */
60 bool myOkShape2 ; /* to check when arguments are defined */
61 int myConstructorId ; /* Current constructor id = radio button id */
62 QLineEdit* myEditCurrentArgument; /* Current LineEdit */
65 QButtonGroup* GroupConstructors;
66 QRadioButton* Constructor1;
68 QGroupBox* GroupConstructor1;
69 QLineEdit* LineEditC1A1Shape;
70 QLineEdit* LineEditC1A2Shape;
71 QPushButton* SelectButtonC1A1Shape;
72 QPushButton* SelectButtonC1A2Shape;
73 QLabel* TextLabelC1A2Shape;
74 QLabel* TextLabelC1A1Shape;
76 QGroupBox* GroupButtons;
77 QPushButton* buttonApply;
78 QPushButton* buttonOk;
79 QPushButton* buttonCancel;
83 void ConstructorsClicked(int constructorId);
87 void SetEditCurrentArgument() ;
88 void SelectionIntoArgument() ;
89 void LineEditReturnPressed() ;
90 void DeactivateActiveDialog() ;
91 void ActivateThisDialog() ;
94 QGridLayout* GeometryGUI_CommonDlgLayout;
95 QGridLayout* GroupConstructorsLayout;
96 QGridLayout* GroupButtonsLayout;
97 QGridLayout* GroupConstructor1Layout;
100 #endif // DIALOGBOX_COMMON_H