Salome HOME
NRI : Explode OCC_LIBS.
[modules/geom.git] / src / GEOMGUI / GeometryGUI_ArchimedeDlg.h
1 //  File      : GeometryGUI_ArchimedeDlg.h
2 //  Created   : Mon Feb 25 11:13:13 CET 2002
3 //  Author    : Nicolas REJNERI
4 //  Project   : SALOME
5 //  Module    : GeometryGUI
6 //  Copyright : OPEN CASCADE
7 //  $Header$
8
9 #ifndef DIALOGBOX_ARCHIMEDE_H
10 #define DIALOGBOX_ARCHIMEDE_H
11
12 #include "SALOME_Selection.h"
13 #include "GEOM_ShapeTypeFilter.hxx"
14
15 #include <qvariant.h>
16 #include <qdialog.h>
17 #include <qvalidator.h>
18
19 class QVBoxLayout; 
20 class QHBoxLayout; 
21 class QGridLayout; 
22 class QButtonGroup;
23 class QGroupBox;
24 class QLabel;
25 class QLineEdit;
26 class QPushButton;
27 class QRadioButton;
28 class GeometryGUI;
29
30
31 //=================================================================================
32 // class    : GeometryGUI_ArchimedeDlg
33 // purpose  :
34 //=================================================================================
35 class GeometryGUI_ArchimedeDlg : public QDialog
36
37     Q_OBJECT
38
39 public:
40     GeometryGUI_ArchimedeDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
41     ~GeometryGUI_ArchimedeDlg();
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
53     Handle(SALOME_InteractiveObject)  myIO ; 
54
55     Standard_Real                 myWeight ;
56     Standard_Real                 myWaterDensity ;
57     Standard_Real                 myMeshingDeflection ;
58
59     bool                          myOkIO ; 
60     bool                          myOkWeight ; 
61     bool                          myOkWaterDensity ; 
62     bool                          myOkMeshingDeflection ;
63
64     int                           myConstructorId ;         /* Current constructor id = radio button id */
65     QLineEdit*                    myEditCurrentArgument;    /* Current LineEdit */
66
67     QDoubleValidator              *myVa ;                   /* Double validator for numeric input */
68     QDoubleValidator              *myVb ;                   /* Double validator for numeric input */
69     QDoubleValidator              *myVc ;                   /* Double validator for numeric input */
70
71     QButtonGroup* GroupConstructors;
72     QRadioButton* Constructor1;
73     QGroupBox* GroupButtons;
74     QPushButton* buttonApply;
75     QPushButton* buttonOk;
76     QPushButton* buttonCancel;
77     QGroupBox* GroupC1;
78     QLineEdit* LineEditC1A1;
79     QLineEdit* LineEditC1A2;
80     QLineEdit* LineEditC1A3;
81     QLineEdit* LineEditC1A4;
82     QPushButton* SelectButtonC1A1;
83     QLabel* TextLabelC1A1;
84     QLabel* TextLabelC1A2;
85     QLabel* TextLabelC1A3;
86     QLabel* TextLabelC1A4;
87
88 private slots:
89
90     void ConstructorsClicked(int constructorId);
91     void ClickOnOk();
92     void ClickOnCancel();
93     void ClickOnApply();
94     void SetEditCurrentArgument() ;
95     void TextChangedInLineEdit(const QString&) ;
96     void SelectionIntoArgument() ;
97     void DeactivateActiveDialog() ;
98     void ActivateThisDialog() ;
99
100 protected:
101     QGridLayout* GeometryGUI_ArchimedeDlgLayout;
102     QGridLayout* GroupConstructorsLayout;
103     QGridLayout* GroupButtonsLayout;
104     QGridLayout* GroupC1Layout;
105 };
106
107 #endif // DIALOGBOX_ARCHIMEDE_H