Version: 9.12.0
SMESHGUI_SimpleElemInfo Class Reference

Show mesh element information in the simple text area. More...

#include <SMESHGUI_MeshInfo.h>

Inheritance diagram for SMESHGUI_SimpleElemInfo:

Signals

void itemInfo (int type, const QString &ids)
 

Public Member Functions

 SMESHGUI_SimpleElemInfo (QWidget *=0)
 Constructor. 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

void information (const QList< uint > &)
 Show mesh element information. More...
 
void clearInternal ()
 Internal clean-up (reset widget) More...
 
QWidgetcentralWidget () 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...
 

Private Slots

void connectivityClicked (const QUrl &)
 
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

QTextBrowser * myInfo
 
QWidgetmyFrame
 
ExtraWidgetmyExtra
 
SMESH::SelectionProxy myProxy
 
int myWhat
 
QList< uint > myIDs
 
int myIndex
 

Detailed Description

Show mesh element information in the simple text area.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
ShowNone 
ShowNodes 
ShowElements 

Constructor & Destructor Documentation

◆ SMESHGUI_SimpleElemInfo()

SMESHGUI_SimpleElemInfo::SMESHGUI_SimpleElemInfo ( QWidget parent = 0)

Constructor.

Parameters
parentParent widget. Defaults to 0.

References SMESHGUI_ElemInfo::centralWidget(), connectivityClicked(), and myInfo.

Member Function Documentation

◆ centralWidget()

QWidget * SMESHGUI_ElemInfo::centralWidget ( ) const
protectedinherited

Get central area widget.

Returns
Central widget.

References SMESHGUI_ElemInfo::myFrame.

Referenced by SMESHGUI_SimpleElemInfo(), and SMESHGUI_TreeElemInfo::SMESHGUI_TreeElemInfo().

◆ clear()

◆ clearInternal()

void SMESHGUI_SimpleElemInfo::clearInternal ( )
protectedvirtual

Internal clean-up (reset widget)

Reimplemented from SMESHGUI_ElemInfo.

References myInfo.

Referenced by information().

◆ connectivityClicked

void SMESHGUI_SimpleElemInfo::connectivityClicked ( const QUrl &  url)
privateslot

◆ ctrl2str()

QString SMESHGUI_ElemInfo::ctrl2str ( int  control)
protectedinherited

◆ etype2str()

◆ information()

void SMESHGUI_SimpleElemInfo::information ( const QList< uint > &  ids)
protectedvirtual

Show mesh element information.

Parameters
idsNodes / elements IDs.

Implements SMESHGUI_ElemInfo.

References clearInternal(), myInfo, and SMESHGUI_ElemInfo::writeInfo().

◆ itemInfo

void SMESHGUI_ElemInfo::itemInfo ( int  type,
const QString &  ids 
)
signalinherited

◆ proxy()

SMESH::SelectionProxy SMESHGUI_ElemInfo::proxy ( ) const
protectedinherited

Get current mesh proxy object information is shown on.

Returns
Current proxy.

References SMESHGUI_ElemInfo::myProxy.

Referenced by SMESHGUI_ElemInfo::showInfo(), and SMESHGUI_ElemInfo::writeInfo().

◆ saveInfo()

void SMESHGUI_ElemInfo::saveInfo ( QTextStream &  out)
virtualinherited

Write information from panel to output stream.

Parameters
outText stream output.

Implements SMESHGUI_Info.

References SMESHGUI_ElemInfo::myIDs, and SMESHGUI_ElemInfo::writeInfo().

Referenced by SMESHGUI_MeshInfoDlg::dump().

◆ showInfo() [1/3]

void SMESHGUI_ElemInfo::showInfo ( const SMESH::SelectionProxy proxy)
inherited

Show information on given group.

Parameters
proxyObject to compute information on (group).

References SMESH::ALL, SMESHGUI_ElemInfo::clear(), SMESH::SelectionProxy::groupElementType(), SMESH::SelectionProxy::ids(), SMESH::NODE, SMESHGUI_ElemInfo::proxy(), and SMESHGUI_ElemInfo::showInfo().

◆ showInfo() [2/3]

void SMESHGUI_ElemInfo::showInfo ( const SMESH::SelectionProxy proxy,
QSet< uint >  ids,
bool  isElement 
)
inherited

Show information on given nodes / elements.

Parameters
proxyObject to compute information on (mesh, sub-mesh, group, ID source).
idsMesh nodes / elements IDs.
isElementIf true, show element info; otherwise show node info.

