0021014: EDF 1583 SMESH: Improvement of the Python Dump for the creation of groups

1) make 'Mesh' be a default 'Source'
2)
+  SMESH::Filter_var         GetFilter() const;
+  void                      SetFilter(SMESH::Filter_var filter, int type);
This commit is contained in:
eap 2011-06-23 12:36:03 +00:00
parent 03ccec76c7
commit 74a4f1012d

View File

@ -2525,7 +2525,7 @@ QWidget* SMESHGUI_FilterDlg::createSourceGroup (QWidget* theParent)
mySourceGrp->addButton(aSelBtn, Selection); mySourceGrp->addButton(aSelBtn, Selection);
mySourceGrp->addButton(aDlgBtn, Dialog); mySourceGrp->addButton(aDlgBtn, Dialog);
aSelBtn->setChecked(true); aMeshBtn->setChecked(true);
return aBox; return aBox;
} }
@ -2664,7 +2664,7 @@ void SMESHGUI_FilterDlg::Init (const QList<int>& theTypes)
mySourceGrp->button(myApplyToState.contains(theTypes.first()) ? mySourceGrp->button(myApplyToState.contains(theTypes.first()) ?
myApplyToState[ theTypes.first() ] : myApplyToState[ theTypes.first() ] :
Selection)->setChecked(true); Mesh)->setChecked(true);
} }
//======================================================================= //=======================================================================
@ -3084,6 +3084,36 @@ bool SMESHGUI_FilterDlg::createFilter (const int theType)
return true; return true;
} }
//================================================================================
/*!
* \brief Return the current filter
*/
//================================================================================
SMESH::Filter_var SMESHGUI_FilterDlg::GetFilter() const
{
SMESH::Filter_var filter;
try {
int aCurrType = myTable->GetType();
filter = myFilter[ aCurrType ];
}
catch(...)
{
}
return filter._retn();
}
//================================================================================
/*!
* \brief Sets a filter to the table
*/
//================================================================================
void SMESHGUI_FilterDlg::SetFilter(SMESH::Filter_var filter, int type)
{
myFilter[ type ] = filter;
}
//======================================================================= //=======================================================================
// name : SMESHGUI_FilterDlg::insertFilterInViewer // name : SMESHGUI_FilterDlg::insertFilterInViewer
// Purpose : Insert filter in viewer // Purpose : Insert filter in viewer