1 // Copyright (C) 2007-2010 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"
33 // SALOME GUI includes
34 #include <SALOME_InteractiveObject.hxx>
40 #include <SALOMEconfig.h>
41 #include CORBA_SERVER_HEADER(SMESH_Mesh)
53 class SMESHGUI_IdValidator;
54 class SMESHGUI_SpinBox;
55 class SMESHGUI_FilterDlg;
57 class LightApp_SelectionMgr;
58 class SUIT_SelectionFilter;
59 class SalomeApp_IntSpinBox;
61 //=================================================================================
62 // class : SMESHGUI_ExtrusionDlg
64 //=================================================================================
65 class SMESHGUI_EXPORT SMESHGUI_ExtrusionDlg : public QDialog
70 SMESHGUI_ExtrusionDlg( SMESHGUI* );
71 ~SMESHGUI_ExtrusionDlg();
76 void Init( bool = true );
77 void enterEvent( QEvent* ); /* mouse enter the QWidget */
78 void closeEvent( QCloseEvent* );
79 void keyPressEvent( QKeyEvent* );
80 int GetConstructorId();
84 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
85 SMESHGUI_IdValidator* myIdValidator;
86 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
87 QWidget* myEditCurrentArgument; /* Current argument editor */
88 int myNbOkElements; /* to check when elements are defined */
89 SVTK_Selector* mySelector;
91 SMESH::SMESH_IDSource_var mySelectedObject;
94 SMESH::SMESH_Mesh_var myMesh;
95 SMESH::long_array_var myElementsId;
97 Handle(SALOME_InteractiveObject) myIO;
98 SUIT_SelectionFilter* myMeshOrSubMeshOrGroupFilter;
101 QGroupBox* ConstructorsBox;
102 QButtonGroup* GroupConstructors;
103 QRadioButton* RadioButton1;
104 QRadioButton* RadioButton2;
105 QRadioButton* RadioButton3;
106 QRadioButton* RadioButton4;
108 QGroupBox* GroupArguments;
109 QGroupBox* GroupDimensions;
110 QLabel* TextLabelElements;
111 QPushButton* SelectElementsButton;
112 QLineEdit* LineEditElements;
113 QCheckBox* CheckBoxMesh;
114 QLabel* TextLabelVector;
115 QLabel* TextLabelDistance;
116 QPushButton* SelectVectorButton;
118 SMESHGUI_SpinBox* SpinBox_Dx;
120 SMESHGUI_SpinBox* SpinBox_Dy;
122 SMESHGUI_SpinBox* SpinBox_Dz;
124 SMESHGUI_SpinBox* SpinBox_Vx;
126 SMESHGUI_SpinBox* SpinBox_Vy;
128 SMESHGUI_SpinBox* SpinBox_Vz;
129 QLabel* TextLabelDist;
130 SMESHGUI_SpinBox* SpinBox_VDist;
131 QLabel* TextLabelNbSteps;
132 SalomeApp_IntSpinBox* SpinBox_NbSteps;
133 QCheckBox* MakeGroupsCheck;
135 QGroupBox* GroupButtons;
136 QPushButton* buttonOk;
137 QPushButton* buttonCancel;
138 QPushButton* buttonApply;
139 QPushButton* buttonHelp;
141 QString myHelpFileName;
144 QPushButton* myFilterBtn;
145 SMESHGUI_FilterDlg* myFilterDlg;
148 void ConstructorsClicked( int );
149 void CheckIsEnable();
152 void ClickOnCancel();
155 void SetEditCurrentArgument();
156 void SelectionIntoArgument();
157 void DeactivateActiveDialog();
158 void ActivateThisDialog();
159 void onTextChange( const QString& );
160 void onSelectMesh( bool );
164 #endif // SMESHGUI_EXTRUSIONDLG_H