1 // File : GeometryGUI_SubShapeDlg.h
3 // Author : Lucien PIGNOLONI
5 // Module : GeometryGUI
6 // Copyright : OPEN CASCADE
9 #ifndef DIALOGBOX_SUBSHAPE_H
10 #define DIALOGBOX_SUBSHAPE_H
12 #include "SALOME_Selection.h"
13 #include "GEOM_ShapeTypeFilter.hxx"
15 #include <AIS_InteractiveContext.hxx>
34 //=================================================================================
35 // class : GeometryGUI_SubShapeDlg
37 //=================================================================================
38 class GeometryGUI_SubShapeDlg : public QDialog
43 GeometryGUI_SubShapeDlg( QWidget* parent = 0,
45 SALOME_Selection* Sel = 0,
46 Handle (AIS_InteractiveContext) ic = 0,
50 ~GeometryGUI_SubShapeDlg();
54 void Init( SALOME_Selection* Sel, Handle (AIS_InteractiveContext) ic ) ;
55 void closeEvent( QCloseEvent* e ) ;
56 void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */
57 void ResetStateOfDialog() ;
59 unsigned int NumberOfSubShapes( const TopoDS_Shape& S, const int shapeType ) ;
62 /* Interactive and local context management see also : bool myUseLocalContext() */
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 ;
74 int myShapeType ; /* define a type of topology mode of sub selection */
76 bool myWithShape ; /* check if Shape item exists */
78 bool myOkSelectSubMode ; /* true = sub mode selection activated */
79 QLineEdit* myEditCurrentArgument; /* Current LineEdit */
80 int myConstructorId ; /* Current constructor id = radio button id */
81 bool myAbort ; /* Indicate if sub Shape All has been aborted by user */
83 QButtonGroup* GroupConstructors;
84 QRadioButton* Constructor1;
85 QGroupBox* GroupButtons;
86 QPushButton* buttonOk;
87 QPushButton* buttonCancel;
88 QPushButton* buttonApply;
90 QPushButton* SelectButtonC1A1;
91 QLineEdit* LineEditC1A1;
92 QLabel* TextLabelC1A1;
93 QLabel* TextLabelComboBox1;
100 void ConstructorsClicked(int constructorId);
102 void ClickOnCancel();
104 void LineEditReturnPressed() ;
105 void SetEditCurrentArgument() ;
106 void SelectionIntoArgument() ;
107 void DeactivateActiveDialog() ;
108 void ActivateThisDialog() ;
110 void ComboTextChanged() ;
113 QGridLayout* GeometryGUI_SubShapeDlgLayout;
114 QGridLayout* GroupConstructorsLayout;
115 QGridLayout* GroupButtonsLayout;
116 QGridLayout* GroupC1Layout;
119 #endif // DIALOGBOX_SUBSHAPE_H