Version: 6.3.1
Data Structures | Signals | Public Member Functions | Private Types | Private Slots | Private Member Functions | Private Attributes

SMESHGUI_FilterTable Class Reference

Class : SMESHGUI_FilterTable Description : Frame containig

More...

#include <SMESHGUI_FilterDlg.h>

Inheritance diagram for SMESHGUI_FilterTable:
Inheritance graph
[legend]

Data Structures

class  AdditionalWidget
class  CheckItem
class  ComboDelegate
class  ComboItem
class  DoubleSpinItem
class  IntSpinItem
class  Table

Signals

void CopyFromClicked ()
void AddToClicked ()
void EntityTypeChanged (const int)
void NeedValidation ()
void CriterionChanged (const int, const int)
void CurrentChanged (int, int)

Public Member Functions

 SMESHGUI_FilterTable (SMESHGUI *, QWidget *, const int)
 SMESHGUI_FilterTable (SMESHGUI *, QWidget *, const QList< int > &)
virtual ~SMESHGUI_FilterTable ()
void Init (const QList< int > &)
QGroupBoxGetTableGrp ()
bool IsValid (const bool=true, const int=-1) const
int GetType () const
void SetType (const int)
void RestorePreviousEntityType ()
int NumRows (const int=-1) const
void Clear (const int=-1)
void SetEditable (const bool)
void SetEnabled (const bool)
void SetLibsEnabled (const bool)
bool IsEditable () const
int GetCriterionType (const int, const int=-1) const
void GetCriterion (const int, SMESH::Filter::Criterion &, const int=-1) const
void SetCriterion (const int, const SMESH::Filter::Criterion &, const int=-1)
void AddCriterion (const SMESH::Filter::Criterion &, const int=-1)
void Copy (const SMESHGUI_FilterTable *)
void SetValidity (const bool)
bool CurrentCell (int &, int &) const
void SetThreshold (const int, const QString &, const int=-1)
bool GetThreshold (const int, QString &, const int=-1)
void SetID (const int, const QString &, const int=-1)
bool GetID (const int, QString &, const int=-1)
void Update ()

Private Types

typedef QMap< int, Table * > TableMap

Private Slots

void onAddBtn ()
void onInsertBtn ()
void onRemoveBtn ()
void onClearBtn ()
void onCopyFromBtn ()
void onAddToBtn ()
void onCriterionChanged (int, int)
void onEntityType (int)
void onCurrentChanged (int, int)

Private Member Functions

void addRow (Table *, const int, const bool=true)
QTableWidgetItemgetCriterionItem (const int) const
QTableWidgetItemgetCompareItem () const
QTableWidgetItemgetUnaryItem () const
QTableWidgetItemgetBinaryItem () const
const QMap< int, QString > & getCriteria (const int) const
const QMap< int, QString > & getCompare () const
TablecreateTable (QWidget *, const int)
QWidgetcreateAdditionalFrame (QWidget *)
int getFirstSelectedRow () const
void onCriterionChanged (const int, const int, const int)
void updateBtnState ()
void removeAdditionalWidget (QTableWidget *, const int)
void updateAdditionalWidget ()
const char * getPrecision (const int)
const QMap< int, QString > & getSupportedTypes () const

Private Attributes

SMESHGUImySMESHGUI
QGroupBoxmyTableGrp
QWidgetmySwitchTableGrp
TableMap myTables
QPushButton * myAddBtn
QPushButton * myInsertBtn
QPushButton * myRemoveBtn
QPushButton * myClearBtn
QPushButton * myCopyFromBtn
QPushButton * myAddToBtn
QGroupBoxmyEntityTypeBox
QButtonGroup * myEntityTypeGrp
int myEntityType
int myIsValid
bool myIsLocked
SMESHGUI_FilterLibraryDlgmyLibDlg
QStackedWidget * myWgStack
QMap< QTableWidgetItem
*, AdditionalWidget * > 
myAddWidgets

Detailed Description

Class : SMESHGUI_FilterTable Description : Frame containig

Definition at line 69 of file SMESHGUI_FilterDlg.h.


Member Typedef Documentation

typedef QMap<int, Table*> SMESHGUI_FilterTable.TableMap [private]

Definition at line 79 of file SMESHGUI_FilterDlg.h.


Constructor & Destructor Documentation

SMESHGUI_FilterTable::SMESHGUI_FilterTable ( SMESHGUI theModule,
QWidget parent,
const int  type 
)

Definition at line 866 of file SMESHGUI_FilterDlg.cxx.

References Init(), and myEntityType.

: QWidget( parent ),
  myIsLocked( false ),
  mySMESHGUI( theModule )
{
  myEntityType = -1;

  QList<int> aTypes;
  aTypes.append(type);
  Init(aTypes);
}
SMESHGUI_FilterTable::SMESHGUI_FilterTable ( SMESHGUI theModule,
QWidget parent,
const QList< int > &  types 
)

Definition at line 884 of file SMESHGUI_FilterDlg.cxx.

References Init(), and myEntityType.

: QWidget( parent ),
  myIsLocked( false ),
  mySMESHGUI( theModule )
{
  myEntityType = -1;
  Init(types);
}
SMESHGUI_FilterTable::~SMESHGUI_FilterTable ( ) [virtual]

Definition at line 895 of file SMESHGUI_FilterDlg.cxx.

{
}

Member Function Documentation

void SMESHGUI_FilterTable::AddCriterion ( const SMESH::Filter::Criterion theCriterion,
const int  theEntityType = -1 
)

Definition at line 1387 of file SMESHGUI_FilterDlg.cxx.

References addRow(), GetType(), myTables, and SetCriterion().

Referenced by Copy(), SMESHGUI_FilterDlg.Init(), and SMESHGUI_FilterLibraryDlg.onFilterChanged().

{
  int aType = theEntityType == -1 ? GetType() : theEntityType;
  Table* aTable = myTables[ aType ];
  addRow(aTable, aType);
  SetCriterion(aTable->rowCount() - 1, theCriterion);
}
void SMESHGUI_FilterTable::addRow ( Table theTable,
const int  theType,
const bool  toTheEnd = true 
) [private]

Definition at line 1832 of file SMESHGUI_FilterDlg.cxx.

References getBinaryItem(), getCompareItem(), getCriterionItem(), getFirstSelectedRow(), getUnaryItem(), SMESHGUI_FilterTable.Table.insertRows(), myIsLocked, onCriterionChanged(), SMESHGUI_FilterTable.Table.setEditable(), SMESHGUI_FilterTable.ComboItem.Type(), and updateBtnState().

Referenced by AddCriterion(), onAddBtn(), and onInsertBtn().

{
  int aCurrRow = 0;
  int aSelectedRow = getFirstSelectedRow();
  int aCurrCol = theTable->currentColumn();

  myIsLocked = true;
  if (toTheEnd || aSelectedRow == -1)
  {
    theTable->insertRows(theTable->rowCount());
    aCurrRow = theTable->rowCount() - 1;
  }
  else
  {
    theTable->insertRows(aSelectedRow);
    aCurrRow = aSelectedRow;
  }
  myIsLocked = false;

  // IPAL19372 - to prevent calling onCriterionChaged() slot before completion of setItem()
  bool isSignalsBlocked = theTable->signalsBlocked();
  theTable->blockSignals( true );

  // Criteria
  theTable->setItem(aCurrRow, 0, getCriterionItem(theType));

  // Compare
  theTable->setItem(aCurrRow, 1, getCompareItem());

  // Threshold
  theTable->setItem(aCurrRow, 2, new QTableWidgetItem());

  // Logical operation NOT
  theTable->setItem(aCurrRow, 3, getUnaryItem());

  // Logical operation AND / OR
  theTable->setItem(aCurrRow, 4, new QTableWidgetItem());

  theTable->setItem(aCurrRow, 5, new QTableWidgetItem());
    
  theTable->blockSignals( isSignalsBlocked );

  // Logical binary operation for previous value
  int anAddBinOpStr = -1;
  if (aCurrRow == theTable->rowCount() - 1)
    anAddBinOpStr = aCurrRow - 1;
  else if (aCurrRow >= 0 )
    anAddBinOpStr = aCurrRow;

  if (theTable->item(aCurrRow, 4) == 0 ||
       theTable->item(aCurrRow, 4)->type() != ComboItem::Type())
  {
    if (anAddBinOpStr >= 0 &&
         (theTable->item(anAddBinOpStr, 4) == 0 ||
           theTable->item(anAddBinOpStr, 4)->type() != ComboItem::Type()))
      theTable->setItem(anAddBinOpStr, 4, getBinaryItem());
  }

  theTable->setEditable(false, theTable->rowCount() - 1, 4);
  
  if (aCurrRow >=0 && aCurrRow < theTable->rowCount() &&
       aCurrCol >=0 && aCurrCol < theTable->rowCount())
  theTable->setCurrentCell(aCurrRow, aCurrCol);

  onCriterionChanged(aCurrRow, 0);

  updateBtnState();
}
void SMESHGUI_FilterTable.AddToClicked ( ) [signal]
void SMESHGUI_FilterTable::Clear ( const int  theType = -1)

Definition at line 1409 of file SMESHGUI_FilterDlg.cxx.

References GetType(), myTables, removeAdditionalWidget(), and updateBtnState().

Referenced by Copy(), SMESHGUI_FilterLibraryDlg.Init(), SMESHGUI_FilterDlg.Init(), SMESHGUI_FilterLibraryDlg.onAddBtnPressed(), SMESHGUI_FilterLibraryDlg.onDeleteBtnPressed(), SMESHGUI_FilterLibraryDlg.onFilterChanged(), and SMESHGUI_FilterLibraryDlg.updateList().

