Salome HOME
b372f4a5dd0b852437624d2dd8b9e7af30ca21d7
[modules/geom.git] / src / GEOMGUI / GeometryGUI_CircleDlg.h
1 //  File      : GeometryGUI_CircleDlg.h
2 //  Created   :
3 //  Author    : Lucien PIGNOLONI
4 //  Project   : SALOME
5 //  Module    : GeometryGUI
6 //  Copyright : OPEN CASCADE
7 //  $Header$
8
9 #ifndef DIALOGBOX_CIRCLE_H
10 #define DIALOGBOX_CIRCLE_H
11
12 #include "SALOME_Selection.h"
13 #include "GEOM_ShapeTypeFilter.hxx"
14 #include "GEOM_EdgeFilter.hxx"
15 #include "GeometryGUI_SpinBox.h"
16
17 #include <gp_Pnt.hxx>
18 #include <gp_Dir.hxx>
19 #include <BRepBuilderAPI_MakeEdge.hxx>
20
21 #include <qvariant.h>
22 #include <qdialog.h>
23
24 class QVBoxLayout; 
25 class QHBoxLayout; 
26 class QGridLayout; 
27 class QButtonGroup;
28 class QGroupBox;
29 class QLabel;
30 class QLineEdit;
31 class QPushButton;
32 class QRadioButton;
33 class GeometryGUI;
34
35
36 //=================================================================================
37 // class    : GeometryGUI_CircleDlg
38 // purpose  :
39 //=================================================================================
40 class GeometryGUI_CircleDlg : public QDialog
41
42     Q_OBJECT
43
44 public:
45     GeometryGUI_CircleDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
46     ~GeometryGUI_CircleDlg();
47
48 private :
49     
50     GEOM::GEOM_Gen_var        myGeom ;                /* Current Geom object */   
51     GeometryGUI*                 myGeomGUI ;             /* Current GeomGUI object */ 
52     SALOME_Selection*            mySelection ;           /* User shape selection */
53     TopoDS_Shape                 mySimulationTopoDs;     /* Shape used for simulation display */
54     gp_Pnt                       myPoint1 ;
55     gp_Dir                       myDir ;
56     Standard_Real                myRadius ;
57     bool                         myOkPoint1 ;
58     bool                         myOkDir ;
59     QLineEdit*                   myEditCurrentArgument;  /* Current LineEdit */   
60     int                          myConstructorId ;       /* Current constructor id = radio button id */ 
61     Handle(GEOM_ShapeTypeFilter) myVertexFilter ;        /* Filter selection */
62     Handle(GEOM_EdgeFilter) myEdgeFilter; 
63
64     void closeEvent( QCloseEvent* e ) ;
65     void enterEvent( QEvent* e);
66     void Init( SALOME_Selection* Sel ) ;
67     void MakeCircleSimulationAndDisplay() ;
68
69     QButtonGroup* GroupConstructors;
70     QRadioButton* Constructor1;
71     QGroupBox* GroupButtons;
72     QPushButton* buttonOk;
73     QPushButton* buttonCancel;
74     QPushButton* buttonApply;
75     QGroupBox* GroupC1;
76     QPushButton* SelectButtonC1A2;
77     QLineEdit* LineEditC1A1;
78     QPushButton* SelectButtonC1A1;
79     QLabel* TextLabelC1A2;
80     QLineEdit* LineEditC1A2;
81     QLabel* TextLabelC1A1;
82     QLabel* TextLabelC1A3;
83
84     GeometryGUI_SpinBox* SpinBox_C1A3;
85
86 private slots:
87
88     void ConstructorsClicked(int constructorId);
89     void ClickOnOk();
90     void ClickOnCancel();
91     void ClickOnApply();
92     void SetEditCurrentArgument() ;
93     void SelectionIntoArgument() ;
94     void LineEditReturnPressed() ;
95     void DeactivateActiveDialog() ;
96     void ActivateThisDialog() ;
97     void ValueChangedInSpinBox( double newValue ) ;
98
99 protected:
100     QGridLayout* GeometryGUI_CircleDlgLayout;
101     QGridLayout* GroupConstructorsLayout;
102     QGridLayout* GroupButtonsLayout;
103     QGridLayout* GroupC1Layout;
104 };
105
106 #endif // DIALOGBOX_CIRCLE_H