1 // Copyright (C) 2007-2008 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
22 // SMESH SMESHGUI : GUI for SMESH component
23 // File : SMESHGUI_ExtrusionAlongPathDlg.h
24 // Author : Vadim SANDLER
28 #ifndef DIALOGBOX_EXTRUSION_PATH_H
29 #define DIALOGBOX_EXTRUSION_PATH_H
31 #include "SMESH_SMESHGUI.hxx"
33 #include "LightApp_SelectionMgr.h"
34 #include "SUIT_SelectionFilter.h"
51 class SMESHGUI_SpinBox;
52 class SVTK_ViewWindow;
57 #include <SALOMEconfig.h>
58 #include CORBA_SERVER_HEADER(SMESH_Mesh)
60 //=================================================================================
61 // class : SMESHGUI_ExtrusionAlongPathDlg
63 //=================================================================================
64 class SMESHGUI_EXPORT SMESHGUI_ExtrusionAlongPathDlg : public QDialog
70 SetBusy (SMESHGUI_ExtrusionAlongPathDlg* _dlg) { myDlg = _dlg; myDlg->myBusy = true; }
71 ~SetBusy() { myDlg->myBusy = false; }
73 SMESHGUI_ExtrusionAlongPathDlg* myDlg;
78 SMESHGUI_ExtrusionAlongPathDlg (SMESHGUI*,
80 ~SMESHGUI_ExtrusionAlongPathDlg();
82 bool eventFilter (QObject* object, QEvent* event);
85 void Init (bool ResetControls = true);
86 void enterEvent (QEvent*); /* mouse enter the QWidget */
87 void keyPressEvent(QKeyEvent*);
88 int GetConstructorId();
89 void SetEditCurrentArgument (QToolButton* button);
91 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
92 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
93 SVTK_Selector* mySelector;
95 QWidget* myEditCurrentArgument; /* Current argument */
98 SMESH::SMESH_Mesh_var myMesh;
99 SMESH_Actor* myMeshActor;
100 SMESH::SMESH_IDSource_var myIDSource;
101 SMESH::SMESH_Mesh_var myPathMesh;
102 GEOM::GEOM_Object_var myPathShape;
103 SUIT_SelectionFilter* myElementsFilter;
104 SUIT_SelectionFilter* myPathMeshFilter;
108 QButtonGroup* GroupConstructors;
109 QRadioButton* Elements1dRB;
110 QRadioButton* Elements2dRB;
112 QGroupBox* GroupArguments;
114 QToolButton* SelectElementsButton;
115 QLineEdit* ElementsLineEdit;
116 QCheckBox* MeshCheck;
119 QToolButton* SelectPathMeshButton;
120 QLineEdit* PathMeshLineEdit;
121 QLabel* PathShapeLab;
122 QToolButton* SelectPathShapeButton;
123 QLineEdit* PathShapeLineEdit;
124 QLabel* StartPointLab;
125 QToolButton* SelectStartPointButton;
126 QLineEdit* StartPointLineEdit;
127 QCheckBox* LinearAnglesCheck;
128 QCheckBox* AnglesCheck;
129 QGroupBox* AnglesGrp;
130 QListBox* AnglesList;
131 QToolButton* AddAngleButton;
132 QToolButton* RemoveAngleButton;
133 SMESHGUI_SpinBox* AngleSpin;
134 QCheckBox* BasePointCheck;
135 QGroupBox* BasePointGrp;
136 QToolButton* SelectBasePointButton;
138 SMESHGUI_SpinBox* XSpin;
140 SMESHGUI_SpinBox* YSpin;
142 SMESHGUI_SpinBox* ZSpin;
143 QCheckBox* MakeGroupsCheck;
145 QGroupBox* GroupButtons;
146 QPushButton* OkButton;
147 QPushButton* ApplyButton;
148 QPushButton* CloseButton;
149 QPushButton* HelpButton;
151 QString myHelpFileName;
157 void ConstructorsClicked (int);
161 void SetEditCurrentArgument();
162 void SelectionIntoArgument();
163 void DeactivateActiveDialog();
164 void ActivateThisDialog();
165 void onTextChange (const QString&);
167 void onAnglesCheck();
168 void onBasePointCheck();
170 void OnAngleRemoved();
173 #endif // DIALOGBOX_EXTRUSION_PATH_H