summaryrefslogtreecommitdiffstats
path: root/src/plugins/generic
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/generic')
-rw-r--r--src/plugins/generic/CMakeLists.txt24
-rw-r--r--src/plugins/generic/bsdkeyboard/bsdkeyboard.pro16
-rw-r--r--src/plugins/generic/bsdkeyboard/main.cpp40
-rw-r--r--src/plugins/generic/bsdkeyboard/qbsdkeyboard.cpp40
-rw-r--r--src/plugins/generic/bsdkeyboard/qbsdkeyboard.h44
-rw-r--r--src/plugins/generic/bsdkeyboard/qbsdkeyboard_defaultmap.h42
-rw-r--r--src/plugins/generic/bsdmouse/bsdmouse.pro16
-rw-r--r--src/plugins/generic/bsdmouse/main.cpp40
-rw-r--r--src/plugins/generic/bsdmouse/qbsdmouse.cpp41
-rw-r--r--src/plugins/generic/bsdmouse/qbsdmouse.h40
-rw-r--r--src/plugins/generic/evdevkeyboard/CMakeLists.txt20
-rw-r--r--src/plugins/generic/evdevkeyboard/evdevkeyboard.pro13
-rw-r--r--src/plugins/generic/evdevkeyboard/main.cpp43
-rw-r--r--src/plugins/generic/evdevmouse/CMakeLists.txt20
-rw-r--r--src/plugins/generic/evdevmouse/evdevmouse.pro13
-rw-r--r--src/plugins/generic/evdevmouse/main.cpp43
-rw-r--r--src/plugins/generic/evdevtablet/CMakeLists.txt20
-rw-r--r--src/plugins/generic/evdevtablet/evdevtablet.pro13
-rw-r--r--src/plugins/generic/evdevtablet/main.cpp42
-rw-r--r--src/plugins/generic/evdevtouch/CMakeLists.txt20
-rw-r--r--src/plugins/generic/evdevtouch/evdevtouch.pro13
-rw-r--r--src/plugins/generic/evdevtouch/main.cpp42
-rw-r--r--src/plugins/generic/generic.pro24
-rw-r--r--src/plugins/generic/libinput/CMakeLists.txt20
-rw-r--r--src/plugins/generic/libinput/libinput.pro12
-rw-r--r--src/plugins/generic/libinput/main.cpp44
-rw-r--r--src/plugins/generic/tslib/CMakeLists.txt23
-rw-r--r--src/plugins/generic/tslib/main.cpp44
-rw-r--r--src/plugins/generic/tslib/tslib.pro14
-rw-r--r--src/plugins/generic/tuiotouch/CMakeLists.txt27
-rw-r--r--src/plugins/generic/tuiotouch/main.cpp46
-rw-r--r--src/plugins/generic/tuiotouch/qoscbundle.cpp48
-rw-r--r--src/plugins/generic/tuiotouch/qoscbundle_p.h58
-rw-r--r--src/plugins/generic/tuiotouch/qoscmessage.cpp48
-rw-r--r--src/plugins/generic/tuiotouch/qoscmessage_p.h53
-rw-r--r--src/plugins/generic/tuiotouch/qtuio_p.h42
-rw-r--r--src/plugins/generic/tuiotouch/qtuiocursor_p.h60
-rw-r--r--src/plugins/generic/tuiotouch/qtuiohandler.cpp161
-rw-r--r--src/plugins/generic/tuiotouch/qtuiohandler_p.h53
-rw-r--r--src/plugins/generic/tuiotouch/qtuiotoken_p.h62
-rw-r--r--src/plugins/generic/tuiotouch/tuiotouch.pro28
41 files changed, 352 insertions, 1160 deletions
diff --git a/src/plugins/generic/CMakeLists.txt b/src/plugins/generic/CMakeLists.txt
new file mode 100644
index 0000000000..6d3cf2a925
--- /dev/null
+++ b/src/plugins/generic/CMakeLists.txt
@@ -0,0 +1,24 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+if(QT_FEATURE_evdev)
+ add_subdirectory(evdevmouse)
+ add_subdirectory(evdevtouch)
+ add_subdirectory(evdevkeyboard)
+endif()
+if(QT_FEATURE_evdev AND QT_FEATURE_tabletevent)
+ add_subdirectory(evdevtablet)
+endif()
+if(QT_FEATURE_tslib)
+ add_subdirectory(tslib)
+endif()
+if(QT_FEATURE_tuiotouch)
+ add_subdirectory(tuiotouch)
+endif()
+if(QT_FEATURE_libinput)
+ add_subdirectory(libinput)
+endif()
+if(FREEBSD)
+ # add_subdirectory(bsdkeyboard) # TODO: QTBUG-112770
+ # add_subdirectory(bsdmouse) # TODO: QTBUG-112770
+endif()
diff --git a/src/plugins/generic/bsdkeyboard/bsdkeyboard.pro b/src/plugins/generic/bsdkeyboard/bsdkeyboard.pro
deleted file mode 100644
index c14c38c839..0000000000
--- a/src/plugins/generic/bsdkeyboard/bsdkeyboard.pro
+++ /dev/null
@@ -1,16 +0,0 @@
-TARGET = qbsdkeyboardplugin
-
-PLUGIN_TYPE = generic
-PLUGIN_EXTENDS = -
-PLUGIN_CLASS_NAME = QBsdKeyboardPlugin
-load(qt_plugin)
-
-QT += core gui-private
-
-HEADERS = qbsdkeyboard.h
-SOURCES = main.cpp \
- qbsdkeyboard.cpp
-
-OTHER_FILES += \
- qbsdkeyboard.json
-
diff --git a/src/plugins/generic/bsdkeyboard/main.cpp b/src/plugins/generic/bsdkeyboard/main.cpp
index b65d500230..3308d5007e 100644
--- a/src/plugins/generic/bsdkeyboard/main.cpp
+++ b/src/plugins/generic/bsdkeyboard/main.cpp
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2015-2016 Oleksandr Tymoshenko <gonzo@bluezbox.com>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins 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) 2015-2016 Oleksandr Tymoshenko <gonzo@bluezbox.com>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include <QtGui/qgenericplugin.h>
#include "qbsdkeyboard.h"
diff --git a/src/plugins/generic/bsdkeyboard/qbsdkeyboard.cpp b/src/plugins/generic/bsdkeyboard/qbsdkeyboard.cpp
index 784ec54542..f2f177e9a2 100644
--- a/src/plugins/generic/bsdkeyboard/qbsdkeyboard.cpp
+++ b/src/plugins/generic/bsdkeyboard/qbsdkeyboard.cpp
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2015-2016 Oleksandr Tymoshenko <gonzo@bluezbox.com>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins 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) 2015-2016 Oleksandr Tymoshenko <gonzo@bluezbox.com>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "qbsdkeyboard.h"
diff --git a/src/plugins/generic/bsdkeyboard/qbsdkeyboard.h b/src/plugins/generic/bsdkeyboard/qbsdkeyboard.h
index 46d8988d3a..6ae3ca2317 100644
--- a/src/plugins/generic/bsdkeyboard/qbsdkeyboard.h
+++ b/src/plugins/generic/bsdkeyboard/qbsdkeyboard.h
@@ -1,48 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2015-2016 Oleksandr Tymoshenko <gonzo@bluezbox.com>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins 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) 2015-2016 Oleksandr Tymoshenko <gonzo@bluezbox.com>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QBSDKEYBOARD_H
#define QBSDKEYBOARD_H
#include <qobject.h>
#include <QDataStream>
-#include <QVector>
+#include <QList>
QT_BEGIN_NAMESPACE
@@ -137,7 +101,7 @@ private:
bool m_numLock = false;
bool m_scrollLock = false;
- QVector<QBsdKeyboardMap::Mapping> m_keymap;
+ QList<QBsdKeyboardMap::Mapping> m_keymap;
};
QT_END_NAMESPACE
diff --git a/src/plugins/generic/bsdkeyboard/qbsdkeyboard_defaultmap.h b/src/plugins/generic/bsdkeyboard/qbsdkeyboard_defaultmap.h
index 69c03b3daf..e229f757dc 100644
--- a/src/plugins/generic/bsdkeyboard/qbsdkeyboard_defaultmap.h
+++ b/src/plugins/generic/bsdkeyboard/qbsdkeyboard_defaultmap.h
@@ -1,42 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Copyright (C) 2015-2016 Oleksandr Tymoshenko <gonzo@bluezbox.com>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins 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.
+// Copyright (C) 2015-2016 Oleksandr Tymoshenko <gonzo@bluezbox.com>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QBSDKEYBOARD_DEFAULTMAP_P_H
#define QBSDKEYBOARD_DEFAULTMAP_P_H
diff --git a/src/plugins/generic/bsdmouse/bsdmouse.pro b/src/plugins/generic/bsdmouse/bsdmouse.pro
deleted file mode 100644
index 11949b95d5..0000000000
--- a/src/plugins/generic/bsdmouse/bsdmouse.pro
+++ /dev/null
@@ -1,16 +0,0 @@
-TARGET = qbsdmouseplugin
-
-PLUGIN_TYPE = generic
-PLUGIN_EXTENDS = -
-PLUGIN_CLASS_NAME = QBsdMousePlugin
-load(qt_plugin)
-
-QT += core-private gui-private
-
-HEADERS = qbsdmouse.h
-SOURCES = main.cpp \
- qbsdmouse.cpp
-
-OTHER_FILES += \
- qbsdmouse.json
-
diff --git a/src/plugins/generic/bsdmouse/main.cpp b/src/plugins/generic/bsdmouse/main.cpp
index d676d5a1bb..59d995f8b9 100644
--- a/src/plugins/generic/bsdmouse/main.cpp
+++ b/src/plugins/generic/bsdmouse/main.cpp
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2015-2016 Oleksandr Tymoshenko <gonzo@bluezbox.com>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins 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) 2015-2016 Oleksandr Tymoshenko <gonzo@bluezbox.com>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include <QtGui/qgenericplugin.h>
#include "qbsdmouse.h"
diff --git a/src/plugins/generic/bsdmouse/qbsdmouse.cpp b/src/plugins/generic/bsdmouse/qbsdmouse.cpp
index 55905199b8..d4ed6bba2d 100644
--- a/src/plugins/generic/bsdmouse/qbsdmouse.cpp
+++ b/src/plugins/generic/bsdmouse/qbsdmouse.cpp
@@ -1,44 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2015-2016 Oleksandr Tymoshenko <gonzo@bluezbox.com>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins 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) 2015-2016 Oleksandr Tymoshenko <gonzo@bluezbox.com>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "qbsdmouse.h"
+#include <QFile>
#include <QSocketNotifier>
#include <QStringList>
#include <QPoint>
diff --git a/src/plugins/generic/bsdmouse/qbsdmouse.h b/src/plugins/generic/bsdmouse/qbsdmouse.h
index 724b9c8484..7c503f7cc4 100644
--- a/src/plugins/generic/bsdmouse/qbsdmouse.h
+++ b/src/plugins/generic/bsdmouse/qbsdmouse.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2015-2016 Oleksandr Tymoshenko <gonzo@bluezbox.com>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins 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) 2015-2016 Oleksandr Tymoshenko <gonzo@bluezbox.com>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QBSDMOUSE_H
#define QBSDMOUSE_H
diff --git a/src/plugins/generic/evdevkeyboard/CMakeLists.txt b/src/plugins/generic/evdevkeyboard/CMakeLists.txt
new file mode 100644
index 0000000000..53be12face
--- /dev/null
+++ b/src/plugins/generic/evdevkeyboard/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+#####################################################################
+## QEvdevKeyboardPlugin Plugin:
+#####################################################################
+
+qt_internal_add_plugin(QEvdevKeyboardPlugin
+ OUTPUT_NAME qevdevkeyboardplugin
+ PLUGIN_TYPE generic
+ DEFAULT_IF FALSE
+ SOURCES
+ main.cpp
+ LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
+)
diff --git a/src/plugins/generic/evdevkeyboard/evdevkeyboard.pro b/src/plugins/generic/evdevkeyboard/evdevkeyboard.pro
deleted file mode 100644
index 73fddf4d26..0000000000
--- a/src/plugins/generic/evdevkeyboard/evdevkeyboard.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-TARGET = qevdevkeyboardplugin
-
-QT += core-private gui-private input_support-private
-
-SOURCES = main.cpp
-
-OTHER_FILES += \
- evdevkeyboard.json
-
-PLUGIN_TYPE = generic
-PLUGIN_EXTENDS = -
-PLUGIN_CLASS_NAME = QEvdevKeyboardPlugin
-load(qt_plugin)
diff --git a/src/plugins/generic/evdevkeyboard/main.cpp b/src/plugins/generic/evdevkeyboard/main.cpp
index 5c170e1a06..2931fea907 100644
--- a/src/plugins/generic/evdevkeyboard/main.cpp
+++ b/src/plugins/generic/evdevkeyboard/main.cpp
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtGui 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 <QtGui/qgenericplugin.h>
#include <QtInputSupport/private/qevdevkeyboardmanager_p.h>
@@ -63,7 +27,8 @@ QObject* QEvdevKeyboardPlugin::create(const QString &key,
{
if (!key.compare(QLatin1String("EvdevKeyboard"), Qt::CaseInsensitive))
return new QEvdevKeyboardManager(key, specification);
- return 0;
+
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/generic/evdevmouse/CMakeLists.txt b/src/plugins/generic/evdevmouse/CMakeLists.txt
new file mode 100644
index 0000000000..e0836ecccc
--- /dev/null
+++ b/src/plugins/generic/evdevmouse/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+#####################################################################
+## QEvdevMousePlugin Plugin:
+#####################################################################
+
+qt_internal_add_plugin(QEvdevMousePlugin
+ OUTPUT_NAME qevdevmouseplugin
+ PLUGIN_TYPE generic
+ DEFAULT_IF FALSE
+ SOURCES
+ main.cpp
+ LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
+)
diff --git a/src/plugins/generic/evdevmouse/evdevmouse.pro b/src/plugins/generic/evdevmouse/evdevmouse.pro
deleted file mode 100644
index f3a8558ef2..0000000000
--- a/src/plugins/generic/evdevmouse/evdevmouse.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-TARGET = qevdevmouseplugin
-
-QT += core-private gui-private input_support-private
-
-SOURCES = main.cpp
-
-OTHER_FILES += \
- evdevmouse.json
-
-PLUGIN_TYPE = generic
-PLUGIN_EXTENDS = -
-PLUGIN_CLASS_NAME = QEvdevMousePlugin
-load(qt_plugin)
diff --git a/src/plugins/generic/evdevmouse/main.cpp b/src/plugins/generic/evdevmouse/main.cpp
index 1b8517f4c4..9629d2c927 100644
--- a/src/plugins/generic/evdevmouse/main.cpp
+++ b/src/plugins/generic/evdevmouse/main.cpp
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins 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 <QtGui/qgenericplugin.h>
#include <QtInputSupport/private/qevdevmousemanager_p.h>
@@ -63,7 +27,8 @@ QObject* QEvdevMousePlugin::create(const QString &key,
{
if (!key.compare(QLatin1String("EvdevMouse"), Qt::CaseInsensitive))
return new QEvdevMouseManager(key, specification);
- return 0;
+
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/generic/evdevtablet/CMakeLists.txt b/src/plugins/generic/evdevtablet/CMakeLists.txt
new file mode 100644
index 0000000000..ef21469f70
--- /dev/null
+++ b/src/plugins/generic/evdevtablet/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+#####################################################################
+## QEvdevTabletPlugin Plugin:
+#####################################################################
+
+qt_internal_add_plugin(QEvdevTabletPlugin
+ OUTPUT_NAME qevdevtabletplugin
+ PLUGIN_TYPE generic
+ DEFAULT_IF FALSE
+ SOURCES
+ main.cpp
+ LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
+)
diff --git a/src/plugins/generic/evdevtablet/evdevtablet.pro b/src/plugins/generic/evdevtablet/evdevtablet.pro
deleted file mode 100644
index 1409cd83c9..0000000000
--- a/src/plugins/generic/evdevtablet/evdevtablet.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-TARGET = qevdevtabletplugin
-
-SOURCES = main.cpp
-
-QT += core-private gui-private input_support-private
-
-OTHER_FILES += \
- evdevtablet.json
-
-PLUGIN_TYPE = generic
-PLUGIN_EXTENDS = -
-PLUGIN_CLASS_NAME = QEvdevTabletPlugin
-load(qt_plugin)
diff --git a/src/plugins/generic/evdevtablet/main.cpp b/src/plugins/generic/evdevtablet/main.cpp
index f43a32910d..6313c09921 100644
--- a/src/plugins/generic/evdevtablet/main.cpp
+++ b/src/plugins/generic/evdevtablet/main.cpp
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins 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 <QtGui/qgenericplugin.h>
#include <QtInputSupport/private/qevdevtabletmanager_p.h>
@@ -63,7 +27,7 @@ QObject* QEvdevTabletPlugin::create(const QString &key,
if (!key.compare(QLatin1String("EvdevTablet"), Qt::CaseInsensitive))
return new QEvdevTabletManager(key, spec);
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/generic/evdevtouch/CMakeLists.txt b/src/plugins/generic/evdevtouch/CMakeLists.txt
new file mode 100644
index 0000000000..f3f489586a
--- /dev/null
+++ b/src/plugins/generic/evdevtouch/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+#####################################################################
+## QEvdevTouchScreenPlugin Plugin:
+#####################################################################
+
+qt_internal_add_plugin(QEvdevTouchScreenPlugin
+ OUTPUT_NAME qevdevtouchplugin
+ PLUGIN_TYPE generic
+ DEFAULT_IF FALSE
+ SOURCES
+ main.cpp
+ LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
+)
diff --git a/src/plugins/generic/evdevtouch/evdevtouch.pro b/src/plugins/generic/evdevtouch/evdevtouch.pro
deleted file mode 100644
index 3ca646aaca..0000000000
--- a/src/plugins/generic/evdevtouch/evdevtouch.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-TARGET = qevdevtouchplugin
-
-SOURCES = main.cpp
-
-QT += core-private gui-private input_support-private
-
-OTHER_FILES += \
- evdevtouch.json
-
-PLUGIN_TYPE = generic
-PLUGIN_EXTENDS = -
-PLUGIN_CLASS_NAME = QEvdevTouchScreenPlugin
-load(qt_plugin)
diff --git a/src/plugins/generic/evdevtouch/main.cpp b/src/plugins/generic/evdevtouch/main.cpp
index f1a0ad53ab..f39f9645bc 100644
--- a/src/plugins/generic/evdevtouch/main.cpp
+++ b/src/plugins/generic/evdevtouch/main.cpp
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins 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 <QtGui/qgenericplugin.h>
#include <QtInputSupport/private/qevdevtouchmanager_p.h>
@@ -63,7 +27,7 @@ QObject* QEvdevTouchScreenPlugin::create(const QString &key,
if (!key.compare(QLatin1String("EvdevTouch"), Qt::CaseInsensitive))
return new QEvdevTouchManager(key, spec);
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/generic/generic.pro b/src/plugins/generic/generic.pro
deleted file mode 100644
index 980aa1a506..0000000000
--- a/src/plugins/generic/generic.pro
+++ /dev/null
@@ -1,24 +0,0 @@
-TEMPLATE = subdirs
-QT_FOR_CONFIG += gui-private
-
-qtConfig(evdev) {
- SUBDIRS += evdevmouse evdevtouch evdevkeyboard
- qtConfig(tabletevent): \
- SUBDIRS += evdevtablet
-}
-
-qtConfig(tslib) {
- SUBDIRS += tslib
-}
-
-qtConfig(tuiotouch) {
- SUBDIRS += tuiotouch
-}
-
-qtConfig(libinput) {
- SUBDIRS += libinput
-}
-
-freebsd {
- SUBDIRS += bsdkeyboard bsdmouse
-}
diff --git a/src/plugins/generic/libinput/CMakeLists.txt b/src/plugins/generic/libinput/CMakeLists.txt
new file mode 100644
index 0000000000..f92b3d5353
--- /dev/null
+++ b/src/plugins/generic/libinput/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+#####################################################################
+## QLibInputPlugin Plugin:
+#####################################################################
+
+qt_internal_add_plugin(QLibInputPlugin
+ OUTPUT_NAME qlibinputplugin
+ PLUGIN_TYPE generic
+ DEFAULT_IF FALSE
+ SOURCES
+ main.cpp
+ LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
+)
diff --git a/src/plugins/generic/libinput/libinput.pro b/src/plugins/generic/libinput/libinput.pro
deleted file mode 100644
index 434bf7b945..0000000000
--- a/src/plugins/generic/libinput/libinput.pro
+++ /dev/null
@@ -1,12 +0,0 @@
-TARGET = qlibinputplugin
-
-QT += core-private gui-private input_support-private
-
-SOURCES = main.cpp
-
-OTHER_FILES = libinput.json
-
-PLUGIN_TYPE = generic
-PLUGIN_EXTENDS = -
-PLUGIN_CLASS_NAME = QLibInputPlugin
-load(qt_plugin)
diff --git a/src/plugins/generic/libinput/main.cpp b/src/plugins/generic/libinput/main.cpp
index 6d1e76c0f0..a191fd3d9b 100644
--- a/src/plugins/generic/libinput/main.cpp
+++ b/src/plugins/generic/libinput/main.cpp
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtGui 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 <QtGui/qgenericplugin.h>
#include <QtInputSupport/private/qlibinputhandler_p.h>
@@ -48,7 +12,7 @@ class QLibInputPlugin : public QGenericPlugin
Q_PLUGIN_METADATA(IID QGenericPluginFactoryInterface_iid FILE "libinput.json")
public:
- QObject *create(const QString &key, const QString &specification);
+ QObject *create(const QString &key, const QString &specification) override;
};
QObject *QLibInputPlugin::create(const QString &key, const QString &specification)
@@ -56,7 +20,7 @@ QObject *QLibInputPlugin::create(const QString &key, const QString &specificatio
if (!key.compare(QLatin1String("libinput"), Qt::CaseInsensitive))
return new QLibInputHandler(key, specification);
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/generic/tslib/CMakeLists.txt b/src/plugins/generic/tslib/CMakeLists.txt
new file mode 100644
index 0000000000..8512133799
--- /dev/null
+++ b/src/plugins/generic/tslib/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+qt_find_package(Tslib)
+
+#####################################################################
+## QTsLibPlugin Plugin:
+#####################################################################
+
+qt_internal_add_plugin(QTsLibPlugin
+ OUTPUT_NAME qtslibplugin
+ PLUGIN_TYPE generic
+ DEFAULT_IF FALSE
+ SOURCES
+ main.cpp
+ LIBRARIES
+ PkgConfig::Tslib
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
+)
diff --git a/src/plugins/generic/tslib/main.cpp b/src/plugins/generic/tslib/main.cpp
index fb9e0c35f3..c2f4ccb105 100644
--- a/src/plugins/generic/tslib/main.cpp
+++ b/src/plugins/generic/tslib/main.cpp
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins 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 <QtGui/qgenericplugin.h>
#include <QtInputSupport/private/qtslib_p.h>
@@ -48,7 +12,7 @@ class QTsLibPlugin : public QGenericPlugin
Q_PLUGIN_METADATA(IID QGenericPluginFactoryInterface_iid FILE "tslib.json")
public:
- QObject* create(const QString &key, const QString &specification);
+ QObject* create(const QString &key, const QString &specification) override;
};
QObject* QTsLibPlugin::create(const QString &key,
@@ -58,7 +22,7 @@ QObject* QTsLibPlugin::create(const QString &key,
|| !key.compare(QLatin1String("TslibRaw"), Qt::CaseInsensitive))
return new QTsLibMouseHandler(key, specification);
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/generic/tslib/tslib.pro b/src/plugins/generic/tslib/tslib.pro
deleted file mode 100644
index 7c3a0bf607..0000000000
--- a/src/plugins/generic/tslib/tslib.pro
+++ /dev/null
@@ -1,14 +0,0 @@
-TARGET = qtslibplugin
-
-SOURCES = main.cpp
-
-QT += core-private gui-private input_support-private
-
-QMAKE_USE += tslib
-
-OTHER_FILES += tslib.json
-
-PLUGIN_TYPE = generic
-PLUGIN_EXTENDS = -
-PLUGIN_CLASS_NAME = QTsLibPlugin
-load(qt_plugin)
diff --git a/src/plugins/generic/tuiotouch/CMakeLists.txt b/src/plugins/generic/tuiotouch/CMakeLists.txt
new file mode 100644
index 0000000000..b03ed9e360
--- /dev/null
+++ b/src/plugins/generic/tuiotouch/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+#####################################################################
+## QTuioTouchPlugin Plugin:
+#####################################################################
+
+qt_internal_add_plugin(QTuioTouchPlugin
+ OUTPUT_NAME qtuiotouchplugin
+ PLUGIN_TYPE generic
+ DEFAULT_IF FALSE
+ SOURCES
+ main.cpp
+ qoscbundle.cpp qoscbundle_p.h
+ qoscmessage.cpp qoscmessage_p.h
+ qtuiocursor_p.h
+ qtuiohandler.cpp qtuiohandler_p.h
+ qtuiotoken_p.h
+ DEFINES
+ QT_NO_FOREACH
+ LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Network
+)
diff --git a/src/plugins/generic/tuiotouch/main.cpp b/src/plugins/generic/tuiotouch/main.cpp
index b424458e9f..037a5d64a0 100644
--- a/src/plugins/generic/tuiotouch/main.cpp
+++ b/src/plugins/generic/tuiotouch/main.cpp
@@ -1,42 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Robin Burchell <robin.burchell@viroteck.net>
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtCore 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) 2014 Robin Burchell <robin.burchell@viroteck.net>
+// 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 <QtGui/qgenericplugin.h>
#include <QCoreApplication>
@@ -53,7 +17,7 @@ class QTuioTouchPlugin : public QGenericPlugin
public:
QTuioTouchPlugin();
- QObject* create(const QString &key, const QString &specification);
+ QObject* create(const QString &key, const QString &specification) override;
};
QTuioTouchPlugin::QTuioTouchPlugin()
@@ -66,7 +30,7 @@ QObject* QTuioTouchPlugin::create(const QString &key,
if (!key.compare(QLatin1String("TuioTouch"), Qt::CaseInsensitive))
return new QTuioHandler(spec);
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/generic/tuiotouch/qoscbundle.cpp b/src/plugins/generic/tuiotouch/qoscbundle.cpp
index e9166922a1..195762d62c 100644
--- a/src/plugins/generic/tuiotouch/qoscbundle.cpp
+++ b/src/plugins/generic/tuiotouch/qoscbundle.cpp
@@ -1,42 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Robin Burchell <robin.burchell@viroteck.net>
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtCore 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) 2014 Robin Burchell <robin.burchell@viroteck.net>
+// 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 "qoscbundle_p.h"
#include "qtuio_p.h"
@@ -80,7 +44,7 @@ QOscBundle::QOscBundle(const QByteArray &data)
// "followed by an OSC Time
// Tag, followed by zero or more OSC Bundle Elements. The OSC-timetag is a
// 64-bit fixed point time tag whose semantics are described below."
- if (parsedBytes > (quint32)data.size() || data.size() - parsedBytes < sizeof(quint64))
+ if (parsedBytes > (quint32)data.size() || data.size() - parsedBytes < qsizetype(sizeof(quint64)))
return;
// "Time tags are represented by a 64 bit fixed point number. The first 32
@@ -101,7 +65,7 @@ QOscBundle::QOscBundle(const QByteArray &data)
if (oscTimeEpoch == 0 && oscTimePico == 1) {
// "The time tag value consisting of 63 zero bits followed by a
- // one in the least signifigant bit is a special case meaning
+ // one in the least significant bit is a special case meaning
// "immediately.""
isImmediate = true;
}
@@ -113,7 +77,7 @@ QOscBundle::QOscBundle(const QByteArray &data)
//
// in practice, a bundle can contain multiple bundles or messages,
// though, and each is prefixed by a size.
- if (data.size() - parsedBytes < sizeof(quint32))
+ if (data.size() - parsedBytes < qsizetype(sizeof(quint32)))
return;
quint32 size = qFromBigEndian<quint32>((const uchar*)data.constData() + parsedBytes);
diff --git a/src/plugins/generic/tuiotouch/qoscbundle_p.h b/src/plugins/generic/tuiotouch/qoscbundle_p.h
index cb3ec4d251..8c4e37fa8f 100644
--- a/src/plugins/generic/tuiotouch/qoscbundle_p.h
+++ b/src/plugins/generic/tuiotouch/qoscbundle_p.h
@@ -1,49 +1,13 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Robin Burchell <robin.burchell@viroteck.net>
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtCore 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) 2014 Robin Burchell <robin.burchell@viroteck.net>
+// 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 QOSCBUNDLE_P_H
#define QOSCBUNDLE_P_H
#include "qoscmessage_p.h"
-#include <QtCore/QVector>
+#include <QtCore/QList>
QT_BEGIN_NAMESPACE
@@ -51,24 +15,24 @@ class QByteArray;
class QOscBundle
{
- QOscBundle(); // for QVector, don't use
- friend class QVector<QOscBundle>;
+ QOscBundle(); // for QList, don't use
+ friend class QList<QOscBundle>;
public:
explicit QOscBundle(const QByteArray &data);
bool isValid() const { return m_isValid; }
- QVector<QOscBundle> bundles() const { return m_bundles; }
- QVector<QOscMessage> messages() const { return m_messages; }
+ QList<QOscBundle> bundles() const { return m_bundles; }
+ QList<QOscMessage> messages() const { return m_messages; }
private:
bool m_isValid;
bool m_immediate;
quint32 m_timeEpoch;
quint32 m_timePico;
- QVector<QOscBundle> m_bundles;
- QVector<QOscMessage> m_messages;
+ QList<QOscBundle> m_bundles;
+ QList<QOscMessage> m_messages;
};
-Q_DECLARE_TYPEINFO(QOscBundle, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(QOscBundle, Q_RELOCATABLE_TYPE);
QT_END_NAMESPACE
diff --git a/src/plugins/generic/tuiotouch/qoscmessage.cpp b/src/plugins/generic/tuiotouch/qoscmessage.cpp
index 3c30caa923..97a4b9e6a0 100644
--- a/src/plugins/generic/tuiotouch/qoscmessage.cpp
+++ b/src/plugins/generic/tuiotouch/qoscmessage.cpp
@@ -1,42 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Robin Burchell <robin.burchell@viroteck.net>
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtCore 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) 2014 Robin Burchell <robin.burchell@viroteck.net>
+// 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 "qoscmessage_p.h"
#include "qtuio_p.h"
@@ -92,7 +56,7 @@ QOscMessage::QOscMessage(const QByteArray &data)
return;
arguments.append(aString);
} else if (typeTag == 'i') { // int32
- if (parsedBytes > (quint32)data.size() || data.size() - parsedBytes < sizeof(quint32))
+ if (parsedBytes > (quint32)data.size() || data.size() - parsedBytes < qsizetype(sizeof(quint32)))
return;
quint32 anInt = qFromBigEndian<quint32>(data.constData() + parsedBytes);
@@ -101,10 +65,10 @@ QOscMessage::QOscMessage(const QByteArray &data)
// TODO: is int32 in OSC signed, or unsigned?
arguments.append((int)anInt);
} else if (typeTag == 'f') { // float32
- if (parsedBytes > (quint32)data.size() || data.size() - parsedBytes < sizeof(quint32))
+ if (parsedBytes > (quint32)data.size() || data.size() - parsedBytes < qsizetype(sizeof(quint32)))
return;
- Q_STATIC_ASSERT(sizeof(float) == sizeof(quint32));
+ static_assert(sizeof(float) == sizeof(quint32));
union {
quint32 u;
float f;
diff --git a/src/plugins/generic/tuiotouch/qoscmessage_p.h b/src/plugins/generic/tuiotouch/qoscmessage_p.h
index 76d40ceb18..d896c6a1dc 100644
--- a/src/plugins/generic/tuiotouch/qoscmessage_p.h
+++ b/src/plugins/generic/tuiotouch/qoscmessage_p.h
@@ -1,49 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Robin Burchell <robin.burchell@viroteck.net>
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtCore 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) 2014 Robin Burchell <robin.burchell@viroteck.net>
+// 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 QOSCMESSAGE_P_H
#define QOSCMESSAGE_P_H
#include <QtCore/QByteArray>
#include <QtCore/QVariant>
-#include <QtCore/QVector>
#include <QtCore/QList>
@@ -51,22 +14,22 @@ QT_BEGIN_NAMESPACE
class QOscMessage
{
- QOscMessage(); // for QVector, don't use
- friend class QVector<QOscMessage>;
+ QOscMessage(); // for QList, don't use
+ friend class QList<QOscMessage>;
public:
explicit QOscMessage(const QByteArray &data);
bool isValid() const { return m_isValid; }
QByteArray addressPattern() const { return m_addressPattern; }
- QList<QVariant> arguments() const { return m_arguments; }
+ QVariantList arguments() const { return m_arguments; }
private:
bool m_isValid;
QByteArray m_addressPattern;
- QList<QVariant> m_arguments;
+ QVariantList m_arguments;
};
-Q_DECLARE_TYPEINFO(QOscMessage, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(QOscMessage, Q_RELOCATABLE_TYPE);
QT_END_NAMESPACE
diff --git a/src/plugins/generic/tuiotouch/qtuio_p.h b/src/plugins/generic/tuiotouch/qtuio_p.h
index 3ae5fd4571..211ec9d873 100644
--- a/src/plugins/generic/tuiotouch/qtuio_p.h
+++ b/src/plugins/generic/tuiotouch/qtuio_p.h
@@ -1,42 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Robin Burchell <robin.burchell@viroteck.net>
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtCore 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) 2014 Robin Burchell <robin.burchell@viroteck.net>
+// 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 QTUIO_P_H
#define QTUIO_P_H
diff --git a/src/plugins/generic/tuiotouch/qtuiocursor_p.h b/src/plugins/generic/tuiotouch/qtuiocursor_p.h
index 46134e6f3f..74c0bd265f 100644
--- a/src/plugins/generic/tuiotouch/qtuiocursor_p.h
+++ b/src/plugins/generic/tuiotouch/qtuiocursor_p.h
@@ -1,42 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Robin Burchell <robin.burchell@viroteck.net>
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtCore 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) 2014 Robin Burchell <robin.burchell@viroteck.net>
+// 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 QTUIOCURSOR_P_H
#define QTUIOCURSOR_P_H
@@ -55,7 +19,7 @@ public:
, m_vx(0)
, m_vy(0)
, m_acceleration(0)
- , m_state(Qt::TouchPointPressed)
+ , m_state(QEventPoint::State::Pressed)
{
}
@@ -63,9 +27,9 @@ public:
void setX(float x)
{
- if (state() == Qt::TouchPointStationary &&
+ if (state() == QEventPoint::State::Stationary &&
!qFuzzyCompare(m_x + 2.0, x + 2.0)) { // +2 because 1 is a valid value, and qFuzzyCompare can't cope with 0.0
- setState(Qt::TouchPointMoved);
+ setState(QEventPoint::State::Updated);
}
m_x = x;
}
@@ -73,9 +37,9 @@ public:
void setY(float y)
{
- if (state() == Qt::TouchPointStationary &&
+ if (state() == QEventPoint::State::Stationary &&
!qFuzzyCompare(m_y + 2.0, y + 2.0)) { // +2 because 1 is a valid value, and qFuzzyCompare can't cope with 0.0
- setState(Qt::TouchPointMoved);
+ setState(QEventPoint::State::Updated);
}
m_y = y;
}
@@ -90,8 +54,8 @@ public:
void setAcceleration(float acceleration) { m_acceleration = acceleration; }
float acceleration() const { return m_acceleration; }
- void setState(const Qt::TouchPointState &state) { m_state = state; }
- Qt::TouchPointState state() const { return m_state; }
+ void setState(const QEventPoint::State &state) { m_state = state; }
+ QEventPoint::State state() const { return m_state; }
private:
int m_id;
@@ -100,9 +64,9 @@ private:
float m_vx;
float m_vy;
float m_acceleration;
- Qt::TouchPointState m_state;
+ QEventPoint::State m_state;
};
-Q_DECLARE_TYPEINFO(QTuioCursor, Q_MOVABLE_TYPE); // Q_PRIMITIVE_TYPE: not possible, m_state is = 1, not 0.
+Q_DECLARE_TYPEINFO(QTuioCursor, Q_RELOCATABLE_TYPE); // Q_PRIMITIVE_TYPE: not possible, m_state is = 1, not 0.
QT_END_NAMESPACE
diff --git a/src/plugins/generic/tuiotouch/qtuiohandler.cpp b/src/plugins/generic/tuiotouch/qtuiohandler.cpp
index cb82672acd..2815368e84 100644
--- a/src/plugins/generic/tuiotouch/qtuiohandler.cpp
+++ b/src/plugins/generic/tuiotouch/qtuiohandler.cpp
@@ -1,42 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Robin Burchell <robin.burchell@viroteck.net>
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtCore 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) 2014 Robin Burchell <robin.burchell@viroteck.net>
+// 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 "qtuiohandler_p.h"
@@ -47,7 +11,7 @@
#include <qpa/qwindowsysteminterface.h>
-#include <QTouchDevice>
+#include <QPointingDevice>
#include <QWindow>
#include <QGuiApplication>
@@ -68,7 +32,6 @@ Q_LOGGING_CATEGORY(lcTuioSet, "qt.qpa.tuio.set")
static bool forceDelivery = qEnvironmentVariableIsSet("QT_TUIOTOUCH_DELIVER_WITHOUT_FOCUS");
QTuioHandler::QTuioHandler(const QString &specification)
- : m_device(new QTouchDevice) // not leaked, QTouchDevice cleans up registered devices itself
{
QStringList args = specification.split(':');
int portNumber = 3333;
@@ -76,7 +39,7 @@ QTuioHandler::QTuioHandler(const QString &specification)
bool invertx = false;
bool inverty = false;
- for (int i = 0; i < args.count(); ++i) {
+ for (int i = 0; i < args.size(); ++i) {
if (args.at(i).startsWith("udp=")) {
QString portString = args.at(i).section('=', 1, 1);
portNumber = portString.toInt();
@@ -96,6 +59,7 @@ QTuioHandler::QTuioHandler(const QString &specification)
case 180:
case 270:
rotationAngle = argValue;
+ break;
default:
break;
}
@@ -111,13 +75,17 @@ QTuioHandler::QTuioHandler(const QString &specification)
if (inverty)
m_transform *= QTransform::fromTranslate(0.5, 0.5).scale(1.0, -1.0).translate(-0.5, -0.5);
- m_device->setName("TUIO"); // TODO: multiple based on SOURCE?
- m_device->setType(QTouchDevice::TouchScreen);
- m_device->setCapabilities(QTouchDevice::Position |
- QTouchDevice::Area |
- QTouchDevice::Velocity |
- QTouchDevice::NormalizedPosition);
- QWindowSystemInterface::registerTouchDevice(m_device);
+ // not leaked, QPointingDevice cleans up registered devices itself
+ // TODO register each device based on SOURCE, not just an all-purpose generic touchscreen
+ // TODO define seats when multiple connections occur
+ m_device = new QPointingDevice(QLatin1String("TUIO"), 1, QInputDevice::DeviceType::TouchScreen,
+ QPointingDevice::PointerType::Finger,
+ QInputDevice::Capability::Position |
+ QInputDevice::Capability::Area |
+ QInputDevice::Capability::Velocity |
+ QInputDevice::Capability::NormalizedPosition,
+ 16, 0);
+ QWindowSystemInterface::registerInputDevice(m_device);
if (!m_socket.bind(QHostAddress::Any, portNumber)) {
qCWarning(lcTuioHandler) << "Failed to bind TUIO socket: " << m_socket.errorString();
@@ -155,7 +123,7 @@ void QTuioHandler::processPackets()
// messages. The FSEQ frame ID is incremented for each delivered bundle,
// while redundant bundles can be marked using the frame sequence ID
// -1."
- QVector<QOscMessage> messages;
+ QList<QOscMessage> messages;
QOscBundle bundle(datagram);
if (bundle.isValid()) {
@@ -169,10 +137,10 @@ void QTuioHandler::processPackets()
messages.push_back(msg);
}
- for (const QOscMessage &message : qAsConst(messages)) {
+ for (const QOscMessage &message : std::as_const(messages)) {
if (message.addressPattern() == "/tuio/2Dcur") {
QList<QVariant> arguments = message.arguments();
- if (arguments.count() == 0) {
+ if (arguments.size() == 0) {
qCWarning(lcTuioHandler, "Ignoring TUIO message with no arguments");
continue;
}
@@ -192,7 +160,7 @@ void QTuioHandler::processPackets()
}
} else if (message.addressPattern() == "/tuio/2Dobj") {
QList<QVariant> arguments = message.arguments();
- if (arguments.count() == 0) {
+ if (arguments.size() == 0) {
qCWarning(lcTuioHandler, "Ignoring TUIO message with no arguments");
continue;
}
@@ -221,12 +189,12 @@ void QTuioHandler::processPackets()
void QTuioHandler::process2DCurSource(const QOscMessage &message)
{
QList<QVariant> arguments = message.arguments();
- if (arguments.count() != 2) {
- qCWarning(lcTuioSource) << "Ignoring malformed TUIO source message: " << arguments.count();
+ if (arguments.size() != 2) {
+ qCWarning(lcTuioSource) << "Ignoring malformed TUIO source message: " << arguments.size();
return;
}
- if (QMetaType::Type(arguments.at(1).type()) != QMetaType::QByteArray) {
+ if (QMetaType::Type(arguments.at(1).userType()) != QMetaType::QByteArray) {
qCWarning(lcTuioSource, "Ignoring malformed TUIO source message (bad argument type)");
return;
}
@@ -247,8 +215,8 @@ void QTuioHandler::process2DCurAlive(const QOscMessage &message)
QMap<int, QTuioCursor> oldActiveCursors = m_activeCursors;
QMap<int, QTuioCursor> newActiveCursors;
- for (int i = 1; i < arguments.count(); ++i) {
- if (QMetaType::Type(arguments.at(i).type()) != QMetaType::Int) {
+ for (int i = 1; i < arguments.size(); ++i) {
+ if (QMetaType::Type(arguments.at(i).userType()) != QMetaType::Int) {
qCWarning(lcTuioHandler) << "Ignoring malformed TUIO alive message (bad argument on position" << i << arguments << ')';
return;
}
@@ -257,12 +225,12 @@ void QTuioHandler::process2DCurAlive(const QOscMessage &message)
if (!oldActiveCursors.contains(cursorId)) {
// newly active
QTuioCursor cursor(cursorId);
- cursor.setState(Qt::TouchPointPressed);
+ cursor.setState(QEventPoint::State::Pressed);
newActiveCursors.insert(cursorId, cursor);
} else {
// we already know about it, remove it so it isn't marked as released
QTuioCursor cursor = oldActiveCursors.value(cursorId);
- cursor.setState(Qt::TouchPointStationary); // position change in SET will update if needed
+ cursor.setState(QEventPoint::State::Stationary); // position change in SET will update if needed
newActiveCursors.insert(cursorId, cursor);
oldActiveCursors.remove(cursorId);
}
@@ -288,17 +256,17 @@ void QTuioHandler::process2DCurAlive(const QOscMessage &message)
void QTuioHandler::process2DCurSet(const QOscMessage &message)
{
QList<QVariant> arguments = message.arguments();
- if (arguments.count() < 7) {
- qCWarning(lcTuioSet) << "Ignoring malformed TUIO set message with too few arguments: " << arguments.count();
+ if (arguments.size() < 7) {
+ qCWarning(lcTuioSet) << "Ignoring malformed TUIO set message with too few arguments: " << arguments.size();
return;
}
- if (QMetaType::Type(arguments.at(1).type()) != QMetaType::Int ||
- QMetaType::Type(arguments.at(2).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(3).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(4).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(5).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(6).type()) != QMetaType::Float
+ if (QMetaType::Type(arguments.at(1).userType()) != QMetaType::Int ||
+ QMetaType::Type(arguments.at(2).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(3).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(4).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(5).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(6).userType()) != QMetaType::Float
) {
qCWarning(lcTuioSet) << "Ignoring malformed TUIO set message with bad types: " << arguments;
return;
@@ -359,7 +327,7 @@ void QTuioHandler::process2DCurFseq(const QOscMessage &message)
Q_UNUSED(message); // TODO: do we need to do anything with the frame id?
QWindow *win = QGuiApplication::focusWindow();
- if (!win && QGuiApplication::topLevelWindows().length() > 0 && forceDelivery)
+ if (!win && QGuiApplication::topLevelWindows().size() > 0 && forceDelivery)
win = QGuiApplication::topLevelWindows().at(0);
if (!win)
@@ -368,14 +336,14 @@ void QTuioHandler::process2DCurFseq(const QOscMessage &message)
QList<QWindowSystemInterface::TouchPoint> tpl;
tpl.reserve(m_activeCursors.size() + m_deadCursors.size());
- for (const QTuioCursor &tc : qAsConst(m_activeCursors)) {
+ for (const QTuioCursor &tc : std::as_const(m_activeCursors)) {
QWindowSystemInterface::TouchPoint tp = cursorToTouchPoint(tc, win);
tpl.append(tp);
}
- for (const QTuioCursor &tc : qAsConst(m_deadCursors)) {
+ for (const QTuioCursor &tc : std::as_const(m_deadCursors)) {
QWindowSystemInterface::TouchPoint tp = cursorToTouchPoint(tc, win);
- tp.state = Qt::TouchPointReleased;
+ tp.state = QEventPoint::State::Released;
tpl.append(tp);
}
QWindowSystemInterface::handleTouchEvent(win, m_device, tpl);
@@ -386,12 +354,12 @@ void QTuioHandler::process2DCurFseq(const QOscMessage &message)
void QTuioHandler::process2DObjSource(const QOscMessage &message)
{
QList<QVariant> arguments = message.arguments();
- if (arguments.count() != 2) {
- qCWarning(lcTuioSource, ) << "Ignoring malformed TUIO source message: " << arguments.count();
+ if (arguments.size() != 2) {
+ qCWarning(lcTuioSource ) << "Ignoring malformed TUIO source message: " << arguments.size();
return;
}
- if (QMetaType::Type(arguments.at(1).type()) != QMetaType::QByteArray) {
+ if (QMetaType::Type(arguments.at(1).userType()) != QMetaType::QByteArray) {
qCWarning(lcTuioSource, "Ignoring malformed TUIO source message (bad argument type)");
return;
}
@@ -412,8 +380,8 @@ void QTuioHandler::process2DObjAlive(const QOscMessage &message)
QMap<int, QTuioToken> oldActiveTokens = m_activeTokens;
QMap<int, QTuioToken> newActiveTokens;
- for (int i = 1; i < arguments.count(); ++i) {
- if (QMetaType::Type(arguments.at(i).type()) != QMetaType::Int) {
+ for (int i = 1; i < arguments.size(); ++i) {
+ if (QMetaType::Type(arguments.at(i).userType()) != QMetaType::Int) {
qCWarning(lcTuioHandler) << "Ignoring malformed TUIO alive message (bad argument on position" << i << arguments << ')';
return;
}
@@ -422,12 +390,12 @@ void QTuioHandler::process2DObjAlive(const QOscMessage &message)
if (!oldActiveTokens.contains(sessionId)) {
// newly active
QTuioToken token(sessionId);
- token.setState(Qt::TouchPointPressed);
+ token.setState(QEventPoint::State::Pressed);
newActiveTokens.insert(sessionId, token);
} else {
// we already know about it, remove it so it isn't marked as released
QTuioToken token = oldActiveTokens.value(sessionId);
- token.setState(Qt::TouchPointStationary); // position change in SET will update if needed
+ token.setState(QEventPoint::State::Stationary); // position change in SET will update if needed
newActiveTokens.insert(sessionId, token);
oldActiveTokens.remove(sessionId);
}
@@ -453,21 +421,21 @@ void QTuioHandler::process2DObjAlive(const QOscMessage &message)
void QTuioHandler::process2DObjSet(const QOscMessage &message)
{
QList<QVariant> arguments = message.arguments();
- if (arguments.count() < 7) {
- qCWarning(lcTuioSet) << "Ignoring malformed TUIO set message with too few arguments: " << arguments.count();
+ if (arguments.size() < 7) {
+ qCWarning(lcTuioSet) << "Ignoring malformed TUIO set message with too few arguments: " << arguments.size();
return;
}
- if (QMetaType::Type(arguments.at(1).type()) != QMetaType::Int ||
- QMetaType::Type(arguments.at(2).type()) != QMetaType::Int ||
- QMetaType::Type(arguments.at(3).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(4).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(5).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(6).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(7).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(8).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(9).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(10).type()) != QMetaType::Float) {
+ if (QMetaType::Type(arguments.at(1).userType()) != QMetaType::Int ||
+ QMetaType::Type(arguments.at(2).userType()) != QMetaType::Int ||
+ QMetaType::Type(arguments.at(3).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(4).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(5).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(6).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(7).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(8).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(9).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(10).userType()) != QMetaType::Float) {
qCWarning(lcTuioSet) << "Ignoring malformed TUIO set message with bad types: " << arguments;
return;
}
@@ -508,7 +476,6 @@ QWindowSystemInterface::TouchPoint QTuioHandler::tokenToTouchPoint(const QTuioTo
QWindowSystemInterface::TouchPoint tp;
tp.id = tc.id();
tp.uniqueId = tc.classId(); // TODO TUIO 2.0: populate a QVariant, and register the mapping from int to arbitrary UID data
- tp.flags = QTouchEvent::TouchPoint::Token;
tp.pressure = 1.0f;
tp.normalPosition = QPointF(tc.x(), tc.y());
@@ -533,7 +500,7 @@ void QTuioHandler::process2DObjFseq(const QOscMessage &message)
Q_UNUSED(message); // TODO: do we need to do anything with the frame id?
QWindow *win = QGuiApplication::focusWindow();
- if (!win && QGuiApplication::topLevelWindows().length() > 0 && forceDelivery)
+ if (!win && QGuiApplication::topLevelWindows().size() > 0 && forceDelivery)
win = QGuiApplication::topLevelWindows().at(0);
if (!win)
@@ -542,14 +509,14 @@ void QTuioHandler::process2DObjFseq(const QOscMessage &message)
QList<QWindowSystemInterface::TouchPoint> tpl;
tpl.reserve(m_activeTokens.size() + m_deadTokens.size());
- for (const QTuioToken & t : qAsConst(m_activeTokens)) {
+ for (const QTuioToken & t : std::as_const(m_activeTokens)) {
QWindowSystemInterface::TouchPoint tp = tokenToTouchPoint(t, win);
tpl.append(tp);
}
- for (const QTuioToken & t : qAsConst(m_deadTokens)) {
+ for (const QTuioToken & t : std::as_const(m_deadTokens)) {
QWindowSystemInterface::TouchPoint tp = tokenToTouchPoint(t, win);
- tp.state = Qt::TouchPointReleased;
+ tp.state = QEventPoint::State::Released;
tp.velocity = QVector2D();
tpl.append(tp);
}
@@ -560,3 +527,5 @@ void QTuioHandler::process2DObjFseq(const QOscMessage &message)
QT_END_NAMESPACE
+#include "moc_qtuiohandler_p.cpp"
+
diff --git a/src/plugins/generic/tuiotouch/qtuiohandler_p.h b/src/plugins/generic/tuiotouch/qtuiohandler_p.h
index 2e444f2a0d..2c72a1ee15 100644
--- a/src/plugins/generic/tuiotouch/qtuiohandler_p.h
+++ b/src/plugins/generic/tuiotouch/qtuiohandler_p.h
@@ -1,57 +1,21 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Robin Burchell <robin.burchell@viroteck.net>
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtCore 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) 2014 Robin Burchell <robin.burchell@viroteck.net>
+// 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 QTUIOHANDLER_P_H
#define QTUIOHANDLER_P_H
+#include <QList>
#include <QObject>
#include <QMap>
#include <QUdpSocket>
-#include <QVector>
#include <QTransform>
#include <qpa/qwindowsysteminterface.h>
QT_BEGIN_NAMESPACE
-class QTouchDevice;
+class QPointingDevice;
class QOscMessage;
class QTuioCursor;
class QTuioToken;
@@ -59,6 +23,7 @@ class QTuioToken;
class QTuioHandler : public QObject
{
Q_OBJECT
+ Q_MOC_INCLUDE("qoscmessage_p.h")
public:
explicit QTuioHandler(const QString &specification);
@@ -79,12 +44,12 @@ private:
QWindowSystemInterface::TouchPoint cursorToTouchPoint(const QTuioCursor &tc, QWindow *win);
QWindowSystemInterface::TouchPoint tokenToTouchPoint(const QTuioToken &tc, QWindow *win);
- QTouchDevice *m_device;
+ QPointingDevice *m_device = nullptr;
QUdpSocket m_socket;
QMap<int, QTuioCursor> m_activeCursors;
- QVector<QTuioCursor> m_deadCursors;
+ QList<QTuioCursor> m_deadCursors;
QMap<int, QTuioToken> m_activeTokens;
- QVector<QTuioToken> m_deadTokens;
+ QList<QTuioToken> m_deadTokens;
QTransform m_transform;
};
diff --git a/src/plugins/generic/tuiotouch/qtuiotoken_p.h b/src/plugins/generic/tuiotouch/qtuiotoken_p.h
index b784190d53..18f93abb54 100644
--- a/src/plugins/generic/tuiotouch/qtuiotoken_p.h
+++ b/src/plugins/generic/tuiotouch/qtuiotoken_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 QtCore 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 QTUIOOBJECT_P_H
#define QTUIOOBJECT_P_H
@@ -66,7 +30,7 @@ public:
, m_angle(0)
, m_angularVelocity(0)
, m_angularAcceleration(0)
- , m_state(Qt::TouchPointPressed)
+ , m_state(QEventPoint::State::Pressed)
{
}
@@ -77,9 +41,9 @@ public:
void setX(float x)
{
- if (state() == Qt::TouchPointStationary &&
+ if (state() == QEventPoint::State::Stationary &&
!qFuzzyCompare(m_x + 2.0, x + 2.0)) { // +2 because 1 is a valid value, and qFuzzyCompare can't cope with 0.0
- setState(Qt::TouchPointMoved);
+ setState(QEventPoint::State::Updated);
}
m_x = x;
}
@@ -87,9 +51,9 @@ public:
void setY(float y)
{
- if (state() == Qt::TouchPointStationary &&
+ if (state() == QEventPoint::State::Stationary &&
!qFuzzyCompare(m_y + 2.0, y + 2.0)) { // +2 because 1 is a valid value, and qFuzzyCompare can't cope with 0.0
- setState(Qt::TouchPointMoved);
+ setState(QEventPoint::State::Updated);
}
m_y = y;
}
@@ -109,9 +73,9 @@ public:
{
if (angle > M_PI)
angle = angle - M_PI * 2.0; // zero is pointing upwards, and is the default; but we want to have negative angles when rotating left
- if (state() == Qt::TouchPointStationary &&
+ if (state() == QEventPoint::State::Stationary &&
!qFuzzyCompare(m_angle + 2.0, angle + 2.0)) { // +2 because 1 is a valid value, and qFuzzyCompare can't cope with 0.0
- setState(Qt::TouchPointMoved);
+ setState(QEventPoint::State::Updated);
}
m_angle = angle;
}
@@ -122,8 +86,8 @@ public:
float angularAcceleration() const { return m_angularAcceleration; }
void setAngularAcceleration(float angularAcceleration) { m_angularAcceleration = angularAcceleration; }
- void setState(const Qt::TouchPointState &state) { m_state = state; }
- Qt::TouchPointState state() const { return m_state; }
+ void setState(const QEventPoint::State &state) { m_state = state; }
+ QEventPoint::State state() const { return m_state; }
private:
int m_id; // sessionID, temporary object ID
@@ -136,9 +100,9 @@ private:
float m_angle;
float m_angularVelocity;
float m_angularAcceleration;
- Qt::TouchPointState m_state;
+ QEventPoint::State m_state;
};
-Q_DECLARE_TYPEINFO(QTuioToken, Q_MOVABLE_TYPE); // Q_PRIMITIVE_TYPE: not possible: m_id, m_classId == -1
+Q_DECLARE_TYPEINFO(QTuioToken, Q_RELOCATABLE_TYPE); // Q_PRIMITIVE_TYPE: not possible: m_id, m_classId == -1
QT_END_NAMESPACE
diff --git a/src/plugins/generic/tuiotouch/tuiotouch.pro b/src/plugins/generic/tuiotouch/tuiotouch.pro
deleted file mode 100644
index 08f7036c92..0000000000
--- a/src/plugins/generic/tuiotouch/tuiotouch.pro
+++ /dev/null
@@ -1,28 +0,0 @@
-TARGET = qtuiotouchplugin
-
-QT += \
- core-private \
- gui-private \
- network
-
-SOURCES += \
- main.cpp \
- qoscbundle.cpp \
- qoscmessage.cpp \
- qtuiohandler.cpp
-
-HEADERS += \
- qoscbundle_p.h \
- qoscmessage_p.h \
- qtuiohandler_p.h \
- qtuiocursor_p.h \
- qtuiotoken_p.h
-
-OTHER_FILES += \
- tuiotouch.json
-
-DEFINES += QT_NO_FOREACH
-PLUGIN_TYPE = generic
-PLUGIN_EXTENDS = -
-PLUGIN_CLASS_NAME = QTuioTouchPlugin
-load(qt_plugin)