From 6efe729881303f2198d61817174e9695aea63246 Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Mon, 4 Jul 2011 10:30:18 +0200 Subject: Remove more references to demos. Change-Id: I431184cd0534c86047706fdaa1045b2935de5d7a Reviewed-on: http://codereview.qt.nokia.com/1307 Reviewed-by: Qt Sanity Bot Reviewed-by: David Boddie --- doc/src/demos/affine.qdoc | 48 --- doc/src/examples/affine.qdoc | 48 +++ doc/src/examples/books.qdoc | 4 +- doc/src/examples/styledemo.qdoc | 33 -- doc/src/examples/styleexample.qdoc | 33 ++ doc/src/tutorials/modelview.qdoc | 23 +- examples/README | 37 +- examples/embedded/embedded.pro | 2 +- examples/embedded/styledemo/files/add.png | Bin 1474 -> 0 bytes examples/embedded/styledemo/files/application.qss | 125 ------ examples/embedded/styledemo/files/blue.qss | 38 -- examples/embedded/styledemo/files/khaki.qss | 99 ----- examples/embedded/styledemo/files/nature_1.jpg | Bin 167443 -> 0 bytes examples/embedded/styledemo/files/nostyle.qss | 0 examples/embedded/styledemo/files/remove.png | Bin 865 -> 0 bytes examples/embedded/styledemo/files/transparent.qss | 139 ------- examples/embedded/styledemo/main.cpp | 59 --- examples/embedded/styledemo/styledemo.pro | 17 - examples/embedded/styledemo/styledemo.qrc | 13 - examples/embedded/styledemo/stylewidget.cpp | 112 ------ examples/embedded/styledemo/stylewidget.h | 65 ---- examples/embedded/styledemo/stylewidget.ui | 417 --------------------- examples/embedded/styleexample/files/add.png | Bin 0 -> 1474 bytes .../embedded/styleexample/files/application.qss | 125 ++++++ examples/embedded/styleexample/files/blue.qss | 38 ++ examples/embedded/styleexample/files/khaki.qss | 99 +++++ examples/embedded/styleexample/files/nature_1.jpg | Bin 0 -> 167443 bytes examples/embedded/styleexample/files/nostyle.qss | 0 examples/embedded/styleexample/files/remove.png | Bin 0 -> 865 bytes .../embedded/styleexample/files/transparent.qss | 139 +++++++ examples/embedded/styleexample/main.cpp | 59 +++ examples/embedded/styleexample/styleexample.pro | 17 + examples/embedded/styleexample/styleexample.qrc | 13 + examples/embedded/styleexample/stylewidget.cpp | 112 ++++++ examples/embedded/styleexample/stylewidget.h | 65 ++++ examples/embedded/styleexample/stylewidget.ui | 417 +++++++++++++++++++++ examples/graphicsview/chip/mainwindow.cpp | 2 +- examples/graphicsview/embeddeddialogs/main.cpp | 2 +- examples/mainwindows/mainwindow/mainwindow.cpp | 4 +- examples/painting/affine/xform.cpp | 2 +- examples/painting/composition/composition.html | 4 +- examples/richtext/textedit/example.html | 4 +- src/gui/painting/qpainter.cpp | 2 +- src/plugins/platforms/uikit/README | 4 +- tests/benchmarks/corelib/io/qurl/main.cpp | 2 +- .../benchapps/chipTest/mainwindow.cpp | 2 +- .../qgraphicsview/chiptester/chiptester.cpp | 2 +- 47 files changed, 1196 insertions(+), 1230 deletions(-) delete mode 100644 doc/src/demos/affine.qdoc create mode 100644 doc/src/examples/affine.qdoc delete mode 100644 doc/src/examples/styledemo.qdoc create mode 100644 doc/src/examples/styleexample.qdoc delete mode 100755 examples/embedded/styledemo/files/add.png delete mode 100644 examples/embedded/styledemo/files/application.qss delete mode 100644 examples/embedded/styledemo/files/blue.qss delete mode 100644 examples/embedded/styledemo/files/khaki.qss delete mode 100644 examples/embedded/styledemo/files/nature_1.jpg delete mode 100644 examples/embedded/styledemo/files/nostyle.qss delete mode 100755 examples/embedded/styledemo/files/remove.png delete mode 100644 examples/embedded/styledemo/files/transparent.qss delete mode 100644 examples/embedded/styledemo/main.cpp delete mode 100644 examples/embedded/styledemo/styledemo.pro delete mode 100644 examples/embedded/styledemo/styledemo.qrc delete mode 100644 examples/embedded/styledemo/stylewidget.cpp delete mode 100644 examples/embedded/styledemo/stylewidget.h delete mode 100644 examples/embedded/styledemo/stylewidget.ui create mode 100755 examples/embedded/styleexample/files/add.png create mode 100644 examples/embedded/styleexample/files/application.qss create mode 100644 examples/embedded/styleexample/files/blue.qss create mode 100644 examples/embedded/styleexample/files/khaki.qss create mode 100644 examples/embedded/styleexample/files/nature_1.jpg create mode 100644 examples/embedded/styleexample/files/nostyle.qss create mode 100755 examples/embedded/styleexample/files/remove.png create mode 100644 examples/embedded/styleexample/files/transparent.qss create mode 100644 examples/embedded/styleexample/main.cpp create mode 100644 examples/embedded/styleexample/styleexample.pro create mode 100644 examples/embedded/styleexample/styleexample.qrc create mode 100644 examples/embedded/styleexample/stylewidget.cpp create mode 100644 examples/embedded/styleexample/stylewidget.h create mode 100644 examples/embedded/styleexample/stylewidget.ui diff --git a/doc/src/demos/affine.qdoc b/doc/src/demos/affine.qdoc deleted file mode 100644 index c14a452849..0000000000 --- a/doc/src/demos/affine.qdoc +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** GNU Free Documentation License -** 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms -** and conditions contained in a signed written agreement between you -** and Nokia. -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \example painting/affine - \title Affine Transformations - - In this demo we show Qt's ability to perform affine transformations - on painting operations. - - \image affine-demo.png - - Transformations can be performed on any kind of graphics drawn using QPainter. - The transformations used to display the vector graphics, images, and text can be adjusted - in the following ways: - - \list - \o Dragging the red circle in the centre of each drawing moves it to a new position. - \o Dragging the displaced red circle causes the current drawing to be rotated about the - central circle. Rotation can also be controlled with the \key Rotate slider. - \o Scaling is controlled with the \key Scale slider. - \o Each drawing can be sheared with the \key Shear slider. - \endlist -*/ diff --git a/doc/src/examples/affine.qdoc b/doc/src/examples/affine.qdoc new file mode 100644 index 0000000000..2d70fa8951 --- /dev/null +++ b/doc/src/examples/affine.qdoc @@ -0,0 +1,48 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** GNU Free Documentation License +** 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms +** and conditions contained in a signed written agreement between you +** and Nokia. +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example painting/affine + \title Affine Transformations + + In this example we show Qt's ability to perform affine transformations + on painting operations. + + \image affine-demo.png + + Transformations can be performed on any kind of graphics drawn using QPainter. + The transformations used to display the vector graphics, images, and text can be adjusted + in the following ways: + + \list + \o Dragging the red circle in the centre of each drawing moves it to a new position. + \o Dragging the displaced red circle causes the current drawing to be rotated about the + central circle. Rotation can also be controlled with the \key Rotate slider. + \o Scaling is controlled with the \key Scale slider. + \o Each drawing can be sheared with the \key Shear slider. + \endlist +*/ diff --git a/doc/src/examples/books.qdoc b/doc/src/examples/books.qdoc index 64a4613b13..9fa7fdfc8c 100644 --- a/doc/src/examples/books.qdoc +++ b/doc/src/examples/books.qdoc @@ -27,9 +27,9 @@ /*! \example sql/books - \title Books Demonstration + \title Books - The Books demonstration shows how Qt's SQL classes can be used with the model/view + The Books example shows how Qt's SQL classes can be used with the model/view framework to create rich user interfaces for information stored in a database. \image books-demo.png diff --git a/doc/src/examples/styledemo.qdoc b/doc/src/examples/styledemo.qdoc deleted file mode 100644 index 5a5bb5b47d..0000000000 --- a/doc/src/examples/styledemo.qdoc +++ /dev/null @@ -1,33 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** GNU Free Documentation License -** 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms -** and conditions contained in a signed written agreement between you -** and Nokia. -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \example embedded/styledemo - \title Embedded Styles - - \image styledemo-demo.png -*/ diff --git a/doc/src/examples/styleexample.qdoc b/doc/src/examples/styleexample.qdoc new file mode 100644 index 0000000000..f3ab3b17d6 --- /dev/null +++ b/doc/src/examples/styleexample.qdoc @@ -0,0 +1,33 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** GNU Free Documentation License +** 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms +** and conditions contained in a signed written agreement between you +** and Nokia. +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example embedded/styleexample + \title Embedded Styles + + \image styledemo-demo.png +*/ diff --git a/doc/src/tutorials/modelview.qdoc b/doc/src/tutorials/modelview.qdoc index 35454f4268..9cbba47b60 100644 --- a/doc/src/tutorials/modelview.qdoc +++ b/doc/src/tutorials/modelview.qdoc @@ -777,7 +777,7 @@ \section2 4.2 Qt Documentation - Qt 4.7 comes with 17 examples and 2 Demonstrations for model/view. + Qt 5.0 comes with 19 examples for model/view. The examples can be found on the \l{Item Views Examples} page. \table @@ -841,6 +841,11 @@ \o QTableView \o QStandardItemModel \o + \row + \o Interview + \o Multiple + \o Custom item model + \o Multiple views \row \o Pixelator \o QTableView @@ -871,24 +876,16 @@ \o QTableView \o QStandardItemModel \o Custom delegate that uses a spin box as a cell editor + \row + \o Spreadsheet + \o {2, 1} QTableView + \o Custom delegates \row \o Star Delegate \o {2, 1} QTableWidget \o Comprehensive custom delegate example. \endtable - \l{Qt Demonstrations}{Demonstrations} are similar to examples except that no - walkthrough is provided for the code. Demonstrations are typically more - feature rich than examples. - - \list - \o The \bold Interview demonstration shows the same model and - selection being shared between three different views. - \o The \bold Spreadsheet demonstration illustrates the use of a - table view as a spreadsheet, using custom delegates to render - each item according to the type of data it contains. - \endlist - A \l{Model/View Programming}{reference document} for model/view technology is also available. */ diff --git a/examples/README b/examples/README index 10e14ceef4..9e781a93a4 100644 --- a/examples/README +++ b/examples/README @@ -1,39 +1,8 @@ -Qt is supplied with a number of example applications and demonstrations that -have been written to provide developers with examples of the Qt API in use, +Qt is supplied with a number of example applications that have been +written to provide developers with examples of the Qt API in use, highlight good programming practice, and showcase features found in each of Qt's core technologies. -The example and demo launcher can be used to explore the different categories -available. It provides an overview of each example, lets you view the -documentation in Qt Assistant, and is able to launch examples and demos. -Documentation for examples can be found in the Tutorials and Examples section +Documentation for examples can be found in the Examples section of the Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/embedded/embedded.pro b/examples/embedded/embedded.pro index 2159b1931a..0063c0038a 100644 --- a/examples/embedded/embedded.pro +++ b/examples/embedded/embedded.pro @@ -1,5 +1,5 @@ TEMPLATE = subdirs -SUBDIRS = styledemo raycasting flickable digiflip +SUBDIRS = styleexample raycasting flickable digiflip SUBDIRS += lightmaps SUBDIRS += flightinfo diff --git a/examples/embedded/styledemo/files/add.png b/examples/embedded/styledemo/files/add.png deleted file mode 100755 index fc5c16d4c8..0000000000 Binary files a/examples/embedded/styledemo/files/add.png and /dev/null differ diff --git a/examples/embedded/styledemo/files/application.qss b/examples/embedded/styledemo/files/application.qss deleted file mode 100644 index 432fe6bc76..0000000000 --- a/examples/embedded/styledemo/files/application.qss +++ /dev/null @@ -1,125 +0,0 @@ -QWidget#StyleWidget -{ - background-color: none; - background-image: url(icons:nature_1.jpg); -} - -QLabel, QAbstractButton -{ - font: bold; - color: beige; -} - -QAbstractButton -{ - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(173,216,230,60%), stop:1 rgba(0,0,139,60%) ); - border-color: black; - border-style: solid; - border-width: 3px; - border-radius: 6px; -} - -QAbstractButton:pressed, QAbstractButton:checked -{ - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) ); -} - -QSpinBox { - padding-left: 24px; - padding-right: 24px; - border-color: darkkhaki; - border-style: solid; - border-radius: 5; - border-width: 3; -} - -QSpinBox::up-button -{ - subcontrol-origin: padding; - subcontrol-position: right; /* position at the top right corner */ - width: 24px; - height: 24px; - border-width: 3px; - -} - -QSpinBox::up-arrow -{ - image: url(icons:add.png); - width: 18px; - height: 18px; -} - - -QSpinBox::down-button -{ - subcontrol-origin: border; - subcontrol-position: left; - width: 24px; - height: 24px; - border-width: 3px; -} - -QSpinBox::down-arrow -{ - image: url(icons:remove.png); - width: 18px; - height: 18px; -} - - -QScrollBar:horizontal -{ - border: 1px solid black; - background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) ); - height: 15px; - margin: 0px 20px 0 20px; -} - -QScrollBar::handle:horizontal -{ - border: 1px solid black; - background: rgba(0,0,139,60%); - min-width: 20px; -} - -QScrollBar::add-line:horizontal -{ - border: 1px solid black; - background: rgba(0,0,139,60%); - width: 20px; - subcontrol-position: right; - subcontrol-origin: margin; -} - -QScrollBar::sub-line:horizontal -{ - border: 1px solid black; - background: rgba(0,0,139,60%); - width: 20px; - subcontrol-position: left; - subcontrol-origin: margin; -} - -QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal -{ - border: none; - width: 16px; - height: 16px; -} - -QScrollBar:left-arrow:horizontal -{ - image: url(icons:add.png) -} - -QScrollBar::right-arrow:horizontal -{ - image: url(icons:remove.png) -} - -QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal -{ - background: none; -} - diff --git a/examples/embedded/styledemo/files/blue.qss b/examples/embedded/styledemo/files/blue.qss deleted file mode 100644 index ac8671b5e4..0000000000 --- a/examples/embedded/styledemo/files/blue.qss +++ /dev/null @@ -1,38 +0,0 @@ -* -{ - color: beige; -} - -QLabel, QAbstractButton -{ - font: bold; - color: yellow; -} - -QFrame -{ - background-color: rgba(96,96,255,60%); - border-color: rgb(32,32,196); - border-width: 3px; - border-style: solid; - border-radius: 5; - padding: 3px; -} - -QAbstractButton -{ - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, - stop:0 lightblue, stop:0.5 darkblue); - border-width: 3px; - border-color: darkblue; - border-style: solid; - border-radius: 5; - padding: 3px; -} - -QAbstractButton:pressed -{ - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, - stop:0.5 darkblue, stop:1 lightblue); - border-color: beige; -} diff --git a/examples/embedded/styledemo/files/khaki.qss b/examples/embedded/styledemo/files/khaki.qss deleted file mode 100644 index b0d4a0fa6f..0000000000 --- a/examples/embedded/styledemo/files/khaki.qss +++ /dev/null @@ -1,99 +0,0 @@ - -QWidget#StartScreen, QWidget#MainWidget { - border: none; -} - -QWidget#StartScreen, .QFrame { - background-color: beige; -} - -QPushButton, QToolButton { - background-color: palegoldenrod; - border-width: 2px; - border-color: darkkhaki; - border-style: solid; - border-radius: 5; - padding: 3px; - /* min-width: 96px; */ - /* min-height: 48px; */ -} - -QPushButton:hover, QToolButton:hover { - background-color: khaki; -} - -QPushButton:pressed, QToolButton:pressed { - padding-left: 5px; - padding-top: 5px; - background-color: #d0d67c; -} - -QLabel, QAbstractButton { - font: italic "Times New Roman"; -} - -QFrame, QLabel#title { - border-width: 2px; - padding: 1px; - border-style: solid; - border-color: darkkhaki; - border-radius: 5px; -} - -QFrame:focus { - border-width: 3px; - padding: 0px; -} - - -QLabel { - border: none; - padding: 0; - background: none; -} - -QLabel#title { - font: 32px bold; -} - -QSpinBox { - padding-left: 24px; - padding-right: 24px; - border-color: darkkhaki; - border-style: solid; - border-radius: 5; - border-width: 3; -} - -QSpinBox::up-button -{ - subcontrol-origin: padding; - subcontrol-position: right; /* position at the top right corner */ - width: 24px; - height: 24px; - border-width: 3px; - border-image: url(:/files/spindownpng) 1; -} - -QSpinBox::up-arrow { - image: url(:/files/add.png); - width: 12px; - height: 12px; - } - - -QSpinBox::down-button -{ - subcontrol-origin: border; - subcontrol-position: left; - width: 24px; - height: 24px; - border-width: 3px; - border-image: url(:/files/spindownpng) 1; -} - -QSpinBox::down-arrow { - image: url(:/files/remove.png); - width: 12px; - height: 12px; - } diff --git a/examples/embedded/styledemo/files/nature_1.jpg b/examples/embedded/styledemo/files/nature_1.jpg deleted file mode 100644 index 3a04edb96a..0000000000 Binary files a/examples/embedded/styledemo/files/nature_1.jpg and /dev/null differ diff --git a/examples/embedded/styledemo/files/nostyle.qss b/examples/embedded/styledemo/files/nostyle.qss deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/examples/embedded/styledemo/files/remove.png b/examples/embedded/styledemo/files/remove.png deleted file mode 100755 index a0ab1fa21a..0000000000 Binary files a/examples/embedded/styledemo/files/remove.png and /dev/null differ diff --git a/examples/embedded/styledemo/files/transparent.qss b/examples/embedded/styledemo/files/transparent.qss deleted file mode 100644 index b38eb366f4..0000000000 --- a/examples/embedded/styledemo/files/transparent.qss +++ /dev/null @@ -1,139 +0,0 @@ -QWidget#StyleWidget -{ - background-color: none; - background-image: url(:/files/nature_1.jpg); -} - -QLabel, QAbstractButton -{ - color: beige; -} - -QFrame, QLabel#title { - border-width: 2px; - padding: 1px; - border-style: solid; - border-color: black; - border-radius: 5px; -} - -QFrame:focus { - border-width: 3px; - padding: 0px; -} - - - -QAbstractButton -{ - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(173,216,230,60%), stop:1 rgba(0,0,139,60%) ); - border-color: black; - border-style: solid; - border-width: 3px; - border-radius: 6px; -} - -QAbstractButton:pressed, QAbstractButton:checked -{ - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) ); -} - -QSpinBox { - padding-left: 24px; - padding-right: 24px; - border-color: darkkhaki; - border-style: solid; - border-radius: 5; - border-width: 3; -} - -QSpinBox::up-button -{ - subcontrol-origin: padding; - subcontrol-position: right; /* position at the top right corner */ - width: 24px; - height: 24px; - border-width: 3px; - -} - -QSpinBox::up-arrow -{ - image: url(:/files/add.png); - width: 18px; - height: 18px; -} - - -QSpinBox::down-button -{ - subcontrol-origin: border; - subcontrol-position: left; - width: 24px; - height: 24px; - border-width: 3px; -} - -QSpinBox::down-arrow -{ - image: url(:/files/remove.png); - width: 18px; - height: 18px; -} - - -QScrollBar:horizontal -{ - border: 1px solid black; - background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) ); - height: 15px; - margin: 0px 20px 0 20px; -} - -QScrollBar::handle:horizontal -{ - border: 1px solid black; - background: rgba(0,0,139,60%); - min-width: 20px; -} - -QScrollBar::add-line:horizontal -{ - border: 1px solid black; - background: rgba(0,0,139,60%); - width: 20px; - subcontrol-position: right; - subcontrol-origin: margin; -} - -QScrollBar::sub-line:horizontal -{ - border: 1px solid black; - background: rgba(0,0,139,60%); - width: 20px; - subcontrol-position: left; - subcontrol-origin: margin; -} - -QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal -{ - border: none; - width: 16px; - height: 16px; -} - -QScrollBar:left-arrow:horizontal -{ - image: url(:/files/add.png) -} - -QScrollBar::right-arrow:horizontal -{ - image: url(:/files/remove.png) -} - -QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal -{ - background: none; -} - diff --git a/examples/embedded/styledemo/main.cpp b/examples/embedded/styledemo/main.cpp deleted file mode 100644 index 7a484b0365..0000000000 --- a/examples/embedded/styledemo/main.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the demonstration applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include - -#include "stylewidget.h" - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - Q_INIT_RESOURCE(styledemo); - - app.setApplicationName("style"); - app.setOrganizationName("Nokia"); - app.setOrganizationDomain("com.nokia.qt"); - - StyleWidget widget; - widget.showFullScreen(); - - return app.exec(); -} - diff --git a/examples/embedded/styledemo/styledemo.pro b/examples/embedded/styledemo/styledemo.pro deleted file mode 100644 index e005a2f3fe..0000000000 --- a/examples/embedded/styledemo/styledemo.pro +++ /dev/null @@ -1,17 +0,0 @@ -TEMPLATE = app - -# Input -HEADERS += stylewidget.h -FORMS += stylewidget.ui -SOURCES += main.cpp stylewidget.cpp -RESOURCES += styledemo.qrc - -target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/styledemo -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.html -sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/styledemo -INSTALLS += target sources - -symbian { - TARGET.UID3 = 0xA000A63F - CONFIG += qt_example -} diff --git a/examples/embedded/styledemo/styledemo.qrc b/examples/embedded/styledemo/styledemo.qrc deleted file mode 100644 index 96237d4203..0000000000 --- a/examples/embedded/styledemo/styledemo.qrc +++ /dev/null @@ -1,13 +0,0 @@ - - - files/add.png - files/blue.qss - files/khaki.qss - files/nostyle.qss - files/transparent.qss - files/application.qss - files/nature_1.jpg - files/remove.png - - - diff --git a/examples/embedded/styledemo/stylewidget.cpp b/examples/embedded/styledemo/stylewidget.cpp deleted file mode 100644 index 7bac8a84d7..0000000000 --- a/examples/embedded/styledemo/stylewidget.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the demonstration applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include -#include - -#include "stylewidget.h" - - - -StyleWidget::StyleWidget(QWidget *parent) - : QFrame(parent) -{ - m_ui.setupUi(this); -} - - -void StyleWidget::on_close_clicked() -{ - close(); -} - -void StyleWidget::on_blueStyle_clicked() -{ - QFile styleSheet(":/files/blue.qss"); - - if (!styleSheet.open(QIODevice::ReadOnly)) { - qWarning("Unable to open :/files/blue.qss"); - return; - } - - qApp->setStyleSheet(styleSheet.readAll()); -} - -void StyleWidget::on_khakiStyle_clicked() -{ - QFile styleSheet(":/files/khaki.qss"); - - if (!styleSheet.open(QIODevice::ReadOnly)) { - qWarning("Unable to open :/files/khaki.qss"); - return; - } - - qApp->setStyleSheet(styleSheet.readAll()); -} - - -void StyleWidget::on_noStyle_clicked() -{ - QFile styleSheet(":/files/nostyle.qss"); - - if (!styleSheet.open(QIODevice::ReadOnly)) { - qWarning("Unable to open :/files/nostyle.qss"); - return; - } - - qApp->setStyleSheet(styleSheet.readAll()); -} - - -void StyleWidget::on_transparentStyle_clicked() -{ - QFile styleSheet(":/files/transparent.qss"); - - if (!styleSheet.open(QIODevice::ReadOnly)) { - qWarning("Unable to open :/files/transparent.qss"); - return; - } - - qApp->setStyleSheet(styleSheet.readAll()); -} - - - diff --git a/examples/embedded/styledemo/stylewidget.h b/examples/embedded/styledemo/stylewidget.h deleted file mode 100644 index 11fa5348de..0000000000 --- a/examples/embedded/styledemo/stylewidget.h +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the demonstration applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#ifndef STYLEWIDGET_H -#define STYLEWIDGET_H - -#include - -#include "ui_stylewidget.h" - -class StyleWidget : public QFrame -{ - Q_OBJECT -public: - StyleWidget(QWidget *parent = 0); - -private: - Ui_StyleWidget m_ui; - -private slots: - void on_close_clicked(); - void on_blueStyle_clicked(); - void on_khakiStyle_clicked(); - void on_noStyle_clicked(); - void on_transparentStyle_clicked(); -}; - -#endif diff --git a/examples/embedded/styledemo/stylewidget.ui b/examples/embedded/styledemo/stylewidget.ui deleted file mode 100644 index 767f44aead..0000000000 --- a/examples/embedded/styledemo/stylewidget.ui +++ /dev/null @@ -1,417 +0,0 @@ - - - StyleWidget - - - - 0 - 0 - 184 - 245 - - - - Form - - - - - - Styles - - - - 4 - - - 4 - - - - - - 0 - 0 - - - - Qt::StrongFocus - - - Transp. - - - true - - - false - - - true - - - - - - - - 0 - 0 - - - - Qt::StrongFocus - - - Blue - - - true - - - false - - - true - - - - - - - - 0 - 0 - - - - Qt::StrongFocus - - - Khaki - - - true - - - false - - - true - - - - - - - - 0 - 0 - - - - Qt::StrongFocus - - - None - - - true - - - true - - - true - - - - - - - - - - Qt::Vertical - - - - 0 - 0 - - - - - - - - 4 - - - - - - 0 - 0 - - - - Value: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::WheelFocus - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - false - - - - - - - - - - 0 - 0 - - - - - 0 - 24 - - - - Qt::TabFocus - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - - 0 - 24 - - - - Qt::TabFocus - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - Qt::StrongFocus - - - Show - - - true - - - true - - - false - - - - - - - - 0 - 0 - - - - Qt::StrongFocus - - - Enable - - - true - - - true - - - false - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 0 - 0 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::StrongFocus - - - Close - - - - - - - - - - - horizontalScrollBar - valueChanged(int) - horizontalScrollBar_2 - setValue(int) - - - 84 - 147 - - - 166 - 147 - - - - - horizontalScrollBar_2 - valueChanged(int) - horizontalScrollBar - setValue(int) - - - 166 - 147 - - - 84 - 147 - - - - - pushButton - clicked(bool) - horizontalScrollBar_2 - setEnabled(bool) - - - 166 - 175 - - - 166 - 147 - - - - - pushButton_2 - clicked(bool) - horizontalScrollBar - setVisible(bool) - - - 84 - 175 - - - 84 - 147 - - - - - spinBox - valueChanged(int) - horizontalScrollBar_2 - setValue(int) - - - 166 - 115 - - - 166 - 147 - - - - - horizontalScrollBar_2 - valueChanged(int) - spinBox - setValue(int) - - - 132 - 132 - - - 135 - 110 - - - - - diff --git a/examples/embedded/styleexample/files/add.png b/examples/embedded/styleexample/files/add.png new file mode 100755 index 0000000000..fc5c16d4c8 Binary files /dev/null and b/examples/embedded/styleexample/files/add.png differ diff --git a/examples/embedded/styleexample/files/application.qss b/examples/embedded/styleexample/files/application.qss new file mode 100644 index 0000000000..432fe6bc76 --- /dev/null +++ b/examples/embedded/styleexample/files/application.qss @@ -0,0 +1,125 @@ +QWidget#StyleWidget +{ + background-color: none; + background-image: url(icons:nature_1.jpg); +} + +QLabel, QAbstractButton +{ + font: bold; + color: beige; +} + +QAbstractButton +{ + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(173,216,230,60%), stop:1 rgba(0,0,139,60%) ); + border-color: black; + border-style: solid; + border-width: 3px; + border-radius: 6px; +} + +QAbstractButton:pressed, QAbstractButton:checked +{ + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) ); +} + +QSpinBox { + padding-left: 24px; + padding-right: 24px; + border-color: darkkhaki; + border-style: solid; + border-radius: 5; + border-width: 3; +} + +QSpinBox::up-button +{ + subcontrol-origin: padding; + subcontrol-position: right; /* position at the top right corner */ + width: 24px; + height: 24px; + border-width: 3px; + +} + +QSpinBox::up-arrow +{ + image: url(icons:add.png); + width: 18px; + height: 18px; +} + + +QSpinBox::down-button +{ + subcontrol-origin: border; + subcontrol-position: left; + width: 24px; + height: 24px; + border-width: 3px; +} + +QSpinBox::down-arrow +{ + image: url(icons:remove.png); + width: 18px; + height: 18px; +} + + +QScrollBar:horizontal +{ + border: 1px solid black; + background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) ); + height: 15px; + margin: 0px 20px 0 20px; +} + +QScrollBar::handle:horizontal +{ + border: 1px solid black; + background: rgba(0,0,139,60%); + min-width: 20px; +} + +QScrollBar::add-line:horizontal +{ + border: 1px solid black; + background: rgba(0,0,139,60%); + width: 20px; + subcontrol-position: right; + subcontrol-origin: margin; +} + +QScrollBar::sub-line:horizontal +{ + border: 1px solid black; + background: rgba(0,0,139,60%); + width: 20px; + subcontrol-position: left; + subcontrol-origin: margin; +} + +QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal +{ + border: none; + width: 16px; + height: 16px; +} + +QScrollBar:left-arrow:horizontal +{ + image: url(icons:add.png) +} + +QScrollBar::right-arrow:horizontal +{ + image: url(icons:remove.png) +} + +QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal +{ + background: none; +} + diff --git a/examples/embedded/styleexample/files/blue.qss b/examples/embedded/styleexample/files/blue.qss new file mode 100644 index 0000000000..ac8671b5e4 --- /dev/null +++ b/examples/embedded/styleexample/files/blue.qss @@ -0,0 +1,38 @@ +* +{ + color: beige; +} + +QLabel, QAbstractButton +{ + font: bold; + color: yellow; +} + +QFrame +{ + background-color: rgba(96,96,255,60%); + border-color: rgb(32,32,196); + border-width: 3px; + border-style: solid; + border-radius: 5; + padding: 3px; +} + +QAbstractButton +{ + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, + stop:0 lightblue, stop:0.5 darkblue); + border-width: 3px; + border-color: darkblue; + border-style: solid; + border-radius: 5; + padding: 3px; +} + +QAbstractButton:pressed +{ + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, + stop:0.5 darkblue, stop:1 lightblue); + border-color: beige; +} diff --git a/examples/embedded/styleexample/files/khaki.qss b/examples/embedded/styleexample/files/khaki.qss new file mode 100644 index 0000000000..b0d4a0fa6f --- /dev/null +++ b/examples/embedded/styleexample/files/khaki.qss @@ -0,0 +1,99 @@ + +QWidget#StartScreen, QWidget#MainWidget { + border: none; +} + +QWidget#StartScreen, .QFrame { + background-color: beige; +} + +QPushButton, QToolButton { + background-color: palegoldenrod; + border-width: 2px; + border-color: darkkhaki; + border-style: solid; + border-radius: 5; + padding: 3px; + /* min-width: 96px; */ + /* min-height: 48px; */ +} + +QPushButton:hover, QToolButton:hover { + background-color: khaki; +} + +QPushButton:pressed, QToolButton:pressed { + padding-left: 5px; + padding-top: 5px; + background-color: #d0d67c; +} + +QLabel, QAbstractButton { + font: italic "Times New Roman"; +} + +QFrame, QLabel#title { + border-width: 2px; + padding: 1px; + border-style: solid; + border-color: darkkhaki; + border-radius: 5px; +} + +QFrame:focus { + border-width: 3px; + padding: 0px; +} + + +QLabel { + border: none; + padding: 0; + background: none; +} + +QLabel#title { + font: 32px bold; +} + +QSpinBox { + padding-left: 24px; + padding-right: 24px; + border-color: darkkhaki; + border-style: solid; + border-radius: 5; + border-width: 3; +} + +QSpinBox::up-button +{ + subcontrol-origin: padding; + subcontrol-position: right; /* position at the top right corner */ + width: 24px; + height: 24px; + border-width: 3px; + border-image: url(:/files/spindownpng) 1; +} + +QSpinBox::up-arrow { + image: url(:/files/add.png); + width: 12px; + height: 12px; + } + + +QSpinBox::down-button +{ + subcontrol-origin: border; + subcontrol-position: left; + width: 24px; + height: 24px; + border-width: 3px; + border-image: url(:/files/spindownpng) 1; +} + +QSpinBox::down-arrow { + image: url(:/files/remove.png); + width: 12px; + height: 12px; + } diff --git a/examples/embedded/styleexample/files/nature_1.jpg b/examples/embedded/styleexample/files/nature_1.jpg new file mode 100644 index 0000000000..3a04edb96a Binary files /dev/null and b/examples/embedded/styleexample/files/nature_1.jpg differ diff --git a/examples/embedded/styleexample/files/nostyle.qss b/examples/embedded/styleexample/files/nostyle.qss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/examples/embedded/styleexample/files/remove.png b/examples/embedded/styleexample/files/remove.png new file mode 100755 index 0000000000..a0ab1fa21a Binary files /dev/null and b/examples/embedded/styleexample/files/remove.png differ diff --git a/examples/embedded/styleexample/files/transparent.qss b/examples/embedded/styleexample/files/transparent.qss new file mode 100644 index 0000000000..b38eb366f4 --- /dev/null +++ b/examples/embedded/styleexample/files/transparent.qss @@ -0,0 +1,139 @@ +QWidget#StyleWidget +{ + background-color: none; + background-image: url(:/files/nature_1.jpg); +} + +QLabel, QAbstractButton +{ + color: beige; +} + +QFrame, QLabel#title { + border-width: 2px; + padding: 1px; + border-style: solid; + border-color: black; + border-radius: 5px; +} + +QFrame:focus { + border-width: 3px; + padding: 0px; +} + + + +QAbstractButton +{ + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(173,216,230,60%), stop:1 rgba(0,0,139,60%) ); + border-color: black; + border-style: solid; + border-width: 3px; + border-radius: 6px; +} + +QAbstractButton:pressed, QAbstractButton:checked +{ + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) ); +} + +QSpinBox { + padding-left: 24px; + padding-right: 24px; + border-color: darkkhaki; + border-style: solid; + border-radius: 5; + border-width: 3; +} + +QSpinBox::up-button +{ + subcontrol-origin: padding; + subcontrol-position: right; /* position at the top right corner */ + width: 24px; + height: 24px; + border-width: 3px; + +} + +QSpinBox::up-arrow +{ + image: url(:/files/add.png); + width: 18px; + height: 18px; +} + + +QSpinBox::down-button +{ + subcontrol-origin: border; + subcontrol-position: left; + width: 24px; + height: 24px; + border-width: 3px; +} + +QSpinBox::down-arrow +{ + image: url(:/files/remove.png); + width: 18px; + height: 18px; +} + + +QScrollBar:horizontal +{ + border: 1px solid black; + background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) ); + height: 15px; + margin: 0px 20px 0 20px; +} + +QScrollBar::handle:horizontal +{ + border: 1px solid black; + background: rgba(0,0,139,60%); + min-width: 20px; +} + +QScrollBar::add-line:horizontal +{ + border: 1px solid black; + background: rgba(0,0,139,60%); + width: 20px; + subcontrol-position: right; + subcontrol-origin: margin; +} + +QScrollBar::sub-line:horizontal +{ + border: 1px solid black; + background: rgba(0,0,139,60%); + width: 20px; + subcontrol-position: left; + subcontrol-origin: margin; +} + +QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal +{ + border: none; + width: 16px; + height: 16px; +} + +QScrollBar:left-arrow:horizontal +{ + image: url(:/files/add.png) +} + +QScrollBar::right-arrow:horizontal +{ + image: url(:/files/remove.png) +} + +QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal +{ + background: none; +} + diff --git a/examples/embedded/styleexample/main.cpp b/examples/embedded/styleexample/main.cpp new file mode 100644 index 0000000000..d3c228a59e --- /dev/null +++ b/examples/embedded/styleexample/main.cpp @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include + +#include "stylewidget.h" + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + Q_INIT_RESOURCE(styleexample); + + app.setApplicationName("style"); + app.setOrganizationName("Nokia"); + app.setOrganizationDomain("com.nokia.qt"); + + StyleWidget widget; + widget.showFullScreen(); + + return app.exec(); +} + diff --git a/examples/embedded/styleexample/styleexample.pro b/examples/embedded/styleexample/styleexample.pro new file mode 100644 index 0000000000..70942fd444 --- /dev/null +++ b/examples/embedded/styleexample/styleexample.pro @@ -0,0 +1,17 @@ +TEMPLATE = app + +# Input +HEADERS += stylewidget.h +FORMS += stylewidget.ui +SOURCES += main.cpp stylewidget.cpp +RESOURCES += styleexample.qrc + +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/styleexample +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.html +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/styleexample +INSTALLS += target sources + +symbian { + TARGET.UID3 = 0xA000A63F + CONFIG += qt_example +} diff --git a/examples/embedded/styleexample/styleexample.qrc b/examples/embedded/styleexample/styleexample.qrc new file mode 100644 index 0000000000..96237d4203 --- /dev/null +++ b/examples/embedded/styleexample/styleexample.qrc @@ -0,0 +1,13 @@ + + + files/add.png + files/blue.qss + files/khaki.qss + files/nostyle.qss + files/transparent.qss + files/application.qss + files/nature_1.jpg + files/remove.png + + + diff --git a/examples/embedded/styleexample/stylewidget.cpp b/examples/embedded/styleexample/stylewidget.cpp new file mode 100644 index 0000000000..7bac8a84d7 --- /dev/null +++ b/examples/embedded/styleexample/stylewidget.cpp @@ -0,0 +1,112 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include +#include + +#include "stylewidget.h" + + + +StyleWidget::StyleWidget(QWidget *parent) + : QFrame(parent) +{ + m_ui.setupUi(this); +} + + +void StyleWidget::on_close_clicked() +{ + close(); +} + +void StyleWidget::on_blueStyle_clicked() +{ + QFile styleSheet(":/files/blue.qss"); + + if (!styleSheet.open(QIODevice::ReadOnly)) { + qWarning("Unable to open :/files/blue.qss"); + return; + } + + qApp->setStyleSheet(styleSheet.readAll()); +} + +void StyleWidget::on_khakiStyle_clicked() +{ + QFile styleSheet(":/files/khaki.qss"); + + if (!styleSheet.open(QIODevice::ReadOnly)) { + qWarning("Unable to open :/files/khaki.qss"); + return; + } + + qApp->setStyleSheet(styleSheet.readAll()); +} + + +void StyleWidget::on_noStyle_clicked() +{ + QFile styleSheet(":/files/nostyle.qss"); + + if (!styleSheet.open(QIODevice::ReadOnly)) { + qWarning("Unable to open :/files/nostyle.qss"); + return; + } + + qApp->setStyleSheet(styleSheet.readAll()); +} + + +void StyleWidget::on_transparentStyle_clicked() +{ + QFile styleSheet(":/files/transparent.qss"); + + if (!styleSheet.open(QIODevice::ReadOnly)) { + qWarning("Unable to open :/files/transparent.qss"); + return; + } + + qApp->setStyleSheet(styleSheet.readAll()); +} + + + diff --git a/examples/embedded/styleexample/stylewidget.h b/examples/embedded/styleexample/stylewidget.h new file mode 100644 index 0000000000..11fa5348de --- /dev/null +++ b/examples/embedded/styleexample/stylewidget.h @@ -0,0 +1,65 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#ifndef STYLEWIDGET_H +#define STYLEWIDGET_H + +#include + +#include "ui_stylewidget.h" + +class StyleWidget : public QFrame +{ + Q_OBJECT +public: + StyleWidget(QWidget *parent = 0); + +private: + Ui_StyleWidget m_ui; + +private slots: + void on_close_clicked(); + void on_blueStyle_clicked(); + void on_khakiStyle_clicked(); + void on_noStyle_clicked(); + void on_transparentStyle_clicked(); +}; + +#endif diff --git a/examples/embedded/styleexample/stylewidget.ui b/examples/embedded/styleexample/stylewidget.ui new file mode 100644 index 0000000000..ebe2961ec6 --- /dev/null +++ b/examples/embedded/styleexample/stylewidget.ui @@ -0,0 +1,417 @@ + + + StyleWidget + + + + 0 + 0 + 184 + 245 + + + + Form + + + + + + Styles + + + + 4 + + + 4 + + + + + + 0 + 0 + + + + Qt::StrongFocus + + + Transp. + + + true + + + false + + + true + + + + + + + + 0 + 0 + + + + Qt::StrongFocus + + + Blue + + + true + + + false + + + true + + + + + + + + 0 + 0 + + + + Qt::StrongFocus + + + Khaki + + + true + + + false + + + true + + + + + + + + 0 + 0 + + + + Qt::StrongFocus + + + None + + + true + + + true + + + true + + + + + + + + + + Qt::Vertical + + + + 0 + 0 + + + + + + + + 4 + + + + + + 0 + 0 + + + + Value: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Qt::WheelFocus + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + false + + + + + + + + + + 0 + 0 + + + + + 0 + 24 + + + + Qt::TabFocus + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + + 0 + 24 + + + + Qt::TabFocus + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + Qt::StrongFocus + + + Show + + + true + + + true + + + false + + + + + + + + 0 + 0 + + + + Qt::StrongFocus + + + Enable + + + true + + + true + + + false + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::StrongFocus + + + Close + + + + + + + + + + + horizontalScrollBar + valueChanged(int) + horizontalScrollBar_2 + setValue(int) + + + 84 + 147 + + + 166 + 147 + + + + + horizontalScrollBar_2 + valueChanged(int) + horizontalScrollBar + setValue(int) + + + 166 + 147 + + + 84 + 147 + + + + + pushButton + clicked(bool) + horizontalScrollBar_2 + setEnabled(bool) + + + 166 + 175 + + + 166 + 147 + + + + + pushButton_2 + clicked(bool) + horizontalScrollBar + setVisible(bool) + + + 84 + 175 + + + 84 + 147 + + + + + spinBox + valueChanged(int) + horizontalScrollBar_2 + setValue(int) + + + 166 + 115 + + + 166 + 147 + + + + + horizontalScrollBar_2 + valueChanged(int) + spinBox + setValue(int) + + + 132 + 132 + + + 135 + 110 + + + + + diff --git a/examples/graphicsview/chip/mainwindow.cpp b/examples/graphicsview/chip/mainwindow.cpp index 7476c00ab1..41117c3d47 100644 --- a/examples/graphicsview/chip/mainwindow.cpp +++ b/examples/graphicsview/chip/mainwindow.cpp @@ -78,7 +78,7 @@ MainWindow::MainWindow(QWidget *parent) layout->addWidget(vSplitter); setLayout(layout); - setWindowTitle(tr("Chip Demo")); + setWindowTitle(tr("Chip Example")); } void MainWindow::populateScene() diff --git a/examples/graphicsview/embeddeddialogs/main.cpp b/examples/graphicsview/embeddeddialogs/main.cpp index bca81b8c79..e5defb1471 100644 --- a/examples/graphicsview/embeddeddialogs/main.cpp +++ b/examples/graphicsview/embeddeddialogs/main.cpp @@ -78,6 +78,6 @@ int main(int argc, char *argv[]) view.setBackgroundBrush(QPixmap(":/No-Ones-Laughing-3.jpg")); view.setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate); view.show(); - view.setWindowTitle("Embedded Dialogs Demo"); + view.setWindowTitle("Embedded Dialogs Example"); return app.exec(); } diff --git a/examples/mainwindows/mainwindow/mainwindow.cpp b/examples/mainwindows/mainwindow/mainwindow.cpp index a58a713c0b..ef1485a147 100644 --- a/examples/mainwindows/mainwindow/mainwindow.cpp +++ b/examples/mainwindows/mainwindow/mainwindow.cpp @@ -64,7 +64,7 @@ #include static const char * const message = - "

