Version: 8.3.0
SMESHGUI_ElemInfo Class Referenceabstract

Base class for the mesh element information widget. More...

#include <SMESHGUI_MeshInfo.h>

Inheritance diagram for SMESHGUI_ElemInfo:

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

QWidgetframe () const
 Get central area widget. More...
 
SMESH_Actoractor () 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_ActormyActor
 
QList< long > myIDs
 
int myIsElement
 
QWidgetmyFrame
 
ExtraWidgetmyExtra
 
int myIndex
 

Detailed Description

Base class for the mesh element information widget.

Member Typedef Documentation

typedef QMap< int, QList<int> > SMESHGUI_ElemInfo::Connectivity
protected

Constructor & Destructor Documentation

SMESHGUI_ElemInfo::SMESHGUI_ElemInfo ( QWidget parent = 0)

Constructor.

Parameters
parentparent widget

References clear(), myExtra, myFrame, ExtraWidget::next, ExtraWidget::prev, showNext(), and showPrevious().

SMESHGUI_ElemInfo::~SMESHGUI_ElemInfo ( )

Destructor.

Member Function Documentation

SMESH_Actor * SMESHGUI_ElemInfo::actor ( ) const
protected

Get actor.

Returns
actor being used

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().

void SMESHGUI_ElemInfo::clearInternal ( )
protectedvirtual

Internal clean-up (reset widget)

Reimplemented in SMESHGUI_TreeElemInfo, and SMESHGUI_SimpleElemInfo.

Referenced by clear().

QString SMESHGUI_ElemInfo::formatConnectivity ( Connectivity  connectivity,
int  type 
)
protected

Format connectivity data to string representation.

Parameters
connectivityconnetivity map
typeelement type
Returns
string representation of the connectivity

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

QWidget * SMESHGUI_ElemInfo::frame ( ) const
protected

Get central area widget.

Returns
central widget

References myFrame.

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

gp_XYZ SMESHGUI_ElemInfo::getGravityCenter ( const SMDS_MeshElement e)
SMESHGUI_ElemInfo::XYZ SMESHGUI_ElemInfo::gravityCenter ( const SMDS_MeshElement element)
protected
void SMESHGUI_ElemInfo::information ( const QList< long > &  ids)
protectedpure virtual

Show information on the specified nodes / elements.

This function is to be redefined in sub-classes.

Parameters
idsnodes / elements identifiers information is to be shown on

Implemented in SMESHGUI_TreeElemInfo, and SMESHGUI_SimpleElemInfo.

Referenced by showInfo(), showNext(), and showPrevious().

bool SMESHGUI_ElemInfo::isElements ( ) const
protected

Get current info mode.

Returns
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().

void SMESHGUI_ElemInfo::itemInfo ( int  )
signal
void SMESHGUI_ElemInfo::itemInfo ( const QString &  )
signal
SMESHGUI_ElemInfo::Connectivity SMESHGUI_ElemInfo::nodeConnectivity ( const SMDS_MeshNode node)
protected
SMESHGUI_ElemInfo::XYZ SMESHGUI_ElemInfo::normal ( const SMDS_MeshElement element)
protected

Calculate normal vector to the mesh face.

Parameters
elementmesh face

References SMESH::getNormale().

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

virtual void SMESHGUI_ElemInfo::saveInfo ( QTextStream &  out)
pure virtual
void SMESHGUI_ElemInfo::setSource ( SMESH_Actor actor)

Set mesh data source (actor)

Parameters
actormesh 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.

Parameters
idmesh node / element ID
isElemshow 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.

Parameters
idsmesh nodes / elements identifiers
isElemshow mesh element information if true or mesh node information if false

References information(), myIDs, myIndex, myIsElement, and updateControls().

void SMESHGUI_ElemInfo::showNext ( )
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().

void SMESHGUI_ElemInfo::showPrevious ( )
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().

void SMESHGUI_ElemInfo::updateControls ( )
privateslot

Update widgets state.

References myExtra, myIDs, myIndex, and ExtraWidget::updateControls().

Referenced by clear(), showInfo(), showNext(), and showPrevious().

Field Documentation

SMESH_Actor* SMESHGUI_ElemInfo::myActor
private

Referenced by actor(), and setSource().

ExtraWidget* SMESHGUI_ElemInfo::myExtra
private
QWidget* SMESHGUI_ElemInfo::myFrame
private

Referenced by frame(), and SMESHGUI_ElemInfo().

QList<long> SMESHGUI_ElemInfo::myIDs
private
int SMESHGUI_ElemInfo::myIndex
private
int SMESHGUI_ElemInfo::myIsElement
private

Referenced by isElements(), setSource(), and showInfo().