Version: 6.3.1
Public Member Functions | Private Types | Private Member Functions | Private Attributes

SMESHGUI_MeshInfo Class Reference

Base mesh information widget. More...

#include <SMESHGUI_MeshInfo.h>

Inheritance diagram for SMESHGUI_MeshInfo:
Inheritance graph
[legend]

Public Member Functions

 SMESHGUI_MeshInfo (QWidget *=0)
 Constructor.
 ~SMESHGUI_MeshInfo ()
 Destructor.
void showInfo (SMESH::SMESH_IDSource_ptr)
 Show information on the mesh object.
void clear ()
 Reset the widget to the initial state (nullify all fields).

Private Types

enum  {
  iName, iObject, iNodesStart, iNodes,
  iNodesEnd, iElementsStart = iNodesEnd, iElements, i0DStart,
  i0D, i0DEnd, i1DStart = i0DEnd, i1D,
  i1DEnd, i2DStart = i1DEnd, i2D, i2DTriangles,
  i2DQuadrangles, i2DPolygons, i2DEnd, i3DStart = i2DEnd,
  i3D, i3DTetrahedrons, i3DHexahedrons, i3DPyramids,
  i3DPrisms, i3DPolyhedrons, i3DEnd, iElementsEnd = i3DEnd
}
enum  { iSingle = 1, iTotal = iSingle, iLinear, iQuadratic }
enum  { Bold = 0x01, Italic = 0x02 }
typedef QList< QWidget * > wlist
typedef QVector< wlistiwlist

Private Member Functions

QLabel * createField ()
 Create info field.
QWidgetcreateLine ()
 Create horizontal rule.
void setFontAttributes (QWidget *, int, bool=true)
 Change widget font attributes (bold, italic, ...).
void setFieldsVisible (int, int, bool)
 Show/hide group(s) of fields.

Private Attributes

iwlist myWidgets

Detailed Description

Base mesh information widget.

Displays the base information about mesh object: mesh, sub-mesh, group or arbitrary ID source.

Definition at line 53 of file SMESHGUI_MeshInfo.h.


Member Typedef Documentation

typedef QVector<wlist> SMESHGUI_MeshInfo.iwlist [private]

Definition at line 96 of file SMESHGUI_MeshInfo.h.

typedef QList<QWidget*> SMESHGUI_MeshInfo.wlist [private]

Definition at line 95 of file SMESHGUI_MeshInfo.h.


Member Enumeration Documentation

anonymous enum [private]
Enumerator:
iName 
iObject 
iNodesStart 
iNodes 
iNodesEnd 
iElementsStart 
iElements 
i0DStart 
i0D 
i0DEnd 
i1DStart 
i1D 
i1DEnd 
i2DStart 
i2D 
i2DTriangles 
i2DQuadrangles 
i2DPolygons 
i2DEnd 
i3DStart 
i3D 
i3DTetrahedrons 
i3DHexahedrons 
i3DPyramids 
i3DPrisms 
i3DPolyhedrons 
i3DEnd 
iElementsEnd 

Definition at line 57 of file SMESHGUI_MeshInfo.h.

anonymous enum [private]
Enumerator:
iSingle 
iTotal 
iLinear 
iQuadratic 

Definition at line 88 of file SMESHGUI_MeshInfo.h.

anonymous enum [private]
Enumerator:
Bold 
Italic 

Definition at line 106 of file SMESHGUI_MeshInfo.h.

{ Bold = 0x01, Italic = 0x02 };

Constructor & Destructor Documentation

SMESHGUI_MeshInfo::SMESHGUI_MeshInfo ( QWidget parent = 0)

Constructor.

Parameters:
parentparent widget

Definition at line 78 of file SMESHGUI_MeshInfo.cxx.

