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