Salome HOME
NRI : First integration.
[modules/geom.git] / src / GEOMGUI / GeometryGUI_SectionDlg.h
1 //  File      : GeometryGUI_SectionDlg.h
2 //  Created   :
3 //  Author    : Lucien PIGNOLONI
4 //  Project   : SALOME
5 //  Module    : GeometryGUI
6 //  Copyright : OPEN CASCADE
7 //  $Header:
8
9 #ifndef DIALOGBOX_SECTION_H
10 #define DIALOGBOX_SECTION_H
11
12 #include "SALOME_Selection.h"
13 #include "GEOM_ShapeTypeFilter.hxx"
14
15 #include <BRepAlgoAPI_Section.hxx>
16
17 #include <qvariant.h>
18 #include <qdialog.h>
19
20 class QVBoxLayout; 
21 class QHBoxLayout; 
22 class QGridLayout; 
23 class QButtonGroup;
24 class QGroupBox;
25 class QLabel;
26 class QLineEdit;
27 class QPushButton;
28 class QRadioButton;
29 class GeometryGUI;
30
31
32 //=================================================================================
33 // class    : GeometryGUI_SectionDlg
34 // purpose  :
35 //=================================================================================
36 class GeometryGUI_SectionDlg : public QDialog{ 
37     Q_OBJECT
38
39 public:
40     GeometryGUI_SectionDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
41     ~GeometryGUI_SectionDlg();
42     
43 private:
44
45     void Init( SALOME_Selection* Sel ) ;
46     void closeEvent( QCloseEvent* e ) ;
47     void enterEvent ( QEvent * ) ;                /* mouse enter the QWidget */
48
49     GEOM::GEOM_Gen_var myGeom ;                /* Current GeomI object */
50     GeometryGUI*          myGeomGUI ;             /* Current GeomGUI object */
51     SALOME_Selection*     mySelection ;           /* User shape selection */
52     TopoDS_Shape          myShape1 ;              /* topology used to fuse */
53     TopoDS_Shape          myShape2 ;              /* topology used to fuse */
54     GEOM::GEOM_Shape_var        myGeomShape1 ;          /* is myShape1 */
55     GEOM::GEOM_Shape_var        myGeomShape2 ;          /* is myShape2 */
56     bool                  myOkShape1 ;
57     bool                  myOkShape2 ;            /* to check when arguments are defined */
58     int                   myConstructorId ;       /* Current constructor id = radio button id */
59     QLineEdit*            myEditCurrentArgument;  /* Current LineEdit */    
60
61
62     QButtonGroup* GroupConstructors;
63     QRadioButton* Constructor1;
64     QGroupBox* GroupConstructor1;
65     QLineEdit* LineEditC1A2Shape;
66     QLineEdit* LineEditC1A1Shape;
67     QPushButton* SelectButtonC1A1Shape;
68     QPushButton* SelectButtonC1A2Shape;
69     QLabel* TextLabelC1A2Shape;
70     QLabel* TextLabelC1A1Shape;
71     QGroupBox* GroupButtons;
72     QPushButton* buttonApply;
73     QPushButton* buttonOk;
74     QPushButton* buttonCancel;
75
76 private slots:
77
78     void ConstructorsClicked(int constructorId);
79     void ClickOnOk();
80     void ClickOnCancel();
81     void ClickOnApply();
82     void SetEditCurrentArgument() ;
83     void SelectionIntoArgument() ;
84     void LineEditReturnPressed() ;
85     void DeactivateActiveDialog() ;
86     void ActivateThisDialog() ;
87
88
89 protected:
90     QGridLayout* GeometryGUI_SectionDlgLayout;
91     QGridLayout* GroupConstructorsLayout;
92     QGridLayout* GroupConstructor1Layout;
93     QGridLayout* GroupButtonsLayout;
94 };
95
96 #endif // DIALOGBOX_SECTION_H