SHAPER  9.13.0
ModelAPI_ObjectMovedMessage Class Reference

Message sent when feature or attribute has been moved. More...

Inheritance diagram for ModelAPI_ObjectMovedMessage:
Inheritance graph

Public Member Functions

MODELAPI_EXPORT ModelAPI_ObjectMovedMessage (const void *theSender=0)
 
MODELAPI_EXPORT void setMovedObject (const ObjectPtr &theMovedObject)
 Set object which is being moved (if the message already contains attribute it will be cleared) More...
 
MODELAPI_EXPORT void setMovedAttribute (const AttributePtr &theMovedAttribute, const int thePointIndex=-1)
 Set attribute which is being moved (if the message already contains object it will be cleared) More...
 
ObjectPtr movedObject () const
 Return moved object. More...
 
AttributePtr movedAttribute () const
 Return moved attribute. More...
 
int movedPointIndex () const
 Return index of the moved point. More...
 
MODELAPI_EXPORT void setOriginalPosition (double theX, double theY)
 Set original mouse position. More...
 
MODELAPI_EXPORT void setOriginalPosition (const std::shared_ptr< GeomAPI_Pnt2d > &thePoint)
 Set original mouse position. More...
 
const std::shared_ptr< GeomAPI_Pnt2d > & originalPosition () const
 Return original mouse position. More...
 
MODELAPI_EXPORT void setCurrentPosition (double theX, double theY)
 Set current mouse position. More...
 
MODELAPI_EXPORT void setCurrentPosition (const std::shared_ptr< GeomAPI_Pnt2d > &thePoint)
 Set current mouse position. More...
 
const std::shared_ptr< GeomAPI_Pnt2d > & currentPosition () const
 Return current mouse position. More...
 
const Events_IDeventID () const
 Returns identifier of the message. More...
 
void * sender () const
 Returns sender of the message or NULL if it is anonymous message. More...
 

Detailed Description

Message sent when feature or attribute has been moved.

Stores the moving object/attribute, original and new positions of mouse.

Member Function Documentation

◆ setMovedObject()

void ModelAPI_ObjectMovedMessage::setMovedObject ( const ObjectPtr &  theMovedObject)

Set object which is being moved (if the message already contains attribute it will be cleared)

◆ setMovedAttribute()

void ModelAPI_ObjectMovedMessage::setMovedAttribute ( const AttributePtr &  theMovedAttribute,
const int  thePointIndex = -1 
)

Set attribute which is being moved (if the message already contains object it will be cleared)

Parameters
[in]theMovedAttributemoved attribute
[in]thePointIndexindex of the point if the moved attribute is an array of points

◆ movedObject()

ObjectPtr ModelAPI_ObjectMovedMessage::movedObject ( ) const
inline

Return moved object.

◆ movedAttribute()

AttributePtr ModelAPI_ObjectMovedMessage::movedAttribute ( ) const
inline

Return moved attribute.

◆ movedPointIndex()

int ModelAPI_ObjectMovedMessage::movedPointIndex ( ) const
inline

Return index of the moved point.

◆ setOriginalPosition() [1/2]

void ModelAPI_ObjectMovedMessage::setOriginalPosition ( double  theX,
double  theY 
)

Set original mouse position.

◆ setOriginalPosition() [2/2]

void ModelAPI_ObjectMovedMessage::setOriginalPosition ( const std::shared_ptr< GeomAPI_Pnt2d > &  thePoint)

Set original mouse position.

◆ originalPosition()

const std::shared_ptr<GeomAPI_Pnt2d>& ModelAPI_ObjectMovedMessage::originalPosition ( ) const
inline

Return original mouse position.

◆ setCurrentPosition() [1/2]

void ModelAPI_ObjectMovedMessage::setCurrentPosition ( double  theX,
double  theY 
)

Set current mouse position.

◆ setCurrentPosition() [2/2]

void ModelAPI_ObjectMovedMessage::setCurrentPosition ( const std::shared_ptr< GeomAPI_Pnt2d > &  thePoint)

Set current mouse position.

◆ currentPosition()

const std::shared_ptr<GeomAPI_Pnt2d>& ModelAPI_ObjectMovedMessage::currentPosition ( ) const
inline

Return current mouse position.

◆ eventID()

const Events_ID& Events_Message::eventID ( ) const
inlineinherited

Returns identifier of the message.

◆ sender()

void* Events_Message::sender ( ) const
inlineinherited

Returns sender of the message or NULL if it is anonymous message.