diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2009-10-12 12:11:44 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2009-10-13 12:15:35 (GMT) |
commit | b6b6da647132f7fdf78d0601cbf7b411fda474f0 (patch) | |
tree | 42c6eddc023420111a4c080ad94d77172e24567a /src/gui/kernel/qgesturemanager.cpp | |
parent | 8d9acba3ecac466fa86201e4eb760af1ccea68e3 (diff) | |
download | Qt-b6b6da647132f7fdf78d0601cbf7b411fda474f0.zip Qt-b6b6da647132f7fdf78d0601cbf7b411fda474f0.tar.gz Qt-b6b6da647132f7fdf78d0601cbf7b411fda474f0.tar.bz2 |
Mac: implement gestures conforming to the new API
Diffstat (limited to 'src/gui/kernel/qgesturemanager.cpp')
-rw-r--r-- | src/gui/kernel/qgesturemanager.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp index b0ef703..0f0aef2 100644 --- a/src/gui/kernel/qgesturemanager.cpp +++ b/src/gui/kernel/qgesturemanager.cpp @@ -48,6 +48,10 @@ #include "qevent.h" #include "qgraphicsitem.h" +#ifdef Q_WS_MAC +#include "qmacgesturerecognizer_mac_p.h" +#endif + #include "qdebug.h" // #define GESTURE_DEBUG @@ -64,7 +68,15 @@ QGestureManager::QGestureManager(QObject *parent) { qRegisterMetaType<Qt::GestureState>(); +#if defined(Q_WS_MAC) + registerGestureRecognizer(new QMacSwipeGestureRecognizer); + registerGestureRecognizer(new QMacPinchGestureRecognizer); + #if defined(QT_MAC_USE_COCOA) + registerGestureRecognizer(new QMacPanGestureRecognizer); + #endif +#else registerGestureRecognizer(new QPanGestureRecognizer); +#endif } QGestureManager::~QGestureManager() |