summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/input/frontend/frontend.pri13
-rw-r--r--src/input/frontend/qabstractphysicaldevice.cpp50
-rw-r--r--src/input/frontend/qabstractphysicaldevice.h66
-rw-r--r--src/input/frontend/qactioninput.cpp10
-rw-r--r--src/input/frontend/qactioninput.h8
-rw-r--r--src/input/frontend/qaxisinput.cpp10
-rw-r--r--src/input/frontend/qaxisinput.h8
-rw-r--r--src/input/frontend/qinputaspect.cpp18
-rw-r--r--src/input/frontend/qinputaspect_p.h4
-rw-r--r--src/input/frontend/qinputdeviceintegration.cpp51
-rw-r--r--src/input/frontend/qinputdeviceintegration.h (renamed from src/input/frontend/qabstractinputdevice.h)21
-rw-r--r--src/input/frontend/qinputdeviceintegrationfactory.cpp (renamed from src/input/frontend/qinputdevicefactory.cpp)16
-rw-r--r--src/input/frontend/qinputdeviceintegrationfactory_p.h (renamed from src/input/frontend/qinputdevicefactory_p.h)12
-rw-r--r--src/input/frontend/qinputdeviceplugin.cpp2
-rw-r--r--src/input/frontend/qinputdeviceplugin.h10
15 files changed, 235 insertions, 64 deletions
diff --git a/src/input/frontend/frontend.pri b/src/input/frontend/frontend.pri
index 4758d9c35..cbf040fde 100644
--- a/src/input/frontend/frontend.pri
+++ b/src/input/frontend/frontend.pri
@@ -11,14 +11,15 @@ HEADERS += \
$$PWD/qmouseinput_p.h \
$$PWD/qmousecontroller_p.h \
$$PWD/q3dmouseevent.h \
- $$PWD/qabstractinputdevice.h \
- $$PWD/qinputdevicefactory_p.h \
$$PWD/qinputdeviceplugin.h \
$$PWD/qactioninput.h \
$$PWD/qaction.h \
$$PWD/qaxisinput.h \
$$PWD/qaxis.h \
- $$PWD/qlogicaldevice.h
+ $$PWD/qlogicaldevice.h \
+ $$PWD/qinputdeviceintegration.h \
+ $$PWD/qabstractphysicaldevice.h \
+ $$PWD/qinputdeviceintegrationfactory_p.h
SOURCES += \
$$PWD/qinputaspect.cpp \
@@ -28,12 +29,14 @@ SOURCES += \
$$PWD/qmouseinput.cpp \
$$PWD/qmousecontroller.cpp \
$$PWD/q3dmouseevent.cpp \
- $$PWD/qinputdevicefactory.cpp \
$$PWD/qinputdeviceplugin.cpp \
$$PWD/qactioninput.cpp \
$$PWD/qaction.cpp \
$$PWD/qaxisinput.cpp \
$$PWD/qaxis.cpp \
- $$PWD/qlogicaldevice.cpp
+ $$PWD/qlogicaldevice.cpp \
+ $$PWD/qinputdeviceintegration.cpp \
+ $$PWD/qabstractphysicaldevice.cpp \
+ $$PWD/qinputdeviceintegrationfactory.cpp
INCLUDEPATH += $$PWD
diff --git a/src/input/frontend/qabstractphysicaldevice.cpp b/src/input/frontend/qabstractphysicaldevice.cpp
new file mode 100644
index 000000000..e3d1bc819
--- /dev/null
+++ b/src/input/frontend/qabstractphysicaldevice.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://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.LGPLv3 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.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 later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qabstractphysicaldevice.h"
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3DInput {
+
+QAbstractPhysicalDevice::QAbstractPhysicalDevice(Qt3DCore::QNode *parent)
+ : Qt3DCore::QNode(parent)
+{
+}
+
+}
+
+QT_END_NAMESPACE
diff --git a/src/input/frontend/qabstractphysicaldevice.h b/src/input/frontend/qabstractphysicaldevice.h
new file mode 100644
index 000000000..4faf00a66
--- /dev/null
+++ b/src/input/frontend/qabstractphysicaldevice.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://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.LGPLv3 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.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 later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT3DINPUT_QAbstractPhysicalDevice
+#define QT3DINPUT_QAbstractPhysicalDevice
+
+#include <Qt3DInput/qt3dinput_global.h>
+#include <Qt3DCore/qnode.h>
+#include <QObject>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3DInput {
+
+class QInputAspect;
+
+class QT3DINPUTSHARED_EXPORT QAbstractPhysicalDevice : Qt3DCore::QNode
+{
+public:
+ QAbstractPhysicalDevice(Qt3DCore::QNode *parent = 0);
+ virtual ~QAbstractPhysicalDevice() {}
+
+ // TODO: Add API to introspect buttons and axes
+ // TODO: Add API to support AxisSettings
+};
+
+} // Qt3DInput
+
+QT_END_NAMESPACE
+
+
+#endif // QT3DINPUT_QAbstractPhysicalDevice
+
diff --git a/src/input/frontend/qactioninput.cpp b/src/input/frontend/qactioninput.cpp
index 5577e3e9c..ac0474171 100644
--- a/src/input/frontend/qactioninput.cpp
+++ b/src/input/frontend/qactioninput.cpp
@@ -49,7 +49,7 @@ public:
{}
QVector<int> m_keys;
- QAbstractInputDevice *m_sourceDevice;
+ QAbstractPhysicalDevice *m_sourceDevice;
};
QActionInput::QActionInput(Qt3DCore::QNode *parent)
@@ -89,7 +89,7 @@ QBitArray QActionInput::keysBitArray() const
return QBitArray();
}
-void QActionInput::setSourceDevice(QAbstractInputDevice *sourceDevice)
+void QActionInput::setSourceDevice(QAbstractPhysicalDevice *sourceDevice)
{
Q_D(QActionInput);
if (d->m_sourceDevice != sourceDevice) {
@@ -101,7 +101,7 @@ void QActionInput::setSourceDevice(QAbstractInputDevice *sourceDevice)
}
}
-QAbstractInputDevice *QActionInput::sourceDevice() const
+QAbstractPhysicalDevice *QActionInput::sourceDevice() const
{
Q_D(const QActionInput);
return d->m_sourceDevice;
@@ -111,8 +111,8 @@ void QActionInput::copy(const Qt3DCore::QNode *ref)
{
QNode::copy(ref);
const QActionInput *input = static_cast<const QActionInput *>(ref);
- // TO DO: Convert QAbstractInputDevice to a QNode
- // d_func()->m_sourceDevice = qobject_cast<QAbstractInputDevice *>(QNode::clone(input->d_func()->m_sourceDevice));
+ // TO DO: Convert QAbstractPhysicalDevice to a QNode
+ // d_func()->m_sourceDevice = qobject_cast<QAbstractPhysicalDevice *>(QNode::clone(input->d_func()->m_sourceDevice));
d_func()->m_keys = input->d_func()->m_keys;
}
diff --git a/src/input/frontend/qactioninput.h b/src/input/frontend/qactioninput.h
index faa44d448..917c5a717 100644
--- a/src/input/frontend/qactioninput.h
+++ b/src/input/frontend/qactioninput.h
@@ -44,13 +44,13 @@ QT_BEGIN_NAMESPACE
namespace Qt3DInput {
-class QAbstractInputDevice;
+class QAbstractPhysicalDevice;
class QActionInputPrivate;
class QT3DINPUTSHARED_EXPORT QActionInput : public Qt3DCore::QNode
{
Q_OBJECT
- Q_PROPERTY(Qt3DInput::QAbstractInputDevice *sourceDevice READ sourceDevice WRITE setSourceDevice NOTIFY sourceDeviceChanged)
+ Q_PROPERTY(Qt3DInput::QAbstractPhysicalDevice *sourceDevice READ sourceDevice WRITE setSourceDevice NOTIFY sourceDeviceChanged)
public:
explicit QActionInput(Qt3DCore::QNode *parent = Q_NULLPTR);
@@ -61,8 +61,8 @@ public:
QVector<int> keys() const;
QBitArray keysBitArray() const;
- void setSourceDevice(QAbstractInputDevice *sourceDevice);
- QAbstractInputDevice *sourceDevice() const;
+ void setSourceDevice(QAbstractPhysicalDevice *sourceDevice);
+ QAbstractPhysicalDevice *sourceDevice() const;
Q_SIGNALS:
void sourceDeviceChanged();
diff --git a/src/input/frontend/qaxisinput.cpp b/src/input/frontend/qaxisinput.cpp
index 5b3989fbf..53629386f 100644
--- a/src/input/frontend/qaxisinput.cpp
+++ b/src/input/frontend/qaxisinput.cpp
@@ -52,7 +52,7 @@ public:
{}
QVector<int> m_keys;
- QAbstractInputDevice *m_sourceDevice;
+ QAbstractPhysicalDevice *m_sourceDevice;
float m_scale;
int m_axis;
};
@@ -68,7 +68,7 @@ QAxisInput::~QAxisInput()
QNode::cleanup();
}
-void QAxisInput::setSourceDevice(QAbstractInputDevice *sourceDevice)
+void QAxisInput::setSourceDevice(QAbstractPhysicalDevice *sourceDevice)
{
Q_D(QAxisInput);
if (d->m_sourceDevice != sourceDevice) {
@@ -80,7 +80,7 @@ void QAxisInput::setSourceDevice(QAbstractInputDevice *sourceDevice)
}
}
-QAbstractInputDevice *QAxisInput::sourceDevice() const
+QAbstractPhysicalDevice *QAxisInput::sourceDevice() const
{
Q_D(const QAxisInput);
return d->m_sourceDevice;
@@ -148,8 +148,8 @@ void QAxisInput::copy(const Qt3DCore::QNode *ref)
{
QNode::copy(ref);
const QAxisInput *input = static_cast<const QAxisInput *>(ref);
- // TO DO: Convert QAbstractInputDevice to a QNode
- // d_func()->m_sourceDevice = qobject_cast<QAbstractInputDevice *>(QNode::clone(input->d_func()->m_sourceDevice));
+ // TO DO: Convert QAbstractPhysicalDevice to a QNode
+ // d_func()->m_sourceDevice = qobject_cast<QAbstractPhysicalDevice *>(QNode::clone(input->d_func()->m_sourceDevice));
d_func()->m_keys = input->d_func()->m_keys;
d_func()->m_scale = input->d_func()->m_scale;
d_func()->m_axis = input->d_func()->m_axis;
diff --git a/src/input/frontend/qaxisinput.h b/src/input/frontend/qaxisinput.h
index 40284edb7..cbda7feab 100644
--- a/src/input/frontend/qaxisinput.h
+++ b/src/input/frontend/qaxisinput.h
@@ -46,13 +46,13 @@ QT_BEGIN_NAMESPACE
namespace Qt3DInput {
-class QAbstractInputDevice;
+class QAbstractPhysicalDevice;
class QAxisInputPrivate;
class QAxisInput : public Qt3DCore::QNode
{
Q_OBJECT
- Q_PROPERTY(Qt3DInput::QAbstractInputDevice *sourceDevice READ sourceDevice WRITE setSourceDevice NOTIFY sourceDeviceChanged)
+ Q_PROPERTY(Qt3DInput::QAbstractPhysicalDevice *sourceDevice READ sourceDevice WRITE setSourceDevice NOTIFY sourceDeviceChanged)
Q_PROPERTY(float scale READ scale WRITE setScale NOTIFY scaleChanged)
Q_PROPERTY(int axis READ axis WRITE setAxis NOTIFY axisChanged)
@@ -60,8 +60,8 @@ public:
explicit QAxisInput(Qt3DCore::QNode *parent = Q_NULLPTR);
~QAxisInput();
- void setSourceDevice(QAbstractInputDevice *sourceDevice);
- QAbstractInputDevice *sourceDevice() const;
+ void setSourceDevice(QAbstractPhysicalDevice *sourceDevice);
+ QAbstractPhysicalDevice *sourceDevice() const;
void setScale(float scale);
float scale() const;
diff --git a/src/input/frontend/qinputaspect.cpp b/src/input/frontend/qinputaspect.cpp
index ee6f851a6..082d9f39d 100644
--- a/src/input/frontend/qinputaspect.cpp
+++ b/src/input/frontend/qinputaspect.cpp
@@ -49,8 +49,8 @@
#include <Qt3DInput/qkeyboardinput.h>
#include <Qt3DInput/qmousecontroller.h>
#include <Qt3DInput/qmouseinput.h>
-#include <Qt3DInput/qabstractinputdevice.h>
-#include <Qt3DInput/private/qinputdevicefactory_p.h>
+#include <Qt3DInput/qinputdeviceintegration.h>
+#include <Qt3DInput/private/qinputdeviceintegrationfactory_p.h>
#include <Qt3DCore/qservicelocator.h>
#include <Qt3DCore/qeventfilterservice.h>
#include <QDir>
@@ -95,12 +95,12 @@ QInputAspect::QInputAspect(QObject *parent)
void QInputAspect::loadInputDevicePlugins()
{
Q_D(QInputAspect);
- QStringList keys = QInputDeviceFactory::keys();
+ QStringList keys = QInputDeviceIntegrationFactory::keys();
Q_FOREACH (QString key, keys) {
- Qt3DInput::QAbstractInputDevice *inputDevice = QInputDeviceFactory::create(key, QStringList());
- if (inputDevice != Q_NULLPTR) {
- d->m_inputDevices.push_back(inputDevice);
- inputDevice->initialize(this);
+ Qt3DInput::QInputDeviceIntegration *integration = QInputDeviceIntegrationFactory::create(key, QStringList());
+ if (integration != Q_NULLPTR) {
+ d->m_inputDeviceIntegrations.push_back(integration);
+ integration->initialize(this);
}
}
}
@@ -126,8 +126,8 @@ QVector<QAspectJobPtr> QInputAspect::jobsToExecute(qint64 time)
jobs.append(d->m_inputHandler->keyboardJobs());
jobs.append(d->m_inputHandler->mouseJobs());
- Q_FOREACH (QAbstractInputDevice *inputDevice, d->m_inputDevices)
- jobs += inputDevice->jobsToExecute(time);
+ Q_FOREACH (QInputDeviceIntegration *integration, d->m_inputDeviceIntegrations)
+ jobs += integration->jobsToExecute(time);
return jobs;
}
diff --git a/src/input/frontend/qinputaspect_p.h b/src/input/frontend/qinputaspect_p.h
index 3f2f96155..6b9636ad7 100644
--- a/src/input/frontend/qinputaspect_p.h
+++ b/src/input/frontend/qinputaspect_p.h
@@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE
namespace Qt3DInput {
class QInputAspect;
-class QAbstractInputDevice;
+class QInputDeviceIntegration;
namespace Input {
class CameraController;
@@ -70,7 +70,7 @@ public:
Q_DECLARE_PUBLIC(QInputAspect)
QScopedPointer<Input::InputHandler> m_inputHandler;
QScopedPointer<Input::CameraController> m_cameraController;
- QVector<Qt3DInput::QAbstractInputDevice *> m_inputDevices;
+ QVector<Qt3DInput::QInputDeviceIntegration *> m_inputDeviceIntegrations;
};
} // namespace Qt3DInput
diff --git a/src/input/frontend/qinputdeviceintegration.cpp b/src/input/frontend/qinputdeviceintegration.cpp
new file mode 100644
index 000000000..6277a4b56
--- /dev/null
+++ b/src/input/frontend/qinputdeviceintegration.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://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.LGPLv3 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.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 later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qinputdeviceintegration.h"
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3DInput {
+
+QInputDeviceIntegration::QInputDeviceIntegration(QObject *parent)
+ : QObject(parent)
+{
+
+}
+
+} // namespace Qt3DInput
+
+QT_END_NAMESPACE
diff --git a/src/input/frontend/qabstractinputdevice.h b/src/input/frontend/qinputdeviceintegration.h
index ea0231e93..f5ffdcaf4 100644
--- a/src/input/frontend/qabstractinputdevice.h
+++ b/src/input/frontend/qinputdeviceintegration.h
@@ -34,12 +34,13 @@
**
****************************************************************************/
-#ifndef QT3DINPUT_QABSTRACTINPUTDEVICE
-#define QT3DINPUT_QABSTRACTINPUTDEVICE
+#ifndef QT3DINPUT_QINPUTDEVICEINTEGRATION_H
+#define QT3DINPUT_QINPUTDEVICEINTEGRATION_H
+#include <QObject>
#include <Qt3DInput/qt3dinput_global.h>
+
#include <Qt3DCore/qaspectjob.h>
-#include <QObject>
QT_BEGIN_NAMESPACE
@@ -47,20 +48,18 @@ namespace Qt3DInput {
class QInputAspect;
-class QT3DINPUTSHARED_EXPORT QAbstractInputDevice
+class QInputDeviceIntegration : public QObject
{
+ Q_OBJECT
public:
- virtual ~QAbstractInputDevice() {}
+ explicit QInputDeviceIntegration(QObject *parent = 0);
+
virtual void initialize(Qt3DInput::QInputAspect *aspect) = 0;
virtual QVector<Qt3DCore::QAspectJobPtr> jobsToExecute(qint64 time) = 0;
};
-} // Qt3DInput
-
-Q_DECLARE_INTERFACE(Qt3DInput::QAbstractInputDevice, "Qt3DInput.QAbstractInputDevice/1.0")
+} // namespace Qt3DInput
QT_END_NAMESPACE
-
-#endif // QT3DINPUT_QABSTRACTINPUTDEVICE
-
+#endif // QT3DINPUT_QINPUTDEVICEINTEGRATION_H
diff --git a/src/input/frontend/qinputdevicefactory.cpp b/src/input/frontend/qinputdeviceintegrationfactory.cpp
index e5896b4ff..1cb0650e9 100644
--- a/src/input/frontend/qinputdevicefactory.cpp
+++ b/src/input/frontend/qinputdeviceintegrationfactory.cpp
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#include "qinputdevicefactory_p.h"
-#include <Qt3DInput/qabstractinputdevice.h>
+#include "qinputdeviceintegrationfactory_p.h"
+#include <Qt3DInput/qinputdeviceintegration.h>
#include <Qt3DInput/qinputdeviceplugin.h>
#include <QtCore/private/qfactoryloader_p.h>
#include <QtCore/QCoreApplication>
@@ -46,11 +46,11 @@ QT_BEGIN_NAMESPACE
namespace Qt3DInput {
#ifndef QT_NO_LIBRARY
-Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QInputDevice_iid, QLatin1String("/inputdevices"), Qt::CaseInsensitive))
-Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader, (QInputDevice_iid, QLatin1String(""), Qt::CaseInsensitive))
+Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QInputDevicePlugin_iid, QLatin1String("/inputdevices"), Qt::CaseInsensitive))
+Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader, (QInputDevicePlugin_iid, QLatin1String(""), Qt::CaseInsensitive))
#endif
-QStringList QInputDeviceFactory::keys(const QString &pluginPath)
+QStringList QInputDeviceIntegrationFactory::keys(const QString &pluginPath)
{
#ifndef QT_NO_LIBRARY
QStringList list;
@@ -73,15 +73,15 @@ QStringList QInputDeviceFactory::keys(const QString &pluginPath)
#endif
}
-QAbstractInputDevice *QInputDeviceFactory::create(const QString &name, const QStringList &args, const QString &pluginPath)
+QInputDeviceIntegration *QInputDeviceIntegrationFactory::create(const QString &name, const QStringList &args, const QString &pluginPath)
{
#ifndef QT_NO_LIBRARY
if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath);
- if (QAbstractInputDevice *ret = qLoadPlugin1<QAbstractInputDevice, QInputDevicePlugin>(directLoader(), name, args))
+ if (QInputDeviceIntegration *ret = qLoadPlugin1<QInputDeviceIntegration, QInputDevicePlugin>(directLoader(), name, args))
return ret;
}
- if (QAbstractInputDevice *ret = qLoadPlugin1<QAbstractInputDevice, QInputDevicePlugin>(loader(), name, args))
+ if (QInputDeviceIntegration *ret = qLoadPlugin1<QInputDeviceIntegration, QInputDevicePlugin>(loader(), name, args))
return ret;
#endif
return Q_NULLPTR;
diff --git a/src/input/frontend/qinputdevicefactory_p.h b/src/input/frontend/qinputdeviceintegrationfactory_p.h
index 62eef0d18..01d409f21 100644
--- a/src/input/frontend/qinputdevicefactory_p.h
+++ b/src/input/frontend/qinputdeviceintegrationfactory_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QT3DINPUT_QINPUTDEVICEFACTORY_P_H
-#define QT3DINPUT_QINPUTDEVICEFACTORY_P_H
+#ifndef QT3DINPUT_QINPUTDEVICEINTEGRATIONFACTORY_P_H
+#define QT3DINPUT_QINPUTDEVICEINTEGRATIONFACTORY_P_H
//
// W A R N I N G
@@ -55,17 +55,17 @@ QT_BEGIN_NAMESPACE
namespace Qt3DInput {
-class QAbstractInputDevice;
+class QInputDeviceIntegration;
-class QInputDeviceFactory
+class QInputDeviceIntegrationFactory
{
public:
static QStringList keys(const QString &pluginPath = QString());
- static QAbstractInputDevice *create(const QString &name, const QStringList &args, const QString &pluginPath = QString());
+ static QInputDeviceIntegration *create(const QString &name, const QStringList &args, const QString &pluginPath = QString());
};
} // Qt3DRender
QT_END_NAMESPACE
-#endif // QT3DINPUT_QINPUTDEVICEFACTORY_P_H
+#endif // QT3DINPUT_QINPUTDEVICEINTEGRATIONFACTORY_P_H
diff --git a/src/input/frontend/qinputdeviceplugin.cpp b/src/input/frontend/qinputdeviceplugin.cpp
index 7afdb848e..b6b56e805 100644
--- a/src/input/frontend/qinputdeviceplugin.cpp
+++ b/src/input/frontend/qinputdeviceplugin.cpp
@@ -49,7 +49,7 @@ QInputDevicePlugin::~QInputDevicePlugin()
{
}
-QAbstractInputDevice *QInputDevicePlugin::create(const QString &key, const QStringList &paramList)
+QInputDeviceIntegration *QInputDevicePlugin::create(const QString &key, const QStringList &paramList)
{
Q_UNUSED(key)
Q_UNUSED(paramList)
diff --git a/src/input/frontend/qinputdeviceplugin.h b/src/input/frontend/qinputdeviceplugin.h
index ea73eb312..3b6a98185 100644
--- a/src/input/frontend/qinputdeviceplugin.h
+++ b/src/input/frontend/qinputdeviceplugin.h
@@ -47,9 +47,7 @@ QT_BEGIN_NAMESPACE
namespace Qt3DInput {
-#define QInputDevice_iid "org.qt-project.Qt3DInput.QAbstractInputDevice 5.6"
-
-class QAbstractInputDevice;
+class QInputDeviceIntegration;
class QT3DINPUTSHARED_EXPORT QInputDevicePlugin : public QObject
{
@@ -58,11 +56,15 @@ public:
explicit QInputDevicePlugin(QObject *parent = Q_NULLPTR);
~QInputDevicePlugin();
- virtual QAbstractInputDevice *create(const QString &key, const QStringList &paramList);
+ virtual QInputDeviceIntegration *create(const QString &key, const QStringList &paramList);
};
} // Qt3DInput
+#define QInputDevicePlugin_iid "org.qt-project.Qt3DInput.QInputDevicePlugin 5.6"
+
+Q_DECLARE_INTERFACE(Qt3DInput::QInputDevicePlugin, QInputDevicePlugin_iid)
+
QT_END_NAMESPACE
#endif // QT3DINPUT_QINPUTDEVICEPLUGIN_H