smesh/src/SMESHGUI/SMESHGUI_ComputeDlg.h

162 lines
3.9 KiB
C
Raw Normal View History

2008-03-12 21:11:49 +05:00
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
2007-04-18 21:44:59 +06:00
//
2008-03-12 21:11:49 +05:00
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
2007-04-18 21:44:59 +06:00
//
2008-03-12 21:11:49 +05:00
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
2007-04-18 21:44:59 +06:00
//
2008-03-12 21:11:49 +05:00
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2007-04-18 21:44:59 +06:00
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
2008-03-12 21:11:49 +05:00
// File : SMESHGUI_ComputeDlg.h
// Author : Edward AGAPOV, Open CASCADE S.A.S.
2007-04-18 21:44:59 +06:00
//
2008-03-12 21:11:49 +05:00
#ifndef SMESHGUI_COMPUTEDLG_H
#define SMESHGUI_COMPUTEDLG_H
2007-04-18 21:44:59 +06:00
2008-03-12 21:11:49 +05:00
// SMESH includes
#include "SMESH_SMESHGUI.hxx"
2007-04-18 21:44:59 +06:00
#include "SMESHGUI_Dialog.h"
2008-03-12 21:11:49 +05:00
#include "SMESHGUI_Operation.h"
2007-04-18 21:44:59 +06:00
2008-03-12 21:11:49 +05:00
// Qt includes
#include <QGroupBox>
2007-04-18 21:44:59 +06:00
2008-03-12 21:11:49 +05:00
// IDL includes
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SMESH_Mesh)
2007-04-18 21:44:59 +06:00
class QFrame;
class QPushButton;
2008-03-12 21:11:49 +05:00
class QTableWidget;
2007-04-18 21:44:59 +06:00
class QLabel;
class SMESHGUI_ComputeDlg;
2008-03-12 21:11:49 +05:00
namespace SMESH
{
2007-04-18 21:44:59 +06:00
class TShapeDisplayer;
}
/*!
* \brief Operation to compute a mesh and show computation errors
*/
2008-03-12 21:11:49 +05:00
class SMESHGUI_EXPORT SMESHGUI_ComputeOp: public SMESHGUI_Operation
2007-04-18 21:44:59 +06:00
{
Q_OBJECT
public:
SMESHGUI_ComputeOp();
virtual ~SMESHGUI_ComputeOp();
virtual LightApp_Dialog* dlg() const;
protected:
virtual void startOperation();
virtual void stopOperation();
protected slots:
virtual bool onApply();
private slots:
void onPreviewShape();
void onPublishShape();
void currentCellChanged();
private:
2008-03-12 21:11:49 +05:00
QTableWidget* table();
2007-04-18 21:44:59 +06:00
2008-03-12 21:11:49 +05:00
SMESHGUI_ComputeDlg* myDlg;
2007-04-18 21:44:59 +06:00
2008-03-12 21:11:49 +05:00
GEOM::GEOM_Object_var myMainShape;
SMESH::TShapeDisplayer* myTShapeDisplayer;
2007-04-18 21:44:59 +06:00
};
/*!
* \brief Box showing mesh info
*/
2008-03-12 21:11:49 +05:00
class SMESHGUI_EXPORT SMESHGUI_MeshInfosBox : public QGroupBox
2007-04-18 21:44:59 +06:00
{
Q_OBJECT
2008-03-12 21:11:49 +05:00
2007-04-18 21:44:59 +06:00
public:
2008-03-12 21:11:49 +05:00
SMESHGUI_MeshInfosBox( const bool, QWidget* );
2007-04-18 21:44:59 +06:00
2008-03-12 21:11:49 +05:00
void SetInfoByMesh( SMESH::SMESH_Mesh_var );
2007-04-18 21:44:59 +06:00
private:
bool myFull;
QLabel* myNbNode;
2008-03-12 21:11:49 +05:00
QLabel* myNbEdge;
QLabel* myNbLinEdge;
QLabel* myNbQuadEdge;
QLabel* myNbTrai;
QLabel* myNbLinTrai;
QLabel* myNbQuadTrai;
QLabel* myNbQuad;
QLabel* myNbLinQuad;
QLabel* myNbQuadQuad;
QLabel* myNbFace;
QLabel* myNbLinFace;
QLabel* myNbQuadFace;
2007-04-18 21:44:59 +06:00
QLabel* myNbPolyg;
2008-03-12 21:11:49 +05:00
QLabel* myNbHexa;
QLabel* myNbLinHexa;
QLabel* myNbQuadHexa;
QLabel* myNbTetra;
QLabel* myNbLinTetra;
QLabel* myNbQuadTetra;
QLabel* myNbPyra;
QLabel* myNbLinPyra;
QLabel* myNbQuadPyra;
QLabel* myNbPrism;
QLabel* myNbLinPrism;
QLabel* myNbQuadPrism;
QLabel* myNbVolum;
QLabel* myNbLinVolum;
QLabel* myNbQuadVolum;
2007-04-18 21:44:59 +06:00
QLabel* myNbPolyh;
};
/*!
* \brief Dialog to compute a mesh and show computation errors
*/
2008-03-12 21:11:49 +05:00
class SMESHGUI_EXPORT SMESHGUI_ComputeDlg : public SMESHGUI_Dialog
2007-04-18 21:44:59 +06:00
{
Q_OBJECT
public:
2008-03-12 21:11:49 +05:00
SMESHGUI_ComputeDlg();
2007-04-18 21:44:59 +06:00
private:
2008-03-12 21:11:49 +05:00
QFrame* createMainFrame( QWidget* );
2007-04-18 21:44:59 +06:00
QLabel* myMeshName;
QGroupBox* myMemoryLackGroup;
QGroupBox* myCompErrorGroup;
QGroupBox* myHypErrorGroup;
QLabel* myHypErrorLabel;
2008-03-12 21:11:49 +05:00
QTableWidget* myTable;
2007-04-18 21:44:59 +06:00
QPushButton* myShowBtn;
QPushButton* myPublishBtn;
SMESHGUI_MeshInfosBox* myBriefInfo;
SMESHGUI_MeshInfosBox* myFullInfo;
friend class SMESHGUI_ComputeOp;
};
2008-03-12 21:11:49 +05:00
#endif // SMESHGUI_COMPUTEDLG_H