References Bold, clear(), createField(), createLine(), Italic, myWidgets, and setFontAttributes().

  : QFrame( parent ), myWidgets( iElementsEnd )
{
  setFrameStyle( StyledPanel | Sunken );

  QGridLayout* l = new QGridLayout( this );
  l->setMargin( MARGIN );
  l->setSpacing( SPACING );

  // object
  QLabel* aNameLab     = new QLabel( tr( "NAME_LAB" ), this );
  QLabel* aName        = createField();
  aName->setMinimumWidth( 150 );
  QLabel* aObjLab      = new QLabel( tr( "OBJECT_LAB" ), this );
  QLabel* aObj         = createField();
  aObj->setMinimumWidth( 150 );
  myWidgets[0] << aNameLab << aName;
  myWidgets[1] << aObjLab  << aObj;

  // nodes
  QWidget* aNodesLine  = createLine();
  QLabel*  aNodesLab   = new QLabel( tr( "NODES_LAB" ), this );
  QLabel*  aNodes      = createField();
  myWidgets[2] << aNodesLine;
  myWidgets[3] << aNodesLab << aNodes;

  // elements
  QWidget* aElemLine   = createLine();
  QLabel*  aElemLab    = new QLabel( tr( "ELEMENTS_LAB" ),  this );
  QLabel*  aElemTotal  = new QLabel( tr( "TOTAL_LAB" ),     this );
  QLabel*  aElemLin    = new QLabel( tr( "LINEAR_LAB" ),    this );
  QLabel*  aElemQuad   = new QLabel( tr( "QUADRATIC_LAB" ), this );
  myWidgets[4] << aElemLine;
  myWidgets[5] << aElemLab << aElemTotal << aElemLin << aElemQuad;

  // ... 0D elements
  QWidget* a0DLine     = createLine();
  QLabel*  a0DLab      = new QLabel( tr( "0D_LAB" ), this );
  QLabel*  a0DTotal    = createField();
  myWidgets[6] << a0DLine;
  myWidgets[7] << a0DLab << a0DTotal;

  // ... 1D elements
  QWidget* a1DLine     = createLine();
  QLabel*  a1DLab      = new QLabel( tr( "1D_LAB" ), this );
  QLabel*  a1DTotal    = createField();
  QLabel*  a1DLin      = createField();
  QLabel*  a1DQuad     = createField();
  myWidgets[8] << a1DLine;
  myWidgets[9] << a1DLab << a1DTotal << a1DLin << a1DQuad;

  // ... 2D elements
  QWidget* a2DLine     = createLine();
  QLabel*  a2DLab      = new QLabel( tr( "2D_LAB" ), this );
  QLabel*  a2DTotal    = createField();
  QLabel*  a2DLin      = createField();
  QLabel*  a2DQuad     = createField();
  QLabel*  a2DTriLab   = new QLabel( tr( "TRIANGLES_LAB" ), this );
  QLabel*  a2DTriTotal = createField();
  QLabel*  a2DTriLin   = createField();
  QLabel*  a2DTriQuad  = createField();
  QLabel*  a2DQuaLab   = new QLabel( tr( "QUADRANGLES_LAB" ), this );
  QLabel*  a2DQuaTotal = createField();
  QLabel*  a2DQuaLin   = createField();
  QLabel*  a2DQuaQuad  = createField();
  QLabel*  a2DPolLab   = new QLabel( tr( "POLYGONS_LAB" ), this );
  QLabel*  a2DPolTotal = createField();
  myWidgets[10] << a2DLine;
  myWidgets[11] << a2DLab    << a2DTotal    << a2DLin    << a2DQuad;
  myWidgets[12] << a2DTriLab << a2DTriTotal << a2DTriLin << a2DTriQuad;
  myWidgets[13] << a2DQuaLab << a2DQuaTotal << a2DQuaLin << a2DQuaQuad;
  myWidgets[14] << a2DPolLab << a2DPolTotal;

  // ... 3D elements
  QWidget* a3DLine     = createLine();
  QLabel*  a3DLab      = new QLabel( tr( "3D_LAB" ), this );
  QLabel*  a3DTotal    = createField();
  QLabel*  a3DLin      = createField();
  QLabel*  a3DQuad     = createField();
  QLabel*  a3DTetLab   = new QLabel( tr( "TETRAHEDRONS_LAB" ), this );
  QLabel*  a3DTetTotal = createField();
  QLabel*  a3DTetLin   = createField();
  QLabel*  a3DTetQuad  = createField();
  QLabel*  a3DHexLab   = new QLabel( tr( "HEXAHEDONRS_LAB" ), this );
  QLabel*  a3DHexTotal = createField();
  QLabel*  a3DHexLin   = createField();
  QLabel*  a3DHexQuad  = createField();
  QLabel*  a3DPyrLab   = new QLabel( tr( "PYRAMIDS_LAB" ), this );
  QLabel*  a3DPyrTotal = createField();
  QLabel*  a3DPyrLin   = createField();
  QLabel*  a3DPyrQuad  = createField();
  QLabel*  a3DPriLab   = new QLabel( tr( "PRISMS_LAB" ), this );
  QLabel*  a3DPriTotal = createField();
  QLabel*  a3DPriLin   = createField();
  QLabel*  a3DPriQuad  = createField();
  QLabel*  a3DPolLab   = new QLabel( tr( "POLYHEDRONS_LAB" ), this );
  QLabel*  a3DPolTotal = createField();
  myWidgets[15] << a3DLine;
  myWidgets[16] << a3DLab    << a3DTotal    << a3DLin    << a3DQuad;
  myWidgets[17] << a3DTetLab << a3DTetTotal << a3DTetLin << a3DTetQuad;
  myWidgets[18] << a3DHexLab << a3DHexTotal << a3DHexLin << a3DHexQuad;
  myWidgets[19] << a3DPyrLab << a3DPyrTotal << a3DPyrLin << a3DPyrQuad;
  myWidgets[20] << a3DPriLab << a3DPriTotal << a3DPriLin << a3DPriQuad;
  myWidgets[21] << a3DPolLab << a3DPolTotal;

  setFontAttributes( aNameLab,   Bold );
  setFontAttributes( aObjLab,    Bold );
  setFontAttributes( aNodesLab,  Bold );
  setFontAttributes( aElemLab,   Bold );
  setFontAttributes( aElemTotal, Italic );
  setFontAttributes( aElemLin,   Italic );
  setFontAttributes( aElemQuad,  Italic );
  setFontAttributes( a0DLab,     Bold );
  setFontAttributes( a1DLab,     Bold );
  setFontAttributes( a2DLab,     Bold );
  setFontAttributes( a3DLab,     Bold );

  l->addWidget( aNameLab,     0, 0 );
  l->addWidget( aName,        0, 1, 1, 3 );
  l->addWidget( aObjLab,      1, 0 );
  l->addWidget( aObj,         1, 1, 1, 3 );
  l->addWidget( aNodesLine,   2, 0, 1, 4 );
  l->addWidget( aNodesLab,    3, 0 );
  l->addWidget( aNodes,       3, 1 );
  l->addWidget( aElemLine,    4, 0, 1, 4 );
  l->addWidget( aElemLab,     5, 0 );
  l->addWidget( aElemTotal,   5, 1 );
  l->addWidget( aElemLin,     5, 2 );
  l->addWidget( aElemQuad,    5, 3 );
  l->addWidget( a0DLine,      6, 1, 1, 3 );
  l->addWidget( a0DLab,       7, 0 );
  l->addWidget( a0DTotal,     7, 1 );
  l->addWidget( a1DLine,      8, 1, 1, 3 );
  l->addWidget( a1DLab,       9, 0 );
  l->addWidget( a1DTotal,     9, 1 );
  l->addWidget( a1DLin,       9, 2 );
  l->addWidget( a1DQuad,      9, 3 );
  l->addWidget( a2DLine,     10, 1, 1, 3 );
  l->addWidget( a2DLab,      11, 0 );
  l->addWidget( a2DTotal,    11, 1 );
  l->addWidget( a2DLin,      11, 2 );
  l->addWidget( a2DQuad,     11, 3 );
  l->addWidget( a2DTriLab,   12, 0 );
  l->addWidget( a2DTriTotal, 12, 1 );
  l->addWidget( a2DTriLin,   12, 2 );
  l->addWidget( a2DTriQuad,  12, 3 );
  l->addWidget( a2DQuaLab,   13, 0 );
  l->addWidget( a2DQuaTotal, 13, 1 );
  l->addWidget( a2DQuaLin,   13, 2 );
  l->addWidget( a2DQuaQuad,  13, 3 );
  l->addWidget( a2DPolLab,   14, 0 );
  l->addWidget( a2DPolTotal, 14, 1 );
  l->addWidget( a3DLine,     15, 1, 1, 3 );
  l->addWidget( a3DLab,      16, 0 );
  l->addWidget( a3DTotal,    16, 1 );
  l->addWidget( a3DLin,      16, 2 );
  l->addWidget( a3DQuad,     16, 3 );
  l->addWidget( a3DTetLab,   17, 0 );
  l->addWidget( a3DTetTotal, 17, 1 );
  l->addWidget( a3DTetLin,   17, 2 );
  l->addWidget( a3DTetQuad,  17, 3 );
  l->addWidget( a3DHexLab,   18, 0 );
  l->addWidget( a3DHexTotal, 18, 1 );
  l->addWidget( a3DHexLin,   18, 2 );
  l->addWidget( a3DHexQuad,  18, 3 );
  l->addWidget( a3DPyrLab,   19, 0 );
  l->addWidget( a3DPyrTotal, 19, 1 );
  l->addWidget( a3DPyrLin,   19, 2 );
  l->addWidget( a3DPyrQuad,  19, 3 );
  l->addWidget( a3DPriLab,   20, 0 );
  l->addWidget( a3DPriTotal, 20, 1 );
  l->addWidget( a3DPriLin,   20, 2 );
  l->addWidget( a3DPriQuad,  20, 3 );
  l->addWidget( a3DPolLab,   21, 0 );
  l->addWidget( a3DPolTotal, 21, 1 );
  l->setColumnStretch( 0, 0 );
  l->setColumnStretch( 1, 5 );
  l->setColumnStretch( 2, 5 );
  l->setColumnStretch( 3, 5 );
  l->setRowStretch( 22, 5 );

  clear();
}
SMESHGUI_MeshInfo::~SMESHGUI_MeshInfo ( )

