summaryrefslogtreecommitdiffstats
path: root/src/quicktestlib/quicktestevent_p.h
diff options
context:
space:
mode:
authorMatt Vogt <matthew.vogt@jollamobile.com>2012-12-31 16:27:43 +1000
committerRobin Burchell <robin+qt@viroteck.net>2013-01-08 05:56:25 +0100
commit27697b3819d1b33bec6e32ba53a7e83fc25a66ec (patch)
treeec042ed34ed74ab57deedbb2e1e1060a1f19d5a3 /src/quicktestlib/quicktestevent_p.h
parentd39a1865be268c58f7e47dfd9ccb47a53013fdd4 (diff)
Generate real mouse events on mouseMove
Actual mouseMove events are necessary to properly simulate the behavior of complex components such as Flickable. Instead of just manipulating the cursor position, record the current button state so that we can generate move events that are not suppressed. In addition, add a mouseStartDrag() convenience function so that client code does not need to be aware of QML's interpretation of the drag threshold value. Change-Id: I1ded27f976846660a0ec91906d0b2a6372efccd5 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/quicktestlib/quicktestevent_p.h')
-rw-r--r--src/quicktestlib/quicktestevent_p.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/quicktestlib/quicktestevent_p.h b/src/quicktestlib/quicktestevent_p.h
index 1f5926f..e11f921 100644
--- a/src/quicktestlib/quicktestevent_p.h
+++ b/src/quicktestlib/quicktestevent_p.h
@@ -50,10 +50,13 @@ QT_BEGIN_NAMESPACE
class Q_QUICK_TEST_EXPORT QuickTestEvent : public QObject
{
Q_OBJECT
+ Q_PROPERTY(int startDragDistance READ startDragDistance)
public:
QuickTestEvent(QObject *parent = 0);
~QuickTestEvent();
+ static int startDragDistance();
+
public Q_SLOTS:
bool keyPress(int key, int modifiers, int delay);
bool keyRelease(int key, int modifiers, int delay);
@@ -67,7 +70,7 @@ public Q_SLOTS:
int modifiers, int delay);
bool mouseDoubleClick(QObject *item, qreal x, qreal y, int button,
int modifiers, int delay);
- bool mouseMove(QObject *item, qreal x, qreal y, int delay);
+ bool mouseMove(QObject *item, qreal x, qreal y, int delay, int buttons);
private:
QWidget *eventWidget();