SHAPER 9.16.0
PartSet_WidgetMultiSelector.h
1// Copyright (C) 2014-2026 CEA, EDF
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef PartSet_WidgetMultiSelector_H
21#define PartSet_WidgetMultiSelector_H
22
23#include "PartSet.h"
24
25#include <ModuleBase_WidgetMultiSelector.h>
26
27#include <ModelAPI_CompositeFeature.h>
28
31
38{
39Q_OBJECT
40 public:
46 const Config_WidgetAPI* theData);
47
49
51 virtual bool isViewerSelector() { return true; }
52
55 void setSketcher(CompositeFeaturePtr theSketch) { mySketch = theSketch; }
56
58 CompositeFeaturePtr sketch() const { return mySketch; }
59
60protected:
64 virtual bool isValidSelectionCustom(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs);
65
71 virtual void restoreAttributeValue(const AttributePtr& theAttribute, const bool theValid);
72
77 virtual void getGeomSelection(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs,
78 ObjectPtr& theObject,
79 GeomShapePtr& theShape);
80
81protected:
84
86 CompositeFeaturePtr mySketch;
87};
88
89#endif
Provides low-level API for WidgetFactory for reading xml definitions of widgets.
Definition: Config_WidgetAPI.h:46
Class which provides access to Workshop object services.
Definition: ModuleBase_IWorkshop.h:48
Presentation.
Definition: ModuleBase_ViewerPrs.h:37
Implementation of widget for shapes selection.
Definition: ModuleBase_WidgetMultiSelector.h:62
virtual bool isValidSelectionCustom(const std::shared_ptr< ModuleBase_ViewerPrs > &thePrs)
Checks the widget validity.
Definition: ModuleBase_WidgetMultiSelector.cpp:524
virtual void getGeomSelection(const std::shared_ptr< ModuleBase_ViewerPrs > &thePrs, ObjectPtr &theObject, GeomShapePtr &theShape)
Return an object and geom shape by the viewer presentation.
Definition: ModuleBase_WidgetSelector.cpp:65
virtual void restoreAttributeValue(const AttributePtr &theAttribute, const bool theValid)
Creates a backup of the current values of the attribute It should be realized in the specific widget ...
Definition: ModuleBase_WidgetValidated.cpp:92
Customosation of ModuleBase_WidgetShapeSelector in order to provide working with sketch specific obje...
Definition: PartSet_ExternalObjectsMgr.h:43
Customosation of ModuleBase_WidgetMultiSelector in order to provide working with sketch specific obje...
Definition: PartSet_WidgetMultiSelector.h:38
virtual bool isViewerSelector()
Defines if it is supposed that the widget should interact with the viewer.
Definition: PartSet_WidgetMultiSelector.h:51
CompositeFeaturePtr mySketch
Pointer to a sketch.
Definition: PartSet_WidgetMultiSelector.h:86
PartSet_ExternalObjectsMgr * myExternalObjectMgr
Manager of external objects.
Definition: PartSet_WidgetMultiSelector.h:83
void setSketcher(CompositeFeaturePtr theSketch)
Set sketcher.
Definition: PartSet_WidgetMultiSelector.h:55
CompositeFeaturePtr sketch() const
Retrurns installed sketcher.
Definition: PartSet_WidgetMultiSelector.h:58