1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : SMESHGUI_ComputeDlg.h
23 // Author : Edward AGAPOV
26 #ifndef SMESHGUI_ComputeDlg_H
27 #define SMESHGUI_ComputeDlg_H
29 #include "SMESHGUI_Dialog.h"
30 #include "SMESHGUI_SelectionOp.h"
32 #include "VTKViewer.h"
34 #include "SALOMEconfig.h"
35 #include CORBA_SERVER_HEADER(GEOM_Gen)
37 #include <qgroupbox.h>
43 class SMESHGUI_ComputeDlg;
44 class SMESHGUI_MeshEditPreview;
48 class TShapeDisplayer;
52 * \brief Operation to compute a mesh and show computation errors
54 class SMESHGUI_ComputeOp: public SMESHGUI_Operation
60 virtual ~SMESHGUI_ComputeOp();
62 virtual LightApp_Dialog* dlg() const;
66 virtual void startOperation();
67 virtual void stopOperation();
70 virtual bool onApply();
74 void onPreviewShape();
75 void onPublishShape();
77 void currentCellChanged();
83 SMESHGUI_ComputeDlg* myDlg;
85 SMESH::SMESH_Mesh_var myMesh;
86 GEOM::GEOM_Object_var myMainShape;
87 SMESH::TShapeDisplayer* myTShapeDisplayer;
88 SMESHGUI_MeshEditPreview* myBadMeshDisplayer;
92 * \brief Box showing mesh info
95 class SMESHGUI_MeshInfosBox : public QGroupBox
100 SMESHGUI_MeshInfosBox(const bool full, QWidget* theParent);
101 void SetInfoByMesh(SMESH::SMESH_Mesh_var mesh);
107 QLabel* myNbEdge, *myNbLinEdge, *myNbQuadEdge;
108 QLabel* myNbTrai, *myNbLinTrai, *myNbQuadTrai;
109 QLabel* myNbQuad, *myNbLinQuad, *myNbQuadQuad;
110 QLabel* myNbFace, *myNbLinFace, *myNbQuadFace;
112 QLabel* myNbHexa, *myNbLinHexa, *myNbQuadHexa;
113 QLabel* myNbTetra, *myNbLinTetra, *myNbQuadTetra;
114 QLabel* myNbPyra, *myNbLinPyra, *myNbQuadPyra;
115 QLabel* myNbPrism, *myNbLinPrism, *myNbQuadPrism;
116 QLabel* myNbVolum, *myNbLinVolum, *myNbQuadVolum;
121 * \brief Dialog to compute a mesh and show computation errors
124 class SMESHGUI_ComputeDlg : public SMESHGUI_Dialog
129 SMESHGUI_ComputeDlg();
133 QFrame* createMainFrame (QWidget*);
136 QGroupBox* myMemoryLackGroup;
137 QGroupBox* myCompErrorGroup;
138 QGroupBox* myHypErrorGroup;
139 QLabel* myHypErrorLabel;
141 QPushButton* myShowBtn;
142 QPushButton* myPublishBtn;
143 QPushButton* myBadMeshBtn;
145 SMESHGUI_MeshInfosBox* myBriefInfo;
146 SMESHGUI_MeshInfosBox* myFullInfo;
148 friend class SMESHGUI_ComputeOp;