diff -r 5dc02b23752f -r 3e2da88830cd src/gui/kernel/qgesture.cpp --- a/src/gui/kernel/qgesture.cpp Tue Jul 06 15:10:48 2010 +0300 +++ b/src/gui/kernel/qgesture.cpp Wed Aug 18 10:37:55 2010 +0300 @@ -41,6 +41,9 @@ #include "qgesture.h" #include "private/qgesture_p.h" +#include "private/qstandardgestures_p.h" + +#ifndef QT_NO_GESTURES QT_BEGIN_NAMESPACE @@ -724,4 +727,34 @@ 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