{
  int aType = theType == -1 ? GetType() : theType;
  Table* aTable = myTables[ aType ];

  if (aTable->rowCount() == 0)
    return;

  while (aTable->rowCount() > 0)
  {
    removeAdditionalWidget(aTable, 0);
    aTable->removeRow(0);
  }

  updateBtnState();
}
void SMESHGUI_FilterTable::Copy ( const SMESHGUI_FilterTable theTable)
void SMESHGUI_FilterTable.CopyFromClicked ( ) [signal]
QWidget * SMESHGUI_FilterTable::createAdditionalFrame ( QWidget theParent) [private]

Definition at line 1032 of file SMESHGUI_FilterDlg.cxx.

References myWgStack, and SPACING.

Referenced by Init().

{
  QWidget* aFrame = new QWidget(theParent);

  QFrame* aLine1 = new QFrame(aFrame);
  QFrame* aLine2 = new QFrame(aFrame);
  aLine1->setFrameStyle(QFrame::HLine | QFrame::Sunken);
  aLine2->setFrameStyle(QFrame::HLine | QFrame::Sunken);
  aLine1->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
  aLine2->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));

  QLabel* aLabel = new QLabel(tr("ADDITIONAL_PARAMETERS"), aFrame);

  myWgStack = new QStackedWidget(aFrame);

  QGridLayout* aLay = new QGridLayout(aFrame);
  aLay->setMargin(0);
  aLay->setSpacing(SPACING);
  aLay->addWidget(aLine1,    0, 0);
  aLay->addWidget(aLabel,    0, 1);
  aLay->addWidget(aLine2,    0, 2);
  aLay->addWidget(myWgStack, 1, 0, 1, 3);

  return aFrame;
}
SMESHGUI_FilterTable::Table * SMESHGUI_FilterTable::createTable ( QWidget theParent,
const int  theType 
) [private]

Definition at line 2096 of file SMESHGUI_FilterDlg.cxx.

References getCriteria(), getSupportedTypes(), maxLength(), onCriterionChanged(), and onCurrentChanged().

Referenced by Init(), and onEntityType().

{
  // create table
  Table* aTable= new Table(0, 6, theParent);

  QHeaderView* aHeaders = aTable->horizontalHeader();

  QFontMetrics aMetrics(aHeaders->font());

  // append spaces to the header of criteria in order to
  // provide visibility of criterion inside comboboxes
  static int aMaxLenCr = 0;

  if (aMaxLenCr == 0)
  {
    const QMap<int, QString>& aSupportedTypes = getSupportedTypes();
    QMap<int, QString>::const_iterator anIter;
    for (anIter = aSupportedTypes.begin(); anIter != aSupportedTypes.end(); ++anIter)
      aMaxLenCr = qMax(maxLength(getCriteria(anIter.key()), aMetrics), aMaxLenCr);
  }

  static int aLenCr = qAbs( aMaxLenCr -
                            aMetrics.width(tr("CRITERION"))) / aMetrics.width(' ') + 5;

  QString aCrStr;
  aCrStr.fill(' ', aLenCr);
  QString aCoStr;
  aCoStr.fill(' ', 10);

  QStringList aHeaderLabels;
  aHeaderLabels.append( tr("CRITERION") + aCrStr );
  aHeaderLabels.append( tr("COMPARE")   + aCoStr );
  aHeaderLabels.append( tr("THRESHOLD_VALUE") );
  aHeaderLabels.append( tr("UNARY") );
  aHeaderLabels.append( tr("BINARY") + "  " );
  aHeaderLabels.append( tr("ID") );
  aTable->setHorizontalHeaderLabels( aHeaderLabels );
  
  // set geometry of the table
  for (int i = 0; i <= 4; i++)
    aTable->resizeColumnToContents(i);

  // set the ID column invisible
  aTable->hideColumn( 5 );

  aTable->updateGeometry();
  QSize aSize = aTable->sizeHint();
  int aWidth = aSize.width();
  aTable->setMinimumSize(QSize(aWidth, aWidth / 2));
  aTable->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));

  connect(aTable, SIGNAL(cellChanged(int, int)),
          this,   SLOT(onCriterionChanged(int, int)));

  connect(aTable, SIGNAL(currentCellChanged(int, int, int, int)),
          this,   SLOT(onCurrentChanged(int, int)));
  
  return aTable;
}
void SMESHGUI_FilterTable.CriterionChanged ( const int  ,
const int   
) [signal]

Referenced by onCriterionChanged(), and SetCriterion().

bool SMESHGUI_FilterTable::CurrentCell ( int theRow,
int theCol 
) const

Definition at line 2320 of file SMESHGUI_FilterDlg.cxx.

References GetType(), and myTables.

Referenced by SMESHGUI_FilterDlg.onSelectionDone(), and SMESHGUI_FilterDlg.updateSelection().

{
  theRow = myTables[ GetType() ]->currentRow();
  theCol = myTables[ GetType() ]->currentColumn();
  return theRow >= 0 && theCol >= 0;
}
void SMESHGUI_FilterTable.CurrentChanged ( int  ,
int   
) [signal]

Referenced by onCurrentChanged().

void SMESHGUI_FilterTable.EntityTypeChanged ( const int  ) [signal]

Referenced by onEntityType().

QTableWidgetItem * SMESHGUI_FilterTable::getBinaryItem ( ) const [private]

Definition at line 1923 of file SMESHGUI_FilterDlg.cxx.

References SMESH.FT_LogicalAND, and SMESH.FT_LogicalOR.

Referenced by addRow(), and SetCriterion().

{
  static QMap<int, QString> aMap;
  if (aMap.isEmpty())
  {
    aMap[ SMESH::FT_LogicalAND ] = tr("AND");
    aMap[ SMESH::FT_LogicalOR  ] = tr("OR");
  }

  return new ComboItem(aMap);
}
const QMap< int, QString > & SMESHGUI_FilterTable::getCompare ( ) const [private]

Definition at line 2078 of file SMESHGUI_FilterDlg.cxx.

References SMESH.FT_EqualTo, SMESH.FT_LessThan, and SMESH.FT_MoreThan.

Referenced by getCompareItem(), and onCriterionChanged().

{
  static QMap<int, QString> aMap;

  if (aMap.isEmpty())
  {
    aMap[ SMESH::FT_LessThan ] = tr("LESS_THAN");
    aMap[ SMESH::FT_MoreThan ] = tr("MORE_THAN");
    aMap[ SMESH::FT_EqualTo  ] = tr("EQUAL_TO" );
  }

  return aMap;
}
QTableWidgetItem * SMESHGUI_FilterTable::getCompareItem ( ) const [private]

Definition at line 1914 of file SMESHGUI_FilterDlg.cxx.

References getCompare().

Referenced by addRow().

{
  return new ComboItem(getCompare());
}
const QMap< int, QString > & SMESHGUI_FilterTable::getCriteria ( const int  theType) const [private]

Definition at line 1967 of file SMESHGUI_FilterDlg.cxx.

References SMESH.EDGE, SMESH.FACE, SMESH.FT_Area, SMESH.FT_AspectRatio, SMESH.FT_AspectRatio3D, SMESH.FT_BadOrientedVolume, SMESH.FT_BareBorderFace, SMESH.FT_BareBorderVolume, SMESH.FT_BelongToCylinder, SMESH.FT_BelongToGenSurface, SMESH.FT_BelongToGeom, SMESH.FT_BelongToPlane, SMESH.FT_CoplanarFaces, SMESH.FT_ElemGeomType, SMESH.FT_FreeBorders, SMESH.FT_FreeEdges, SMESH.FT_FreeFaces, SMESH.FT_FreeNodes, SMESH.FT_GroupColor, SMESH.FT_Length, SMESH.FT_Length2D, SMESH.FT_LinearOrQuadratic, SMESH.FT_LyingOnGeom, SMESH.FT_MaxElementLength2D, SMESH.FT_MaxElementLength3D, SMESH.FT_MinimumAngle, SMESH.FT_MultiConnection, SMESH.FT_MultiConnection2D, SMESH.FT_OverConstrainedFace, SMESH.FT_OverConstrainedVolume, SMESH.FT_RangeOfIds, SMESH.FT_Skew, SMESH.FT_Taper, SMESH.FT_Volume3D, SMESH.FT_Warping, SMESH.NODE, and SMESH.VOLUME.

Referenced by createTable(), and getCriterionItem().

