Salome HOME
PAL10125 - by double click on reference original object becomes selected
[modules/gui.git] / src / SUIT / SUIT_Selector.cxx
index d0b3da04fc9e9b2ece22f866270725ec11c09567..cbef90b02c7a5de6956d5471b6736e0b6fee1df3 100755 (executable)
@@ -2,8 +2,16 @@
 
 #include "SUIT_SelectionMgr.h"
 
-SUIT_Selector::SUIT_Selector( SUIT_SelectionMgr* selMgr )
-: mySelMgr( selMgr ),
+/*!\class SUIT_Selector
+ * Class provide selector for data owners.
+ */
+
+/*!
+  Constructor.
+*/
+SUIT_Selector::SUIT_Selector( SUIT_SelectionMgr* selMgr, QObject* parent ) :
+QObject( parent ), 
+mySelMgr( selMgr ),
 myBlock( false ),
 myEnabled( true ),
 myAutoBlock( true )
@@ -12,43 +20,67 @@ myAutoBlock( true )
     selMgr->installSelector( this );
 }
 
+/*!
+  Destructor.
+*/
 SUIT_Selector::~SUIT_Selector()
 {
   if ( selectionMgr() )
     selectionMgr()->removeSelector( this );
 }
 
+/*!
+  Gets selection manager.
+*/
 SUIT_SelectionMgr* SUIT_Selector::selectionMgr() const
 {
   return mySelMgr;
 }
 
+/*!
+  Checks: Is selctor enabled?
+*/
 bool SUIT_Selector::isEnabled() const
 {
   return myEnabled;
 }
 
+/*!
+  Sets selctor anbled to \a on.
+*/
 void SUIT_Selector::setEnabled( const bool on )
 {
   myEnabled = on;
 }
 
+/*!
+  Checks: Is selector auto block?
+*/
 bool SUIT_Selector::autoBlock() const
 {
   return myAutoBlock;
 }
 
+/*!
+  Sets selctor autoblock to \a on.
+*/
 void SUIT_Selector::setAutoBlock( const bool on )
 {
   myAutoBlock = on;
 }
 
+/*!
+  Puts to \a lst selection list of data owners.
+*/
 void SUIT_Selector::selected( SUIT_DataOwnerPtrList& lst ) const
 {
   lst.clear();
   getSelection( lst );
 }
 
+/*!
+  Puts to selection list of data owners \a lst..
+*/
 void SUIT_Selector::setSelected( const SUIT_DataOwnerPtrList& lst )
 {
   if ( !isEnabled() )
@@ -62,12 +94,18 @@ void SUIT_Selector::setSelected( const SUIT_DataOwnerPtrList& lst )
   myBlock = block;
 }
 
+/*!
+  On selection changed.
+*/
 void SUIT_Selector::selectionChanged()
 {
   if ( selectionMgr() && isEnabled() && ( !autoBlock() || !myBlock ) )
     selectionMgr()->selectionChanged( this );
 }
 
+/*!
+  Checks: Is selection manager has selection mode \a mode?
+*/
 bool SUIT_Selector::hasSelectionMode( const int mode ) const
 {
   if ( !selectionMgr() )
@@ -76,6 +114,9 @@ bool SUIT_Selector::hasSelectionMode( const int mode ) const
   return selectionMgr()->hasSelectionMode( mode );
 }
 
+/*!
+  Puts to list \a lst selection modes from selection manager.
+*/
 void SUIT_Selector::selectionModes( QValueList<int>& lst ) const
 {
   if ( selectionMgr() )