1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // SMESH SMESHGUI : GUI for SMESH component
24 // File : SMESHGUI_ExtrusionDlg.h
25 // Author : Michael ZORIN, Open CASCADE S.A.S.
27 #ifndef SMESHGUI_EXTRUSIONDLG_H
28 #define SMESHGUI_EXTRUSIONDLG_H
31 #include "SMESH_SMESHGUI.hxx"
32 #include "SMESHGUI_PreviewDlg.h"
34 // SALOME GUI includes
35 #include <SALOME_InteractiveObject.hxx>
38 #include <SALOMEconfig.h>
39 #include CORBA_SERVER_HEADER(SMESH_Mesh)
51 class SMESHGUI_IdValidator;
52 class SMESHGUI_SpinBox;
53 class SMESHGUI_FilterDlg;
55 class LightApp_SelectionMgr;
56 class SUIT_SelectionFilter;
57 class SalomeApp_IntSpinBox;
59 //=================================================================================
60 // class : SMESHGUI_ExtrusionDlg
62 //=================================================================================
63 class SMESHGUI_EXPORT SMESHGUI_ExtrusionDlg : public SMESHGUI_PreviewDlg
68 SMESHGUI_ExtrusionDlg( SMESHGUI* );
69 ~SMESHGUI_ExtrusionDlg();
74 void Init( bool = true );
75 void enterEvent( QEvent* ); /* mouse enter the QWidget */
76 void closeEvent( QCloseEvent* );
77 void keyPressEvent( QKeyEvent* );
78 int GetConstructorId();
79 void getExtrusionVector(SMESH::DirStruct& aVector);
84 SMESHGUI_IdValidator* myIdValidator;
85 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
86 QWidget* myEditCurrentArgument; /* Current argument editor */
87 int myNbOkElements; /* to check when elements are defined */
88 SVTK_Selector* mySelector;
90 SMESH::SMESH_IDSource_var mySelectedObject;
93 SMESH::SMESH_Mesh_var myMesh;
94 SMESH::long_array_var myElementsId;
96 Handle(SALOME_InteractiveObject) myIO;
97 SUIT_SelectionFilter* myMeshOrSubMeshOrGroupFilter0D;
98 SUIT_SelectionFilter* myMeshOrSubMeshOrGroupFilter1D;
99 SUIT_SelectionFilter* myMeshOrSubMeshOrGroupFilter2D;
102 QGroupBox* ConstructorsBox;
103 QButtonGroup* GroupConstructors;
104 QRadioButton* RadioButton0;
105 QRadioButton* RadioButton1;
106 QRadioButton* RadioButton2;
107 QRadioButton* RadioButton3;
108 QRadioButton* RadioButton4;
110 QGroupBox* GroupArguments;
111 QGroupBox* GroupDimensions;
112 QLabel* TextLabelElements;
113 QPushButton* SelectElementsButton;
114 QLineEdit* LineEditElements;
115 QCheckBox* CheckBoxMesh;
116 QLabel* TextLabelVector;
117 QLabel* TextLabelDistance;
118 QPushButton* SelectVectorButton;
120 SMESHGUI_SpinBox* SpinBox_Dx;
122 SMESHGUI_SpinBox* SpinBox_Dy;
124 SMESHGUI_SpinBox* SpinBox_Dz;
126 SMESHGUI_SpinBox* SpinBox_Vx;
128 SMESHGUI_SpinBox* SpinBox_Vy;
130 SMESHGUI_SpinBox* SpinBox_Vz;
131 QLabel* TextLabelDist;
132 SMESHGUI_SpinBox* SpinBox_VDist;
133 QLabel* TextLabelNbSteps;
134 SalomeApp_IntSpinBox* SpinBox_NbSteps;
135 QCheckBox* MakeGroupsCheck;
137 QGroupBox* GroupButtons;
138 QPushButton* buttonOk;
139 QPushButton* buttonCancel;
140 QPushButton* buttonApply;
141 QPushButton* buttonHelp;
143 QString myHelpFileName;
146 QPushButton* myFilterBtn;
147 SMESHGUI_FilterDlg* myFilterDlg;
150 virtual void onDisplaySimulation( bool );
153 void ConstructorsClicked( int );
154 void CheckIsEnable();
157 void ClickOnCancel();
160 void SetEditCurrentArgument();
161 void SelectionIntoArgument();
162 void DeactivateActiveDialog();
163 void ActivateThisDialog();
164 void onTextChange( const QString& );
165 void onSelectMesh( bool );
169 #endif // SMESHGUI_EXTRUSIONDLG_H