summaryrefslogtreecommitdiffstats
path: root/examples/sensors/qmlsensorgestures/plugin
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@insta.fi>2022-09-29 17:53:56 +0300
committerJuha Vuolle <juha.vuolle@insta.fi>2022-10-04 08:11:45 +0300
commit7a94c109e6805b35150522b6714f04e63d751888 (patch)
tree4ce31ad1feb0de16bda4c591ad18c165db833b1d /examples/sensors/qmlsensorgestures/plugin
parentd5d24fd5fe095337063891204e4fee4c6914b165 (diff)
Remove disabled sensor gesture code
Support for sensor gestures in their then-current form was removed in Qt 6 (QTBUG-95747). This commit removes the disabled code. This is to avoid distraction when keeping the repository up-to-date with rest of Qt. The gestures may be reintroduced in some shape or form in the future (QTBUG-97066). For those reference purposes the old code can be found in the git history. Fixes: QTBUG-107065 Change-Id: If2c50171f84d483dde55600422d138d550124bdc Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'examples/sensors/qmlsensorgestures/plugin')
-rw-r--r--examples/sensors/qmlsensorgestures/plugin/CMakeLists.txt39
-rw-r--r--examples/sensors/qmlsensorgestures/plugin/plugin.pro30
-rw-r--r--examples/sensors/qmlsensorgestures/plugin/qcountergestureplugin.cpp38
-rw-r--r--examples/sensors/qmlsensorgestures/plugin/qcountergestureplugin.h29
-rw-r--r--examples/sensors/qmlsensorgestures/plugin/qcounterrecognizer.cpp52
-rw-r--r--examples/sensors/qmlsensorgestures/plugin/qcounterrecognizer.h33
6 files changed, 0 insertions, 221 deletions
diff --git a/examples/sensors/qmlsensorgestures/plugin/CMakeLists.txt b/examples/sensors/qmlsensorgestures/plugin/CMakeLists.txt
deleted file mode 100644
index 98969df4..00000000
--- a/examples/sensors/qmlsensorgestures/plugin/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright (C) 2022 The Qt Company Ltd.
-# SPDX-License-Identifier: BSD-3-Clause
-
-cmake_minimum_required(VERSION 3.16)
-project(qtsensorgestures_counterplugin LANGUAGES CXX)
-
-set(CMAKE_AUTOMOC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
-
-find_package(Qt6 REQUIRED COMPONENTS Core Gui Sensors)
-
-qt_add_plugin(qtsensorgestures_counterplugin)
-
-target_sources(qtsensorgestures_counterplugin PRIVATE
- qcountergestureplugin.cpp qcountergestureplugin.h
- qcounterrecognizer.cpp qcounterrecognizer.h
-)
-
-set_target_properties(qtsensorgestures_counterplugin PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-
-target_link_libraries(qtsensorgestures_counterplugin PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Sensors
-)
-
-install(TARGETS qtsensorgestures_counterplugin
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/sensors/qmlsensorgestures/plugin/plugin.pro b/examples/sensors/qmlsensorgestures/plugin/plugin.pro
deleted file mode 100644
index bb519c8d..00000000
--- a/examples/sensors/qmlsensorgestures/plugin/plugin.pro
+++ /dev/null
@@ -1,30 +0,0 @@
-QT += sensors
-TARGET = qtsensorgestures_counterplugin
-
-QTDIR_build {
-# This is only for the Qt build. Do not use externally. We mean it.
-PLUGIN_TYPE = sensorgestures
-PLUGIN_CLASS_NAME = QCounterGesturePlugin
-PLUGIN_EXTENDS = -
-load(qt_plugin)
-CONFIG += install_ok
-} else {
-
-TEMPLATE = lib
-CONFIG += plugin
-
-target.path += $$[QT_INSTALL_PLUGINS]/sensorgestures
-INSTALLS += target
-
-}
-
-HEADERS += \
- qcountergestureplugin.h \
- qcounterrecognizer.h
-SOURCES += \
- qcountergestureplugin.cpp \
- qcounterrecognizer.cpp
-
-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 d55412f2..00000000
--- a/examples/sensors/qmlsensorgestures/plugin/qcountergestureplugin.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-
-#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 6f216970..00000000
--- a/examples/sensors/qmlsensorgestures/plugin/qcountergestureplugin.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-
-#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 "org.qt-project.QSensorGesturePluginInterface")
- Q_INTERFACES(QSensorGesturePluginInterface)
-
-public:
- explicit QCounterGesturePlugin();
- ~QCounterGesturePlugin();
-
- QList<QSensorGestureRecognizer *> createRecognizers() override;
-
- QStringList gestureSignals() const;
- QStringList supportedIds() const override;
- QString name() const override { 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 2e872674..00000000
--- a/examples/sensors/qmlsensorgestures/plugin/qcounterrecognizer.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-
-#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 857860ea..00000000
--- a/examples/sensors/qmlsensorgestures/plugin/qcounterrecognizer.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-
-#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() override;
-
- QString id() const override;
- bool start() override;
- bool stop() override;
- bool isActive() override;
-
-private slots:
- void timeout();
-
-private:
- QTimer _timer;
-};
-
-#endif // QCOUNTERGESTURERECOGNIZER_H