Version: 8.3.0
SMESHGUI_FilterTable Class Reference

Class : SMESHGUI_FilterTable Description : Frame containig. More...

#include <SMESHGUI_FilterDlg.h>

Inheritance diagram for SMESHGUI_FilterTable:

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

  • Button group for switching entity type
  • Table for displaying filter criterions
  • Buttons for editing table

Member Typedef Documentation

typedef QMap<int, Table*> SMESHGUI_FilterTable::TableMap
private

Constructor & Destructor Documentation

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

References Init(), and myEntityType.

SMESHGUI_FilterTable::SMESHGUI_FilterTable ( SMESHGUI theModule,
QWidget parent,
const QList< int > &  types 
)

References Init(), and myEntityType.

SMESHGUI_FilterTable::~SMESHGUI_FilterTable ( )
virtual

Member Function Documentation

void SMESHGUI_FilterTable::AddCriterion ( const SMESH::Filter::Criterion theCriterion,
const int  theEntityType = -1 
)
void SMESHGUI_FilterTable::AddToClicked ( )
signal
void SMESHGUI_FilterTable::CopyFromClicked ( )
signal
QWidget * SMESHGUI_FilterTable::createAdditionalFrame ( QWidget theParent)
private

References myWgStack, and SPACING.

Referenced by Init().

SMESHGUI_FilterTable::Table * SMESHGUI_FilterTable::createTable ( QWidget theParent,
const int  theType 
)
private
void SMESHGUI_FilterTable::CriterionChanged ( const int  ,
const int   
)
signal

Referenced by onCriterionChanged(), and SetCriterion().

bool SMESHGUI_FilterTable::CurrentCell ( int theRow,
int theCol 
) const
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

References SMESH::FT_LogicalAND, and SMESH::FT_LogicalOR.

Referenced by addRow(), and SetCriterion().

const QMap< int, QString > & SMESHGUI_FilterTable::getCompare ( ) const
private
QTableWidgetItem * SMESHGUI_FilterTable::getCompareItem ( ) const
private

References getCompare().

Referenced by addRow().

QTableWidgetItem * SMESHGUI_FilterTable::getCriterionItem ( const int  theType) const
private

References getCriteria().

Referenced by addRow().

int SMESHGUI_FilterTable::getFirstSelectedRow ( ) const
private
bool SMESHGUI_FilterTable::GetID ( const int  theRow,
QString &  theText,
const int  theEntityType = -1 
)

References GetType(), and myTables.

const QMap< int, QString > & SMESHGUI_FilterTable::getSupportedTypes ( ) const
private
QGroupBox * SMESHGUI_FilterTable::GetTableGrp ( )
bool SMESHGUI_FilterTable::GetThreshold ( const int  theRow,
QString &  theText,
const int  theEntityType = -1 
)

References GetType(), and myTables.

Referenced by SMESHGUI_FilterDlg::isValid().

QTableWidgetItem * SMESHGUI_FilterTable::getUnaryItem ( ) const
private

Referenced by addRow().

bool SMESHGUI_FilterTable::IsEditable ( ) const
void SMESHGUI_FilterTable::NeedValidation ( )
signal

Referenced by onEntityType().

int SMESHGUI_FilterTable::NumRows ( const int  theEntityType = -1) const
void SMESHGUI_FilterTable::onAddBtn ( )
privateslot

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

Referenced by Init().

void SMESHGUI_FilterTable::onAddToBtn ( )
privateslot
void SMESHGUI_FilterTable::onClearBtn ( )
privateslot
void SMESHGUI_FilterTable::onCopyFromBtn ( )
privateslot
void SMESHGUI_FilterTable::onCriterionChanged ( int  row,
int  col 
)
privateslot

References GetType(), and ThresholdChanged().

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

void SMESHGUI_FilterTable::onCriterionChanged ( const int  row,
const int  col,
const int  entityType 
)
private

