![]() |
Qt 6.x
The Qt SDK
|
#include <qquickpresshandler_p_p.h>
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 | |
QQuickItem * | control = nullptr |
QBasicTimer | timer |
QPointF | pressPos |
bool | longPress = false |
int | pressAndHoldSignalIndex = -1 |
int | pressedSignalIndex = -1 |
int | releasedSignalIndex = -1 |
std::unique_ptr< QMouseEvent > | delayedMousePressEvent = nullptr |
Definition at line 30 of file qquickpresshandler_p_p.h.
void QQuickPressHandler::clearDelayedMouseEvent | ( | ) |
Definition at line 87 of file qquickpresshandler.cpp.
References delayedMousePressEvent.
Referenced by timerEvent().
bool QQuickPressHandler::isActive | ( | ) |
Definition at line 92 of file qquickpresshandler.cpp.
References QBasicTimer::isActive(), longPress, and timer.
|
static |
Definition at line 97 of file qquickpresshandler.cpp.
References item, Q_ASSERT, qFatal, and signalIndex.
Referenced by mousePressEvent(), mouseReleaseEvent(), and timerEvent().
void QQuickPressHandler::mouseMoveEvent | ( | QMouseEvent * | event | ) |
Definition at line 40 of file qquickpresshandler.cpp.
References pressPos, qAbs(), QStyleHints::startDragDistance, QBasicTimer::stop(), QGuiApplication::styleHints(), timer, and QPointF::x().
QT_BEGIN_NAMESPACE void QQuickPressHandler::mousePressEvent | ( | QMouseEvent * | event | ) |
Definition at line 16 of file qquickpresshandler.cpp.
References args, control, delayedMousePressEvent, QMetaObject::InvokeMetaMethod, QQuickMouseEvent::isAccepted(), isSignalConnected(), Qt::LeftButton, longPress, QMetaObject::metacall(), pressedSignalIndex, pressPos, QQuickMouseEvent::reset(), QQuickMouseEvent::setAccepted(), QBasicTimer::start(), QBasicTimer::stop(), QGuiApplication::styleHints(), timer, QPointF::x(), and QPointF::y().
void QQuickPressHandler::mouseReleaseEvent | ( | QMouseEvent * | event | ) |
Definition at line 46 of file qquickpresshandler.cpp.
References args, control, QMetaObject::InvokeMetaMethod, QQuickMouseEvent::isAccepted(), isSignalConnected(), longPress, QMetaObject::metacall(), pressPos, releasedSignalIndex, QQuickMouseEvent::reset(), QQuickMouseEvent::setAccepted(), QBasicTimer::stop(), timer, QPointF::x(), and QPointF::y().
void QQuickPressHandler::timerEvent | ( | QTimerEvent * | event | ) |
Definition at line 64 of file qquickpresshandler.cpp.
References args, clearDelayedMouseEvent(), control, QMetaObject::InvokeMetaMethod, QQuickMouseEvent::isAccepted(), isSignalConnected(), QGuiApplication::keyboardModifiers(), Qt::LeftButton, longPress, QMetaObject::metacall(), pressAndHoldSignalIndex, pressPos, QT_WARNING_DISABLE_DEPRECATED, QT_WARNING_POP, QT_WARNING_PUSH, QQuickMouseEvent::reset(), QQuickMouseEvent::setAccepted(), QBasicTimer::stop(), timer, QPointF::x(), and QPointF::y().
QQuickItem* QQuickPressHandler::control = nullptr |
Definition at line 42 of file qquickpresshandler_p_p.h.
Referenced by mousePressEvent(), mouseReleaseEvent(), and timerEvent().
std::unique_ptr<QMouseEvent> QQuickPressHandler::delayedMousePressEvent = nullptr |
Definition at line 49 of file qquickpresshandler_p_p.h.
Referenced by clearDelayedMouseEvent(), and mousePressEvent().
bool QQuickPressHandler::longPress = false |
Definition at line 45 of file qquickpresshandler_p_p.h.
Referenced by isActive(), mousePressEvent(), mouseReleaseEvent(), and timerEvent().
int QQuickPressHandler::pressAndHoldSignalIndex = -1 |
Definition at line 46 of file qquickpresshandler_p_p.h.
Referenced by timerEvent().
int QQuickPressHandler::pressedSignalIndex = -1 |
Definition at line 47 of file qquickpresshandler_p_p.h.
Referenced by mousePressEvent().
QPointF QQuickPressHandler::pressPos |
Definition at line 44 of file qquickpresshandler_p_p.h.
Referenced by mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and timerEvent().
int QQuickPressHandler::releasedSignalIndex = -1 |
Definition at line 48 of file qquickpresshandler_p_p.h.
Referenced by mouseReleaseEvent().
QBasicTimer QQuickPressHandler::timer |
Definition at line 43 of file qquickpresshandler_p_p.h.
Referenced by isActive(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and timerEvent().