QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules 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>

Inheritance diagram for QgsComposerMouseHandles:
Inheritance graph
[legend]

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. More...
 
void selectedItemSizeChanged ()
 Redraws handles when selected item size changes. More...
 
void selectedItemRotationChanged ()
 Redraws handles when selected item rotation changes. More...
 

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. More...
 
bool isDragging ()
 Returns true is user is currently dragging the handles. More...
 
bool isResizing ()
 Returns true is user is currently resizing with the handles. More...
 

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.

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: