summaryrefslogtreecommitdiffstats
path: root/src/input/frontend
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens@kdab.com>2016-05-02 11:38:21 +0200
committerKevin Ottens <kevin.ottens@kdab.com>2016-05-02 10:26:53 +0000
commit3ac3c1e49331485682db4b21568e5d4fac9af509 (patch)
tree234cf6a9cf38e909b66f0a519e65840eaa43065b /src/input/frontend
parentc3b9a3368cac39f1e0dfe6e8d0859ad1749cbc98 (diff)
Make QInputDevicePlugin and friends private
Now QInputDevicePlugin, QInputDeviceIntegration and QAbstractPhysicalDeviceBackendNode are private. Change-Id: I8fad31770c6ef7d01781a98654859124a1323406 Task-number: QTBUG-51453 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/input/frontend')
-rw-r--r--src/input/frontend/frontend.pri4
-rw-r--r--src/input/frontend/qinputaspect.cpp2
-rw-r--r--src/input/frontend/qinputdeviceintegration.cpp2
-rw-r--r--src/input/frontend/qinputdeviceintegration_p.h50
-rw-r--r--src/input/frontend/qinputdeviceintegration_p_p.h (renamed from src/input/frontend/qinputdeviceintegration.h)69
-rw-r--r--src/input/frontend/qinputdeviceintegrationfactory.cpp4
-rw-r--r--src/input/frontend/qinputdeviceplugin.cpp2
-rw-r--r--src/input/frontend/qinputdeviceplugin_p.h (renamed from src/input/frontend/qinputdeviceplugin.h)10
8 files changed, 77 insertions, 66 deletions
diff --git a/src/input/frontend/frontend.pri b/src/input/frontend/frontend.pri
index 0775fd202..829dbc74d 100644
--- a/src/input/frontend/frontend.pri
+++ b/src/input/frontend/frontend.pri
@@ -11,7 +11,7 @@ HEADERS += \
$$PWD/qmousehandler.h \
$$PWD/qmousehandler_p.h \
$$PWD/qmouseevent.h \
- $$PWD/qinputdeviceplugin.h \
+ $$PWD/qinputdeviceplugin_p.h \
$$PWD/qactioninput.h \
$$PWD/qaction.h \
$$PWD/qabstractaxisinput.h \
@@ -19,8 +19,8 @@ HEADERS += \
$$PWD/qanalogaxisinput.h \
$$PWD/qbuttonaxisinput.h \
$$PWD/qlogicaldevice.h \
- $$PWD/qinputdeviceintegration.h \
$$PWD/qinputdeviceintegration_p.h \
+ $$PWD/qinputdeviceintegration_p_p.h \
$$PWD/qabstractphysicaldevice.h \
$$PWD/qinputdeviceintegrationfactory_p.h \
$$PWD/qaxissetting.h \
diff --git a/src/input/frontend/qinputaspect.cpp b/src/input/frontend/qinputaspect.cpp
index e773eb1f2..d74938240 100644
--- a/src/input/frontend/qinputaspect.cpp
+++ b/src/input/frontend/qinputaspect.cpp
@@ -49,7 +49,7 @@
#include <Qt3DInput/qkeyboardhandler.h>
#include <Qt3DInput/qmousedevice.h>
#include <Qt3DInput/qmousehandler.h>
-#include <Qt3DInput/qinputdeviceintegration.h>
+#include <Qt3DInput/private/qinputdeviceintegration_p.h>
#include <Qt3DInput/qinputsettings.h>
#include <Qt3DInput/private/qgenericinputdevice_p.h>
#include <Qt3DInput/private/qinputdeviceintegrationfactory_p.h>
diff --git a/src/input/frontend/qinputdeviceintegration.cpp b/src/input/frontend/qinputdeviceintegration.cpp
index de9e763b7..db48fd059 100644
--- a/src/input/frontend/qinputdeviceintegration.cpp
+++ b/src/input/frontend/qinputdeviceintegration.cpp
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#include "qinputdeviceintegration.h"
#include "qinputdeviceintegration_p.h"
+#include "qinputdeviceintegration_p_p.h"
#include <Qt3DInput/QInputAspect>
diff --git a/src/input/frontend/qinputdeviceintegration_p.h b/src/input/frontend/qinputdeviceintegration_p.h
index 53ba52f8c..248243fa2 100644
--- a/src/input/frontend/qinputdeviceintegration_p.h
+++ b/src/input/frontend/qinputdeviceintegration_p.h
@@ -51,27 +51,61 @@
// We mean it.
//
-#include <private/qobject_p.h>
-#include <private/qt3dinput_global_p.h>
+#include <QObject>
+#include <Qt3DInput/qt3dinput_global.h>
+#include <Qt3DInput/private/qabstractphysicaldevicebackendnode_p.h>
+
+#include <Qt3DCore/qaspectjob.h>
+#include <Qt3DCore/qnodeid.h>
QT_BEGIN_NAMESPACE
+namespace Qt3DCore {
+class QBackendNodeMapper;
+typedef QSharedPointer<QBackendNodeMapper> QBackendNodeMapperPtr;
+}
+
+
namespace Qt3DInput {
class QInputAspect;
-class QInputDeviceIntegration;
+class QAbstractPhysicalDevice;
+class QInputDeviceIntegrationPrivate;
-class QT3DINPUTSHARED_PRIVATE_EXPORT QInputDeviceIntegrationPrivate : public QObjectPrivate
+class QT3DINPUTSHARED_PRIVATE_EXPORT QInputDeviceIntegration : public QObject
{
+ Q_OBJECT
+protected:
+ explicit QInputDeviceIntegration(QObject *parent = nullptr);
+ explicit QInputDeviceIntegration(QInputDeviceIntegrationPrivate &dd, QObject *parent = nullptr);
+
+ template<class Frontend>
+ void registerBackendType(const Qt3DCore::QBackendNodeMapperPtr &functor)
+ {
+ registerBackendType(Frontend::staticMetaObject, functor);
+ }
+
+ void registerBackendType(const QMetaObject &metaObject, const Qt3DCore::QBackendNodeMapperPtr &functor);
+
public:
- QInputDeviceIntegrationPrivate();
+ void initialize(Qt3DInput::QInputAspect *aspect);
+
+ virtual QVector<Qt3DCore::QAspectJobPtr> jobsToExecute(qint64 time) = 0;
+ virtual QAbstractPhysicalDevice *createPhysicalDevice(const QString &name) = 0;
+ virtual QVector<Qt3DCore::QNodeId> physicalDevices() const = 0;
+ virtual QAbstractPhysicalDeviceBackendNode *physicalDevice(Qt3DCore::QNodeId id) const = 0;
+ virtual QStringList deviceNames() const = 0;
+
+protected:
+ QInputAspect *inputAspect() const;
- Q_DECLARE_PUBLIC(QInputDeviceIntegration)
+private:
+ virtual void onInitialize() = 0;
- QInputAspect *m_aspect;
+ Q_DECLARE_PRIVATE(QInputDeviceIntegration)
};
-} // Qt3DInput
+} // namespace Qt3DInput
QT_END_NAMESPACE
diff --git a/src/input/frontend/qinputdeviceintegration.h b/src/input/frontend/qinputdeviceintegration_p_p.h
index c6a78c500..c8557eac5 100644
--- a/src/input/frontend/qinputdeviceintegration.h
+++ b/src/input/frontend/qinputdeviceintegration_p_p.h
@@ -37,65 +37,42 @@
**
****************************************************************************/
-#ifndef QT3DINPUT_QINPUTDEVICEINTEGRATION_H
-#define QT3DINPUT_QINPUTDEVICEINTEGRATION_H
-
-#include <QObject>
-#include <Qt3DInput/qt3dinput_global.h>
-#include <Qt3DInput/qabstractphysicaldevicebackendnode.h>
-
-#include <Qt3DCore/qaspectjob.h>
-#include <Qt3DCore/qnodeid.h>
+#ifndef QT3DINPUT_QINPUTDEVICEINTEGRATION_P_P_H
+#define QT3DINPUT_QINPUTDEVICEINTEGRATION_P_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <private/qobject_p.h>
+#include <private/qt3dinput_global_p.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DCore {
-class QBackendNodeMapper;
-typedef QSharedPointer<QBackendNodeMapper> QBackendNodeMapperPtr;
-}
-
-
namespace Qt3DInput {
class QInputAspect;
-class QAbstractPhysicalDevice;
-class QInputDeviceIntegrationPrivate;
+class QInputDeviceIntegration;
-class QT3DINPUTSHARED_EXPORT QInputDeviceIntegration : public QObject
+class QT3DINPUTSHARED_PRIVATE_EXPORT QInputDeviceIntegrationPrivate : public QObjectPrivate
{
- Q_OBJECT
-protected:
- explicit QInputDeviceIntegration(QObject *parent = nullptr);
- explicit QInputDeviceIntegration(QInputDeviceIntegrationPrivate &dd, QObject *parent = nullptr);
-
- template<class Frontend>
- void registerBackendType(const Qt3DCore::QBackendNodeMapperPtr &functor)
- {
- registerBackendType(Frontend::staticMetaObject, functor);
- }
-
- void registerBackendType(const QMetaObject &metaObject, const Qt3DCore::QBackendNodeMapperPtr &functor);
-
public:
- void initialize(Qt3DInput::QInputAspect *aspect);
-
- virtual QVector<Qt3DCore::QAspectJobPtr> jobsToExecute(qint64 time) = 0;
- virtual QAbstractPhysicalDevice *createPhysicalDevice(const QString &name) = 0;
- virtual QVector<Qt3DCore::QNodeId> physicalDevices() const = 0;
- virtual QAbstractPhysicalDeviceBackendNode *physicalDevice(Qt3DCore::QNodeId id) const = 0;
- virtual QStringList deviceNames() const = 0;
-
-protected:
- QInputAspect *inputAspect() const;
+ QInputDeviceIntegrationPrivate();
-private:
- virtual void onInitialize() = 0;
+ Q_DECLARE_PUBLIC(QInputDeviceIntegration)
- Q_DECLARE_PRIVATE(QInputDeviceIntegration)
+ QInputAspect *m_aspect;
};
-} // namespace Qt3DInput
+} // Qt3DInput
QT_END_NAMESPACE
-#endif // QT3DINPUT_QINPUTDEVICEINTEGRATION_H
+#endif // QT3DINPUT_QINPUTDEVICEINTEGRATION_P_P_H
diff --git a/src/input/frontend/qinputdeviceintegrationfactory.cpp b/src/input/frontend/qinputdeviceintegrationfactory.cpp
index 12520c2fe..22e93294e 100644
--- a/src/input/frontend/qinputdeviceintegrationfactory.cpp
+++ b/src/input/frontend/qinputdeviceintegrationfactory.cpp
@@ -38,8 +38,8 @@
****************************************************************************/
#include "qinputdeviceintegrationfactory_p.h"
-#include <Qt3DInput/qinputdeviceintegration.h>
-#include <Qt3DInput/qinputdeviceplugin.h>
+#include <Qt3DInput/private/qinputdeviceintegration_p.h>
+#include <Qt3DInput/private/qinputdeviceplugin_p.h>
#include <QtCore/private/qfactoryloader_p.h>
#include <QtCore/QCoreApplication>
#include <QtCore/QDir>
diff --git a/src/input/frontend/qinputdeviceplugin.cpp b/src/input/frontend/qinputdeviceplugin.cpp
index 695e85f50..cae80c05b 100644
--- a/src/input/frontend/qinputdeviceplugin.cpp
+++ b/src/input/frontend/qinputdeviceplugin.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "qinputdeviceplugin.h"
+#include "qinputdeviceplugin_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qinputdeviceplugin.h b/src/input/frontend/qinputdeviceplugin_p.h
index b31f57f51..8175e3ae2 100644
--- a/src/input/frontend/qinputdeviceplugin.h
+++ b/src/input/frontend/qinputdeviceplugin_p.h
@@ -37,14 +37,14 @@
**
****************************************************************************/
-#ifndef QT3DINPUT_QINPUTDEVICEPLUGIN_H
-#define QT3DINPUT_QINPUTDEVICEPLUGIN_H
+#ifndef QT3DINPUT_QINPUTDEVICEPLUGIN_P_H
+#define QT3DINPUT_QINPUTDEVICEPLUGIN_P_H
#include <QtCore/QObject>
#include <QtCore/QtPlugin>
#include <QtCore/QFactoryInterface>
-#include <Qt3DInput/qt3dinput_global.h>
+#include <Qt3DInput/private/qt3dinput_global_p.h>
QT_BEGIN_NAMESPACE
@@ -52,7 +52,7 @@ namespace Qt3DInput {
class QInputDeviceIntegration;
-class QT3DINPUTSHARED_EXPORT QInputDevicePlugin : public QObject
+class QT3DINPUTSHARED_PRIVATE_EXPORT QInputDevicePlugin : public QObject
{
Q_OBJECT
public:
@@ -68,4 +68,4 @@ public:
QT_END_NAMESPACE
-#endif // QT3DINPUT_QINPUTDEVICEPLUGIN_H
+#endif // QT3DINPUT_QINPUTDEVICEPLUGIN_P_H