From 34bc389543c37b8439c9c0b48f471649b6529868 Mon Sep 17 00:00:00 2001 From: Oliver Eftevaag Date: Tue, 31 Aug 2021 17:54:15 +0200 Subject: Fix ImageElements example to use a QML module Removed the 'content' directory, and placed all images into a 'pics' directory. CMakeLists.txt is now also using qt_add_qml_module() Pick-to: 6.2 Change-Id: I673b7adea1832f304003f95e171118b0822b3c83 Reviewed-by: Shawn Rutledge --- .../quick/imageelements/BorderImageSelector.qml | 109 ++++++++++++++++++++ examples/quick/imageelements/CMakeLists.txt | 114 ++++++++------------- examples/quick/imageelements/ImageCell.qml | 68 ++++++++++++ examples/quick/imageelements/MyBorderImage.qml | 101 ++++++++++++++++++ examples/quick/imageelements/ShadowRectangle.qml | 66 ++++++++++++ examples/quick/imageelements/animatedimage.qml | 2 +- examples/quick/imageelements/animatedsprite.qml | 2 +- examples/quick/imageelements/borderimage.qml | 17 ++- examples/quick/imageelements/content/BearSheet.png | Bin 406337 -> 0 bytes .../imageelements/content/BorderImageSelector.qml | 109 -------------------- examples/quick/imageelements/content/ImageCell.qml | 68 ------------ .../quick/imageelements/content/MyBorderImage.qml | 101 ------------------ .../imageelements/content/ShadowRectangle.qml | 66 ------------ .../imageelements/content/Uniflow_steam_engine.gif | Bin 45328 -> 0 bytes examples/quick/imageelements/content/arrow.png | Bin 247 -> 0 bytes examples/quick/imageelements/content/bw.png | Bin 1357 -> 0 bytes .../quick/imageelements/content/colors-round.sci | 7 -- .../quick/imageelements/content/colors-stretch.sci | 5 - examples/quick/imageelements/content/colors.png | Bin 974 -> 0 bytes examples/quick/imageelements/content/multi.ico | Bin 27110 -> 0 bytes examples/quick/imageelements/content/qt-logo.png | Bin 5149 -> 0 bytes examples/quick/imageelements/content/shadow.png | Bin 371 -> 0 bytes examples/quick/imageelements/content/speaker.png | Bin 784525 -> 0 bytes .../quick/imageelements/doc/src/imageelements.qdoc | 2 +- examples/quick/imageelements/framestepping.qml | 2 +- examples/quick/imageelements/image.qml | 1 - examples/quick/imageelements/imageelements.qml | 2 +- examples/quick/imageelements/imageelements.qrc | 34 +++--- .../quick/imageelements/multiframeborderimage.qml | 2 +- examples/quick/imageelements/pics/BearSheet.png | Bin 0 -> 406337 bytes .../imageelements/pics/Uniflow_steam_engine.gif | Bin 0 -> 45328 bytes examples/quick/imageelements/pics/arrow.png | Bin 0 -> 247 bytes examples/quick/imageelements/pics/bw.png | Bin 0 -> 1357 bytes examples/quick/imageelements/pics/colors-round.sci | 7 ++ .../quick/imageelements/pics/colors-stretch.sci | 5 + examples/quick/imageelements/pics/colors.png | Bin 0 -> 974 bytes examples/quick/imageelements/pics/multi.ico | Bin 0 -> 27110 bytes examples/quick/imageelements/pics/qt-logo.png | Bin 0 -> 5149 bytes examples/quick/imageelements/pics/shadow.png | Bin 0 -> 371 bytes examples/quick/imageelements/pics/speaker.png | Bin 0 -> 784525 bytes examples/quick/imageelements/shadows.qml | 1 - examples/quick/imageelements/spritesequence.qml | 10 +- 42 files changed, 433 insertions(+), 468 deletions(-) create mode 100644 examples/quick/imageelements/BorderImageSelector.qml create mode 100644 examples/quick/imageelements/ImageCell.qml create mode 100644 examples/quick/imageelements/MyBorderImage.qml create mode 100644 examples/quick/imageelements/ShadowRectangle.qml delete mode 100644 examples/quick/imageelements/content/BearSheet.png delete mode 100644 examples/quick/imageelements/content/BorderImageSelector.qml delete mode 100644 examples/quick/imageelements/content/ImageCell.qml delete mode 100644 examples/quick/imageelements/content/MyBorderImage.qml delete mode 100644 examples/quick/imageelements/content/ShadowRectangle.qml delete mode 100644 examples/quick/imageelements/content/Uniflow_steam_engine.gif delete mode 100644 examples/quick/imageelements/content/arrow.png delete mode 100644 examples/quick/imageelements/content/bw.png delete mode 100644 examples/quick/imageelements/content/colors-round.sci delete mode 100644 examples/quick/imageelements/content/colors-stretch.sci delete mode 100644 examples/quick/imageelements/content/colors.png delete mode 100644 examples/quick/imageelements/content/multi.ico delete mode 100644 examples/quick/imageelements/content/qt-logo.png delete mode 100644 examples/quick/imageelements/content/shadow.png delete mode 100644 examples/quick/imageelements/content/speaker.png create mode 100644 examples/quick/imageelements/pics/BearSheet.png create mode 100644 examples/quick/imageelements/pics/Uniflow_steam_engine.gif create mode 100644 examples/quick/imageelements/pics/arrow.png create mode 100644 examples/quick/imageelements/pics/bw.png create mode 100644 examples/quick/imageelements/pics/colors-round.sci create mode 100644 examples/quick/imageelements/pics/colors-stretch.sci create mode 100644 examples/quick/imageelements/pics/colors.png create mode 100644 examples/quick/imageelements/pics/multi.ico create mode 100644 examples/quick/imageelements/pics/qt-logo.png create mode 100644 examples/quick/imageelements/pics/shadow.png create mode 100644 examples/quick/imageelements/pics/speaker.png (limited to 'examples/quick') diff --git a/examples/quick/imageelements/BorderImageSelector.qml b/examples/quick/imageelements/BorderImageSelector.qml new file mode 100644 index 0000000000..76fbe38071 --- /dev/null +++ b/examples/quick/imageelements/BorderImageSelector.qml @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $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 + +Item { + id: selector + property int curIdx: 0 + property int maxIdx: 3 + property int gridWidth: 240 + property Flickable flickable + width: parent.width + height: 64 + function advance(steps) { + var nextIdx = curIdx + steps + if (nextIdx < 0 || nextIdx > maxIdx) + return; + flickable.contentX += gridWidth * steps; + curIdx += steps; + } + Image { + source: "pics/arrow.png" + MouseArea{ + anchors.fill: parent + onClicked: selector.advance(-1) + } + anchors.left: parent.left + anchors.leftMargin: 8 + anchors.verticalCenter: parent.verticalCenter + opacity: selector.curIdx == 0 ? 0.2 : 1.0 + Behavior on opacity {NumberAnimation{}} + } + Image { + source: "pics/arrow.png" + mirror: true + MouseArea{ + anchors.fill: parent + onClicked: selector.advance(1) + } + opacity: selector.curIdx == selector.maxIdx ? 0.2 : 1.0 + Behavior on opacity {NumberAnimation{}} + anchors.right: parent.right + anchors.rightMargin: 8 + anchors.verticalCenter: parent.verticalCenter + } + Repeater { + model: [ "Scale", "Repeat", "Scale/Repeat", "Round" ] + delegate: Text { + required property string modelData + required property int index + + text: modelData + anchors.verticalCenter: parent.verticalCenter + + x: (index - selector.curIdx) * 80 + 140 + Behavior on x { NumberAnimation{} } + + opacity: selector.curIdx == index ? 1.0 : 0.0 + Behavior on opacity { NumberAnimation{} } + } + } +} diff --git a/examples/quick/imageelements/CMakeLists.txt b/examples/quick/imageelements/CMakeLists.txt index 4a89d76210..425e8933bd 100644 --- a/examples/quick/imageelements/CMakeLists.txt +++ b/examples/quick/imageelements/CMakeLists.txt @@ -7,7 +7,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") @@ -15,89 +14,58 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/imageelements") -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS Quick) -find_package(Qt6 COMPONENTS Qml) +find_package(Qt6 COMPONENTS Core Gui Quick Qml) -qt_add_executable(imageelements +add_subdirectory("../shared" "shared") + +qt_add_executable(imageelementsexample + WIN32 + MACOSX_BUNDLE main.cpp ) -set_target_properties(imageelements PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE -) -target_link_libraries(imageelements PUBLIC + +target_link_libraries(imageelementsexample PUBLIC Qt::Core Qt::Gui Qt::Qml Qt::Quick ) +qt_add_qml_module(imageelementsexample + URI imageelements + VERSION 1.0 + QML_FILES + "animatedimage.qml" + "animatedsprite.qml" + "borderimage.qml" + "framestepping.qml" + "image.qml" + "imageelements.qml" + "multiframeborderimage.qml" + "shadows.qml" + "spritesequence.qml" + "BorderImageSelector.qml" + "ImageCell.qml" + "MyBorderImage.qml" + "ShadowRectangle.qml" + RESOURCES + "pics/qt-logo.png" + "pics/shadow.png" + "pics/speaker.png" + "pics/colors.png" + "pics/BearSheet.png" + "pics/Uniflow_steam_engine.gif" + "pics/arrow.png" + "pics/bw.png" + "pics/multi.ico" + "pics/colors-round.sci" + "pics/colors-stretch.sci" + ) -# Resources: -set(imageelements_resource_files - "animatedimage.qml" - "animatedsprite.qml" - "borderimage.qml" - "content/BearSheet.png" - "content/BorderImageSelector.qml" - "content/ImageCell.qml" - "content/MyBorderImage.qml" - "content/ShadowRectangle.qml" - "content/Uniflow_steam_engine.gif" - "content/arrow.png" - "content/bw.png" - "content/colors-round.sci" - "content/colors-stretch.sci" - "content/colors.png" - "content/multi.ico" - "content/qt-logo.png" - "content/shadow.png" - "content/speaker.png" - "framestepping.qml" - "image.qml" - "imageelements.qml" - "multiframeborderimage.qml" - "shadows.qml" - "spritesequence.qml" -) - -qt6_add_resources(imageelements "imageelements" - PREFIX - "/imageelements" - FILES - ${imageelements_resource_files} -) -set(shared_resource_files - "../shared/Button.qml" - "../shared/CheckBox.qml" - "../shared/FlickrRssModel.qml" - "../shared/Label.qml" - "../shared/LauncherList.qml" - "../shared/SimpleLauncherDelegate.qml" - "../shared/Slider.qml" - "../shared/TabSet.qml" - "../shared/TextField.qml" - "../shared/images/back.png" - "../shared/images/checkmark.png" - "../shared/images/next.png" - "../shared/images/qt-logo.png" - "../shared/images/slider_handle.png" - "../shared/images/tab.png" -) - -qt6_add_resources(imageelements "shared" - PREFIX - "/shared" - BASE - "../shared" - FILES - ${shared_resource_files} -) - -install(TARGETS imageelements +install(TARGETS imageelementsexample RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" ) + +bundle_shared(imageelementsexample) diff --git a/examples/quick/imageelements/ImageCell.qml b/examples/quick/imageelements/ImageCell.qml new file mode 100644 index 0000000000..053afdde5d --- /dev/null +++ b/examples/quick/imageelements/ImageCell.qml @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $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 +import QtQuick.Controls + +Item { + property alias mode: image.fillMode + property alias caption: captionItem.text + + Image { + id: image + width: parent.width; height: parent.height - captionItem.height + source: "pics/qt-logo.png" + clip: true // only makes a difference if mode is PreserveAspectCrop + } + + Label { + id: captionItem + anchors.horizontalCenter: parent.horizontalCenter; anchors.bottom: parent.bottom + } +} diff --git a/examples/quick/imageelements/MyBorderImage.qml b/examples/quick/imageelements/MyBorderImage.qml new file mode 100644 index 0000000000..5d11716a43 --- /dev/null +++ b/examples/quick/imageelements/MyBorderImage.qml @@ -0,0 +1,101 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $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 QtQml +import QtQuick + +Item { + id: container + + property alias horizontalMode: image.horizontalTileMode + property alias verticalMode: image.verticalTileMode + property alias source: image.source + + property int minWidth + property int minHeight + property int maxWidth + property int maxHeight + property int margin + + width: 240; height: 200 + + BorderImage { + id: image; anchors.centerIn: parent + + SequentialAnimation on width { + loops: Animation.Infinite + NumberAnimation { + from: container.minWidth; to: container.maxWidth + duration: 2000; easing.type: Easing.InOutQuad + } + NumberAnimation { + from: container.maxWidth; to: container.minWidth + duration: 2000; easing.type: Easing.InOutQuad + } + } + + SequentialAnimation on height { + loops: Animation.Infinite + NumberAnimation { + from: container.minHeight; to: container.maxHeight + duration: 2000; easing.type: Easing.InOutQuad + } + NumberAnimation { + from: container.maxHeight; to: container.minHeight + duration: 2000; easing.type: Easing.InOutQuad + } + } + + border.top: container.margin + border.left: container.margin + border.bottom: container.margin + border.right: container.margin + } +} diff --git a/examples/quick/imageelements/ShadowRectangle.qml b/examples/quick/imageelements/ShadowRectangle.qml new file mode 100644 index 0000000000..b112004fbc --- /dev/null +++ b/examples/quick/imageelements/ShadowRectangle.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $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 + +Item { + property alias color : rectangle.color + +//! [shadow] + BorderImage { + anchors.fill: rectangle + anchors { leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8 } + border { left: 10; top: 10; right: 10; bottom: 10 } + source: "pics/shadow.png" + } +//! [shadow] + + Rectangle { id: rectangle; anchors.fill: parent } +} diff --git a/examples/quick/imageelements/animatedimage.qml b/examples/quick/imageelements/animatedimage.qml index 41c77c38d5..11c41e3ae3 100644 --- a/examples/quick/imageelements/animatedimage.qml +++ b/examples/quick/imageelements/animatedimage.qml @@ -59,7 +59,7 @@ Column { //! [image] AnimatedImage { id: animation - source: "content/Uniflow_steam_engine.gif" + source: "pics/Uniflow_steam_engine.gif" anchors.horizontalCenter: parent.horizontalCenter speed: speedSlider.value TapHandler { diff --git a/examples/quick/imageelements/animatedsprite.qml b/examples/quick/imageelements/animatedsprite.qml index 437a670fec..699b620f10 100644 --- a/examples/quick/imageelements/animatedsprite.qml +++ b/examples/quick/imageelements/animatedsprite.qml @@ -62,7 +62,7 @@ Item { AnimatedSprite { id: sprite anchors.centerIn: parent - source: "content/speaker.png" + source: "pics/speaker.png" frameCount: 60 frameSync: true frameWidth: 170 diff --git a/examples/quick/imageelements/borderimage.qml b/examples/quick/imageelements/borderimage.qml index 9a730169df..00d41dba96 100644 --- a/examples/quick/imageelements/borderimage.qml +++ b/examples/quick/imageelements/borderimage.qml @@ -49,7 +49,6 @@ ****************************************************************************/ import QtQuick -import "content" Rectangle { id: page @@ -81,47 +80,47 @@ Rectangle { MyBorderImage { minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 200 - source: Qt.resolvedUrl("content/colors.png"); margin: 30 + source: Qt.resolvedUrl("pics/colors.png"); margin: 30 } MyBorderImage { minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 200 - source: Qt.resolvedUrl("content/colors.png"); margin: 30 + source: Qt.resolvedUrl("pics/colors.png"); margin: 30 horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat } MyBorderImage { minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 200 - source: Qt.resolvedUrl("content/colors.png"); margin: 30 + source: Qt.resolvedUrl("pics/colors.png"); margin: 30 horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat } MyBorderImage { minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 200 - source: Qt.resolvedUrl("content/colors.png"); margin: 30 + source: Qt.resolvedUrl("pics/colors.png"); margin: 30 horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round } MyBorderImage { minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200 - source: Qt.resolvedUrl("content/bw.png"); margin: 10 + source: Qt.resolvedUrl("pics/bw.png"); margin: 10 } MyBorderImage { minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200 - source: Qt.resolvedUrl("content/bw.png"); margin: 10 + source: Qt.resolvedUrl("pics/bw.png"); margin: 10 horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat } MyBorderImage { minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200 - source: Qt.resolvedUrl("content/bw.png"); margin: 10 + source: Qt.resolvedUrl("pics/bw.png"); margin: 10 horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat } MyBorderImage { minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200 - source: Qt.resolvedUrl("content/bw.png"); margin: 10 + source: Qt.resolvedUrl("pics/bw.png"); margin: 10 horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round } } diff --git a/examples/quick/imageelements/content/BearSheet.png b/examples/quick/imageelements/content/BearSheet.png deleted file mode 100644 index a084bf0f1e..0000000000 Binary files a/examples/quick/imageelements/content/BearSheet.png and /dev/null differ diff --git a/examples/quick/imageelements/content/BorderImageSelector.qml b/examples/quick/imageelements/content/BorderImageSelector.qml deleted file mode 100644 index 241f2b7a7e..0000000000 --- a/examples/quick/imageelements/content/BorderImageSelector.qml +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 - -Item { - id: selector - property int curIdx: 0 - property int maxIdx: 3 - property int gridWidth: 240 - property Flickable flickable - width: parent.width - height: 64 - function advance(steps) { - var nextIdx = curIdx + steps - if (nextIdx < 0 || nextIdx > maxIdx) - return; - flickable.contentX += gridWidth * steps; - curIdx += steps; - } - Image { - source: "arrow.png" - MouseArea{ - anchors.fill: parent - onClicked: selector.advance(-1) - } - anchors.left: parent.left - anchors.leftMargin: 8 - anchors.verticalCenter: parent.verticalCenter - opacity: selector.curIdx == 0 ? 0.2 : 1.0 - Behavior on opacity {NumberAnimation{}} - } - Image { - source: "arrow.png" - mirror: true - MouseArea{ - anchors.fill: parent - onClicked: selector.advance(1) - } - opacity: selector.curIdx == selector.maxIdx ? 0.2 : 1.0 - Behavior on opacity {NumberAnimation{}} - anchors.right: parent.right - anchors.rightMargin: 8 - anchors.verticalCenter: parent.verticalCenter - } - Repeater { - model: [ "Scale", "Repeat", "Scale/Repeat", "Round" ] - delegate: Text { - required property string modelData - required property int index - - text: modelData - anchors.verticalCenter: parent.verticalCenter - - x: (index - selector.curIdx) * 80 + 140 - Behavior on x { NumberAnimation{} } - - opacity: selector.curIdx == index ? 1.0 : 0.0 - Behavior on opacity { NumberAnimation{} } - } - } -} diff --git a/examples/quick/imageelements/content/ImageCell.qml b/examples/quick/imageelements/content/ImageCell.qml deleted file mode 100644 index 7b88b64b88..0000000000 --- a/examples/quick/imageelements/content/ImageCell.qml +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 -import QtQuick.Controls - -Item { - property alias mode: image.fillMode - property alias caption: captionItem.text - - Image { - id: image - width: parent.width; height: parent.height - captionItem.height - source: "qt-logo.png" - clip: true // only makes a difference if mode is PreserveAspectCrop - } - - Label { - id: captionItem - anchors.horizontalCenter: parent.horizontalCenter; anchors.bottom: parent.bottom - } -} diff --git a/examples/quick/imageelements/content/MyBorderImage.qml b/examples/quick/imageelements/content/MyBorderImage.qml deleted file mode 100644 index 5d11716a43..0000000000 --- a/examples/quick/imageelements/content/MyBorderImage.qml +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 QtQml -import QtQuick - -Item { - id: container - - property alias horizontalMode: image.horizontalTileMode - property alias verticalMode: image.verticalTileMode - property alias source: image.source - - property int minWidth - property int minHeight - property int maxWidth - property int maxHeight - property int margin - - width: 240; height: 200 - - BorderImage { - id: image; anchors.centerIn: parent - - SequentialAnimation on width { - loops: Animation.Infinite - NumberAnimation { - from: container.minWidth; to: container.maxWidth - duration: 2000; easing.type: Easing.InOutQuad - } - NumberAnimation { - from: container.maxWidth; to: container.minWidth - duration: 2000; easing.type: Easing.InOutQuad - } - } - - SequentialAnimation on height { - loops: Animation.Infinite - NumberAnimation { - from: container.minHeight; to: container.maxHeight - duration: 2000; easing.type: Easing.InOutQuad - } - NumberAnimation { - from: container.maxHeight; to: container.minHeight - duration: 2000; easing.type: Easing.InOutQuad - } - } - - border.top: container.margin - border.left: container.margin - border.bottom: container.margin - border.right: container.margin - } -} diff --git a/examples/quick/imageelements/content/ShadowRectangle.qml b/examples/quick/imageelements/content/ShadowRectangle.qml deleted file mode 100644 index fd02eeb8cc..0000000000 --- a/examples/quick/imageelements/content/ShadowRectangle.qml +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 - -Item { - property alias color : rectangle.color - -//! [shadow] - BorderImage { - anchors.fill: rectangle - anchors { leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8 } - border { left: 10; top: 10; right: 10; bottom: 10 } - source: "shadow.png" - } -//! [shadow] - - Rectangle { id: rectangle; anchors.fill: parent } -} diff --git a/examples/quick/imageelements/content/Uniflow_steam_engine.gif b/examples/quick/imageelements/content/Uniflow_steam_engine.gif deleted file mode 100644 index 8754de4af9..0000000000 Binary files a/examples/quick/imageelements/content/Uniflow_steam_engine.gif and /dev/null differ diff --git a/examples/quick/imageelements/content/arrow.png b/examples/quick/imageelements/content/arrow.png deleted file mode 100644 index 059be6294e..0000000000 Binary files a/examples/quick/imageelements/content/arrow.png and /dev/null differ diff --git a/examples/quick/imageelements/content/bw.png b/examples/quick/imageelements/content/bw.png deleted file mode 100644 index 486eaae96e..0000000000 Binary files a/examples/quick/imageelements/content/bw.png and /dev/null differ diff --git a/examples/quick/imageelements/content/colors-round.sci b/examples/quick/imageelements/content/colors-round.sci deleted file mode 100644 index 506f6f5f99..0000000000 --- a/examples/quick/imageelements/content/colors-round.sci +++ /dev/null @@ -1,7 +0,0 @@ -border.left:30 -border.top:30 -border.right:30 -border.bottom:30 -horizontalTileRule:Round -verticalTileRule:Round -source:colors.png diff --git a/examples/quick/imageelements/content/colors-stretch.sci b/examples/quick/imageelements/content/colors-stretch.sci deleted file mode 100644 index e4989a723c..0000000000 --- a/examples/quick/imageelements/content/colors-stretch.sci +++ /dev/null @@ -1,5 +0,0 @@ -border.left:30 -border.top:30 -border.right:30 -border.bottom:30 -source:colors.png diff --git a/examples/quick/imageelements/content/colors.png b/examples/quick/imageelements/content/colors.png deleted file mode 100644 index 57f5aca821..0000000000 Binary files a/examples/quick/imageelements/content/colors.png and /dev/null differ diff --git a/examples/quick/imageelements/content/multi.ico b/examples/quick/imageelements/content/multi.ico deleted file mode 100644 index b748ceaa29..0000000000 Binary files a/examples/quick/imageelements/content/multi.ico and /dev/null differ diff --git a/examples/quick/imageelements/content/qt-logo.png b/examples/quick/imageelements/content/qt-logo.png deleted file mode 100644 index 14ddf2a028..0000000000 Binary files a/examples/quick/imageelements/content/qt-logo.png and /dev/null differ diff --git a/examples/quick/imageelements/content/shadow.png b/examples/quick/imageelements/content/shadow.png deleted file mode 100644 index 23c011d0ff..0000000000 Binary files a/examples/quick/imageelements/content/shadow.png and /dev/null differ diff --git a/examples/quick/imageelements/content/speaker.png b/examples/quick/imageelements/content/speaker.png deleted file mode 100644 index fb0e857859..0000000000 Binary files a/examples/quick/imageelements/content/speaker.png and /dev/null differ diff --git a/examples/quick/imageelements/doc/src/imageelements.qdoc b/examples/quick/imageelements/doc/src/imageelements.qdoc index 4c00915e56..90cb2c4d2e 100644 --- a/examples/quick/imageelements/doc/src/imageelements.qdoc +++ b/examples/quick/imageelements/doc/src/imageelements.qdoc @@ -49,7 +49,7 @@ \e Shadows shows how to create a drop shadow effect for a rectangular item using a \l BorderImage: - \snippet imageelements/content/ShadowRectangle.qml shadow + \snippet imageelements/ShadowRectangle.qml shadow \section1 Sprite Animations with AnimatedSprite diff --git a/examples/quick/imageelements/framestepping.qml b/examples/quick/imageelements/framestepping.qml index 3f86d86773..2ac76daf6f 100644 --- a/examples/quick/imageelements/framestepping.qml +++ b/examples/quick/imageelements/framestepping.qml @@ -58,7 +58,7 @@ Rectangle { id: img anchors.centerIn: parent cache: true - source: "content/multi.ico" + source: "pics/multi.ico" Shortcut { sequence: StandardKey.MoveToNextPage diff --git a/examples/quick/imageelements/image.qml b/examples/quick/imageelements/image.qml index d68382f3d9..d4040e0be0 100644 --- a/examples/quick/imageelements/image.qml +++ b/examples/quick/imageelements/image.qml @@ -49,7 +49,6 @@ ****************************************************************************/ import QtQuick -import "content" Rectangle { width: 320 diff --git a/examples/quick/imageelements/imageelements.qml b/examples/quick/imageelements/imageelements.qml index 64c3603b69..74fb36c5bb 100644 --- a/examples/quick/imageelements/imageelements.qml +++ b/examples/quick/imageelements/imageelements.qml @@ -49,7 +49,7 @@ ****************************************************************************/ import QtQuick -import "../shared" as Shared +import shared as Shared Item { height: 480 diff --git a/examples/quick/imageelements/imageelements.qrc b/examples/quick/imageelements/imageelements.qrc index cedef2204c..62f2bbfc76 100644 --- a/examples/quick/imageelements/imageelements.qrc +++ b/examples/quick/imageelements/imageelements.qrc @@ -1,28 +1,28 @@ - content/arrow.png - content/BearSheet.png - content/BorderImageSelector.qml - content/bw.png - content/colors-round.sci - content/colors-stretch.sci - content/colors.png - content/ImageCell.qml - content/multi.ico - content/MyBorderImage.qml - content/qt-logo.png - content/shadow.png - content/ShadowRectangle.qml - content/speaker.png - content/Uniflow_steam_engine.gif - imageelements.qml animatedimage.qml animatedsprite.qml borderimage.qml + BorderImageSelector.qml framestepping.qml - multiframeborderimage.qml + ImageCell.qml + imageelements.qml image.qml + multiframeborderimage.qml + MyBorderImage.qml + ShadowRectangle.qml shadows.qml spritesequence.qml + pics/arrow.png + pics/BearSheet.png + pics/bw.png + pics/colors-round.sci + pics/colors-stretch.sci + pics/colors.png + pics/multi.ico + pics/qt-logo.png + pics/shadow.png + pics/speaker.png + pics/Uniflow_steam_engine.gif diff --git a/examples/quick/imageelements/multiframeborderimage.qml b/examples/quick/imageelements/multiframeborderimage.qml index f6c43049c2..f3c7b7e1fa 100644 --- a/examples/quick/imageelements/multiframeborderimage.qml +++ b/examples/quick/imageelements/multiframeborderimage.qml @@ -59,7 +59,7 @@ Rectangle { anchors.fill: parent anchors.margins: 6 cache: true - source: "content/multi.ico" + source: "pics/multi.ico" border { left: 19; top: 19; right: 19; bottom: 19 } horizontalTileMode: BorderImage.Stretch diff --git a/examples/quick/imageelements/pics/BearSheet.png b/examples/quick/imageelements/pics/BearSheet.png new file mode 100644 index 0000000000..a084bf0f1e Binary files /dev/null and b/examples/quick/imageelements/pics/BearSheet.png differ diff --git a/examples/quick/imageelements/pics/Uniflow_steam_engine.gif b/examples/quick/imageelements/pics/Uniflow_steam_engine.gif new file mode 100644 index 0000000000..8754de4af9 Binary files /dev/null and b/examples/quick/imageelements/pics/Uniflow_steam_engine.gif differ diff --git a/examples/quick/imageelements/pics/arrow.png b/examples/quick/imageelements/pics/arrow.png new file mode 100644 index 0000000000..059be6294e Binary files /dev/null and b/examples/quick/imageelements/pics/arrow.png differ diff --git a/examples/quick/imageelements/pics/bw.png b/examples/quick/imageelements/pics/bw.png new file mode 100644 index 0000000000..486eaae96e Binary files /dev/null and b/examples/quick/imageelements/pics/bw.png differ diff --git a/examples/quick/imageelements/pics/colors-round.sci b/examples/quick/imageelements/pics/colors-round.sci new file mode 100644 index 0000000000..506f6f5f99 --- /dev/null +++ b/examples/quick/imageelements/pics/colors-round.sci @@ -0,0 +1,7 @@ +border.left:30 +border.top:30 +border.right:30 +border.bottom:30 +horizontalTileRule:Round +verticalTileRule:Round +source:colors.png diff --git a/examples/quick/imageelements/pics/colors-stretch.sci b/examples/quick/imageelements/pics/colors-stretch.sci new file mode 100644 index 0000000000..e4989a723c --- /dev/null +++ b/examples/quick/imageelements/pics/colors-stretch.sci @@ -0,0 +1,5 @@ +border.left:30 +border.top:30 +border.right:30 +border.bottom:30 +source:colors.png diff --git a/examples/quick/imageelements/pics/colors.png b/examples/quick/imageelements/pics/colors.png new file mode 100644 index 0000000000..57f5aca821 Binary files /dev/null and b/examples/quick/imageelements/pics/colors.png differ diff --git a/examples/quick/imageelements/pics/multi.ico b/examples/quick/imageelements/pics/multi.ico new file mode 100644 index 0000000000..b748ceaa29 Binary files /dev/null and b/examples/quick/imageelements/pics/multi.ico differ diff --git a/examples/quick/imageelements/pics/qt-logo.png b/examples/quick/imageelements/pics/qt-logo.png new file mode 100644 index 0000000000..14ddf2a028 Binary files /dev/null and b/examples/quick/imageelements/pics/qt-logo.png differ diff --git a/examples/quick/imageelements/pics/shadow.png b/examples/quick/imageelements/pics/shadow.png new file mode 100644 index 0000000000..23c011d0ff Binary files /dev/null and b/examples/quick/imageelements/pics/shadow.png differ diff --git a/examples/quick/imageelements/pics/speaker.png b/examples/quick/imageelements/pics/speaker.png new file mode 100644 index 0000000000..fb0e857859 Binary files /dev/null and b/examples/quick/imageelements/pics/speaker.png differ diff --git a/examples/quick/imageelements/shadows.qml b/examples/quick/imageelements/shadows.qml index 78d4ea2ac3..8fea9250bc 100644 --- a/examples/quick/imageelements/shadows.qml +++ b/examples/quick/imageelements/shadows.qml @@ -49,7 +49,6 @@ ****************************************************************************/ import QtQuick -import "content" Rectangle { id: window diff --git a/examples/quick/imageelements/spritesequence.qml b/examples/quick/imageelements/spritesequence.qml index b017ade229..a047b22fbc 100644 --- a/examples/quick/imageelements/spritesequence.qml +++ b/examples/quick/imageelements/spritesequence.qml @@ -75,7 +75,7 @@ Item { //! [still] Sprite { name: "still" - source: "content/BearSheet.png" + source: "pics/BearSheet.png" frameCount: 1 frameWidth: 256 frameHeight: 256 @@ -85,7 +85,7 @@ Item { //! [still] Sprite { name: "blink" - source: "content/BearSheet.png" + source: "pics/BearSheet.png" frameCount: 3 frameX: 256 frameY: 1536 @@ -96,7 +96,7 @@ Item { } Sprite { name: "floating" - source: "content/BearSheet.png" + source: "pics/BearSheet.png" frameCount: 9 frameX: 0 frameY: 0 @@ -107,7 +107,7 @@ Item { } Sprite { name: "flailing" - source: "content/BearSheet.png" + source: "pics/BearSheet.png" frameCount: 8 frameX: 0 frameY: 768 @@ -118,7 +118,7 @@ Item { } Sprite { name: "falling" - source: "content/BearSheet.png" + source: "pics/BearSheet.png" frameCount: 5 frameY: 1280 frameWidth: 256 -- cgit v1.2.3