Salome HOME
NRI : First integration.
[modules/geom.git] / src / GEOMGUI / GeometryGUI_PropertiesDlg.h
1 //  File      : GeometryGUI_PropertiesDlg.h
2 //  Created   :
3 //  Author    : Lucien PIGNOLONI
4 //  Project   : SALOME
5 //  Module    : GeometryGUI
6 //  Copyright : OPEN CASCADE
7 //  $Headers:
8
9 #ifndef DIALOGBOX_PROPERTIES_H
10 #define DIALOGBOX_PROPERTIES_H
11
12 #include "SALOME_Selection.h"
13 #include "GEOM_ShapeTypeFilter.hxx"
14
15 #include <BRepGProp.hxx>
16 #include <GProp_GProps.hxx>
17 #include <GProp_PrincipalProps.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 // class    : GeometryGUI_PropertiesDlg
35 // purpose  :
36 //=================================================================================
37 class GeometryGUI_PropertiesDlg : public QDialog
38
39     Q_OBJECT
40
41 public:
42     GeometryGUI_PropertiesDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
43     ~GeometryGUI_PropertiesDlg();
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 CalculateAndDisplayProperties(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     QLabel* TextLabel_Length;
68     QLabel* TextLabel_Surface;
69     QLabel* TextLabel_Volume;
70
71     QLineEdit* LineEdit_Length;
72     QLineEdit* LineEdit_Surface;
73     QLineEdit* LineEdit_Volume;
74    
75     QGroupBox* GroupButtons;
76     QPushButton* buttonApply;
77     QPushButton* buttonOk;
78     QPushButton* buttonCancel;
79
80 private slots:
81
82     void ConstructorsClicked(int constructorId);
83     void ClickOnCancel();
84     void SetEditCurrentArgument() ;
85     void LineEditReturnPressed() ;
86     void SelectionIntoArgument() ;
87     void DeactivateActiveDialog() ;
88     void ActivateThisDialog() ;
89     
90 protected:
91     QGridLayout* GeometryGUI_PropertiesDlgLayout;
92     QGridLayout* GroupConstructorsLayout;
93     QGridLayout* GroupConstructor1Layout;
94     QGridLayout* GroupButtonsLayout;
95 };
96
97 #endif // DIALOGBOX_PROPERTIES_H