Destructor.

Definition at line 265 of file SMESHGUI_MeshInfo.cxx.

{
}

Member Function Documentation

void SMESHGUI_MeshInfo::clear ( )

Reset the widget to the initial state (nullify all fields).

Definition at line 362 of file SMESHGUI_MeshInfo.cxx.

References i0D, i1D, i2D, i2DPolygons, i2DQuadrangles, i2DTriangles, i3D, i3DHexahedrons, i3DPolyhedrons, i3DPrisms, i3DPyramids, i3DTetrahedrons, iLinear, iName, iNodes, iObject, iQuadratic, iSingle, iTotal, and myWidgets.

Referenced by showInfo(), and SMESHGUI_MeshInfo().

{
  myWidgets[iName][iSingle]->setProperty( "text", QString() );
  myWidgets[iObject][iSingle]->setProperty( "text", QString() );
  myWidgets[iNodes][iTotal]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i0D][iTotal]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i1D][iTotal]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i1D][iLinear]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i1D][iQuadratic]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i2D][iTotal]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i2D][iLinear]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i2D][iQuadratic]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i2DTriangles][iTotal]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i2DTriangles][iLinear]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i2DTriangles][iQuadratic]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i2DQuadrangles][iTotal]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i2DQuadrangles][iLinear]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i2DQuadrangles][iQuadratic]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i2DPolygons][iTotal]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i3D][iTotal]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i3D][iLinear]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i3D][iQuadratic]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i3DTetrahedrons][iTotal]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i3DTetrahedrons][iLinear]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i3DTetrahedrons][iQuadratic]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i3DHexahedrons][iTotal]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i3DHexahedrons][iLinear]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i3DHexahedrons][iQuadratic]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i3DPyramids][iTotal]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i3DPyramids][iLinear]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i3DPyramids][iQuadratic]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i3DPrisms][iTotal]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i3DPrisms][iLinear]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i3DPrisms][iQuadratic]->setProperty( "text", QString::number( 0 ) );
  myWidgets[i3DPolyhedrons][iTotal]->setProperty( "text", QString::number( 0 ) );
}
QLabel * SMESHGUI_MeshInfo::createField ( ) [private]

