summaryrefslogtreecommitdiffstats
path: root/examples/sensors/qmlsensorgestures
diff options
context:
space:
mode:
authorWolfgang Beck <wolfgang.beck@nokia.com>2012-05-17 12:27:18 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-24 03:06:56 +0200
commit17d908ba5205513e9ed0be33aebeb3736bda0326 (patch)
treeda04213540ee61853aab6b4260721f1badd703b2 /examples/sensors/qmlsensorgestures
parent32e2d98ea438041e7e0c4df7e67053c5ee7527a7 (diff)
Unfork the examples.
Some examples were forked off and updated. Unfork by bringing these changes back (a later update will bring the other examples in line with this new style). The changes are primarily made up of file renaming. Also, JPG files have been converted to PNG. Some documentation updates have been done. Change-Id: Ib090abb5ebea2003d479d2336a23317f52b8c4d8 Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Diffstat (limited to 'examples/sensors/qmlsensorgestures')
-rw-r--r--examples/sensors/qmlsensorgestures/plugin/plugin.json1
-rw-r--r--examples/sensors/qmlsensorgestures/plugin/plugin.pro21
-rw-r--r--examples/sensors/qmlsensorgestures/plugin/qcountergestureplugin.cpp75
-rw-r--r--examples/sensors/qmlsensorgestures/plugin/qcountergestureplugin.h66
-rw-r--r--examples/sensors/qmlsensorgestures/plugin/qcounterrecognizer.cpp89
-rw-r--r--examples/sensors/qmlsensorgestures/plugin/qcounterrecognizer.h70
-rw-r--r--examples/sensors/qmlsensorgestures/qml_app/Button.qml129
-rw-r--r--examples/sensors/qmlsensorgestures/qml_app/Gesture.qml115
-rw-r--r--examples/sensors/qmlsensorgestures/qml_app/GestureList.qml132
-rw-r--r--examples/sensors/qmlsensorgestures/qml_app/GestureView.qml153
-rw-r--r--examples/sensors/qmlsensorgestures/qml_app/GesturesView.qml156
-rw-r--r--examples/sensors/qmlsensorgestures/qml_app/icon.pngbin2298 -> 0 bytes
-rw-r--r--examples/sensors/qmlsensorgestures/qml_app/info.json14
-rw-r--r--examples/sensors/qmlsensorgestures/qml_app/qml_app.pro18
-rw-r--r--examples/sensors/qmlsensorgestures/qmlsensorgestures.pro5
15 files changed, 0 insertions, 1044 deletions
diff --git a/examples/sensors/qmlsensorgestures/plugin/plugin.json b/examples/sensors/qmlsensorgestures/plugin/plugin.json
deleted file mode 100644
index 8a55b3ae..00000000
--- a/examples/sensors/qmlsensorgestures/plugin/plugin.json
+++ /dev/null
@@ -1 +0,0 @@
-{ "Keys": [ "notused" ] }
diff --git a/examples/sensors/qmlsensorgestures/plugin/plugin.pro b/examples/sensors/qmlsensorgestures/plugin/plugin.pro
deleted file mode 100644
index 2003e910..00000000
--- a/examples/sensors/qmlsensorgestures/plugin/plugin.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-TEMPLATE = lib
-CONFIG += plugin
-
-TARGET = qtsensorgestures_counterplugin
-
-QT += sensors
-DESTDIR = $$QT.sensors.plugins/sensorgestures
-
-HEADERS += \
- qcountergestureplugin.h \
- qcounterrecognizer.h
-SOURCES += \
- qcountergestureplugin.cpp \
- qcounterrecognizer.cpp
-
-target.path += $$[QT_INSTALL_PLUGINS]/sensorgestures
-INSTALLS += target
-
-OTHER_FILES += \
- plugin.json
-
diff --git a/examples/sensors/qmlsensorgestures/plugin/qcountergestureplugin.cpp b/examples/sensors/qmlsensorgestures/plugin/qcountergestureplugin.cpp
deleted file mode 100644
index 1fda1879..00000000
--- a/examples/sensors/qmlsensorgestures/plugin/qcountergestureplugin.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtPlugin>
-#include <QStringList>
-#include <QObject>
-
-#include "qcountergestureplugin.h"
-#include <qsensorgestureplugininterface.h>
-#include <qsensorgesturemanager.h>
-#include "qcounterrecognizer.h"
-
-
-QCounterGesturePlugin::QCounterGesturePlugin()
-{
-}
-
-QCounterGesturePlugin::~QCounterGesturePlugin()
-{
-}
-
-QStringList QCounterGesturePlugin::supportedIds() const
-{
- QStringList list;
- list << "QtSensors.SecondCounter";
- return list;
-}
-
-
-QList <QSensorGestureRecognizer *> QCounterGesturePlugin::createRecognizers()
-{
- QList <QSensorGestureRecognizer *> recognizers;
-
- QSensorGestureRecognizer *sRec = new QCounterGestureRecognizer(this);
- recognizers.append(sRec);
-
- return recognizers;
-}
diff --git a/examples/sensors/qmlsensorgestures/plugin/qcountergestureplugin.h b/examples/sensors/qmlsensorgestures/plugin/qcountergestureplugin.h
deleted file mode 100644
index 4755f96e..00000000
--- a/examples/sensors/qmlsensorgestures/plugin/qcountergestureplugin.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QCOUNTERGESTUREPLUGIN_H
-#define QCOUNTERGESTUREPLUGIN_H
-
-#include <QObject>
-#include <QStringList>
-
-#include <qsensorgestureplugininterface.h>
-
-class QCounterGesturePlugin : public QObject, public QSensorGesturePluginInterface
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "com.Nokia.QSensorGesturePluginInterface" FILE "plugin.json")
- Q_INTERFACES(QSensorGesturePluginInterface)
-
-public:
- explicit QCounterGesturePlugin();
- ~QCounterGesturePlugin();
-
- QList <QSensorGestureRecognizer *> createRecognizers();
-
- QStringList gestureSignals() const;
- QStringList supportedIds() const;
- QString name() const { return "CounterGestures"; }
-};
-
-#endif // QCOUNTERGESTUREPLUGIN_H
diff --git a/examples/sensors/qmlsensorgestures/plugin/qcounterrecognizer.cpp b/examples/sensors/qmlsensorgestures/plugin/qcounterrecognizer.cpp
deleted file mode 100644
index 03319e81..00000000
--- a/examples/sensors/qmlsensorgestures/plugin/qcounterrecognizer.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QDebug>
-#include <QTimer>
-
-#include "qcounterrecognizer.h"
-
-QCounterGestureRecognizer::QCounterGestureRecognizer(QObject *parent)
- : QSensorGestureRecognizer(parent)
-{
-}
-
-QCounterGestureRecognizer::~QCounterGestureRecognizer()
-{
-
-}
-
-void QCounterGestureRecognizer::create()
-{
- connect(&_timer,SIGNAL(timeout()),this,SLOT(timeout()));
- _timer.setInterval(1000);
-}
-
-bool QCounterGestureRecognizer::start()
-{
- Q_EMIT detected(id());
- _timer.start();
- return _timer.isActive();
-}
-
-bool QCounterGestureRecognizer::stop()
-{
- _timer.stop();
- return true;
-}
-
-
-bool QCounterGestureRecognizer::isActive()
-{
- return _timer.isActive();
-}
-
-QString QCounterGestureRecognizer::id() const
-{
- return QString("QtSensors.SecondCounter");
-}
-
-void QCounterGestureRecognizer::timeout()
-{
- Q_EMIT detected(id());
-}
diff --git a/examples/sensors/qmlsensorgestures/plugin/qcounterrecognizer.h b/examples/sensors/qmlsensorgestures/plugin/qcounterrecognizer.h
deleted file mode 100644
index 37c16eb1..00000000
--- a/examples/sensors/qmlsensorgestures/plugin/qcounterrecognizer.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QCOUNTERGESTURERECOGNIZER_H
-#define QCOUNTERGESTURERECOGNIZER_H
-
-#include <QDebug>
-#include <QtCore/QTimer>
-#include <qsensorgesturerecognizer.h>
-
-class QCounterGestureRecognizer : public QSensorGestureRecognizer
-{
- Q_OBJECT
-public:
-
- QCounterGestureRecognizer(QObject *parent = 0);
- ~QCounterGestureRecognizer();
-
- void create();
-
- QString id() const;
- bool start();
- bool stop();
- bool isActive();
-
-private slots:
- void timeout();
-
-private:
- QTimer _timer;
-};
-
-#endif // QCOUNTERGESTURERECOGNIZER_H
diff --git a/examples/sensors/qmlsensorgestures/qml_app/Button.qml b/examples/sensors/qmlsensorgestures/qml_app/Button.qml
deleted file mode 100644
index 23fc0f66..00000000
--- a/examples/sensors/qmlsensorgestures/qml_app/Button.qml
+++ /dev/null
@@ -1,129 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//Import the declarative plugins
-import QtQuick 2.0
-
-//Implementation of the Button control.
-Item {
- id: button
- width: 30
- height: 30
- property alias buttonText: innerText.text;
- property color color: "white"
- property color hoverColor: "#aaaaaa"
- property color pressColor: "slategray"
- property int fontSize: 10
- property int borderWidth: 1
- property int borderRadius: 2
- scale: state === "Pressed" ? 0.96 : 1.0
- onEnabledChanged: state = ""
- signal clicked
-
- //define a scale animation
- Behavior on scale {
- NumberAnimation {
- duration: 100
- easing.type: Easing.InOutQuad
- }
- }
-
- //Rectangle to draw the button
- Rectangle {
- id: rectangleButton
- anchors.fill: parent
- radius: borderRadius
- color: button.enabled ? button.color : "grey"
- border.width: borderWidth
- border.color: "black"
-
- Text {
- id: innerText
- font.pointSize: fontSize
- anchors.centerIn: parent
- }
- }
-
- //change the color of the button in differen button states
- states: [
- State {
- name: "Hovering"
- PropertyChanges {
- target: rectangleButton
- color: hoverColor
- }
- },
- State {
- name: "Pressed"
- PropertyChanges {
- target: rectangleButton
- color: pressColor
- }
- }
- ]
-
- //define transmission for the states
- transitions: [
- Transition {
- from: ""; to: "Hovering"
- ColorAnimation { duration: 200 }
- },
- Transition {
- from: "*"; to: "Pressed"
- ColorAnimation { duration: 10 }
- }
- ]
-
- //Mouse area to react on click events
- MouseArea {
- hoverEnabled: true
- anchors.fill: button
- onEntered: { button.state='Hovering'}
- onExited: { button.state=''}
- onClicked: { button.clicked();}
- onPressed: { button.state="Pressed" }
- onReleased: {
- if (containsMouse)
- button.state="Hovering";
- else
- button.state="";
- }
- }
-}
diff --git a/examples/sensors/qmlsensorgestures/qml_app/Gesture.qml b/examples/sensors/qmlsensorgestures/qml_app/Gesture.qml
deleted file mode 100644
index 2982c097..00000000
--- a/examples/sensors/qmlsensorgestures/qml_app/Gesture.qml
+++ /dev/null
@@ -1,115 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//Import the declarative plugins
-import QtQuick 2.0
-import QtSensors 5.0
-
-/* Layout
---------------------------------------------------
-| ---------------------------------------------- |
-| | | |
-| | | |
-| | | |
-| | gestureList | |
-| | | |
-| | | |
-| | | |
-| | | |
-| | | |
-| | | |
-| | | |
-| | | |
-| ---------------------------------------------- |
-| ---------------------------------------------- |
-| | | |
-| | gesture | |
-| | | |
-| | | |
-| ---------------------------------------------- |
-| ---------------------------------------------- |
-| | | |
-| | gestures | |
-| | | |
-| | | |
-| ---------------------------------------------- |
---------------------------------------------------
-*/
-
-Rectangle {
- id: viewArea
- width: 320
- height: 480
- color: '#d6d6d6'
-
- GestureList {
- id: gestureList
- parent: viewArea
- anchors.left: viewArea.left
- anchors.top: viewArea.top
- anchors.right: viewArea.right
- height: viewArea.height / 2
-//! [3]
- onSelectedGestureChanged: {
- gesture.enabled = false;
- gesture.gestureid = gestureList.selectedGesture;
-//! [3]
- gesture.gesturetitle = gestureList.selectedGesture;
- }
- }
-
- GestureView {
- id: gesture
- parent: viewArea
- anchors.left: viewArea.left
- anchors.top: gestureList.bottom
- anchors.right: viewArea.right
- height: 100
- }
-
- GesturesView {
- id: gestures
- parent: viewArea
- anchors.left: viewArea.left
- anchors.top: gesture.bottom
- anchors.right: viewArea.right
- height: 100
- }
-}
diff --git a/examples/sensors/qmlsensorgestures/qml_app/GestureList.qml b/examples/sensors/qmlsensorgestures/qml_app/GestureList.qml
deleted file mode 100644
index c9b1f094..00000000
--- a/examples/sensors/qmlsensorgestures/qml_app/GestureList.qml
+++ /dev/null
@@ -1,132 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//Import the declarative plugins
-import QtQuick 2.0
-import QtSensors 5.0
-
-/* Layout
- gesturerect
- /
----------------------------------------/
-|-------------------------------------|
-|| labelGesture ||
-|-------------------------------------|
-|-------------------------------------|
-|| |<---- gestureListRect
-|| ||
-|| ||
-|| gestureList ||
-|| ||
-|| ||
-|| ||
-|| ||
-|| ||
-|| ||
-|-------------------------------------|
-*/
-
-Rectangle {
- id: gesturerect
- border.width: 1
- anchors.margins: 5
-
- property string selectedGesture: "";
- signal selectedGestureChanged();
-
- SensorGesture {
- id: gesture
- }
-
- Text {
- id: labelGesture
- anchors.top: gesturerect.top
- anchors.left: gesturerect.left
- anchors.right: gesturerect.right
- horizontalAlignment: Text.AlignHCenter
- font.pixelSize: 30
- font.bold: true
- text: "Gestures"
- }
-
- Rectangle {
- id: gestureListRect
- border.width: 1
- anchors.top: labelGesture.bottom
- anchors.left: gesturerect.left
- anchors.right: gesturerect.right
- anchors.bottom: gesturerect.bottom
- anchors.margins: 5
-
-//! [4]
- ListView {
- id: gestureList
- anchors.fill: gestureListRect
- anchors.margins: 5
- model: gesture.availableGestures
- focus: true
- currentIndex: -1
- delegate: gestureListDelegate
- }
-//! [4]
- Component {
- id: gestureListDelegate
-
- Rectangle {
- width: gestureList.width
- height: itemText.height
- color: (index === gestureList.currentIndex ? "#999933" : "#FFFFFF")
-
- Text {
- id: itemText
- text: model.modelData
- }
- MouseArea {
- anchors.fill: parent
- onClicked: {
- gestureList.currentIndex = index;
- selectedGesture = model.modelData;
- selectedGestureChanged();
- }
- }
- }
- }
- }
-}
diff --git a/examples/sensors/qmlsensorgestures/qml_app/GestureView.qml b/examples/sensors/qmlsensorgestures/qml_app/GestureView.qml
deleted file mode 100644
index 07a9a5cc..00000000
--- a/examples/sensors/qmlsensorgestures/qml_app/GestureView.qml
+++ /dev/null
@@ -1,153 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//Import the declarative plugins
-import QtQuick 2.0
-
-//! [0]
-import QtSensors 5.0
-//! [0]
-
-/* Layout
- gesturerect
- /
----------------------------------------/
-| ----------------------------------- |
-| | id: titleText | |
-| ----------------------------------- |
-| |
-| |
-| ----------------------------------- |
-| | id: detectionText | |
-| ----------------------------------- |
-| |
-| |
-| |
-| ----------------------------------- |
-| | id: valueText | |
-| ----------------------------------- |
-| |
-| |
-| |
-| ------------------------------ |
-| | id: gestureStartStopButton | |
-| ------------------------------ |
----------------------------------------
-*/
-
-Rectangle {
- id: gesturerect
- border.width: 1
- anchors.margins: 5
-//! [2]
- property alias gestureid: sensorGesture.gestures
-//! [2]
- property alias gesturetitle: titleText.text
- property alias enabled: sensorGesture.enabled
- property string oldgesture: ""
- property int count: 0
-
-//! [1]
- SensorGesture {
- id: sensorGesture
- enabled: false
- onDetected:{
- if (gesture !== oldgesture)
- count = 0;
- valueText.text = gesture + " " + count;
- oldgesture = gesture;
- count++;
- }
- onEnabledChanged: {
- valueText.text = ""
- }
- }
-//! [1]
-
- Text {
- id: titleText
- anchors.top: gesturerect.top
- anchors.left: gesturerect.left
- anchors.right: gesturerect.right
- horizontalAlignment: Text.AlignHCenter
- font.pixelSize: 20
- font.bold: true
- text: ""
- }
-
- Text {
- id: detectionText
- anchors.top: titleText.bottom
- anchors.left: gesturerect.left
- anchors.right: gesturerect.right
- horizontalAlignment: Text.AlignHCenter
- font.pixelSize: 15
- text: "detection:"
- }
-
- Text {
- id: valueText
- anchors.top: detectionText.bottom
- anchors.left: gesturerect.left
- anchors.right: gesturerect.right
- horizontalAlignment: Text.AlignHCenter
- font.pixelSize: 15
- text: ("")
- visible: sensorGesture.enabled
- }
-
- Button{
- id: gestureStartStopButton
- anchors.left: gesturerect.left
- anchors.bottom: gesturerect.bottom
- height: 30
- width: 100
- buttonText: (sensorGesture.enabled ? "Stop" : "Start")
- enabled: true;
- onClicked: {
- if (gestureStartStopButton.buttonText === "Start") {
- sensorGesture.enabled = true;
- }
- else {
- sensorGesture.enabled = false;
- }
- }
- }
-}
diff --git a/examples/sensors/qmlsensorgestures/qml_app/GesturesView.qml b/examples/sensors/qmlsensorgestures/qml_app/GesturesView.qml
deleted file mode 100644
index 23924cad..00000000
--- a/examples/sensors/qmlsensorgestures/qml_app/GesturesView.qml
+++ /dev/null
@@ -1,156 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//Import the declarative plugins
-import QtQuick 2.0
-import QtSensors 5.0
-
-/* Layout
- gesturerect
- /
----------------------------------------/
-| ----------------------------------- |
-| | id: titleText | |
-| ----------------------------------- |
-| |
-| |
-| ----------------------------------- |
-| | id: detectionText | |
-| ----------------------------------- |
-| |
-| |
-| |
-| ----------------- ----------------- |
-| | id: valueText | | id: valueText1| |
-| ----------------- ----------------- |
-| |
-| |
-| |
-| ------------------------------ |
-| | id: gestureStartStopButton | |
-| ------------------------------ |
----------------------------------------
-*/
-
-Rectangle {
- id: gesturerect
- border.width: 1
- anchors.margins: 5
- property alias enabled: sensorGuesture.enabled
- property int count: 0
- property int count1: 0
-
- SensorGesture {
- id: sensorGuesture
- enabled: true
- gestures: availableGestures
- onDetected:{
- if (gesture === "QtSensors.shake")
- gesturerect.count++;
- else
- gesturerect.count1++;
- }
- onEnabledChanged: {
- gesturerect.count = 0;
- gesturerect.count1 = 0;
- }
- }
-
- Text {
- id: titleText
- anchors.top: gesturerect.top
- anchors.left: gesturerect.left
- anchors.right: gesturerect.right
- horizontalAlignment: Text.AlignHCenter
- font.pixelSize: 20
- font.bold: true
- text: "templates gestures"
- }
-
- Text {
- id: detectionText
- anchors.top: titleText.bottom
- anchors.left: gesturerect.left
- anchors.right: gesturerect.right
- horizontalAlignment: Text.AlignHCenter
- font.pixelSize: 15
- text: "shake : SecondCounter"
- }
-
- Text {
- id: valueText
- anchors.top: detectionText.bottom
- anchors.left: gesturerect.left
- width: gesturerect.width / 2
- horizontalAlignment: Text.AlignHCenter
- font.pixelSize: 15
- text: gesturerect.count
- visible: sensorGuesture.enabled
- }
-
- Text {
- id: valueText1
- anchors.top: detectionText.bottom
- anchors.right: gesturerect.right
- width: gesturerect.width / 2
- horizontalAlignment: Text.AlignHCenter
- font.pixelSize: 15
- text: gesturerect.count1
- visible: sensorGuesture.enabled
- }
-
- Button{
- id: gestureStartStopButton
- anchors.left: gesturerect.left
- anchors.bottom: gesturerect.bottom
- height: 30
- width: 100
- buttonText: (sensorGuesture.enabled ? "Stop" : "Start")
- enabled: true;
- onClicked: {
- if (gestureStartStopButton.buttonText === "Start") {
- sensorGuesture.enabled = true;
- }
- else {
- sensorGuesture.enabled = false;
- }
- }
- }
-}
diff --git a/examples/sensors/qmlsensorgestures/qml_app/icon.png b/examples/sensors/qmlsensorgestures/qml_app/icon.png
deleted file mode 100644
index c445bd7f..00000000
--- a/examples/sensors/qmlsensorgestures/qml_app/icon.png
+++ /dev/null
Binary files differ
diff --git a/examples/sensors/qmlsensorgestures/qml_app/info.json b/examples/sensors/qmlsensorgestures/qml_app/info.json
deleted file mode 100644
index 063caaa0..00000000
--- a/examples/sensors/qmlsensorgestures/qml_app/info.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "info-version": "1.0",
- "dict": {
- "Category": "application",
- "Runtime": "qml",
- "DisplayName": "Gesture",
- "Subcategory": "utility",
- "MainQML": "Gesture.qml",
- "Version": "1.0",
- "Identifier": "com.nokia.mt.qmlsensorsgesture",
- "Summary": "QML Sensors Gesture demo",
- "Author": "Qt"
- }
-}
diff --git a/examples/sensors/qmlsensorgestures/qml_app/qml_app.pro b/examples/sensors/qmlsensorgestures/qml_app/qml_app.pro
deleted file mode 100644
index 6ad9a8bf..00000000
--- a/examples/sensors/qmlsensorgestures/qml_app/qml_app.pro
+++ /dev/null
@@ -1,18 +0,0 @@
-TEMPLATE = aux
-
-app.files = \
- Button.qml \
- GestureList.qml \
- GesturesView.qml \
- info.json \
- Gesture.qml \
- GestureView.qml \
- icon.png
-
-MT_SYSROOT=$$(MT_SYSROOT)
-!isEmpty(MT_SYSROOT):EXAMPLES_PREFIX=/opt/mt/applications
-!isEmpty(EXAMPLES_PREFIX) {
- app.path = $$EXAMPLES_PREFIX/com.nokia.mt.qmlsensorgestures
- INSTALLS = app
-}
-
diff --git a/examples/sensors/qmlsensorgestures/qmlsensorgestures.pro b/examples/sensors/qmlsensorgestures/qmlsensorgestures.pro
deleted file mode 100644
index 01677c19..00000000
--- a/examples/sensors/qmlsensorgestures/qmlsensorgestures.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-TEMPLATE = subdirs
-
-SUBDIRS += plugin
-SUBDIRS += qml_app
-