{
  if (theType == SMESH::NODE)
  {
    static QMap<int, QString> aCriteria;
    if (aCriteria.isEmpty())
    {
      aCriteria[ SMESH::FT_RangeOfIds         ] = tr("RANGE_OF_IDS");
      aCriteria[ SMESH::FT_BelongToGeom       ] = tr("BELONG_TO_GEOM");
      aCriteria[ SMESH::FT_BelongToPlane      ] = tr("BELONG_TO_PLANE");
      aCriteria[ SMESH::FT_BelongToCylinder   ] = tr("BELONG_TO_CYLINDER");
      aCriteria[ SMESH::FT_BelongToGenSurface ] = tr("BELONG_TO_GENSURFACE");
      aCriteria[ SMESH::FT_LyingOnGeom        ] = tr("LYING_ON_GEOM");
      aCriteria[ SMESH::FT_FreeNodes          ] = tr("FREE_NODES");
      aCriteria[ SMESH::FT_GroupColor         ] = tr("GROUP_COLOR");
    }
    return aCriteria;
  }
  else if (theType == SMESH::EDGE)
  {
    static QMap<int, QString> aCriteria;
    if (aCriteria.isEmpty())
    {
      aCriteria[ SMESH::FT_FreeBorders        ] = tr("FREE_BORDERS");
      aCriteria[ SMESH::FT_MultiConnection    ] = tr("MULTI_BORDERS");
      aCriteria[ SMESH::FT_Length             ] = tr("LENGTH");
      aCriteria[ SMESH::FT_RangeOfIds         ] = tr("RANGE_OF_IDS");
      aCriteria[ SMESH::FT_BelongToGeom       ] = tr("BELONG_TO_GEOM");
      aCriteria[ SMESH::FT_BelongToPlane      ] = tr("BELONG_TO_PLANE");
      aCriteria[ SMESH::FT_BelongToCylinder   ] = tr("BELONG_TO_CYLINDER");
      aCriteria[ SMESH::FT_BelongToGenSurface ] = tr("BELONG_TO_GENSURFACE");
      aCriteria[ SMESH::FT_LyingOnGeom        ] = tr("LYING_ON_GEOM");
      aCriteria[ SMESH::FT_LinearOrQuadratic  ] = tr("LINEAR");
      aCriteria[ SMESH::FT_GroupColor         ] = tr("GROUP_COLOR");
      aCriteria[ SMESH::FT_ElemGeomType       ] = tr("GEOM_TYPE");
    }
    return aCriteria;
  }
  else if (theType == SMESH::FACE)
  {
    static QMap<int, QString> aCriteria;
    if (aCriteria.isEmpty())
    {
      aCriteria[ SMESH::FT_AspectRatio        ] = tr("ASPECT_RATIO");
      aCriteria[ SMESH::FT_Warping            ] = tr("WARPING");
      aCriteria[ SMESH::FT_MinimumAngle       ] = tr("MINIMUM_ANGLE");
      aCriteria[ SMESH::FT_Taper              ] = tr("TAPER");
      aCriteria[ SMESH::FT_Skew               ] = tr("SKEW");
      aCriteria[ SMESH::FT_Area               ] = tr("AREA");
      aCriteria[ SMESH::FT_MaxElementLength2D ] = tr("MAX_ELEMENT_LENGTH_2D");
      aCriteria[ SMESH::FT_FreeEdges          ] = tr("FREE_EDGES");
      aCriteria[ SMESH::FT_RangeOfIds         ] = tr("RANGE_OF_IDS");
      aCriteria[ SMESH::FT_BelongToGeom       ] = tr("BELONG_TO_GEOM");
      aCriteria[ SMESH::FT_BelongToPlane      ] = tr("BELONG_TO_PLANE");
      aCriteria[ SMESH::FT_BelongToCylinder   ] = tr("BELONG_TO_CYLINDER");
      aCriteria[ SMESH::FT_BelongToGenSurface ] = tr("BELONG_TO_GENSURFACE");
      aCriteria[ SMESH::FT_LyingOnGeom        ] = tr("LYING_ON_GEOM");
      aCriteria[ SMESH::FT_Length2D           ] = tr("LENGTH2D");
      aCriteria[ SMESH::FT_MultiConnection2D  ] = tr("MULTI2D_BORDERS");
      aCriteria[ SMESH::FT_FreeFaces          ] = tr("FREE_FACES");
      aCriteria[ SMESH::FT_BareBorderFace     ] = tr("BARE_BORDER_FACE");
      aCriteria[ SMESH::FT_OverConstrainedFace] = tr("OVER_CONSTRAINED_FACE");
      aCriteria[ SMESH::FT_LinearOrQuadratic  ] = tr("LINEAR");
      aCriteria[ SMESH::FT_GroupColor         ] = tr("GROUP_COLOR");
      aCriteria[ SMESH::FT_ElemGeomType       ] = tr("GEOM_TYPE");
      aCriteria[ SMESH::FT_CoplanarFaces      ] = tr("COPLANAR_FACES");
    }
    return aCriteria;
  }
  else if (theType == SMESH::VOLUME)
  {
    static QMap<int, QString> aCriteria;
    if (aCriteria.isEmpty())
    {
      aCriteria[ SMESH::FT_AspectRatio3D        ] = tr("ASPECT_RATIO_3D");
      aCriteria[ SMESH::FT_RangeOfIds           ] = tr("RANGE_OF_IDS");
      aCriteria[ SMESH::FT_BelongToGeom         ] = tr("BELONG_TO_GEOM");
      aCriteria[ SMESH::FT_LyingOnGeom          ] = tr("LYING_ON_GEOM");
      aCriteria[ SMESH::FT_BadOrientedVolume    ] = tr("BAD_ORIENTED_VOLUME");
      aCriteria[ SMESH::FT_BareBorderVolume     ] = tr("BARE_BORDER_VOLUME");
      aCriteria[ SMESH::FT_OverConstrainedVolume] = tr("OVER_CONSTRAINED_VOLUME");
      aCriteria[ SMESH::FT_Volume3D             ] = tr("VOLUME_3D");
      aCriteria[ SMESH::FT_MaxElementLength3D   ] = tr("MAX_ELEMENT_LENGTH_3D");
      aCriteria[ SMESH::FT_LinearOrQuadratic    ] = tr("LINEAR");
      aCriteria[ SMESH::FT_GroupColor           ] = tr("GROUP_COLOR");
      aCriteria[ SMESH::FT_ElemGeomType         ] = tr("GEOM_TYPE");
    }
    return aCriteria;
  }
  else // SMESH::ALL
  {
    static QMap<int, QString> aCriteria;
    if (aCriteria.isEmpty())
    {
      aCriteria[ SMESH::FT_RangeOfIds         ] = tr("RANGE_OF_IDS");
      aCriteria[ SMESH::FT_BelongToGeom       ] = tr("BELONG_TO_GEOM");
      aCriteria[ SMESH::FT_LyingOnGeom        ] = tr("LYING_ON_GEOM");
      aCriteria[ SMESH::FT_LinearOrQuadratic  ] = tr("LINEAR");
      aCriteria[ SMESH::FT_GroupColor         ] = tr("GROUP_COLOR");
      aCriteria[ SMESH::FT_ElemGeomType       ] = tr("GEOM_TYPE");
    }

    return aCriteria;
  }
}
void SMESHGUI_FilterTable::GetCriterion ( const int  theRow,
SMESH::Filter::Criterion theCriterion,
const int  theEntityType = -1 
) const

Definition at line 1216 of file SMESHGUI_FilterDlg.cxx.

References SMESH.Filter.Criterion.BinaryOp, SMESH.Filter.Criterion.Compare, SMESH.FT_BelongToCylinder, SMESH.FT_BelongToGenSurface, SMESH.FT_BelongToGeom, SMESH.FT_BelongToPlane, SMESH.FT_CoplanarFaces, SMESH.FT_ElemGeomType, SMESH.FT_GroupColor, SMESH.FT_LogicalNOT, SMESH.FT_LyingOnGeom, SMESH.FT_RangeOfIds, SMESH.FT_Undefined, GetCriterionType(), GetType(), myAddWidgets, myTables, SMESHGUI_FilterTable.Table.text(), SMESH.Filter.Criterion.Threshold, SMESH.Filter.Criterion.ThresholdID, SMESH.Filter.Criterion.ThresholdStr, SMESHGUI_FilterTable.AdditionalWidget.Tolerance, SMESH.Filter.Criterion.Tolerance, SMESH.Filter.Criterion.Type, SMESH.Filter.Criterion.TypeOfElement, and SMESH.Filter.Criterion.UnaryOp.

Referenced by Copy(), SMESHGUI_FilterLibraryDlg.createFilter(), and SMESHGUI_FilterDlg.createFilter().

{
  int aType = theEntityType == -1 ? GetType() : theEntityType;
  Table* aTable = myTables[ aType ];

  theCriterion.Type = ((ComboItem*)aTable->item(theRow, 0))->value();
  theCriterion.UnaryOp = ((CheckItem*)aTable->item(theRow, 3))->checked() ? SMESH::FT_LogicalNOT : SMESH::FT_Undefined;
  theCriterion.BinaryOp = theRow != aTable->rowCount() - 1 ?
    ((ComboItem*)aTable->item(theRow, 4))->value() : SMESH::FT_Undefined;
  theCriterion.TypeOfElement = (SMESH::ElementType)aType;

  int aCriterionType = GetCriterionType(theRow, aType);

  if ( aCriterionType == SMESH::FT_GroupColor )
  {
    QtxColorButton* clrBtn = qobject_cast<QtxColorButton*>(aTable->cellWidget(theRow, 2));
    if ( clrBtn )
    {
      const QColor qClr = clrBtn->color();
      QString clrStr = QString( "%1;%2;%3" ).
        arg( qClr.red()/256. ).arg( qClr.green()/256. ).arg( qClr.blue()/256. );
      theCriterion.ThresholdStr = clrStr.toLatin1().constData();
    }
  }
  else if ( aCriterionType == SMESH::FT_ElemGeomType )
    theCriterion.Threshold = (double)((ComboItem*)aTable->item(theRow, 2))->value();
  else if ( aCriterionType == SMESH::FT_CoplanarFaces )
    theCriterion.ThresholdID = aTable->text(theRow, 2).toLatin1().constData();
  else if ( aCriterionType != SMESH::FT_RangeOfIds &&
            aCriterionType != SMESH::FT_BelongToGeom &&
            aCriterionType != SMESH::FT_BelongToPlane &&
            aCriterionType != SMESH::FT_BelongToCylinder &&
            aCriterionType != SMESH::FT_BelongToGenSurface &&
            aCriterionType != SMESH::FT_LyingOnGeom )
  {
    theCriterion.Compare = ((ComboItem*)aTable->item(theRow, 1))->value();
    theCriterion.Threshold = aTable->item(theRow, 2)->text().toDouble();
  }
  else
  {
    theCriterion.ThresholdStr = aTable->text(theRow, 2).toLatin1().constData();
    if ( aCriterionType != SMESH::FT_RangeOfIds )
      theCriterion.ThresholdID = aTable->text( theRow, 5 ).toLatin1().constData();
  }

  QTableWidgetItem* anItem = aTable->item(theRow, 0);
  if (myAddWidgets.contains(anItem))
    theCriterion.Tolerance = myAddWidgets[ anItem ]->GetDouble(AdditionalWidget::Tolerance);
}
QTableWidgetItem * SMESHGUI_FilterTable::getCriterionItem ( const int  theType) const [private]

