1 #include "SUIT_Selector.h"
3 #include "SUIT_SelectionMgr.h"
5 /*!\class SUIT_Selector
6 * Class provide selector for data owners.
12 SUIT_Selector::SUIT_Selector( SUIT_SelectionMgr* selMgr, QObject* parent ) :
20 selMgr->installSelector( this );
26 SUIT_Selector::~SUIT_Selector()
29 selectionMgr()->removeSelector( this );
33 Gets selection manager.
35 SUIT_SelectionMgr* SUIT_Selector::selectionMgr() const
41 Checks: Is selctor enabled?
43 bool SUIT_Selector::isEnabled() const
49 Sets selctor anbled to \a on.
51 void SUIT_Selector::setEnabled( const bool on )
57 Checks: Is selector auto block?
59 bool SUIT_Selector::autoBlock() const
65 Sets selctor autoblock to \a on.
67 void SUIT_Selector::setAutoBlock( const bool on )
73 Puts to \a lst selection list of data owners.
75 void SUIT_Selector::selected( SUIT_DataOwnerPtrList& lst ) const
82 Puts to selection list of data owners \a lst..
84 void SUIT_Selector::setSelected( const SUIT_DataOwnerPtrList& lst )
100 void SUIT_Selector::selectionChanged()
102 if ( selectionMgr() && isEnabled() && ( !autoBlock() || !myBlock ) )
103 selectionMgr()->selectionChanged( this );
107 Checks: Is selection manager has selection mode \a mode?
109 bool SUIT_Selector::hasSelectionMode( const int mode ) const
111 if ( !selectionMgr() )
114 return selectionMgr()->hasSelectionMode( mode );
118 Puts to list \a lst selection modes from selection manager.
120 void SUIT_Selector::selectionModes( QValueList<int>& lst ) const
122 if ( selectionMgr() )
123 selectionMgr()->selectionModes( lst );