References SMESHGUI_ElemInfo::clear(), SMESHGUI_ElemInfo::information(), SMESHGUI_ElemInfo::myIDs, SMESHGUI_ElemInfo::myIndex, SMESHGUI_ElemInfo::myProxy, SMESHGUI_ElemInfo::myWhat, SMESHGUI_ElemInfo::proxy(), SMESH::SelectionProxy::refresh(), SMESHGUI_ElemInfo::ShowElements, SMESHGUI_ElemInfo::ShowNodes, SMESHGUI_ElemInfo::updateControls(), and SMESHGUI_ElemInfo::what().

◆ showInfo() [3/3]

void SMESHGUI_ElemInfo::showInfo ( const SMESH::SelectionProxy proxy,
uint  id,
bool  isElement 
)
inherited

Show information on given node / element.

Parameters
proxyObject to compute information on (mesh, sub-mesh, group, ID source).
idMesh node / element ID.
isElementIf true, show element info; otherwise show node info.

References SMESHGUI_ElemInfo::proxy().

Referenced by SMESHGUI_MeshInfoDlg::idChanged(), SMESHGUI_ElemInfo::showInfo(), and SMESHGUI_MeshInfoDlg::showInfo().

◆ showNext

void SMESHGUI_ElemInfo::showNext ( )
privateslotinherited

◆ showPrevious

void SMESHGUI_ElemInfo::showPrevious ( )
privateslotinherited

◆ stype2str()

QString SMESHGUI_ElemInfo::stype2str ( int  type)
protectedinherited

Get title for given shape type.

Parameters
typeShape type.
Returns
Shape type's title.

References EDGE, and FACE.

Referenced by SMESHGUI_ElemInfo::writeInfo().

◆ type2str()

QString SMESHGUI_ElemInfo::type2str ( int  type,
bool  multiple = false 
)
protectedinherited

Get title for given element type.

Parameters
typeMesh element type.
multipleUse plural form. Defaults to false.
Returns
Element type's title.

References SMDSAbs_0DElement, SMDSAbs_Ball, SMDSAbs_Edge, SMDSAbs_Face, and SMDSAbs_Volume.

Referenced by SMESHGUI_ElemInfo::writeInfo().

◆ updateControls

◆ what()

int SMESHGUI_ElemInfo::what ( ) const
protectedinherited

Get current info mode.

Returns
Current panel mode.

References SMESHGUI_ElemInfo::myWhat.

Referenced by SMESHGUI_TreeElemInfo::expandedResource(), SMESHGUI_ElemInfo::showInfo(), and SMESHGUI_ElemInfo::writeInfo().

◆ writeInfo()

void SMESHGUI_ElemInfo::writeInfo ( InfoWriter writer,
const QList< uint > &  ids 
)
protectedinherited

Write information on given mesh nodes / elements.

Parameters
writerInformation writer.
idsNodes / elements IDs.

References SMESH::ALL, SMESH::SelectionProxy::color(), SMESHGUI_ElemInfo::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, SMESHGUI_ElemInfo::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(), SMESHGUI_ElemInfo::proxy(), SMESHGUI::resourceMgr(), InfoWriter::separator(), SMESH::Position::shapeId(), SMESH::SelectionProxy::shapeName(), SMESH::Position::shapeType(), SMESHGUI_ElemInfo::ShowElements, SMESHGUI_ElemInfo::ShowNodes, SMESH::SelectionProxy::size(), SMDSAbs_Ball, SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Node, SMESHGUI_ElemInfo::stype2str(), SMESH::SelectionProxy::type(), SMESHGUI_ElemInfo::type2str(), SMESH::Position::u(), InfoWriter::unindent(), SMESH::Position::v(), SMESHGUI_ElemInfo::what(), and InfoWriter::write().

Referenced by information(), SMESHGUI_TreeElemInfo::information(), and SMESHGUI_ElemInfo::saveInfo().

Field Documentation

◆ myExtra

ExtraWidget* SMESHGUI_ElemInfo::myExtra
privateinherited

◆ myFrame

QWidget* SMESHGUI_ElemInfo::myFrame
privateinherited

◆ myIDs

◆ myIndex

◆ myInfo

QTextBrowser* SMESHGUI_SimpleElemInfo::myInfo
private

◆ myProxy

SMESH::SelectionProxy SMESHGUI_ElemInfo::myProxy
privateinherited

◆ myWhat

int SMESHGUI_ElemInfo::myWhat
privateinherited