Definition at line 1905 of file SMESHGUI_FilterDlg.cxx.

References getCriteria().

Referenced by addRow().

{
  return new ComboItem(getCriteria(theType));
}
int SMESHGUI_FilterTable::GetCriterionType ( const int  theRow,
const int  theType = -1 
) const

Definition at line 1204 of file SMESHGUI_FilterDlg.cxx.

References SMESH.FT_Undefined, GetType(), myTables, and SMESHGUI_FilterTable.ComboItem.value().

Referenced by GetCriterion(), SMESHGUI_FilterDlg.isValid(), IsValid(), onCriterionChanged(), SMESHGUI_FilterDlg.onSelectionDone(), updateAdditionalWidget(), and SMESHGUI_FilterDlg.updateSelection().

{
  int aType = theType == -1 ? GetType() : theType;
  Table* aTable = myTables[ aType ];
  ComboItem* anItem = (ComboItem*)aTable->item(theRow, 0);
  return anItem != 0 ? anItem->value() : SMESH::FT_Undefined;
}
int SMESHGUI_FilterTable::getFirstSelectedRow ( ) const [private]

Definition at line 1818 of file SMESHGUI_FilterDlg.cxx.

References GetType(), myTables, and SMESHGUI_FilterTable.Table.selectedRows().

Referenced by addRow().

{
  Table* aTable = myTables[ GetType() ];

  QList<int> selRows = aTable->selectedRows(); // already sorted
  int aRow = selRows.count() > 0 ? selRows[0] : aTable->currentRow();

  return aRow >= 0 && aRow < aTable->rowCount() ? aRow : -1;
}
bool SMESHGUI_FilterTable::GetID ( const int  theRow,
QString &  theText,
const int  theEntityType = -1 
)

Definition at line 2374 of file SMESHGUI_FilterDlg.cxx.

References GetType(), and myTables.

{
  Table* aTable = myTables[ theEntityType == -1 ? GetType() : theEntityType ];
  QTableWidgetItem* anItem = aTable->item( theRow, 5 );
  if ( anItem != 0 )
    {
      theText = anItem->text();
      return true;    
    }
  else
    return false;
} 
const char * SMESHGUI_FilterTable::getPrecision ( const int  aType) [private]
const QMap< int, QString > & SMESHGUI_FilterTable::getSupportedTypes ( ) const [private]

Definition at line 1948 of file SMESHGUI_FilterDlg.cxx.

References SMESH.ALL, EDGE, FACE, SMESH.NODE, and VOLUME.

Referenced by createTable(), and Init().

{
  static QMap<int, QString> aTypes;
  if (aTypes.isEmpty())
  {
    aTypes[ SMESH::NODE   ] = tr("NODES");
    aTypes[ SMESH::EDGE   ] = tr("EDGES");
    aTypes[ SMESH::FACE   ] = tr("FACES");
    aTypes[ SMESH::VOLUME ] = tr("VOLUMES");
    aTypes[ SMESH::ALL ]    = tr("ELEMENTS");
  }

  return aTypes;
}
QGroupBox * SMESHGUI_FilterTable::GetTableGrp ( )

Definition at line 1062 of file SMESHGUI_FilterDlg.cxx.

References myTableGrp.

Referenced by SMESHGUI_FilterDlg.createMainFrame().

{
  return myTableGrp;
}
bool SMESHGUI_FilterTable::GetThreshold ( const int  theRow,
QString &  theText,
const int  theEntityType = -1 
)

Definition at line 2343 of file SMESHGUI_FilterDlg.cxx.

References GetType(), and myTables.

Referenced by SMESHGUI_FilterDlg.isValid().

{
  Table* aTable = myTables[ theEntityType == -1 ? GetType() : theEntityType ];
  QTableWidgetItem* anItem = aTable->item(theRow, 2);
  if (anItem != 0)
  {
    theText = anItem->text();
    return true;
  }
  else
   return false;
}
int SMESHGUI_FilterTable::GetType ( ) const
QTableWidgetItem * SMESHGUI_FilterTable::getUnaryItem ( ) const [private]

Definition at line 1939 of file SMESHGUI_FilterDlg.cxx.

Referenced by addRow().

{
  return new CheckItem(tr("NOT"));
}
void SMESHGUI_FilterTable::Init ( const QList< int > &  theTypes)

Definition at line 903 of file SMESHGUI_FilterDlg.cxx.

References createAdditionalFrame(), createTable(), getSupportedTypes(), MARGIN, myAddBtn, myAddToBtn, myClearBtn, myCopyFromBtn, myEntityTypeBox, myEntityTypeGrp, myInsertBtn, myLibDlg, myRemoveBtn, mySwitchTableGrp, myTableGrp, myTables, onAddBtn(), onAddToBtn(), onClearBtn(), onCopyFromBtn(), onEntityType(), onInsertBtn(), onRemoveBtn(), and SPACING.

Referenced by SMESHGUI_FilterLibraryDlg.Init(), SMESHGUI_FilterDlg.Init(), and SMESHGUI_FilterTable().

{
  if (theTypes.isEmpty())
    return;

  // Create buttons if necessary

  if (myTables.isEmpty())
  {
    // create main layout
    QVBoxLayout* aMainLay = new QVBoxLayout(this);
    aMainLay->setMargin( 0 );
    aMainLay->setSpacing( SPACING );

    // create switch of entity types
    myEntityTypeBox = new QGroupBox(tr("ENTITY_TYPE"), this);
    QHBoxLayout* myEntityTypeBoxLayout = new QHBoxLayout(myEntityTypeBox);
    myEntityTypeBoxLayout->setMargin( MARGIN );
    myEntityTypeBoxLayout->setSpacing( SPACING );
    myEntityTypeGrp = new QButtonGroup(this);

    const QMap<int, QString>& aSupportedTypes = getSupportedTypes();
    QMap<int, QString>::const_iterator anIter;
    for (anIter = aSupportedTypes.begin(); anIter != aSupportedTypes.end(); ++anIter)
    {
      QRadioButton* aBtn = new QRadioButton(anIter.value(), myEntityTypeBox);
      myEntityTypeGrp->addButton(aBtn, anIter.key());
      myEntityTypeBoxLayout->addWidget(aBtn);
    }

    myTableGrp = new QGroupBox(tr("FILTER"), this );

    // create table
    mySwitchTableGrp = new QWidget(myTableGrp);
    QVBoxLayout* mySwitchTableGrpLayout = new QVBoxLayout(mySwitchTableGrp);
    mySwitchTableGrpLayout->setMargin(0);
    mySwitchTableGrpLayout->setSpacing(0);

    QList<int>::const_iterator typeIt = theTypes.begin();
    for ( ; typeIt != theTypes.end(); ++typeIt ) {
      Table* aTable = createTable(mySwitchTableGrp, *typeIt);
      myTables[ *typeIt ] = aTable;
      mySwitchTableGrpLayout->addWidget(aTable);
      if ( typeIt != theTypes.begin() )
        aTable->hide();
    }

    // create buttons
    myAddBtn      = new QPushButton(tr("ADD"),       myTableGrp);
    myRemoveBtn   = new QPushButton(tr("REMOVE"),    myTableGrp);
    myClearBtn    = new QPushButton(tr("CLEAR"),     myTableGrp);
    myInsertBtn   = new QPushButton(tr("INSERT"),    myTableGrp);
    myCopyFromBtn = new QPushButton(tr("COPY_FROM"), myTableGrp);
    myAddToBtn    = new QPushButton(tr("ADD_TO"),    myTableGrp);

    myAddBtn->setAutoDefault(false);
    myRemoveBtn->setAutoDefault(false);
    myClearBtn->setAutoDefault(false);
    myInsertBtn->setAutoDefault(false);
    myCopyFromBtn->setAutoDefault(false);
    myAddToBtn->setAutoDefault(false);

    myCopyFromBtn->hide();
    myAddToBtn->hide();

    // layout widgets
    QGridLayout* aLay = new QGridLayout(myTableGrp);
    aLay->setMargin(MARGIN);
    aLay->setSpacing(SPACING);

    aLay->addWidget(mySwitchTableGrp, 0, 0, 7, 1);
    aLay->addWidget(myAddBtn,         0, 1);
    aLay->addWidget(myInsertBtn,      1, 1);
    aLay->addWidget(myRemoveBtn,      2, 1);
    aLay->addWidget(myClearBtn,       3, 1);
    aLay->addWidget(myCopyFromBtn,    5, 1);
    aLay->addWidget(myAddToBtn,       6, 1);
    aLay->addWidget(createAdditionalFrame(myTableGrp), 7, 0, 1, 2 );

    aLay->setRowMinimumHeight(4, 10);
    aLay->setRowStretch(4, 1);
    aLay->setColumnStretch(0, 1);
    aLay->setColumnStretch(1, 0);

    // layout 
    aMainLay->addWidget(myEntityTypeBox);
    aMainLay->addWidget(myTableGrp);
    
    // signals and slots
    connect(myAddBtn,    SIGNAL(clicked()), this, SLOT(onAddBtn()));
    connect(myInsertBtn, SIGNAL(clicked()), this, SLOT(onInsertBtn()));
    connect(myRemoveBtn, SIGNAL(clicked()), this, SLOT(onRemoveBtn()));
    connect(myClearBtn,  SIGNAL(clicked()), this, SLOT(onClearBtn()));

    connect(myCopyFromBtn, SIGNAL(clicked()), this, SLOT(onCopyFromBtn()));
    connect(myAddToBtn,    SIGNAL(clicked()), this, SLOT(onAddToBtn()));

    connect(myEntityTypeGrp, SIGNAL(buttonClicked(int)), this, SLOT(onEntityType(int)));

    myLibDlg = 0;
  }

  // Hide buttons of entity types if necessary
  const QMap<int, QString>& aSupportedTypes = getSupportedTypes();
  QMap<int, QString>::const_iterator anIt;
  for (anIt = aSupportedTypes.begin(); anIt != aSupportedTypes.end(); ++anIt)
  {
    QAbstractButton* aBtn = myEntityTypeGrp->button(anIt.key());
    if ( aBtn ) aBtn->setVisible( theTypes.contains(anIt.key()) );
  }

  // select first button if there is no selected buttons or it is hidden
  int aBtnId = myEntityTypeGrp->checkedId();
  if ( aBtnId == -1 || !theTypes.contains(aBtnId) ) {
    QAbstractButton* aBtn = myEntityTypeGrp->button(theTypes.first());
    if ( aBtn ) aBtn->setChecked(true);
  }

  myEntityTypeBox->setVisible(theTypes.count() > 1);

  myTableGrp->updateGeometry();
  int cType = myEntityTypeGrp->checkedId();
  onEntityType(cType);
}
bool SMESHGUI_FilterTable::IsEditable ( ) const

