Public Types | Public Member Functions | Public Attributes

CornerGrabber Class Reference
[GraphicsView]

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>

List of all members.

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

Detailed Description

This object provides a visual cue for the user to grab the corner of a box for dragging (or the end of a line).


Member Enumeration Documentation

anonymous enum
Enumerator:
kMouseReleased 
kMouseDown 
kMouseMoving 
Enumerator:
kBox 
kCrossHair 

Constructor & Destructor Documentation

CornerGrabber::CornerGrabber ( QGraphicsItem *  parent = 0,
int  corner = 0,
bool  placedOnASquare = false 
) [explicit]

Member Function Documentation

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


Member Data Documentation


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