Create info field.

Returns:
new info field

Definition at line 403 of file SMESHGUI_MeshInfo.cxx.

Referenced by SMESHGUI_MeshInfo().

{
  QLabel* lab = new QLabel( this );
  lab->setFrameStyle( StyledPanel | Sunken );
  lab->setAlignment( Qt::AlignCenter );
  lab->setAutoFillBackground( true );
  QPalette pal = lab->palette();
  pal.setColor( QPalette::Window, QApplication::palette().color( QPalette::Active, QPalette::Base ) );
  lab->setPalette( pal );
  lab->setMinimumWidth( 70 );
  return lab;
}
QWidget * SMESHGUI_MeshInfo::createLine ( ) [private]

Create horizontal rule.

Returns:
new line object

Definition at line 420 of file SMESHGUI_MeshInfo.cxx.

Referenced by SMESHGUI_MeshInfo().

{
  QFrame* line = new QFrame( this );
  line->setFrameStyle( HLine | Sunken );
  return line;
}
void SMESHGUI_MeshInfo::setFieldsVisible ( int  start,
int  end,
bool  on 
) [private]

Show/hide group(s) of fields.

Parameters:
startbeginning of the block
endend of the block
onvisibility flag

Definition at line 449 of file SMESHGUI_MeshInfo.cxx.

