src/gui/kernel/qgesture.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
child 37 758a864f9613
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    39 **
    39 **
    40 ****************************************************************************/
    40 ****************************************************************************/
    41 
    41 
    42 #include "qgesture.h"
    42 #include "qgesture.h"
    43 #include "private/qgesture_p.h"
    43 #include "private/qgesture_p.h"
       
    44 #include "private/qstandardgestures_p.h"
       
    45 
       
    46 #ifndef QT_NO_GESTURES
    44 
    47 
    45 QT_BEGIN_NAMESPACE
    48 QT_BEGIN_NAMESPACE
    46 
    49 
    47  /*!
    50  /*!
    48     \class QGesture
    51     \class QGesture
   722 void QTapAndHoldGesture::setPosition(const QPointF &value)
   725 void QTapAndHoldGesture::setPosition(const QPointF &value)
   723 {
   726 {
   724     d_func()->position = value;
   727     d_func()->position = value;
   725 }
   728 }
   726 
   729 
       
   730 /*!
       
   731     Set the timeout, in milliseconds, before the gesture triggers.
       
   732 
       
   733     The recognizer will detect a touch down and and if \a msecs
       
   734     later the touch is still down, it will trigger the QTapAndHoldGesture.
       
   735     The default value is 700 milliseconds.
       
   736 */
       
   737 // static
       
   738 void QTapAndHoldGesture::setTimeout(int msecs)
       
   739 {
       
   740     QTapAndHoldGesturePrivate::Timeout = msecs;
       
   741 }
       
   742 
       
   743 /*!
       
   744     Gets the timeout, in milliseconds, before the gesture triggers.
       
   745 
       
   746     The recognizer will detect a touch down and and if timeout()
       
   747     later the touch is still down, it will trigger the QTapAndHoldGesture.
       
   748     The default value is 700 milliseconds.
       
   749 */
       
   750 // static
       
   751 int QTapAndHoldGesture::timeout()
       
   752 {
       
   753     return QTapAndHoldGesturePrivate::Timeout;
       
   754 }
       
   755 
       
   756 int QTapAndHoldGesturePrivate::Timeout = 700; // in ms
       
   757 
   727 QT_END_NAMESPACE
   758 QT_END_NAMESPACE
       
   759 
       
   760 #endif // QT_NO_GESTURES