diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2017-01-26 15:27:34 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-01-28 13:51:23 +0000 |
commit | d121ad34f93afd91c2bd97aeb1b9b74a67122825 (patch) | |
tree | 3811cb7e61bc077bbc5a26c1e6fd68dc33d809c7 /src/animation/frontend/qclipblendnodecreatedchange.cpp | |
parent | 09b7ecbb4647802ef06db1b46206b4a3e3cc51e4 (diff) |
Add QClipBlendNodeCreatedChange
Needed to send the parentClipBlendNodeId to the backend and build the tree
structure
Change-Id: I7d9cc7fe48843fa2a91c8c4b936db67b57669897
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/animation/frontend/qclipblendnodecreatedchange.cpp')
-rw-r--r-- | src/animation/frontend/qclipblendnodecreatedchange.cpp | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/src/animation/frontend/qclipblendnodecreatedchange.cpp b/src/animation/frontend/qclipblendnodecreatedchange.cpp new file mode 100644 index 000000000..9e9104066 --- /dev/null +++ b/src/animation/frontend/qclipblendnodecreatedchange.cpp @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qclipblendnodecreatedchange.h" +#include "qclipblendnodecreatedchange_p.h" +#include <Qt3DAnimation/qabstractclipblendnode.h> +#include <Qt3DAnimation/qanimationclip.h> + +QT_BEGIN_NAMESPACE + +namespace Qt3DAnimation { + +QClipBlendNodeCreatedChangeBasePrivate::QClipBlendNodeCreatedChangeBasePrivate(const QAbstractClipBlendNode *node) + : Qt3DCore::QNodeCreatedChangeBasePrivate(node) + , m_parentClipBlendNodeId(Qt3DCore::qIdForNode(node->parentClipBlendNode())) + , m_clips(Qt3DCore::qIdsForNodes(node->clips())) +{ +} + +QClipBlendNodeCreatedChangeBase::QClipBlendNodeCreatedChangeBase(const QAbstractClipBlendNode *node) + : Qt3DCore::QNodeCreatedChangeBase(*new QClipBlendNodeCreatedChangeBasePrivate(node), node) +{ +} + +QClipBlendNodeCreatedChangeBase::~QClipBlendNodeCreatedChangeBase() +{ +} + +Qt3DCore::QNodeId QClipBlendNodeCreatedChangeBase::parentClipBlendNodeId() const +{ + Q_D(const QClipBlendNodeCreatedChangeBase); + return d->m_parentClipBlendNodeId; +} + +Qt3DCore::QNodeIdVector QClipBlendNodeCreatedChangeBase::clips() const +{ + Q_D(const QClipBlendNodeCreatedChangeBase); + return d->m_clips; +} + + +} // Qt3DAnimation + +QT_END_NAMESPACE |