diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-03-24 13:21:25 +0000 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-03-26 07:29:29 +0000 |
commit | 9a5139a2b59ac27afa190caa46ba22138f9dfa6c (patch) | |
tree | e0ceb21228fd923aa72cdeb87d637377ae92060a /src/quick3d/quick3danimation | |
parent | 78280da782ea8c1882afe18ee611aa199e914418 (diff) |
Remove clips property from QAbstractClipBlendNode and friends
No longer needed as concrete subclasses each provide their own specific
APIs for managing clips or sub trees.
Change-Id: I8e090bcf18ad9bf0d19e36128d7556aaa6cd6edf
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/quick3d/quick3danimation')
3 files changed, 0 insertions, 183 deletions
diff --git a/src/quick3d/quick3danimation/items/items.pri b/src/quick3d/quick3danimation/items/items.pri index 1c88df570..3f19965b5 100644 --- a/src/quick3d/quick3danimation/items/items.pri +++ b/src/quick3d/quick3danimation/items/items.pri @@ -1,6 +1,5 @@ SOURCES += \ $$PWD/quick3dchannelmapper.cpp \ - $$PWD/quick3dabstractclipblendnode.cpp \ $$PWD/quick3danimationcontroller.cpp \ $$PWD/quick3danimationgroup.cpp \ $$PWD/quick3dkeyframeanimation.cpp \ @@ -9,7 +8,6 @@ SOURCES += \ HEADERS += \ $$PWD/quick3dchannelmapper_p.h \ - $$PWD/quick3dabstractclipblendnode_p.h \ $$PWD/quick3danimationcontroller_p.h \ $$PWD/quick3danimationgroup_p.h \ $$PWD/quick3dkeyframeanimation_p.h \ diff --git a/src/quick3d/quick3danimation/items/quick3dabstractclipblendnode.cpp b/src/quick3d/quick3danimation/items/quick3dabstractclipblendnode.cpp deleted file mode 100644 index 7094d2bcf..000000000 --- a/src/quick3d/quick3danimation/items/quick3dabstractclipblendnode.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 https://www.qt.io/terms-conditions. For further -** information use the contact form at https://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.LGPL3 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-3.0.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 (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "quick3dabstractclipblendnode_p.h" - -QT_BEGIN_NAMESPACE - -namespace Qt3DAnimation { -namespace Animation { -namespace Quick { - -Quick3DAbstractClipBlendNode::Quick3DAbstractClipBlendNode(QObject *parent) - : QObject(parent) -{ -} - -QQmlListProperty<QAbstractAnimationClip> Quick3DAbstractClipBlendNode::clipList() -{ - return QQmlListProperty<QAbstractAnimationClip>(this, 0, - &Quick3DAbstractClipBlendNode::appendClip, - &Quick3DAbstractClipBlendNode::clipCount, - &Quick3DAbstractClipBlendNode::clipAt, - &Quick3DAbstractClipBlendNode::clearClips); -} - -void Quick3DAbstractClipBlendNode::appendClip(QQmlListProperty<QAbstractAnimationClip> *list, QAbstractAnimationClip *clip) -{ - Quick3DAbstractClipBlendNode *extension = qobject_cast<Quick3DAbstractClipBlendNode *>(list->object); - extension->parentAbstractClipBlendNode()->addClip(clip); -} - -QAbstractAnimationClip *Quick3DAbstractClipBlendNode::clipAt(QQmlListProperty<QAbstractAnimationClip> *list, int index) -{ - Quick3DAbstractClipBlendNode *extension = qobject_cast<Quick3DAbstractClipBlendNode *>(list->object); - return extension->parentAbstractClipBlendNode()->clips().at(index); -} - -int Quick3DAbstractClipBlendNode::clipCount(QQmlListProperty<QAbstractAnimationClip> *list) -{ - Quick3DAbstractClipBlendNode *extension = qobject_cast<Quick3DAbstractClipBlendNode *>(list->object); - return extension->parentAbstractClipBlendNode()->clips().count(); -} - -void Quick3DAbstractClipBlendNode::clearClips(QQmlListProperty<QAbstractAnimationClip> *list) -{ - Quick3DAbstractClipBlendNode *extension = qobject_cast<Quick3DAbstractClipBlendNode *>(list->object); - const QVector<QAbstractAnimationClip *> clips = extension->parentAbstractClipBlendNode()->clips(); - for (QAbstractAnimationClip *clip : clips) - extension->parentAbstractClipBlendNode()->removeClip(clip); -} - -} // Quick -} // Animation -} // Qt3DAnimation - -QT_END_NAMESPACE diff --git a/src/quick3d/quick3danimation/items/quick3dabstractclipblendnode_p.h b/src/quick3d/quick3danimation/items/quick3dabstractclipblendnode_p.h deleted file mode 100644 index 8524600f4..000000000 --- a/src/quick3d/quick3danimation/items/quick3dabstractclipblendnode_p.h +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 https://www.qt.io/terms-conditions. For further -** information use the contact form at https://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.LGPL3 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-3.0.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 (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QT3DANIMATION_ANIMATION_QUICK3DABSTRACTCLIPBLENDNODE_P_H -#define QT3DANIMATION_ANIMATION_QUICK3DABSTRACTCLIPBLENDNODE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of other Qt classes. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include <Qt3DQuickAnimation/private/qt3dquickanimation_global_p.h> -#include <Qt3DAnimation/qabstractclipblendnode.h> -#include <Qt3DAnimation/qabstractanimationclip.h> -#include <QQmlListProperty> - -QT_BEGIN_NAMESPACE - -namespace Qt3DAnimation { -namespace Animation { -namespace Quick { - -class QT3DQUICKANIMATIONSHARED_PRIVATE_EXPORT Quick3DAbstractClipBlendNode : public QObject -{ - Q_OBJECT - Q_PROPERTY(QQmlListProperty<Qt3DAnimation::QAbstractAnimationClip> clips READ clipList CONSTANT) - -public: - explicit Quick3DAbstractClipBlendNode(QObject *parent = nullptr); - - inline QAbstractClipBlendNode *parentAbstractClipBlendNode() const { return qobject_cast<QAbstractClipBlendNode *>(parent()); } - QQmlListProperty<QAbstractAnimationClip> clipList(); - -private: - static void appendClip(QQmlListProperty<QAbstractAnimationClip> *list, QAbstractAnimationClip *clip); - static QAbstractAnimationClip *clipAt(QQmlListProperty<QAbstractAnimationClip> *list, int index); - static int clipCount(QQmlListProperty<QAbstractAnimationClip> *list); - static void clearClips(QQmlListProperty<QAbstractAnimationClip> *list); -}; - -} // Quick -} // Animation -} // Qt3DAnimation - -QT_END_NAMESPACE - -#endif // QT3DANIMATION_ANIMATION_QUICK3DABSTRACTCLIPBLENDNODE_P_H |