Version: 9.12.0
SMESHGUI_Make2DFrom3DOp.h
Go to the documentation of this file.
1 // Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
2 //
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, or (at your option) any later version.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 // File : SMESHGUI_Make2DFrom3D.h
20 // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
21 
22 #ifndef SMESHGUI_Make2DFrom3DOp_H
23 #define SMESHGUI_Make2DFrom3DOp_H
24 
25 // SMESH includes
26 #include "SMESH_SMESHGUI.hxx"
27 #include "SMESHGUI_Dialog.h"
28 #include "SMESHGUI_SelectionOp.h"
29 #include "SMESH_TypeFilter.hxx"
30 
31 #include <SALOMEconfig.h>
32 #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
33 #include CORBA_SERVER_HEADER(SMESH_Mesh)
34 
35 class QCheckBox;
36 class QGroupBox;
37 class QLineEdit;
38 class QRadioButton;
40 
46 {
47  Q_OBJECT
48 
49 public:
50  enum { MeshOrGroups };
51 
53  virtual ~SMESHGUI_Make2DFrom3DDlg();
54 
55  SMESH::Bnd_Dimension mode() const;
56 
57  bool needNewMesh() const;
58  QString getNewMeshName() const;
59  void setNewMeshName( const QString& );
60  void setNewMeshEnabled( bool );
61  bool getNewMeshEnabled() const;
62 
63  bool needGroup() const;
64  QString getGroupName() const;
65  void setGroupName( const QString& );
66 
67  bool copySource() const;
68 
69 protected:
71 
72 private slots:
73  void onTargetChanged();
74  void onGroupChecked();
75 
76 private:
77  QRadioButton* my2dFrom3dRB;
78  QRadioButton* my1dFrom2dRB;
79  QRadioButton* my1dFrom3dRB;
80  QRadioButton* myThisMeshRB;
81  QRadioButton* myNewMeshRB;
82  QLineEdit* myMeshName;
83  QCheckBox* myCopyCheck;
84  QCheckBox* myGroupCheck;
85  QLineEdit* myGroupName;
86 
88 };
89 
95 {
96  Q_OBJECT
97 
98 public:
100  virtual ~SMESHGUI_Make2DFrom3DOp();
101 
102  virtual LightApp_Dialog* dlg() const;
103 
104 protected:
105  virtual void startOperation();
106  virtual void selectionDone();
107  virtual SUIT_SelectionFilter* createFilter( const int ) const;
108  bool isValid( QString& ) const;
109 
110 protected slots:
111  virtual bool onApply();
112  void onModeChanged();
113 
114 private:
115  bool compute2DMesh( QStringList& );
116 
117 private:
118  SMESH::SMESH_Mesh_var mySrcMesh;
119  QPointer<SMESHGUI_Make2DFrom3DDlg> myDlg;
120 
123 };
124 
125 #endif // SMESHGUI_Make2DFrom3DOp_H
#define SMESHGUI_EXPORT
Definition: SMESH_SMESHGUI.hxx:36
Definition: SMESHGUI_Dialog.h:44
Dialog to show result mesh statistic.
Definition: SMESHGUI_Make2DFrom3DOp.h:46
QCheckBox * myGroupCheck
Definition: SMESHGUI_Make2DFrom3DOp.h:84
QRadioButton * my1dFrom3dRB
Definition: SMESHGUI_Make2DFrom3DOp.h:79
QLineEdit * myGroupName
Definition: SMESHGUI_Make2DFrom3DOp.h:85
QRadioButton * myNewMeshRB
Definition: SMESHGUI_Make2DFrom3DOp.h:81
QGroupBox * myModeGrp
Definition: SMESHGUI_Make2DFrom3DOp.h:70
QCheckBox * myCopyCheck
Definition: SMESHGUI_Make2DFrom3DOp.h:83
QRadioButton * myThisMeshRB
Definition: SMESHGUI_Make2DFrom3DOp.h:80
QRadioButton * my1dFrom2dRB
Definition: SMESHGUI_Make2DFrom3DOp.h:78
QLineEdit * myMeshName
Definition: SMESHGUI_Make2DFrom3DOp.h:82
QRadioButton * my2dFrom3dRB
Definition: SMESHGUI_Make2DFrom3DOp.h:77
Operation to compute 2D mesh on 3D.
Definition: SMESHGUI_Make2DFrom3DOp.h:95
QPointer< SMESHGUI_Make2DFrom3DDlg > myDlg
Definition: SMESHGUI_Make2DFrom3DOp.h:119
SMESH_TypeFilter myGroupFilter
Definition: SMESHGUI_Make2DFrom3DOp.h:122
SMESH::SMESH_Mesh_var mySrcMesh
Definition: SMESHGUI_Make2DFrom3DOp.h:118
SMESH_TypeFilter myMeshFilter
Definition: SMESHGUI_Make2DFrom3DOp.h:121
Definition: SMESHGUI_SelectionOp.h:58
Definition: SMESH_TypeFilter.hxx:35
Bnd_Dimension
Definition: SMESH_MeshEditor.idl:35