diff options
author | Lorn Potter <lorn.potter@nokia.com> | 2012-05-17 09:25:54 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-17 02:04:00 +0200 |
commit | 4575c1fda70f8b8e1ac4959ad9386964cb9a6222 (patch) | |
tree | cea894cecd8b0bd09c0c2c9b2a8d4d8042fd117f /src/sensors/gestures/simulatorgesturescommon.cpp | |
parent | 6062bd6530304220c252195b96d46f4b4f76e0a4 (diff) |
send only signals being started. Avoids developer confusion.
Change-Id: I7f49f14d0546a2a59a26777c6f8fa083ec29e0ba
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Diffstat (limited to 'src/sensors/gestures/simulatorgesturescommon.cpp')
-rw-r--r-- | src/sensors/gestures/simulatorgesturescommon.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/sensors/gestures/simulatorgesturescommon.cpp b/src/sensors/gestures/simulatorgesturescommon.cpp index 2578e459..4c2adb51 100644 --- a/src/sensors/gestures/simulatorgesturescommon.cpp +++ b/src/sensors/gestures/simulatorgesturescommon.cpp @@ -70,6 +70,7 @@ SensorGesturesConnection::SensorGesturesConnection(QObject *parent) SensorGesturesConnection::~SensorGesturesConnection() { + mWorker->call("setSensorGestures", QStringList()); delete mWorker; } @@ -91,6 +92,7 @@ void SensorGesturesConnection::newSensorGestureDetected() void SensorGesturesConnection::newSensorGestures(const QStringList &gestures) { if (!mWorker) return; + Q_FOREACH (const QString &gest, gestures) { if (!gest.contains(QLatin1String("detected"))) { QString tmp = gest.left(gest.length()-2); @@ -102,6 +104,17 @@ void SensorGesturesConnection::newSensorGestures(const QStringList &gestures) mWorker->call("setSensorGestures", allGestures); } +void SensorGesturesConnection::removeSensorGestures(const QStringList &gestures) +{ + Q_FOREACH (const QString &gest, gestures) { + QString tmp = gest.left(gest.length()-2); + if (allGestures.contains(tmp)) { + allGestures.removeOne(tmp); + } + } + mWorker->call("setSensorGestures", allGestures); +} + QString get_qtSensorGestureData() { return *qtSensorGestureData(); |