Base class for the mesh element information widget. More...
#include <SMESHGUI_MeshInfo.h>
Signals | |
void | itemInfo (int type, const QString &ids) |
Public Member Functions | |
SMESHGUI_ElemInfo (QWidget *=0) | |
Constructor. More... | |
~SMESHGUI_ElemInfo () | |
Destructor. More... | |
void | showInfo (const SMESH::SelectionProxy &, uint, bool) |
Show information on given node / element. More... | |
void | showInfo (const SMESH::SelectionProxy &, QSet< uint >, bool) |
Show information on given nodes / elements. More... | |
void | showInfo (const SMESH::SelectionProxy &) |
Show information on given group. More... | |
void | clear () |
Reset panel (clear all data). More... | |
void | saveInfo (QTextStream &) |
Write information from panel to output stream. More... | |
Protected Types | |
enum | { ShowNone , ShowNodes , ShowElements } |
Protected Member Functions | |
QWidget * | centralWidget () const |
Get central area widget. More... | |
SMESH::SelectionProxy | proxy () const |
Get current mesh proxy object information is shown on. More... | |
int | what () const |
Get current info mode. More... | |
QString | type2str (int, bool=false) |
Get title for given element type. More... | |
QString | stype2str (int) |
Get title for given shape type. More... | |
QString | etype2str (int) |
Get title for given element type. More... | |
QString | ctrl2str (int) |
Get title for given quality control. More... | |
void | writeInfo (InfoWriter *, const QList< uint > &) |
Write information on given mesh nodes / elements. More... | |
virtual void | information (const QList< uint > &)=0 |
Show information on given mesh nodes / elements. More... | |
virtual void | clearInternal () |
Internal clean-up (reset panel). More... | |
Private Slots | |
void | showPrevious () |
Show previous chunk of information. More... | |
void | showNext () |
Show next chunk of information. More... | |
void | updateControls () |
Update control widget state. More... | |
Private Attributes | |
QWidget * | myFrame |
ExtraWidget * | myExtra |
SMESH::SelectionProxy | myProxy |
int | myWhat |
QList< uint > | myIDs |
int | myIndex |
Base class for the mesh element information widget.
Displays the detail information about given mesh node(s) or element(s). Default class does not provide working implementation but onle general functionalities; main work is done in sub-classes.
SMESHGUI_ElemInfo::SMESHGUI_ElemInfo | ( | QWidget * | parent = 0 | ) |
Constructor.
parent | Parent widget. Defaults to 0. |
References clear(), myExtra, myFrame, ExtraWidget::next, ExtraWidget::prev, showNext(), showPrevious(), and SPACING.
SMESHGUI_ElemInfo::~SMESHGUI_ElemInfo | ( | ) |
Destructor.
|
protected |
Get central area widget.
References myFrame.
Referenced by SMESHGUI_SimpleElemInfo::SMESHGUI_SimpleElemInfo(), and SMESHGUI_TreeElemInfo::SMESHGUI_TreeElemInfo().
void SMESHGUI_ElemInfo::clear | ( | ) |
Reset panel (clear all data).
References clearInternal(), myIDs, myIndex, and updateControls().
Referenced by SMESHGUI_MeshInfoDlg::showInfo(), showInfo(), and SMESHGUI_ElemInfo().
|
protectedvirtual |
Internal clean-up (reset panel).
Default implementation does nothing; the method has to be redefined in sub-classes to perform internal clean-up.
Reimplemented in SMESHGUI_TreeElemInfo, and SMESHGUI_SimpleElemInfo.
Referenced by clear().
|
protected |
Get title for given quality control.
type | Mesh control type. |
References SMESH::FT_Area, SMESH::FT_AspectRatio, SMESH::FT_AspectRatio3D, SMESH::FT_BallDiameter, SMESH::FT_Length, SMESH::FT_Length2D, SMESH::FT_Length3D, SMESH::FT_MaxElementLength2D, SMESH::FT_MaxElementLength3D, SMESH::FT_MinimumAngle, SMESH::FT_ScaledJacobian, SMESH::FT_Skew, SMESH::FT_Taper, SMESH::FT_Volume3D, and SMESH::FT_Warping.
Referenced by writeInfo().
|
protected |
Get title for given element type.
type | Mesh element type. |
References SMESH::Entity_0D, SMESH::Entity_Ball, SMESH::Entity_BiQuad_Penta, SMESH::Entity_BiQuad_Quadrangle, SMESH::Entity_BiQuad_Triangle, SMESH::Entity_Edge, SMESH::Entity_Hexa, SMESH::Entity_Hexagonal_Prism, SMESH::Entity_Penta, SMESH::Entity_Polygon, SMESH::Entity_Polyhedra, SMESH::Entity_Pyramid, SMESH::Entity_Quad_Edge, SMESH::Entity_Quad_Hexa, SMESH::Entity_Quad_Penta, SMESH::Entity_Quad_Polygon, SMESH::Entity_Quad_Polyhedra, SMESH::Entity_Quad_Pyramid, SMESH::Entity_Quad_Quadrangle, SMESH::Entity_Quad_Tetra, SMESH::Entity_Quad_Triangle, SMESH::Entity_Quadrangle, SMESH::Entity_Tetra, SMESH::Entity_Triangle, and SMESH::Entity_TriQuad_Hexa.
Referenced by writeInfo().
|
protectedpure virtual |
Show information on given mesh nodes / elements.
This function has to be redefined in sub-classes.
ids | Nodes / elements IDs. |
Implemented in SMESHGUI_TreeElemInfo, and SMESHGUI_SimpleElemInfo.
Referenced by showInfo(), showNext(), and showPrevious().
|
signal |
|
protected |
Get current mesh proxy object information is shown on.
References myProxy.
Referenced by showInfo(), and writeInfo().
|
virtual |
Write information from panel to output stream.
out | Text stream output. |
Implements SMESHGUI_Info.
References myIDs, and writeInfo().
Referenced by SMESHGUI_MeshInfoDlg::dump().
void SMESHGUI_ElemInfo::showInfo | ( | const SMESH::SelectionProxy & | proxy | ) |
Show information on given group.
proxy | Object to compute information on (group). |
References SMESH::ALL, clear(), SMESH::SelectionProxy::groupElementType(), SMESH::SelectionProxy::ids(), SMESH::NODE, proxy(), and showInfo().
void SMESHGUI_ElemInfo::showInfo | ( | const SMESH::SelectionProxy & | proxy, |
QSet< uint > | ids, | ||
bool | isElement | ||
) |
Show information on given nodes / elements.
proxy | Object to compute information on (mesh, sub-mesh, group, ID source). |
ids | Mesh nodes / elements IDs. |
isElement | If true , show element info; otherwise show node info. |
References clear(), information(), myIDs, myIndex, myProxy, myWhat, proxy(), SMESH::SelectionProxy::refresh(), ShowElements, ShowNodes, updateControls(), and what().
void SMESHGUI_ElemInfo::showInfo | ( | const SMESH::SelectionProxy & | proxy, |
uint | id, | ||
bool | isElement | ||
) |
Show information on given node / element.
proxy | Object to compute information on (mesh, sub-mesh, group, ID source). |
id | Mesh node / element ID. |
isElement | If true , show element info; otherwise show node info. |
References proxy().
Referenced by SMESHGUI_MeshInfoDlg::idChanged(), showInfo(), and SMESHGUI_MeshInfoDlg::showInfo().
|
privateslot |
Show next chunk of information.
References information(), myIDs, myIndex, and updateControls().
Referenced by SMESHGUI_ElemInfo().
|
privateslot |
Show previous chunk of information.
References information(), myIDs, myIndex, and updateControls().
Referenced by SMESHGUI_ElemInfo().
|
protected |
Get title for given shape type.
type | Shape type. |
Referenced by writeInfo().
|
protected |
Get title for given element type.
type | Mesh element type. |
multiple | Use plural form. Defaults to false . |
References SMDSAbs_0DElement, SMDSAbs_Ball, SMDSAbs_Edge, SMDSAbs_Face, and SMDSAbs_Volume.
Referenced by writeInfo().
|
privateslot |
Update control widget state.
References myExtra, myIDs, myIndex, and ExtraWidget::updateControls().
Referenced by clear(), showInfo(), showNext(), and showPrevious().
|
protected |
Get current info mode.
References myWhat.
Referenced by SMESHGUI_TreeElemInfo::expandedResource(), showInfo(), and writeInfo().
|
protected |
Write information on given mesh nodes / elements.
writer | Information writer. |
ids | Nodes / elements IDs. |
References SMESH::ALL, SMESH::SelectionProxy::color(), ctrl2str(), SMESH::SelectionProxy::elementConnectivity(), SMESH::SelectionProxy::elementEntityType(), SMESH::SelectionProxy::elementGravityCenter(), SMESH::SelectionProxy::elementGroups(), SMESH::SelectionProxy::elementNormal(), SMESH::SelectionProxy::elementPosition(), SMESH::SelectionProxy::elementType(), SMESH::Entity_Polyhedra, SMESH::Entity_Quad_Polyhedra, etype2str(), SMESH::FT_AspectRatio, SMESH::FT_Undefined, SMESH::SelectionProxy::GroupFilter, SMESH::SelectionProxy::GroupGeom, SMESH::SelectionProxy::GroupStd, SMESH::Position::hasU(), SMESH::Position::hasV(), InfoWriter::indent(), SMESH::Position::isValid(), SMESH::SelectionProxy::name(), SMESH::SelectionProxy::nodeConnectivity(), SMESH::SelectionProxy::nodeCoordinates(), SMESH::SelectionProxy::nodeGroups(), SMESH::SelectionProxy::nodePosition(), SMESH::SelectionProxy::perFaceConnectivity(), proxy(), SMESHGUI::resourceMgr(), InfoWriter::separator(), SMESH::Position::shapeId(), SMESH::SelectionProxy::shapeName(), SMESH::Position::shapeType(), ShowElements, ShowNodes, SMESH::SelectionProxy::size(), SMDSAbs_Ball, SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Node, stype2str(), SMESH::SelectionProxy::type(), type2str(), SMESH::Position::u(), InfoWriter::unindent(), SMESH::Position::v(), what(), and InfoWriter::write().
Referenced by SMESHGUI_SimpleElemInfo::information(), SMESHGUI_TreeElemInfo::information(), and saveInfo().
|
private |
Referenced by SMESHGUI_ElemInfo(), and updateControls().
|
private |
Referenced by centralWidget(), and SMESHGUI_ElemInfo().
|
private |
Referenced by clear(), saveInfo(), showInfo(), showNext(), showPrevious(), and updateControls().
|
private |
Referenced by clear(), showInfo(), showNext(), showPrevious(), and updateControls().
|
private |
Referenced by proxy(), and showInfo().
|
private |
Referenced by showInfo(), and what().