1 // SMESH SMESHGUI : GUI for SMESH component
3 // Copyright (C) 2003 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
24 // File : SMESHGUI_ExtrusionAlongPathDlg.h
25 // Author : Vadim SANDLER
29 #ifndef DIALOGBOX_EXTRUSION_PATH_H
30 #define DIALOGBOX_EXTRUSION_PATH_H
32 #include "SMESH_SMESHGUI.hxx"
34 #include "LightApp_SelectionMgr.h"
35 #include "SUIT_SelectionFilter.h"
52 class SMESHGUI_SpinBox;
53 class SVTK_ViewWindow;
58 #include <SALOMEconfig.h>
59 #include CORBA_SERVER_HEADER(SMESH_Mesh)
61 //=================================================================================
62 // class : SMESHGUI_ExtrusionAlongPathDlg
64 //=================================================================================
65 class SMESHGUI_EXPORT SMESHGUI_ExtrusionAlongPathDlg : public QDialog
71 SetBusy (SMESHGUI_ExtrusionAlongPathDlg* _dlg) { myDlg = _dlg; myDlg->myBusy = true; }
72 ~SetBusy() { myDlg->myBusy = false; }
74 SMESHGUI_ExtrusionAlongPathDlg* myDlg;
79 SMESHGUI_ExtrusionAlongPathDlg (SMESHGUI*,
81 ~SMESHGUI_ExtrusionAlongPathDlg();
83 bool eventFilter (QObject* object, QEvent* event);
86 void Init (bool ResetControls = true);
87 void enterEvent (QEvent*); /* mouse enter the QWidget */
88 void keyPressEvent(QKeyEvent*);
89 int GetConstructorId();
90 void SetEditCurrentArgument (QToolButton* button);
92 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
93 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
94 SVTK_Selector* mySelector;
96 QWidget* myEditCurrentArgument; /* Current argument */
99 SMESH::SMESH_Mesh_var myMesh;
100 SMESH_Actor* myMeshActor;
101 SMESH::SMESH_IDSource_var myIDSource;
102 SMESH::SMESH_Mesh_var myPathMesh;
103 GEOM::GEOM_Object_var myPathShape;
104 SUIT_SelectionFilter* myElementsFilter;
105 SUIT_SelectionFilter* myPathMeshFilter;
109 QButtonGroup* GroupConstructors;
110 QRadioButton* Elements1dRB;
111 QRadioButton* Elements2dRB;
113 QGroupBox* GroupArguments;
115 QToolButton* SelectElementsButton;
116 QLineEdit* ElementsLineEdit;
117 QCheckBox* MeshCheck;
120 QToolButton* SelectPathMeshButton;
121 QLineEdit* PathMeshLineEdit;
122 QLabel* PathShapeLab;
123 QToolButton* SelectPathShapeButton;
124 QLineEdit* PathShapeLineEdit;
125 QLabel* StartPointLab;
126 QToolButton* SelectStartPointButton;
127 QLineEdit* StartPointLineEdit;
128 QCheckBox* LinearAnglesCheck;
129 QCheckBox* AnglesCheck;
130 QGroupBox* AnglesGrp;
131 QListBox* AnglesList;
132 QToolButton* AddAngleButton;
133 QToolButton* RemoveAngleButton;
134 SMESHGUI_SpinBox* AngleSpin;
135 QCheckBox* BasePointCheck;
136 QGroupBox* BasePointGrp;
137 QToolButton* SelectBasePointButton;
139 SMESHGUI_SpinBox* XSpin;
141 SMESHGUI_SpinBox* YSpin;
143 SMESHGUI_SpinBox* ZSpin;
144 QCheckBox* MakeGroupsCheck;
146 QGroupBox* GroupButtons;
147 QPushButton* OkButton;
148 QPushButton* ApplyButton;
149 QPushButton* CloseButton;
150 QPushButton* HelpButton;
152 QString myHelpFileName;
158 void ConstructorsClicked (int);
162 void SetEditCurrentArgument();
163 void SelectionIntoArgument();
164 void DeactivateActiveDialog();
165 void ActivateThisDialog();
166 void onTextChange (const QString&);
168 void onAnglesCheck();
169 void onBasePointCheck();
171 void OnAngleRemoved();
174 #endif // DIALOGBOX_EXTRUSION_PATH_H