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
QTest::QTouchEventSequence Class Reference

#include <qtestsupport_gui.h>

+ Inheritance diagram for QTest::QTouchEventSequence:
+ Collaboration diagram for QTest::QTouchEventSequence:

Public Member Functions

virtual ~QTouchEventSequence ()
 
QTouchEventSequencepress (int touchId, const QPoint &pt, QWindow *window=nullptr)
 
QTouchEventSequencemove (int touchId, const QPoint &pt, QWindow *window=nullptr)
 
QTouchEventSequencerelease (int touchId, const QPoint &pt, QWindow *window=nullptr)
 
virtual QTouchEventSequencestationary (int touchId)
 
virtual bool commit (bool processEvents=true)
 

Protected Member Functions

 QTouchEventSequence (QWindow *window, QPointingDevice *aDevice, bool autoCommit)
 
QPoint mapToScreen (QWindow *window, const QPoint &pt)
 
QEventPointpoint (int touchId)
 
QEventPointpointOrPreviousPoint (int touchId)
 

Protected Attributes

QMap< int, QEventPointpreviousPoints
 
QMap< int, QEventPointpoints
 
QWindowtargetWindow
 
QPointingDevicedevice
 
bool commitWhenDestroyed
 

Friends

QTouchEventSequence touchEvent (QWindow *window, QPointingDevice *device, bool autoCommit)
 

Detailed Description

Definition at line 32 of file qtestsupport_gui.h.

Constructor & Destructor Documentation

◆ ~QTouchEventSequence()

QTest::QTouchEventSequence::~QTouchEventSequence ( )
virtual

Definition at line 89 of file qtestsupport_gui.cpp.

References commit(), and commitWhenDestroyed.

+ Here is the call graph for this function:

◆ QTouchEventSequence()

QTest::QTouchEventSequence::QTouchEventSequence ( QWindow * window,
QPointingDevice * aDevice,
bool autoCommit )
protected

Definition at line 137 of file qtestsupport_gui.cpp.

Member Function Documentation

◆ commit()

bool QTest::QTouchEventSequence::commit ( bool processEvents = true)
virtual

Reimplemented in QTest::QTouchEventWidgetSequence.

Definition at line 122 of file qtestsupport_gui.cpp.

References QMap< Key, T >::clear(), device, points, previousPoints, QCoreApplication::processEvents(), qt_handleTouchEventv2(), ret, QThread::sleep(), and targetWindow.

Referenced by ~QTouchEventSequence(), and QQuickTouchEventSequence::commit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mapToScreen()

QPoint QTest::QTouchEventSequence::mapToScreen ( QWindow * window,
const QPoint & pt )
protected

Definition at line 142 of file qtestsupport_gui.cpp.

References targetWindow, and window().

Referenced by move(), press(), and release().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ move()

QTouchEventSequence & QTest::QTouchEventSequence::move ( int touchId,
const QPoint & pt,
QWindow * window = nullptr )

Definition at line 101 of file qtestsupport_gui.cpp.

References mapToScreen(), point(), QEventPoint::Updated, and window().

Referenced by QQuickTouchEventSequence::move(), QQuickTest::pointerMove(), and processTouchEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ point()

◆ pointOrPreviousPoint()

QEventPoint & QTest::QTouchEventSequence::pointOrPreviousPoint ( int touchId)
protected

Definition at line 156 of file qtestsupport_gui.cpp.

References QMap< Key, T >::contains(), previousPoints, and QMap< Key, T >::value().

Referenced by stationary(), and QTest::QTouchEventWidgetSequence::stationary().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ press()

QTouchEventSequence & QTest::QTouchEventSequence::press ( int touchId,
const QPoint & pt,
QWindow * window = nullptr )

Definition at line 94 of file qtestsupport_gui.cpp.

References mapToScreen(), point(), QEventPoint::Pressed, and window().

Referenced by QQuickTest::pointerPress(), QQuickTouchEventSequence::press(), and processTouchEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ release()

QTouchEventSequence & QTest::QTouchEventSequence::release ( int touchId,
const QPoint & pt,
QWindow * window = nullptr )

Definition at line 108 of file qtestsupport_gui.cpp.

References mapToScreen(), point(), QEventPoint::Released, and window().

Referenced by QQuickTest::pointerRelease(), processTouchEvent(), and QQuickTouchEventSequence::release().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stationary()

QTouchEventSequence & QTest::QTouchEventSequence::stationary ( int touchId)
virtual

Reimplemented in QTest::QTouchEventWidgetSequence.

Definition at line 115 of file qtestsupport_gui.cpp.

References pointOrPreviousPoint(), and QEventPoint::Stationary.

Referenced by processTouchEvent(), and QQuickTouchEventSequence::stationary().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ touchEvent

QTouchEventSequence touchEvent ( QWindow * window,
QPointingDevice * device,
bool autoCommit = true )
friend

Definition at line 42 of file qtesttouch.h.

Member Data Documentation

◆ commitWhenDestroyed

bool QTest::QTouchEventSequence::commitWhenDestroyed
protected

◆ device

◆ points

◆ previousPoints

QMap<int, QEventPoint> QTest::QTouchEventSequence::previousPoints
protected

◆ targetWindow

QWindow* QTest::QTouchEventSequence::targetWindow
protected

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