Salome HOME
Merge from V5_1_4_BR 07/05/2010
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Make2DFrom3DOp.h
1 //  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, 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.
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
20 // SMESH SMESHGUI : GUI for SMESH component
21 // File   : SMESHGUI_Make2DFrom3D.h
22 // Author : Open CASCADE S.A.S.
23 //
24 #ifndef SMESHGUI_Make2DFrom3DOp_H
25 #define SMESHGUI_Make2DFrom3DOp_H
26
27 // SMESH includes
28 #include "SMESH_SMESHGUI.hxx"
29
30 #include "SMESHGUI_Dialog.h"
31 #include "SMESHGUI_Operation.h"
32
33 // IDL includes
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(SMESH_Mesh)
36
37 class QFrame;
38 class SMESHGUI_MeshInfosBox;
39
40 /*!
41  * \brief Dialog to show result mesh statistic
42  */
43
44 class SMESHGUI_Make2DFrom3DDlg :  public SMESHGUI_Dialog
45 {
46   Q_OBJECT
47
48  public:
49   SMESHGUI_Make2DFrom3DDlg( QWidget* );
50   virtual ~SMESHGUI_Make2DFrom3DDlg();
51
52   void                   SetMeshName(const QString& theName);
53   void                   SetMeshInfo(const SMESH::long_array& theInfo);
54
55  private:
56   QFrame*                createMainFrame( QWidget* );
57
58  private:
59   QLabel*                myMeshName;
60   SMESHGUI_MeshInfosBox* myFullInfo;
61 };
62
63
64 /*!
65  * \brief Operation to compute 2D mesh on 3D
66  */
67
68 class SMESHGUI_Make2DFrom3DOp : public SMESHGUI_Operation
69 {
70  public:
71   SMESHGUI_Make2DFrom3DOp();
72   virtual ~SMESHGUI_Make2DFrom3DOp();
73
74  protected:
75   virtual void                       startOperation();
76
77  private:
78   bool                               compute2DMesh();
79
80  private:
81   SMESH::SMESH_Mesh_var              myMesh;
82   QPointer<SMESHGUI_Make2DFrom3DDlg> myDlg;
83 };
84
85 #endif // SMESHGUI_Make2DFrom3DOp_H