Salome HOME
Initial version
[modules/gui.git] / src / SUIT / SUIT_Selector.h
1 #ifndef SUIT_SELECTOR_H
2 #define SUIT_SELECTOR_H
3
4 #include "SUIT.h"
5
6 #include <qvaluelist.h>
7
8 class SUIT_SelectionMgr;
9 class SUIT_DataOwnerPtrList;
10
11 class SUIT_EXPORT SUIT_Selector
12 {
13 public:
14   SUIT_Selector( SUIT_SelectionMgr* );
15   virtual ~SUIT_Selector();
16
17   virtual QString    type() const = 0;
18
19   SUIT_SelectionMgr* selectionMgr() const;
20
21   bool               isEnabled() const;
22   virtual void       setEnabled( const bool );
23
24   bool               autoBlock() const;
25   virtual void       setAutoBlock( const bool );
26
27   void               selected( SUIT_DataOwnerPtrList& ) const;
28   void               setSelected( const SUIT_DataOwnerPtrList& );
29
30   bool               hasSelectionMode( const int ) const;
31   void               selectionModes( QValueList<int>& ) const;
32
33 protected:
34   void               selectionChanged();
35   virtual void       getSelection( SUIT_DataOwnerPtrList& ) const = 0;
36   virtual void       setSelection( const SUIT_DataOwnerPtrList& ) = 0;
37
38 private:
39   bool               myBlock;
40   SUIT_SelectionMgr* mySelMgr;
41   bool               myEnabled;
42   bool               myAutoBlock;
43 };
44
45 #endif