-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File: PartSet_WidgetFeaturePointSelector.h
-// Created: 28 Feb 2017
-// 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 PartSet_WidgetFeaturePointSelector_H
#define PartSet_WidgetFeaturePointSelector_H
#include <QObject>
+#include <string>
+
class ModuleBase_IWorkshop;
class Config_WidgetAPI;
class ModuleBase_IViewWindow;
virtual ~PartSet_WidgetFeaturePointSelector();
- /// Checks all widget validator if the owner is valid. Firstly it checks custom widget validating,
- /// next, the attribute's validating. It trying on the give selection to current attribute by
- /// setting the value inside and calling validators. After this, the previous attribute value is
- /// restored.The valid/invalid value is cashed.
+ /// Checks all widget validator if the owner is valid. Firstly it checks custom widget
+ /// validating, next, the attribute's validating. It trying on the give selection to current
+ /// attribute by setting the value inside and calling validators. After this, the previous
+ /// attribute value is restored.The valid/invalid value is cashed.
/// \param theValue a selected presentation in the view
/// \return a boolean value
virtual bool isValidSelection(const std::shared_ptr<ModuleBase_ViewerPrs>& theValue);
+ /// Activate or deactivate selection and selection filters
+ /// \return true if the selection filter of the widget is activated in viewer context
+ virtual void updateSelectionModesAndFilters(bool toActivate);
+
/// Set sketcher
/// \param theSketch a sketcher object
void setSketcher(CompositeFeaturePtr theSketch) { mySketch = theSketch; }
/// \param theEvent a mouse event
virtual void mouseReleased(ModuleBase_IViewWindow* theWindow, QMouseEvent* theEvent);
- /// Returns values which should be highlighted when the whidget is active
- /// \param theValues a list of presentations
- //virtual void getHighlighted(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues);
-
/// Set the given wrapped value to the current widget
/// This value should be processed in the widget according to the needs
/// The method is called by the current operation to process the operation preselection.
const bool theToValidate);
/// Fill preselection used in mouseReleased
- //virtual void setPreSelection(const std::shared_ptr<ModuleBase_ViewerPrs>& thePreSelected);
virtual void setPreSelection(const std::shared_ptr<ModuleBase_ViewerPrs>& thePreSelected,
ModuleBase_IViewWindow* theWnd,
QMouseEvent* theEvent);
CompositeFeaturePtr mySketch;
Quantity_Color myHighlightColor;
Quantity_Color mySelectionColor;
+
+ std::string mySelectedObjectAttribute;
+ std::string mySelectedPointAttribute;
+ std::string myPreviewObjectAttribute;
+ std::string myPreviewPointAttribute;
};
#endif
\ No newline at end of file