diff options
Diffstat (limited to 'src/input/frontend/qaction.cpp')
-rw-r--r-- | src/input/frontend/qaction.cpp | 35 |
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 |