Represents mesh element information in the tree-like form. More...
#include <SMESHGUI_MeshInfo.h>
Data Structures | |
class | ItemDelegate |
Item delegate for tree mesh info widget. More... | |
Signals | |
void | itemInfo (int) |
void | itemInfo (const QString &) |
Public Member Functions | |
SMESHGUI_TreeElemInfo (QWidget *=0) | |
Constructor. More... | |
void | saveInfo (QTextStream &out) |
void | setSource (SMESH_Actor *) |
Set mesh data source (actor) More... | |
void | showInfo (long, bool) |
Show mesh element information. More... | |
void | showInfo (QSet< long >, bool) |
Show mesh element information. More... | |
void | clear () |
Clear mesh element information widget. More... | |
gp_XYZ | getGravityCenter (const SMDS_MeshElement *e) |
Protected Types | |
typedef QMap< int, QList< int > > | Connectivity |
Protected Member Functions | |
void | contextMenuEvent (QContextMenuEvent *e) |
void | information (const QList< long > &) |
Show mesh element information. More... | |
void | nodeInfo (const SMDS_MeshNode *, int, int, QTreeWidgetItem *) |
Show node information. More... | |
void | clearInternal () |
Internal clean-up (reset widget) More... | |
QWidget * | frame () const |
Get central area widget. More... | |
SMESH_Actor * | actor () const |
Get actor. More... | |
bool | isElements () const |
Get current info mode. More... | |
Connectivity | nodeConnectivity (const SMDS_MeshNode *) |
Get node connectivity. More... | |
QString | formatConnectivity (Connectivity, int) |
Format connectivity data to string representation. More... | |
XYZ | gravityCenter (const SMDS_MeshElement *) |
Calculate gravity center of the mesh element. More... | |
XYZ | normal (const SMDS_MeshElement *) |
Calculate normal vector to the mesh face. More... | |
Private Types | |
enum | { Bold = 0x01, All = 0x80 } |
Private Slots | |
void | itemDoubleClicked (QTreeWidgetItem *, int) |
void | saveExpanded (QTreeWidgetItem *) |
Private Member Functions | |
QTreeWidgetItem * | createItem (QTreeWidgetItem *=0, int=0) |
Create new tree item. More... | |
QString | expandedResource (QTreeWidgetItem *) |
Private Attributes | |
QTreeWidget * | myInfo |
Represents mesh element information in the tree-like form.
|
protectedinherited |
SMESHGUI_TreeElemInfo::SMESHGUI_TreeElemInfo | ( | QWidget * | parent = 0 | ) |
Constructor.
parent | parent widget |
References SMESHGUI_ElemInfo::frame(), itemDoubleClicked(), myInfo, and saveExpanded().
|
protectedinherited |
Get actor.
References SMESHGUI_ElemInfo::myActor.
Referenced by SMESHGUI_SimpleElemInfo::information(), information(), and SMESHGUI_ElemInfo::setSource().
|
inherited |
Clear mesh element information widget.
References SMESHGUI_ElemInfo::clearInternal(), SMESHGUI_ElemInfo::myIDs, SMESHGUI_ElemInfo::myIndex, and SMESHGUI_ElemInfo::updateControls().
Referenced by SMESHGUI_ElemInfo::setSource(), SMESHGUI_MeshInfoDlg::showInfo(), and SMESHGUI_ElemInfo::SMESHGUI_ElemInfo().
|
protectedvirtual |
Internal clean-up (reset widget)
Reimplemented from SMESHGUI_ElemInfo.
References myInfo.
Referenced by information().
|
protected |
References SMESHGUI_ElemInfo::itemInfo(), and myInfo.
|
private |
Create new tree item.
parent | parent tree widget item |
flags | item flag |
References All, Bold, expandedResource(), itemDepth(), myInfo, and SMESHGUI::resourceMgr().
Referenced by information(), and nodeInfo().
|
private |
References SMESHGUI_ElemInfo::isElements().
Referenced by createItem(), and saveExpanded().
|
protectedinherited |
Format connectivity data to string representation.
connectivity | connetivity map |
type | element type |
Referenced by SMESHGUI_SimpleElemInfo::information(), information(), and nodeInfo().
|
protectedinherited |
Get central area widget.
References SMESHGUI_ElemInfo::myFrame.
Referenced by SMESHGUI_SimpleElemInfo::SMESHGUI_SimpleElemInfo(), and SMESHGUI_TreeElemInfo().
|
inherited |
Referenced by SMESHGUI_MeshInfoDlg::idChanged().
|
protectedinherited |
Calculate gravity center of the mesh element.
element | mesh element |
References SMESHGUI_ElemInfo::XYZ::add(), SMESHGUI_ElemInfo::XYZ::divide(), SMDS_MeshElement::NbNodes(), SMDS_MeshElement::nodesIterator(), SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().
Referenced by SMESHGUI_SimpleElemInfo::information(), and information().
|
protectedvirtual |
Show mesh element information.
ids | mesh nodes / elements identifiers |
Implements SMESHGUI_ElemInfo.
References _PTR(), SMESHGUI_ElemInfo::actor(), All, Bold, clearInternal(), createItem(), EDGE, FACE, SMESHGUI_ElemInfo::formatConnectivity(), SMDS_MeshElement::GetEntityType(), SMDS_VolumeTool::GetFaceNodes(), SMDS_MeshElement::GetGeomType(), SMESH_Actor::GetObject(), SMDS_MeshElement::GetType(), SMESHGUI_ElemInfo::gravityCenter(), SMESHGUI_ElemInfo::isElements(), SMDS_MeshElement::IsPoly(), SMDS_MeshElement::IsQuadratic(), SMDS_VolumeTool::NbFaceNodes(), SMDS_VolumeTool::NbFaces(), SMDS_MeshElement::NbNodes(), SMDS_VtkVolume::NbUniqueNodes(), SMESH::NODE, SMESHGUI_ElemInfo::nodeConnectivity(), nodeInfo(), SMDS_MeshElement::nodesIterator(), SMESHGUI_ElemInfo::normal(), SMESHGUI::resourceMgr(), SMESH::ElementPosition::shapeID, SMESH::ElementPosition::shapeType, SMDSAbs_0DElement, SMDSAbs_Ball, SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Volume, SMDSEntity_BiQuad_Quadrangle, SMDSEntity_BiQuad_Triangle, SMDSEntity_Hexa, SMDSEntity_Hexagonal_Prism, SMDSEntity_Penta, SMDSEntity_Polygon, SMDSEntity_Polyhedra, SMDSEntity_Pyramid, SMDSEntity_Quad_Hexa, SMDSEntity_Quad_Penta, SMDSEntity_Quad_Polygon, SMDSEntity_Quad_Polyhedra, SMDSEntity_Quad_Pyramid, SMDSEntity_Quad_Quadrangle, SMDSEntity_Quad_Tetra, SMDSEntity_Quad_Triangle, SMDSEntity_Quadrangle, SMDSEntity_Tetra, SMDSEntity_Triangle, SMDSEntity_TriQuad_Hexa, SMDSGeom_POLYHEDRA, SObject(), SMDS_VtkVolume::uniqueNodesIterator(), SMDS_MeshNode::X(), SMESHGUI_ElemInfo::XYZ::x(), SMDS_MeshNode::Y(), SMESHGUI_ElemInfo::XYZ::y(), SMDS_MeshNode::Z(), and SMESHGUI_ElemInfo::XYZ::z().
|
protectedinherited |
Get current info mode.
true
if mesh element information is shown or false
if node information is shown References SMESHGUI_ElemInfo::myIsElement.
Referenced by expandedResource(), SMESHGUI_SimpleElemInfo::information(), and information().
|
privateslot |
References SMESHGUI_ElemInfo::itemInfo().
Referenced by SMESHGUI_TreeElemInfo().
|
signalinherited |
Referenced by contextMenuEvent(), and itemDoubleClicked().
|
signalinherited |
|
protectedinherited |
Get node connectivity.
node | mesh node |
References SMDS_MeshElement::GetID(), SMDS_MeshNode::GetInverseElementIterator(), and SMDS_MeshElement::GetType().
Referenced by SMESHGUI_SimpleElemInfo::information(), information(), and nodeInfo().
|
protected |
Show node information.
node | mesh node for showing |
index | index of current node |
nbNodes | number of unique nodes in element |
parentItem | parent item of tree |
References Bold, createItem(), SMESHGUI_ElemInfo::formatConnectivity(), SMDS_MeshElement::GetID(), SMESHGUI_ElemInfo::nodeConnectivity(), SMESHGUI::resourceMgr(), SMDSAbs_0DElement, SMDSAbs_Ball, SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Volume, SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().
Referenced by information().
|
protectedinherited |
Calculate normal vector to the mesh face.
element | mesh face |
References SMESH::getNormale().
Referenced by SMESHGUI_SimpleElemInfo::information(), and information().
|
privateslot |
References expandedResource(), and SMESHGUI::resourceMgr().
Referenced by SMESHGUI_TreeElemInfo().
|
virtual |
Implements SMESHGUI_ElemInfo.
References itemDepth(), and myInfo.
|
inherited |
Set mesh data source (actor)
actor | mesh object actor |
References SMESHGUI_ElemInfo::actor(), SMESHGUI_ElemInfo::clear(), SMESHGUI_ElemInfo::myActor, and SMESHGUI_ElemInfo::myIsElement.
Referenced by SMESHGUI_MeshInfoDlg::showInfo().
|
inherited |
Show mesh element information.
id | mesh node / element ID |
isElem | show mesh element information if true or mesh node information if false |
Referenced by SMESHGUI_MeshInfoDlg::idChanged(), and SMESHGUI_MeshInfoDlg::showInfo().
|
inherited |
Show mesh element information.
ids | mesh nodes / elements identifiers |
isElem | show mesh element information if true or mesh node information if false |
References SMESHGUI_ElemInfo::information(), SMESHGUI_ElemInfo::myIDs, SMESHGUI_ElemInfo::myIndex, SMESHGUI_ElemInfo::myIsElement, and SMESHGUI_ElemInfo::updateControls().
|
private |
Referenced by clearInternal(), contextMenuEvent(), createItem(), saveInfo(), and SMESHGUI_TreeElemInfo().