Salome HOME
Merge commit '6600bcec782fc8b6c72871fe6e08bd19a34a4e2b'
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MakeFull2DFrom3DOp.h
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_MakeFull2DFrom3DOp.h
20 // Author : Cesar Conopoima, Open CASCADE S.A.S. (cesar.conopoima@opencascade.com)
21
22 #ifndef SMESHGUI_MakeFull2DFrom3DOp_H
23 #define SMESHGUI_MakeFull2DFrom3DOp_H
24
25 // SMESH includes
26 #include "SMESHGUI_Make2DFrom3DOp.h"
27
28 /*!
29  * \brief Dialog for options of generating 2D mesh from 3D.
30  */
31
32 class SMESHGUI_EXPORT SMESHGUI_MakeFull2DFrom3DDlg :  public SMESHGUI_Make2DFrom3DDlg
33 {
34   Q_OBJECT
35
36 public:
37   SMESHGUI_MakeFull2DFrom3DDlg( QWidget* );
38   virtual ~SMESHGUI_MakeFull2DFrom3DDlg();
39
40   friend class SMESHGUI_MakeFull2DFrom3DOp;
41 };
42
43 /*!
44  * \brief Operation to compute 2D mesh from 3D mesh
45  */
46
47 class SMESHGUI_EXPORT SMESHGUI_MakeFull2DFrom3DOp : public SMESHGUI_SelectionOp
48 {
49   Q_OBJECT
50
51 public:
52   SMESHGUI_MakeFull2DFrom3DOp();
53   virtual ~SMESHGUI_MakeFull2DFrom3DOp();
54
55   virtual LightApp_Dialog*           dlg() const;
56
57 protected:
58   virtual void                       startOperation();
59   virtual void                       selectionDone();
60   virtual SUIT_SelectionFilter*      createFilter( const int ) const;
61   bool                               isValid( QString& ) const;
62
63 protected slots:
64   virtual bool                       onApply();
65
66 private:
67   bool                               compute2DMesh( QStringList& );
68
69 private:
70   SMESH::SMESH_Mesh_var              mySrcMesh;
71   QPointer<SMESHGUI_MakeFull2DFrom3DDlg> myDlg;
72
73   SMESH_TypeFilter                   myMeshFilter;
74   SMESH_TypeFilter                   myGroupFilter;
75 };
76
77 #endif // SMESHGUI_MakeFull2DFrom3DOp_H