1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: PartSet_ExternalObjectsMgr.h
4 // Created: 15 Apr 2015
5 // Author: Natalia Ermolaeva
8 #ifndef PartSet_ExternalObjectsMgr_H
9 #define PartSet_ExternalObjectsMgr_H
13 #include <ModelAPI_CompositeFeature.h>
14 #include <ModelAPI_Object.h>
15 #include <GeomAPI_Shape.h>
17 #include <ModuleBase_Definitions.h>
23 * Customosation of ModuleBase_WidgetShapeSelector in order to provide
24 * working with sketch specific objects.
26 class PARTSET_EXPORT PartSet_ExternalObjectsMgr
30 /// \param theExternal the external state
31 /// \param theDefaultValue the default value for the external object using
32 PartSet_ExternalObjectsMgr(const std::string& theExternal, const bool theDefaultValue);
34 virtual ~PartSet_ExternalObjectsMgr() {}
36 /// Returns the state whether the external object is used
37 bool useExternal() const { return myUseExternal; }
39 /// Finds or create and external object
40 /// \param theSelectedObject an object
41 /// \param theShape a selected shape, which is used in the selection attribute
42 /// \param theSketch a current sketch
43 /// \return the object
44 ObjectPtr externalObject(const ObjectPtr& theSelectedObject, const GeomShapePtr& theShape,
45 const CompositeFeaturePtr& theSketch);
47 // Removes the external presentation from the model
48 /// \param theSketch a current sketch
49 /// \param theFeature a current feature
50 void removeExternal(const CompositeFeaturePtr& theSketch,
51 const FeaturePtr& theFeature);
54 /// An external object
55 QObjectPtrList myExternalObjects;
57 /// Boolean value about the neccessity of the external object use