X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_WidgetFeaturePointSelector.h;h=818253f4e43befa60e2fdfc4f63813d0e4adcfa1;hb=e9f4528b0dab3feb440ad33f9da48bbb9b5979b1;hp=cfb6329db434cfa06b72ef1f975dc0d7104fb75d;hpb=af69a9771accba3192bbb19edf77fb2dce428b7e;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_WidgetFeaturePointSelector.h b/src/PartSet/PartSet_WidgetFeaturePointSelector.h index cfb6329db..818253f4e 100644 --- a/src/PartSet/PartSet_WidgetFeaturePointSelector.h +++ b/src/PartSet/PartSet_WidgetFeaturePointSelector.h @@ -1,9 +1,21 @@ -// 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 @@ -18,6 +30,8 @@ #include +#include + class ModuleBase_IWorkshop; class Config_WidgetAPI; class ModuleBase_IViewWindow; @@ -49,14 +63,18 @@ Q_OBJECT 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& 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; } @@ -77,10 +95,6 @@ Q_OBJECT /// \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>& 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. @@ -91,7 +105,6 @@ Q_OBJECT const bool theToValidate); /// Fill preselection used in mouseReleased - //virtual void setPreSelection(const std::shared_ptr& thePreSelected); virtual void setPreSelection(const std::shared_ptr& thePreSelected, ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent); @@ -114,6 +127,11 @@ protected: 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