Qt 4.8
|
The QTouchEventSequence class is used to simulate a sequence of touch events. More...
#include <qtesttouch.h>
Public Functions | |
QTouchEventSequence & | move (int touchId, const QPoint &pt, QWidget *widget=0) |
Adds a move event for touchpoint touchId at position pt to this sequence and returns a reference to this QTouchEventSequence. More... | |
QTouchEventSequence & | press (int touchId, const QPoint &pt, QWidget *widget=0) |
Adds a press event for touchpoint touchId at position pt to this sequence and returns a reference to this QTouchEventSequence. More... | |
QTouchEventSequence & | release (int touchId, const QPoint &pt, QWidget *widget=0) |
Adds a release event for touchpoint touchId at position pt to this sequence and returns a reference to this QTouchEventSequence. More... | |
QTouchEventSequence & | stationary (int touchId) |
Adds a stationary event for touchpoint touchId to this sequence and returns a reference to this QTouchEventSequence. More... | |
~QTouchEventSequence () | |
Commits this sequence of touch events and frees allocated resources. More... | |
Private Functions | |
void | commit () |
QPoint | mapToScreen (QWidget *widget, const QPoint &pt) |
void | operator= (const QTouchEventSequence &) |
QTouchEvent::TouchPoint & | point (int touchId) |
QTouchEventSequence (QWidget *widget, QTouchEvent::DeviceType aDeviceType) | |
QTouchEventSequence (const QTouchEventSequence &v) | |
Properties | |
QTouchEvent::DeviceType | deviceType |
QMap< int, QTouchEvent::TouchPoint > | points |
QWidget * | targetWidget |
Friends | |
QTouchEventSequence | touchEvent (QWidget *, QTouchEvent::DeviceType) |
The QTouchEventSequence class is used to simulate a sequence of touch events.
To simulate a sequence of touch events on a specific device for a widget, call QTest::touchEvent to create a QTouchEventSequence instance. Add touch events to the sequence by calling press(), move(), release() and stationary(), and let the instance run out of scope to commit the sequence to the event system.
Example:
Definition at line 72 of file qtesttouch.h.
|
inline |
Commits this sequence of touch events and frees allocated resources.
Definition at line 75 of file qtesttouch.h.
|
inlineprivate |
Definition at line 109 of file qtesttouch.h.
Referenced by QTest::touchEvent().
|
private |
|
inlineprivate |
Definition at line 128 of file qtesttouch.h.
Referenced by ~QTouchEventSequence().
|
inlineprivate |
Definition at line 122 of file qtesttouch.h.
Referenced by move(), press(), and release().
|
inline |
Adds a move event for touchpoint touchId at position pt to this sequence and returns a reference to this QTouchEventSequence.
The position pt is interpreted as relative to widget. If widget is the null pointer, then pt is interpreted as relative to the widget provided when instantiating this QTouchEventSequence.
Simulates that the user moved the finger identified by touchId.
Definition at line 87 of file qtesttouch.h.
|
private |
Referenced by QTouchEventSequence().
|
inlineprivate |
Definition at line 116 of file qtesttouch.h.
Referenced by move(), press(), release(), and stationary().
|
inline |
Adds a press event for touchpoint touchId at position pt to this sequence and returns a reference to this QTouchEventSequence.
The position pt is interpreted as relative to widget. If widget is the null pointer, then pt is interpreted as relative to the widget provided when instantiating this QTouchEventSequence.
Simulates that the user pressed the touch screen or pad with the finger identified by touchId.
Definition at line 80 of file qtesttouch.h.
|
inline |
Adds a release event for touchpoint touchId at position pt to this sequence and returns a reference to this QTouchEventSequence.
The position pt is interpreted as relative to widget. If widget is the null pointer, then pt is interpreted as relative to the widget provided when instantiating this QTouchEventSequence.
Simulates that the user lifted the finger identified by touchId.
Definition at line 94 of file qtesttouch.h.
|
inline |
Adds a stationary event for touchpoint touchId to this sequence and returns a reference to this QTouchEventSequence.
Simulates that the user did not move the finger identified by touchId.
Definition at line 101 of file qtesttouch.h.
|
friend |
Definition at line 141 of file qtesttouch.h.
|
private |
Definition at line 136 of file qtesttouch.h.
Referenced by commit(), and QTest::touchEvent().
|
private |
Definition at line 134 of file qtesttouch.h.
Referenced by commit(), point(), and ~QTouchEventSequence().
|
private |
Definition at line 135 of file qtesttouch.h.
Referenced by commit(), and mapToScreen().