Salome HOME
Method setShown( bool ) was added. This method allow to show or hide all views.
[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 #include <qobject.h>
8
9 class SUIT_SelectionMgr;
10 class SUIT_DataOwnerPtrList;
11
12 class SUIT_EXPORT SUIT_Selector : public QObject
13 {
14   Q_OBJECT
15 public:
16   SUIT_Selector( SUIT_SelectionMgr*, QObject* = 0 );
17   virtual ~SUIT_Selector();
18
19   virtual QString    type() const = 0;
20
21   SUIT_SelectionMgr* selectionMgr() const;
22
23   bool               isEnabled() const;
24   virtual void       setEnabled( const bool );
25
26   bool               autoBlock() const;
27   virtual void       setAutoBlock( const bool );
28
29   void               selected( SUIT_DataOwnerPtrList& ) const;
30   void               setSelected( const SUIT_DataOwnerPtrList& );
31
32   bool               hasSelectionMode( const int ) const;
33   void               selectionModes( QValueList<int>& ) const;
34
35 protected:
36   void               selectionChanged();
37   virtual void       getSelection( SUIT_DataOwnerPtrList& ) const = 0;
38   virtual void       setSelection( const SUIT_DataOwnerPtrList& ) = 0;
39
40 private:
41   bool               myBlock;
42   SUIT_SelectionMgr* mySelMgr;
43   bool               myEnabled;
44   bool               myAutoBlock;
45 };
46
47 #endif