1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : SMESHGUI_ComputeDlg.h
23 // Author : Edward AGAPOV
27 #ifndef SMESHGUI_ComputeDlg_H
28 #define SMESHGUI_ComputeDlg_H
30 #include "SMESHGUI_Dialog.h"
31 #include "SMESHGUI_SelectionOp.h"
33 #include "VTKViewer.h"
35 #include "SALOMEconfig.h"
36 #include CORBA_SERVER_HEADER(GEOM_Gen)
38 #include <qgroupbox.h>
44 class SMESHGUI_ComputeDlg;
45 class SMESHGUI_MeshEditPreview;
49 class TShapeDisplayer;
53 * \brief Operation to compute a mesh and show computation errors
55 class SMESHGUI_ComputeOp: public SMESHGUI_Operation
61 virtual ~SMESHGUI_ComputeOp();
63 virtual LightApp_Dialog* dlg() const;
67 virtual void startOperation();
68 virtual void stopOperation();
71 virtual bool onApply();
75 void onPreviewShape();
76 void onPublishShape();
78 void currentCellChanged();
84 SMESHGUI_ComputeDlg* myDlg;
86 SMESH::SMESH_Mesh_var myMesh;
87 GEOM::GEOM_Object_var myMainShape;
88 SMESH::TShapeDisplayer* myTShapeDisplayer;
89 SMESHGUI_MeshEditPreview* myBadMeshDisplayer;
93 * \brief Box showing mesh info
96 class SMESHGUI_MeshInfosBox : public QGroupBox
101 SMESHGUI_MeshInfosBox(const bool full, QWidget* theParent);
102 void SetInfoByMesh(SMESH::SMESH_Mesh_var mesh);
108 QLabel* myNbEdge, *myNbLinEdge, *myNbQuadEdge;
109 QLabel* myNbTrai, *myNbLinTrai, *myNbQuadTrai;
110 QLabel* myNbQuad, *myNbLinQuad, *myNbQuadQuad;
111 QLabel* myNbFace, *myNbLinFace, *myNbQuadFace;
113 QLabel* myNbHexa, *myNbLinHexa, *myNbQuadHexa;
114 QLabel* myNbTetra, *myNbLinTetra, *myNbQuadTetra;
115 QLabel* myNbPyra, *myNbLinPyra, *myNbQuadPyra;
116 QLabel* myNbPrism, *myNbLinPrism, *myNbQuadPrism;
117 QLabel* myNbVolum, *myNbLinVolum, *myNbQuadVolum;
122 * \brief Dialog to compute a mesh and show computation errors
125 class SMESHGUI_ComputeDlg : public SMESHGUI_Dialog
130 SMESHGUI_ComputeDlg();
134 QFrame* createMainFrame (QWidget*);
137 QGroupBox* myMemoryLackGroup;
138 QGroupBox* myCompErrorGroup;
139 QGroupBox* myHypErrorGroup;
140 QLabel* myHypErrorLabel;
142 QPushButton* myShowBtn;
143 QPushButton* myPublishBtn;
144 QPushButton* myBadMeshBtn;
146 SMESHGUI_MeshInfosBox* myBriefInfo;
147 SMESHGUI_MeshInfosBox* myFullInfo;
149 friend class SMESHGUI_ComputeOp;