45 #pragma qt_no_master_include
48 #include <QtTest/qttestglobal.h>
49 #include <QtTest/qtestassert.h>
50 #include <QtTest/qtestsystem.h>
51 #include <QtTest/qtestspontaneevent.h>
52 #include <QtCore/qpoint.h>
53 #include <QtCore/qstring.h>
54 #include <QtCore/qpointer.h>
55 #include <QtGui/qevent.h>
56 #include <QtGui/qwindow.h>
59 #include <QtWidgets/qapplication.h>
60 #include <QtWidgets/qwidget.h>
63 #include <QtCore/QDebug>
85 static const int mouseDoubleClickInterval = 500;
98 Qt::KeyboardModifiers stateKey,
QPoint pos,
int delay=-1)
106 qWarning(
"Mouse event at %d, %d occurs outside target window (%dx%d).",
156 qApp->processEvents();
160 Qt::KeyboardModifiers stateKey = Qt::KeyboardModifiers(),
161 QPoint
pos = QPoint(),
int delay=-1)
164 Qt::KeyboardModifiers stateKey = Qt::KeyboardModifiers(),
165 QPoint
pos = QPoint(),
int delay=-1)
168 Qt::KeyboardModifiers stateKey = Qt::KeyboardModifiers(),
169 QPoint
pos = QPoint(),
int delay=-1)
172 Qt::KeyboardModifiers stateKey = Qt::KeyboardModifiers(),
173 QPoint
pos = QPoint(),
int delay=-1)
178 #ifdef QT_WIDGETS_LIB
180 Qt::KeyboardModifiers stateKey, QPoint
pos,
int delay=-1)
187 #ifdef QTEST_QPA_MOUSE_HANDLING
230 qApp->processEvents();
245 static const char *
const mouseActionNames[] =
246 {
"MousePress",
"MouseRelease",
"MouseClick",
"MouseDClick",
"MouseMove" };
247 qWarning(
"Mouse event \"%s\" not accepted by receiving widget",
248 mouseActionNames[
static_cast<int>(
action)]);
254 Qt::KeyboardModifiers stateKey = Qt::KeyboardModifiers(),
255 QPoint
pos = QPoint(),
int delay=-1)
258 Qt::KeyboardModifiers stateKey = Qt::KeyboardModifiers(),
259 QPoint
pos = QPoint(),
int delay=-1)
262 Qt::KeyboardModifiers stateKey = Qt::KeyboardModifiers(),
263 QPoint
pos = QPoint(),
int delay=-1)
266 Qt::KeyboardModifiers stateKey = Qt::KeyboardModifiers(),
267 QPoint
pos = QPoint(),
int delay=-1)
static void setPos(int x, int y)
The QMouseEvent class contains parameters that describe a mouse event.
The QPointF class defines a point in the plane using floating point precision.
The QPoint class defines a point in the plane using integer precision.
static const QPointingDevice * primaryPointingDevice(const QString &seatName=QString())
The QSize class defines the size of a two-dimensional object using integer point precision.
static void setSpontaneous(QEvent *ev)
The QWindow class represents a window in the underlying windowing system.
Q_TESTLIB_EXPORT int lastMouseTimestamp
int Q_TESTLIB_EXPORT defaultMouseDelay()
void mouseMove(QWindow *window, QPoint pos=QPoint(), int delay=-1)
void mouseDClick(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey=Qt::KeyboardModifiers(), QPoint pos=QPoint(), int delay=-1)
void mouseRelease(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey=Qt::KeyboardModifiers(), QPoint pos=QPoint(), int delay=-1)
void mouseClick(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey=Qt::KeyboardModifiers(), QPoint pos=QPoint(), int delay=-1)
void mousePress(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey=Qt::KeyboardModifiers(), QPoint pos=QPoint(), int delay=-1)
Q_TESTLIB_EXPORT Qt::MouseButtons qtestMouseButtons
GLfloat GLfloat GLfloat w
[0]
#define QTEST_ASSERT(cond)
QT_BEGIN_NAMESPACE Q_GUI_EXPORT void qt_handleMouseEvent(QWindow *window, const QPointF &local, const QPointF &global, Qt::MouseButtons state, Qt::MouseButton button, QEvent::Type type, Qt::KeyboardModifiers mods, int timestamp)