Salome HOME
Issue #3009: Adapt the application to HD screen
[modules/shaper.git] / src / XGUI / XGUI_ModuleConnector.cpp
index 4f2130509984d134c0c2bf2190fe2b48febe0670..61bc814f47c7db8fdfb36ce8cc1bc2104faf7868 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #include "XGUI_ModuleConnector.h"
@@ -109,6 +108,13 @@ AISObjectPtr XGUI_ModuleConnector::findPresentation(const ObjectPtr& theObject)
   return aDisp->getAISObject(theObject);
 }
 
+bool XGUI_ModuleConnector::isVisible(const ObjectPtr& theObject) const
+{
+  XGUI_Displayer* aDisp = myWorkshop->displayer();
+  return aDisp->isVisible(theObject);
+}
+
+
 ObjectPtr XGUI_ModuleConnector::findPresentedObject(const AISObjectPtr& theAIS) const
 {
   XGUI_Displayer* aDisp = myWorkshop->displayer();
@@ -130,9 +136,7 @@ void XGUI_ModuleConnector::setSelected(const QList<ModuleBase_ViewerPrsPtr>& the
     foreach(ModuleBase_ViewerPrsPtr aVal, theValues) {
       anObjects.append(aVal->object());
     }
-    bool aBlocked = myWorkshop->objectBrowser()->blockSignals(true);
     aBrowser->setObjectsSelected(anObjects);
-    myWorkshop->objectBrowser()->blockSignals(aBlocked);
   }
 }
 
@@ -207,3 +211,25 @@ std::shared_ptr<Config_FeatureMessage> XGUI_ModuleConnector::featureInfo(const Q
   return std::shared_ptr<Config_FeatureMessage>();
 #endif
 }
+
+void XGUI_ModuleConnector::deactivateCurrentSelector()
+{
+  myWorkshop->deactivateCurrentSelector();
+}
+
+QObjectPtrList XGUI_ModuleConnector::displayedObjects() const
+{
+  return myWorkshop->displayer()->displayedObjects();
+}
+
+bool XGUI_ModuleConnector::enableUpdateViewer(bool isEnabled)
+{
+  return myWorkshop->displayer()->enableUpdateViewer(isEnabled);
+}
+
+
+void XGUI_ModuleConnector::applyCurrentSelectionModes(const AISObjectPtr& theAIS)
+{
+  Handle(AIS_InteractiveObject) anIO = theAIS->impl<Handle(AIS_InteractiveObject)>();
+  myWorkshop->selectionActivate()->activate(anIO, false);
+}
\ No newline at end of file