Definition at line 2237 of file SMESHGUI_FilterDlg.cxx.

References GetType(), and myTables.

Referenced by SMESHGUI_FilterLibraryDlg.onAddBtnPressed(), and SMESHGUI_FilterLibraryDlg.onFilterChanged().

{
  return !myTables[ GetType() ]->isReadOnly();
}
bool SMESHGUI_FilterTable::IsValid ( const bool  theMess = true,
const int  theEntityType = -1 
) const

Definition at line 1108 of file SMESHGUI_FilterDlg.cxx.

References SMESH_freebord.aCriterion, SMESHGUI.desktop(), SMESH.EDGE, SMESH.FT_BelongToCylinder, SMESH.FT_BelongToGenSurface, SMESH.FT_BelongToGeom, SMESH.FT_BelongToPlane, SMESH.FT_CoplanarFaces, SMESH.FT_ElemGeomType, SMESH.FT_GroupColor, SMESH.FT_LyingOnGeom, SMESH.FT_MultiConnection, SMESH.FT_RangeOfIds, GetCriterionType(), GetType(), SMESHGUI_FilterTable.Table.isEditable(), myAddWidgets, myTables, and SMESHGUI_FilterTable.Table.text().

Referenced by SMESHGUI_FilterLibraryDlg.isValid(), SMESHGUI_FilterDlg.isValid(), and onAddToBtn().

{
  int aType = theEntityType == -1 ? GetType() : theEntityType;

  Table* aTable = myTables[ aType ];
  for (int i = 0, n = aTable->rowCount(); i < n; i++)
  {
    int aCriterion = GetCriterionType(i, aType);
    QString errMsg;
    if (aCriterion == SMESH::FT_GroupColor ) {
      QtxColorButton* clrBtn = qobject_cast<QtxColorButton*>(aTable->cellWidget(i, 2));
      if (clrBtn && !clrBtn->color().isValid())
        errMsg = tr( "GROUPCOLOR_ERROR" );
    }
    else if (aCriterion == SMESH::FT_RangeOfIds ||
             aCriterion == SMESH::FT_BelongToGeom ||
             aCriterion == SMESH::FT_BelongToPlane ||
             aCriterion == SMESH::FT_BelongToCylinder ||
             aCriterion == SMESH::FT_BelongToGenSurface ||
             aCriterion == SMESH::FT_ElemGeomType ||
             aCriterion == SMESH::FT_CoplanarFaces ||
             aCriterion == SMESH::FT_LyingOnGeom)
    {
      if (aTable->text(i, 2).isEmpty())
        errMsg = tr( "ERROR" );
    }
    else {
      bool aRes = false;
      bool isSignalsBlocked = aTable->signalsBlocked();
      aTable->blockSignals(true);
      double  aThreshold = (int)aTable->text(i, 2).toDouble(&aRes);
      aTable->blockSignals(isSignalsBlocked);

      if (!aRes && aTable->isEditable(i, 2))
        errMsg = tr( "ERROR" );
      else if (aType == SMESH::EDGE &&
               GetCriterionType(i, aType) == SMESH::FT_MultiConnection &&
               aThreshold == 1)
        errMsg = tr( "MULTIEDGES_ERROR" );
    }

    if (!errMsg.isEmpty()) {
      if (theMess)
        SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"), errMsg );
      return false;
    }

    QTableWidgetItem* anItem = aTable->item(i, 0);
    if (myAddWidgets.contains(anItem) && !myAddWidgets[ anItem ]->IsValid())
      return false;
  }

  return true;
}
void SMESHGUI_FilterTable.NeedValidation ( ) [signal]

Referenced by onEntityType().

int SMESHGUI_FilterTable::NumRows ( const int  theEntityType = -1) const

Definition at line 1400 of file SMESHGUI_FilterDlg.cxx.

References GetType(), and myTables.

Referenced by Copy(), SMESHGUI_FilterLibraryDlg.createFilter(), SMESHGUI_FilterDlg.createFilter(), and SMESHGUI_FilterDlg.isValid().

{
  return myTables[ theEntityType == -1 ? GetType() : theEntityType ]->rowCount();
}
void SMESHGUI_FilterTable::onAddBtn ( ) [private, slot]

Definition at line 1431 of file SMESHGUI_FilterDlg.cxx.

References addRow(), GetType(), myTables, and Update().

Referenced by Init().

{
  int aType = GetType();
  addRow(myTables[ aType ], aType);

  Update();
}
void SMESHGUI_FilterTable::onAddToBtn ( ) [private, slot]
void SMESHGUI_FilterTable::onClearBtn ( ) [private, slot]

Definition at line 1573 of file SMESHGUI_FilterDlg.cxx.

References GetType(), myTables, removeAdditionalWidget(), and updateBtnState().

Referenced by Init().

{
  Table* aTable = myTables[ GetType() ];

  if (aTable->rowCount() == 0)
    return;

  while (aTable->rowCount() > 0)
  {
    removeAdditionalWidget(aTable, 0);
    aTable->removeRow(0);
  }

  updateBtnState();
}
void SMESHGUI_FilterTable::onCopyFromBtn ( ) [private, slot]
void SMESHGUI_FilterTable::onCriterionChanged ( int  row,
int  col 
) [private, slot]

Definition at line 1808 of file SMESHGUI_FilterDlg.cxx.

Referenced by addRow(), createTable(), and SetCriterion().

{
  if( col == 0 )
    onCriterionChanged(row, col, -1);
}
void SMESHGUI_FilterTable::onCriterionChanged ( const int  row,
const int  col,
const int  entityType 
) [private]

Definition at line 1632 of file SMESHGUI_FilterDlg.cxx.

References SMESHGUI_FilterTable.ComboItem.clear(), SMESHGUI_FilterTable.ComboItem.count(), CriterionChanged(), SMESH.EDGE, SMESH.FACE, SMESH.FT_Area, SMESH.FT_AspectRatio, SMESH.FT_AspectRatio3D, SMESH.FT_BadOrientedVolume, SMESH.FT_BareBorderFace, SMESH.FT_BareBorderVolume, SMESH.FT_BelongToCylinder, SMESH.FT_BelongToGenSurface, SMESH.FT_BelongToGeom, SMESH.FT_BelongToPlane, SMESH.FT_CoplanarFaces, SMESH.FT_ElemGeomType, SMESH.FT_EqualTo, SMESH.FT_FreeBorders, SMESH.FT_FreeEdges, SMESH.FT_FreeFaces, SMESH.FT_FreeNodes, SMESH.FT_GroupColor, SMESH.FT_Length, SMESH.FT_Length2D, SMESH.FT_LinearOrQuadratic, SMESH.FT_LyingOnGeom, SMESH.FT_MaxElementLength2D, SMESH.FT_MaxElementLength3D, SMESH.FT_MinimumAngle, SMESH.FT_MultiConnection, SMESH.FT_OverConstrainedFace, SMESH.FT_OverConstrainedVolume, SMESH.FT_RangeOfIds, SMESH.FT_Skew, SMESH.FT_Taper, SMESH.FT_Volume3D, SMESH.FT_Warping, geomTypes(), getCompare(), GetCriterionType(), getPrecision(), SMESH.GetResourceMgr(), GetType(), SMESHGUI_FilterTable.Table.isEditable(), mySMESHGUI, myTables, SMESH.NODE, SMESHGUI_FilterTable.Table.setEditable(), SMESHGUI_FilterTable.ComboItem.setItems(), SMESHGUI_FilterTable.DoubleSpinItem.setPrecision(), SMESHGUI_FilterTable.Table.text(), SMESHGUI_FilterTable.DoubleSpinItem.Type(), SMESHGUI_FilterTable.IntSpinItem.Type(), SMESHGUI_FilterTable.ComboItem.Type(), updateAdditionalWidget(), and SMESH.VOLUME.