Qt Main Window Demo

" + "

Qt Main Window Example

" "

This is a demonstration of the QMainWindow, QToolBar and " "QDockWidget classes.

" @@ -88,7 +88,7 @@ MainWindow::MainWindow(const QMap &customSizeHints, : QMainWindow(parent, flags) { setObjectName("MainWindow"); - setWindowTitle("Qt Main Window Demo"); + setWindowTitle("Qt Main Window Example"); center = new QTextEdit(this); center->setReadOnly(true); diff --git a/examples/painting/affine/xform.cpp b/examples/painting/affine/xform.cpp index ea1916acc8..43f8ce4da1 100644 --- a/examples/painting/affine/xform.cpp +++ b/examples/painting/affine/xform.cpp @@ -895,7 +895,7 @@ XFormWidget::XFormWidget(QWidget *parent) // defaults view->reset(); vectorType->setChecked(true); - textEditor->setText("Qt Affine Transformation Demo"); + textEditor->setText("Qt Affine Transformation Example"); textEditor->setEnabled(false); animateButton->animateClick(); diff --git a/examples/painting/composition/composition.html b/examples/painting/composition/composition.html index 1848ad8bd1..82b8991e8f 100644 --- a/examples/painting/composition/composition.html +++ b/examples/painting/composition/composition.html @@ -1,9 +1,9 @@ -

