From d5bbe5a0680edda59b3fd202bd1e89c11a680f7d Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Mon, 14 Mar 2016 11:33:29 +0000 Subject: QAction creates creation changes Task-number: QTBUG-51835 Change-Id: Ide8d96e46706cc2419c1f61fd03281d8981df650 Reviewed-by: Paul Lemire --- src/input/frontend/qaction.cpp | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) (limited to 'src/input/frontend/qaction.cpp') diff --git a/src/input/frontend/qaction.cpp b/src/input/frontend/qaction.cpp index 55bf92967..654c7ba05 100644 --- a/src/input/frontend/qaction.cpp +++ b/src/input/frontend/qaction.cpp @@ -38,38 +38,15 @@ ****************************************************************************/ #include "qaction.h" +#include "qaction_p.h" #include #include +#include #include QT_BEGIN_NAMESPACE namespace Qt3DInput { -/*! - \class Qt3DInput::QActionPrivate - \internal -*/ -class QActionPrivate : public Qt3DCore::QNodePrivate -{ -public: - QActionPrivate() - : Qt3DCore::QNodePrivate() - , m_active(false) - {} - - Q_DECLARE_PUBLIC(QAction) - - QVector m_inputs; - bool m_active; - - void setActive(bool active) - { - if (active != m_active) { - m_active = active; - q_func()->activeChanged(active); - } - } -}; /*! \class Qt3DInput::QActionInput @@ -203,6 +180,14 @@ void QAction::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) } } +Qt3DCore::QNodeCreatedChangeBasePtr QAction::createNodeCreationChange() const +{ + auto creationChange = Qt3DCore::QNodeCreatedChangePtr::create(this); + auto &data = creationChange->data; + data.inputIds = qIdsForNodes(inputs()); + return creationChange; +} + } // Qt3DInput QT_END_NAMESPACE -- cgit v1.2.3