X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_ExternalObjectsMgr.h;h=05d7f5b61c6157da11c4c89623520b5b3cabc3f5;hb=327f5bbd915fb32d21f2e524a8d97536e0e5dd4b;hp=82f9dbfb0f789beb596d0a55488b4b783da31f1d;hpb=fdf05fdbacbddf319df9770cddafaaa09e8cd1a4;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_ExternalObjectsMgr.h b/src/PartSet/PartSet_ExternalObjectsMgr.h old mode 100644 new mode 100755 index 82f9dbfb0..05d7f5b61 --- a/src/PartSet/PartSet_ExternalObjectsMgr.h +++ b/src/PartSet/PartSet_ExternalObjectsMgr.h @@ -39,36 +39,37 @@ class PARTSET_EXPORT PartSet_ExternalObjectsMgr /// Returns the state whether the external object is used bool useExternal() const { return myUseExternal; } + /// Checks validity of the given object + /// \param theObject an object to check + /// \return valid or not valid bool isValidObject(const ObjectPtr& theObject); /// Finds or create and external object /// \param theSelectedObject an object /// \param theShape a selected shape, which is used in the selection attribute /// \param theSketch a current sketch + /// \param theTemporary the created external object is temporary, execute is not performed for it /// \return the object ObjectPtr externalObject(const ObjectPtr& theSelectedObject, const GeomShapePtr& theShape, - const CompositeFeaturePtr& theSketch); - - ObjectPtr externalObjectValidated(const ObjectPtr& theSelectedObject, const GeomShapePtr& theShape, - const CompositeFeaturePtr& theSketch); + const CompositeFeaturePtr& theSketch, const bool theTemporary = false); // Removes the external presentation from the model /// \param theSketch a current sketch /// \param theFeature a current feature - /// \param theFeature a current workshop + /// \param theWorkshop a current workshop + /// \param theTemporary if true, a temporary external object is removed overwise all ext objects void removeExternal(const CompositeFeaturePtr& theSketch, const FeaturePtr& theFeature, - ModuleBase_IWorkshop* theWorkshop); - - void removeExternalValidated(const CompositeFeaturePtr& theSketch, - const FeaturePtr& theFeature, - ModuleBase_IWorkshop* theWorkshop); - - void removeUnusedExternalObjects(const QObjectPtrList& theIgnoreObjects, - const CompositeFeaturePtr& theSketch, - const FeaturePtr& theFeature); + ModuleBase_IWorkshop* theWorkshop, + const bool theTemporary); protected: + /// Delete from the document the feature of the object. It deletes all objects, which refers to + /// the deleted one. The parameter feature is ignored even it refer to the deleted object. + /// \param theObject a removed object + /// \param theSketch a current sketch + /// \param theFeature a current feature + /// \param theWorkshop a current workshop void removeExternalObject(const ObjectPtr& theObject, const CompositeFeaturePtr& theSketch, const FeaturePtr& theFeature, @@ -78,9 +79,6 @@ protected: static XGUI_Workshop* workshop(ModuleBase_IWorkshop* theWorkshop); protected: - /// An external object - QObjectPtrList myExternalObjects; - /// An external object ObjectPtr myExternalObjectValidated;