diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-11-15 15:40:03 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-11-16 10:19:44 +0000 |
commit | b8e880e432e5cc640ba1cd95a85ca36c5a1a9a61 (patch) | |
tree | ec8c58eb514f1d8060be72057bfa4537d64f3bc0 /examples | |
parent | 41bdf86429e797ba696d79016721685028cdedaf (diff) |
Make manylayersinquick example a manual test for now
Will not productize this in 2.2.
Change-Id: I6be378671efba1e99f289955a230ac95bdc91a8d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'examples')
7 files changed, 1 insertions, 309 deletions
diff --git a/examples/3dstudioruntime2/3dstudioruntime2.pro b/examples/3dstudioruntime2/3dstudioruntime2.pro index b60052f..37e384d 100644 --- a/examples/3dstudioruntime2/3dstudioruntime2.pro +++ b/examples/3dstudioruntime2/3dstudioruntime2.pro @@ -7,8 +7,7 @@ SUBDIRS += \ qtHaveModule(quick) { SUBDIRS += simpleqml \ qmldatainput \ - layersinquick \ - manylayersinquick + layersinquick } qtHaveModule(widgets) { diff --git a/examples/3dstudioruntime2/manylayersinquick/main.cpp b/examples/3dstudioruntime2/manylayersinquick/main.cpp deleted file mode 100644 index f6a5c0c..0000000 --- a/examples/3dstudioruntime2/manylayersinquick/main.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt 3D Studio. -** -** $QT_BEGIN_LICENSE:BSD$ -** 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. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QGuiApplication> -#include <QQuickView> -#include <q3dsruntimeglobal.h> - -int main(int argc, char *argv[]) -{ - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - qputenv("QSG_INFO", "1"); - QGuiApplication app(argc, argv); - - // Use the ideal format (i.e. OpenGL version and profile) recommended by - // the Qt 3D Studio runtime. Without this the format set on the QQuickView - // would be used instead. - QSurfaceFormat::setDefaultFormat(Q3DS::surfaceFormat()); - - QQuickView viewer; - viewer.setSource(QUrl("qrc:/main.qml")); - - viewer.setTitle(QStringLiteral("Qt 3D Studio Layers-as-Quick-Items Example No. 2")); - viewer.setResizeMode(QQuickView::SizeRootObjectToView); - viewer.resize(1280, 720); - viewer.show(); - - return app.exec(); -} diff --git a/examples/3dstudioruntime2/manylayersinquick/main.qml b/examples/3dstudioruntime2/manylayersinquick/main.qml deleted file mode 100644 index a1ffa6c..0000000 --- a/examples/3dstudioruntime2/manylayersinquick/main.qml +++ /dev/null @@ -1,119 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt 3D Studio. -** -** $QT_BEGIN_LICENSE:BSD$ -** 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. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Controls 2.2 -import QtStudio3D 2.2 - -Rectangle { - id: root - color: "lightGray" - - Studio3D { - id: s3d - Presentation { - id: pres - source: "qrc:/manylayers.uip" - profilingEnabled: true - } - property int layerCount: 3 // Layer1, Layer2, Layer3 - } - - ListView { - anchors.fill: parent - - model: 32 - delegate: Rectangle { - width: parent.width - height: 100 - color: index % 2 ? "steelblue" : "lightsteelblue" - Rectangle { - border.color: "gray" - border.width: 2 - radius: 8 - color: "transparent" - anchors.centerIn: parent - width: parent.width / 2 - height: parent.height - 10 - View3D { - id: view3D - anchors.fill: parent - engine: s3d - source: "Layer" + ((index % s3d.layerCount) + 1) - } - } - Text { - anchors.verticalCenter: parent.verticalCenter - color: "green" - text: "3D layer '" + view3D.source + "'" - font.bold: true - } - } - } - - Button { - id: profBtn - text: "Profile UI" - // we use a Studio3DProfiler item so toggle that instead of pres.profileUiVisible - onClicked: quickBasedProfileUI.visible = !quickBasedProfileUI.visible - focusPolicy: Qt.NoFocus - } - - // This example uses Qt Quick-based debug views because rendering them with - // Qt 3D is not feasible anymore in the separated views model (as Qt 3D is - // not responsible for the final composed image). - Studio3DProfiler { - id: quickBasedProfileUI - visible: false - focus: true - anchors.fill: parent - anchors.topMargin: 40 // make sure we do not cover the top area with the button - } -} diff --git a/examples/3dstudioruntime2/manylayersinquick/manylayers.uia b/examples/3dstudioruntime2/manylayersinquick/manylayers.uia deleted file mode 100644 index 828a44b..0000000 --- a/examples/3dstudioruntime2/manylayersinquick/manylayers.uia +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version='1.0' encoding='utf-8'?> -<application xmlns="http://qt.io/qt3dstudio/uia"> - <assets initial="ClassicContextMain"> - <presentation src="manylayers.uip" id="ClassicContextMain"/> - </assets> - <statemachine ref="#logic"> - <visual-states> - <state ref="Initial"> - <enter> - <goto-slide element="main:Scene" rel="next"/> - </enter> - </state> - </visual-states> - </statemachine> -</application> diff --git a/examples/3dstudioruntime2/manylayersinquick/manylayers.uip b/examples/3dstudioruntime2/manylayersinquick/manylayers.uip deleted file mode 100644 index 8ed17cd..0000000 --- a/examples/3dstudioruntime2/manylayersinquick/manylayers.uip +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<UIP version="4" > - <Project > - <ProjectSettings author="" company="" presentationWidth="640" presentationHeight="480" maintainAspect="False" > - <CustomColors count="16" >#ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff</CustomColors> - </ProjectSettings> - <Graph > - <Scene id="Scene" backgroundcolor="0.317647 0.65098 0.956863" bgcolorenable="False" > - <Layer id="Layer1" > - <Camera id="Camera" /> - <Light id="Light" /> - <Model id="Cube" > - <Material id="Default" name="Default" /> - </Model> - </Layer> - <Layer id="Layer2" > - <Camera id="Camera_001" /> - <Light id="Light_001" /> - <Model id="Sphere" > - <Material id="Default_001" name="Default" /> - </Model> - </Layer> - <Layer id="Layer3" > - <Camera id="Camera_002" /> - <Light id="Light_002" /> - <Model id="Cylinder" > - <Material id="Default_002" name="Default" /> - </Model> - <Model id="Cone" > - <Material id="Default_003" name="Default" /> - </Model> - </Layer> - </Scene> - </Graph> - <Logic > - <State name="Master Slide" component="#Scene" > - <Add ref="#Layer1" name="Layer1" /> - <Add ref="#Camera" position="0 0 -600" rotation="0 0 0" /> - <Add ref="#Light" lightdiffuse="1 1 0.721569" /> - <State id="Scene-Slide1" name="Slide1" playmode="Looping" > - <Add ref="#Cube" name="Cube" position="0.180962 -0.720062 32.5651" rotation="-16.5703 -27.2172 8.34447" scale="2.7901 4.29753 1" sourcepath="#Cube" > - <AnimationTrack property="rotation.x" type="EaseInOut" >0 0 100 100 10 0 100 100</AnimationTrack> - <AnimationTrack property="rotation.y" type="EaseInOut" >0 0 100 100 10 360 100 100</AnimationTrack> - <AnimationTrack property="rotation.z" type="EaseInOut" >0 0 100 100 10 0 100 100</AnimationTrack> - </Add> - <Add ref="#Default" /> - <Add ref="#Layer2" name="Layer2" background="Transparent" backgroundcolor="0.239216 0.647059 1" /> - <Add ref="#Camera_001" /> - <Add ref="#Light_001" /> - <Add ref="#Sphere" name="Sphere" rotation="0 -45 0" scale="3.44068 3.09375 1" sourcepath="#Sphere" > - <AnimationTrack property="position.x" type="EaseInOut" >0 0 100 100 5.083 -6.31474 100 100 10 0 100 100</AnimationTrack> - <AnimationTrack property="position.y" type="EaseInOut" >0 0 100 100 5.083 163.282 100 100 10 0 100 100</AnimationTrack> - <AnimationTrack property="position.z" type="EaseInOut" >0 0 100 100 5.083 0 100 100 10 0 100 100</AnimationTrack> - <AnimationTrack property="rotation.x" type="EaseInOut" >0 0 100 100 10 0 100 100</AnimationTrack> - <AnimationTrack property="rotation.y" type="EaseInOut" >0 45 100 100 10 -45 100 100</AnimationTrack> - <AnimationTrack property="rotation.z" type="EaseInOut" >0 0 100 100 10 0 100 100</AnimationTrack> - </Add> - <Add ref="#Default_001" /> - <Add ref="#Layer3" name="Layer3" background="Transparent" backgroundcolor="0.239216 0.647059 1" /> - <Add ref="#Camera_002" /> - <Add ref="#Light_002" /> - <Add ref="#Cylinder" name="Cylinder" rotation="-42.4866 14.7144 -21.247" scale="1.85959 3.83831 1" sourcepath="#Cylinder" > - <AnimationTrack property="position.x" type="EaseInOut" >0 0 100 100 6.15 0 100 100 10 0 100 100</AnimationTrack> - <AnimationTrack property="position.y" type="EaseInOut" >0 0 100 100 6.15 100 100 100 10 0 100 100</AnimationTrack> - <AnimationTrack property="position.z" type="EaseInOut" >0 0 100 100 6.15 0 100 100 10 0 100 100</AnimationTrack> - </Add> - <Add ref="#Default_002" /> - <Add ref="#Cone" name="Cone" position="-316.099 34.641 0" scale="1.85248 2.08915 1" sourcepath="#Cone" > - <AnimationTrack property="position.x" type="EaseInOut" >0 -316.099 100 100 5.65 -316.099 100 100 10 -316.099 100 100</AnimationTrack> - <AnimationTrack property="position.y" type="EaseInOut" >0 34.641 100 100 5.65 -50 100 100 10 -34 100 100</AnimationTrack> - <AnimationTrack property="position.z" type="EaseInOut" >0 0 100 100 5.65 0 100 100 10 0 100 100</AnimationTrack> - </Add> - <Add ref="#Default_003" /> - </State> - </State> - </Logic> - </Project> -</UIP> diff --git a/examples/3dstudioruntime2/manylayersinquick/manylayersinquick.pro b/examples/3dstudioruntime2/manylayersinquick/manylayersinquick.pro deleted file mode 100644 index 2fbd78a..0000000 --- a/examples/3dstudioruntime2/manylayersinquick/manylayersinquick.pro +++ /dev/null @@ -1,14 +0,0 @@ -TEMPLATE = app - -QT += quick 3dstudioruntime2 - -SOURCES += \ - main.cpp - -RESOURCES += manylayersinquick.qrc - -OTHER_FILES += \ - main.qml - -target.path = $$[QT_INSTALL_EXAMPLES]/3dstudioruntime2/$$TARGET -INSTALLS += target diff --git a/examples/3dstudioruntime2/manylayersinquick/manylayersinquick.qrc b/examples/3dstudioruntime2/manylayersinquick/manylayersinquick.qrc deleted file mode 100644 index a91206f..0000000 --- a/examples/3dstudioruntime2/manylayersinquick/manylayersinquick.qrc +++ /dev/null @@ -1,6 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>main.qml</file> - <file>manylayers.uip</file> - </qresource> -</RCC> |