QGIS API Documentation  2.99.0-Master (b058df7)
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)
 
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 38 of file qgscomposermousehandles.h.

Member Enumeration Documentation

◆ ItemPositionMode

Enumerator
UpperLeft 
UpperMiddle 
UpperRight 
MiddleLeft 
Middle 
MiddleRight 
LowerLeft 
LowerMiddle 
LowerRight 

Definition at line 59 of file qgscomposermousehandles.h.

◆ MouseAction

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 44 of file qgscomposermousehandles.h.

◆ SnapGuideMode

Enumerator
Item 
Point 

Definition at line 72 of file qgscomposermousehandles.h.

Constructor & Destructor Documentation

◆ QgsComposerMouseHandles()

QgsComposerMouseHandles::QgsComposerMouseHandles ( QgsComposition composition)

Definition at line 33 of file qgscomposermousehandles.cpp.

Member Function Documentation

◆ composition()

QgsComposition* QgsComposerMouseHandles::composition ( )
inline

Definition at line 81 of file qgscomposermousehandles.h.

◆ hoverLeaveEvent()

void QgsComposerMouseHandles::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

Definition at line 551 of file qgscomposermousehandles.cpp.

◆ hoverMoveEvent()

void QgsComposerMouseHandles::hoverMoveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

Definition at line 546 of file qgscomposermousehandles.cpp.

◆ isDragging()

bool QgsComposerMouseHandles::isDragging ( )
inline

Returns true is user is currently dragging the handles.

Definition at line 89 of file qgscomposermousehandles.h.

◆ isResizing()

bool QgsComposerMouseHandles::isResizing ( )
inline

Returns true is user is currently resizing with the handles.

Definition at line 92 of file qgscomposermousehandles.h.

◆ mouseActionForScenePos()

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

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

Definition at line 539 of file qgscomposermousehandles.cpp.

◆ mouseDoubleClickEvent()

void QgsComposerMouseHandles::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

Definition at line 745 of file qgscomposermousehandles.cpp.

◆ mouseMoveEvent()

void QgsComposerMouseHandles::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

Definition at line 568 of file qgscomposermousehandles.cpp.

◆ mousePressEvent()

void QgsComposerMouseHandles::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

Definition at line 711 of file qgscomposermousehandles.cpp.

◆ mouseReleaseEvent()

void QgsComposerMouseHandles::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

Definition at line 588 of file qgscomposermousehandles.cpp.

◆ paint()

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

Definition at line 77 of file qgscomposermousehandles.cpp.

◆ selectedItemRotationChanged

void QgsComposerMouseHandles::selectedItemRotationChanged ( )
slot

Redraws handles when selected item rotation changes.

Definition at line 241 of file qgscomposermousehandles.cpp.

◆ selectedItemSizeChanged

void QgsComposerMouseHandles::selectedItemSizeChanged ( )
slot

Redraws handles when selected item size changes.

Definition at line 232 of file qgscomposermousehandles.cpp.

◆ selectionChanged

void QgsComposerMouseHandles::selectionChanged ( )
slot

Sets up listeners to sizeChanged signal for all selected items.

Definition at line 201 of file qgscomposermousehandles.cpp.

◆ setComposition()

void QgsComposerMouseHandles::setComposition ( QgsComposition c)
inline

Definition at line 80 of file qgscomposermousehandles.h.


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