diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2014-07-01 11:50:19 +0200 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2014-07-05 14:05:47 +0200 |
commit | 6bc940e8bcf77fa90c147463c497036786ed45f2 (patch) | |
tree | 327a91551665d35a849d30d23f22f49757b8c9ac /src/render/frontend/framegraph-components/qframegraph.cpp | |
parent | 1ea5fc99f583dab103794c96dcb43306ed563b30 (diff) |
Added Q prefix to all frontend framegraph items
Change-Id: I8b8d0e3fc221e8e5dc05938fe0e00f83d72c637d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/frontend/framegraph-components/qframegraph.cpp')
-rw-r--r-- | src/render/frontend/framegraph-components/qframegraph.cpp | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/src/render/frontend/framegraph-components/qframegraph.cpp b/src/render/frontend/framegraph-components/qframegraph.cpp new file mode 100644 index 000000000..9d6dbfa1a --- /dev/null +++ b/src/render/frontend/framegraph-components/qframegraph.cpp @@ -0,0 +1,104 @@ +/**************************************************************************** +** +** Copyright (C) 2014 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: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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 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 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qframegraph.h" +#include "qframegraph_p.h" +#include <Qt3DCore/entity.h> + +QT_BEGIN_NAMESPACE + +namespace Qt3D { + +QFrameGraphPrivate::QFrameGraphPrivate(QFrameGraph *qq) + : ComponentPrivate(qq) + , m_activeFrameGraph(Q_NULLPTR) +{ + +} + +/*! + * \class FrameGraph + * + * \brief Component that has an activeFrameGraph property that should + * reference the root FrameGraphItem of a frame graph tree. The Entity + * that contains a FrameGraph property defines the rendering method to + * be used by the renderer. + * + * Note that only a single FrameGraph can be active at any moment. + * + * \since 5.3 + * \namespace Qt3D + */ + +QFrameGraph::QFrameGraph(Node *parent) + : Component(*new QFrameGraphPrivate(this), parent) +{ +} + +QFrameGraph::QFrameGraph(QFrameGraphPrivate &dd, Node *parent) + : Component(dd, parent) +{ +} + +/*! + * Returns the current activeFrameGraph root node. + */ +Node *QFrameGraph::activeFrameGraph() const +{ + Q_D(const QFrameGraph); + return d->m_activeFrameGraph; +} + +/*! + * Sets the root node \a activeFrameGraph of the FrameGraph. + */ +void QFrameGraph::setActiveFrameGraph(Node *activeFrameGraph) +{ + Q_D(QFrameGraph); + if (activeFrameGraph != d->m_activeFrameGraph) { + d->m_activeFrameGraph = activeFrameGraph; + emit activeFrameGraphChanged(); + } +} + +} // Qt3D + +QT_END_NAMESPACE |