summaryrefslogtreecommitdiffstats
path: root/src/input/frontend/qaction.cpp
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2016-03-14 11:33:29 +0000
committerSean Harmer <sean.harmer@kdab.com>2016-03-22 18:16:04 +0000
commitd5bbe5a0680edda59b3fd202bd1e89c11a680f7d (patch)
tree3262e0a7bd3f6231ac69675389d568022f00e0b1 /src/input/frontend/qaction.cpp
parent56c34129c2779a28c4f50d726f877c15265277b7 (diff)
QAction creates creation changes
Task-number: QTBUG-51835 Change-Id: Ide8d96e46706cc2419c1f61fd03281d8981df650 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/input/frontend/qaction.cpp')
-rw-r--r--src/input/frontend/qaction.cpp35
1 files changed, 10 insertions, 25 deletions
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 <Qt3DCore/private/qnode_p.h>
#include <Qt3DCore/qscenepropertychange.h>
+#include <Qt3DCore/qnodecreatedchange.h>
#include <Qt3DInput/qabstractactioninput.h>
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<QAbstractActionInput *> 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<QActionData>::create(this);
+ auto &data = creationChange->data;
+ data.inputIds = qIdsForNodes(inputs());
+ return creationChange;
+}
+
} // Qt3DInput
QT_END_NAMESPACE