References iElementsEnd, and myWidgets.

{
  start = qMax( 0, start );
  end   = qMin( end, (int)iElementsEnd );
  for ( int i = start; i < end; i++ ) {
    wlist wl = myWidgets[i];
    foreach ( QWidget* w, wl ) w->setVisible( on );
  }
}
void SMESHGUI_MeshInfo::setFontAttributes ( QWidget w,
int  attr,
bool  val = true 
) [private]

Change widget font attributes (bold, italic, ...).

Parameters:
wwidget
attrfont attributes (XORed flags)
valvalue to be set to attributes

Definition at line 433 of file SMESHGUI_MeshInfo.cxx.

References Bold, and Italic.

Referenced by SMESHGUI_MeshInfo().

{
  if ( w && attr ) {
    QFont f = w->font();
    if ( attr & Bold   ) f.setBold( val );
    if ( attr & Italic ) f.setItalic( val );
    w->setFont( f );
  }
}
void SMESHGUI_MeshInfo::showInfo ( SMESH::SMESH_IDSource_ptr  obj)

Show information on the mesh object.

Parameters:
objobject being processed (mesh, sub-mesh, group, ID source)

Definition at line 273 of file SMESHGUI_MeshInfo.cxx.

References _PTR(), SMESH_controls.aGroup, clear(), SMESH.EDGE, SMESH.ELEM0D, SMESH.FACE, i0D, i1D, i2D, i2DPolygons, i2DQuadrangles, i2DTriangles, i3D, i3DHexahedrons, i3DPolyhedrons, i3DPrisms, i3DPyramids, i3DTetrahedrons, iLinear, iName, iNodes, iObject, iQuadratic, iSingle, iTotal, myWidgets, SMESH.NODE, SMDSEntity_0D, SMDSEntity_Edge, SMDSEntity_Hexa, SMDSEntity_Node, SMDSEntity_Penta, SMDSEntity_Polygon, SMDSEntity_Polyhedra, SMDSEntity_Pyramid, SMDSEntity_Quad_Edge, SMDSEntity_Quad_Hexa, SMDSEntity_Quad_Penta, SMDSEntity_Quad_Pyramid, SMDSEntity_Quad_Quadrangle, SMDSEntity_Quad_Tetra, SMDSEntity_Quad_Triangle, SMDSEntity_Quadrangle, SMDSEntity_Tetra, SMDSEntity_Triangle, and SMESH.VOLUME.

