X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_MeshInfo.h;h=a63e205cfa26e2e4e26c82f4a7bb48b2f7bb7939;hb=da4fe2a060153eadccd50faeec22f80b0613fd80;hp=2028fb0507ee9d7e9514b7784036647819be3916;hpb=2de294b09ac8b9ace071a01db9cb4e235f1eadbb;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_MeshInfo.h b/src/SMESHGUI/SMESHGUI_MeshInfo.h index 2028fb050..a63e205cf 100644 --- a/src/SMESHGUI/SMESHGUI_MeshInfo.h +++ b/src/SMESHGUI/SMESHGUI_MeshInfo.h @@ -1,23 +1,23 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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. +// 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. // -// 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. +// 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. // -// 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 +// 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 // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : SMESHGUI_MeshInfo.h // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) @@ -33,10 +33,12 @@ #include #include #include +#include #include #include #include CORBA_SERVER_HEADER(SMESH_Mesh) +#include CORBA_SERVER_HEADER(SMESH_Group) class QButtonGroup; class QLabel; @@ -44,8 +46,6 @@ class QLineEdit; class QPushButton; class QTabWidget; class QTextBrowser; -class QTreeWidget; -class QTreeWidgetItem; class SMESH_Actor; class SMDS_MeshNode; class SMDS_MeshElement; @@ -80,6 +80,7 @@ class SMESHGUI_EXPORT SMESHGUI_MeshInfo : public QFrame i3DHexahedrons, i3DPyramids, i3DPrisms, + i3DHexaPrisms, i3DPolyhedrons, i3DEnd, iElementsEnd = i3DEnd @@ -110,8 +111,12 @@ private: void setFontAttributes( QWidget*, int, bool = true ); void setFieldsVisible( int, int, bool ); +private slots: + void loadMesh(); + private: - iwlist myWidgets; + iwlist myWidgets; + QPushButton* myLoadBtn; }; class SMESHGUI_EXPORT SMESHGUI_ElemInfo : public QWidget @@ -185,6 +190,8 @@ class SMESHGUI_EXPORT SMESHGUI_TreeElemInfo : public SMESHGUI_ElemInfo { class ItemDelegate; + enum { Bold = 0x01, All = 0x80 }; + public: SMESHGUI_TreeElemInfo( QWidget* = 0 ); @@ -193,12 +200,53 @@ protected: void clearInternal(); private: - QTreeWidgetItem* createItem( QTreeWidgetItem* = 0, int = 100 ); + QTreeWidgetItem* createItem( QTreeWidgetItem* = 0, int = 0 ); private: QTreeWidget* myInfo; }; +class GrpComputor: public QObject +{ + Q_OBJECT; + +public: + GrpComputor( SMESH::SMESH_GroupBase_ptr, QTreeWidgetItem*, QObject* ); + QTreeWidgetItem* getItem() { return myItem; } + +public slots: + void compute(); + +private: + SMESH::SMESH_GroupBase_var myGroup; + QTreeWidgetItem* myItem; +}; + +class SMESHGUI_EXPORT SMESHGUI_AddInfo : public QTreeWidget +{ + Q_OBJECT; + + enum { Bold = 0x01, All = 0x80 }; + +public: + SMESHGUI_AddInfo( QWidget* = 0 ); + ~SMESHGUI_AddInfo(); + + void showInfo( SMESH::SMESH_IDSource_ptr ); + // void clear(); +private slots: + void changeLoadToCompute(); + +private: + QTreeWidgetItem* createItem( QTreeWidgetItem* = 0, int = 0 ); + void meshInfo( SMESH::SMESH_Mesh_ptr, QTreeWidgetItem* ); + void subMeshInfo( SMESH::SMESH_subMesh_ptr, QTreeWidgetItem* ); + void groupInfo( SMESH::SMESH_GroupBase_ptr, QTreeWidgetItem* ); + +private: + QList myComputors; +}; + class SMESHGUI_EXPORT SMESHGUI_MeshInfoDlg : public QDialog { Q_OBJECT; @@ -209,7 +257,8 @@ public: //! Information type enum { BaseInfo, //!< base mesh information - ElemInfo //!< mesh element information + ElemInfo, //!< mesh element information + AddInfo //!< additional information }; SMESHGUI_MeshInfoDlg( QWidget* = 0, int = BaseInfo ); @@ -237,6 +286,7 @@ private: QButtonGroup* myMode; QLineEdit* myID; SMESHGUI_ElemInfo* myElemInfo; + SMESHGUI_AddInfo* myAddInfo; SMESH_Actor* myActor; };