1 // Copyright (C) 2007-2013 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_ExtrusionAlongPathDlg.h
25 // Author : Vadim SANDLER, Open CASCADE S.A.S.
27 #ifndef SMESHGUI_EXTRUSIONALONGPATHDLG_H
28 #define SMESHGUI_EXTRUSIONALONGPATHDLG_H
31 #include "SMESH_SMESHGUI.hxx"
32 #include "SMESHGUI_PreviewDlg.h"
35 #include <SALOMEconfig.h>
36 #include CORBA_SERVER_HEADER(SMESH_Mesh)
50 class SMESHGUI_IdValidator;
51 class SMESHGUI_SpinBox;
52 class SMESHGUI_FilterDlg;
54 class LightApp_SelectionMgr;
55 class SUIT_SelectionFilter;
57 //=================================================================================
58 // class : SMESHGUI_ExtrusionAlongPathDlg
60 //=================================================================================
61 class SMESHGUI_EXPORT SMESHGUI_ExtrusionAlongPathDlg : public SMESHGUI_PreviewDlg
69 SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* );
70 ~SMESHGUI_ExtrusionAlongPathDlg();
72 bool eventFilter( QObject*, QEvent* );
75 void Init( bool = true );
76 void enterEvent( QEvent* ); /* mouse enter the QWidget */
77 void keyPressEvent( QKeyEvent* );
78 int GetConstructorId();
79 void SetEditCurrentArgument( QToolButton* );
84 SMESH::long_array_var getSelectedElements();
85 SMESH::double_array_var getAngles();
87 void updateLinearAngles();
89 SMESHGUI_IdValidator* myIdValidator;
90 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
91 SVTK_Selector* mySelector;
93 QWidget* myEditCurrentArgument; /* Current argument */
96 SMESH::SMESH_Mesh_var myMesh;
97 SMESH_Actor* myMeshActor;
98 SMESH::SMESH_IDSource_var myIDSource;
99 //SMESH::SMESH_Mesh_var myPathMesh;
100 SMESH::SMESH_IDSource_var myPath;
101 //GEOM::GEOM_Object_var myPathShape;
102 SUIT_SelectionFilter* myElementsFilter;
103 SUIT_SelectionFilter* myPathMeshFilter;
105 QList<double> myAnglesList;
108 QGroupBox* ConstructorsBox;
109 QButtonGroup* GroupConstructors;
110 QRadioButton* Elements1dRB;
111 QRadioButton* Elements2dRB;
113 QGroupBox* GroupArguments;
115 QToolButton* SelectElementsButton;
116 QLineEdit* ElementsLineEdit;
117 QCheckBox* MeshCheck;
119 QToolButton* SelectPathMeshButton;
120 QLineEdit* PathMeshLineEdit;
121 //QToolButton* SelectPathShapeButton;
122 //QLineEdit* PathShapeLineEdit;
123 QToolButton* SelectStartPointButton;
124 QLineEdit* StartPointLineEdit;
125 QCheckBox* LinearAnglesCheck;
126 QGroupBox* AnglesGrp;
127 QListWidget* AnglesList;
128 QToolButton* AddAngleButton;
129 QToolButton* RemoveAngleButton;
130 SMESHGUI_SpinBox* AngleSpin;
131 QGroupBox* BasePointGrp;
132 QToolButton* SelectBasePointButton;
133 SMESHGUI_SpinBox* XSpin;
134 SMESHGUI_SpinBox* YSpin;
135 SMESHGUI_SpinBox* ZSpin;
136 QCheckBox* MakeGroupsCheck;
138 QGroupBox* GroupButtons;
139 QPushButton* OkButton;
140 QPushButton* ApplyButton;
141 QPushButton* CloseButton;
142 QPushButton* HelpButton;
144 QString myHelpFileName;
146 QPushButton* myFilterBtn;
147 SMESHGUI_FilterDlg* myFilterDlg;
151 virtual void onDisplaySimulation( bool );
154 void ConstructorsClicked( int );
158 void SetEditCurrentArgument();
159 void SelectionIntoArgument();
160 void DeactivateActiveDialog();
161 void ActivateThisDialog();
162 void onTextChange( const QString& );
165 void OnAngleRemoved();
169 #endif // SMESHGUI_EXTRUSIONALONGPATHDLG_H