{
  int aType = entityType == -1 ? GetType() : entityType;
  Table* aTable = myTables[ aType ];
  ComboItem* aCompareItem = (ComboItem*)aTable->item(row, 1);

  int aCriterionType = GetCriterionType(row);
  QtxColorButton* clrBtn = qobject_cast<QtxColorButton*>(aTable->cellWidget(row, 2));
  int aComboType = ComboItem::Type();
  int aIntSpinType = IntSpinItem::Type();
  int aDoubleSpinType = DoubleSpinItem::Type();
  QTableWidgetItem* aTableItem = aTable->item(row, 2);
  bool isComboItem = false;
  bool isIntSpinItem = false;
  bool isDoubleSpinItem = false;
  if (aTableItem) {
    int aTableType = aTable->item(row, 2)->type();
    isComboItem = ( aTableType == aComboType );
    isIntSpinItem = ( aTableType == aIntSpinType );
    isDoubleSpinItem = ( aTableType == aDoubleSpinType );
  }
  
  bool anIsDoubleCriterion =
    aCriterionType == SMESH::FT_AspectRatio ||
    aCriterionType == SMESH::FT_AspectRatio3D ||
    aCriterionType == SMESH::FT_Taper ||
    aCriterionType == SMESH::FT_Warping ||
    aCriterionType == SMESH::FT_MinimumAngle ||
    aCriterionType == SMESH::FT_Skew ||
    aCriterionType == SMESH::FT_Area ||
    aCriterionType == SMESH::FT_Length ||
    aCriterionType == SMESH::FT_Length2D ||
    aCriterionType == SMESH::FT_MaxElementLength2D ||
    aCriterionType == SMESH::FT_MaxElementLength3D ||
    aCriterionType == SMESH::FT_Volume3D;

  int aPrecision = 0;
  if ( anIsDoubleCriterion ) {
    const char* aPrecisionType = getPrecision( aCriterionType );
    SUIT_ResourceMgr* aResourceMgr = SMESH::GetResourceMgr( mySMESHGUI );
    if( aPrecisionType && aResourceMgr )
      aPrecision = aResourceMgr->integerValue( "SMESH", aPrecisionType, aPrecision );
  }

  // if the precision is to be changed we should remove the existing
  // spin item and create another one with new precision
  bool anIsPrecisionChanged = false;
  if ( anIsDoubleCriterion && isDoubleSpinItem ) {
    if ( DoubleSpinItem* aDoubleSpinItem = dynamic_cast<DoubleSpinItem*>( aTable->item( row, 2 ) ) ) {
      anIsPrecisionChanged = aDoubleSpinItem->precision() != aPrecision;
    }
  }

  if ( (aCriterionType != SMESH::FT_GroupColor && clrBtn) ||
       (aCriterionType != SMESH::FT_ElemGeomType && isComboItem) ||
       (aCriterionType != SMESH::FT_MultiConnection && isIntSpinItem) ||
       (!anIsDoubleCriterion && isDoubleSpinItem) ||
       anIsPrecisionChanged )
  {
    bool isSignalsBlocked = aTable->signalsBlocked();
    aTable->blockSignals( true );
    aTable->removeCellWidget( row, 2 );
    aTable->setItem( row, 2, new QTableWidgetItem() );
    aTable->blockSignals( isSignalsBlocked );
  }
  if ( (aCriterionType == SMESH::FT_GroupColor && !clrBtn) ||
       (aCriterionType == SMESH::FT_ElemGeomType && !isComboItem) ||
       (aCriterionType == SMESH::FT_MultiConnection && !isIntSpinItem) ||
       (anIsDoubleCriterion && !isDoubleSpinItem) ||
       anIsPrecisionChanged )
  {
    bool isSignalsBlocked = aTable->signalsBlocked();
    aTable->blockSignals( true );
    if ( aCriterionType == SMESH::FT_GroupColor )
      aTable->setCellWidget( row, 2, new QtxColorButton( aTable ) );
    else if ( aCriterionType == SMESH::FT_ElemGeomType ) {
      QList<int> typeIds = geomTypes( aType );
      QMap<int, QString> typeNames;
      QList<int>::const_iterator anIter = typeIds.begin();
      for ( int i = 0; anIter != typeIds.end(); ++anIter, ++i)
      {
        QString typeKey = QString( "GEOM_TYPE_%1" ).arg( *anIter );
        typeNames[ *anIter ] = tr( typeKey.toLatin1().data() );
      }
      ComboItem* typeBox = new ComboItem( typeNames );
      aTable->setItem( row, 2, typeBox );
    }
    else if ( aCriterionType == SMESH::FT_MultiConnection ) {
      IntSpinItem* intSpin = new IntSpinItem( 0 );
      aTable->setItem( row, 2, intSpin );
    }
    else if ( anIsDoubleCriterion ) {
      DoubleSpinItem* dblSpin = new DoubleSpinItem( 0 );
      dblSpin->setPrecision( aPrecision );
      aTable->setItem( row, 2, dblSpin );
    }
    aTable->blockSignals( isSignalsBlocked );
  }

  if ((aType == SMESH::NODE && aCriterionType == SMESH::FT_FreeNodes ) ||
      (aType == SMESH::EDGE && aCriterionType == SMESH::FT_FreeBorders ) ||
      (aType == SMESH::FACE && (aCriterionType == SMESH::FT_BareBorderFace ||
                                aCriterionType == SMESH::FT_OverConstrainedFace ||
                                aCriterionType == SMESH::FT_FreeEdges ||
                                aCriterionType == SMESH::FT_FreeFaces)) ||
      (aType == SMESH::VOLUME && (aCriterionType == SMESH::FT_BadOrientedVolume ||
                                  aCriterionType == SMESH::FT_OverConstrainedVolume ||
                                  aCriterionType == SMESH::FT_BareBorderVolume)) ||
      aCriterionType == SMESH::FT_LinearOrQuadratic ||
      aCriterionType == SMESH::FT_GroupColor ||
      aCriterionType == SMESH::FT_ElemGeomType ||
      aCriterionType == SMESH::FT_CoplanarFaces
      )
  {
    bool isSignalsBlocked = aTable->signalsBlocked();
    aTable->blockSignals( true );

    if (aCompareItem->count() > 0)
      aCompareItem->clear();
    aTable->setEditable(false, row, 1);
    aTable->item(row, 2)->setText( QString("") );
    aTable->setEditable(aCriterionType == SMESH::FT_GroupColor ||
                        aCriterionType == SMESH::FT_ElemGeomType ||
                        aCriterionType == SMESH::FT_CoplanarFaces, row, 2);
    aTable->blockSignals( isSignalsBlocked );
  }
  else if (aCriterionType == SMESH::FT_RangeOfIds ||
           aCriterionType == SMESH::FT_BelongToGeom ||
           aCriterionType == SMESH::FT_BelongToPlane ||
           aCriterionType == SMESH::FT_BelongToCylinder ||
           aCriterionType == SMESH::FT_BelongToGenSurface ||
           aCriterionType == SMESH::FT_LyingOnGeom)
  {
    QMap<int, QString> aMap;
    aMap[ SMESH::FT_EqualTo ] = tr("EQUAL_TO");
    aCompareItem->setItems(aMap);
    if (!aTable->isEditable(row, 2))
      aTable->setEditable(true, row, 1);
    if (!aTable->isEditable(row, 2))
      aTable->setEditable(true, row, 2);
  }
  else if (aCriterionType == SMESH::FT_GroupColor ||
           aCriterionType == SMESH::FT_ElemGeomType)
  {
    if (!aTable->isEditable(row, 2))
      aTable->setEditable(true, row, 2);
  }
  else
  {
    if (aCompareItem && aCompareItem->count() != 3)
    {
      aCompareItem->setItems(getCompare());
    }

    if (aTable->item( row, 2 )) {
      QString aText = aTable->text(row, 2);
      bool isOk = false;
      aText.toDouble(&isOk);
      aTable->item( row, 2 )->setText(isOk ? aText : QString(""));
      if (!aTable->isEditable(row, 1))
        aTable->setEditable(true, row, 1);
      if (!aTable->isEditable(row, 2))
        aTable->setEditable(true, row, 2);
    }
  }

  updateAdditionalWidget();

  emit CriterionChanged(row, entityType);
}
void SMESHGUI_FilterTable::onCurrentChanged ( int  theRow,
int  theCol 
) [private, slot]

Definition at line 1593 of file SMESHGUI_FilterDlg.cxx.

References CurrentChanged(), myIsLocked, and updateAdditionalWidget().

Referenced by createTable().

{
  if( !myIsLocked )
    updateAdditionalWidget();
  emit CurrentChanged(theRow, theCol);
}
void SMESHGUI_FilterTable::onEntityType ( int  theType) [private, slot]

Definition at line 1072 of file SMESHGUI_FilterDlg.cxx.

References createTable(), EntityTypeChanged(), myEntityType, myEntityTypeGrp, myIsValid, mySwitchTableGrp, myTables, NeedValidation(), and updateBtnState().

Referenced by Init(), and SetType().

{
  if (myEntityType == theType)
    return;

  myIsValid = true;
  emit NeedValidation();
  if (!myIsValid)
  {
    myEntityTypeGrp->button(myEntityType)->setChecked(true);
    return;
  }

  myEntityType = theType;

  if (!myTables.contains(theType)) {
    myTables[ theType ] = createTable(mySwitchTableGrp, theType);
    ((QVBoxLayout*)mySwitchTableGrp->layout())->addWidget(myTables[ theType ]);
  }

  TableMap::iterator anIter;
  for (anIter = myTables.begin(); anIter != myTables.end(); ++anIter)
     anIter.value()->setVisible( myEntityType == anIter.key() );

  updateBtnState();
  qApp->processEvents();
  myTables[ myEntityType ]->updateGeometry();
  adjustSize();

  emit EntityTypeChanged(theType);
}
void SMESHGUI_FilterTable::onInsertBtn ( ) [private, slot]

Definition at line 1444 of file SMESHGUI_FilterDlg.cxx.

References addRow(), GetType(), and myTables.

Referenced by Init().

{
  addRow(myTables[ GetType() ], GetType(), false);
}
void SMESHGUI_FilterTable::onRemoveBtn ( ) [private, slot]

Definition at line 1454 of file SMESHGUI_FilterDlg.cxx.

