Version: 8.3.0
SMESHGUI_FilterDlg Class Reference

Class : SMESHGUI_FilterDlg Description : Dialog to specify filters for VTK viewer. More...

#include <SMESHGUI_FilterDlg.h>

Inheritance diagram for SMESHGUI_FilterDlg:

Signals

void Accepted ()
 

Public Member Functions

 SMESHGUI_FilterDlg (SMESHGUI *, const QList< int > &)
 
 SMESHGUI_FilterDlg (SMESHGUI *, const int)
 
virtual ~SMESHGUI_FilterDlg ()
 
void Init (const QList< int > &, const bool setInViewer=true)
 
void Init (const int, const bool setInViewer=true)
 
void SetSelection ()
 
void SetMesh (SMESH::SMESH_Mesh_var)
 
void SetGroup (SMESH::SMESH_GroupOnFilter_var)
 
void SetSourceWg (QWidget *, const bool initOnApply=true)
 
void SetEnabled (bool setInViewer, bool diffSources)
 
SMESH::Filter_var GetFilter () const
 Return the current filter. More...
 
void SetFilter (SMESH::Filter_var filter, int type)
 Sets a filter to the table. More...
 
void UnRegisterFilters ()
 call UnRegister() for myFilter's More...
 

Static Public Member Functions

static SMESH::Filter::Criterion createCriterion ()
 

Protected Slots

virtual void reject ()
 

Private Types

enum  { Mesh, Selection, Dialog, None }
 
enum  { BTN_OK, BTN_Apply, BTN_Close, BTN_Help }
 

Private Slots

void onOk ()
 
bool onApply ()
 
void onHelp ()
 
void onDeactivate ()
 
void onSelectionDone ()
 
void onCriterionChanged (const int, const int)
 
void onThresholdChanged (const int, const int)
 
void onCurrentChanged (int, int)
 
void onOpenView ()
 
void onCloseView ()
 

Private Member Functions

void construct (const QList< int > &)
 
void enterEvent (QEvent *)
 
void keyPressEvent (QKeyEvent *)
 
QWidgetcreateButtonFrame (QWidget *)
 
QWidgetcreateMainFrame (QWidget *)
 
QWidgetcreateSourceGroup (QWidget *)
 
void updateMainButtons ()
 
bool isValid () const
 
bool createFilter (const int)
 
void insertFilterInViewer ()
 
void selectInViewer (const int, const QList< int > &)
 
void filterSource (const int, QList< int > &)
 
void filterSelectionSource (const int, QList< int > &)
 
void getIdsFromWg (const QWidget *, QList< int > &) const
 
void setIdsToWg (QWidget *, const QList< int > &)
 
Selection_Mode getSelMode (const int) const
 
void updateSelection ()
 
SMESH_ActorgetActor ()
 
void restoreSelMode ()
 Restores a selection mode if it was changed to set up some criterion. More...
 

Private Attributes

QWidgetmyMainFrame
 
QButtonGroup * mySourceGrp
 
QCheckBox * mySetInViewer
 
QMap< int, QPushButton * > myButtons
 
SMESHGUI_FilterTablemyTable
 
QList< intmyTypes
 
SMESHGUImySMESHGUI
 
LightApp_SelectionMgr * mySelectionMgr
 
SVTK_Selector * mySelector
 
SMESH::SMESH_Mesh_var myMesh
 
SMESH::SMESH_GroupOnFilter_var myGroup
 
bool myInitSourceWgOnApply
 
bool myInsertEnabled
 
bool myDiffSourcesEnabled
 
QWidgetmySourceWg
 
SALOME_DataMapOfIOMapOfInteger myIObjects
 
bool myIsSelectionChanged
 
QMap< int, SMESH::Filter_var > myFilter
 
QMap< int, boolmyInsertState
 
QMap< int, intmyApplyToState
 
QString myHelpFileName
 
bool myToRestoreSelMode
 
int mySelModeToRestore
 

Detailed Description

Class : SMESHGUI_FilterDlg Description : Dialog to specify filters for VTK viewer.

Member Enumeration Documentation

anonymous enum
private
Enumerator
Mesh 
Selection 
Dialog 
None 
anonymous enum
private
Enumerator
BTN_OK 
BTN_Apply 
BTN_Close 
BTN_Help 

Constructor & Destructor Documentation

SMESHGUI_FilterDlg::SMESHGUI_FilterDlg ( SMESHGUI theModule,
const QList< int > &  theTypes 
)
SMESHGUI_FilterDlg::SMESHGUI_FilterDlg ( SMESHGUI theModule,
const int  theType 
)
SMESHGUI_FilterDlg::~SMESHGUI_FilterDlg ( )
virtual

Member Function Documentation

void SMESHGUI_FilterDlg::Accepted ( )
signal

Referenced by onOk().

void SMESHGUI_FilterDlg::construct ( const QList< int > &  theTypes)
private
QWidget * SMESHGUI_FilterDlg::createButtonFrame ( QWidget theParent)
private
QWidget * SMESHGUI_FilterDlg::createSourceGroup ( QWidget theParent)
private

References Dialog, MARGIN, Mesh, mySourceGrp, Selection, and SPACING.

Referenced by createMainFrame().

void SMESHGUI_FilterDlg::enterEvent ( QEvent *  )
private
void SMESHGUI_FilterDlg::filterSelectionSource ( const int  theType,
QList< int > &  theResIds 
)
private
void SMESHGUI_FilterDlg::filterSource ( const int  theType,
QList< int > &  theResIds 
)
private
SMESH_Actor * SMESHGUI_FilterDlg::getActor ( )
private
SMESH::Filter_var SMESHGUI_FilterDlg::GetFilter ( ) const

