diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2016-03-14 12:31:52 +0000 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2016-03-22 18:16:18 +0000 |
commit | e1cc734f83c9ae822360c98016121a259ecff4ca (patch) | |
tree | 90a7bda21c339cdcc9d60a00843d4c482927d568 /src/input/frontend/qlogicaldevice.cpp | |
parent | 42ca28186818d9c12f25b731e8dca93aa1bb42fc (diff) |
QLogicalDevice creates creation changes
Task-number: QTBUG-51835
Change-Id: I946304049549b35a18db777ba0fe5582d3bcefc1
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/input/frontend/qlogicaldevice.cpp')
-rw-r--r-- | src/input/frontend/qlogicaldevice.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/input/frontend/qlogicaldevice.cpp b/src/input/frontend/qlogicaldevice.cpp index 0216226ef..debbefbf4 100644 --- a/src/input/frontend/qlogicaldevice.cpp +++ b/src/input/frontend/qlogicaldevice.cpp @@ -38,27 +38,15 @@ ****************************************************************************/ #include "qlogicaldevice.h" -#include <Qt3DCore/private/qcomponent_p.h> +#include "qlogicaldevice_p.h" #include <Qt3DInput/qaction.h> #include <Qt3DInput/qaxis.h> #include <Qt3DCore/qscenepropertychange.h> +#include <Qt3DCore/qnodecreatedchange.h> QT_BEGIN_NAMESPACE namespace Qt3DInput { -/*! - \internal -*/ -class QLogicalDevicePrivate : public Qt3DCore::QComponentPrivate -{ -public: - QLogicalDevicePrivate() - : Qt3DCore::QComponentPrivate() - {} - - QVector<QAction *> m_actions; - QVector<QAxis *> m_axes; -}; /*! \class Qt3DInput::QLogicalDevice @@ -278,6 +266,15 @@ void QLogicalDevice::copy(const Qt3DCore::QNode *ref) d_func()->m_axes.push_back(qobject_cast<QAxis *>(QNode::clone(axis))); } +Qt3DCore::QNodeCreatedChangeBasePtr QLogicalDevice::createNodeCreationChange() const +{ + auto creationChange = Qt3DCore::QNodeCreatedChangePtr<QLogicalDeviceData>::create(this); + auto &data = creationChange->data; + data.actionIds = qIdsForNodes(actions()); + data.axisIds = qIdsForNodes(axes()); + return creationChange; +} + } // Qt3DInput QT_END_NAMESPACE |