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 <ModuleBase_Definitions.h>
6 #include <QObject>
7 #include <QModelIndexList>
8
9 #include <AIS_ListOfInteractive.hxx>
10 #include <NCollection_List.hxx>
11 #include <TopoDS_Shape.hxx>
12
13 class XGUI_Workshop;
14 class XGUI_ObjectsBrowser;
15 class XGUI_Selection;
16
17 /**\class XGUI_SelectionMgr
18  * \ingroup GUI
19  * \brief Selection manager. Provides selection event on selection in 
20  * Object Browser and Viewer
21  */
22 class XGUI_EXPORT XGUI_SelectionMgr : public QObject
23 {
24   Q_OBJECT
25 public:
26   XGUI_SelectionMgr(XGUI_Workshop* theParent);
27   virtual ~XGUI_SelectionMgr();
28
29   XGUI_Selection* selection() const { return mySelection; }
30
31   //! Returns list of currently selected data objects
32   //QFeatureList selectedFeatures() const; 
33   
34   //! Returns list of currently selected QModelIndexes
35   //QModelIndexList selectedIndexes() const;
36
37   //! Returns list of currently selected AIS objects
38   //void selectedAISObjects(AIS_ListOfInteractive& theList) const;
39
40   //! Returns list of currently selected shapes
41   //void selectedShapes(NCollection_List<TopoDS_Shape>& theList) const;
42
43   //! Connects the manager to all viewers accessible by Workshop
44   void connectViewers();
45
46 signals:
47   //! Emited when selection in a one of viewers was changed
48   void selectionChanged();
49
50 private slots:
51   void onObjectBrowserSelection();
52   void onViewerSelection();
53
54 private:
55   XGUI_Workshop* myWorkshop;
56   XGUI_Selection* mySelection;
57 };
58
59 #endif