Salome HOME
Merge branch 'Dev_0.6.1' of newgeom:newgeom into Dev_0.6.1
[modules/shaper.git] / src / XGUI / XGUI_SelectionMgr.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 #ifndef XGUI_SelectionMgr_H
4 #define XGUI_SelectionMgr_H
5
6 #include "XGUI.h"
7 #include <ModuleBase_Definitions.h>
8 #include <QObject>
9 #include <QModelIndexList>
10
11 #include <AIS_ListOfInteractive.hxx>
12 #include <NCollection_List.hxx>
13 #include <TopoDS_Shape.hxx>
14
15 class XGUI_Workshop;
16 class XGUI_ObjectsBrowser;
17 class XGUI_Selection;
18
19 /**\class XGUI_SelectionMgr
20  * \ingroup GUI
21  * \brief Selection manager. Provides selection event on selection in 
22  * Object Browser and Viewer
23  */
24 class XGUI_EXPORT XGUI_SelectionMgr : public QObject
25 {
26 Q_OBJECT
27  public:
28   XGUI_SelectionMgr(XGUI_Workshop* theParent);
29   virtual ~XGUI_SelectionMgr();
30
31   XGUI_Selection* selection() const
32   {
33     return mySelection;
34   }
35
36   //! Connects the manager to all viewers accessible by Workshop
37   void connectViewers();
38
39 signals:
40   //! Emited when selection in a one of viewers was changed
41   void selectionChanged();
42
43  private slots:
44   void onObjectBrowserSelection();
45   void onViewerSelection();
46
47  private:
48   XGUI_Workshop* myWorkshop;
49   XGUI_Selection* mySelection;
50 };
51
52 #endif