summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qgesture.cpp
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2010-07-17 23:31:36 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2010-07-17 23:31:36 (GMT)
commit8d545a21b6aa89675b404a9d7bf08b7499d26e5e (patch)
tree761c900e05538a337517435d5337392f7fc8931d /src/gui/kernel/qgesture.cpp
parent571b85896ee3663479b4a10d2418e2e19b3639f3 (diff)
parentd61c74faef2ed787aacc53c03b8361fa57bccc8e (diff)
downloadQt-8d545a21b6aa89675b404a9d7bf08b7499d26e5e.zip
Qt-8d545a21b6aa89675b404a9d7bf08b7499d26e5e.tar.gz
Qt-8d545a21b6aa89675b404a9d7bf08b7499d26e5e.tar.bz2
Merge remote branch 'origin/4.7' into 4.7-from-4.6
Conflicts: tests/auto/qtexttable/tst_qtexttable.cpp
Diffstat (limited to 'src/gui/kernel/qgesture.cpp')
-rw-r--r--src/gui/kernel/qgesture.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp
index f5688f4..6359ecf 100644
--- a/src/gui/kernel/qgesture.cpp
+++ b/src/gui/kernel/qgesture.cpp
@@ -41,6 +41,7 @@
#include "qgesture.h"
#include "private/qgesture_p.h"
+#include "private/qstandardgestures_p.h"
#ifndef QT_NO_GESTURES
@@ -726,6 +727,34 @@ void QTapAndHoldGesture::setPosition(const QPointF &value)
d_func()->position = value;
}
+/*!
+ Set the timeout, in milliseconds, before the gesture triggers.
+
+ The recognizer will detect a touch down and and if \a msecs
+ later the touch is still down, it will trigger the QTapAndHoldGesture.
+ The default value is 700 milliseconds.
+*/
+// static
+void QTapAndHoldGesture::setTimeout(int msecs)
+{
+ QTapAndHoldGesturePrivate::Timeout = msecs;
+}
+
+/*!
+ Gets the timeout, in milliseconds, before the gesture triggers.
+
+ The recognizer will detect a touch down and and if timeout()
+ later the touch is still down, it will trigger the QTapAndHoldGesture.
+ The default value is 700 milliseconds.
+*/
+// static
+int QTapAndHoldGesture::timeout()
+{
+ return QTapAndHoldGesturePrivate::Timeout;
+}
+
+int QTapAndHoldGesturePrivate::Timeout = 700; // in ms
+
QT_END_NAMESPACE
#endif // QT_NO_GESTURES