digiKam
Digikam::ClickDragReleaseItem Class Reference
+ Inheritance diagram for Digikam::ClickDragReleaseItem:

Signals

void cancelled ()
 
void finished (const QRectF &rect)
 
void moving (const QRectF &rect)
 
void started (const QPointF &pos)
 

Public Member Functions

QRectF boundingRect () const override
 
 ClickDragReleaseItem (QGraphicsItem *const parent)
 
void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override
 
 ~ClickDragReleaseItem () override
 

Protected Member Functions

void hoverMoveEvent (QGraphicsSceneHoverEvent *) override
 
void keyPressEvent (QKeyEvent *) override
 
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *) override
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *) override
 
void mousePressEvent (QGraphicsSceneMouseEvent *) override
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *) override
 

Constructor & Destructor Documentation

◆ ClickDragReleaseItem()

Digikam::ClickDragReleaseItem::ClickDragReleaseItem ( QGraphicsItem *const  parent)
explicit

◆ ~ClickDragReleaseItem()

Digikam::ClickDragReleaseItem::~ClickDragReleaseItem ( )
override

Member Function Documentation

◆ boundingRect()

QRectF Digikam::ClickDragReleaseItem::boundingRect ( ) const
override

◆ cancelled

void Digikam::ClickDragReleaseItem::cancelled ( )
signal

◆ finished

void Digikam::ClickDragReleaseItem::finished ( const QRectF &  rect)
signal

Referenced by mouseReleaseEvent().

◆ hoverMoveEvent()

void Digikam::ClickDragReleaseItem::hoverMoveEvent ( QGraphicsSceneHoverEvent *  e)
overrideprotected

◆ keyPressEvent()

void Digikam::ClickDragReleaseItem::keyPressEvent ( QKeyEvent *  e)
overrideprotected

References cancelled().

◆ mouseDoubleClickEvent()

void Digikam::ClickDragReleaseItem::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  e)
overrideprotected

◆ mouseMoveEvent()

void Digikam::ClickDragReleaseItem::mouseMoveEvent ( QGraphicsSceneMouseEvent *  e)
overrideprotected

◆ mousePressEvent()

void Digikam::ClickDragReleaseItem::mousePressEvent ( QGraphicsSceneMouseEvent *  e)
overrideprotected

1) Press - Drag - Release: mousePress, PressedState -> mouseMoveEvent over threshold, PressDragState -> mouseReleaseEvent, finished 2) Click - Move - Click: mousePressEvent, PressedState -> mouseReleaseEvent, ClickedMoveState -> hoverMoveEvent -> mouseReleaseEvent, finished

References cancelled(), Digikam::HoverState, Digikam::PressedState, and started().

◆ mouseReleaseEvent()

void Digikam::ClickDragReleaseItem::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  e)
overrideprotected

◆ moving

void Digikam::ClickDragReleaseItem::moving ( const QRectF &  rect)
signal

Referenced by hoverMoveEvent(), and mouseMoveEvent().

◆ paint()

void Digikam::ClickDragReleaseItem::paint ( QPainter *  ,
const QStyleOptionGraphicsItem *  ,
QWidget *   
)
override

◆ started

void Digikam::ClickDragReleaseItem::started ( const QPointF &  pos)
signal

Signals are emitted at click, drag and release event. Reported positions are in scene coordinates. A drag is reported only if the mouse was moved a certain threshold. A release is reported after every press.

Referenced by mousePressEvent().


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