This object provides a visual cue for the user to grab the corner of a box for dragging (or the end of a line). More...
#include <cornergrabber.h>
Public Types | |
enum | { kMouseReleased = 0, kMouseDown, kMouseMoving } |
enum | PaintStyle { kBox, kCrossHair } |
Public Member Functions | |
CornerGrabber (QGraphicsItem *parent=0, int corner=0, bool placedOnASquare=false) | |
int | getCorner () |
allows the owner to find out which coner this is | |
void | setMouseState (int) |
allows the owner to record the current mouse state | |
int | getMouseState () |
allows the owner to get the current mouse state | |
QPointF | getCenterPoint () |
void | setPaintStyle (PaintStyle s) |
set box or cross-hairs | |
virtual QRectF | boundingRect () const |
must be re-implemented in this class to provide the diminsions of the box to the QGraphicsView | |
Public Attributes | |
qreal | mouseDownX |
qreal | mouseDownY |
This object provides a visual cue for the user to grab the corner of a box for dragging (or the end of a line).
CornerGrabber::CornerGrabber | ( | QGraphicsItem * | parent = 0 , |
|
int | corner = 0 , |
|||
bool | placedOnASquare = false | |||
) | [explicit] |
QRectF CornerGrabber::boundingRect | ( | ) | const [virtual] |
must be re-implemented in this class to provide the diminsions of the box to the QGraphicsView
QPointF CornerGrabber::getCenterPoint | ( | ) |
int CornerGrabber::getCorner | ( | ) |
allows the owner to find out which coner this is
int CornerGrabber::getMouseState | ( | ) |
allows the owner to get the current mouse state
void CornerGrabber::setMouseState | ( | int | s | ) |
allows the owner to record the current mouse state
void CornerGrabber::setPaintStyle | ( | PaintStyle | s | ) |
set box or cross-hairs