diff options
Diffstat (limited to 'src/quick3d/imports/scene2d')
-rw-r--r-- | src/quick3d/imports/scene2d/importsscene2d.pro | 19 | ||||
-rw-r--r-- | src/quick3d/imports/scene2d/plugins.qmltypes | 121 | ||||
-rw-r--r-- | src/quick3d/imports/scene2d/qmldir | 3 | ||||
-rw-r--r-- | src/quick3d/imports/scene2d/qtquickscene2dplugin.cpp | 58 | ||||
-rw-r--r-- | src/quick3d/imports/scene2d/qtquickscene2dplugin.h | 62 |
5 files changed, 263 insertions, 0 deletions
diff --git a/src/quick3d/imports/scene2d/importsscene2d.pro b/src/quick3d/imports/scene2d/importsscene2d.pro new file mode 100644 index 000000000..32fbc5b1b --- /dev/null +++ b/src/quick3d/imports/scene2d/importsscene2d.pro @@ -0,0 +1,19 @@ +CXX_MODULE = qml +TARGET = qtquickscene2dplugin +TARGETPATH = QtQuick/Scene2D +IMPORT_VERSION = 2.0 + +QT += qml quick 3dcore 3drender 3drender-private 3dinput 3dlogic 3dquickscene2d 3dquickscene2d-private + +# Qt3D is free of Q_FOREACH - make sure it stays that way: +DEFINES += QT_NO_FOREACH + +HEADERS += \ + qtquickscene2dplugin.h \ + +SOURCES += \ + qtquickscene2dplugin.cpp \ + +OTHER_FILES += qmldir + +load(qml_plugin) diff --git a/src/quick3d/imports/scene2d/plugins.qmltypes b/src/quick3d/imports/scene2d/plugins.qmltypes new file mode 100644 index 000000000..a26dcbec0 --- /dev/null +++ b/src/quick3d/imports/scene2d/plugins.qmltypes @@ -0,0 +1,121 @@ +import QtQuick.tooling 1.2 + +// This file describes the plugin-supplied types contained in the library. +// It is used for QML tooling purposes only. +// +// This file was auto-generated by: +// 'qmlplugindump -nonrelocatable -output plugins.qmltypes QtQuick.Scene2D 2.9' + +Module { + dependencies: [] + Component { + name: "Qt3DCore::QNode" + prototype: "QObject" + Enum { + name: "PropertyTrackingMode" + values: { + "TrackFinalValues": 0, + "DontTrackValues": 1, + "TrackAllValues": 2 + } + } + Property { name: "parent"; type: "Qt3DCore::QNode"; isPointer: true } + Property { name: "enabled"; type: "bool" } + Property { name: "defaultPropertyTrackingMode"; revision: 9; type: "PropertyTrackingMode" } + Signal { + name: "parentChanged" + Parameter { name: "parent"; type: "QObject"; isPointer: true } + } + Signal { + name: "enabledChanged" + Parameter { name: "enabled"; type: "bool" } + } + Signal { + name: "defaultPropertyTrackingModeChanged" + Parameter { name: "mode"; type: "PropertyTrackingMode" } + } + Signal { name: "nodeDestroyed" } + Method { + name: "setParent" + Parameter { name: "parent"; type: "QNode"; isPointer: true } + } + Method { + name: "setEnabled" + Parameter { name: "isEnabled"; type: "bool" } + } + Method { + name: "setDefaultPropertyTrackingMode" + Parameter { name: "mode"; type: "PropertyTrackingMode" } + } + } + Component { + name: "Qt3DRender::Quick::QScene2D" + defaultProperty: "item" + prototype: "Qt3DCore::QNode" + Enum { + name: "RenderPolicy" + values: { + "Continuous": 0, + "SingleShot": 1 + } + } + Property { name: "output"; type: "Qt3DRender::QRenderTargetOutput"; isPointer: true } + Property { name: "source"; type: "QUrl" } + Property { name: "renderPolicy"; type: "QScene2D::RenderPolicy" } + Property { name: "loaded"; type: "bool"; isReadonly: true } + Property { name: "item"; type: "QQuickItem"; isPointer: true } + Property { name: "grabMouse"; type: "bool" } + Signal { + name: "outputChanged" + Parameter { name: "output"; type: "Qt3DRender::QRenderTargetOutput"; isPointer: true } + } + Signal { + name: "sourceChanged" + Parameter { name: "url"; type: "QUrl" } + } + Signal { + name: "loadedChanged" + Parameter { name: "loaded"; type: "bool" } + } + Signal { + name: "renderPolicyChanged" + Parameter { name: "policy"; type: "QScene2D::RenderPolicy" } + } + Signal { + name: "itemChanged" + Parameter { name: "item"; type: "QQuickItem"; isPointer: true } + } + Signal { + name: "grabMouseChanged" + Parameter { name: "grab"; type: "bool" } + } + Method { + name: "setOutput" + Parameter { name: "output"; type: "Qt3DRender::QRenderTargetOutput"; isPointer: true } + } + Method { + name: "setSource" + Parameter { name: "url"; type: "QUrl" } + } + Method { + name: "setRenderPolicy" + Parameter { name: "policy"; type: "QScene2D::RenderPolicy" } + } + Method { + name: "setItem" + Parameter { name: "item"; type: "QQuickItem"; isPointer: true } + } + Method { + name: "setGrabMouseEnabled" + Parameter { name: "grab"; type: "bool" } + } + } + Component { + name: "Qt3DRender::Render::Quick::QQuick3DScene2D" + defaultProperty: "item" + prototype: "Qt3DRender::Quick::QScene2D" + exports: ["QtQuick.Scene2D/Scene2D 2.9"] + exportMetaObjectRevisions: [0] + Property { name: "entities"; type: "Qt3DCore::QEntity"; isList: true; isReadonly: true } + } +} diff --git a/src/quick3d/imports/scene2d/qmldir b/src/quick3d/imports/scene2d/qmldir new file mode 100644 index 000000000..2e807f1e6 --- /dev/null +++ b/src/quick3d/imports/scene2d/qmldir @@ -0,0 +1,3 @@ +module QtQuick.Scene2D +plugin qtquickscene2dplugin +classname QtQuickScene2DPlugin diff --git a/src/quick3d/imports/scene2d/qtquickscene2dplugin.cpp b/src/quick3d/imports/scene2d/qtquickscene2dplugin.cpp new file mode 100644 index 000000000..4e6245d2d --- /dev/null +++ b/src/quick3d/imports/scene2d/qtquickscene2dplugin.cpp @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** 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 "qtquickscene2dplugin.h" + +#include <Qt3DQuickScene2D/qscene2d.h> +#include <private/qrenderaspect_p.h> +#include <Qt3DQuickScene2D/private/qt3dquick3dscene2d_p.h> +#include <QtCore/qcoreapplication.h> + +QT_BEGIN_NAMESPACE + +static void initScene2dPlugin() +{ + Qt3DRender::QRenderAspectPrivate::configurePlugin("scene2d"); +} + +Q_COREAPP_STARTUP_FUNCTION(initScene2dPlugin) + +void QtQuickScene2DPlugin::registerTypes(const char *uri) +{ + qmlRegisterExtendedType<Qt3DRender::Quick::QScene2D, Qt3DRender::Render::Quick::QQuick3DScene2D>(uri, 2, 9, "Scene2D"); +} + +QT_END_NAMESPACE diff --git a/src/quick3d/imports/scene2d/qtquickscene2dplugin.h b/src/quick3d/imports/scene2d/qtquickscene2dplugin.h new file mode 100644 index 000000000..c9318673f --- /dev/null +++ b/src/quick3d/imports/scene2d/qtquickscene2dplugin.h @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** 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$ +** +****************************************************************************/ + +#ifndef QTQUICKSCENE2DPLUGIN_H +#define QTQUICKSCENE2DPLUGIN_H + +#include <QtQml/qqmlextensionplugin.h> + +static void initResources() +{ +#ifdef QT_STATIC + Q_INIT_RESOURCE(qmake_QtQuick_Scene2D); +#endif +} + +QT_BEGIN_NAMESPACE + +class QtQuickScene2DPlugin : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) +public: + QtQuickScene2DPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); } + void registerTypes(const char *uri) Q_DECL_OVERRIDE; +}; + +QT_END_NAMESPACE + +#endif // QTQUICKSCENE2DPLUGIN_H |