]> SALOME platform Git repositories - modules/shaper.git/blob - src/XGUI/XGUI_ModuleConnector.cpp
Salome HOME
Make property panel as a GUI of an operation
[modules/shaper.git] / src / XGUI / XGUI_ModuleConnector.cpp
1 // File:        XGUI_ModuleConnector.cpp
2 // Created:     3 June 2014
3 // Author:      Vitaly Smetannikov
4
5 #include "XGUI_ModuleConnector.h"
6 #include "XGUI_Workshop.h"
7 #include "XGUI_ViewerProxy.h"
8 #include "XGUI_SelectionMgr.h"
9 #include "XGUI_Selection.h"
10
11 XGUI_ModuleConnector::XGUI_ModuleConnector(XGUI_Workshop* theWorkshop)
12     : ModuleBase_IWorkshop(theWorkshop),
13       myWorkshop(theWorkshop)
14 {
15   XGUI_SelectionMgr* aSelector = myWorkshop->selector();
16   connect(aSelector, SIGNAL(selectionChanged()), this, SIGNAL(selectionChanged()));
17 }
18
19 XGUI_ModuleConnector::~XGUI_ModuleConnector()
20 {
21 }
22
23 Handle(AIS_InteractiveContext) XGUI_ModuleConnector::AISContext() const
24 {
25   return myWorkshop->viewer()->AISContext();
26 }
27
28 QList<ObjectPtr> XGUI_ModuleConnector::selectedObjects() const
29 {
30   return myWorkshop->selector()->selection()->selectedObjects();
31 }
32
33 ModuleBase_IModule* XGUI_ModuleConnector::module() const
34 {
35   return myWorkshop->module();
36 }