Demo for composition modes

+

Example for composition modes

- This demo shows some of the more advanced composition modes supported by Qt. + This example shows some of the more advanced composition modes supported by Qt.

diff --git a/examples/richtext/textedit/example.html b/examples/richtext/textedit/example.html index 6327b5f8fc..cdc8d2a23d 100644 --- a/examples/richtext/textedit/example.html +++ b/examples/richtext/textedit/example.html @@ -1,9 +1,9 @@ -QTextEdit Demonstration

QTextEdit

The QTextEdit widget is an advanced editor that supports formatted rich text. It can be used to display HTML and other rich document formats. Internally, QTextEdit uses the QTextDocument class to describe both the high-level structure of each document and the low-level formatting of paragraphs.

-

If you are viewing this document in the textedit demo, you can edit this document to explore Qt's rich text editing features. We have included some comments in each of the following sections to encourage you to experiment.

+

If you are viewing this document in the textedit example, you can edit this document to explore Qt's rich text editing features. We have included some comments in each of the following sections to encourage you to experiment.

Font and Paragraph Styles

QTextEdit supports bold, italic, and underlined font styles, and can display multicolored text. Font families such as Times New Roman and Courier can also be used directly. If you place the cursor in a region of styled text, the controls in the tool bars will change to reflect the current style.