References SMESHGUI_FilterTable::ComboItem::clear(), SMESHGUI_FilterTable::ComboItem::count(), CriterionChanged(), entityTypes(), SMESH::FT_Area, SMESH::FT_AspectRatio, SMESH::FT_AspectRatio3D, SMESH::FT_BadOrientedVolume, SMESH::FT_BallDiameter, SMESH::FT_BareBorderFace, SMESH::FT_BareBorderVolume, SMESH::FT_BelongToCylinder, SMESH::FT_BelongToGenSurface, SMESH::FT_BelongToGeom, SMESH::FT_BelongToMeshGroup, SMESH::FT_BelongToPlane, SMESH::FT_ConnectedElements, SMESH::FT_CoplanarFaces, SMESH::FT_ElemGeomType, SMESH::FT_EntityType, SMESH::FT_EqualEdges, SMESH::FT_EqualFaces, SMESH::FT_EqualNodes, SMESH::FT_EqualTo, SMESH::FT_EqualVolumes, SMESH::FT_FreeBorders, SMESH::FT_FreeEdges, SMESH::FT_FreeFaces, SMESH::FT_FreeNodes, SMESH::FT_GroupColor, SMESH::FT_Length, SMESH::FT_Length2D, SMESH::FT_LessThan, SMESH::FT_LinearOrQuadratic, SMESH::FT_LogicalAND, SMESH::FT_LogicalNOT, SMESH::FT_LogicalOR, SMESH::FT_LyingOnGeom, SMESH::FT_MaxElementLength2D, SMESH::FT_MaxElementLength3D, SMESH::FT_MinimumAngle, SMESH::FT_MoreThan, SMESH::FT_MultiConnection, SMESH::FT_MultiConnection2D, SMESH::FT_NodeConnectivityNumber, SMESH::FT_OverConstrainedFace, SMESH::FT_OverConstrainedVolume, SMESH::FT_RangeOfIds, SMESH::FT_Skew, SMESH::FT_Taper, SMESH::FT_Undefined, SMESH::FT_Volume3D, SMESH::FT_Warping, geomTypes(), getCompare(), GetCriterionType(), getPrecision(), SMESH::GetResourceMgr(), GetType(), mySMESHGUI, myTables, SMESHGUI_FilterTable::Table::setEditable(), SMESHGUI_FilterTable::ComboItem::setItems(), SMESHGUI_FilterTable::DoubleSpinItem::setPrecision(), SMESHGUI_FilterTable::ComboItem::setValue(), SMESHGUI_FilterTable::ComboItem::Type(), SMESHGUI_FilterTable::IntSpinItem::Type(), SMESHGUI_FilterTable::DoubleSpinItem::Type(), updateAdditionalWidget(), and SMESHGUI_FilterTable::ComboItem::value().

void SMESHGUI_FilterTable::onCurrentChanged ( int  theRow,
int  theCol 
)
privateslot
void SMESHGUI_FilterTable::onEntityType ( int  theType)
privateslot
void SMESHGUI_FilterTable::onInsertBtn ( )
privateslot

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

Referenced by Init().

void SMESHGUI_FilterTable::onRemoveBtn ( )
privateslot
void SMESHGUI_FilterTable::removeAdditionalWidget ( QTableWidget theTable,
const int  theRow 
)
private

References myAddWidgets, and myWgStack.

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

void SMESHGUI_FilterTable::RestorePreviousEntityType ( )

References myEntityType, and SetType().

void SMESHGUI_FilterTable::SetEnabled ( const bool  isEnabled)
void SMESHGUI_FilterTable::SetID ( const int  theRow,
const QString &  theText,
const int  theEntityType = -1 
)
void SMESHGUI_FilterTable::SetLibsEnabled ( const bool  isEnabled)
void SMESHGUI_FilterTable::SetThreshold ( const int  theRow,
const QString &  theText,
const int  theEntityType = -1 
)
void SMESHGUI_FilterTable::SetType ( const int  type)
void SMESHGUI_FilterTable::SetValidity ( const bool  isValid)
void SMESHGUI_FilterTable::ThresholdChanged ( const int  ,
const int   
)
signal

Referenced by onCriterionChanged().

void SMESHGUI_FilterTable::updateBtnState ( )
private

Field Documentation

QPushButton* SMESHGUI_FilterTable::myAddBtn
private

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

QPushButton* SMESHGUI_FilterTable::myAddToBtn
private

Referenced by Init(), and SetLibsEnabled().

QPushButton* SMESHGUI_FilterTable::myClearBtn
private
QPushButton* SMESHGUI_FilterTable::myCopyFromBtn
private

Referenced by Init(), and SetLibsEnabled().

int SMESHGUI_FilterTable::myEntityType
private
QGroupBox* SMESHGUI_FilterTable::myEntityTypeBox
private

Referenced by Init().

QButtonGroup* SMESHGUI_FilterTable::myEntityTypeGrp
private

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

QPushButton* SMESHGUI_FilterTable::myInsertBtn
private

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

bool SMESHGUI_FilterTable::myIsLocked
private

Referenced by addRow(), and onCurrentChanged().

int SMESHGUI_FilterTable::myIsValid
private

Referenced by onEntityType(), and SetValidity().

SMESHGUI_FilterLibraryDlg* SMESHGUI_FilterTable::myLibDlg
private

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

QPushButton* SMESHGUI_FilterTable::myRemoveBtn
private
SMESHGUI* SMESHGUI_FilterTable::mySMESHGUI
private
QWidget* SMESHGUI_FilterTable::mySwitchTableGrp
private

Referenced by Init(), and onEntityType().

QGroupBox* SMESHGUI_FilterTable::myTableGrp
private

Referenced by GetTableGrp(), and Init().

QStackedWidget* SMESHGUI_FilterTable::myWgStack
private