QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Slots | Public Member Functions | Protected Member Functions | List of all members
QgsComposerMouseHandles Class Reference

Handles drawing of selection outlines and mouse handles. More...

#include <qgscomposermousehandles.h>

Public Types

enum  MouseAction {
  MoveItem, ResizeUp, ResizeDown, ResizeLeft,
  ResizeRight, ResizeLeftUp, ResizeRightUp, ResizeLeftDown,
  ResizeRightDown, SelectItem, NoAction
}
 Describes the action (move or resize in different directon) to be done during mouse move. More...
enum  ItemPositionMode {
  UpperLeft, UpperMiddle, UpperRight, MiddleLeft,
  Middle, MiddleRight, LowerLeft, LowerMiddle,
  LowerRight
}
enum  SnapGuideMode { Item, Point }

Public Slots

void selectionChanged ()
 Sets up listeners to sizeChanged signal for all selected items.
void selectedItemSizeChanged ()
 Redraws handles when selected item size changes.
void selectedItemRotationChanged ()
 Redraws handles when selected item rotation changes.

Public Member Functions

 QgsComposerMouseHandles (QgsComposition *composition)
virtual ~QgsComposerMouseHandles ()
void setComposition (QgsComposition *c)
QgsCompositioncomposition ()
void paint (QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget)
QgsComposerMouseHandles::MouseAction mouseActionForScenePos (const QPointF &sceneCoordPos)
 Finds out which mouse move action to choose depending on the scene cursor position.
bool isDragging ()
 Returns true is user is currently dragging the handles.
bool isResizing ()
 Returns true is user is currently resizing with the handles.

Protected Member Functions

void mouseMoveEvent (QGraphicsSceneMouseEvent *event)
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
void mousePressEvent (QGraphicsSceneMouseEvent *event)
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event)
void hoverMoveEvent (QGraphicsSceneHoverEvent *event)
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event)

Detailed Description

Handles drawing of selection outlines and mouse handles.

Responsible for mouse interactions such as resizing and moving selected items.

Member Enumeration Documentation

Enumerator:
UpperLeft 
UpperMiddle 
UpperRight 
MiddleLeft 
Middle 
MiddleRight 
LowerLeft 
LowerMiddle 
LowerRight 

Describes the action (move or resize in different directon) to be done during mouse move.

Enumerator:
MoveItem 
ResizeUp 
ResizeDown 
ResizeLeft 
ResizeRight 
ResizeLeftUp 
ResizeRightUp 
ResizeLeftDown 
ResizeRightDown 
SelectItem 
NoAction 
Enumerator:
Item 
Point 

Constructor & Destructor Documentation

QgsComposerMouseHandles::QgsComposerMouseHandles ( QgsComposition composition)
QgsComposerMouseHandles::~QgsComposerMouseHandles ( )
virtual

Member Function Documentation

QgsComposition* QgsComposerMouseHandles::composition ( )
inline
void QgsComposerMouseHandles::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
protected
void QgsComposerMouseHandles::hoverMoveEvent ( QGraphicsSceneHoverEvent *  event)
protected
bool QgsComposerMouseHandles::isDragging ( )
inline

Returns true is user is currently dragging the handles.

bool QgsComposerMouseHandles::isResizing ( )
inline

Returns true is user is currently resizing with the handles.

QgsComposerMouseHandles::MouseAction QgsComposerMouseHandles::mouseActionForScenePos ( const QPointF &  sceneCoordPos)

Finds out which mouse move action to choose depending on the scene cursor position.

void QgsComposerMouseHandles::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
protected
void QgsComposerMouseHandles::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
protected
void QgsComposerMouseHandles::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
protected
void QgsComposerMouseHandles::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
protected
void QgsComposerMouseHandles::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  itemStyle,
QWidget *  pWidget 
)
void QgsComposerMouseHandles::selectedItemRotationChanged ( )
slot

Redraws handles when selected item rotation changes.

void QgsComposerMouseHandles::selectedItemSizeChanged ( )
slot

Redraws handles when selected item size changes.

void QgsComposerMouseHandles::selectionChanged ( )
slot

Sets up listeners to sizeChanged signal for all selected items.

void QgsComposerMouseHandles::setComposition ( QgsComposition c)
inline

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