From 032befa819cfb335876a08ca7aa5acab6d7a2f17 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 7 May 2013 14:33:03 +0200 Subject: Doc: Remove applicationicon and orientation examples from QtWidgets These two widget-based, mobile-targeted examples are obsolete, defunct, and/or serve no purpose in Qt 5. Task-number: QTBUG-31023 Change-Id: Ie5732734bb2547b1ea701d7b3c8dcd806362de09 Reviewed-by: Jerome Pasion --- .../widgets/applicationicon/applicationicon.png | Bin 4023 -> 0 bytes .../widgets/applicationicon/applicationicon.pro | 15 --- .../widgets/applicationicon/applicationicon.svg | 22 ---- examples/widgets/widgets/applicationicon/main.cpp | 50 --------- examples/widgets/widgets/orientation/image_a.png | Bin 1075 -> 0 bytes examples/widgets/widgets/orientation/image_b.png | Bin 1020 -> 0 bytes examples/widgets/widgets/orientation/image_c.png | Bin 1163 -> 0 bytes examples/widgets/widgets/orientation/images.qrc | 7 -- examples/widgets/widgets/orientation/landscape.ui | 114 --------------------- examples/widgets/widgets/orientation/main.cpp | 55 ---------- .../widgets/widgets/orientation/mainwindow.cpp | 112 -------------------- examples/widgets/widgets/orientation/mainwindow.h | 75 -------------- .../widgets/widgets/orientation/orientation.pro | 29 ------ examples/widgets/widgets/orientation/portrait.ui | 61 ----------- examples/widgets/widgets/widgets.pro | 2 - 15 files changed, 542 deletions(-) delete mode 100644 examples/widgets/widgets/applicationicon/applicationicon.png delete mode 100644 examples/widgets/widgets/applicationicon/applicationicon.pro delete mode 100644 examples/widgets/widgets/applicationicon/applicationicon.svg delete mode 100644 examples/widgets/widgets/applicationicon/main.cpp delete mode 100644 examples/widgets/widgets/orientation/image_a.png delete mode 100644 examples/widgets/widgets/orientation/image_b.png delete mode 100644 examples/widgets/widgets/orientation/image_c.png delete mode 100644 examples/widgets/widgets/orientation/images.qrc delete mode 100644 examples/widgets/widgets/orientation/landscape.ui delete mode 100644 examples/widgets/widgets/orientation/main.cpp delete mode 100644 examples/widgets/widgets/orientation/mainwindow.cpp delete mode 100644 examples/widgets/widgets/orientation/mainwindow.h delete mode 100644 examples/widgets/widgets/orientation/orientation.pro delete mode 100644 examples/widgets/widgets/orientation/portrait.ui (limited to 'examples/widgets/widgets') diff --git a/examples/widgets/widgets/applicationicon/applicationicon.png b/examples/widgets/widgets/applicationicon/applicationicon.png deleted file mode 100644 index 83a186ee56..0000000000 Binary files a/examples/widgets/widgets/applicationicon/applicationicon.png and /dev/null differ diff --git a/examples/widgets/widgets/applicationicon/applicationicon.pro b/examples/widgets/widgets/applicationicon/applicationicon.pro deleted file mode 100644 index 19f8ac28f7..0000000000 --- a/examples/widgets/widgets/applicationicon/applicationicon.pro +++ /dev/null @@ -1,15 +0,0 @@ - -QT += core gui widgets - -TARGET = applicationicon -TEMPLATE = app - -SOURCES += main.cpp - -OTHER_FILES += applicationicon.svg \ - applicationicon.png \ - applicationicon.desktop - -# install -target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/applicationicon -INSTALLS += target diff --git a/examples/widgets/widgets/applicationicon/applicationicon.svg b/examples/widgets/widgets/applicationicon/applicationicon.svg deleted file mode 100644 index aa2835b08f..0000000000 --- a/examples/widgets/widgets/applicationicon/applicationicon.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/widgets/widgets/applicationicon/main.cpp b/examples/widgets/widgets/applicationicon/main.cpp deleted file mode 100644 index 6fb2518d98..0000000000 --- a/examples/widgets/widgets/applicationicon/main.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** 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 Digia Plc and its Subsidiary(-ies) 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 -#include - -int main(int argc, char *argv[]) -{ - QApplication a(argc, argv); - QLabel label(QObject::tr("Hello, world!")); - label.show(); - return a.exec(); -} diff --git a/examples/widgets/widgets/orientation/image_a.png b/examples/widgets/widgets/orientation/image_a.png deleted file mode 100644 index 4a1a0d3252..0000000000 Binary files a/examples/widgets/widgets/orientation/image_a.png and /dev/null differ diff --git a/examples/widgets/widgets/orientation/image_b.png b/examples/widgets/widgets/orientation/image_b.png deleted file mode 100644 index 8722d1edee..0000000000 Binary files a/examples/widgets/widgets/orientation/image_b.png and /dev/null differ diff --git a/examples/widgets/widgets/orientation/image_c.png b/examples/widgets/widgets/orientation/image_c.png deleted file mode 100644 index 6c9304fda0..0000000000 Binary files a/examples/widgets/widgets/orientation/image_c.png and /dev/null differ diff --git a/examples/widgets/widgets/orientation/images.qrc b/examples/widgets/widgets/orientation/images.qrc deleted file mode 100644 index b258291e6f..0000000000 --- a/examples/widgets/widgets/orientation/images.qrc +++ /dev/null @@ -1,7 +0,0 @@ - - - image_a.png - image_b.png - image_c.png - - diff --git a/examples/widgets/widgets/orientation/landscape.ui b/examples/widgets/widgets/orientation/landscape.ui deleted file mode 100644 index 4616c041dc..0000000000 --- a/examples/widgets/widgets/orientation/landscape.ui +++ /dev/null @@ -1,114 +0,0 @@ - - - LandscapeUI - - - - 0 - 0 - 514 - 265 - - - - Form - - - - - - - 0 - 0 - - - - font-weight: bold; - - - Landscape mode - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - 0 - 0 - - - - Exit - - - - - - - - 0 - 0 - - - - Choices - - - - - - Long description explaining choice A - - - true - - - buttonGroup - - - - - - - Long description explaining choice B - - - buttonGroup - - - - - - - Long description explaining choice C - - - buttonGroup - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - diff --git a/examples/widgets/widgets/orientation/main.cpp b/examples/widgets/widgets/orientation/main.cpp deleted file mode 100644 index 53ac2d4782..0000000000 --- a/examples/widgets/widgets/orientation/main.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** 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 Digia Plc and its Subsidiary(-ies) 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 -#include "mainwindow.h" - -//! [0] -int main(int argc, char *argv[]) -{ - QApplication a(argc, argv); - - MainWindow w; - w.showFullScreen(); - - return a.exec(); -} -//! [0] - diff --git a/examples/widgets/widgets/orientation/mainwindow.cpp b/examples/widgets/widgets/orientation/mainwindow.cpp deleted file mode 100644 index 4c48f2d845..0000000000 --- a/examples/widgets/widgets/orientation/mainwindow.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** 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 Digia Plc and its Subsidiary(-ies) 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 "mainwindow.h" -#include "ui_landscape.h" -#include "ui_portrait.h" - -#include -#include - -//! [0] -MainWindow::MainWindow(QWidget *parent) : - QWidget(parent), - landscapeWidget(0), - portraitWidget(0) -{ - landscapeWidget = new QWidget(this); - landscape.setupUi(landscapeWidget); - - portraitWidget = new QWidget(this); - portrait.setupUi(portraitWidget); -//! [0] - -//! [1] - connect(portrait.exitButton, SIGNAL(clicked()), this, SLOT(close())); - connect(landscape.exitButton, SIGNAL(clicked()), this, SLOT(close())); - connect(landscape.buttonGroup, SIGNAL(buttonClicked(QAbstractButton*)), - this, SLOT(onRadioButtonClicked(QAbstractButton*))); - - landscape.radioAButton->setChecked(true); - onRadioButtonClicked(landscape.radioAButton); -//! [1] - -//! [2] -} -//! [2] - -//! [3] -void MainWindow::resizeEvent(QResizeEvent *event) -{ - QSize size = event->size(); - bool isLandscape = size.width() > size.height(); - - if (!isLandscape) - size.transpose(); - - landscapeWidget->setFixedSize(size); - size.transpose(); - portraitWidget->setFixedSize(size); - - landscapeWidget->setVisible(isLandscape); - portraitWidget->setVisible(!isLandscape); -} -//! [3] - -//! [4] -void MainWindow::onRadioButtonClicked(QAbstractButton *button) -{ - QString styleTemplate = "background-image: url(:/image_%1.png);" - "background-repeat: no-repeat;" - "background-position: center center"; - - QString imageStyle(""); - if (button == landscape.radioAButton) - imageStyle = styleTemplate.arg("a"); - else if (button == landscape.radioBButton) - imageStyle = styleTemplate.arg("b"); - else if (button == landscape.radioCButton) - imageStyle = styleTemplate.arg("c"); - - portrait.choiceWidget->setStyleSheet(imageStyle); - landscape.choiceWidget->setStyleSheet(imageStyle); -} -//! [4] - diff --git a/examples/widgets/widgets/orientation/mainwindow.h b/examples/widgets/widgets/orientation/mainwindow.h deleted file mode 100644 index c1705804ec..0000000000 --- a/examples/widgets/widgets/orientation/mainwindow.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** 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 Digia Plc and its Subsidiary(-ies) 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$ -** -****************************************************************************/ - -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include - -#include "ui_landscape.h" -#include "ui_portrait.h" - -QT_BEGIN_NAMESPACE -class QAbstractButton; -QT_END_NAMESPACE - -//! [0] -class MainWindow : public QWidget -{ - Q_OBJECT - -public: - MainWindow(QWidget *parent = 0); - -protected: - void resizeEvent(QResizeEvent *event); - -private slots: - void onRadioButtonClicked(QAbstractButton *button); - -private: - Ui::LandscapeUI landscape; - Ui::PortraitUI portrait; - QWidget *landscapeWidget; - QWidget *portraitWidget; -}; -//! [0] - -#endif // MAINWINDOW_H diff --git a/examples/widgets/widgets/orientation/orientation.pro b/examples/widgets/widgets/orientation/orientation.pro deleted file mode 100644 index 47cea596d1..0000000000 --- a/examples/widgets/widgets/orientation/orientation.pro +++ /dev/null @@ -1,29 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2010-08-04T10:27:31 -# -#------------------------------------------------- - -QT += core gui widgets - -TARGET = orientation -TEMPLATE = app - - -SOURCES += main.cpp\ - mainwindow.cpp - -HEADERS += mainwindow.h - -FORMS += \ - portrait.ui \ - landscape.ui - -RESOURCES += \ - images.qrc - -# install -target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/orientation -INSTALLS += target - -simulator: warning(This example might not fully work on Simulator platform) diff --git a/examples/widgets/widgets/orientation/portrait.ui b/examples/widgets/widgets/orientation/portrait.ui deleted file mode 100644 index 31a55aff73..0000000000 --- a/examples/widgets/widgets/orientation/portrait.ui +++ /dev/null @@ -1,61 +0,0 @@ - - - PortraitUI - - - - 0 - 0 - 201 - 300 - - - - Form - - - - - - font-weight: bold; - - - Portrait mode - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - Exit - - - - - - - Switch to landscape mode. In landscape mode you can change visible image. - - - true - - - - - - - - 0 - 0 - - - - - - - - - diff --git a/examples/widgets/widgets/widgets.pro b/examples/widgets/widgets/widgets.pro index de1cc81ea6..8d9e15a7e8 100644 --- a/examples/widgets/widgets/widgets.pro +++ b/examples/widgets/widgets/widgets.pro @@ -1,6 +1,5 @@ TEMPLATE = subdirs SUBDIRS = analogclock \ - applicationicon \ calculator \ calendarwidget \ charactermap \ @@ -13,7 +12,6 @@ SUBDIRS = analogclock \ lineedits \ movie \ mousebuttons \ - orientation \ scribble \ shapedclock \ sliders \ -- cgit v1.2.3