Paragraphs can be formatted so that the text is left-aligned, right-aligned, centered, or fully justified.

diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 8752cb86a7..686f2f023a 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -1318,7 +1318,7 @@ void QPainterPrivate::updateState(QPainterState *newState) \o \inlineimage qpainter-compositiondemo.png \o - \bold {Composition Modes Demo} + \bold {Composition Modes Example} The \l {painting/composition}{Composition Modes} example, available in Qt's examples directory, allows you to experiment with the various diff --git a/src/plugins/platforms/uikit/README b/src/plugins/platforms/uikit/README index a101a3ac0b..f878cce50e 100644 --- a/src/plugins/platforms/uikit/README +++ b/src/plugins/platforms/uikit/README @@ -18,11 +18,11 @@ After configuring and building Qt you need to also build src/plugins/platforms/u Simulator: ---------- -configure -qpa -xplatform qws/macx-iphonesimulator-g++ -arch i386 -developer-build -opengl es1 -no-accessibility -no-qt3support -no-multimedia -no-phonon -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations +configure -qpa -xplatform qws/macx-iphonesimulator-g++ -arch i386 -developer-build -opengl es1 -no-accessibility -no-qt3support -no-multimedia -no-phonon -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake docs -nomake examples -nomake translations Device: ------- -configure -qpa -xplatform qws/macx-iphonedevice-g++ -arch armv7 -developer-build -release -opengl es1 -no-accessibility -no-qt3support -no-multimedia -no-phonon -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations +configure -qpa -xplatform qws/macx-iphonedevice-g++ -arch armv7 -developer-build -release -opengl es1 -no-accessibility -no-qt3support -no-multimedia -no-phonon -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake docs -nomake examples -nomake translations 2) XCode setup: - there are examples in the examples subdirectory of the platform plugin diff --git a/tests/benchmarks/corelib/io/qurl/main.cpp b/tests/benchmarks/corelib/io/qurl/main.cpp index ca6ec882f4..7e5035f250 100644 --- a/tests/benchmarks/corelib/io/qurl/main.cpp +++ b/tests/benchmarks/corelib/io/qurl/main.cpp @@ -229,7 +229,7 @@ void tst_qurl::equality() void tst_qurl::qmlPropertyWriteUseCase() { - QUrl base("file:///home/user/qt/demos/declarative/samegame/SamegameCore/"); + QUrl base("file:///home/user/qt/examples/declarative/samegame/SamegameCore/"); QString str("pics/redStar.png"); QBENCHMARK { diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp index e7969d2bee..4c6289ea95 100644 --- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp @@ -56,7 +56,7 @@ MainWindow::MainWindow(QWidget *parent) layout->addWidget(view); setLayout(layout); - setWindowTitle(tr("Chip Demo")); + setWindowTitle(tr("Chip Example")); } void MainWindow::populateScene() diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp index 994b53e382..c6167e50cb 100644 --- a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp @@ -60,7 +60,7 @@ ChipTester::ChipTester(QWidget *parent) populateScene(); setScene(scene); - setWindowTitle(tr("Chip Demo")); + setWindowTitle(tr("Chip Example")); } void ChipTester::setAntialias(bool enabled) -- cgit v1.2.3