Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQuickPressHandler Struct Reference

#include <qquickpresshandler_p_p.h>

+ Collaboration diagram for QQuickPressHandler:

Public Member Functions

void mousePressEvent (QMouseEvent *event)
 
void mouseMoveEvent (QMouseEvent *event)
 
void mouseReleaseEvent (QMouseEvent *event)
 
void timerEvent (QTimerEvent *event)
 
void clearDelayedMouseEvent ()
 
bool isActive ()
 

Static Public Member Functions

static bool isSignalConnected (QQuickItem *item, const char *signalName, int &signalIndex)
 

Public Attributes

QQuickItemcontrol = nullptr
 
QBasicTimer timer
 
QPointF pressPos
 
bool longPress = false
 
int pressAndHoldSignalIndex = -1
 
int pressedSignalIndex = -1
 
int releasedSignalIndex = -1
 
std::unique_ptr< QMouseEventdelayedMousePressEvent = nullptr
 

Detailed Description

Definition at line 30 of file qquickpresshandler_p_p.h.

Member Function Documentation

◆ clearDelayedMouseEvent()

void QQuickPressHandler::clearDelayedMouseEvent ( )

Definition at line 87 of file qquickpresshandler.cpp.

References delayedMousePressEvent.

Referenced by timerEvent().

+ Here is the caller graph for this function:

◆ isActive()

bool QQuickPressHandler::isActive ( )

Definition at line 92 of file qquickpresshandler.cpp.

References QBasicTimer::isActive(), longPress, and timer.

+ Here is the call graph for this function:

◆ isSignalConnected()

bool QQuickPressHandler::isSignalConnected ( QQuickItem * item,
const char * signalName,
int & signalIndex )
static

Definition at line 97 of file qquickpresshandler.cpp.

References item, Q_ASSERT, qFatal, and signalIndex.

Referenced by mousePressEvent(), mouseReleaseEvent(), and timerEvent().

+ Here is the caller graph for this function:

◆ mouseMoveEvent()

void QQuickPressHandler::mouseMoveEvent ( QMouseEvent * event)

Definition at line 40 of file qquickpresshandler.cpp.

References pressPos, qAbs(), QBasicTimer::stop(), QGuiApplication::styleHints(), timer, and QPointF::x().

+ Here is the call graph for this function:

◆ mousePressEvent()

QT_BEGIN_NAMESPACE void QQuickPressHandler::mousePressEvent ( QMouseEvent * event)

Definition at line 16 of file qquickpresshandler.cpp.

References args, control, delayedMousePressEvent, QMetaObject::InvokeMetaMethod, isSignalConnected(), Qt::LeftButton, longPress, QMetaObject::metacall(), pressedSignalIndex, pressPos, QQuickMouseEvent::reset(), QBasicTimer::start(), QBasicTimer::stop(), QGuiApplication::styleHints(), timer, QPointF::x(), and QPointF::y().

+ Here is the call graph for this function:

◆ mouseReleaseEvent()

void QQuickPressHandler::mouseReleaseEvent ( QMouseEvent * event)

Definition at line 46 of file qquickpresshandler.cpp.

References args, control, QMetaObject::InvokeMetaMethod, isSignalConnected(), longPress, QMetaObject::metacall(), pressPos, releasedSignalIndex, QQuickMouseEvent::reset(), QBasicTimer::stop(), timer, QPointF::x(), and QPointF::y().

+ Here is the call graph for this function:

◆ timerEvent()

void QQuickPressHandler::timerEvent ( QTimerEvent * event)

Definition at line 64 of file qquickpresshandler.cpp.

References args, clearDelayedMouseEvent(), control, QMetaObject::InvokeMetaMethod, isSignalConnected(), QGuiApplication::keyboardModifiers(), Qt::LeftButton, longPress, QMetaObject::metacall(), pressAndHoldSignalIndex, pressPos, QT_WARNING_DISABLE_DEPRECATED, QT_WARNING_POP, QT_WARNING_PUSH, QBasicTimer::stop(), timer, QPointF::x(), and QPointF::y().

+ Here is the call graph for this function:

Member Data Documentation

◆ control

QQuickItem* QQuickPressHandler::control = nullptr

Definition at line 42 of file qquickpresshandler_p_p.h.

Referenced by mousePressEvent(), mouseReleaseEvent(), and timerEvent().

◆ delayedMousePressEvent

std::unique_ptr<QMouseEvent> QQuickPressHandler::delayedMousePressEvent = nullptr

Definition at line 49 of file qquickpresshandler_p_p.h.

Referenced by clearDelayedMouseEvent(), and mousePressEvent().

◆ longPress

bool QQuickPressHandler::longPress = false

Definition at line 45 of file qquickpresshandler_p_p.h.

Referenced by isActive(), mousePressEvent(), mouseReleaseEvent(), and timerEvent().

◆ pressAndHoldSignalIndex

int QQuickPressHandler::pressAndHoldSignalIndex = -1

Definition at line 46 of file qquickpresshandler_p_p.h.

Referenced by timerEvent().

◆ pressedSignalIndex

int QQuickPressHandler::pressedSignalIndex = -1

Definition at line 47 of file qquickpresshandler_p_p.h.

Referenced by mousePressEvent().

◆ pressPos

QPointF QQuickPressHandler::pressPos

◆ releasedSignalIndex

int QQuickPressHandler::releasedSignalIndex = -1

Definition at line 48 of file qquickpresshandler_p_p.h.

Referenced by mouseReleaseEvent().

◆ timer

QBasicTimer QQuickPressHandler::timer

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