Salome HOME
NRI : Replace Geometry by GEOM.
[modules/geom.git] / src / GEOMGUI / GeometryGUI_WhatisDlg.h
1 //  File      : GeometryGUI_WhatisDlg.h
2 //  Created   : Mon Mar 04 14:49:51 2002
3 //  Author    : Nicolas REJNERI
4
5 //  Project   : SALOME
6 //  Module    : GEOM
7 //  Copyright : Open CASCADE 2002
8 //  $Header$
9
10 #ifndef DIALOGBOX_WHATIS_H
11 #define DIALOGBOX_WHATIS_H
12
13 #include "SALOME_Selection.h"
14 #include "GEOM_ShapeTypeFilter.hxx"
15
16 #include <TopoDS_Shape.hxx>
17
18 #include <qvariant.h>
19 #include <qdialog.h>
20
21 class QVBoxLayout; 
22 class QHBoxLayout; 
23 class QGridLayout; 
24 class QButtonGroup;
25 class QGroupBox;
26 class QLabel;
27 class QLineEdit;
28 class QPushButton;
29 class QRadioButton;
30 class QTextView;
31 class GeometryGUI;
32
33 //=================================================================================
34 // class    : DialogBox_PROPERTIES
35 // purpose  :
36 //=================================================================================
37 class GeometryGUI_WhatisDlg : public QDialog
38
39     Q_OBJECT
40
41 public:
42     GeometryGUI_WhatisDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
43     ~GeometryGUI_WhatisDlg();
44
45 private:
46
47     void Init( SALOME_Selection* Sel ) ;
48     void closeEvent( QCloseEvent* e ) ;
49     void enterEvent ( QEvent * ) ;                         /* mouse enter the QWidget */
50     void CalculateWhatis(const TopoDS_Shape& S) ;
51
52     GEOM::GEOM_Gen_var            myGeom ;                 /* Current GeomI object */
53     GeometryGUI*                  myGeomGUI ;              /* Current GeomGUI object */
54     SALOME_Selection*             mySelection ;            /* User shape selection */
55     TopoDS_Shape                  mySimulationTopoDs ;     /* Shape used for simulation display */
56
57     int                           myConstructorId ;        /* Current constructor id = radio button id */
58     QLineEdit*                    myEditCurrentArgument;   /* Current LineEdit */
59
60     QButtonGroup* GroupConstructors;
61     QRadioButton* Constructor1;
62     QGroupBox* GroupConstructor1;
63     QLineEdit* LineEditC1A1;
64     QPushButton* SelectButtonC1A1;
65     QLabel* TextLabelC1A1;
66
67     QTextView* Text;
68     QString    SelectedName;
69
70     QGroupBox* GroupButtons;
71     QPushButton* buttonApply;
72     QPushButton* buttonOk;
73     QPushButton* buttonCancel;
74
75 private slots:
76
77     void ConstructorsClicked(int constructorId);
78     void ClickOnCancel();
79     void SetEditCurrentArgument() ;
80     void LineEditReturnPressed() ;
81     void SelectionIntoArgument() ;
82     void DeactivateActiveDialog() ;
83     void ActivateThisDialog() ;
84
85 protected:
86     QGridLayout* GeometryGUI_WhatisDlgLayout;
87     QGridLayout* GroupConstructorsLayout;
88     QGridLayout* GroupConstructor1Layout;
89     QGridLayout* GroupButtonsLayout;
90 };
91
92 #endif // DIALOGBOX_WHATIS_H