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/qsimulatorrecognizer.h | |
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/qsimulatorrecognizer.h')
-rw-r--r-- | src/plugins/sensorgestures/simulator/qsimulatorrecognizer.h | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/src/plugins/sensorgestures/simulator/qsimulatorrecognizer.h b/src/plugins/sensorgestures/simulator/qsimulatorrecognizer.h new file mode 100644 index 00000000..2c62ffc0 --- /dev/null +++ b/src/plugins/sensorgestures/simulator/qsimulatorrecognizer.h @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ + +#ifndef QSIMULATORRECOGNIZER_H +#define QSIMULATORRECOGNIZER_H + +#include <QDebug> +#include <QTimer> + +#include <qsensorgesturerecognizer.h> + +class QSimulatorSensorGestureRecognizer : public QSensorGestureRecognizer +{ + Q_OBJECT + +public: + + QSimulatorSensorGestureRecognizer(QObject *parent = 0); + ~QSimulatorSensorGestureRecognizer(); + + void create(); + + QString id() const; + bool start(); + bool stop(); + bool isActive(); + +Q_SIGNALS: + void simulator(); + +private slots: + void timeout(); + void sensorGestureDetected(); +private: + bool detectingState; + QTimer *timer; + +}; + +#endif // QSHAKERECOGNIZER_H |