Version: 9.16.0
SMESHGUI_FilterTable Class Reference

Class : SMESHGUI_FilterTable Description : Frame containing. 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 containing.

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

Member Typedef Documentation

◆ TableMap

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

Constructor & Destructor Documentation

◆ SMESHGUI_FilterTable() [1/2]

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

References Init(), and myEntityType.

◆ SMESHGUI_FilterTable() [2/2]

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

References Init(), and myEntityType.

◆ ~SMESHGUI_FilterTable()

SMESHGUI_FilterTable::~SMESHGUI_FilterTable ( )
virtual

Member Function Documentation

◆ AddCriterion()

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

◆ addRow()

◆ AddToClicked

void SMESHGUI_FilterTable::AddToClicked ( )
signal

◆ Clear()

◆ Copy()

◆ CopyFromClicked

void SMESHGUI_FilterTable::CopyFromClicked ( )
signal

◆ createAdditionalFrame()

QWidget * SMESHGUI_FilterTable::createAdditionalFrame ( QWidget theParent)
private

References myWgStack, and SPACING.

Referenced by Init().

◆ createTable()

SMESHGUI_FilterTable::Table * SMESHGUI_FilterTable::createTable ( QWidget theParent,
const int   
)
private

◆ CriterionChanged

void SMESHGUI_FilterTable::CriterionChanged ( const int  ,
const int   
)
signal

Referenced by onCriterionChanged(), and SetCriterion().

◆ CurrentCell()

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

◆ CurrentChanged

void SMESHGUI_FilterTable::CurrentChanged ( int  ,
int   
)
signal

Referenced by onCurrentChanged().

◆ EntityTypeChanged

void SMESHGUI_FilterTable::EntityTypeChanged ( const int  )
signal

Referenced by onEntityType().

◆ getBinaryItem()

QTableWidgetItem * SMESHGUI_FilterTable::getBinaryItem ( ) const
private

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

Referenced by addRow(), and SetCriterion().

◆ getCompare()

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

◆ getCompareItem()

QTableWidgetItem * SMESHGUI_FilterTable::getCompareItem ( ) const
private

References getCompare().

Referenced by addRow().

◆ getCriteria()

◆ GetCriterion()

◆ getCriterionItem()

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

References getCriteria().

Referenced by addRow().

◆ GetCriterionType()

◆ getFirstSelectedRow()

int SMESHGUI_FilterTable::getFirstSelectedRow ( ) const
private

◆ GetID()

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

References GetType(), and myTables.

◆ getPrecision()

◆ getSupportedTypes()

const QMap< int, QString > & SMESHGUI_FilterTable::getSupportedTypes ( ) const
private

◆ GetTableGrp()

QGroupBox * SMESHGUI_FilterTable::GetTableGrp ( )

◆ GetThreshold()

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

References GetType(), and myTables.

Referenced by SMESHGUI_FilterDlg::isValid().

◆ GetType()

◆ getUnaryItem()

QTableWidgetItem * SMESHGUI_FilterTable::getUnaryItem ( ) const
private

Referenced by addRow().

◆ Init()

◆ IsEditable()

bool SMESHGUI_FilterTable::IsEditable ( ) const

◆ IsValid()

◆ NeedValidation

void SMESHGUI_FilterTable::NeedValidation ( )
signal

Referenced by onEntityType().

◆ NumRows()

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

◆ onAddBtn

void SMESHGUI_FilterTable::onAddBtn ( )
privateslot

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

Referenced by Init().

◆ onAddToBtn

void SMESHGUI_FilterTable::onAddToBtn ( )
privateslot

◆ onClearBtn

void SMESHGUI_FilterTable::onClearBtn ( )
privateslot

◆ onCopyFromBtn

void SMESHGUI_FilterTable::onCopyFromBtn ( )
privateslot

◆ onCriterionChanged() [1/2]

