aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/sidepanel
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2021-08-12 14:39:51 +0200
committerMitch Curtis <mitch.curtis@qt.io>2021-08-16 12:52:59 +0200
commit809339d1484cf556512534367b8170bc26baf072 (patch)
tree12871313b658f36d058b5ef25af1e247e9c46ce9 /examples/quickcontrols2/sidepanel
parentb01b4f00eae8022c6a97d90f54dac395144ae095 (diff)
Remove qtquickcontrols2 sources and explain where they wentHEADdev
Now that qtquickcontrols2 has been merged into qtdeclarative, we should make it obvious that this repo should no longer be used, by preventing it from being built. Task-number: QTBUG-95173 Pick-to: 6.2 Change-Id: I95bd6a214f3d75a865ab163ee0a1f9ffbeb7a051 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples/quickcontrols2/sidepanel')
-rw-r--r--examples/quickcontrols2/sidepanel/CMakeLists.txt59
-rw-r--r--examples/quickcontrols2/sidepanel/doc/images/qtquickcontrols2-sidepanel-landscape.pngbin55216 -> 0 bytes
-rw-r--r--examples/quickcontrols2/sidepanel/doc/images/qtquickcontrols2-sidepanel-portrait.pngbin32060 -> 0 bytes
-rw-r--r--examples/quickcontrols2/sidepanel/doc/src/qtquickcontrols2-sidepanel.qdoc83
-rw-r--r--examples/quickcontrols2/sidepanel/images/qt-logo.pngbin1301 -> 0 bytes
-rw-r--r--examples/quickcontrols2/sidepanel/images/qt-logo@2x.pngbin2611 -> 0 bytes
-rw-r--r--examples/quickcontrols2/sidepanel/images/qt-logo@3x.pngbin4155 -> 0 bytes
-rw-r--r--examples/quickcontrols2/sidepanel/images/qt-logo@4x.pngbin5916 -> 0 bytes
-rw-r--r--examples/quickcontrols2/sidepanel/qtquickcontrols2.conf2
-rw-r--r--examples/quickcontrols2/sidepanel/sidepanel.cpp64
-rw-r--r--examples/quickcontrols2/sidepanel/sidepanel.pro19
-rw-r--r--examples/quickcontrols2/sidepanel/sidepanel.qml179
12 files changed, 0 insertions, 406 deletions
diff --git a/examples/quickcontrols2/sidepanel/CMakeLists.txt b/examples/quickcontrols2/sidepanel/CMakeLists.txt
deleted file mode 100644
index 19d8eb86..00000000
--- a/examples/quickcontrols2/sidepanel/CMakeLists.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-# Generated from sidepanel.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(sidepanel LANGUAGES CXX)
-
-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")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quickcontrols2/sidepanel")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-
-qt_add_executable(sidepanel
- sidepanel.cpp
-)
-set_target_properties(sidepanel PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(sidepanel PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Quick
-)
-
-
-# Resources:
-set(qmake_immediate_resource_files
- "doc/images/qtquickcontrols2-sidepanel-landscape.png"
- "doc/images/qtquickcontrols2-sidepanel-portrait.png"
- "images/qt-logo.png"
- "images/qt-logo@2x.png"
- "images/qt-logo@3x.png"
- "images/qt-logo@4x.png"
- "qtquickcontrols2.conf"
- "sidepanel.qml"
-)
-
-qt6_add_resources(sidepanel "qmake_immediate"
- PREFIX
- "/"
- FILES
- ${qmake_immediate_resource_files}
-)
-
-install(TARGETS sidepanel
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/quickcontrols2/sidepanel/doc/images/qtquickcontrols2-sidepanel-landscape.png b/examples/quickcontrols2/sidepanel/doc/images/qtquickcontrols2-sidepanel-landscape.png
deleted file mode 100644
index 86907591..00000000
--- a/examples/quickcontrols2/sidepanel/doc/images/qtquickcontrols2-sidepanel-landscape.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/sidepanel/doc/images/qtquickcontrols2-sidepanel-portrait.png b/examples/quickcontrols2/sidepanel/doc/images/qtquickcontrols2-sidepanel-portrait.png
deleted file mode 100644
index cf1ed2ef..00000000
--- a/examples/quickcontrols2/sidepanel/doc/images/qtquickcontrols2-sidepanel-portrait.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/sidepanel/doc/src/qtquickcontrols2-sidepanel.qdoc b/examples/quickcontrols2/sidepanel/doc/src/qtquickcontrols2-sidepanel.qdoc
deleted file mode 100644
index 49e997fb..00000000
--- a/examples/quickcontrols2/sidepanel/doc/src/qtquickcontrols2-sidepanel.qdoc
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** 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 Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example sidepanel
- \keyword Qt Quick Controls - Side Panel
- \title Qt Quick Controls - Side Panel
- \keyword Qt Quick Controls 2 - Side Panel
- \ingroup qtquickcontrols2-examples
- \brief A persistent side panel with Drawer.
-
- This example demonstrates how \l Drawer can be used as a persistent side
- panel.
-
- \raw HTML
- <div class="table"><table style="background:transparent; border:0px">
- <tr><td style="border:0px">
- \endraw
- \image qtquickcontrols2-sidepanel-portrait.png
- \caption An interactive Drawer in portrait mode
- \raw HTML
- </td><td style="border:0px">
- \endraw
- \image qtquickcontrols2-sidepanel-landscape.png
- \caption A non-interactive Drawer in landscape mode
- \raw HTML
- </td></tr>
- </table></div>
- \endraw
-
- When the application is in portrait mode, the drawer is an interactive
- side panel that can be swiped open from the left edge. It appears on
- top of the content, blocking user interaction through its modal
- background. When the application is in landscape mode, the drawer and
- the content are laid out side-by-side.
-
- The current orientation of the application is determined by comparing
- the width and height of the window:
-
- \snippet sidepanel/sidepanel.qml orientation
-
- This is used to determine whether the drawer should be \l {Popup::}{modal}
- and \l {Drawer::}{interactive}, and to configure its \l {Drawer::}{position}
- and \l {Popup::visible}{visibility} accordingly.
-
- \quotefromfile sidepanel/sidepanel.qml
- \skipto Drawer
- \printline Drawer
- \dots 8
- \codeline
- \skipto modal
- \printuntil visible
- \dots 8
- \skipuntil ScrollIndicator
- \skipuntil }
- \printline }
-
- \include examples-run.qdocinc
-*/
diff --git a/examples/quickcontrols2/sidepanel/images/qt-logo.png b/examples/quickcontrols2/sidepanel/images/qt-logo.png
deleted file mode 100644
index dff77295..00000000
--- a/examples/quickcontrols2/sidepanel/images/qt-logo.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/sidepanel/images/qt-logo@2x.png b/examples/quickcontrols2/sidepanel/images/qt-logo@2x.png
deleted file mode 100644
index dbd73aab..00000000
--- a/examples/quickcontrols2/sidepanel/images/qt-logo@2x.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/sidepanel/images/qt-logo@3x.png b/examples/quickcontrols2/sidepanel/images/qt-logo@3x.png
deleted file mode 100644
index 68e763b5..00000000
--- a/examples/quickcontrols2/sidepanel/images/qt-logo@3x.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/sidepanel/images/qt-logo@4x.png b/examples/quickcontrols2/sidepanel/images/qt-logo@4x.png
deleted file mode 100644
index 08fd8825..00000000
--- a/examples/quickcontrols2/sidepanel/images/qt-logo@4x.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/sidepanel/qtquickcontrols2.conf b/examples/quickcontrols2/sidepanel/qtquickcontrols2.conf
deleted file mode 100644
index b6c7c87e..00000000
--- a/examples/quickcontrols2/sidepanel/qtquickcontrols2.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-[Controls]
-Style=Material
diff --git a/examples/quickcontrols2/sidepanel/sidepanel.cpp b/examples/quickcontrols2/sidepanel/sidepanel.cpp
deleted file mode 100644
index 4b328d1d..00000000
--- a/examples/quickcontrols2/sidepanel/sidepanel.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 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$
-**
-****************************************************************************/
-
-#include <QGuiApplication>
-#include <QQmlApplicationEngine>
-
-int main(int argc, char *argv[])
-{
- QGuiApplication app(argc, argv);
-
- QQmlApplicationEngine engine;
- engine.load(QUrl("qrc:/sidepanel.qml"));
- if (engine.rootObjects().isEmpty())
- return -1;
-
- return app.exec();
-}
diff --git a/examples/quickcontrols2/sidepanel/sidepanel.pro b/examples/quickcontrols2/sidepanel/sidepanel.pro
deleted file mode 100644
index 3ae9cd8d..00000000
--- a/examples/quickcontrols2/sidepanel/sidepanel.pro
+++ /dev/null
@@ -1,19 +0,0 @@
-TEMPLATE = app
-TARGET = sidepanel
-QT += quick
-
-SOURCES += \
- sidepanel.cpp
-
-RESOURCES += \
- doc/images/qtquickcontrols2-sidepanel-landscape.png \
- doc/images/qtquickcontrols2-sidepanel-portrait.png \
- images/qt-logo@2x.png \
- images/qt-logo@3x.png \
- images/qt-logo@4x.png \
- images/qt-logo.png \
- qtquickcontrols2.conf \
- sidepanel.qml
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quickcontrols2/sidepanel
-INSTALLS += target
diff --git a/examples/quickcontrols2/sidepanel/sidepanel.qml b/examples/quickcontrols2/sidepanel/sidepanel.qml
deleted file mode 100644
index 33e85159..00000000
--- a/examples/quickcontrols2/sidepanel/sidepanel.qml
+++ /dev/null
@@ -1,179 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 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
-
-ApplicationWindow {
- id: window
- width: 360
- height: 520
- visible: true
- title: qsTr("Side Panel")
-
- //! [orientation]
- readonly property bool inPortrait: window.width < window.height
- //! [orientation]
-
- ToolBar {
- id: overlayHeader
-
- z: 1
- width: parent.width
- parent: Overlay.overlay
-
- Label {
- id: label
- anchors.centerIn: parent
- text: "Qt Quick Controls"
- }
- }
-
- Drawer {
- id: drawer
-
- y: overlayHeader.height
- width: window.width / 2
- height: window.height - overlayHeader.height
-
- modal: inPortrait
- interactive: inPortrait
- position: inPortrait ? 0 : 1
- visible: !inPortrait
-
- ListView {
- id: listView
- anchors.fill: parent
-
- headerPositioning: ListView.OverlayHeader
- header: Pane {
- id: header
- z: 2
- width: parent.width
-
- contentHeight: logo.height
-
- Image {
- id: logo
- width: parent.width
- source: "images/qt-logo.png"
- fillMode: implicitWidth > width ? Image.PreserveAspectFit : Image.Pad
- }
-
- MenuSeparator {
- parent: header
- width: parent.width
- anchors.verticalCenter: parent.bottom
- visible: !listView.atYBeginning
- }
- }
-
- footer: ItemDelegate {
- id: footer
- text: qsTr("Footer")
- width: parent.width
-
- MenuSeparator {
- parent: footer
- width: parent.width
- anchors.verticalCenter: parent.top
- }
- }
-
- model: 10
-
- delegate: ItemDelegate {
- text: qsTr("Title %1").arg(index + 1)
- width: listView.width
- }
-
- ScrollIndicator.vertical: ScrollIndicator { }
- }
- }
-
- Flickable {
- id: flickable
-
- anchors.fill: parent
- anchors.topMargin: overlayHeader.height
- anchors.leftMargin: !inPortrait ? drawer.width : undefined
-
- topMargin: 20
- bottomMargin: 20
- contentHeight: column.height
-
- Column {
- id: column
- spacing: 20
- anchors.margins: 20
- anchors.left: parent.left
- anchors.right: parent.right
-
- Label {
- font.pixelSize: 22
- width: parent.width
- elide: Label.ElideRight
- horizontalAlignment: Qt.AlignHCenter
- text: qsTr("Side Panel Example")
- }
-
- Label {
- width: parent.width
- wrapMode: Label.WordWrap
- text: qsTr("This example demonstrates how Drawer can be used as a non-closable persistent side panel.\n\n" +
- "When the application is in portrait mode, the drawer is an interactive side panel that can " +
- "be swiped open from the left edge. When the application is in landscape mode, the drawer " +
- "and the content are laid out side by side.\n\nThe application is currently in %1 mode.").arg(inPortrait ? qsTr("portrait") : qsTr("landscape"))
- }
- }
-
- ScrollIndicator.vertical: ScrollIndicator { }
- }
-}