src/gui/kernel/qgesturemanager.cpp
branchRCL_3
changeset 4 3b1da2848fc7
parent 3 41300fa6a67c
child 7 3f74d0d4af4c
equal deleted inserted replaced
3:41300fa6a67c 4:3b1da2848fc7
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     8 **
     8 **
    64 #else
    64 #else
    65 # define DEBUG qDebug
    65 # define DEBUG qDebug
    66 #endif
    66 #endif
    67 
    67 
    68 QT_BEGIN_NAMESPACE
    68 QT_BEGIN_NAMESPACE
    69 
       
    70 QGestureManager *qt_gestureManager = 0;
       
    71 
       
    72 QGestureManager* QGestureManager::instance()
       
    73 {
       
    74     if (!qt_gestureManager)
       
    75         qt_gestureManager = new QGestureManager(qApp);
       
    76     return qt_gestureManager;
       
    77 }
       
    78 
    69 
    79 QGestureManager::QGestureManager(QObject *parent)
    70 QGestureManager::QGestureManager(QObject *parent)
    80     : QObject(parent), state(NotGesture), m_lastCustomGestureId(0)
    71     : QObject(parent), state(NotGesture), m_lastCustomGestureId(0)
    81 {
    72 {
    82     qRegisterMetaType<Qt::GestureState>();
    73     qRegisterMetaType<Qt::GestureState>();