1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QTESTTOUCH_H |
5 | #define QTESTTOUCH_H |
6 | |
7 | #if 0 |
8 | // inform syncqt |
9 | #pragma qt_no_master_include |
10 | #endif |
11 | |
12 | #include <QtTest/qttestglobal.h> |
13 | #include <QtTest/qtestassert.h> |
14 | #include <QtTest/qtestsystem.h> |
15 | #include <QtTest/qtestspontaneevent.h> |
16 | #include <QtCore/qmap.h> |
17 | #include <QtGui/qevent.h> |
18 | #include <QtGui/qpointingdevice.h> |
19 | #include <QtGui/qwindow.h> |
20 | #include <QtGui/qpointingdevice.h> |
21 | #ifdef QT_WIDGETS_LIB |
22 | #include <QtWidgets/qwidget.h> |
23 | #include <QtWidgets/qtestsupport_widgets.h> |
24 | #else |
25 | #include <QtGui/qtestsupport_gui.h> |
26 | #endif |
27 | |
28 | QT_BEGIN_NAMESPACE |
29 | |
30 | namespace QTest |
31 | { |
32 | #if defined(QT_WIDGETS_LIB) || defined(Q_QDOC) |
33 | inline |
34 | QTouchEventWidgetSequence touchEvent(QWidget *widget, |
35 | QPointingDevice *device, |
36 | bool autoCommit = true) |
37 | { |
38 | return QTouchEventWidgetSequence(widget, device, autoCommit); |
39 | } |
40 | #endif |
41 | inline |
42 | QTouchEventSequence touchEvent(QWindow *window, |
43 | QPointingDevice *device, |
44 | bool autoCommit = true) |
45 | { |
46 | return QTouchEventSequence(window, device, autoCommit); |
47 | } |
48 | |
49 | } |
50 | |
51 | QT_END_NAMESPACE |
52 | |
53 | #endif // QTESTTOUCH_H |
54 | |