Salome HOME
This commit was generated by cvs2git to track changes on a CVS vendor
[modules/geom.git] / src / GEOMGUI / GeometryGUI_InertiaDlg.h
1 //  File      : GeometryGUI_InertiaDlg.h
2 //  Created   :
3 //  Author    : Lucien PIGNOLONI
4 //  Project   : SALOME
5 //  Module    : GeometryGUI
6 //  Copyright : OPEN CASCADE
7 //  $Header$
8
9 #ifndef DIALOGBOX_INERTIA_H
10 #define DIALOGBOX_INERTIA_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 //=================================================================================
35 // class    : GeometryGUI_InertiaDlg
36 // purpose  :
37 //=================================================================================
38 class GeometryGUI_InertiaDlg : public QDialog
39
40     Q_OBJECT
41
42 public:
43     GeometryGUI_InertiaDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
44     ~GeometryGUI_InertiaDlg();
45
46     void Init( SALOME_Selection* Sel ) ;
47     void closeEvent( QCloseEvent* e ) ;
48     void enterEvent ( QEvent * ) ;                /* mouse enter the QWidget */
49     void CalculateAndDisplayInertia(const TopoDS_Shape& S) ;
50
51     GEOM::GEOM_Gen_var myGeom ;                /* Current GeomI object */
52     GeometryGUI*          myGeomGUI ;             /* Current GeomGUI object */
53     SALOME_Selection*     mySelection ;
54
55     int                   myConstructorId ;       /* Current constructor id = radio button id */
56     QLineEdit*            myEditCurrentArgument;  /* Current LineEdit */
57
58
59     QButtonGroup* GroupConstructors;
60     QRadioButton* Constructor1;
61     QGroupBox* GroupC1;
62     QLabel* TextLabelC1A1;
63     QPushButton* SelectButtonC1A1;
64     QLineEdit* LineEditC1A1;
65     QLabel* TextLabel_Matrix;
66     QLabel* TextLabelMatrix_11;
67     QLabel* TextLabelMatrix_21;
68     QLabel* TextLabelMatrix_31;
69     QLineEdit* LineEdit_L1C1;
70     QLineEdit* LineEdit_L1C2;
71     QLineEdit* LineEdit_L1C3;
72     QLineEdit* LineEdit_L2C1;
73     QLineEdit* LineEdit_L2C2;
74     QLineEdit* LineEdit_L2C3;
75     QLineEdit* LineEdit_L3C1;
76     QLineEdit* LineEdit_L3C2;
77     QLineEdit* LineEdit_L3C3;
78     QLineEdit* LineEdit_IX;
79     QLineEdit* LineEdit_IY;
80     QLineEdit* LineEdit_IZ;
81     QLabel* TextLabel_IXIYIZ;
82     QGroupBox* GroupButtons;
83     QPushButton* buttonApply;
84     QPushButton* buttonOk;
85     QPushButton* buttonCancel;
86
87 private slots:
88
89     void ConstructorsClicked(int constructorId);
90     void ClickOnCancel();
91     void SetEditCurrentArgument() ;
92     void LineEditReturnPressed() ;
93     void SelectionIntoArgument() ;
94     void DeactivateActiveDialog() ;
95     void ActivateThisDialog() ;
96
97 protected:
98     QGridLayout* GeometryGUI_InertiaDlgLayout;
99     QGridLayout* GroupConstructorsLayout;
100     QGridLayout* GroupC1Layout;
101     QGridLayout* GroupButtonsLayout;
102 };
103
104 #endif // DIALOGBOX_INERTIA_H