Salome HOME
NRI : First integration.
[modules/geom.git] / src / GEOMGUI / GeometryGUI_MaxToleranceDlg.h
1 //  File      : GeometryGUI_MaxToleranceDlg.h
2 //  Created   : Mon Mar 04 14:10:03 2002
3 //  Author    : Nicolas REJNERI
4
5 //  Project   : SALOME
6 //  Module    : GEOM
7 //  Copyright : Open CASCADE 2002
8 //  $Header$
9
10
11 #ifndef DIALOGBOX_MAXTOLERANCE_H
12 #define DIALOGBOX_MAXTOLERANCE_H
13
14 #include "SALOME_Selection.h"
15 #include "GEOM_ShapeTypeFilter.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 // class    : DialogBox_PROPERTIES
33 // purpose  :
34 //=================================================================================
35 class GeometryGUI_MaxToleranceDlg : public QDialog
36
37     Q_OBJECT
38
39 public:
40     GeometryGUI_MaxToleranceDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
41     ~GeometryGUI_MaxToleranceDlg();
42
43 private:
44
45     void Init( SALOME_Selection* Sel ) ;
46     void closeEvent( QCloseEvent* e ) ;
47     void enterEvent ( QEvent * ) ;                         /* mouse enter the QWidget */
48     void CalculateMaxTolerance(const TopoDS_Shape& S) ;
49
50     GEOM::GEOM_Gen_var         myGeom ;                 /* Current GeomI object */
51     GeometryGUI*                  myGeomGUI ;              /* Current GeomGUI object */
52     SALOME_Selection*             mySelection ;            /* User shape selection */
53
54     int                           myConstructorId ;        /* Current constructor id = radio button id */
55     QLineEdit*                    myEditCurrentArgument;   /* Current LineEdit */
56
57     QButtonGroup* GroupConstructors;
58     QRadioButton* Constructor1;
59     QGroupBox* GroupConstructor1;
60     QLineEdit* LineEditC1A1;
61     QPushButton* SelectButtonC1A1;
62     QLabel* TextLabelC1A1;
63
64     QLabel* TextLabel_Min;
65     QLabel* TextLabel_Max;
66
67     QLabel* TextLabel_Face;
68     QLabel* TextLabel_Edge;
69     QLabel* TextLabel_Vertex;
70
71     QLineEdit* LineEdit_MinFace;
72     QLineEdit* LineEdit_MinEdge;
73     QLineEdit* LineEdit_MinVertex;
74    
75     QLineEdit* LineEdit_MaxFace;
76     QLineEdit* LineEdit_MaxEdge;
77     QLineEdit* LineEdit_MaxVertex;
78
79     QGroupBox* GroupButtons;
80     QPushButton* buttonApply;
81     QPushButton* buttonOk;
82     QPushButton* buttonCancel;
83
84 private slots:
85
86     void ConstructorsClicked(int constructorId);
87     void ClickOnCancel();
88     void SetEditCurrentArgument() ;
89     void LineEditReturnPressed() ;
90     void SelectionIntoArgument() ;
91     void DeactivateActiveDialog() ;
92     void ActivateThisDialog() ;
93
94 protected:
95     QGridLayout* GeometryGUI_MaxToleranceDlgLayout;
96     QGridLayout* GroupConstructorsLayout;
97     QGridLayout* GroupConstructor1Layout;
98     QGridLayout* GroupButtonsLayout;
99 };
100
101 #endif // DIALOGBOX_MAXTOLERANCE_H