diff options
author | Lorn Potter <lorn.potter@nokia.com> | 2011-11-23 13:49:15 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-08 06:20:47 +0100 |
commit | 2a345c6af2201d02b5685187f9db0911969bbf2e (patch) | |
tree | 71d3c41b7216a415936cab896e932717945d8ca6 /src/plugins/sensorgestures/simulator/qsimulatorsensorgestureplugin.cpp | |
parent | 19cd6c6744c5886da37de83b79b58ee3059e5998 (diff) |
add simulator plugin for sensorgestures.
Change-Id: I7ec82ef7ee7795f6d8528f9ebd9d70b80435b7ea
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Diffstat (limited to 'src/plugins/sensorgestures/simulator/qsimulatorsensorgestureplugin.cpp')
-rw-r--r-- | src/plugins/sensorgestures/simulator/qsimulatorsensorgestureplugin.cpp | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/src/plugins/sensorgestures/simulator/qsimulatorsensorgestureplugin.cpp b/src/plugins/sensorgestures/simulator/qsimulatorsensorgestureplugin.cpp new file mode 100644 index 00000000..285079e3 --- /dev/null +++ b/src/plugins/sensorgestures/simulator/qsimulatorsensorgestureplugin.cpp @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtSensors module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtPlugin> +#include <QStringList> +#include <QObject> + +#include "qsimulatorsensorgestureplugin.h" + +#include <qsensorgestureplugininterface.h> +#include <qsensorgesturemanager.h> + +#include "qsimulatorrecognizer.h" + + +QSimulatorSensorGesturePlugin::QSimulatorSensorGesturePlugin() +{ +} + +QSimulatorSensorGesturePlugin::~QSimulatorSensorGesturePlugin() +{ +} + +QStringList QSimulatorSensorGesturePlugin::supportedIds() const +{ + QStringList list; + list << "shake"; + return list; +} + +QList <QSensorGestureRecognizer *> QSimulatorSensorGesturePlugin::createRecognizers() +{ + QList <QSensorGestureRecognizer *> recognizers; + + QSensorGestureRecognizer *sRec = new QSimulatorSensorGestureRecognizer(this); + recognizers.append(sRec); + + return recognizers; +} + +Q_EXPORT_PLUGIN2(QSimulatorSensorGestureRecognizer, QSimulatorSensorGesturePlugin) + |