QGIS API Documentation  2.7.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  ItemPositionMode {
  UpperLeft, UpperMiddle, UpperRight, MiddleLeft,
  Middle, MiddleRight, LowerLeft, LowerMiddle,
  LowerRight
}
 
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  SnapGuideMode { Item, Point }
 

Public Slots

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

Public Member Functions

 QgsComposerMouseHandles (QgsComposition *composition)
 
virtual ~QgsComposerMouseHandles ()
 
QgsCompositioncomposition ()
 
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...
 
QgsComposerMouseHandles::MouseAction mouseActionForScenePos (const QPointF &sceneCoordPos)
 Finds out which mouse move action to choose depending on the scene cursor position. More...
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget)
 
void setComposition (QgsComposition *c)
 

Protected Member Functions

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

Detailed Description

Handles drawing of selection outlines and mouse handles.

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

Definition at line 31 of file qgscomposermousehandles.h.

Constructor & Destructor Documentation

QgsComposerMouseHandles::QgsComposerMouseHandles ( QgsComposition composition)

Definition at line 33 of file qgscomposermousehandles.cpp.

QgsComposerMouseHandles::~QgsComposerMouseHandles ( )
virtual

Definition at line 53 of file qgscomposermousehandles.cpp.

Member Function Documentation

QgsComposition* QgsComposerMouseHandles::composition ( )
inline

Definition at line 75 of file qgscomposermousehandles.h.

void QgsComposerMouseHandles::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
protected

Definition at line 550 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::hoverMoveEvent ( QGraphicsSceneHoverEvent *  event)
protected

Definition at line 545 of file qgscomposermousehandles.cpp.

bool QgsComposerMouseHandles::isDragging ( )
inline

Returns true is user is currently dragging the handles.

Definition at line 83 of file qgscomposermousehandles.h.

bool QgsComposerMouseHandles::isResizing ( )
inline

Returns true is user is currently resizing with the handles.

Definition at line 86 of file qgscomposermousehandles.h.

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

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

Definition at line 538 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
protected

Definition at line 744 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
protected

Definition at line 567 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
protected

Definition at line 710 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
protected

Definition at line 587 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  itemStyle,
QWidget *  pWidget 
)

Definition at line 81 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::selectedItemRotationChanged ( )
slot

Redraws handles when selected item rotation changes.

Definition at line 240 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::selectedItemSizeChanged ( )
slot

Redraws handles when selected item size changes.

Definition at line 231 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::selectionChanged ( )
slot

Sets up listeners to sizeChanged signal for all selected items.

Definition at line 200 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::setComposition ( QgsComposition c)
inline

Definition at line 74 of file qgscomposermousehandles.h.


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