Base class for the mesh element information widget. More...
#include <SMESHGUI_MeshInfo.h>
Data Structures | |
struct | XYZ |
Signals | |
void | itemInfo (int) |
void | itemInfo (const QString &) |
Public Member Functions | |
SMESHGUI_ElemInfo (QWidget *=0) | |
Constructor. More... | |
~SMESHGUI_ElemInfo () | |
Destructor. More... | |
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... | |
virtual void | saveInfo (QTextStream &out)=0 |
gp_XYZ | getGravityCenter (const SMDS_MeshElement *e) |
Protected Types | |
typedef QMap< int, QList< int > > | Connectivity |
Protected Member Functions | |
QWidget * | frame () const |
Get central area widget. More... | |
SMESH_Actor * | actor () const |
Get actor. More... | |
bool | isElements () const |
Get current info mode. More... | |
virtual void | information (const QList< long > &)=0 |
Show information on the specified nodes / elements. More... | |
virtual void | clearInternal () |
Internal clean-up (reset widget) 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 Slots | |
void | showPrevious () |
This slot is called from "Show Previous" button click. More... | |
void | showNext () |
This slot is called from "Show Next" button click. More... | |
void | updateControls () |
Update widgets state. More... | |
Private Attributes | |
SMESH_Actor * | myActor |
QList< long > | myIDs |
int | myIsElement |
QWidget * | myFrame |
ExtraWidget * | myExtra |
int | myIndex |
Base class for the mesh element information widget.
|
protected |
SMESHGUI_ElemInfo::SMESHGUI_ElemInfo | ( | QWidget * | parent = 0 | ) |
Constructor.
parent | parent widget |
References clear(), myExtra, myFrame, ExtraWidget::next, ExtraWidget::prev, showNext(), and showPrevious().
SMESHGUI_ElemInfo::~SMESHGUI_ElemInfo | ( | ) |
Destructor.
|
protected |
Get actor.
References myActor.
Referenced by SMESHGUI_SimpleElemInfo::information(), SMESHGUI_TreeElemInfo::information(), and setSource().
void SMESHGUI_ElemInfo::clear | ( | ) |
Clear mesh element information widget.
References clearInternal(), myIDs, myIndex, and updateControls().
Referenced by setSource(), SMESHGUI_MeshInfoDlg::showInfo(), and SMESHGUI_ElemInfo().
|
protectedvirtual |
Internal clean-up (reset widget)
Reimplemented in SMESHGUI_TreeElemInfo, and SMESHGUI_SimpleElemInfo.
Referenced by clear().
|
protected |
Format connectivity data to string representation.
connectivity | connetivity map |
type | element type |
Referenced by SMESHGUI_SimpleElemInfo::information(), SMESHGUI_TreeElemInfo::information(), and SMESHGUI_TreeElemInfo::nodeInfo().
|
protected |
Get central area widget.
References myFrame.
Referenced by SMESHGUI_SimpleElemInfo::SMESHGUI_SimpleElemInfo(), and SMESHGUI_TreeElemInfo::SMESHGUI_TreeElemInfo().
gp_XYZ SMESHGUI_ElemInfo::getGravityCenter | ( | const SMDS_MeshElement * | e | ) |
Referenced by SMESHGUI_MeshInfoDlg::idChanged().
|
protected |
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 SMESHGUI_TreeElemInfo::information().
|
protectedpure virtual |
Show information on the specified nodes / elements.
This function is to be redefined in sub-classes.
ids | nodes / elements identifiers information is to be shown on |
Implemented in SMESHGUI_TreeElemInfo, and SMESHGUI_SimpleElemInfo.
Referenced by showInfo(), showNext(), and showPrevious().
|
protected |
Get current info mode.
true
if mesh element information is shown or false
if node information is shown References myIsElement.
Referenced by SMESHGUI_TreeElemInfo::expandedResource(), SMESHGUI_SimpleElemInfo::information(), and SMESHGUI_TreeElemInfo::information().
|
signal |
Referenced by SMESHGUI_TreeElemInfo::contextMenuEvent(), and SMESHGUI_TreeElemInfo::itemDoubleClicked().
|
signal |
|
protected |
Get node connectivity.
node | mesh node |
References SMDS_MeshElement::GetID(), SMDS_MeshNode::GetInverseElementIterator(), and SMDS_MeshElement::GetType().
Referenced by SMESHGUI_SimpleElemInfo::information(), SMESHGUI_TreeElemInfo::information(), and SMESHGUI_TreeElemInfo::nodeInfo().
|
protected |
Calculate normal vector to the mesh face.
element | mesh face |
References SMESH::getNormale().
Referenced by SMESHGUI_SimpleElemInfo::information(), and SMESHGUI_TreeElemInfo::information().
|
pure virtual |
Implemented in SMESHGUI_TreeElemInfo, and SMESHGUI_SimpleElemInfo.
Referenced by SMESHGUI_MeshInfoDlg::dump().
void SMESHGUI_ElemInfo::setSource | ( | SMESH_Actor * | actor | ) |
Set mesh data source (actor)
actor | mesh object actor |
References actor(), clear(), myActor, and myIsElement.
Referenced by SMESHGUI_MeshInfoDlg::showInfo().
void SMESHGUI_ElemInfo::showInfo | ( | long | id, |
bool | isElem | ||
) |
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().
void SMESHGUI_ElemInfo::showInfo | ( | QSet< long > | ids, |
bool | isElem | ||
) |
Show mesh element information.
ids | mesh nodes / elements identifiers |
isElem | show mesh element information if true or mesh node information if false |
References information(), myIDs, myIndex, myIsElement, and updateControls().
|
privateslot |
This slot is called from "Show Next" button click.
Shows information on the next group of the items.
References information(), myIDs, myIndex, and updateControls().
Referenced by SMESHGUI_ElemInfo().
|
privateslot |
This slot is called from "Show Previous" button click.
Shows information on the previous group of the items.
References information(), myIDs, myIndex, and updateControls().
Referenced by SMESHGUI_ElemInfo().
|
privateslot |
Update widgets state.
References myExtra, myIDs, myIndex, and ExtraWidget::updateControls().
Referenced by clear(), showInfo(), showNext(), and showPrevious().
|
private |
Referenced by actor(), and setSource().
|
private |
Referenced by SMESHGUI_ElemInfo(), and updateControls().
|
private |
Referenced by frame(), and SMESHGUI_ElemInfo().
|
private |
Referenced by clear(), showInfo(), showNext(), showPrevious(), and updateControls().
|
private |
Referenced by clear(), showInfo(), showNext(), showPrevious(), and updateControls().
|
private |
Referenced by isElements(), setSource(), and showInfo().