1 // File : GeometryGUI_SuppressHoleDlg.h
3 // Author : Lucien PIGNOLONI
5 // Module : GeometryGUI
6 // Copyright : OPEN CASCADE
9 #ifndef GEOMETRYGUI_SUPPRESSHOLE_H
10 #define GEOMETRYGUI_SUPPRESSHOLE_H
12 #include "SALOME_Selection.h"
13 #include "GEOM_ShapeTypeFilter.hxx"
18 #include <AIS_InteractiveContext.hxx>
32 //=================================================================================
33 // class : GeometryGUI_SuppressHoleDlg
35 //=================================================================================
36 class GeometryGUI_SuppressHoleDlg : public QDialog
41 GeometryGUI_SuppressHoleDlg( QWidget* parent = 0,
43 SALOME_Selection* Sel = 0,
44 Handle (AIS_InteractiveContext) ic = 0,
48 ~GeometryGUI_SuppressHoleDlg();
52 void Init( SALOME_Selection* Sel, Handle (AIS_InteractiveContext) ic ) ;
53 void closeEvent( QCloseEvent* e ) ;
54 void enterEvent ( QEvent * ) ; /* Mouse enter the QWidget (to reactivate it) */
56 void ResetStateOfDialog() ;
59 /* Return the face selected by user from the main shape and index in a ListOfSub */
60 TopoDS_Shape FaceFromList( const TopoDS_Shape& aShape,
61 const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfSub ) ;
63 Handle (AIS_InteractiveContext) myIC ; /* Interactive context */
64 Standard_Integer myLocalContextId ; /* identify a local context used by this method */
65 bool myUseLocalContext ; /* true when this method as opened a local context */
67 GEOM::GEOM_Gen_var myGeom ; /* Current Geom object */
68 GeometryGUI* myGeomGUI ; /* Current GeomGUI object */
69 SALOME_Selection* mySelection ; /* User shape selection */
71 TopoDS_Shape myShape ; /* Main shape selected */
72 TopoDS_Shape myFace ; /* Face selected */
77 bool myOkSelectFace ; /* true = sub mode GEOM::FACE selection done */
78 bool myOkSelectWire ; /* true = sub mode GEOM::WIRE selection done (first wire) */
80 GEOM::GEOM_Shape::ListOfSubShapeID_var myListOfIdFace ; /* After selection contains index of face into myShape */
81 GEOM::GEOM_Shape::ListOfSubShapeID_var myListOfIdWire ; /* After selection contains index of wire into myFace */
82 GEOM::GEOM_Shape::ListOfSubShapeID_var myListOfIdEndFace ; /* After selection contains index of end face into myShape */
84 QLineEdit* myEditCurrentArgument; /* Current LineEdit */
85 int myConstructorId ; /* Current constructor id = radio button id */
87 QButtonGroup* GroupConstructors;
88 QRadioButton* Constructor1;
89 QGroupBox* GroupButtons;
90 QPushButton* buttonOk;
91 QPushButton* buttonApply;
92 QPushButton* buttonClose;
94 QLabel* TextLabelC1A1;
95 QPushButton* SelectButtonC1A1;
96 QLineEdit* LineEditC1A1;
101 /* Second constructor */
102 QRadioButton* Constructor2;
104 QLabel* TextLabelC2A1;
105 QPushButton* SelectButtonC2A1;
106 QLineEdit* LineEditC2A1;
107 QCheckBox* CheckBoxC2_1;
112 void ConstructorsClicked(int constructorId);
114 void ClickOnApply() ;
117 void LineEditReturnPressed() ;
118 void SetEditCurrentArgument() ;
119 void SelectionIntoArgument() ;
120 void DeactivateActiveDialog() ;
121 void ActivateThisDialog() ;
122 void ActivateUserFaceSelection() ;
123 void ActivateUserWireSelection() ;
124 void ActivateUserEndFaceSelection() ;
126 /* For the second constructor */
127 void ActivateUserWiresOnFaceShellSelection() ;
132 QGridLayout* GeometryGUI_SuppressHoleLayout;
133 QGridLayout* GroupConstructorsLayout;
134 QHBoxLayout* GroupButtonsLayout;
135 QGridLayout* GroupC1Layout;
136 QHBoxLayout* Layout2;
138 QGridLayout* GroupC2Layout;
139 QHBoxLayout* Layout3;
142 #endif // GEOMETRYGUI_SUPPRESSHOLE_H