From: eap Date: Thu, 2 Jun 2005 09:45:18 +0000 (+0000) Subject: add an argument to selected() specifying a selector X-Git-Tag: T3_0_0_a1~31 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=375d139854050ac38f30a8055daa9b0e1f8dfcef;p=modules%2Fgui.git add an argument to selected() specifying a selector --- diff --git a/src/SUIT/SUIT_SelectionMgr.cxx b/src/SUIT/SUIT_SelectionMgr.cxx index 1089fb81a..b19694e89 100755 --- a/src/SUIT/SUIT_SelectionMgr.cxx +++ b/src/SUIT/SUIT_SelectionMgr.cxx @@ -47,13 +47,15 @@ void SUIT_SelectionMgr::setEnabled( const bool on, const QString& typ ) } } -void SUIT_SelectionMgr::selected( SUIT_DataOwnerPtrList& lst ) const +void SUIT_SelectionMgr::selected( SUIT_DataOwnerPtrList& lst, const QString& type ) const { lst.clear(); QMap map; for ( SelectorListIterator it( mySelectors ); it.current(); ++it ) { + if ( !type.isEmpty() && it.current()->type() != type ) + continue; SUIT_DataOwnerPtrList curList; it.current()->selected( curList ); for ( SUIT_DataOwnerPtrList::const_iterator itr = curList.begin(); itr != curList.end(); ++itr ) diff --git a/src/SUIT/SUIT_SelectionMgr.h b/src/SUIT/SUIT_SelectionMgr.h index 5f172c52e..bc1b66faa 100755 --- a/src/SUIT/SUIT_SelectionMgr.h +++ b/src/SUIT/SUIT_SelectionMgr.h @@ -18,7 +18,7 @@ public: virtual ~SUIT_SelectionMgr(); void clearSelected(); - virtual void selected( SUIT_DataOwnerPtrList& ) const; + virtual void selected( SUIT_DataOwnerPtrList&, const QString& = QString::null ) const; virtual void setSelected( const SUIT_DataOwnerPtrList&, const bool = false ); virtual void installSelector( SUIT_Selector* );