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