1 // File : GeometryGUI_InertiaDlg.h
3 // Author : Lucien PIGNOLONI
5 // Module : GeometryGUI
6 // Copyright : OPEN CASCADE
9 #ifndef DIALOGBOX_INERTIA_H
10 #define DIALOGBOX_INERTIA_H
12 #include "SALOME_Selection.h"
13 #include "GEOM_ShapeTypeFilter.hxx"
15 #include <BRepGProp.hxx>
16 #include <GProp_GProps.hxx>
17 #include <GProp_PrincipalProps.hxx>
34 //=================================================================================
35 // class : GeometryGUI_InertiaDlg
37 //=================================================================================
38 class GeometryGUI_InertiaDlg : public QDialog
43 GeometryGUI_InertiaDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
44 ~GeometryGUI_InertiaDlg();
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) ;
51 GEOM::GEOM_Gen_var myGeom ; /* Current GeomI object */
52 GeometryGUI* myGeomGUI ; /* Current GeomGUI object */
53 SALOME_Selection* mySelection ;
55 int myConstructorId ; /* Current constructor id = radio button id */
56 QLineEdit* myEditCurrentArgument; /* Current LineEdit */
59 QButtonGroup* GroupConstructors;
60 QRadioButton* Constructor1;
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;
89 void ConstructorsClicked(int constructorId);
91 void SetEditCurrentArgument() ;
92 void LineEditReturnPressed() ;
93 void SelectionIntoArgument() ;
94 void DeactivateActiveDialog() ;
95 void ActivateThisDialog() ;
98 QGridLayout* GeometryGUI_InertiaDlgLayout;
99 QGridLayout* GroupConstructorsLayout;
100 QGridLayout* GroupC1Layout;
101 QGridLayout* GroupButtonsLayout;
104 #endif // DIALOGBOX_INERTIA_H