Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / XGUI / XGUI_SelectionMgr.h
1 #ifndef XGUI_SelectionMgr_H
2 #define XGUI_SelectionMgr_H
3
4 #include "XGUI_Constants.h"
5 #include <QObject>
6
7 class XGUI_Workshop;
8 class XGUI_ObjectsBrowser;
9
10 /**\class XGUI_SelectionMgr
11  * \ingroup GUI
12  * \brief Selection manager. Provides selection event on selection in 
13  * Object Browser and Viewer
14  */
15 class XGUI_SelectionMgr : public QObject
16 {
17   Q_OBJECT
18 public:
19   XGUI_SelectionMgr(XGUI_Workshop* theParent);
20   virtual ~XGUI_SelectionMgr();
21
22   //! Returns list of currently selected objects
23   QFeatureList selectedData() const { return mySelectedData; }
24
25   void connectObjectBrowser(XGUI_ObjectsBrowser* theOB);
26
27 signals:
28   //! Emited when selection in a one of viewers was changed
29   void selectionChanged();
30
31 public slots:
32   void onSelectionChanged();
33
34 private:
35   XGUI_Workshop* myWorkshop;
36   XGUI_ObjectsBrowser* myObjectBrowser;
37
38   //! List of selected features
39   QFeatureList mySelectedData;
40 };
41
42 #endif