Salome HOME
Create filter "Belongs To"
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetFeatureSelector.h
index 3489a336a0fc618274cd6b7b30b9e81ddba928aa..4534c9bc9c8c169ebd6d18163d59d2171f00dfc4 100644 (file)
@@ -1,8 +1,21 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:        ModuleBase_WidgetFeatureSelector.h
-// Created:     5 Sep 2016
-// Author:      Natalia Ermolaeva
+// 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
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 #ifndef ModuleBase_WidgetFeatureSelector_H
 #define ModuleBase_WidgetFeatureSelector_H
@@ -54,6 +67,11 @@ Q_OBJECT
   virtual bool setSelection(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues,
                             const bool theToValidate);
 
+  /// Fills given container with selection modes if the widget has it
+  /// \param [out] theModuleSelectionModes module additional modes, -1 means all default modes
+  /// \param theModes [out] a container of modes
+  virtual void selectionModes(int& theModuleSelectionModes, QIntList& theModes);
+
   /// Returns list of widget controls
   /// \return a control list
   virtual QList<QWidget*> getControls() const;
@@ -62,9 +80,6 @@ Q_OBJECT
   /// \param thePrs a selected owner
   virtual bool setSelectionCustom(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs);
 
-  /// The method called when widget is deactivated
-  virtual void deactivate();
-
 protected:
   /// The method called when widget is activated
   virtual void activateCustom();
@@ -90,9 +105,9 @@ protected:
   /// \param theDone a state whether the selection is set
   virtual void updateOnSelectionChanged(const bool theDone);
 
-protected slots:
-  /// Called on selection changed event
-  virtual void onSelectionChanged();
+protected:
+  /// Returns true if envent is processed.
+  virtual bool processSelection();
 
   //----------- Class members -------------
 protected: