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, Open CASCADE S.A.S.
25 #ifndef SMESHGUI_COMPUTEDLG_H
26 #define SMESHGUI_COMPUTEDLG_H
29 #include "SMESH_SMESHGUI.hxx"
31 #include "SMESHGUI_Dialog.h"
32 #include "SMESHGUI_Operation.h"
38 #include <SALOMEconfig.h>
39 #include CORBA_SERVER_HEADER(SMESH_Mesh)
45 class SMESHGUI_ComputeDlg;
46 class SMESHGUI_MeshEditPreview;
50 class TShapeDisplayer;
54 * \brief Operation to compute a mesh and show computation errors
56 class SMESHGUI_EXPORT SMESHGUI_ComputeOp: public SMESHGUI_Operation
62 virtual ~SMESHGUI_ComputeOp();
64 virtual LightApp_Dialog* dlg() const;
67 virtual void startOperation();
68 virtual void stopOperation();
71 virtual bool onApply();
74 void onPreviewShape();
75 void onPublishShape();
77 void currentCellChanged();
80 QTableWidget* table();
82 SMESHGUI_ComputeDlg* myDlg;
84 SMESH::SMESH_Mesh_var myMesh;
85 GEOM::GEOM_Object_var myMainShape;
86 SMESH::TShapeDisplayer* myTShapeDisplayer;
87 SMESHGUI_MeshEditPreview* myBadMeshDisplayer;
91 * \brief Box showing mesh info
94 class SMESHGUI_EXPORT SMESHGUI_MeshInfosBox : public QGroupBox
99 SMESHGUI_MeshInfosBox( const bool, QWidget* );
101 void SetInfoByMesh( SMESH::SMESH_Mesh_var );
108 QLabel* myNbQuadEdge;
111 QLabel* myNbQuadTrai;
114 QLabel* myNbQuadQuad;
117 QLabel* myNbQuadFace;
121 QLabel* myNbQuadHexa;
123 QLabel* myNbLinTetra;
124 QLabel* myNbQuadTetra;
127 QLabel* myNbQuadPyra;
129 QLabel* myNbLinPrism;
130 QLabel* myNbQuadPrism;
132 QLabel* myNbLinVolum;
133 QLabel* myNbQuadVolum;
138 * \brief Dialog to compute a mesh and show computation errors
141 class SMESHGUI_EXPORT SMESHGUI_ComputeDlg : public SMESHGUI_Dialog
146 SMESHGUI_ComputeDlg();
149 QFrame* createMainFrame( QWidget* );
152 QGroupBox* myMemoryLackGroup;
153 QGroupBox* myCompErrorGroup;
154 QGroupBox* myHypErrorGroup;
155 QLabel* myHypErrorLabel;
156 QTableWidget* myTable;
157 QPushButton* myShowBtn;
158 QPushButton* myPublishBtn;
159 QPushButton* myBadMeshBtn;
161 SMESHGUI_MeshInfosBox* myBriefInfo;
162 SMESHGUI_MeshInfosBox* myFullInfo;
164 friend class SMESHGUI_ComputeOp;
167 #endif // SMESHGUI_COMPUTEDLG_H