References GetType(), myTables, removeAdditionalWidget(), SMESHGUI_FilterTable.Table.selectedRows(), SMESHGUI_FilterTable.Table.setEditable(), and updateBtnState().

Referenced by Init().

{
  Table* aTable = myTables[ GetType() ];

  if (aTable->rowCount() == 0)
    return;

  QList<QTableWidgetItem*> items = aTable->selectedItems();
  
  QList<int> aRows = aTable->selectedRows(); // already sorted
  int i;
  foreach( i, aRows )
  {
    removeAdditionalWidget(aTable, i);
    aTable->removeRow(i);
  }

  // remove control of binary logical operation from last row
  if (aTable->rowCount() > 0)
    aTable->setEditable(false, aTable->rowCount() - 1, 4);

  updateBtnState();
}
void SMESHGUI_FilterTable::removeAdditionalWidget ( QTableWidget theTable,
const int  theRow 
) [private]

Definition at line 1556 of file SMESHGUI_FilterDlg.cxx.

References myAddWidgets, and myWgStack.

Referenced by Clear(), onClearBtn(), and onRemoveBtn().

{
  QTableWidgetItem* anItem = theTable->item(theRow, 0);
  if (myAddWidgets.contains(anItem))
  {
    myWgStack->removeWidget(myAddWidgets[ anItem ]);
    myAddWidgets[ anItem ]->setParent(0);
    delete myAddWidgets[ anItem ];
    myAddWidgets.remove(anItem);
  }
}
void SMESHGUI_FilterTable::RestorePreviousEntityType ( )

Definition at line 1195 of file SMESHGUI_FilterDlg.cxx.

References myEntityType, and SetType().

void SMESHGUI_FilterTable::SetCriterion ( const int  theRow,
const SMESH::Filter::Criterion theCriterion,
const int  theEntityType = -1 
)

Definition at line 1272 of file SMESHGUI_FilterDlg.cxx.

References SMESH.Filter.Criterion.BinaryOp, SMESH.Filter.Criterion.Compare, CriterionChanged(), SMESH.FT_BadOrientedVolume, SMESH.FT_BareBorderFace, SMESH.FT_BareBorderVolume, SMESH.FT_BelongToCylinder, SMESH.FT_BelongToGenSurface, SMESH.FT_BelongToGeom, SMESH.FT_BelongToPlane, SMESH.FT_CoplanarFaces, SMESH.FT_ElemGeomType, SMESH.FT_EqualTo, SMESH.FT_FreeBorders, SMESH.FT_FreeEdges, SMESH.FT_FreeFaces, SMESH.FT_FreeNodes, SMESH.FT_GroupColor, SMESH.FT_LinearOrQuadratic, SMESH.FT_LogicalNOT, SMESH.FT_LyingOnGeom, SMESH.FT_OverConstrainedFace, SMESH.FT_OverConstrainedVolume, SMESH.FT_RangeOfIds, SMESH.FT_Undefined, getBinaryItem(), getPrecision(), GetType(), SMESHGUI_FilterTable.Table.isEditable(), myAddWidgets, myTables, myWgStack, onCriterionChanged(), SMESHGUI_FilterTable.Table.setEditable(), SMESHGUI_FilterTable.ComboItem.setValue(), SMESH.Filter.Criterion.Threshold, SMESH.Filter.Criterion.ThresholdID, SMESH.Filter.Criterion.ThresholdStr, toDouble(), SMESH.Filter.Criterion.Tolerance, SMESHGUI_FilterTable.AdditionalWidget.Tolerance, SMESH.Filter.Criterion.Type, and SMESH.Filter.Criterion.UnaryOp.

Referenced by AddCriterion().

{
  int aType = theEntityType == -1 ? GetType() : theEntityType;

  Table* aTable = myTables[ aType ];

  if (theRow > aTable->rowCount() - 1)
    return;

  ((ComboItem*)aTable->item(theRow, 0))->setValue(theCriterion.Type);
  onCriterionChanged(theRow, 0, aType);
  ((ComboItem*)aTable->item(theRow, 1))->setValue(theCriterion.Compare);
  ((CheckItem*)aTable->item(theRow, 3))->setChecked(theCriterion.UnaryOp == SMESH::FT_LogicalNOT);

  if (theCriterion.BinaryOp != SMESH::FT_Undefined)
  {
    if (!aTable->isEditable(theRow, 4))
      aTable->setItem(theRow, 4, getBinaryItem());
    ((ComboItem*)aTable->item(theRow, 4))->setValue(theCriterion.BinaryOp);
  }
  else
    aTable->setEditable(false, theRow, 4);

  if (theCriterion.Type == SMESH::FT_GroupColor )
  {
    QtxColorButton* clrBtn = qobject_cast<QtxColorButton*>(aTable->cellWidget(theRow, 2));
    if ( clrBtn )
    {
      QColor qClr;
      QString clrStr( theCriterion.ThresholdStr );
      QStringList clrVals = clrStr.split( ";" );
      if ( clrVals.count() > 2 )
        qClr.setRgb( (int)256*clrVals[0].toDouble(),
                     (int)256*clrVals[1].toDouble(),
                     (int)256*clrVals[2].toDouble() );
      clrBtn->setColor( qClr );
    }
  }
  else if (theCriterion.Type == SMESH::FT_ElemGeomType )
  {
    ComboItem* typeBox = (ComboItem*)aTable->item(theRow, 2);
    typeBox->setValue( (int)(theCriterion.Threshold + 0.5) );
  }
  else if (theCriterion.Type == SMESH::FT_CoplanarFaces )
  {
    aTable->item( theRow, 2 )->setText( QString( theCriterion.ThresholdID ) );
  }
  else if (theCriterion.Type != SMESH::FT_RangeOfIds &&
           theCriterion.Type != SMESH::FT_BelongToGeom &&
           theCriterion.Type != SMESH::FT_BelongToPlane &&
           theCriterion.Type != SMESH::FT_BelongToCylinder &&
           theCriterion.Type != SMESH::FT_BelongToGenSurface &&
           theCriterion.Type != SMESH::FT_LyingOnGeom &&
           theCriterion.Type != SMESH::FT_CoplanarFaces &&
           theCriterion.Type != SMESH::FT_FreeBorders &&
           theCriterion.Type != SMESH::FT_FreeEdges &&
           theCriterion.Type != SMESH::FT_FreeNodes &&
           theCriterion.Type != SMESH::FT_FreeFaces &&
           theCriterion.Type != SMESH::FT_BadOrientedVolume &&
           theCriterion.Type != SMESH::FT_BareBorderFace &&
           theCriterion.Type != SMESH::FT_BareBorderVolume &&
           theCriterion.Type != SMESH::FT_OverConstrainedFace &&
           theCriterion.Type != SMESH::FT_OverConstrainedVolume &&
           theCriterion.Type != SMESH::FT_LinearOrQuadratic)
  {
    aTable->item( theRow, 2 )->setText(QString("%1").arg(theCriterion.Threshold, 0, 'g', 15));
  }
  else
  {
    aTable->item( theRow, 2 )->setText(QString(theCriterion.ThresholdStr));
    if ( theCriterion.Type != SMESH::FT_RangeOfIds )
      aTable->item( theRow, 5 )->setText( QString( theCriterion.ThresholdID ) );
  }

  if (theCriterion.Compare == SMESH::FT_EqualTo ||
      theCriterion.Type    == SMESH::FT_BelongToPlane ||
      theCriterion.Type    == SMESH::FT_BelongToCylinder ||
      theCriterion.Type    == SMESH::FT_BelongToGenSurface ||
      theCriterion.Type    == SMESH::FT_BelongToGeom ||
      theCriterion.Type    == SMESH::FT_LyingOnGeom ||
      theCriterion.Type    == SMESH::FT_CoplanarFaces)
  {
    QTableWidgetItem* anItem = aTable->item(theRow, 0);
    if (!myAddWidgets.contains(anItem))
    {
      myAddWidgets[ anItem ] = new AdditionalWidget(myWgStack);
      myAddWidgets[ anItem ]->SetPrecision( AdditionalWidget::Tolerance, getPrecision( theCriterion.Type ) );
      myWgStack->addWidget(myAddWidgets[ anItem ]);
    }
    myAddWidgets[ anItem ]->SetDouble(AdditionalWidget::Tolerance, theCriterion.Tolerance);
  }

  emit CriterionChanged(theRow, aType);
}
void SMESHGUI_FilterTable::SetEditable ( const bool  isEditable)

Definition at line 2171 of file SMESHGUI_FilterDlg.cxx.

References ex30_tepal.m, myAddBtn, myAddWidgets, myClearBtn, myInsertBtn, myRemoveBtn, and myTables.

Referenced by SMESHGUI_FilterLibraryDlg.createMainFrame(), SMESHGUI_FilterTable.AdditionalWidget.SetEditable(), and SMESHGUI_FilterLibraryDlg.updateControlsVisibility().

{
  TableMap::iterator anIter;
  for (anIter = myTables.begin(); anIter != myTables.end(); ++anIter)
  {
    anIter.value()->setReadOnly(!isEditable);

    // Set Flags for CheckItems directly IPAL 19974
    Table* aTable = anIter.value();
    for (int i = 0, n = aTable->rowCount(); i < n; i++)
      for (int j = 0, m = aTable->columnCount(); j < m; j++)
        {
          QTableWidgetItem* anItem = aTable->item(i, j);
          if ( dynamic_cast<SMESHGUI_FilterTable::CheckItem*>( anItem ) ) {
            Qt::ItemFlags f = anItem->flags();
            if (!isEditable) f = f & ~Qt::ItemIsUserCheckable;
            else f = f | Qt::ItemIsUserCheckable;
            anItem->setFlags( f );
          }
        }
    //end of IPAL19974

    if (isEditable)
    {
      myAddBtn->show();
      myInsertBtn->show();
      myRemoveBtn->show();
      myClearBtn->show();
    }
    else
    {
      myAddBtn->hide();
      myInsertBtn->hide();
      myRemoveBtn->hide();
      myClearBtn->hide();
    }
  }

  QMap<QTableWidgetItem*, AdditionalWidget*>::iterator anIter2;
  for (anIter2 = myAddWidgets.begin(); anIter2 != myAddWidgets.end(); ++anIter2)
    anIter2.value()->SetEditable(isEditable);
}
void SMESHGUI_FilterTable::SetEnabled ( const bool  isEnabled)

