Salome HOME
NRI : First integration.
[modules/geom.git] / src / GEOMGUI / GeometryGUI_MirrorDlg.h
1 //  File      : GeometryGUI_MirrorDlg.h
2 //  Created   :
3 //  Author    : Lucien PIGNOLONI
4 //  Project   : SALOME
5 //  Module    : GeometryGUI
6 //  Copyright : OPEN CASCADE
7 //  $Header$
8
9 #ifndef DIALOGBOX_MIRROR_H
10 #define DIALOGBOX_MIRROR_H
11
12 #include "SALOME_Selection.h"
13 #include "GEOM_FaceFilter.hxx"
14
15 #include <BRepBuilderAPI_Transform.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_MirrorDlg
34 // purpose  :
35 //=================================================================================
36 class GeometryGUI_MirrorDlg : public QDialog
37
38     Q_OBJECT
39
40 public:
41     GeometryGUI_MirrorDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
42     ~GeometryGUI_MirrorDlg();
43
44 private :
45
46     void closeEvent( QCloseEvent* e ) ;
47     void enterEvent( QEvent* e);                 /* Mouse enter the QWidget */
48     void Init( SALOME_Selection* Sel ) ;
49     void MakeMirrorSimulationAndDisplay( const TopoDS_Shape& S1, const TopoDS_Shape& S2 ) ;
50
51     GEOM::GEOM_Gen_var myGeom ;                /* Current GeomI object */
52     GeometryGUI*          myGeomGUI ;             /* Current GeomGUI object */
53     SALOME_Selection*     mySelection ;           /* User shape selection */
54     TopoDS_Shape          myShape1 ;              /* topology used */
55     TopoDS_Shape          myShape2 ;              /* topology used */
56     GEOM::GEOM_Shape_var        myGeomShape1 ;          /* is myShape1 */
57     GEOM::GEOM_Shape_var        myGeomShape2 ;          /* is myShape2 */
58     TopoDS_Shape          mySimulationTopoDs;     /* Shape used for simulation display */    
59     bool                  myOkShape1 ;
60     bool                  myOkShape2 ;            /* to check when arguments are defined */
61     int                   myConstructorId ;       /* Current constructor id = radio button id */
62     QLineEdit*            myEditCurrentArgument;  /* Current LineEdit */    
63     Handle(GEOM_FaceFilter) myFaceFilter;    /* To filter selections */
64
65     QGroupBox* GroupButtons;
66     QPushButton* buttonApply;
67     QPushButton* buttonOk;
68     QPushButton* buttonCancel;
69     QButtonGroup* GroupConstructors;
70     QRadioButton* Constructor1;
71     QGroupBox* GroupC1;
72     QLabel* TextLabelC1A1;
73     QLabel* TextLabelC1A2;
74     QPushButton* SelectButtonC1A1;
75     QPushButton* SelectButtonC1A2;
76     QLineEdit* LineEditC1A1;
77     QLineEdit* LineEditC1A2;
78
79 private slots :
80
81     void ConstructorsClicked(int constructorId);
82     void ClickOnOk();
83     void ClickOnCancel();
84     void ClickOnApply();
85     void SetEditCurrentArgument() ;
86     void SelectionIntoArgument() ;
87     void LineEditReturnPressed() ;
88     void DeactivateActiveDialog() ;
89     void ActivateThisDialog() ;
90
91 protected:
92     QGridLayout* GeometryGUI_MirrorDlgLayout;
93     QGridLayout* GroupButtonsLayout;
94     QGridLayout* GroupConstructorsLayout;
95     QGridLayout* GroupC1Layout;
96 };
97
98 #endif // DIALOGBOX_MIRROR_H