Salome HOME
13decd92bb2000b724668f64b1f88c38ec7c899b
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ComputeDlg.h
1 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 //
4 //  This library is free software; you can redistribute it and/or
5 //  modify it under the terms of the GNU Lesser General Public
6 //  License as published by the Free Software Foundation; either
7 //  version 2.1 of the License.
8 //
9 //  This library is distributed in the hope that it will be useful,
10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 //  Lesser General Public License for more details.
13 //
14 //  You should have received a copy of the GNU Lesser General Public
15 //  License along with this library; if not, write to the Free Software
16 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 //
21 //
22 //  File   : SMESHGUI_ComputeDlg.h
23 //  Author : Edward AGAPOV
24 //  Module : SMESH
25
26
27 #ifndef SMESHGUI_ComputeDlg_H
28 #define SMESHGUI_ComputeDlg_H
29
30 #include "SMESHGUI_Dialog.h"
31 #include "SMESHGUI_SelectionOp.h"
32
33 #include "VTKViewer.h"
34
35 #include "SALOMEconfig.h"
36 #include CORBA_SERVER_HEADER(GEOM_Gen)
37
38 class QFrame;
39 class QPushButton;
40 class QTable;
41 class QLabel;
42 class SMESHGUI_ComputeDlg;
43 class GEOM_Actor;
44
45 namespace SMESH {
46   class TShapeDisplayer;
47 }
48
49 /*!
50  * \brief Operation to compute a mesh and show computation errors
51  */
52 class SMESHGUI_ComputeOp: public SMESHGUI_Operation
53 {
54   Q_OBJECT
55
56 public:
57   SMESHGUI_ComputeOp();
58   virtual ~SMESHGUI_ComputeOp();
59
60   virtual LightApp_Dialog*       dlg() const;
61
62 protected:
63
64   virtual void                   startOperation();
65   virtual void                   stopOperation();
66
67 protected slots:
68   virtual bool                   onApply();
69
70 private slots:
71
72   void                           onPreviewShape();
73   void                           onPublishShape();
74   void                           currentCellChanged();
75
76 private:
77
78   QTable*                        table();
79
80   SMESHGUI_ComputeDlg*      myDlg;
81
82   GEOM::GEOM_Object_var     myMainShape;
83   SMESH::TShapeDisplayer*   myTShapeDisplayer;
84 };
85
86 /*!
87  * \brief Dialog to compute a mesh and show computation errors
88  */
89
90 class SMESHGUI_ComputeDlg : public SMESHGUI_Dialog
91 {
92   Q_OBJECT
93
94 public:
95                                SMESHGUI_ComputeDlg();
96
97   void                         SetMeshInfo(int nbNodes, int nbEdges, int nbFaces, int nbVolums);
98
99 private:
100
101   QFrame*                      createMainFrame   (QWidget*);
102
103   QTable*                      myTable;
104   QPushButton*                 myShowBtn;
105   QPushButton*                 myPublishBtn;
106
107   QLabel*                      myNbNodesLabel;
108   QLabel*                      myNbEdgesLabel;
109   QLabel*                      myNbFacesLabel;
110   QLabel*                      myNbVolumLabel;
111
112   QString                      myHelpFileName;
113
114   friend class SMESHGUI_ComputeOp;
115
116 };
117
118 #endif