Definition at line 2218 of file SMESHGUI_FilterDlg.cxx.

References myAddBtn, myAddWidgets, myClearBtn, myInsertBtn, myRemoveBtn, and updateBtnState().

Referenced by SMESHGUI_FilterLibraryDlg.onDeleteBtnPressed(), and SMESHGUI_FilterLibraryDlg.updateList().

{
  myAddBtn->setEnabled(isEnabled);
  myInsertBtn->setEnabled(isEnabled);
  myRemoveBtn->setEnabled(isEnabled);
  myClearBtn->setEnabled(isEnabled);

  if (isEnabled)
    updateBtnState();

  QMap<QTableWidgetItem*, AdditionalWidget*>::iterator anIter2;
  for (anIter2 = myAddWidgets.begin(); anIter2 != myAddWidgets.end(); ++anIter2)
    anIter2.value()->setEnabled(isEnabled);
}
void SMESHGUI_FilterTable::SetID ( const int  theRow,
const QString &  theText,
const int  theEntityType = -1 
)

Definition at line 2362 of file SMESHGUI_FilterDlg.cxx.

References GetType(), and myTables.

Referenced by SMESHGUI_FilterDlg.onSelectionDone().

{
  Table* aTable = myTables[ theEntityType == -1 ? GetType() : theEntityType ];
  aTable->item( theRow, 5 )->setText( theText );
}
void SMESHGUI_FilterTable::SetLibsEnabled ( const bool  isEnabled)

Definition at line 2246 of file SMESHGUI_FilterDlg.cxx.

References myAddToBtn, and myCopyFromBtn.

Referenced by SMESHGUI_FilterLibraryDlg.createMainFrame(), and SMESHGUI_FilterDlg.createMainFrame().

{
  if (isEnabled)
  {
    myCopyFromBtn->show();
    myAddToBtn->show();
  }
  else
  {
    myCopyFromBtn->hide();
    myAddToBtn->hide();
  }
}
void SMESHGUI_FilterTable::SetThreshold ( const int  theRow,
const QString &  theText,
const int  theEntityType = -1 
)

Definition at line 2331 of file SMESHGUI_FilterDlg.cxx.

References GetType(), and myTables.

Referenced by SMESHGUI_FilterDlg.onSelectionDone().

{
  Table* aTable = myTables[ theEntityType == -1 ? GetType() : theEntityType ];
  aTable->item( theRow, 2 )->setText(theText);
}
void SMESHGUI_FilterTable::SetType ( const int  type)

Definition at line 1185 of file SMESHGUI_FilterDlg.cxx.

References myEntityTypeGrp, and onEntityType().

Referenced by RestorePreviousEntityType().

{
  myEntityTypeGrp->button(type)->setChecked(true);
  onEntityType(type);
}
void SMESHGUI_FilterTable::SetValidity ( const bool  isValid)

Definition at line 1167 of file SMESHGUI_FilterDlg.cxx.

References myIsValid.

Referenced by SMESHGUI_FilterLibraryDlg.onNeedValidation().

{
  myIsValid = isValid;
}
void SMESHGUI_FilterTable::Update ( )

Definition at line 1373 of file SMESHGUI_FilterDlg.cxx.

References GetType(), myTables, and updateAdditionalWidget().

Referenced by onAddBtn(), onCopyFromBtn(), SMESHGUI_FilterLibraryDlg.onFilterChanged(), and SMESHGUI_FilterLibraryDlg.SetTable().

{
  Table* aTable = myTables[ GetType() ];
  int aCurrRow = aTable->currentRow();
  int numRows = aTable->rowCount();
  if ((aCurrRow < 0 || aCurrRow >= numRows) && numRows > 0)
    aTable->setCurrentCell(0, 0);
  updateAdditionalWidget();
}
void SMESHGUI_FilterTable::updateAdditionalWidget ( ) [private]

Definition at line 1482 of file SMESHGUI_FilterDlg.cxx.

References SMESH_freebord.aCriterion, SMESH.FT_BadOrientedVolume, SMESH.FT_BareBorderFace, SMESH.FT_BareBorderVolume, SMESH.FT_CoplanarFaces, SMESH.FT_EqualTo, SMESH.FT_FreeEdges, SMESH.FT_FreeFaces, SMESH.FT_OverConstrainedFace, SMESH.FT_OverConstrainedVolume, SMESH.FT_RangeOfIds, GetCriterionType(), getPrecision(), GetType(), myAddWidgets, myTables, myWgStack, and SMESHGUI_FilterTable.AdditionalWidget.Tolerance.

Referenced by onCriterionChanged(), onCurrentChanged(), and Update().

{
  Table* aTable = myTables[ GetType() ];
  int aRow = aTable->currentRow();
  if (aRow < 0 || aRow >= aTable->rowCount())
  {
    myWgStack->setEnabled(false);
    return;
  }

  ComboItem* anItem = ((ComboItem*)aTable->item(aRow, 0));
  int aCriterion = GetCriterionType(aRow);
  bool toEnable = ((((ComboItem*)aTable->item(aRow, 1))->value() == SMESH::FT_EqualTo &&
                   aCriterion != SMESH::FT_RangeOfIds &&
                   aCriterion != SMESH::FT_FreeEdges &&
                   aCriterion != SMESH::FT_FreeFaces &&
                   aCriterion != SMESH::FT_BadOrientedVolume &&
                   aCriterion != SMESH::FT_BareBorderFace &&
                   aCriterion != SMESH::FT_BareBorderVolume &&
                   aCriterion != SMESH::FT_OverConstrainedFace &&
                   aCriterion != SMESH::FT_OverConstrainedVolume)
                   ||
                   aCriterion == SMESH::FT_CoplanarFaces);
  
  if (!myAddWidgets.contains(anItem))
  {
    myAddWidgets[ anItem ] = new AdditionalWidget(myWgStack);
    myWgStack->addWidget(myAddWidgets[ anItem ]);
  }

  myWgStack->setCurrentWidget(myAddWidgets[ anItem ]);
  myAddWidgets[ anItem ]->SetPrecision( AdditionalWidget::Tolerance, getPrecision( aCriterion ) );
  myWgStack->setEnabled(toEnable);
}
void SMESHGUI_FilterTable::updateBtnState ( ) [private]

Definition at line 2161 of file SMESHGUI_FilterDlg.cxx.

References GetType(), myClearBtn, myRemoveBtn, and myTables.

Referenced by addRow(), Clear(), onClearBtn(), onEntityType(), onRemoveBtn(), and SetEnabled().

{
  myRemoveBtn->setEnabled(myTables[ GetType() ]->rowCount() > 0);
  myClearBtn->setEnabled(myTables[ GetType() ]->rowCount() > 0);
}

Field Documentation

QPushButton* SMESHGUI_FilterTable.myAddBtn [private]

Definition at line 184 of file SMESHGUI_FilterDlg.h.

Referenced by Init(), SetEditable(), and SetEnabled().

QPushButton* SMESHGUI_FilterTable.myAddToBtn [private]

Definition at line 189 of file SMESHGUI_FilterDlg.h.

Referenced by Init(), and SetLibsEnabled().

QPushButton* SMESHGUI_FilterTable.myClearBtn [private]

Definition at line 187 of file SMESHGUI_FilterDlg.h.

Referenced by Init(), SetEditable(), SetEnabled(), and updateBtnState().

QPushButton* SMESHGUI_FilterTable.myCopyFromBtn [private]

Definition at line 188 of file SMESHGUI_FilterDlg.h.

Referenced by Init(), and SetLibsEnabled().

Definition at line 191 of file SMESHGUI_FilterDlg.h.

Referenced by Init().

QButtonGroup* SMESHGUI_FilterTable.myEntityTypeGrp [private]

Definition at line 192 of file SMESHGUI_FilterDlg.h.

Referenced by Init(), onEntityType(), and SetType().

QPushButton* SMESHGUI_FilterTable.myInsertBtn [private]

Definition at line 185 of file SMESHGUI_FilterDlg.h.

Referenced by Init(), SetEditable(), and SetEnabled().

Definition at line 195 of file SMESHGUI_FilterDlg.h.

Referenced by addRow(), and onCurrentChanged().

Definition at line 194 of file SMESHGUI_FilterDlg.h.

Referenced by onEntityType(), and SetValidity().

Definition at line 197 of file SMESHGUI_FilterDlg.h.

Referenced by Init(), onAddToBtn(), and onCopyFromBtn().

QPushButton* SMESHGUI_FilterTable.myRemoveBtn [private]

Definition at line 186 of file SMESHGUI_FilterDlg.h.

Referenced by Init(), SetEditable(), SetEnabled(), and updateBtnState().

Definition at line 178 of file SMESHGUI_FilterDlg.h.

Referenced by onAddToBtn(), onCopyFromBtn(), and onCriterionChanged().

Definition at line 181 of file SMESHGUI_FilterDlg.h.

Referenced by Init(), and onEntityType().

Definition at line 180 of file SMESHGUI_FilterDlg.h.

Referenced by GetTableGrp(), and Init().

QStackedWidget* SMESHGUI_FilterTable.myWgStack [private]
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