X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_Events.cpp;h=1224934af03dc1a729cc9db9b496cb37f583b679;hb=b2789486810cd4f9484e4e40cd0f2dc6d7c7b00f;hp=00c74c8df695aa05d9cb04e7f66b4b5712134135;hpb=5b6031b015602aa07f5a6fc668c13ac3faf7a8a9;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_Events.cpp b/src/ModelAPI/ModelAPI_Events.cpp index 00c74c8df..1224934af 100644 --- a/src/ModelAPI/ModelAPI_Events.cpp +++ b/src/ModelAPI/ModelAPI_Events.cpp @@ -10,6 +10,8 @@ #include #include +#include + ModelAPI_ObjectUpdatedMessage::ModelAPI_ObjectUpdatedMessage(const Events_ID theID, const void* theSender) : Events_MessageGroup(theID, theSender) @@ -328,3 +330,43 @@ const std::set& ModelAPI_SolverFailedMessage::objects() const return myObjects; } + +// ===== ModelAPI_ObjectMovedMessage ===== +ModelAPI_ObjectMovedMessage::ModelAPI_ObjectMovedMessage(const void* theSender) + : Events_Message(Events_Loop::eventByName(EVENT_OBJECT_MOVED), theSender) +{ +} + +void ModelAPI_ObjectMovedMessage::setMovedObject(const ObjectPtr& theMovedObject) +{ + myMovedObject = theMovedObject; + myMovedAttribute = AttributePtr(); +} + +void ModelAPI_ObjectMovedMessage::setMovedAttribute(const AttributePtr& theMovedAttribute) +{ + myMovedAttribute = theMovedAttribute; + myMovedObject = ObjectPtr(); +} + +void ModelAPI_ObjectMovedMessage::setOriginalPosition(double theX, double theY) +{ + myOriginalPosition = std::shared_ptr(new GeomAPI_Pnt2d(theX, theY)); +} + +void ModelAPI_ObjectMovedMessage::setOriginalPosition( + const std::shared_ptr& thePoint) +{ + myOriginalPosition = thePoint; +} + +void ModelAPI_ObjectMovedMessage::setCurrentPosition(double theX, double theY) +{ + myCurrentPosition = std::shared_ptr(new GeomAPI_Pnt2d(theX, theY)); +} + +void ModelAPI_ObjectMovedMessage::setCurrentPosition( + const std::shared_ptr& thePoint) +{ + myCurrentPosition = thePoint; +}