void SMESHGUI_FilterTable::onCriterionChanged ( const int  row,
const int  ,
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_Deflection2D, 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_Length3D, 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_ScaledJacobian, SMESH::FT_Skew, SMESH::FT_Taper, SMESH::FT_Undefined, SMESH::FT_Volume3D, SMESH::FT_Warping, SMESH::FT_Warping3D, 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().

◆ onCriterionChanged [2/2]

void SMESHGUI_FilterTable::onCriterionChanged ( int  row,
int  col 
)
privateslot

◆ onCurrentChanged

void SMESHGUI_FilterTable::onCurrentChanged ( int  theRow,
int  theCol 
)
privateslot

◆ onEntityType

void SMESHGUI_FilterTable::onEntityType ( int  theType)
privateslot

◆ onInsertBtn

void SMESHGUI_FilterTable::onInsertBtn ( )
privateslot

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

Referenced by Init().

◆ onRemoveBtn

void SMESHGUI_FilterTable::onRemoveBtn ( )
privateslot

◆ removeAdditionalWidget()

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

References myAddWidgets, and myWgStack.

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

◆ RestorePreviousEntityType()

void SMESHGUI_FilterTable::RestorePreviousEntityType ( )

References myEntityType, and SetType().

◆ SetCriterion()

◆ SetEditable()

◆ SetEnabled()

void SMESHGUI_FilterTable::SetEnabled ( const bool  isEnabled)

◆ SetID()

void SMESHGUI_FilterTable::SetID ( const int  theRow,
const QString &  theText,
const int  theEntityType = -1 
)

◆ SetLibsEnabled()

void SMESHGUI_FilterTable::SetLibsEnabled ( const bool  isEnabled)

◆ SetThreshold()

void SMESHGUI_FilterTable::SetThreshold ( const int  theRow,
const QString &  theText,
const int  theEntityType = -1 
)

◆ SetType()

void SMESHGUI_FilterTable::SetType ( const int  type)

◆ SetValidity()

void SMESHGUI_FilterTable::SetValidity ( const bool  isValid)

◆ ThresholdChanged

void SMESHGUI_FilterTable::ThresholdChanged ( const int  ,
const int   
)
signal

Referenced by onCriterionChanged().

◆ Update()

◆ updateAdditionalWidget()

◆ updateBtnState()

void SMESHGUI_FilterTable::updateBtnState ( )
private

Field Documentation

◆ myAddBtn

QPushButton* SMESHGUI_FilterTable::myAddBtn
private

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

◆ myAddToBtn

QPushButton* SMESHGUI_FilterTable::myAddToBtn
private

Referenced by Init(), and SetLibsEnabled().

◆ myAddWidgets

◆ myClearBtn

QPushButton* SMESHGUI_FilterTable::myClearBtn
private

◆ myCopyFromBtn

QPushButton* SMESHGUI_FilterTable::myCopyFromBtn
private

Referenced by Init(), and SetLibsEnabled().

◆ myEntityType

int SMESHGUI_FilterTable::myEntityType
private

◆ myEntityTypeBox

QGroupBox* SMESHGUI_FilterTable::myEntityTypeBox
private

Referenced by Init().

◆ myEntityTypeGrp

QButtonGroup* SMESHGUI_FilterTable::myEntityTypeGrp
private

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

◆ myInsertBtn

QPushButton* SMESHGUI_FilterTable::myInsertBtn
private

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

◆ myIsLocked

bool SMESHGUI_FilterTable::myIsLocked
private

Referenced by addRow(), and onCurrentChanged().

◆ myIsValid

int SMESHGUI_FilterTable::myIsValid
private

Referenced by onEntityType(), and SetValidity().

◆ myLibDlg

SMESHGUI_FilterLibraryDlg* SMESHGUI_FilterTable::myLibDlg
private

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

◆ myRemoveBtn

QPushButton* SMESHGUI_FilterTable::myRemoveBtn
private

◆ mySMESHGUI

SMESHGUI* SMESHGUI_FilterTable::mySMESHGUI
private

◆ mySwitchTableGrp

QWidget* SMESHGUI_FilterTable::mySwitchTableGrp
private

Referenced by Init(), and onEntityType().

◆ myTableGrp

QGroupBox* SMESHGUI_FilterTable::myTableGrp
private

Referenced by GetTableGrp(), and Init().

◆ myTables

◆ myWgStack

QStackedWidget* SMESHGUI_FilterTable::myWgStack
private