diff options
author | Cristián Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2021-11-11 14:30:38 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-11-29 11:11:40 +0000 |
commit | e47762e7ad848bb45676913d75f44f7485494479 (patch) | |
tree | 55a6677980acf51cba8606faac3e1049b47c1642 /sources | |
parent | f02a0e0f2d8f3f70838753da231cebe3b5cb7b78 (diff) |
Add QtQuick3D module
Adding the module that contains a few C++ classes.
Adding the 'intro' example.
Adding the 'customgeometry' example as well.
Fixes: PYSIDE-1708
Change-Id: I0681f087e74c13c024bb1dfa8de545b30f95d7d8
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit b9ec49942b3ad53343317e631320c58e59736c22)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'sources')
-rw-r--r-- | sources/pyside6/PySide6/QtQuick3D/CMakeLists.txt | 51 | ||||
-rw-r--r-- | sources/pyside6/PySide6/QtQuick3D/typesystem_quick3d.xml | 63 | ||||
-rw-r--r-- | sources/pyside6/cmake/PySideHelpers.cmake | 1 | ||||
-rw-r--r-- | sources/pyside6/tests/QtQuick3D/CMakeLists.txt | 1 |
4 files changed, 116 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/QtQuick3D/CMakeLists.txt b/sources/pyside6/PySide6/QtQuick3D/CMakeLists.txt new file mode 100644 index 000000000..4cde0ae86 --- /dev/null +++ b/sources/pyside6/PySide6/QtQuick3D/CMakeLists.txt @@ -0,0 +1,51 @@ +project(QtQuick3D) + +set(QtQuick3D_SRC +${QtQuick3D_GEN_DIR}/qquick3d_wrapper.cpp +${QtQuick3D_GEN_DIR}/qquick3dobject_wrapper.cpp +${QtQuick3D_GEN_DIR}/qquick3dgeometry_wrapper.cpp +${QtQuick3D_GEN_DIR}/qquick3dgeometry_attribute_wrapper.cpp +${QtQuick3D_GEN_DIR}/qquick3dinstancing_wrapper.cpp +${QtQuick3D_GEN_DIR}/qquick3dinstancing_instancetableentry_wrapper.cpp +${QtQuick3D_GEN_DIR}/qquick3dtexturedata_wrapper.cpp +# module is always needed +${QtQuick3D_GEN_DIR}/qtquick3d_module_wrapper.cpp +) + +set(QtQuick3D_include_dirs ${QtQuick3D_SOURCE_DIR} + ${QtQml_SOURCE_DIR} + ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS} + ${Qt${QT_MAJOR_VERSION}Core_PRIVATE_INCLUDE_DIRS} + ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS} + ${Qt${QT_MAJOR_VERSION}OpenGL_INCLUDE_DIRS} + ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS} + ${Qt${QT_MAJOR_VERSION}Qml_INCLUDE_DIRS} + ${Qt${QT_MAJOR_VERSION}Qml_PRIVATE_INCLUDE_DIRS} + ${Qt${QT_MAJOR_VERSION}Quick_INCLUDE_DIRS} + ${Qt${QT_MAJOR_VERSION}Quick3D_INCLUDE_DIRS} + ${libpyside_SOURCE_DIR} + ${QtGui_GEN_DIR} + ${QtOpenGL_GEN_DIR} + ${QtCore_GEN_DIR} + ${QtNetwork_GEN_DIR} + ${QtQml_GEN_DIR} + ${QtQuick_GEN_DIR} + ${QtQuick3D_GEN_DIR}) + +set(QtQuick3D_libraries pyside6 + ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES} + ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES} + ${Qt${QT_MAJOR_VERSION}OpenGL_LIBRARIES} + ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES} + ${Qt${QT_MAJOR_VERSION}Qml_LIBRARIES} + ${Qt${QT_MAJOR_VERSION}Quick_LIBRARIES} + ${Qt${QT_MAJOR_VERSION}Quick3D_LIBRARIES}) + +set(QtQuick3D_deps QtGui QtOpenGL QtNetwork QtQml) + +create_pyside_module(NAME QtQuick3D + INCLUDE_DIRS QtQuick3D_include_dirs + LIBRARIES QtQuick3D_libraries + DEPS QtQuick3D_deps + TYPESYSTEM_PATH QtQuick3D_SOURCE_DIR + SOURCES QtQuick3D_SRC) diff --git a/sources/pyside6/PySide6/QtQuick3D/typesystem_quick3d.xml b/sources/pyside6/PySide6/QtQuick3D/typesystem_quick3d.xml new file mode 100644 index 000000000..f75da736f --- /dev/null +++ b/sources/pyside6/PySide6/QtQuick3D/typesystem_quick3d.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt for Python. +** +** $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$ +** +****************************************************************************/ +--> +<typesystem package="PySide6.QtQuick3D"> + <load-typesystem name="QtQuick/typesystem_quick.xml" generate="no"/> + + <object-type name="QQuick3D"/> + <object-type name="QQuick3DObject"> + <enum-type name="ItemChange"/> + <modify-function signature="QQuick3DObject(QQuick3DObject*)" remove="all"/> + </object-type> + <object-type name="QQuick3DGeometry"> + <value-type name="Attribute"> + <enum-type name="Semantic"/> + <enum-type name="ComponentType"/> + </value-type> + <enum-type name="PrimitiveType"/> + </object-type> + <object-type name="QQuick3DInstancing"> + <value-type name="InstanceTableEntry"/> + </object-type> + <object-type name="QQuick3DTextureData"> + <enum-type name="Format"/> + </object-type> +</typesystem> diff --git a/sources/pyside6/cmake/PySideHelpers.cmake b/sources/pyside6/cmake/PySideHelpers.cmake index dc6fe22ce..dd71fc20b 100644 --- a/sources/pyside6/cmake/PySideHelpers.cmake +++ b/sources/pyside6/cmake/PySideHelpers.cmake @@ -27,6 +27,7 @@ macro(collect_optional_modules) NetworkAuth Qml Quick + Quick3D QuickControls2 QuickWidgets RemoteObjects diff --git a/sources/pyside6/tests/QtQuick3D/CMakeLists.txt b/sources/pyside6/tests/QtQuick3D/CMakeLists.txt new file mode 100644 index 000000000..2f7cb08b9 --- /dev/null +++ b/sources/pyside6/tests/QtQuick3D/CMakeLists.txt @@ -0,0 +1 @@ +# Please add some tests, here |