Referenced by SMESHGUI_MeshInfoDlg.showInfo().

{
  clear();
  if ( !CORBA::is_nil( obj ) ) {
    _PTR(SObject) sobj = ObjectToSObject( obj );
    if ( sobj ) 
      myWidgets[iName][iSingle]->setProperty( "text", sobj->GetName().c_str() );
    SMESH::SMESH_Mesh_var      aMesh    = SMESH::SMESH_Mesh::_narrow( obj );
    SMESH::SMESH_subMesh_var   aSubMesh = SMESH::SMESH_subMesh::_narrow( obj );
    SMESH::SMESH_GroupBase_var aGroup   = SMESH::SMESH_GroupBase::_narrow( obj );
    if ( !aMesh->_is_nil() ) {
      myWidgets[iObject][iSingle]->setProperty( "text", tr( "OBJECT_MESH" ) );
    }
    else if ( !aSubMesh->_is_nil() ) {
      myWidgets[iObject][iSingle]->setProperty( "text", tr( "OBJECT_SUBMESH" ) );
    }
    else if ( !aGroup->_is_nil() ) {
      QString objType;
      switch( aGroup->GetType() ) {
      case SMESH::NODE:
        objType = tr( "OBJECT_GROUP_NODES" );
        break;
      case SMESH::EDGE:
        objType = tr( "OBJECT_GROUP_EDGES" );
        break;
      case SMESH::FACE:
        objType = tr( "OBJECT_GROUP_FACES" );
        break;
      case SMESH::VOLUME:
        objType = tr( "OBJECT_GROUP_VOLUMES" );
        break;
      case SMESH::ELEM0D:
        objType = tr( "OBJECT_GROUP_0DELEMS" );
        break;
      default:
        objType = tr( "OBJECT_GROUP" );
        break;
      }
      myWidgets[iObject][iSingle]->setProperty( "text", objType );
    }
    SMESH::long_array_var info = obj->GetMeshInfo();
    myWidgets[iNodes][iTotal]->setProperty( "text", QString::number( info[SMDSEntity_Node] ) );
    myWidgets[i0D][iTotal]->setProperty( "text", QString::number( info[SMDSEntity_0D] ) );
    long nbEdges = info[SMDSEntity_Edge] + info[SMDSEntity_Quad_Edge];
    myWidgets[i1D][iTotal]->setProperty( "text", QString::number( nbEdges ) );
    myWidgets[i1D][iLinear]->setProperty( "text", QString::number( info[SMDSEntity_Edge] ) );
    myWidgets[i1D][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Edge] ) );
    long nbTriangles   = info[SMDSEntity_Triangle]   + info[SMDSEntity_Quad_Triangle];
    long nbQuadrangles = info[SMDSEntity_Quadrangle] + info[SMDSEntity_Quad_Quadrangle];
    long nb2DLinear    = info[SMDSEntity_Triangle] + info[SMDSEntity_Quadrangle] + info[SMDSEntity_Polygon];
    long nb2DQuadratic = info[SMDSEntity_Quad_Triangle] + info[SMDSEntity_Quad_Quadrangle];
    myWidgets[i2D][iTotal]->setProperty( "text", QString::number( nb2DLinear + nb2DQuadratic ) );
    myWidgets[i2D][iLinear]->setProperty( "text", QString::number( nb2DLinear ) );
    myWidgets[i2D][iQuadratic]->setProperty( "text", QString::number( nb2DQuadratic ) );
    myWidgets[i2DTriangles][iTotal]->setProperty( "text", QString::number( nbTriangles ) );
    myWidgets[i2DTriangles][iLinear]->setProperty( "text", QString::number( info[SMDSEntity_Triangle] ) );
    myWidgets[i2DTriangles][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Triangle] ) );
    myWidgets[i2DQuadrangles][iTotal]->setProperty( "text", QString::number( nbQuadrangles ) );
    myWidgets[i2DQuadrangles][iLinear]->setProperty( "text", QString::number( info[SMDSEntity_Quadrangle] ) );
    myWidgets[i2DQuadrangles][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Quadrangle] ) );
    myWidgets[i2DPolygons][iTotal]->setProperty( "text", QString::number( info[SMDSEntity_Polygon] ) );
    long nbTetrahedrons = info[SMDSEntity_Tetra]   + info[SMDSEntity_Quad_Tetra];
    long nbHexahedrons  = info[SMDSEntity_Hexa]    + info[SMDSEntity_Quad_Hexa];
    long nbPyramids     = info[SMDSEntity_Pyramid] + info[SMDSEntity_Quad_Pyramid];
    long nbPrisms       = info[SMDSEntity_Penta]   + info[SMDSEntity_Quad_Penta];
    long nb3DLinear     = info[SMDSEntity_Tetra] + info[SMDSEntity_Hexa] + info[SMDSEntity_Pyramid] + info[SMDSEntity_Penta] + info[SMDSEntity_Polyhedra];
    long nb3DQuadratic  = info[SMDSEntity_Quad_Tetra] + info[SMDSEntity_Quad_Hexa] + info[SMDSEntity_Quad_Pyramid] + info[SMDSEntity_Quad_Penta];
    myWidgets[i3D][iTotal]->setProperty( "text", QString::number( nb3DLinear + nb3DQuadratic ) );
    myWidgets[i3D][iLinear]->setProperty( "text", QString::number( nb3DLinear ) );
    myWidgets[i3D][iQuadratic]->setProperty( "text", QString::number( nb3DQuadratic ) );
    myWidgets[i3DTetrahedrons][iTotal]->setProperty( "text", QString::number( nbTetrahedrons ) );
    myWidgets[i3DTetrahedrons][iLinear]->setProperty( "text", QString::number( info[SMDSEntity_Tetra] ) );
    myWidgets[i3DTetrahedrons][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Tetra] ) );
    myWidgets[i3DHexahedrons][iTotal]->setProperty( "text", QString::number( nbHexahedrons ) );
    myWidgets[i3DHexahedrons][iLinear]->setProperty( "text", QString::number( info[SMDSEntity_Hexa] ) );
    myWidgets[i3DHexahedrons][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Hexa] ) );
    myWidgets[i3DPyramids][iTotal]->setProperty( "text", QString::number( nbPyramids ) );
    myWidgets[i3DPyramids][iLinear]->setProperty( "text", QString::number( info[SMDSEntity_Pyramid] ) );
    myWidgets[i3DPyramids][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Pyramid] ) );
    myWidgets[i3DPrisms][iTotal]->setProperty( "text", QString::number( nbPrisms ) );
    myWidgets[i3DPrisms][iLinear]->setProperty( "text", QString::number( info[SMDSEntity_Penta] ) );
    myWidgets[i3DPrisms][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Penta] ) );
    myWidgets[i3DPolyhedrons][iTotal]->setProperty( "text", QString::number( info[SMDSEntity_Polyhedra] ) );
  }
}

Field Documentation

Definition at line 114 of file SMESHGUI_MeshInfo.h.

Referenced by clear(), setFieldsVisible(), showInfo(), and SMESHGUI_MeshInfo().

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS