GrabberHandle Class Reference

#include <GrabberHandle.hh>

Inherits QGraphicsItem.

Public Member Functions

 GrabberHandle (QGraphicsItem *_parent=0, int index=0)
 Constructor. More...
 
virtual ~GrabberHandle ()
 Destructor. More...
 
virtual QRectF boundingRect () const
 Get the bounding box of the grabber handle. More...
 
ignition::math::Vector2d CenterPoint () const
 Get the center point of the grabber handle. More...
 
common::Color Color () const
 Get the fill color of the grabber handle. More...
 
void EraseLinkedGrabber (GrabberHandle *_grabber)
 Erase a grabber from the list of grabbers linked to this. More...
 
double Height () const
 Get the height of the grabber handle. More...
 
int Index () const
 Get the index of the grabber handle. More...
 
std::vector< GrabberHandle * > LinkedGrabbers () const
 Get the vector of grabbers linked to this. More...
 
double MouseDownX () const
 Get the X position of the mouse press. More...
 
double MouseDownY () const
 Get the Y position of the mouse press. More...
 
int MouseState () const
 Get the current mouse state. More...
 
void PushLinkedGrabber (GrabberHandle *_grabber)
 Push a grabber to the list of grabbers linked to this. More...
 
void SetBorderColor (const common::Color &_borderColor)
 Set the border color of the grabber handle. More...
 
void SetColor (const common::Color &_color)
 Set the fill color of the grabber handle. More...
 
void SetHeight (double _height)
 Set the height of the grabber handle. More...
 
void SetMouseDownX (double _x)
 Set the X position of the mouse press. More...
 
void SetMouseDownY (double _y)
 Set the Y position of the mouse press. More...
 
void SetMouseState (int _state)
 Set the current mouse state. More...
 
void SetWidth (double _width)
 Set the width of the grabber handle. More...
 
double Width () const
 Get the width of the grabber handle. More...
 

Protected Member Functions

void hoverEnterEvent (QGraphicsSceneHoverEvent *_event)
 Qt mouse hover enter event. More...
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *_event)
 Qt mouse hover leave event. More...
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *_event)
 Qt mouse move event. More...
 
void mouseMoveEvent (QGraphicsSceneDragDropEvent *_event)
 Qt mouse move event during drag and drop. More...
 
void mousePressEvent (QGraphicsSceneMouseEvent *_event)
 Qt mouse press event. More...
 
void mousePressEvent (QGraphicsSceneDragDropEvent *_event)
 Qt mouse press event during drag and drop. More...
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *_event)
 Qt mouse release event. More...
 

Constructor & Destructor Documentation

§ GrabberHandle()

GrabberHandle ( QGraphicsItem *  _parent = 0,
int  index = 0 
)

Constructor.

Parameters
[in]_parentParent graphics item
[in]_indexIndex of the grabber handle

§ ~GrabberHandle()

virtual ~GrabberHandle ( )
virtual

Destructor.

Member Function Documentation

§ boundingRect()

virtual QRectF boundingRect ( ) const
virtual

Get the bounding box of the grabber handle.

Returns
The grabber handle bounding box.

§ CenterPoint()

ignition::math::Vector2d CenterPoint ( ) const

Get the center point of the grabber handle.

Returns
Center point in pixel coordinates.

§ Color()

common::Color Color ( ) const

Get the fill color of the grabber handle.

Returns
_color Fill color.

§ EraseLinkedGrabber()

void EraseLinkedGrabber ( GrabberHandle _grabber)

Erase a grabber from the list of grabbers linked to this.

Parameters
[in]_grabberGrabber which will be removed.

§ Height()

double Height ( ) const

Get the height of the grabber handle.

Returns
The height of the grabber handle in pixels.

§ hoverEnterEvent()

void hoverEnterEvent ( QGraphicsSceneHoverEvent *  _event)
protected

Qt mouse hover enter event.

Parameters
[in]_eventQt mouse hover event.

§ hoverLeaveEvent()

void hoverLeaveEvent ( QGraphicsSceneHoverEvent *  _event)
protected

Qt mouse hover leave event.

Parameters
[in]_eventQt mouse hover event.

§ Index()

int Index ( ) const

Get the index of the grabber handle.

Returns
Index of the grabber handle.

§ LinkedGrabbers()

std::vector<GrabberHandle *> LinkedGrabbers ( ) const

Get the vector of grabbers linked to this.

Returns
Vector of linked grabbers.

§ MouseDownX()

double MouseDownX ( ) const

Get the X position of the mouse press.

Returns
Mouse press X position in pixel coordinates.

§ MouseDownY()

double MouseDownY ( ) const

Get the Y position of the mouse press.

Returns
Mouse press Y position in pixel coordinates.

§ mouseMoveEvent() [1/2]

void mouseMoveEvent ( QGraphicsSceneMouseEvent *  _event)
protected

Qt mouse move event.

Parameters
[in]_eventQt mouse event.

§ mouseMoveEvent() [2/2]

void mouseMoveEvent ( QGraphicsSceneDragDropEvent *  _event)
protected

Qt mouse move event during drag and drop.

Parameters
[in]_eventQt mouse drag and drop event.

§ mousePressEvent() [1/2]

void mousePressEvent ( QGraphicsSceneMouseEvent *  _event)
protected

Qt mouse press event.

Parameters
[in]_eventQt mouse event.

§ mousePressEvent() [2/2]

void mousePressEvent ( QGraphicsSceneDragDropEvent *  _event)
protected

Qt mouse press event during drag and drop.

Parameters
[in]_eventQt mouse drag and drop event.

§ mouseReleaseEvent()

void mouseReleaseEvent ( QGraphicsSceneMouseEvent *  _event)
protected

Qt mouse release event.

Parameters
[in]_eventQt mouse event.

§ MouseState()

int MouseState ( ) const

Get the current mouse state.

Returns
The current mouse state.

§ PushLinkedGrabber()

void PushLinkedGrabber ( GrabberHandle _grabber)

Push a grabber to the list of grabbers linked to this.

Parameters
[in]_grabberNew grabber.

§ SetBorderColor()

void SetBorderColor ( const common::Color _borderColor)

Set the border color of the grabber handle.

Parameters
[in]_borderColorBorder Color.

§ SetColor()

void SetColor ( const common::Color _color)

Set the fill color of the grabber handle.

Parameters
[in]_colorFill Color.

§ SetHeight()

void SetHeight ( double  _height)

Set the height of the grabber handle.

Parameters
[in]_heightHeight in pixels.

§ SetMouseDownX()

void SetMouseDownX ( double  _x)

Set the X position of the mouse press.

Parameters
[in]_xMouse press X position in pixel coordinates.

§ SetMouseDownY()

void SetMouseDownY ( double  _y)

Set the Y position of the mouse press.

Parameters
[in]_yMouse press Y position in pixel coordinates.

§ SetMouseState()

void SetMouseState ( int  _state)

Set the current mouse state.

Parameters
[in]_stateCurrent mouse state.

§ SetWidth()

void SetWidth ( double  _width)

Set the width of the grabber handle.

Parameters
[in]_widthWidth in pixels.

§ Width()

double Width ( ) const

Get the width of the grabber handle.

Returns
The width of the grabber handle in pixel coordinates.

The documentation for this class was generated from the following file: