diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2014-06-03 10:15:33 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-06-04 09:38:23 +0200 |
commit | 2a7ba84a29bf84072b759ced88efe1cdeb2a56b3 (patch) | |
tree | 1e5a042779de4bdc1be51b6656e6ce857c3c7350 | |
parent | a3f16ce00dc564c38bc812e97a0c98be14604364 (diff) |
RenderTargetSelector Quick3D extension
Change-Id: Id55e288d4682cd5a46e972a29d0df06ee0d5d050
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
9 files changed, 16 insertions, 140 deletions
diff --git a/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp b/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp index 556b73dd1..244f0a8cd 100644 --- a/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp +++ b/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp @@ -90,7 +90,7 @@ void Qt3DQuick3DRenderPlugin::registerTypes(const char *uri) qmlRegisterExtendedType<Qt3D::RenderPassFilter, Qt3D::Render::Quick::Quick3DRenderPassFilter>(uri, 2, 0, "RenderPassFilter"); qmlRegisterExtendedType<Qt3D::TechniqueFilter, Qt3D::Render::Quick::Quick3DTechniqueFilter>(uri, 2, 0, "TechniqueFilter"); qmlRegisterExtendedType<Qt3D::Viewport, Qt3D::Render::Quick::Quick3DViewport>(uri, 2, 0, "Viewport"); - qmlRegisterType<Qt3D::Render::Quick::Quick3DRenderTargetSelector>(uri, 2, 0, "RenderTargetSelector"); + qmlRegisterExtendedType<Qt3D::RenderTargetSelector, Qt3D::Render::Quick::Quick3DRenderTargetSelector>(uri, 2, 0, "RenderTargetSelector"); qmlRegisterType<Qt3D::FrameGraph>(uri, 2, 0, "FrameGraph"); } diff --git a/src/quick3d/quick3drenderer/items/quick3dframegraphitem.cpp b/src/quick3d/quick3drenderer/items/quick3dframegraphitem.cpp index 72c1110b8..0169fdab4 100644 --- a/src/quick3d/quick3drenderer/items/quick3dframegraphitem.cpp +++ b/src/quick3d/quick3drenderer/items/quick3dframegraphitem.cpp @@ -49,7 +49,7 @@ namespace Render { namespace Quick { -Quick3DFrameGraphItem::Quick3DFrameGraphItem(Node *parent) +Quick3DFrameGraphItem::Quick3DFrameGraphItem(QObject *parent) : Qt3D::Quick::Quick3DNode(parent) , FrameGraphItem() { diff --git a/src/quick3d/quick3drenderer/items/quick3dframegraphitem.h b/src/quick3d/quick3drenderer/items/quick3dframegraphitem.h index fb8210d8b..81cc8d278 100644 --- a/src/quick3d/quick3drenderer/items/quick3dframegraphitem.h +++ b/src/quick3d/quick3drenderer/items/quick3dframegraphitem.h @@ -61,7 +61,7 @@ class QT3DQUICKRENDERERSHARED_EXPORT Quick3DFrameGraphItem : public Qt3D::Quick: Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged) public: - explicit Quick3DFrameGraphItem(Node *parent = 0); + explicit Quick3DFrameGraphItem(QObject *parent = 0); virtual ~Quick3DFrameGraphItem(); diff --git a/src/quick3d/quick3drenderer/items/quick3drendertargetselector.cpp b/src/quick3d/quick3drenderer/items/quick3drendertargetselector.cpp index bac614668..98d290d0f 100644 --- a/src/quick3d/quick3drenderer/items/quick3drendertargetselector.cpp +++ b/src/quick3d/quick3drenderer/items/quick3drendertargetselector.cpp @@ -49,9 +49,8 @@ namespace Render { namespace Quick { -Quick3DRenderTargetSelector::Quick3DRenderTargetSelector(Node * parent) - : RenderTargetSelector() - , Quick3DFrameGraphItem(parent) +Quick3DRenderTargetSelector::Quick3DRenderTargetSelector(QObject * parent) + : QObject(parent) { } diff --git a/src/quick3d/quick3drenderer/items/quick3drendertargetselector.h b/src/quick3d/quick3drenderer/items/quick3drendertargetselector.h index a3afbd852..685057667 100644 --- a/src/quick3d/quick3drenderer/items/quick3drendertargetselector.h +++ b/src/quick3d/quick3drenderer/items/quick3drendertargetselector.h @@ -53,15 +53,12 @@ namespace Render { namespace Quick { -class QT3DQUICKRENDERERSHARED_EXPORT Quick3DRenderTargetSelector : public Quick3DFrameGraphItem, public virtual RenderTargetSelector +class QT3DQUICKRENDERERSHARED_EXPORT Quick3DRenderTargetSelector : public QObject { Q_OBJECT - Q_INTERFACES(Qt3D::RenderTargetSelector) public: - explicit Quick3DRenderTargetSelector(Node *parent = 0); + explicit Quick3DRenderTargetSelector(QObject *parent = 0); -Q_SIGNALS: - void enabledChanged() Q_DECL_OVERRIDE; }; } // Quick diff --git a/src/render/frontend/render-frontend.pri b/src/render/frontend/render-frontend.pri index 3ad6727ae..0c76a391f 100644 --- a/src/render/frontend/render-frontend.pri +++ b/src/render/frontend/render-frontend.pri @@ -20,7 +20,6 @@ HEADERS += \ $$PWD/framegraphitem_p.h \ $$PWD/viewport.h \ $$PWD/cameraselector.h \ - $$PWD/rendertargetselectoritem.h \ $$PWD/effect.h \ $$PWD/scene.h \ $$PWD/techniquecriterion.h @@ -38,7 +37,6 @@ SOURCES += \ $$PWD/qabstractscene.cpp \ $$PWD/framegraph.cpp \ $$PWD/framegraphitem.cpp \ - $$PWD/rendertargetselectoritem.cpp \ $$PWD/effect.cpp \ $$PWD/scene.cpp \ $$PWD/techniquecriterion.cpp diff --git a/src/render/frontend/rendertargetselector.h b/src/render/frontend/rendertargetselector.h index 02eb19d49..7adca56ae 100644 --- a/src/render/frontend/rendertargetselector.h +++ b/src/render/frontend/rendertargetselector.h @@ -62,13 +62,19 @@ public: RenderTargetSelector *q_ptr; }; -class QT3DRENDERERSHARED_EXPORT RenderTargetSelector : public FrameGraphItem +class QT3DRENDERERSHARED_EXPORT RenderTargetSelector : public Node, public FrameGraphItem { + Q_OBJECT + Q_INTERFACES(Qt3D::FrameGraphItem) public: - explicit RenderTargetSelector() - : d_ptr(new RenderTargetSelectorPrivate(this)) + explicit RenderTargetSelector(Node *parent = 0) + : Node(parent) + , d_ptr(new RenderTargetSelectorPrivate(this)) {} +Q_SIGNALS: + void enabledChanged() Q_DECL_OVERRIDE; + private: Q_DECLARE_PRIVATE(RenderTargetSelector) RenderTargetSelectorPrivate *d_ptr; @@ -76,8 +82,6 @@ private: } // Qt3D -Q_DECLARE_INTERFACE(Qt3D::RenderTargetSelector, "org.qt-project.Qt3D.Render.RenderTargetSelector/2.0") - QT_END_NAMESPACE #endif // QT3D_RENDERTARGETSELECTOR_H diff --git a/src/render/frontend/rendertargetselectoritem.cpp b/src/render/frontend/rendertargetselectoritem.cpp deleted file mode 100644 index a01897b2f..000000000 --- a/src/render/frontend/rendertargetselectoritem.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** 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 "rendertargetselectoritem.h" - -QT_BEGIN_NAMESPACE - -namespace Qt3D { - -RenderTargetSelectorNode::RenderTargetSelectorNode(Node *parent) - : Node(parent) - , RenderTargetSelector() -{ -} - -} // Qt3D - -QT_END_NAMESPACE diff --git a/src/render/frontend/rendertargetselectoritem.h b/src/render/frontend/rendertargetselectoritem.h deleted file mode 100644 index da1406fa3..000000000 --- a/src/render/frontend/rendertargetselectoritem.h +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ - -#ifndef QT3D_RENDERTARGETSELECTORNODE_H -#define QT3D_RENDERTARGETSELECTORNODE_H - -#include <Qt3DRenderer/rendertargetselector.h> - -QT_BEGIN_NAMESPACE - -namespace Qt3D { - -class QT3DRENDERERSHARED_EXPORT RenderTargetSelectorNode : public Node, public RenderTargetSelector -{ - Q_OBJECT - Q_INTERFACES(Qt3D::FrameGraphItem) - Q_INTERFACES(Qt3D::RenderTargetSelector) -public: - RenderTargetSelectorNode(Node *parent = 0); -Q_SIGNALS: - void enabledChanged() Q_DECL_OVERRIDE; -}; - -} // Qt3D - -QT_END_NAMESPACE - -#endif // QT3D_RENDERTARGETSELECTORNODE_H |