QGIS API Documentation  2.99.0-Master (c558d51)
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 (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) 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.

Note
not available in Python bindings

Definition at line 32 of file qgscomposermousehandles.h.

Member Enumeration Documentation

Enumerator
UpperLeft 
UpperMiddle 
UpperRight 
MiddleLeft 
Middle 
MiddleRight 
LowerLeft 
LowerMiddle 
LowerRight 

Definition at line 53 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 38 of file qgscomposermousehandles.h.

Enumerator
Item 
Point 

Definition at line 66 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 76 of file qgscomposermousehandles.h.

void QgsComposerMouseHandles::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

Definition at line 557 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::hoverMoveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

Definition at line 552 of file qgscomposermousehandles.cpp.

bool QgsComposerMouseHandles::isDragging ( )
inline

Returns true is user is currently dragging the handles.

Definition at line 84 of file qgscomposermousehandles.h.

bool QgsComposerMouseHandles::isResizing ( )
inline

Returns true is user is currently resizing with the handles.

Definition at line 87 of file qgscomposermousehandles.h.

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

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

Definition at line 545 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

Definition at line 751 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

Definition at line 574 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

Definition at line 717 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

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

void QgsComposerMouseHandles::selectedItemSizeChanged ( )
slot

Redraws handles when selected item size changes.

Definition at line 238 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::selectionChanged ( )
slot

Sets up listeners to sizeChanged signal for all selected items.

Definition at line 207 of file qgscomposermousehandles.cpp.

void QgsComposerMouseHandles::setComposition ( QgsComposition c)
inline

Definition at line 75 of file qgscomposermousehandles.h.


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