1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // File : SMESHGUI_Make2DFrom3D.h
20 // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
22 #ifndef SMESHGUI_Make2DFrom3DOp_H
23 #define SMESHGUI_Make2DFrom3DOp_H
26 #include "SMESH_SMESHGUI.hxx"
27 #include "SMESHGUI_Dialog.h"
28 #include "SMESHGUI_SelectionOp.h"
30 #include <SALOMEconfig.h>
31 #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
38 * \brief Dialog to show result mesh statistic
41 class SMESHGUI_EXPORT SMESHGUI_CopyMeshDlg : public SMESHGUI_Dialog
48 SMESHGUI_CopyMeshDlg( QWidget* );
49 virtual ~SMESHGUI_CopyMeshDlg();
51 SMESH::Bnd_Dimension mode() const;
53 bool needNewMesh() const;
54 QString getNewMeshName() const;
55 void setNewMeshName( const QString& );
57 bool needGroup() const;
58 QString getGroupName() const;
59 void setGroupName( const QString& );
61 bool copySource() const;
62 bool copyMissingOnly() const;
65 void onTargetChanged();
66 void onGroupChecked();
69 QRadioButton* my2dFrom3dRB;
70 QRadioButton* my1dFrom2dRB;
71 QRadioButton* my1dFrom3dRB;
72 QRadioButton* myThisMeshRB;
73 QRadioButton* myNewMeshRB;
74 QLineEdit* myMeshName;
75 QCheckBox* myCopyCheck;
76 QCheckBox* myMissingCheck;
77 QCheckBox* myGroupCheck;
78 QLineEdit* myGroupName;
82 * \brief Operation to compute 2D mesh on 3D
85 class SMESHGUI_EXPORT SMESHGUI_Make2DFrom3DOp : public SMESHGUI_SelectionOp
90 SMESHGUI_Make2DFrom3DOp();
91 virtual ~SMESHGUI_Make2DFrom3DOp();
93 virtual LightApp_Dialog* dlg() const;
96 virtual void startOperation();
97 virtual void selectionDone();
98 virtual SUIT_SelectionFilter* createFilter( const int ) const;
99 bool isValid( QString& ) const;
102 virtual bool onApply();
105 bool compute2DMesh();
108 SMESH::SMESH_IDSource_var mySrc;
109 QPointer<SMESHGUI_CopyMeshDlg> myDlg;
112 #endif // SMESHGUI_Make2DFrom3DOp_H