QGIS API Documentation  2.8.2-Wien
 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  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.
void selectedItemSizeChanged ()
 Redraws handles when selected item size changes.
void selectionChanged ()
 Sets up listeners to sizeChanged signal for all selected items.

Public Member Functions

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

Protected Member Functions

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

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.

Member Enumeration Documentation

Enumerator:
UpperLeft 
UpperMiddle 
UpperRight 
MiddleLeft 
Middle 
MiddleRight 
LowerLeft 
LowerMiddle 
LowerRight 

Definition at line 52 of file qgscomposermousehandles.h.

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 

Definition at line 37 of file qgscomposermousehandles.h.

Enumerator:
Item 
Point 

Definition at line 65 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 55 of file qgscomposermousehandles.cpp.

Member Function Documentation

QgsComposition* QgsComposerMouseHandles::composition ( )
inline

Definition at line 75 of file qgscomposermousehandles.h.

void QgsComposerMouseHandles::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

Definition at line 552 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::hoverMoveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

Definition at line 547 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 540 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

Definition at line 746 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

Definition at line 569 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

Definition at line 712 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

Definition at line 589 of file qgscomposermousehandles.cpp.

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

Definition at line 83 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::selectedItemRotationChanged ( )
slot

Redraws handles when selected item rotation changes.

Definition at line 242 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::selectedItemSizeChanged ( )
slot

Redraws handles when selected item size changes.

Definition at line 233 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::selectionChanged ( )
slot

Sets up listeners to sizeChanged signal for all selected items.

Definition at line 202 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: