diff options
Diffstat (limited to 'src/sensors')
111 files changed, 491 insertions, 4799 deletions
diff --git a/src/sensors/CMakeLists.txt b/src/sensors/CMakeLists.txt index 9b0ed256..065a2530 100644 --- a/src/sensors/CMakeLists.txt +++ b/src/sensors/CMakeLists.txt @@ -1,15 +1,13 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + ##################################################################### ## Sensors Module: ##################################################################### qt_internal_add_module(Sensors - PLUGIN_TYPES sensors # sensorgestures + PLUGIN_TYPES sensors SOURCES - # gestures/qsensorgesture.cpp gestures/qsensorgesture.h gestures/qsensorgesture_p.h - # gestures/qsensorgesturemanager.cpp gestures/qsensorgesturemanager.h - # gestures/qsensorgesturemanagerprivate.cpp gestures/qsensorgesturemanagerprivate_p.h - # gestures/qsensorgestureplugininterface.cpp gestures/qsensorgestureplugininterface.h - # gestures/qsensorgesturerecognizer.cpp gestures/qsensorgesturerecognizer.h qsensorbackend.cpp qsensorbackend.h qsensormanager.cpp qsensormanager.h qsensorplugin.cpp qsensorplugin.h @@ -74,12 +72,11 @@ qt_internal_add_module(Sensors Qt::Core PRIVATE_MODULE_INTERFACE Qt::CorePrivate - GENERATE_CPP_EXPORTS ) if(ANDROID) set_property(TARGET Sensors APPEND PROPERTY QT_ANDROID_LIB_DEPENDENCIES - plugins/sensors/libplugins_sensors_qtsensors_android.so + ${INSTALL_PLUGINSDIR}/sensors/libplugins_sensors_qtsensors_android.so ) endif() diff --git a/src/sensors/configure.cmake b/src/sensors/configure.cmake index 7779bf09..04eb0e30 100644 --- a/src/sensors/configure.cmake +++ b/src/sensors/configure.cmake @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + #### Inputs @@ -42,7 +45,10 @@ if (LINUX) # src/plugins/sensors/CMakeLists.txt and fix any potential errors. qt_configure_add_summary_entry(ARGS "sensorfw") qt_configure_add_summary_entry(ARGS "sensorfw_enabled_with_cmake") - qt_configure_add_report(MESSAGE "SensorFW support currently not enabled with cmake") + qt_configure_add_report_entry( + TYPE WARNING + MESSAGE "SensorFW support currently not enabled with cmake" + ) endif() if (WIN32) diff --git a/src/sensors/doc/images/sensorgesture-cover.png b/src/sensors/doc/images/sensorgesture-cover.png Binary files differdeleted file mode 100644 index 7b4fbc5f..00000000 --- a/src/sensors/doc/images/sensorgesture-cover.png +++ /dev/null diff --git a/src/sensors/doc/images/sensorgesture-doubletap.png b/src/sensors/doc/images/sensorgesture-doubletap.png Binary files differdeleted file mode 100644 index 6253d0f8..00000000 --- a/src/sensors/doc/images/sensorgesture-doubletap.png +++ /dev/null diff --git a/src/sensors/doc/images/sensorgesture-facedown.png b/src/sensors/doc/images/sensorgesture-facedown.png Binary files differdeleted file mode 100644 index a85664f1..00000000 --- a/src/sensors/doc/images/sensorgesture-facedown.png +++ /dev/null diff --git a/src/sensors/doc/images/sensorgesture-faceup.png b/src/sensors/doc/images/sensorgesture-faceup.png Binary files differdeleted file mode 100644 index c20ef089..00000000 --- a/src/sensors/doc/images/sensorgesture-faceup.png +++ /dev/null diff --git a/src/sensors/doc/images/sensorgesture-flat.png b/src/sensors/doc/images/sensorgesture-flat.png Binary files differdeleted file mode 100644 index e8eafafb..00000000 --- a/src/sensors/doc/images/sensorgesture-flat.png +++ /dev/null diff --git a/src/sensors/doc/images/sensorgesture-hover.png b/src/sensors/doc/images/sensorgesture-hover.png Binary files differdeleted file mode 100644 index fecf6b3a..00000000 --- a/src/sensors/doc/images/sensorgesture-hover.png +++ /dev/null diff --git a/src/sensors/doc/images/sensorgesture-shake.png b/src/sensors/doc/images/sensorgesture-shake.png Binary files differdeleted file mode 100644 index 06f9eeaf..00000000 --- a/src/sensors/doc/images/sensorgesture-shake.png +++ /dev/null diff --git a/src/sensors/doc/images/sensorgesture-slam_1.png b/src/sensors/doc/images/sensorgesture-slam_1.png Binary files differdeleted file mode 100644 index d56f8892..00000000 --- a/src/sensors/doc/images/sensorgesture-slam_1.png +++ /dev/null diff --git a/src/sensors/doc/images/sensorgesture-slam_2.png b/src/sensors/doc/images/sensorgesture-slam_2.png Binary files differdeleted file mode 100644 index 5fe8ecba..00000000 --- a/src/sensors/doc/images/sensorgesture-slam_2.png +++ /dev/null diff --git a/src/sensors/doc/images/sensorgesture-twist.png b/src/sensors/doc/images/sensorgesture-twist.png Binary files differdeleted file mode 100644 index bec15854..00000000 --- a/src/sensors/doc/images/sensorgesture-twist.png +++ /dev/null diff --git a/src/sensors/doc/images/sensorgesture-whip.png b/src/sensors/doc/images/sensorgesture-whip.png Binary files differdeleted file mode 100644 index aa998bb7..00000000 --- a/src/sensors/doc/images/sensorgesture-whip.png +++ /dev/null diff --git a/src/sensors/doc/qtsensors-module-use.qdocinc b/src/sensors/doc/qtsensors-module-use.qdocinc index 4ea4db91..761b6bbd 100644 --- a/src/sensors/doc/qtsensors-module-use.qdocinc +++ b/src/sensors/doc/qtsensors-module-use.qdocinc @@ -1,33 +1,9 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only //! [cmakebuild] \code - find_package(Qt6 COMPONENTS Sensors REQUIRED) + find_package(Qt6 REQUIRED COMPONENTS Sensors) target_link_libraries(mytarget PRIVATE Qt6::Sensors) \endcode //! [cmakebuild] diff --git a/src/sensors/doc/qtsensors.qdocconf b/src/sensors/doc/qtsensors.qdocconf index 65808772..b7569927 100644 --- a/src/sensors/doc/qtsensors.qdocconf +++ b/src/sensors/doc/qtsensors.qdocconf @@ -1,4 +1,3 @@ -include($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf) include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) include($QT_INSTALL_DOCS/config/exampleurl-qtsensors.qdocconf) @@ -17,18 +16,18 @@ qhp.QtSensors.indexRoot = qhp.QtSensors.subprojects = overviews classes qmltypes examples qhp.QtSensors.subprojects.overviews.title = Overview qhp.QtSensors.subprojects.overviews.indexTitle = Qt Sensors -qhp.QtSensors.subprojects.overviews.selectors = fake:page,group,module +qhp.QtSensors.subprojects.overviews.selectors = doc:page,group,module qhp.QtSensors.subprojects.classes.title = C++ Classes qhp.QtSensors.subprojects.classes.indexTitle = Qt Sensors C++ Classes -qhp.QtSensors.subprojects.classes.selectors = class fake:headerfile +qhp.QtSensors.subprojects.classes.selectors = class headerfile qhp.QtSensors.subprojects.classes.sortPages = true qhp.QtSensors.subprojects.qmltypes.title = QML Types qhp.QtSensors.subprojects.qmltypes.indexTitle = Qt Sensors QML Types -qhp.QtSensors.subprojects.qmltypes.selectors = qmlclass +qhp.QtSensors.subprojects.qmltypes.selectors = qmltype qhp.QtSensors.subprojects.qmltypes.sortPages = true qhp.QtSensors.subprojects.examples.title = Examples qhp.QtSensors.subprojects.examples.indexTitle = Qt Sensors Examples -qhp.QtSensors.subprojects.examples.selectors = fake:example +qhp.QtSensors.subprojects.examples.selectors = doc:example tagfile = ../../../doc/qtsensors/qtsensors.tags @@ -44,22 +43,11 @@ examplesinstallpath = sensors imagedirs += images -# Gestures have been disabled for the time being -excludedirs += ../../../examples/sensors/qmlsensorgestures \ - ../../../examples/sensors/shakeit \ - ../../../examples/sensors/sensorgestures \ - ../../plugins/sensorgestures \ - ../../sensors/gestures +depends += qtcore qtdoc qtgui qtquick qtcmake -excludefiles += ../../sensorsquick/qmlsensorgesture.cpp \ - src/qtsensorgestures-cpp.qdoc \ - src/qtsensorgestures-plugins.qdoc - -depends += qtcore qtdoc qtgui qtquick +# Highlighted examples +manifestmeta.highlighted.names = "QtSensors/Sensors Showcase" navigation.landingpage = "Qt Sensors" navigation.cppclassespage = "Qt Sensors C++ Classes" navigation.qmltypespage = "Qt Sensors QML Types" - -# Fail the documentation build if there are more warnings than the limit -warninglimit = 0 diff --git a/src/sensors/doc/snippets/sensorgestures/CMakeLists.txt b/src/sensors/doc/snippets/sensorgestures/CMakeLists.txt deleted file mode 100644 index 3b6942e9..00000000 --- a/src/sensors/doc/snippets/sensorgestures/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -cmake_minimum_required(VERSION 3.16) -project(sensorgesturessdocsnippet LANGUAGES CXX) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) - -find_package(Qt6 COMPONENTS Core Sensors) - -qt_add_executable(sensorgesturessdocsnippet - creating.cpp - main.cpp - myplugin.h - plugin.cpp -) - -target_link_libraries(sensorgesturessdocsnippet PUBLIC - Qt::Sensors -) - -if (GCC AND UNIX) - target_link_libraries(sensorgesturessdocsnippet PUBLIC - rdynamic - log - ) -endif() diff --git a/src/sensors/doc/snippets/sensorgestures/creating.cpp b/src/sensors/doc/snippets/sensorgestures/creating.cpp deleted file mode 100644 index 78f7a737..00000000 --- a/src/sensors/doc/snippets/sensorgestures/creating.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QObject> -#include <QString> -#include <QSensorGestureManager> - -class MyObject : public QObject -{ - void create(); -public slots: - void gestureDetected(const QString &); -}; - -void MyObject::create() -{ -//! [Receiving sensor gesture signals] - -// Create a QSensorGestureManager - QSensorGestureManager gestureManager; - -// Get a list of known recognizers - QStringList recognizersList = gestureManager.gestureIds(); - -// Create a QSensorGeture object for each of those gesture recognizers - QSensorGesture *gesture = new QSensorGesture( gestureManager.gestureIds(), this); -// Connect the known signals up. - connect(gesture, SIGNAL(detected(QString)), this, SLOT(gestureDetected(QString))); -//! [Receiving sensor gesture signals] -} - -void MyObject::gestureDetected(const QString &gesture) -{ - Q_UNUSED(gesture); -} - diff --git a/src/sensors/doc/snippets/sensorgestures/main.cpp b/src/sensors/doc/snippets/sensorgestures/main.cpp deleted file mode 100644 index dee1ecb6..00000000 --- a/src/sensors/doc/snippets/sensorgestures/main.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -int main(int /*argc*/, char ** /*argv*/) -{ - return 0; -} - diff --git a/src/sensors/doc/snippets/sensorgestures/myplugin.h b/src/sensors/doc/snippets/sensorgestures/myplugin.h deleted file mode 100644 index 0cf1a92b..00000000 --- a/src/sensors/doc/snippets/sensorgestures/myplugin.h +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef MYPLUGIN_H -#define MYPLUGIN_H - -#include <QObject> -#include <qsensorgestureplugininterface.h> -#include <qsensorgesturerecognizer.h> - -class MySensorGestureRecognizer : public QSensorGestureRecognizer -{ - Q_OBJECT - public: - - MySensorGestureRecognizer(QObject *parent = 0); - ~MySensorGestureRecognizer(); - - void create() override; - - QString id() const override; - bool start() override; - bool stop() override; - bool isActive() override; - -Q_SIGNALS: -// all signals will get exported to QSensorGesture - void mySignal(); -}; - -class MySensorGesturePlugin : public QObject, public QSensorGesturePluginInterface -{ - Q_OBJECT - //Q_PLUGIN_METADATA(IID "com.Nokia.QSensorGesturePluginInterface" FILE "plugin.json") - Q_INTERFACES(QSensorGesturePluginInterface) -public: - - explicit MySensorGesturePlugin(); - ~MySensorGesturePlugin(); - - QList<QSensorGestureRecognizer *> createRecognizers() override; - QStringList supportedIds() const override; - QString name() const override { return "MyGestures"; } -}; - -#endif diff --git a/src/sensors/doc/snippets/sensorgestures/plugin.cpp b/src/sensors/doc/snippets/sensorgestures/plugin.cpp deleted file mode 100644 index a94a188e..00000000 --- a/src/sensors/doc/snippets/sensorgestures/plugin.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "myplugin.h" - -#include <qsensorgestureplugininterface.h> -#include <qsensorgesturemanager.h> - -//! [Plugin] - -MySensorGestureRecognizer::MySensorGestureRecognizer(QObject *parent) - : QSensorGestureRecognizer(parent) -{ -} - -MySensorGestureRecognizer::~MySensorGestureRecognizer() -{ -} - -bool MySensorGestureRecognizer::start() -{ - Q_EMIT mySignal(); - return true; -} - -bool MySensorGestureRecognizer::stop() -{ - return true; -} - -bool MySensorGestureRecognizer::isActive() -{ - return true; -} - -void MySensorGestureRecognizer::create() -{ -} - -QString MySensorGestureRecognizer::id() const -{ - return QString("QtSensors.mygestures"); -} - - -MySensorGesturePlugin::MySensorGesturePlugin(){} -MySensorGesturePlugin::~MySensorGesturePlugin(){} - -QList <QSensorGestureRecognizer *> MySensorGesturePlugin::createRecognizers() -{ - QList <QSensorGestureRecognizer *> recognizers; - MySensorGestureRecognizer *recognizer = new MySensorGestureRecognizer(this); - recognizers.append(recognizer); - - return recognizers; -} - -QStringList MySensorGesturePlugin::supportedIds() const -{ - return QStringList() << "QtSensors.mygestures"; -} - -//! [Plugin] diff --git a/src/sensors/doc/snippets/sensors/CMakeLists.txt b/src/sensors/doc/snippets/sensors/CMakeLists.txt index abdf53d1..27480020 100644 --- a/src/sensors/doc/snippets/sensors/CMakeLists.txt +++ b/src/sensors/doc/snippets/sensors/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + cmake_minimum_required(VERSION 3.16) project(sensorsdocsnippet LANGUAGES CXX) @@ -14,6 +17,7 @@ qt_add_executable(sensorsdocsnippet main.cpp mybackend.h plugin.cpp + start.cpp ) target_link_libraries(sensorsdocsnippet PUBLIC diff --git a/src/sensors/doc/snippets/sensors/creating.cpp b/src/sensors/doc/snippets/sensors/creating.cpp index 355d950f..4c99066f 100644 --- a/src/sensors/doc/snippets/sensors/creating.cpp +++ b/src/sensors/doc/snippets/sensors/creating.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QObject> #include <qaccelerometer.h> diff --git a/src/sensors/doc/snippets/sensors/main.cpp b/src/sensors/doc/snippets/sensors/main.cpp index dee1ecb6..fb6724d5 100644 --- a/src/sensors/doc/snippets/sensors/main.cpp +++ b/src/sensors/doc/snippets/sensors/main.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause int main(int /*argc*/, char ** /*argv*/) { diff --git a/src/sensors/doc/snippets/sensors/mybackend.h b/src/sensors/doc/snippets/sensors/mybackend.h index 59c54069..b964e747 100644 --- a/src/sensors/doc/snippets/sensors/mybackend.h +++ b/src/sensors/doc/snippets/sensors/mybackend.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #ifndef MYBACKEND_H #define MYBACKEND_H diff --git a/src/sensors/doc/snippets/sensors/plugin.cpp b/src/sensors/doc/snippets/sensors/plugin.cpp index 47435a8f..27f50d72 100644 --- a/src/sensors/doc/snippets/sensors/plugin.cpp +++ b/src/sensors/doc/snippets/sensors/plugin.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include "mybackend.h" #include <qsensorplugin.h> diff --git a/src/sensors/doc/snippets/sensors/start.cpp b/src/sensors/doc/snippets/sensors/start.cpp index 498774ae..18c87d06 100644 --- a/src/sensors/doc/snippets/sensors/start.cpp +++ b/src/sensors/doc/snippets/sensors/start.cpp @@ -1,43 +1,9 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -#include <qsensor.h> +#include <QtSensors/qsensor.h> +#include <QtCore/QMetaObject> +#include <QtCore/QMetaproperty> void start() { @@ -55,3 +21,39 @@ qreal y = reading->value(1).value<qreal>(); Q_UNUSED(x); Q_UNUSED(y); } + +class MyObject : public QObject +{ + void findSensors() + { + //! [Find sensors] + QList<QSensor*> mySensorList; + for (const QByteArray &type : QSensor::sensorTypes()) { + qDebug() << "Found a sensor type:" << type; + for (const QByteArray &identifier : QSensor::sensorsForType(type)) { + qDebug() << " " << "Found a sensor of that type:" << identifier; + QSensor* sensor = new QSensor(type, this); + sensor->setIdentifier(identifier); + mySensorList.append(sensor); + } + } + //! [Find sensors] + //! [Print reading properties] + for (QSensor* sensor : mySensorList) { + const int firstProperty = QSensorReading::staticMetaObject.propertyOffset(); + // Connect to backend first in case start() hasn't been called yet + if (!sensor->connectToBackend()) + continue; + qDebug() << "Sensor" << sensor->identifier() << "reading properties:"; + QSensorReading *reading = sensor->reading(); + if (reading) { + const QMetaObject *mo = reading->metaObject(); + for (int i = firstProperty; i < mo->propertyCount(); ++i) { + QByteArray name = mo->property(i).name(); + qDebug() << " " << name << reading->property(name).toByteArray(); + } + } + } + //! [Print reading properties] + } +}; diff --git a/src/sensors/doc/snippets/sensors/tutorial.cpp b/src/sensors/doc/snippets/sensors/tutorial.cpp new file mode 100644 index 00000000..e8714961 --- /dev/null +++ b/src/sensors/doc/snippets/sensors/tutorial.cpp @@ -0,0 +1,25 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +//! [MySensor] +class MyReadingPrivate; + +class MyReading : public QSensorReading + { + Q_OBJECT + Q_PROPERTY(qreal myprop READ myprop) + DECLARE_READING(MyReading) +public: + qreal myprop() const; + void setMyprop(qreal myprop); + }; + +class MySensor : public QSensor +{ + Q_OBJECT +public: + explicit MySensor(QObject *parent = 0); + MyReading *reading() const; + static char const * const sensorType; + }; +//! [MySensor] diff --git a/src/sensors/doc/src/compatmap.qdoc b/src/sensors/doc/src/compatmap.qdoc index 025af476..41f91a73 100644 --- a/src/sensors/doc/src/compatmap.qdoc +++ b/src/sensors/doc/src/compatmap.qdoc @@ -1,29 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Research In Motion -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 Research In Motion +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \page compatmap.html @@ -155,10 +131,140 @@ <td bgcolor="gray"></td> <td bgcolor="green"></td> </tr> + </tbody> </table> \endraw + \raw DocBook +<db:informaltable cellpadding="2" cellspacing="1" border="1" width="90%"> + <db:tbody> + <db:tr> + <db:td>Color</db:td> + <db:td>Explanation</db:td> + </db:tr> + <db:tr> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td>The sensor is supported.</db:td> + </db:tr> + <db:tr> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td>The sensor is not supported.</db:td> + </db:tr> + </db:tbody> + </db:informaltable> + + + <db:informaltable cellpadding="2" cellspacing="1" border="1" rules="all" width="90%"> + <db:tbody> + <db:tr> + <db:td><db:emphasis role="bold">Feature</db:emphasis></db:td> + <db:td><db:emphasis role="bold">Android</db:emphasis></db:td> + <db:td><db:emphasis role="bold">Linux</db:emphasis></db:td> + <db:td><db:emphasis role="bold">iOS</db:emphasis></db:td> + <db:td><db:emphasis role="bold">Windows</db:emphasis></db:td> + <db:td><db:emphasis role="bold">Generic</db:emphasis></db:td> + </db:tr> + <db:tr> + <db:td>Accelerometer</db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + </db:tr> + <db:tr> + <db:td>Ambient Light Sensor</db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + </db:tr> + <db:tr> + <db:td>Ambient Temperature Sensor</db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + </db:tr> + <db:tr> + <db:td>Compass</db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + </db:tr> + <db:tr> + <db:td>Gyroscope</db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + </db:tr> + <db:tr> + <db:td>Light Sensor</db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + </db:tr> + <db:tr> + <db:td>Magnetometer</db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + </db:tr> + <db:tr> + <db:td>Orientation Sensor</db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + </db:tr> + <db:tr> + <db:td>Pressure Sensor</db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + </db:tr> + <db:tr> + <db:td>Proximity Sensor</db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + </db:tr> + <db:tr> + <db:td>Rotation Sensor</db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + </db:tr> + <db:tr> + <db:td>Tilt Sensor</db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + <db:td class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td> + <db:td class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td> + </db:tr> + </db:tbody> + </db:informaltable> + \endraw + In addition to the table above, each sensor type might support specific features. For example, a magnetometer might support returning geo values. See QSensor::isFeatureSupported() for additional details. diff --git a/src/sensors/doc/src/genericbackend.qdoc b/src/sensors/doc/src/genericbackend.qdoc index 001fce77..2c314e6d 100644 --- a/src/sensors/doc/src/genericbackend.qdoc +++ b/src/sensors/doc/src/genericbackend.qdoc @@ -1,29 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Research In Motion -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 Research In Motion +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \page genericbackend.html diff --git a/src/sensors/doc/src/qt6-changes.qdoc b/src/sensors/doc/src/qt6-changes.qdoc index 6f3c3598..de4f682b 100644 --- a/src/sensors/doc/src/qt6-changes.qdoc +++ b/src/sensors/doc/src/qt6-changes.qdoc @@ -1,29 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \page qtsensors-changes-qt6.html diff --git a/src/sensors/doc/src/qtsensorgestures-cpp.qdoc b/src/sensors/doc/src/qtsensorgestures-cpp.qdoc deleted file mode 100644 index 164ffafb..00000000 --- a/src/sensors/doc/src/qtsensorgestures-cpp.qdoc +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! -\page qtsensorgestures-cpp.html -\title Sensor Gestures C++ Overview -\brief Explains how to use the QtSensorGestures C++ API - -\tableofcontents - -\section1 Using QtSensorGestures - -With the Sensor Gestures classes, you are able to easily utilize device gesturing using -sensors, such as the accelerometer and proximity. - -A list of currently supported sensor gestures and their descriptions can be found here: -\l {Qt Sensor Gestures} - -Using \c QtSensorGestures is easy. There are two main classes you will need to use: - -\list - \li QSensorGestureManager: can be used for determining which sensor gestures are available. - \li QSensorGesture : for connecting the sensor gesture signals. -\endlist - -\snippet sensorgestures/creating.cpp Receiving sensor gesture signals - -More information about the sensor gesture recognizers can be found in -\l{QtSensorGestures Plugins}. - -\section1 Main Classes - -The primary classes that make up the QtSensorGestures API: - -\annotatedlist sensorgestures_main - -The primary classes that make up the \c QtSensorGesturesRecognizers API: - -\annotatedlist sensorgestures_recognizer - -Details of the \c QSensorGesturePlugins available - -\annotatedlist sensorgesture_plugins_topics - -*/ - diff --git a/src/sensors/doc/src/qtsensorgestures-plugins.qdoc b/src/sensors/doc/src/qtsensorgestures-plugins.qdoc deleted file mode 100644 index b181c16b..00000000 --- a/src/sensors/doc/src/qtsensorgestures-plugins.qdoc +++ /dev/null @@ -1,167 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! -\group sensorgesture_plugins_topics -\title QtSensorGestures Plugins -\brief Explains how to develop recognizer plugins with QtSensorGestures - -The QtSensorGestures recognizer plugins are the way to create your own -sensor gestures. - -Creating software to recognize motion gestures using sensors is a huge subject not covered here. - -The QSensorGesture API does not limit usage to any of the common classification methods of gesture -recognition, such as Hidden Markov Models, Neural Networks, Dynamic Time Warping, or even the -ad-hoc heuristic recognizers of Qt's built-in sensor gesture recognizers. It's basically a -signaling system for lower level gesture recogition methods and algorithms to communicate to the -higher level applications. - -\tableofcontents - -\section1 Overview - - The steps for creating a sensor gesture plugin are as follows: -\list -\li Sub-class from QSensorGesturePluginInterface -\li Sub-class from QSensorGestureRecognizer and implement gesture recognizer logic using QtSensors. -\li Create an instance of that recognizer in the derived QSensorGesturePluginInterface class, and call - QSensorGestureManager::registerSensorGestureRecognizer(sRec); in your registerRecognizers() -function. QSensorGestureManager will retain ownership of the recognizer object. - -This is the class in which the gesture recognizer system should be implemented from. - -\endlist - -\snippet sensorgestures/plugin.cpp Plugin - - -\section2 Recognizer Classes - -If you are making sensorgestures available through the QtSensorGestures API, these are the -classes to subclass. - -\annotatedlist sensorgestures_recognizer - -\target Qt Sensor Gestures -\section3 Recognizer Plugins - -The Sensor Gesture Recognizers that come with Qt are made using an ad-hoc heuristic approach. -The user cannot define their own gestures, and must learn how to perform and accommodate the -pre-defined gestures herein. - -A developer may use any method, including computationally- and training-intensive well- -known classifiers, to produce gesture recognizers. There are currently no classes in Qt for -gesture training, nor is it possible for the user to define his own sensor-based motion gestures. - -A procedure for writing ad-hoc recognizers might include: -\list - \li Obtain and gather output from the accelerometer through \c QAccelerometerReading of a gesture being performed. - \li Use various methods and constraints on the accelerometer data to recognize the various states: - \list i - \li Initial "listening" state for a gesture - \li Start of a possible gesture, moving into a "detecting" state - \li End of a possible gesture, moving into a "recognizing" state - \li and finally, if it is recognized, the "recognized" state, or if not recognized, move back to - the "listening" state. - \endlist - \li Test procedure to make sure it is easy to perform, and will not - produce too many false positive recognitions, or collisions if used with other gestures. Meaning -that gestures performed get recognized as another gesture instead. - -\endlist - -Below you will find a list of included plugins and their signals. - -For the ShakeGestures plugin: - \table - \row - \li Recognizer Id - \li Signals - \row - \li QtSensors.shake - \li shake -\endtable - -For the QtSensorGestures plugin: - \table - \row - \li Recognizer Id - \li Signals - \li Description - \li Images - \row - \li QtSensors.cover - \li cover - \li Hand covers up phone display for one second, when it's face up, using the Proximity and Orientation sensors. - \li \image sensorgesture-cover.png - \row - \li QtSensors.doubletap - \li doubletap - \li Double tap of finger on phone, using the DoubleTap sensor. - \li \image sensorgesture-doubletap.png - \row - \li QtSensors.hover - \li hover - \li Hand hovers about 4 cm above the phone for more than 1 second, then is removed when face up, - using the IR Proximity sensor. - \li \image sensorgesture-hover.png - \row - \li QtSensors.pickup - \li pickup - \li Phone is resting face up on a flat curface, and is then picked up and brought up into viewing position. Uses the Accelerometer sensor. - \li \image sensorgesture-faceup.png - \row - \li QtSensors.shake2 - \li shakeLeft, shakeRight, shakeUp, shakeDown - \li Shake phone in a certain direction, using the Accelerometer sensor. - \li \image sensorgesture-shake.png - \row - \li QtSensors.slam - \li slam - \li Phone is held in a top up position with a side facing forward for a moment. Swing it quickly with a downward motion - like it is being used to point at something with the top corner. Uses the Accelerometer and Orientation sensors. - \li \image sensorgesture-slam_1.png - \image sensorgesture-slam_2.png - \row - \li QtSensors.turnover - \li turnover - \li Phone is turned face down and placed on a surface, using Proximity and Orientation sensors. - \li \image sensorgesture-facedown.png - \row - \li QtSensors.twist - \li twistLeft, twistRight - \li Phone is held face up and then twisted left or right (left side up or right side up) and back, using the Accelerometer and Orientation sensors. - \li \image sensorgesture-twist.png - \row - \li QtSensors.whip - \li whip - \li Move phone quickly down and then back up. Uses the Accelerometer and Orientation sensors. - \li \image sensorgesture-whip.png - \endtable - -*/ diff --git a/src/sensors/doc/src/qtsensors-backend.qdoc b/src/sensors/doc/src/qtsensors-backend.qdoc index 752e8f92..35945f61 100644 --- a/src/sensors/doc/src/qtsensors-backend.qdoc +++ b/src/sensors/doc/src/qtsensors-backend.qdoc @@ -1,29 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \page sensors-backend-topics.html diff --git a/src/sensors/doc/src/qtsensors-cpp.qdoc b/src/sensors/doc/src/qtsensors-cpp.qdoc index d732a0dd..b70f8276 100644 --- a/src/sensors/doc/src/qtsensors-cpp.qdoc +++ b/src/sensors/doc/src/qtsensors-cpp.qdoc @@ -1,34 +1,11 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \page qtsensors-cpp.html \title Qt Sensors C++ Overview \brief Explains how to use the Qt Sensors C++ API. +\ingroup explanation \tableofcontents @@ -103,8 +80,18 @@ This code does not require any compile-time links to \l QAccelerometer or \snippet sensors/start.cpp Starting a sensor -You can discover all of this information at runtime too. The sensor_explorer example -shows you information about available sensors. +You can discover all of this information at runtime too. + +\section1 Discovering Sensors And Reading Properties At Runtime + +Sometimes it may be that the available sensors are not known at development time. +It is possible to find out which sensors are available as illustrated below: + +\snippet sensors/start.cpp Find sensors + +Furthermore it is possible to discover the reading details for these sensors, as illustrated below: + +\snippet sensors/start.cpp Print reading properties \section1 Front End, Back End diff --git a/src/sensors/doc/src/qtsensors-modules.qdoc b/src/sensors/doc/src/qtsensors-modules.qdoc index 6b4c9713..7a4d29ba 100644 --- a/src/sensors/doc/src/qtsensors-modules.qdoc +++ b/src/sensors/doc/src/qtsensors-modules.qdoc @@ -1,29 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! diff --git a/src/sensors/doc/src/qtsensors-tutorial.qdoc b/src/sensors/doc/src/qtsensors-tutorial.qdoc new file mode 100644 index 00000000..147b8504 --- /dev/null +++ b/src/sensors/doc/src/qtsensors-tutorial.qdoc @@ -0,0 +1,36 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only + +/*! + \page qtsensors-tutorial.html + \title How to create your own Sensor + \brief Steps for creating your own sensors + + The Qt Sensors module provides access to sensor hardware via QML and C++ + interfaces. + + The API is supported on \l{Qt for Android}{Android}, \l{Qt for iOS}{iOS}, and + \l {Qt for Windows}{Windows (MSVC)}. + + \section1 Creating your own sensor using C++ API + + Using a Qt module's C++ API requires linking against the module library, either + directly or through other dependencies. + \section2 Creating a sensor + + To create your own sensor you can use the following steps: + + \list + \li Create your own MySensor and MySensorReading classes + \snippet sensors/tutorial.cpp MySensor + \li Create a MySensorBackend by inheriting from QSensorBackend + \li Create MySensorBackendFactory factory class for instantiating that + backend by inheriting a class QSensorBackendFactory + \li Register the backend factory by calling + QSensorManager::registerBackend ("MySensorType", "MySensorId", &myfactory) + \li Instantiate the new MySensor and start using it + \endlist + + As an another option the sensors are put into a \l {Creating a sensor plugin} + that you can use on demand. +*/ diff --git a/src/sensors/doc/src/qtsensors.qdoc b/src/sensors/doc/src/qtsensors.qdoc index fb805d83..c25349fd 100644 --- a/src/sensors/doc/src/qtsensors.qdoc +++ b/src/sensors/doc/src/qtsensors.qdoc @@ -1,29 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \page qtsensors-index.html @@ -31,81 +7,67 @@ \brief Provides access to sensors via QML and C++ interfaces. \since 5.1 - The Qt Sensors API provides access to sensor hardware via QML and C++ interfaces. + The Qt Sensors module provides access to sensor hardware via QML and C++ + interfaces. - Currently the API is supported on \l{Qt for Android}{Android}, + Currently, the API is supported on \l{Qt for Android}{Android}, \l{Qt for iOS}{iOS}, and \l {Qt for Windows}{Windows (MSVC)}. - \section1 Information for Application Writers + \section1 Using the Module - Applications can access Qt Sensors using QML or C++. + \section2 QML API - To include the definitions of the module's classes, use the following directive: + \include {module-use.qdocinc} {using the qml api} {QtSensors} - \code - #include <QtSensors> - \endcode + \section2 C++ API - To import the QML types into your application, use the following import statement - in your .qml file: + \include {module-use.qdocinc} {using the c++ api} - \qml - import QtSensors - \endqml + \section3 Building with CMake - To link against the module: + \include {module-use.qdocinc} {building with cmake} {Sensors} - Using cmake: - \include qtsensors-module-use.qdocinc cmakebuild + \section3 Building with qmake - Using qmake: - \include qtsensors-module-use.qdocinc qmakebuild + \include {module-use.qdocinc} {building_with_qmake} {sensors} - Further references: + \section1 Articles and Guides - \table - \row - \li \l {Qt Sensors QML Types}{QML Types} - \li Information about the Qt Sensors QML API - \row - \li \l {Qt Sensors C++ Classes}{C++ Classes} - \li Information about the Qt Sensors C++ API - \row - \li \l{Qt Sensors C++ Overview} - \li High-level information on how to use the C++ API. - \row - \li \l {Qt Sensors Examples}{Examples} - \li Examples demonstrating the use of the Qt Sensors APIs - \endtable + \list + \li \l {Qt Sensors C++ Overview} + \li \l {Generic Backend} {Generic Backend} + \li \l {Qt Sensors Backend} + \li \l {Compatibility Map} {Compatibility Map} + \li \l {How to create your own Sensor} + \endlist - \section1 Information for Backend Implementors + \section1 Examples - \table - \row - \li \l {Qt Sensors Backend}{Backend} - \li Information about the Qt Sensors back end - \row - \li \l {Qt Sensors - Grue Sensor Example} - \li The Qt Sensors - Grue Sensor Example demonstrates creation of a sensor backend - \endtable + \list + \li \l {Qt Sensors Examples} {Examples} + \endlist + + \section1 API Reference + + \list + \li \l {Qt Sensors QML Types} {QML Types} + \li \l {Qt Sensors C++ Classes} {C++ Classes} + \endlist \section1 Module Evolution \l{Changes to Qt Sensors} lists important changes in the module API - and functionality that were done for the Qt 6 series of Qt. - - \section1 Platform-specific Information - \table - \row - \li \l {Compatibility Map}{Compatibility Map} - \li Compatibility map of all supported platforms. - \row - \li \l {Generic Backend}{Generic Backend} - \li Information about the generic sensor backend. - \endtable + and functionality that were made for the Qt 6 series of Qt. + + \section1 Licenses and Attributions The Qt Sensors module is available under commercial licenses from \l{The Qt Company}. In addition, it is available under free software licenses: The \l{GNU Lesser General Public License, version 3}, or the \l{GNU General Public License, version 2}. See \l{Qt Licensing} for further details. + + Furthermore, Qt Sensors in Qt \QtVersion may contain third-party + modules under following permissive licenses: + + \generatelist{groupsbymodule attributions-qtsensors} */ diff --git a/src/sensors/doc/src/sensor-examples.qdoc b/src/sensors/doc/src/sensor-examples.qdoc index 769d8f69..8e8d8d75 100644 --- a/src/sensors/doc/src/sensor-examples.qdoc +++ b/src/sensors/doc/src/sensor-examples.qdoc @@ -1,35 +1,10 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \group qtsensors-examples \title Qt Sensors Examples \brief Examples for the Qt Sensors module - \ingroup all-examples These are the Qt Sensors examples. diff --git a/src/sensors/doc/src/sensorfwbackend.qdoc b/src/sensors/doc/src/sensorfwbackend.qdoc index 21539bdb..4e3a980d 100644 --- a/src/sensors/doc/src/sensorfwbackend.qdoc +++ b/src/sensors/doc/src/sensorfwbackend.qdoc @@ -1,29 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Jolla Mobile -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 Jolla Mobile +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \page senorfwbackend.html diff --git a/src/sensors/gestures/qsensorgesture.cpp b/src/sensors/gestures/qsensorgesture.cpp deleted file mode 100644 index 8d345381..00000000 --- a/src/sensors/gestures/qsensorgesture.cpp +++ /dev/null @@ -1,250 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QDir> -#include <QPluginLoader> -#include <QDebug> - -#include "qsensorgesture.h" -#include "qsensorgesture_p.h" -#include "qsensorgesturemanager.h" - -#include <private/qmetaobjectbuilder_p.h> - -/*! - \class QSensorGesture - \ingroup sensorgestures_main - \inmodule QtSensors - \since 5.1 - - \brief The QSensorGesture class represents one or more sensor gesture recognizers. - - In addition to the QSensorGesture::detected() signal, Sensor Gesture Recognizers can - have their own specific signals, and may be discovered through - QSensorGesture::gestureSignals(). - - \b {Note that QSensorGesture uses a custom meta-object in order to provide - recognizer-specific signals. This means it is not possible to sub-class - QSensorGesture and use Q_OBJECT. Also qobject_cast<QSensorGesture*>(ptr) will - not work.} - - \sa QSensorGestureRecognizer - - You may use QSensorGestureManager to obtain the systems known sensor gesture ids. - - \sa QSensorGestureManager - */ - -/*! - \fn void QSensorGesture::detected(QString) - Signals when the gesture has been recognized. - */ - -/*! - Constructs the sensor gesture, and initializes the \a ids list of recognizers, - with parent \a parent - */ -QSensorGesture::QSensorGesture(const QStringList &ids, QObject *parent) : - QObject(parent) -{ - d_ptr = new QSensorGesturePrivate(); - for (const QString &id : ids) { - QSensorGestureRecognizer * rec = QSensorGestureManager::sensorGestureRecognizer(id); - if (rec != 0) { - d_ptr->m_sensorRecognizers.append(rec); - d_ptr->availableIds.append(id); - } else { - d_ptr->invalidIds.append(id); - //add to not available things - } - } - - d_ptr->meta = 0; - - QMetaObjectBuilder builder; - builder.setSuperClass(&QObject::staticMetaObject); - builder.setClassName("QSensorGesture"); - - for (QSensorGestureRecognizer *recognizer : d_ptr->m_sensorRecognizers) { - for (const QString &gesture : recognizer->gestureSignals()) { - QMetaMethodBuilder b = builder.addSignal(gesture.toLatin1()); - if (!d_ptr->localGestureSignals.contains(QLatin1String(b.signature()))) - d_ptr->localGestureSignals.append(QLatin1String(b.signature())); - } - recognizer->createBackend(); - } - d_ptr->meta = builder.toMetaObject(); - - if (d_ptr->m_sensorRecognizers.count() > 0) { - d_ptr->valid = true; - } -} - -/*! - Destroy the QSensorGesture - */ -QSensorGesture::~QSensorGesture() -{ - stopDetection(); - if (d_ptr->meta) - free(d_ptr->meta); - delete d_ptr; -} - -/*! - Returns the gesture recognizer ids that were found. - */ -QStringList QSensorGesture::validIds() const -{ - return d_ptr->availableIds; -} - -/*! - Returns the gesture recognizer ids that were not found. - */ -QStringList QSensorGesture::invalidIds() const -{ - return d_ptr->invalidIds; -} - -/*! - Starts the gesture detection routines in the recognizer. - */ -void QSensorGesture::startDetection() -{ - if (d_ptr->m_sensorRecognizers.count() < 1) - return; - if (d_ptr->isActive) - return; - - for (QSensorGestureRecognizer *recognizer : d_ptr->m_sensorRecognizers) { - - Q_ASSERT(recognizer !=0); - - connect(recognizer,SIGNAL(detected(QString)), - this,SIGNAL(detected(QString)),Qt::UniqueConnection); - - //connect recognizer signals - for (QString method : recognizer->gestureSignals()) { - method.prepend(QLatin1String("2")); - connect(recognizer, method.toLatin1(), - this, method.toLatin1(), Qt::UniqueConnection); - } - - recognizer->startBackend(); - } - d_ptr->isActive = true; -} - -/*! - Stops the gesture detection routines. - */ -void QSensorGesture::stopDetection() -{ - if (d_ptr->m_sensorRecognizers.count() < 1) - return; - - if (!d_ptr->isActive) - return; - - for (QSensorGestureRecognizer *recognizer : d_ptr->m_sensorRecognizers) { - disconnect(recognizer,SIGNAL(detected(QString)), - this,SIGNAL(detected(QString))); - //disconnect recognizer signals - for (QString method : recognizer->gestureSignals()) { - method.prepend(QLatin1String("2")); - disconnect(recognizer, method.toLatin1(), - this, method.toLatin1()); - } - - recognizer->stopBackend(); - } - d_ptr->isActive = false; -} - -/*! - Returns all the possible gestures signals that may be emitted. - */ -QStringList QSensorGesture::gestureSignals() const -{ - if (d_ptr->m_sensorRecognizers.count() > 0) { - return d_ptr->localGestureSignals; - } - return QStringList(); -} - -/*! - Returns whether this gesture is active or not. - */ - -bool QSensorGesture::isActive() -{ - return d_ptr->isActive; -} - -/*! - \internal -*/ -const QMetaObject* QSensorGesture::metaObject() const -{ - return d_ptr->meta; -} -/*! - \internal -*/ -int QSensorGesture::qt_metacall(QMetaObject::Call c, int id, void **a) -{ - id = QObject::qt_metacall(c, id, a); - - if (id < 0 || !d_ptr->meta) - return id; - - QMetaObject::activate(this, d_ptr->meta, id, a); - return id; -} - -QSensorGesturePrivate::QSensorGesturePrivate(QObject *parent) - : QObject(parent),isActive(0), valid(0) -{ -} - -QSensorGesturePrivate::~QSensorGesturePrivate() -{ - -} diff --git a/src/sensors/gestures/qsensorgesture.h b/src/sensors/gestures/qsensorgesture.h deleted file mode 100644 index cec39cf8..00000000 --- a/src/sensors/gestures/qsensorgesture.h +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSENSORGESTURE_H -#define QSENSORGESTURE_H - -#include <QtCore/QObject> -#include <QtCore/QStringList> -#include <QtSensors/qsensorsglobal.h> - -#include <QtCore/QList> -#include <QtCore/QMap> - -#include <QtCore/qmetatype.h> - -QT_BEGIN_NAMESPACE - -class QSensorGesturePrivate; - -class Q_SENSORS_EXPORT QSensorGesture : public QObject -{ - //Do not use Q_OBJECT here -public: - explicit QSensorGesture(const QStringList &ids, QObject *parent = nullptr); - ~QSensorGesture(); - - bool isActive(); - - QStringList validIds() const; - QStringList invalidIds() const; - - QStringList gestureSignals() const; - - void startDetection(); - void stopDetection(); - - // Pretend to be a Q_OBJECT - const QMetaObject *metaObject() const override; - int qt_metacall(QMetaObject::Call, int, void **) override; - -private: - QSensorGesturePrivate * d_ptr; - -Q_SIGNALS: - // these signals are created at runtime, along with - // gesture recognizer specific signals. - void detected(QString); -}; - -QT_END_NAMESPACE - - -#endif // QSENSORGESTURE_H diff --git a/src/sensors/gestures/qsensorgesture_p.h b/src/sensors/gestures/qsensorgesture_p.h deleted file mode 100644 index 9ec80c8b..00000000 --- a/src/sensors/gestures/qsensorgesture_p.h +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSENSORGESTURE_P_H -#define QSENSORGESTURE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of other Qt classes. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// -#include <QtSensors/QSensor> -#include <QtSensors/QAccelerometer> -#include <QtSensors/QAccelerometerFilter> -#include <QTimer> - -#include "qsensorgesture.h" -#include "qsensorgesturemanager.h" -#include <QtCore/private/qmetaobjectbuilder_p.h> - -QT_BEGIN_NAMESPACE - -class QSensorGesturePrivate : public QObject -{ - -public: - QSensorGesturePrivate(QObject *parent = 0); - ~QSensorGesturePrivate(); - - QList<QSensorGestureRecognizer *> m_sensorRecognizers; - - QByteArray metadata; - QMetaObject* meta; - bool isActive; - QStringList localGestureSignals; - QStringList availableIds; - QStringList invalidIds; - bool valid; -}; - - -QT_END_NAMESPACE - -#endif // QSENSORGESTURE_P_H diff --git a/src/sensors/gestures/qsensorgesturemanager.cpp b/src/sensors/gestures/qsensorgesturemanager.cpp deleted file mode 100644 index e99be929..00000000 --- a/src/sensors/gestures/qsensorgesturemanager.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qsensorgesturemanager.h" -#include "qsensorgesturemanagerprivate_p.h" - -QT_BEGIN_NAMESPACE - -/*! - \class QSensorGestureManager - \ingroup sensorgestures_main - \inmodule QtSensors - \since 5.1 - - \brief The QSensorGestureManager class manages sensor gestures, registers and creates sensor gesture plugins. - - Sensor Gesture plugins register their recognizers using the registerSensorGestureRecognizer() function. - - \snippet sensorgestures/creating.cpp Receiving sensor gesture signals -*/ - -/*! - \fn QSensorGestureManager::newSensorGestureAvailable() - Signals when a new sensor gesture becomes available for use. - */ - -/*! - Constructs the QSensorGestureManager as a child of \a parent - */ -QSensorGestureManager::QSensorGestureManager(QObject *parent) - : QObject(parent) -{ - QSensorGestureManagerPrivate *d = QSensorGestureManagerPrivate::instance(); - if (!d) return; // hardly likely but just in case... - connect(d,SIGNAL(newSensorGestureAvailable()), - this,SIGNAL(newSensorGestureAvailable())); -} - -/*! - Destroy the QSensorGestureManager -*/ -QSensorGestureManager::~QSensorGestureManager() -{ -} - -/*! - Registers the sensor recognizer \a recognizer for use. - QSensorGestureManager retains ownership of the recognizer object. - Returns true unless the gesture has already been registered, in - which case the object is deleted. - - */ - - bool QSensorGestureManager::registerSensorGestureRecognizer(QSensorGestureRecognizer *recognizer) - { - QSensorGestureManagerPrivate *d = QSensorGestureManagerPrivate::instance(); - if (!d) { // hardly likely but just in case... - delete recognizer; - return false; - } - bool ok = d->registerSensorGestureRecognizer(recognizer); - if (!ok) - delete recognizer; - - return ok; - } - - - /*! - Returns the list of the currently registered gestures. - Includes all the standard built-ins as well as available plugins. - */ - QStringList QSensorGestureManager::gestureIds() const - { - QSensorGestureManagerPrivate *d = QSensorGestureManagerPrivate::instance(); - if (!d) return QStringList(); // hardly likely but just in case... - return d->gestureIds(); - } - - /*! - Returns the list of all the gesture signals for the registered \a gestureId gesture recognizer id. - */ - QStringList QSensorGestureManager::recognizerSignals(const QString &gestureId) const - { - QSensorGestureRecognizer *recognizer = sensorGestureRecognizer(gestureId); - if (recognizer != 0) - return recognizer->gestureSignals(); - else - return QStringList(); - } - -/*! - Returns the sensor gesture object for the recognizer \a id. - */ -QSensorGestureRecognizer *QSensorGestureManager::sensorGestureRecognizer(const QString &id) -{ - QSensorGestureManagerPrivate *d = QSensorGestureManagerPrivate::instance(); - if (!d) return 0; // hardly likely but just in case... - return d->sensorGestureRecognizer(id); -} - -QT_END_NAMESPACE diff --git a/src/sensors/gestures/qsensorgesturemanager.h b/src/sensors/gestures/qsensorgesturemanager.h deleted file mode 100644 index dde13e18..00000000 --- a/src/sensors/gestures/qsensorgesturemanager.h +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSENSORGESTUREMANAGER_P_H -#define QSENSORGESTUREMANAGER_P_H - -#include <QtCore/QObject> -#include <QtCore/QStringList> - -#include <QtSensors/qsensorgesture.h> -#include <QtSensors/qsensorgesturerecognizer.h> - -QT_BEGIN_NAMESPACE - -class QSensorGestureManagerPrivate; -class Q_SENSORS_EXPORT QSensorGestureManager : public QObject -{ - Q_OBJECT - Q_DECLARE_PRIVATE(QSensorGestureManager) - -public: - explicit QSensorGestureManager(QObject *parent = nullptr); - - ~QSensorGestureManager(); - - bool registerSensorGestureRecognizer(QSensorGestureRecognizer *recognizer); - - QStringList gestureIds() const; - QStringList recognizerSignals(const QString &recognizerId) const; - - static QSensorGestureRecognizer *sensorGestureRecognizer(const QString &id); - -Q_SIGNALS: - void newSensorGestureAvailable(); - -}; - - -QT_END_NAMESPACE - -#endif // QSENSORGESTUREMANAGER_P_H diff --git a/src/sensors/gestures/qsensorgesturemanagerprivate.cpp b/src/sensors/gestures/qsensorgesturemanagerprivate.cpp deleted file mode 100644 index b6424d4a..00000000 --- a/src/sensors/gestures/qsensorgesturemanagerprivate.cpp +++ /dev/null @@ -1,179 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QDir> -#include <QLibraryInfo> - -#include <QtCore/private/qfactoryloader_p.h> - -#include "qsensorgesturerecognizer.h" -#include "qsensorgesturemanagerprivate_p.h" -#include "qsensorgestureplugininterface.h" - -Q_GLOBAL_STATIC(QSensorGestureManagerPrivate, sensorGestureManagerPrivate) - -QT_BEGIN_NAMESPACE - -QSensorGestureManagerPrivate::QSensorGestureManagerPrivate(QObject *parent) : - QObject(parent) -{ - loader = new QFactoryLoader("org.qt-project.QSensorGesturePluginInterface", QLatin1String("/sensorgestures")); - loadPlugins(); -} - -QSensorGestureManagerPrivate::~QSensorGestureManagerPrivate() -{ -// qDeleteAll(registeredSensorGestures); -// delete loader; -} - - - void QSensorGestureManagerPrivate::initPlugin(QObject *plugin) -{ - if (QSensorGesturePluginInterface *pInterface - = qobject_cast<QSensorGesturePluginInterface *>(plugin)) { - for (const QString& id : pInterface->supportedIds()) { - if (!knownIds.contains(id)) - knownIds.append(id); - else - qWarning() << id <<"from the plugin" << pInterface->name() << "is already known."; - } - plugins << plugin; - } else { - qWarning() << "Could not load "<< plugin; - } -} - - -/*! - Internal - Loads the sensorgesture plugins. - */ -void QSensorGestureManagerPrivate::loadPlugins() -{ - for (QObject *plugin : QPluginLoader::staticInstances()) - initPlugin(plugin); - - QList<QPluginParsedMetaData> meta = loader->metaData(); - for (int i = 0; i < meta.count(); i++) { - QObject *plugin = loader->instance(i); - initPlugin(plugin); - } -} - - -/*! - Internal - creates the requested recognizer. - */ - -bool QSensorGestureManagerPrivate::loadRecognizer(const QString &recognizerId) -{ - //if no plugin is used return true if this is a registered recognizer - - if (registeredSensorGestures.contains(recognizerId)) - return true; - - for (int i= 0; i < plugins.count(); i++) { - - if (QSensorGesturePluginInterface *pInterface - = qobject_cast<QSensorGesturePluginInterface *>(plugins.at(i))) { - - if (pInterface->supportedIds().contains(recognizerId)) { - - if (!registeredSensorGestures.contains(recognizerId)) { - //create these recognizers - QList <QSensorGestureRecognizer *> recognizers = pInterface->createRecognizers(); - - for (QSensorGestureRecognizer *recognizer : recognizers) { - if (registeredSensorGestures.contains(recognizer->id())) { - qWarning() << "Ignoring recognizer " << recognizer->id() << "from plugin" << pInterface->name() << "because it is already registered"; - delete recognizer; - } else { - registeredSensorGestures.insert(recognizer->id(),recognizer); - } - } - } - return true; - } - } - } - return false; -} - -bool QSensorGestureManagerPrivate::registerSensorGestureRecognizer(QSensorGestureRecognizer *recognizer) -{ - if (!knownIds.contains(recognizer->id())) { - knownIds.append(recognizer->id()); - Q_ASSERT (!registeredSensorGestures.contains(recognizer->id())); - recognizer->setParent(0); - registeredSensorGestures.insert(recognizer->id(),recognizer); - Q_EMIT newSensorGestureAvailable(); - - return true; - } - return false; -} - -QSensorGestureRecognizer *QSensorGestureManagerPrivate::sensorGestureRecognizer(const QString &id) -{ - QSensorGestureRecognizer *recognizer = 0; - - if (loadRecognizer(id)) { - recognizer= registeredSensorGestures.value(id); - } - - return recognizer; -} - -QStringList QSensorGestureManagerPrivate::gestureIds() -{ - return knownIds; -} - -QSensorGestureManagerPrivate * QSensorGestureManagerPrivate::instance() -{ - QSensorGestureManagerPrivate *priv = sensorGestureManagerPrivate(); - // It's safe to return 0 because this is checked when used - //if (!priv) qFatal("Cannot return from QSensorGestureManagerPrivate::instance() because sensorGestureManagerPrivate() returned 0."); - return priv; -} - - -QT_END_NAMESPACE diff --git a/src/sensors/gestures/qsensorgesturemanagerprivate_p.h b/src/sensors/gestures/qsensorgesturemanagerprivate_p.h deleted file mode 100644 index e57ede49..00000000 --- a/src/sensors/gestures/qsensorgesturemanagerprivate_p.h +++ /dev/null @@ -1,97 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSENSORGESTUREMANAGERPRIVATE_P_H -#define QSENSORGESTUREMANAGERPRIVATE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include <QObject> -#include <QMap> -#include <QStringList> -#include <QDebug> -#include <QSharedPointer> -#include <QPluginLoader> - -#include "qsensorgesture.h" -#include "qsensorgesturerecognizer.h" - -QT_BEGIN_NAMESPACE - -class QFactoryLoader; - -class QSensorGestureManagerPrivate : public QObject -{ - Q_OBJECT -public: - explicit QSensorGestureManagerPrivate(QObject *parent = 0); - ~QSensorGestureManagerPrivate(); - - QMap<QString, QSensorGestureRecognizer *> registeredSensorGestures; - - QList <QObject *> plugins; - - QFactoryLoader *loader; - void loadPlugins(); - bool loadRecognizer(const QString &id); - - QSensorGestureRecognizer *sensorGestureRecognizer(const QString &id); - - bool registerSensorGestureRecognizer(QSensorGestureRecognizer *recognizer); - QStringList gestureIds(); - QStringList knownIds; - void initPlugin(QObject *o); - - static QSensorGestureManagerPrivate * instance(); -Q_SIGNALS: - void newSensorGestureAvailable(); -}; - -QT_END_NAMESPACE - -#endif // QSENSORGESTUREMANAGERPRIVATE_P_H diff --git a/src/sensors/gestures/qsensorgestureplugininterface.cpp b/src/sensors/gestures/qsensorgestureplugininterface.cpp deleted file mode 100644 index c80862e3..00000000 --- a/src/sensors/gestures/qsensorgestureplugininterface.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qsensorgestureplugininterface.h" - -QT_BEGIN_NAMESPACE - -/*! - \class QSensorGesturePluginInterface - \ingroup sensorgestures_recognizer - \inmodule QtSensors - - \brief The QSensorGesturePluginInterface class is the pure virtual interface to sensor gesture - plugins. - - \since 5.1 - - The QSensorGesturePluginInterface class is implemented in sensor gesture plugins to register - sensor gesture recognizers with QSensorGestureManager. - - \sa {QtSensorGestures Plugins} -*/ - -/*! - \fn QSensorGesturePluginInterface::createRecognizers() - - Called by the manager to create the recognizers. - Plugins should initialize and register their recognizers using - QSensorGestureManager::registerSensorGestureRecognizer() here. - - \sa QSensorGestureManager -*/ - -/*! - \fn QSensorGesturePluginInterface::supportedIds() const - - Returns a list of the recognizer Id's that this plugin supports. - */ - - -/*! - \fn QSensorGesturePluginInterface::name() const - - Returns this plugins name. - */ - -/*! - Construct the QSensorGesturePluginInterface. -*/ -QSensorGesturePluginInterface::QSensorGesturePluginInterface() -{ -} - -/*! - Destroy the QSensorGesturePluginInterface. -*/ -QSensorGesturePluginInterface::~QSensorGesturePluginInterface() -{ -} - -QT_END_NAMESPACE diff --git a/src/sensors/gestures/qsensorgestureplugininterface.h b/src/sensors/gestures/qsensorgestureplugininterface.h deleted file mode 100644 index 3de9ab84..00000000 --- a/src/sensors/gestures/qsensorgestureplugininterface.h +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSENSORGESTUREPLUGININTERFACE_H -#define QSENSORGESTUREPLUGININTERFACE_H - -#include <QtCore/QObject> -#include <QtCore/QtGlobal> -#include <QtCore/qplugin.h> -#include <QtSensors/qsensorgesture.h> -#include <QtSensors/qsensorgesturerecognizer.h> - -QT_BEGIN_NAMESPACE - -class QSensorGestureRecognizer; - -class Q_SENSORS_EXPORT QSensorGesturePluginInterface -{ -public: - QSensorGesturePluginInterface(); - virtual ~QSensorGesturePluginInterface(); - virtual QList <QSensorGestureRecognizer *> createRecognizers() = 0; - virtual QStringList supportedIds() const = 0; - virtual QString name() const = 0; -}; - -Q_DECLARE_INTERFACE(QSensorGesturePluginInterface, "org.qt-project.QSensorGesturePluginInterface") - -QT_END_NAMESPACE - -#endif // QSENSORGESTUREPLUGININTERFACE_H diff --git a/src/sensors/gestures/qsensorgesturerecognizer.cpp b/src/sensors/gestures/qsensorgesturerecognizer.cpp deleted file mode 100644 index d9a367eb..00000000 --- a/src/sensors/gestures/qsensorgesturerecognizer.cpp +++ /dev/null @@ -1,207 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qsensorgesturerecognizer.h" -#include "qsensorgesture_p.h" -#include "qsensorgesturemanager.h" - -QT_BEGIN_NAMESPACE - -/*! - \class QSensorGestureRecognizer - \ingroup sensorgestures_recognizer - \inmodule QtSensors - \since 5.1 - - \brief The QSensorGestureRecognizer class is the base class for a sensor gesture - recognizer. - - QSensorGesture recognizer developers should sub-class this to implement their own recognizer. - - All sensor gesture recognizers have a detected(QString) signal. Implementors can use this - and send recognizer specific gestures, such as detected("shake_left") or implement custom signals - such as shakeLeft(). - - These custom signals will be available in the QSensorGesture object at runtime. - - \sa QSensorGestureRecognizer::gestureSignals() - - */ - -/*! - \fn void QSensorGestureRecognizer::create() - - Called by QSensorGesture object constructor to create the recognizers backend. - - Implementors would use this to instantiate QSensors and connect signals. - - */ - -/*! - \fn QString QSensorGestureRecognizer::id() const - Returns the identifier for this recognizer. - */ -/*! - \fn bool QSensorGestureRecognizer::start() - - Called by QSensorGesture::startDetection() to start this recognizer. - Implementors should start the sensors. - Returns true if the operation is successful. - - */ -/*! - \fn bool QSensorGestureRecognizer::stop() - - Called by QSensorGesture::stopDetection() to stop this recognizer. - Returns true if the call succeeds, otherwise false. - - Implementors should stop the sensors. - - */ -/*! - \fn bool QSensorGestureRecognizer::isActive() - - Returns true if this recognizer is active, otherwise false. - */ - -/*! - \fn QSensorGestureRecognizer::detected(const QString &) - Signals when a gesture is recognized. Implementors can use this signal to send - recognizer-specific gestures, such as \c detected("shake_left") or implement - custom signals such as \c shakeLeft(). - - The custom signals are available in the QSensorGesture object at runtime. - */ - -class QSensorGestureRecognizerPrivate -{ -public: - bool initialized; - int count; -}; - - -/*! - Constructs the QSensorGestureRecognizer with \a parent as parent. - */ -QSensorGestureRecognizer::QSensorGestureRecognizer(QObject *parent) - :QObject(parent), - d_ptr(new QSensorGestureRecognizerPrivate()) -{ -} - -/*! - Destroy the QSensorGestureRecognizer -*/ -QSensorGestureRecognizer::~QSensorGestureRecognizer() -{ - delete d_ptr; -} - -/*! - Returns a list of signals that this recognizer supports. - - Note that all signals declared will be exported to the QSensorGesture - object. If you need to use signals that are not exported, you should use a private class - to do so. - - */ -QStringList QSensorGestureRecognizer::gestureSignals() const -{ - QStringList list; - bool ok = false; - for (int i = 0; i < this->metaObject()->methodCount(); i++) { - //weed out objectsignals and slots - const QByteArray sig(this->metaObject()->method(i).methodSignature()); - if (this->metaObject()->indexOfSignal(sig) != -1) { - if (sig.contains("detected")) - ok = true; - if (ok) - list.append(QString::fromLatin1(sig)); - } - } - return list; -} - -/*! - Calls QSensorGestureRecognizer::create() if the recognizer is valid. -*/ -void QSensorGestureRecognizer::createBackend() -{ - if (d_ptr->initialized) { - return; - } - d_ptr->initialized = true; - create(); -} - -/*! - Calls QSensorGestureRecognizer::start() if the recognizer isn't already initialized. - This is called by the QSensorGesture object, so please use that instead. - -\sa QSensorGesture::startDetection() - -*/ -void QSensorGestureRecognizer::startBackend() -{ - if (!d_ptr->initialized) { - qWarning() << "Not starting. Gesture Recognizer not initialized"; - return; - } - if (d_ptr->count++ == 0) - start(); -} - -/*! - Calls QSensorGestureRecognizer::stop() if no other clients are using it. - This is called by the QSensorGesture object, so please use that instead. - -\sa QSensorGesture::stopDetection() -*/ -void QSensorGestureRecognizer::stopBackend() -{ - if (!d_ptr->initialized) { - qWarning() << "Not stopping. Gesture Recognizer not initialized"; - return; - } - if (--d_ptr->count == 0) - stop(); -} - -QT_END_NAMESPACE diff --git a/src/sensors/gestures/qsensorgesturerecognizer.h b/src/sensors/gestures/qsensorgesturerecognizer.h deleted file mode 100644 index 4b855e12..00000000 --- a/src/sensors/gestures/qsensorgesturerecognizer.h +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSENSORGESTURERECOGNIZER_H -#define QSENSORGESTURERECOGNIZER_H - -#include <QtCore/QDebug> -#include <QtCore/QTimer> -#include <QtCore/QStringList> - -#include <QtSensors/qsensorgesture.h> - -QT_BEGIN_NAMESPACE - -class QSensorGestureRecognizerPrivate; -class Q_SENSORS_EXPORT QSensorGestureRecognizer : public QObject -{ - Q_OBJECT -public: - explicit QSensorGestureRecognizer(QObject *parent = nullptr); - virtual ~QSensorGestureRecognizer(); - - virtual QString id() const = 0; - - virtual bool isActive() = 0; - - void startBackend(); - void stopBackend(); - void createBackend(); - - QStringList gestureSignals() const; - -Q_SIGNALS: - void detected(const QString &); - -protected: - virtual void create() = 0; - virtual bool start() = 0; - virtual bool stop() = 0; - -private: - QSensorGestureRecognizerPrivate * d_ptr; -}; - -QT_END_NAMESPACE - -#endif // QSENSORGESTURERECOGNIZER_H diff --git a/src/sensors/make_sensor.pl b/src/sensors/make_sensor.pl index 289e0dd7..74213f09 100755 --- a/src/sensors/make_sensor.pl +++ b/src/sensors/make_sensor.pl @@ -1,42 +1,6 @@ #!/usr/bin/perl -############################################################################# -## -## Copyright (C) 2021 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the QtSensors module of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 3 as published by the Free Software -## Foundation and appearing in the file LICENSE.LGPL3 included in the -## packaging of this file. Please review the following information to -## ensure the GNU Lesser General Public License version 3 requirements -## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 2.0 or (at your option) the GNU General -## Public license version 3 or any later version approved by the KDE Free -## Qt Foundation. The licenses are as published by the Free Software -## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-2.0.html and -## https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# +# Copyright (C) 2021 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 # About this script # @@ -118,7 +82,7 @@ QT_BEGIN_NAMESPACE class '.$sensor.'; -class Q_SENSORSQUICK_PRIVATE_EXPORT '.$qmlsensor.' : public QmlSensor +class Q_SENSORSQUICK_EXPORT '.$qmlsensor.' : public QmlSensor { Q_OBJECT QML_NAMED_ELEMENT('.$no_q_sensor.') @@ -135,7 +99,7 @@ private: '.$sensor.' *m_sensor; }; -class Q_SENSORSQUICK_PRIVATE_EXPORT '.$qmlreading.' : public QmlSensorReading +class Q_SENSORSQUICK_EXPORT '.$qmlreading.' : public QmlSensorReading { Q_OBJECT Q_PROPERTY(qreal myprop READ myprop NOTIFY mypropChanged BINDABLE bindableMyprop) diff --git a/src/sensors/qaccelerometer.cpp b/src/sensors/qaccelerometer.cpp index a2603401..685b3e16 100644 --- a/src/sensors/qaccelerometer.cpp +++ b/src/sensors/qaccelerometer.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qaccelerometer.h" #include "qaccelerometer_p.h" diff --git a/src/sensors/qaccelerometer.h b/src/sensors/qaccelerometer.h index 32bdaaa8..ac2e29fb 100644 --- a/src/sensors/qaccelerometer.h +++ b/src/sensors/qaccelerometer.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QACCELEROMETER_H #define QACCELEROMETER_H diff --git a/src/sensors/qaccelerometer_p.h b/src/sensors/qaccelerometer_p.h index fece405b..c39c1947 100644 --- a/src/sensors/qaccelerometer_p.h +++ b/src/sensors/qaccelerometer_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QACCELEROMETER_P_H #define QACCELEROMETER_P_H diff --git a/src/sensors/qambientlightsensor.cpp b/src/sensors/qambientlightsensor.cpp index 3d5c2455..c7bec4c7 100644 --- a/src/sensors/qambientlightsensor.cpp +++ b/src/sensors/qambientlightsensor.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qambientlightsensor.h" #include "qambientlightsensor_p.h" diff --git a/src/sensors/qambientlightsensor.h b/src/sensors/qambientlightsensor.h index d9b3ea7f..962cf4aa 100644 --- a/src/sensors/qambientlightsensor.h +++ b/src/sensors/qambientlightsensor.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QAMBIENTLIGHTSENSOR_H #define QAMBIENTLIGHTSENSOR_H diff --git a/src/sensors/qambientlightsensor_p.h b/src/sensors/qambientlightsensor_p.h index ed0a8c26..ace40c33 100644 --- a/src/sensors/qambientlightsensor_p.h +++ b/src/sensors/qambientlightsensor_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QAMBIENTLIGHTSENSOR_P_H #define QAMBIENTLIGHTSENSOR_P_H @@ -51,6 +15,8 @@ // We mean it. // +#include <QtCore/private/qglobal_p.h> + QT_BEGIN_NAMESPACE class QAmbientLightReadingPrivate diff --git a/src/sensors/qambienttemperaturesensor.cpp b/src/sensors/qambienttemperaturesensor.cpp index ff973300..7c94a66d 100644 --- a/src/sensors/qambienttemperaturesensor.cpp +++ b/src/sensors/qambienttemperaturesensor.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Research In Motion -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Research In Motion +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include <qambienttemperaturesensor.h> #include "qambienttemperaturesensor_p.h" diff --git a/src/sensors/qambienttemperaturesensor.h b/src/sensors/qambienttemperaturesensor.h index 9e17ba1f..f31916fd 100644 --- a/src/sensors/qambienttemperaturesensor.h +++ b/src/sensors/qambienttemperaturesensor.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Research In Motion -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Research In Motion +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QAMBIENTTEMPERATURESENSOR_H #define QAMBIENTTEMPERATURESENSOR_H diff --git a/src/sensors/qambienttemperaturesensor_p.h b/src/sensors/qambienttemperaturesensor_p.h index 7847925e..177dd267 100644 --- a/src/sensors/qambienttemperaturesensor_p.h +++ b/src/sensors/qambienttemperaturesensor_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Research In Motion -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Research In Motion +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QAMBIENTTEMPERATURESENSOR_P_H #define QAMBIENTTEMPERATURESENSOR_P_H @@ -50,6 +14,8 @@ // We mean it. // +#include <QtCore/private/qglobal_p.h> + QT_BEGIN_NAMESPACE class QAmbientTemperatureReadingPrivate diff --git a/src/sensors/qcompass.cpp b/src/sensors/qcompass.cpp index adbd0f1d..cb689c30 100644 --- a/src/sensors/qcompass.cpp +++ b/src/sensors/qcompass.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qcompass.h" #include "qcompass_p.h" diff --git a/src/sensors/qcompass.h b/src/sensors/qcompass.h index 95c2de2f..3892298a 100644 --- a/src/sensors/qcompass.h +++ b/src/sensors/qcompass.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QCOMPASS_H #define QCOMPASS_H diff --git a/src/sensors/qcompass_p.h b/src/sensors/qcompass_p.h index bb45f205..9f8d7b74 100644 --- a/src/sensors/qcompass_p.h +++ b/src/sensors/qcompass_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QCOMPASS_P_H #define QCOMPASS_P_H @@ -51,6 +15,8 @@ // We mean it. // +#include <QtCore/private/qglobal_p.h> + QT_BEGIN_NAMESPACE class QCompassReadingPrivate diff --git a/src/sensors/qgyroscope.cpp b/src/sensors/qgyroscope.cpp index 5c4a3982..8ffd6934 100644 --- a/src/sensors/qgyroscope.cpp +++ b/src/sensors/qgyroscope.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qgyroscope.h" #include "qgyroscope_p.h" diff --git a/src/sensors/qgyroscope.h b/src/sensors/qgyroscope.h index d7247ade..43c1a452 100644 --- a/src/sensors/qgyroscope.h +++ b/src/sensors/qgyroscope.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QGYROSCOPE_H #define QGYROSCOPE_H diff --git a/src/sensors/qgyroscope_p.h b/src/sensors/qgyroscope_p.h index b8158421..dcc552cd 100644 --- a/src/sensors/qgyroscope_p.h +++ b/src/sensors/qgyroscope_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QGYROSCOPE_P_H #define QGYROSCOPE_P_H @@ -51,6 +15,8 @@ // We mean it. // +#include <QtCore/private/qglobal_p.h> + QT_BEGIN_NAMESPACE class QGyroscopeReadingPrivate diff --git a/src/sensors/qhumiditysensor.cpp b/src/sensors/qhumiditysensor.cpp index d2041548..9c0db944 100644 --- a/src/sensors/qhumiditysensor.cpp +++ b/src/sensors/qhumiditysensor.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Canonical Ltd -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Canonical Ltd +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include <qhumiditysensor.h> #include "qhumiditysensor_p.h" diff --git a/src/sensors/qhumiditysensor.h b/src/sensors/qhumiditysensor.h index 685d273a..76a83b2c 100644 --- a/src/sensors/qhumiditysensor.h +++ b/src/sensors/qhumiditysensor.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Canonical Ltd -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Canonical Ltd +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QHUMIDITYSENSOR_H #define QHUMIDITYSENSOR_H diff --git a/src/sensors/qhumiditysensor_p.h b/src/sensors/qhumiditysensor_p.h index 95b070ea..1d357c98 100644 --- a/src/sensors/qhumiditysensor_p.h +++ b/src/sensors/qhumiditysensor_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Canonical Ltd -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Canonical Ltd +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QHUMIDITYSENSOR_P_H #define QHUMIDITYSENSOR_P_H diff --git a/src/sensors/qirproximitysensor.cpp b/src/sensors/qirproximitysensor.cpp index ae3dfaf1..4d205d05 100644 --- a/src/sensors/qirproximitysensor.cpp +++ b/src/sensors/qirproximitysensor.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include <qirproximitysensor.h> #include "qirproximitysensor_p.h" diff --git a/src/sensors/qirproximitysensor.h b/src/sensors/qirproximitysensor.h index 57ea978c..ce22ab39 100644 --- a/src/sensors/qirproximitysensor.h +++ b/src/sensors/qirproximitysensor.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QIRPROXIMITYSENSOR_H #define QIRPROXIMITYSENSOR_H diff --git a/src/sensors/qirproximitysensor_p.h b/src/sensors/qirproximitysensor_p.h index 02c8275f..fb850928 100644 --- a/src/sensors/qirproximitysensor_p.h +++ b/src/sensors/qirproximitysensor_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QIRPROXIMITYSENSOR_P_H #define QIRPROXIMITYSENSOR_P_H @@ -51,6 +15,8 @@ // We mean it. // +#include <QtCore/private/qglobal_p.h> + QT_BEGIN_NAMESPACE class QIRProximityReadingPrivate diff --git a/src/sensors/qlidsensor.cpp b/src/sensors/qlidsensor.cpp index 6fb88e36..bc413242 100644 --- a/src/sensors/qlidsensor.cpp +++ b/src/sensors/qlidsensor.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Canonical, Ltd -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Canonical, Ltd +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include <qlidsensor.h> #include "qlidsensor_p.h" diff --git a/src/sensors/qlidsensor.h b/src/sensors/qlidsensor.h index 17d247df..c0861ff9 100644 --- a/src/sensors/qlidsensor.h +++ b/src/sensors/qlidsensor.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Canonical, Ltd -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Canonical, Ltd +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QLIDSENSOR_H #define QLIDSENSOR_H diff --git a/src/sensors/qlidsensor_p.h b/src/sensors/qlidsensor_p.h index 93d3b99e..ff14c0bd 100644 --- a/src/sensors/qlidsensor_p.h +++ b/src/sensors/qlidsensor_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Canonical, Ltd -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Canonical, Ltd +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QLIDSENSOR_P_H #define QLIDSENSOR_P_H @@ -50,6 +14,8 @@ // We mean it. // +#include <QtCore/private/qglobal_p.h> + QT_BEGIN_NAMESPACE class QLidReadingPrivate diff --git a/src/sensors/qlightsensor.cpp b/src/sensors/qlightsensor.cpp index a4e88ea5..0803f0e5 100644 --- a/src/sensors/qlightsensor.cpp +++ b/src/sensors/qlightsensor.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qlightsensor.h" #include "qlightsensor_p.h" diff --git a/src/sensors/qlightsensor.h b/src/sensors/qlightsensor.h index 6ba7e31a..89dfbcd5 100644 --- a/src/sensors/qlightsensor.h +++ b/src/sensors/qlightsensor.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QLIGHTSENSOR_H #define QLIGHTSENSOR_H diff --git a/src/sensors/qlightsensor_p.h b/src/sensors/qlightsensor_p.h index f57b6088..4a570ca2 100644 --- a/src/sensors/qlightsensor_p.h +++ b/src/sensors/qlightsensor_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QLIGHTSENSOR_P_H #define QLIGHTSENSOR_P_H diff --git a/src/sensors/qmagnetometer.cpp b/src/sensors/qmagnetometer.cpp index b92acfea..601ebb0a 100644 --- a/src/sensors/qmagnetometer.cpp +++ b/src/sensors/qmagnetometer.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qmagnetometer.h" #include "qmagnetometer_p.h" diff --git a/src/sensors/qmagnetometer.h b/src/sensors/qmagnetometer.h index a8d3cf7e..2e55a504 100644 --- a/src/sensors/qmagnetometer.h +++ b/src/sensors/qmagnetometer.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QMAGNETOMETER_H #define QMAGNETOMETER_H diff --git a/src/sensors/qmagnetometer_p.h b/src/sensors/qmagnetometer_p.h index 634378d5..7052e9e8 100644 --- a/src/sensors/qmagnetometer_p.h +++ b/src/sensors/qmagnetometer_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QMAGNETOMETER_P_H #define QMAGNETOMETER_P_H @@ -59,7 +23,7 @@ class QMagnetometerPrivate : public QSensorPrivate { public: QMagnetometerPrivate() - : returnGeoValues(false) + : returnGeoValues(true) { } diff --git a/src/sensors/qorientationsensor.cpp b/src/sensors/qorientationsensor.cpp index 29a493ab..4e0702f6 100644 --- a/src/sensors/qorientationsensor.cpp +++ b/src/sensors/qorientationsensor.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qorientationsensor.h" #include "qorientationsensor_p.h" diff --git a/src/sensors/qorientationsensor.h b/src/sensors/qorientationsensor.h index c97a61c2..b9436822 100644 --- a/src/sensors/qorientationsensor.h +++ b/src/sensors/qorientationsensor.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QORIENTATIONSENSOR_H #define QORIENTATIONSENSOR_H diff --git a/src/sensors/qorientationsensor_p.h b/src/sensors/qorientationsensor_p.h index 69b70157..4c39817c 100644 --- a/src/sensors/qorientationsensor_p.h +++ b/src/sensors/qorientationsensor_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QORIENTATIONSENSOR_P_H #define QORIENTATIONSENSOR_P_H @@ -51,6 +15,8 @@ // We mean it. // +#include <QtCore/private/qglobal_p.h> + QT_BEGIN_NAMESPACE class QOrientationReadingPrivate diff --git a/src/sensors/qpressuresensor.cpp b/src/sensors/qpressuresensor.cpp index 6e83315c..393e861f 100644 --- a/src/sensors/qpressuresensor.cpp +++ b/src/sensors/qpressuresensor.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Research In Motion -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Research In Motion +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include <qpressuresensor.h> #include "qpressuresensor_p.h" diff --git a/src/sensors/qpressuresensor.h b/src/sensors/qpressuresensor.h index 18c4d698..a3841b03 100644 --- a/src/sensors/qpressuresensor.h +++ b/src/sensors/qpressuresensor.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Research In Motion -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Research In Motion +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QPRESSURESENSOR_H #define QPRESSURESENSOR_H diff --git a/src/sensors/qpressuresensor_p.h b/src/sensors/qpressuresensor_p.h index 2caa1338..668e3956 100644 --- a/src/sensors/qpressuresensor_p.h +++ b/src/sensors/qpressuresensor_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Research In Motion -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Research In Motion +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QPRESSURESENSOR_P_H #define QPRESSURESENSOR_P_H @@ -50,6 +14,8 @@ // We mean it. // +#include <QtCore/private/qglobal_p.h> + QT_BEGIN_NAMESPACE class QPressureReadingPrivate diff --git a/src/sensors/qproximitysensor.cpp b/src/sensors/qproximitysensor.cpp index 37114444..73b609e3 100644 --- a/src/sensors/qproximitysensor.cpp +++ b/src/sensors/qproximitysensor.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qproximitysensor.h" #include "qproximitysensor_p.h" diff --git a/src/sensors/qproximitysensor.h b/src/sensors/qproximitysensor.h index 437a75db..5f7dc3c7 100644 --- a/src/sensors/qproximitysensor.h +++ b/src/sensors/qproximitysensor.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QPROXIMITYSENSOR_H #define QPROXIMITYSENSOR_H diff --git a/src/sensors/qproximitysensor_p.h b/src/sensors/qproximitysensor_p.h index 81f1604d..63dc5311 100644 --- a/src/sensors/qproximitysensor_p.h +++ b/src/sensors/qproximitysensor_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QPROXIMITYSENSOR_P_H #define QPROXIMITYSENSOR_P_H @@ -51,6 +15,8 @@ // We mean it. // +#include <QtCore/private/qglobal_p.h> + QT_BEGIN_NAMESPACE class QProximityReadingPrivate diff --git a/src/sensors/qrotationsensor.cpp b/src/sensors/qrotationsensor.cpp index ab6c2ace..c1536def 100644 --- a/src/sensors/qrotationsensor.cpp +++ b/src/sensors/qrotationsensor.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qrotationsensor.h" #include "qrotationsensor_p.h" diff --git a/src/sensors/qrotationsensor.h b/src/sensors/qrotationsensor.h index d62f5a8c..be9ecb65 100644 --- a/src/sensors/qrotationsensor.h +++ b/src/sensors/qrotationsensor.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QROTATIONSENSOR_H #define QROTATIONSENSOR_H diff --git a/src/sensors/qrotationsensor_p.h b/src/sensors/qrotationsensor_p.h index d1f07669..cc6f8a9a 100644 --- a/src/sensors/qrotationsensor_p.h +++ b/src/sensors/qrotationsensor_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QROTATIONSENSOR_P_H #define QROTATIONSENSOR_P_H diff --git a/src/sensors/qsensor.cpp b/src/sensors/qsensor.cpp index 97f8492c..72c58fe8 100644 --- a/src/sensors/qsensor.cpp +++ b/src/sensors/qsensor.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qsensor.h" #include "qsensor_p.h" @@ -280,7 +244,7 @@ void QSensorPrivate::init(const QByteArray &sensorType) Only use this constructor if there is no derived sensor class available. Note that all built-in sensors have a derived class, so using this constructor should only be necessary - when implementing custom sensors, like in the \l {Qt Sensors - Grue Sensor Example}{Grue sensor example}. + when implementing custom sensors. */ QSensor::QSensor(const QByteArray &type, QObject *parent) : QObject(*new QSensorPrivate, parent) @@ -563,9 +527,6 @@ void QSensor::setSkipDuplicates(bool skipDuplicates) continuous range of rates. A discrete rate is noted by having both values the same. - See the sensor_explorer example for an example of how to interpret and use - this information. - Note that this information is not mandatory as not all sensors have a rate at which they run. In such cases, the list will be empty. @@ -850,7 +811,7 @@ void QSensor::setOutputRange(int index) return; } bool warn = true; - if (index >= 0 && index < d->outputRanges.count()) { + if (index >= 0 && index < d->outputRanges.size()) { warn = false; d->outputRange = index; } diff --git a/src/sensors/qsensor.h b/src/sensors/qsensor.h index 3bc4fd59..d6ba3311 100644 --- a/src/sensors/qsensor.h +++ b/src/sensors/qsensor.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QSENSOR_H #define QSENSOR_H diff --git a/src/sensors/qsensor_p.h b/src/sensors/qsensor_p.h index 5d4fff0f..1b547fa1 100644 --- a/src/sensors/qsensor_p.h +++ b/src/sensors/qsensor_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QSENSOR_P_H #define QSENSOR_P_H diff --git a/src/sensors/qsensorbackend.cpp b/src/sensors/qsensorbackend.cpp index 1e75644b..beb56cf4 100644 --- a/src/sensors/qsensorbackend.cpp +++ b/src/sensors/qsensorbackend.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qsensorbackend.h" #include "qsensorbackend_p.h" diff --git a/src/sensors/qsensorbackend.h b/src/sensors/qsensorbackend.h index 58097c69..e890aec3 100644 --- a/src/sensors/qsensorbackend.h +++ b/src/sensors/qsensorbackend.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QSENSORBACKEND_H #define QSENSORBACKEND_H diff --git a/src/sensors/qsensorbackend_p.h b/src/sensors/qsensorbackend_p.h index 15835102..5d7ef2d2 100644 --- a/src/sensors/qsensorbackend_p.h +++ b/src/sensors/qsensorbackend_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Research In Motion -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Research In Motion +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QSENSORBACKEND_P_H #define QSENSORBACKEND_P_H diff --git a/src/sensors/qsensormanager.cpp b/src/sensors/qsensormanager.cpp index 0718c508..8ce509f4 100644 --- a/src/sensors/qsensormanager.cpp +++ b/src/sensors/qsensormanager.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qsensormanager.h" #include <QDebug> @@ -125,7 +89,7 @@ public: //read out setting line line.remove(QLatin1String(" ")); QStringList pair = line.split(QStringLiteral("=")); - if (pair.count() == 2) + if (pair.size() == 2) defaultIdentifierForType.insert(pair[0].toLatin1(), pair[1].toLatin1()); } } @@ -219,7 +183,7 @@ void QSensorManagerPrivate::loadPlugins() if (d->loadExternalPlugins) { SENSORLOG() << "initializing plugins"; QList<QPluginParsedMetaData> meta = d->loader->metaData(); - for (int i = 0; i < meta.count(); i++) { + for (qsizetype i = 0; i < meta.size(); i++) { QObject *plugin = d->loader->instance(i); initPlugin(plugin); } @@ -258,8 +222,8 @@ void QSensorManagerPrivate::loadPlugins() */ void QSensorManager::registerBackend(const QByteArray &type, const QByteArray &identifier, QSensorBackendFactory *factory) { - Q_ASSERT(type.count()); - Q_ASSERT(identifier.count()); + Q_ASSERT(type.size()); + Q_ASSERT(identifier.size()); Q_ASSERT(factory); QSensorManagerPrivate *d = sensorManagerPrivate(); if (!d) return; // hardly likely but just in case... @@ -307,7 +271,7 @@ void QSensorManager::unregisterBackend(const QByteArray &type, const QByteArray (void)factoryByIdentifier.take(identifier); // we don't own this pointer anyway if (d->firstIdentifierForType[type] == identifier) { - if (factoryByIdentifier.count()) { + if (factoryByIdentifier.size()) { d->firstIdentifierForType[type] = factoryByIdentifier.begin().key(); if (d->firstIdentifierForType[type].startsWith("generic.")) { // Don't let a generic backend be the default when some other backend exists! @@ -323,7 +287,7 @@ void QSensorManager::unregisterBackend(const QByteArray &type, const QByteArray (void)d->firstIdentifierForType.take(type); } } - if (!factoryByIdentifier.count()) + if (!factoryByIdentifier.size()) (void)d->backendsByType.take(type); // Notify the app that the available sensor list has changed. diff --git a/src/sensors/qsensormanager.h b/src/sensors/qsensormanager.h index 375c9ef1..5957ee7a 100644 --- a/src/sensors/qsensormanager.h +++ b/src/sensors/qsensormanager.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QSENSORMANAGER_H #define QSENSORMANAGER_H diff --git a/src/sensors/qsensorplugin.cpp b/src/sensors/qsensorplugin.cpp index 186539b7..bb85d574 100644 --- a/src/sensors/qsensorplugin.cpp +++ b/src/sensors/qsensorplugin.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qsensorplugin.h" diff --git a/src/sensors/qsensorplugin.h b/src/sensors/qsensorplugin.h index fc3a44d7..3c8f4847 100644 --- a/src/sensors/qsensorplugin.h +++ b/src/sensors/qsensorplugin.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QSENSORPLUGIN_H #define QSENSORPLUGIN_H diff --git a/src/sensors/qsensorsglobal.h b/src/sensors/qsensorsglobal.h index 3dd4eeb8..4a6a130c 100644 --- a/src/sensors/qsensorsglobal.h +++ b/src/sensors/qsensorsglobal.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QSENSORSGLOBAL_H #define QSENSORSGLOBAL_H diff --git a/src/sensors/qtapsensor.cpp b/src/sensors/qtapsensor.cpp index c9cb0eb3..378f0e39 100644 --- a/src/sensors/qtapsensor.cpp +++ b/src/sensors/qtapsensor.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qtapsensor.h" #include "qtapsensor_p.h" diff --git a/src/sensors/qtapsensor.h b/src/sensors/qtapsensor.h index ce546cc2..6a76c311 100644 --- a/src/sensors/qtapsensor.h +++ b/src/sensors/qtapsensor.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QTAPSENSOR_H #define QTAPSENSOR_H diff --git a/src/sensors/qtapsensor_p.h b/src/sensors/qtapsensor_p.h index abfb134a..4a9a37f5 100644 --- a/src/sensors/qtapsensor_p.h +++ b/src/sensors/qtapsensor_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QTAPSENSOR_P_H #define QTAPSENSOR_P_H diff --git a/src/sensors/qtiltsensor.cpp b/src/sensors/qtiltsensor.cpp index 0e7f35f8..bda3c0a5 100644 --- a/src/sensors/qtiltsensor.cpp +++ b/src/sensors/qtiltsensor.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qtiltsensor.h" #include "qtiltsensor_p.h" diff --git a/src/sensors/qtiltsensor.h b/src/sensors/qtiltsensor.h index 61bb37e9..50584199 100644 --- a/src/sensors/qtiltsensor.h +++ b/src/sensors/qtiltsensor.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QTILTSENSOR_H #define QTILTSENSOR_H diff --git a/src/sensors/qtiltsensor_p.h b/src/sensors/qtiltsensor_p.h index b6a49b00..838c6042 100644 --- a/src/sensors/qtiltsensor_p.h +++ b/src/sensors/qtiltsensor_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QTILTSENSOR_P_H #define QTILTSENSOR_P_H @@ -51,6 +15,8 @@ // We mean it. // +#include <QtCore/private/qglobal_p.h> + QT_BEGIN_NAMESPACE class QTiltReadingPrivate diff --git a/src/sensors/sensorlog_p.h b/src/sensors/sensorlog_p.h index 49e73166..ae3956cb 100644 --- a/src/sensors/sensorlog_p.h +++ b/src/sensors/sensorlog_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QSENSORLOG_P_H #define QSENSORLOG_P_H @@ -51,6 +15,8 @@ // We mean it. // +#include <QtCore/private/qglobal_p.h> + QT_BEGIN_NAMESPACE #ifdef ENABLE_RUNTIME_SENSORLOG |