Return the current filter.

References SMESHGUI_FilterTable::GetType(), myFilter, and myTable.

Referenced by SMESHGUI_GroupDlg::onFilterAccepted().

void SMESHGUI_FilterDlg::getIdsFromWg ( const QWidget theWg,
QList< int > &  theRes 
) const
private

Referenced by filterSource().

Selection_Mode SMESHGUI_FilterDlg::getSelMode ( const int  theType) const
private
void SMESHGUI_FilterDlg::Init ( const int  type,
const bool  setInViewer = true 
)

References Init().

void SMESHGUI_FilterDlg::insertFilterInViewer ( )
private
void SMESHGUI_FilterDlg::keyPressEvent ( QKeyEvent *  e)
private

References onHelp().

void SMESHGUI_FilterDlg::onCloseView ( )
privateslot

References mySelector.

Referenced by Init().

void SMESHGUI_FilterDlg::onCriterionChanged ( const int  ,
const int   
)
privateslot

References updateSelection().

Referenced by createMainFrame().

void SMESHGUI_FilterDlg::onCurrentChanged ( int  ,
int   
)
privateslot

References updateSelection().

Referenced by createMainFrame().

void SMESHGUI_FilterDlg::onDeactivate ( )
privateslot

Referenced by Init().

void SMESHGUI_FilterDlg::onHelp ( )
privateslot

References myHelpFileName, and mySMESHGUI.

Referenced by createButtonFrame(), and keyPressEvent().

void SMESHGUI_FilterDlg::onOk ( )
privateslot
void SMESHGUI_FilterDlg::onOpenView ( )
privateslot
void SMESHGUI_FilterDlg::onThresholdChanged ( const int  row,
const int  type 
)
privateslot
void SMESHGUI_FilterDlg::reject ( )
protectedvirtualslot
void SMESHGUI_FilterDlg::restoreSelMode ( )
private

Restores a selection mode if it was changed to set up some criterion.

References SMESH::GetViewWindow(), mySelModeToRestore, mySMESHGUI, myToRestoreSelMode, and SMESH::SetPointRepresentation().

Referenced by onOk(), reject(), and updateSelection().

void SMESHGUI_FilterDlg::SetEnabled ( bool  setInViewer,
bool  diffSources 
)
void SMESHGUI_FilterDlg::SetFilter ( SMESH::Filter_var  filter,
int  type 
)

Sets a filter to the table.

References myFilter.

Referenced by SMESHGUI_GroupDlg::setFilters().

void SMESHGUI_FilterDlg::SetGroup ( SMESH::SMESH_GroupOnFilter_var  group)

References myGroup.

Referenced by SMESHGUI_GroupDlg::setFilters().

void SMESHGUI_FilterDlg::setIdsToWg ( QWidget theWg,
const QList< int > &  theIds 
)
private

Referenced by onApply().

void SMESHGUI_FilterDlg::UnRegisterFilters ( )

call UnRegister() for myFilter's

References myFilter.

Referenced by SMESHGUI_GroupDlg::onOK(), and SMESHGUI_GroupDlg::reject().

void SMESHGUI_FilterDlg::updateMainButtons ( )
private

References BTN_Apply, BTN_Close, myButtons, and myTypes.

Referenced by createButtonFrame(), and Init().

Field Documentation

QMap< int, int > SMESHGUI_FilterDlg::myApplyToState
private

Referenced by Init(), and onApply().

QMap<int, QPushButton*> SMESHGUI_FilterDlg::myButtons
private
bool SMESHGUI_FilterDlg::myDiffSourcesEnabled
private

Referenced by filterSource(), and SetEnabled().

QMap< int, SMESH::Filter_var > SMESHGUI_FilterDlg::myFilter
private
SMESH::SMESH_GroupOnFilter_var SMESHGUI_FilterDlg::myGroup
private

Referenced by Init(), onSelectionDone(), and SetGroup().

QString SMESHGUI_FilterDlg::myHelpFileName
private

Referenced by construct(), and onHelp().

bool SMESHGUI_FilterDlg::myInitSourceWgOnApply
private

Referenced by onApply(), and SetSourceWg().

bool SMESHGUI_FilterDlg::myInsertEnabled
private

Referenced by insertFilterInViewer(), and SetEnabled().

QMap< int, bool > SMESHGUI_FilterDlg::myInsertState
private

Referenced by Init(), and onApply().

SALOME_DataMapOfIOMapOfInteger SMESHGUI_FilterDlg::myIObjects
private
bool SMESHGUI_FilterDlg::myIsSelectionChanged
private

Referenced by Init(), and updateSelection().

QWidget* SMESHGUI_FilterDlg::myMainFrame
private

Referenced by construct().

SMESH::SMESH_Mesh_var SMESHGUI_FilterDlg::myMesh
private
LightApp_SelectionMgr* SMESHGUI_FilterDlg::mySelectionMgr
private
SVTK_Selector* SMESHGUI_FilterDlg::mySelector
private
int SMESHGUI_FilterDlg::mySelModeToRestore
private

Referenced by restoreSelMode(), and updateSelection().

QCheckBox* SMESHGUI_FilterDlg::mySetInViewer
private
QButtonGroup* SMESHGUI_FilterDlg::mySourceGrp
private
QWidget* SMESHGUI_FilterDlg::mySourceWg
private
bool SMESHGUI_FilterDlg::myToRestoreSelMode
private
QList<int> SMESHGUI_FilterDlg::myTypes
private