summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-05-23 21:27:07 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-05-23 21:27:07 +0200
commitd3a8bc803cd7c4ce106038bfc4b37cdd6bb8e177 (patch)
tree3b6db0d4869f334d0eb4559c5ae457995cbe913e /examples
parentd934ddc297f6db94dbc548fe01da64350f13577d (diff)
parent47a7628023610904c6ac52e23fa289f75f349b4e (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/corelib/json/qjsonwriter.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbkeyboard.cpp Change-Id: I46fef1455f5a9f2ce1ec394a3c65881093c51b62
Diffstat (limited to 'examples')
-rw-r--r--examples/dbus/remotecontrolledcar/doc/src/dbus-remotecontrolledcar.qdoc2
-rw-r--r--examples/network/doc/src/network-download.qdoc2
-rw-r--r--examples/network/doc/src/network-downloadmanager.qdoc2
-rw-r--r--examples/opengl/grabber/mainwindow.cpp2
-rw-r--r--examples/opengl/overpainting/glwidget.cpp6
-rw-r--r--examples/opengl/paintedwindow/paintedwindow.cpp8
-rw-r--r--examples/opengl/paintedwindow/paintedwindow.h1
-rw-r--r--examples/sql/connection.h75
-rw-r--r--examples/sql/doc/images/drilldown-example.pngbin128081 -> 52950 bytes
-rw-r--r--examples/sql/doc/src/drilldown.qdoc117
-rw-r--r--examples/sql/drilldown/drilldown.qrc17
-rw-r--r--examples/sql/drilldown/imageitem.cpp2
-rw-r--r--examples/sql/drilldown/images/beijing.pngbin99093 -> 0 bytes
-rw-r--r--examples/sql/drilldown/images/berlin.pngbin81944 -> 0 bytes
-rw-r--r--examples/sql/drilldown/images/brisbane.pngbin57785 -> 0 bytes
-rw-r--r--examples/sql/drilldown/images/munich.pngbin59769 -> 0 bytes
-rw-r--r--examples/sql/drilldown/images/oslo.pngbin41781 -> 0 bytes
-rw-r--r--examples/sql/drilldown/images/qt-creator.pngbin0 -> 46906 bytes
-rw-r--r--examples/sql/drilldown/images/qt-logo.pngbin0 -> 45652 bytes
-rw-r--r--examples/sql/drilldown/images/qt-project.pngbin0 -> 37795 bytes
-rw-r--r--examples/sql/drilldown/images/qt-quick.pngbin0 -> 43238 bytes
-rw-r--r--examples/sql/drilldown/images/redwood.pngbin39050 -> 0 bytes
-rw-r--r--examples/sql/drilldown/informationwindow.cpp38
-rw-r--r--examples/sql/drilldown/informationwindow.h7
-rw-r--r--examples/sql/drilldown/logo.pngbin13378 -> 0 bytes
-rw-r--r--examples/sql/drilldown/main.cpp2
-rw-r--r--examples/sql/drilldown/view.cpp47
-rw-r--r--examples/sql/drilldown/view.h4
-rw-r--r--examples/tools/doc/src/customtype.qdoc2
-rw-r--r--examples/widgets/doc/images/orientation-landscape-ui.pngbin18077 -> 0 bytes
-rw-r--r--examples/widgets/doc/images/orientation-landscape.pngbin46496 -> 0 bytes
-rw-r--r--examples/widgets/doc/images/orientation-portrait-ui.pngbin9785 -> 0 bytes
-rw-r--r--examples/widgets/doc/images/orientation-portrait.pngbin17377 -> 0 bytes
-rw-r--r--examples/widgets/doc/orientation.qdoc142
-rw-r--r--examples/widgets/doc/src/applicationicon.qdoc52
-rw-r--r--examples/widgets/widgets/applicationicon/applicationicon.pngbin4023 -> 0 bytes
-rw-r--r--examples/widgets/widgets/applicationicon/applicationicon.pro15
-rw-r--r--examples/widgets/widgets/applicationicon/applicationicon.svg22
-rw-r--r--examples/widgets/widgets/applicationicon/main.cpp50
-rw-r--r--examples/widgets/widgets/orientation/image_a.pngbin1075 -> 0 bytes
-rw-r--r--examples/widgets/widgets/orientation/image_b.pngbin1020 -> 0 bytes
-rw-r--r--examples/widgets/widgets/orientation/image_c.pngbin1163 -> 0 bytes
-rw-r--r--examples/widgets/widgets/orientation/images.qrc7
-rw-r--r--examples/widgets/widgets/orientation/landscape.ui114
-rw-r--r--examples/widgets/widgets/orientation/main.cpp55
-rw-r--r--examples/widgets/widgets/orientation/mainwindow.cpp112
-rw-r--r--examples/widgets/widgets/orientation/mainwindow.h75
-rw-r--r--examples/widgets/widgets/orientation/orientation.pro29
-rw-r--r--examples/widgets/widgets/orientation/portrait.ui61
-rw-r--r--examples/widgets/widgets/widgets.pro2
-rw-r--r--examples/xml/doc/src/qxmlstreambookmarks.qdoc2
51 files changed, 150 insertions, 922 deletions
diff --git a/examples/dbus/remotecontrolledcar/doc/src/dbus-remotecontrolledcar.qdoc b/examples/dbus/remotecontrolledcar/doc/src/dbus-remotecontrolledcar.qdoc
index c303998cd8..522b0bacc7 100644
--- a/examples/dbus/remotecontrolledcar/doc/src/dbus-remotecontrolledcar.qdoc
+++ b/examples/dbus/remotecontrolledcar/doc/src/dbus-remotecontrolledcar.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \example dbus/remotecontrolledcar
+ \example remotecontrolledcar
\title D-Bus Remote Controlled Car Example
The Remote Controlled Car example shows how to use D-Bus to control one
diff --git a/examples/network/doc/src/network-download.qdoc b/examples/network/doc/src/network-download.qdoc
index 212252e7c9..60a6fab3c4 100644
--- a/examples/network/doc/src/network-download.qdoc
+++ b/examples/network/doc/src/network-download.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \example network/download
+ \example download
\title Network Download Example
\brief Demonstrates how to use networking APIs for multiple downloads
\ingroup examples-network
diff --git a/examples/network/doc/src/network-downloadmanager.qdoc b/examples/network/doc/src/network-downloadmanager.qdoc
index d9145d5a1c..d4eacf4199 100644
--- a/examples/network/doc/src/network-downloadmanager.qdoc
+++ b/examples/network/doc/src/network-downloadmanager.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \example network/downloadmanager
+ \example downloadmanager
\title Network Download Manager Example
\brief Demonstrates how to use the networking APIs for multiple downloads
\ingroup examples-network
diff --git a/examples/opengl/grabber/mainwindow.cpp b/examples/opengl/grabber/mainwindow.cpp
index 9f31733856..9f82ee10ba 100644
--- a/examples/opengl/grabber/mainwindow.cpp
+++ b/examples/opengl/grabber/mainwindow.cpp
@@ -175,7 +175,7 @@ QSlider *MainWindow::createSlider(const char *changedSignal,
void MainWindow::setPixmap(const QPixmap &pixmap)
{
pixmapLabel->setPixmap(pixmap);
- QSize size = pixmap.size();
+ QSize size = pixmap.size() / pixmap.devicePixelRatio();
if (size - QSize(1, 0) == pixmapLabelArea->maximumViewportSize())
size -= QSize(1, 0);
pixmapLabel->resize(size);
diff --git a/examples/opengl/overpainting/glwidget.cpp b/examples/opengl/overpainting/glwidget.cpp
index 78f5f96c48..420ae3e881 100644
--- a/examples/opengl/overpainting/glwidget.cpp
+++ b/examples/opengl/overpainting/glwidget.cpp
@@ -161,7 +161,8 @@ void GLWidget::paintEvent(QPaintEvent *event)
static GLfloat lightPosition[4] = { 0.5, 5.0, 7.0, 1.0 };
glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
- setupViewport(width(), height());
+ qreal pixelRatio = devicePixelRatio();
+ setupViewport(width() * pixelRatio, height() * pixelRatio);
//! [6]
//! [7]
@@ -200,7 +201,8 @@ void GLWidget::paintEvent(QPaintEvent *event)
//! [11]
void GLWidget::resizeGL(int width, int height)
{
- setupViewport(width, height);
+ qreal pixelRatio = devicePixelRatio();
+ setupViewport(width*pixelRatio, height*pixelRatio);
}
//! [11]
diff --git a/examples/opengl/paintedwindow/paintedwindow.cpp b/examples/opengl/paintedwindow/paintedwindow.cpp
index d891f8d563..c8f1f236ba 100644
--- a/examples/opengl/paintedwindow/paintedwindow.cpp
+++ b/examples/opengl/paintedwindow/paintedwindow.cpp
@@ -88,14 +88,10 @@ PaintedWindow::PaintedWindow()
connect(this, SIGNAL(rotationChanged(qreal)), this, SLOT(paint()));
}
-void PaintedWindow::resizeEvent(QResizeEvent *)
-{
- paint();
-}
-
void PaintedWindow::exposeEvent(QExposeEvent *)
{
- paint();
+ if (isExposed())
+ paint();
}
void PaintedWindow::mousePressEvent(QMouseEvent *)
diff --git a/examples/opengl/paintedwindow/paintedwindow.h b/examples/opengl/paintedwindow/paintedwindow.h
index c5b7976d59..f185cd3733 100644
--- a/examples/opengl/paintedwindow/paintedwindow.h
+++ b/examples/opengl/paintedwindow/paintedwindow.h
@@ -74,7 +74,6 @@ private slots:
void rotationDone();
private:
- void resizeEvent(QResizeEvent *);
void exposeEvent(QExposeEvent *);
void mousePressEvent(QMouseEvent *);
diff --git a/examples/sql/connection.h b/examples/sql/connection.h
index 46d91b6605..e6bbe642cb 100644
--- a/examples/sql/connection.h
+++ b/examples/sql/connection.h
@@ -78,55 +78,38 @@ static bool createConnection()
query.exec("insert into person values(104, 'Roberto', 'Robitaille')");
query.exec("insert into person values(105, 'Maria', 'Papadopoulos')");
- query.exec("create table offices (id int primary key,"
+ query.exec("create table items (id int primary key,"
"imagefile int,"
- "location varchar(20),"
- "country varchar(20),"
+ "itemtype varchar(20),"
"description varchar(100))");
- query.exec("insert into offices "
- "values(0, 0, 'Oslo', 'Norway',"
- "'Oslo is home to more than 500 000 citizens and has a "
- "lot to offer.It has been called \"The city with the big "
- "heart\" and this is a nickname we are happy to live up to.')");
- query.exec("insert into offices "
- "values(1, 1, 'Brisbane', 'Australia',"
- "'Brisbane is the capital of Queensland, the Sunshine State, "
- "where it is beautiful one day, perfect the next. "
- "Brisbane is Australia''s 3rd largest city, being home "
- "to almost 2 million people.')");
- query.exec("insert into offices "
- "values(2, 2, 'Redwood City', 'US',"
- "'You find Redwood City in the heart of the Bay Area "
- "just north of Silicon Valley. The largest nearby city is "
- "San Jose which is the third largest city in California "
- "and the 10th largest in the US.')");
- query.exec("insert into offices "
- "values(3, 3, 'Berlin', 'Germany',"
- "'Berlin, the capital of Germany is dynamic, cosmopolitan "
- "and creative, allowing for every kind of lifestyle. "
- "East meets West in the metropolis at the heart of a "
- "changing Europe.')");
- query.exec("insert into offices "
- "values(4, 4, 'Munich', 'Germany',"
- "'Several technology companies are represented in Munich, "
- "and the city is often called the \"Bavarian Silicon Valley\". "
- "The exciting city is also filled with culture, "
- "art and music. ')");
- query.exec("insert into offices "
- "values(5, 5, 'Beijing', 'China',"
- "'Beijing as a capital city has more than 3000 years of "
- "history. Today the city counts 12 million citizens, and "
- "is the political, economic and cultural centre of China.')");
-
- query.exec("create table images (locationid int, file varchar(20))");
- query.exec("insert into images values(0, 'images/oslo.png')");
- query.exec("insert into images values(1, 'images/brisbane.png')");
- query.exec("insert into images values(2, 'images/redwood.png')");
- query.exec("insert into images values(3, 'images/berlin.png')");
- query.exec("insert into images values(4, 'images/munich.png')");
- query.exec("insert into images values(5, 'images/beijing.png')");
-
+ query.exec("insert into items "
+ "values(0, 0, 'Qt',"
+ "'Qt is a full development framework with tools designed to "
+ "streamline the creation of stunning applications and "
+ "amazing user interfaces for desktop, embedded and mobile "
+ "platforms.')");
+ query.exec("insert into items "
+ "values(1, 1, 'Qt Quick',"
+ "'Qt Quick is a collection of techniques designed to help "
+ "developers create intuitive, modern-looking, and fluid "
+ "user interfaces using a CSS & JavaScript like language.')");
+ query.exec("insert into items "
+ "values(2, 2, 'Qt Creator',"
+ "'Qt Creator is a powerful cross-platform integrated "
+ "development environment (IDE), including UI design tools "
+ "and on-device debugging.')");
+ query.exec("insert into items "
+ "values(3, 3, 'Qt Project',"
+ "'The Qt Project governs the open source development of Qt, "
+ "allowing anyone wanting to contribute to join the effort "
+ "through a meritocratic structure of approvers and "
+ "maintainers.')");
+ query.exec("create table images (itemid int, file varchar(20))");
+ query.exec("insert into images values(0, 'images/qt-logo.png')");
+ query.exec("insert into images values(1, 'images/qt-quick.png')");
+ query.exec("insert into images values(2, 'images/qt-creator.png')");
+ query.exec("insert into images values(3, 'images/qt-project.png')");
return true;
}
diff --git a/examples/sql/doc/images/drilldown-example.png b/examples/sql/doc/images/drilldown-example.png
index 68353f704a..fd315a437e 100644
--- a/examples/sql/doc/images/drilldown-example.png
+++ b/examples/sql/doc/images/drilldown-example.png
Binary files differ
diff --git a/examples/sql/doc/src/drilldown.qdoc b/examples/sql/doc/src/drilldown.qdoc
index 3bba12317f..09f9477f4f 100644
--- a/examples/sql/doc/src/drilldown.qdoc
+++ b/examples/sql/doc/src/drilldown.qdoc
@@ -37,20 +37,19 @@
\image drilldown-example.png Screenshot of the Drill Down Example
When running the example application, a user can retrieve
- information about each of Nokia's Qt offices by clicking the
- corresponding image. The application pops up an information window
- displaying the data, and allows the users to alter the location
- description as well as the image. The main view will be updated
- when the users submit their changes.
+ information about each item by clicking the corresponding image.
+ The application pops up an information window displaying the data,
+ and allows the users to alter the description as well as the image.
+ The main view will be updated when the users submit their changes.
The example consists of three classes:
\list
\li \c ImageItem is a custom graphics item class used to
- display the office images.
+ display the images.
\li \c View is the main application widget allowing the user to
- browse through the various locations.
+ browse through the various items.
\li \c InformationWindow displays the requested information,
allowing the users to alter it and submit their changes to the
@@ -70,7 +69,7 @@
\snippet drilldown/informationwindow.h 0
When we create an information window, we pass the associated
- location ID, a parent, and a pointer to the database, to the
+ item ID, a parent, and a pointer to the database, to the
constructor. We will use the database pointer to populate our
window with data, while passing the parent parameter on to the
base class. The ID is stored for future reference.
@@ -84,7 +83,7 @@
\snippet drilldown/informationwindow.h 1
- Since we allow the users to alter some of the location data, we
+ Since we allow the users to alter some of the data, we
must provide functionality for reverting and submitting their
changes. The \c enableButtons() slot is provided for convenience
to enable and disable the various buttons when required.
@@ -93,15 +92,15 @@
The \c createButtons() function is also a convenience function,
provided to simplify the constructor. As mentioned above we store
- the location ID for future reference. We also store the name of
+ the item ID for future reference. We also store the name of
the currently displayed image file to be able to determine when to
emit the \c imageChanged() signal.
- The information window uses the QLabel class to display the office
- location and the country. The associated image file is displayed
- using a QComboBox instance while the description is displayed using
- QTextEdit. In addition, the window has three buttons to control
- the data flow and whether the window is shown or not.
+ The information window uses the QLabel class to display the name of
+ an item. The associated image file is displayed using a QComboBox
+ instance while the description is displayed using QTextEdit. In
+ addition, the window has three buttons to control the data flow and
+ whether the window is shown or not.
Finally, we declare a \e mapper. The QDataWidgetMapper class
provides mapping between a section of a data model to widgets. We
@@ -110,7 +109,7 @@
\section1 InformationWindow Class Implementation
- The constructor takes three arguments: a location ID, a database
+ The constructor takes three arguments: an item ID, a database
pointer and a parent widget. The database pointer is actually a
pointer to a QSqlRelationalTableModel object providing an editable
data model (with foreign key support) for our database table.
@@ -125,8 +124,8 @@
\snippet drilldown/informationwindow.cpp 2
- In this example, the information about the offices are stored in a
- database table called "offices". When creating the model,
+ In this example, information about the items are stored in a
+ database table called "items". When creating the model,
we will use a foreign key to establish a relation between this
table and a second data base table, "images", containing the names
of the available image files. We will get back to how this is done
@@ -140,7 +139,7 @@
the foreign key (in this case the "imagefile" column number) as
argument. We use QComboBox's \l {QComboBox::}{setModel()} function
to make the combobox use the "images" model. And, since this model
- has two columns ("locationid" and "file"), we also specify which
+ has two columns ("itemid" and "file"), we also specify which
column we want to be visible using the QComboBox::setModelColumn()
function.
@@ -156,7 +155,7 @@
section is a column in the model, otherwise it is a row. We call
the \l {QDataWidgetMapper::}{setCurrentIndex()} function to
initialize the widgets with the data associated with the given
- location ID. Every time the current index changes, all the widgets
+ item ID. Every time the current index changes, all the widgets
are updated with the contents from the model.
We also set the mapper's submit policy to
@@ -168,14 +167,14 @@
view should use for its items. The QSqlRelationalDelegate class
represents a delegate that unlike the default delegate, enables
combobox functionality for fields that are foreign keys into other
- tables (like "imagefile" in our "trolltechoffices" table).
+ tables (like "imagefile" in our "items" table).
\snippet drilldown/informationwindow.cpp 4
Finally, we connect the "something's changed" signals in the
editors to our custom \c enableButtons() slot, enabling the users
to either submit or revert their changes. We add all the widgets
- into a layout, store the location ID and the name of the displayed
+ into a layout, store the item ID and the name of the displayed
image file for future reference, and set the window title and
initial size.
@@ -189,7 +188,7 @@
application exits (i.e., if the user closes the information
window, it is only hidden). For this reason we do not want to
create more than one \c InformationWindow object for each
- location, and we provide the public \c id() function to be able to
+ item, and we provide the public \c id() function to be able to
determine whether a window already exists for a given location
when the user requests information about it.
@@ -256,16 +255,15 @@
{QDialogButtonBox::ButtonRole}{reject} role indicates that
clicking the button causes the dialog to be rejected. On the other
hand, since we only hide the information window, any changes that
- the user has made wil be preserved until the user expliclity
- revert or submit them.
+ the user has made will be preserved until the user explicitly
+ reverts or submits them.
\snippet drilldown/informationwindow.cpp 10
The \c enableButtons() slot is called to enable the buttons
whenever the user changes the presented data. Likewise, when the
- data the user choose to submit the changes, the buttons are
- disabled to indicate that the current data is stored in the
- database.
+ user chooses to submit the changes, the buttons are disabled to
+ indicate that the current data is stored in the database.
This completes the \c InformationWindow class. Let's take a look
at how we have used it in our example application.
@@ -280,19 +278,17 @@
\snippet drilldown/view.h 1
The QGraphicsView class is part of the \l {Graphics View
- Framework} which we will use to display the images of Nokia's
- Qt offices. To be able to respond to user interaction;
- i.e., showing the
- appropriate information window whenever the user clicks one of the
- office images, we reimplement QGraphicsView's \l
- {QGraphicsView::}{mouseReleaseEvent()} function.
+ Framework} which we will use to display the images. To be able to
+ respond to user interaction by displaying the appropriate
+ information window when the image is clicked, we reimplement
+ QGraphicsView's \l{QGraphicsView::}{mouseReleaseEvent()} function.
Note that the constructor expects the names of two database
- tables: One containing the detailed information about the offices,
+ tables: One containing the detailed information about the items,
and another containing the names of the available image files. We
also provide a private \c updateImage() slot to catch \c
{InformationWindow}'s \c imageChanged() signal that is emitted
- whenever the user changes a location's image.
+ whenever the user changes an image associated with the item.
\snippet drilldown/view.h 2
@@ -303,20 +299,20 @@
The \c findWindow() function, on the other hand, is frequently
used. It is called from the \c showInformation() function to
detemine whether a window is already created for the given
- location (whenever we create an \c InformationWindow object, we
+ item (whenever we create an \c InformationWindow object, we
store a reference to it in the \c informationWindows list). The
latter function is in turn called from our custom \c
mouseReleaseEvent() implementation.
\snippet drilldown/view.h 3
- Finally we declare a QSqlRelationalTableModel pointer. As
+ Finally, we declare a QSqlRelationalTableModel pointer. As
previously mentioned, the QSqlRelationalTableModel class provides
an editable data model with foreign key support. There are a
couple of things you should keep in mind when using the
QSqlRelationalTableModel class: The table must have a primary key
declared and this key cannot contain a relation to another table,
- i.e., it cannot be a foreign key. Note also that if a relational
+ that is, it cannot be a foreign key. Also note that if a relational
table contains keys that refer to non-existent rows in the
referenced table, the rows containing the invalid keys will not be
exposed through the model. It is the user's or the database's
@@ -327,11 +323,11 @@
Although the constructor requests the names of both the table
containing office details as well as the table containing the
names of the available image files, we only have to create a
- QSqlRelationalTableModel object for the office table:
+ QSqlRelationalTableModel object for the "items" table:
\snippet drilldown/view.cpp 0
- The reason is that once we have a model with the office details,
+ The reason is that once we have a model with the item details,
we can create a relation to the available image files using
QSqlRelationalTableModel's \l
{QSqlRelationalTableModel::}{setRelation()} function. This
@@ -348,20 +344,19 @@
\snippet drilldown/view.cpp 1
Then we create the contents of our view, i.e., the scene and its
- items. The location labels are regular QGraphicsTextItem objects,
- and the "Qt" logo is represented by a QGraphicsPixmapItem
- object. The images, on the other hand, are instances of the \c
- ImageItem class (derived from QGraphicsPixmapItem). We will get
- back to this shortly when reviewing the \c addItems() function.
+ items. The labels are regular QGraphicsTextItem objects, whereas
+ the images are instances of the \c ImageItem class, derived from
+ QGraphicsPixmapItem. We will get back to this shortly when reviewing
+ the \c addItems() function.
Finally, we set the main application widget's size constraints and
window title.
\snippet drilldown/view.cpp 3
- The \c addItems() function is called only once, i.e., when
- creating the main application window. For each row in the database
- table, we first extract the corresponding record using the model's
+ The \c addItems() function is called only once when creating the main
+ application window. For each row in the database table, we first
+ extract the corresponding record using the model's
\l {QSqlRelationalTableModel::}{record()} function. The QSqlRecord
class encapsulates both the functionality and characteristics of a
database record, and supports adding and removing fields as well
@@ -394,7 +389,7 @@
\snippet drilldown/view.cpp 6
The \c showInformation() function is given an \c ImageItem object
- as argument, and starts off by extracting the item's location
+ as argument, and starts off by extracting the item's item
ID. Then it determines if there already is created an information
window for this location. If it is, and the window is visible, it
ensures that the window is raised to the top of the widget stack
@@ -402,7 +397,7 @@
{QWidget::}{show()} slot gives the same result.
If no window for the given location exists, we create one by
- passing the location ID, a pointer to the model, and our view as a
+ passing the item ID, a pointer to the model, and our view as a
parent, to the \c InformationWindow constructor. Note that we
connect the information window's \c imageChanged() signal to \e
this widget's \c updateImage() slot, before we give it a suitable
@@ -410,16 +405,16 @@
\snippet drilldown/view.cpp 7
- The \c updateImage() slot takes a location ID and the name of an
- image files as arguments. It filters out the image items, and
- updates the one that correspond to the given location ID, with the
+ The \c updateImage() slot takes an item ID and the name of an
+ image file as arguments. It filters out the image items, and
+ updates the one that correspond to the given item ID, with the
provided image file.
\snippet drilldown/view.cpp 8
The \c findWindow() function simply searches through the list of
existing windows, returning a pointer to the window that matches
- the given location ID, or 0 if the window doesn't exists.
+ the given item ID, or 0 if the window doesn't exists.
Finally, let's take a quick look at our custom \c ImageItem class:
@@ -442,7 +437,7 @@
returning back to its original size when the cursor leaves its
borders.
- Finally, we store the location ID that this particular record is
+ Finally, we store the item ID that this particular record is
associated with as well as a z-value. In the \l {Graphics View
Framework}, an item's z-value determines its position in the item
stack. An item of high z-value will be drawn on top of an item
@@ -460,8 +455,8 @@
\snippet drilldown/imageitem.cpp 0
Then we store the ID for future reference, and ensure that our
- item will accept hover events. Hover events are delivered when
- there is no current mouse grabber item. They are sent when the
+ image item will accept hover events. Hover events are delivered
+ when there is no current mouse grabber item. They are sent when the
mouse cursor enters an item, when it moves around inside the item,
and when the cursor leaves an item. As we mentioned earlier, none
of the \l {Graphics View Framework}'s items accept hover
@@ -487,7 +482,7 @@
\codeline
\snippet drilldown/imageitem.cpp 2
- Whenever the mouse cursor enters or leave the image item, the
+ Whenever the mouse cursor enters or leaves the image item, the
corresponding event handlers are triggered: We first set the time
line's direction, making the item expand or shrink,
respectively. Then we alter the item's z-value if it is not already
@@ -532,6 +527,6 @@
size regardless of the size of the source image. The \c id()
function is trivial, and is simply provided to be able to identify
the item. In the \c updateItemPosition() slot we call the
- QGraphicsItem::setZValue() function, setting the elevation (i.e.,
- the position) of the item.
+ QGraphicsItem::setZValue() function, setting the elevation of the
+ item.
*/
diff --git a/examples/sql/drilldown/drilldown.qrc b/examples/sql/drilldown/drilldown.qrc
index d2fb12295b..f24edbafe4 100644
--- a/examples/sql/drilldown/drilldown.qrc
+++ b/examples/sql/drilldown/drilldown.qrc
@@ -1,11 +1,8 @@
-<!DOCTYPE RCC><RCC version="1.0">
- <qresource>
- <file>images/oslo.png</file>
- <file>images/brisbane.png</file>
- <file>images/redwood.png</file>
- <file>images/berlin.png</file>
- <file>images/munich.png</file>
- <file>images/beijing.png</file>
- <file>logo.png</file>
- </qresource>
+<RCC>
+ <qresource prefix="/">
+ <file>images/qt-logo.png</file>
+ <file>images/qt-quick.png</file>
+ <file>images/qt-creator.png</file>
+ <file>images/qt-project.png</file>
+ </qresource>
</RCC>
diff --git a/examples/sql/drilldown/imageitem.cpp b/examples/sql/drilldown/imageitem.cpp
index 8ebd7fd890..f1e3872e1c 100644
--- a/examples/sql/drilldown/imageitem.cpp
+++ b/examples/sql/drilldown/imageitem.cpp
@@ -100,7 +100,7 @@ void ImageItem::setFrame(int frame)
void ImageItem::adjust()
{
QMatrix matrix;
- matrix.scale(150/ boundingRect().width(), 120/ boundingRect().height());
+ matrix.scale(120/ boundingRect().width(), 120/ boundingRect().height());
setMatrix(matrix);
}
//! [4]
diff --git a/examples/sql/drilldown/images/beijing.png b/examples/sql/drilldown/images/beijing.png
deleted file mode 100644
index 45df148506..0000000000
--- a/examples/sql/drilldown/images/beijing.png
+++ /dev/null
Binary files differ
diff --git a/examples/sql/drilldown/images/berlin.png b/examples/sql/drilldown/images/berlin.png
deleted file mode 100644
index ead62f0421..0000000000
--- a/examples/sql/drilldown/images/berlin.png
+++ /dev/null
Binary files differ
diff --git a/examples/sql/drilldown/images/brisbane.png b/examples/sql/drilldown/images/brisbane.png
deleted file mode 100644
index 04fff57f9c..0000000000
--- a/examples/sql/drilldown/images/brisbane.png
+++ /dev/null
Binary files differ
diff --git a/examples/sql/drilldown/images/munich.png b/examples/sql/drilldown/images/munich.png
deleted file mode 100644
index 741eb77b8d..0000000000
--- a/examples/sql/drilldown/images/munich.png
+++ /dev/null
Binary files differ
diff --git a/examples/sql/drilldown/images/oslo.png b/examples/sql/drilldown/images/oslo.png
deleted file mode 100644
index 02fa25e5a0..0000000000
--- a/examples/sql/drilldown/images/oslo.png
+++ /dev/null
Binary files differ
diff --git a/examples/sql/drilldown/images/qt-creator.png b/examples/sql/drilldown/images/qt-creator.png
new file mode 100644
index 0000000000..fa0f6ed7ce
--- /dev/null
+++ b/examples/sql/drilldown/images/qt-creator.png
Binary files differ
diff --git a/examples/sql/drilldown/images/qt-logo.png b/examples/sql/drilldown/images/qt-logo.png
new file mode 100644
index 0000000000..53bc39c38c
--- /dev/null
+++ b/examples/sql/drilldown/images/qt-logo.png
Binary files differ
diff --git a/examples/sql/drilldown/images/qt-project.png b/examples/sql/drilldown/images/qt-project.png
new file mode 100644
index 0000000000..c34d3f099d
--- /dev/null
+++ b/examples/sql/drilldown/images/qt-project.png
Binary files differ
diff --git a/examples/sql/drilldown/images/qt-quick.png b/examples/sql/drilldown/images/qt-quick.png
new file mode 100644
index 0000000000..f66127e8e7
--- /dev/null
+++ b/examples/sql/drilldown/images/qt-quick.png
Binary files differ
diff --git a/examples/sql/drilldown/images/redwood.png b/examples/sql/drilldown/images/redwood.png
deleted file mode 100644
index f39ac06578..0000000000
--- a/examples/sql/drilldown/images/redwood.png
+++ /dev/null
Binary files differ
diff --git a/examples/sql/drilldown/informationwindow.cpp b/examples/sql/drilldown/informationwindow.cpp
index 08c125e58a..d3930c6f0b 100644
--- a/examples/sql/drilldown/informationwindow.cpp
+++ b/examples/sql/drilldown/informationwindow.cpp
@@ -41,38 +41,35 @@
#include "informationwindow.h"
//! [0]
-InformationWindow::InformationWindow(int id, QSqlRelationalTableModel *offices,
+InformationWindow::InformationWindow(int id, QSqlRelationalTableModel *items,
QWidget *parent)
: QDialog(parent)
{
//! [0] //! [1]
- QLabel *locationLabel = new QLabel(tr("Location: "));
- QLabel *countryLabel = new QLabel(tr("Country: "));
+ QLabel *itemLabel = new QLabel(tr("Item: "));
QLabel *descriptionLabel = new QLabel(tr("Description: "));
QLabel *imageFileLabel = new QLabel(tr("Image file: "));
createButtons();
- locationText = new QLabel;
- countryText = new QLabel;
+ itemText = new QLabel;
descriptionEditor = new QTextEdit;
//! [1]
//! [2]
imageFileEditor = new QComboBox;
- imageFileEditor->setModel(offices->relationModel(1));
- imageFileEditor->setModelColumn(offices->relationModel(1)->fieldIndex("file"));
+ imageFileEditor->setModel(items->relationModel(1));
+ imageFileEditor->setModelColumn(items->relationModel(1)->fieldIndex("file"));
//! [2]
//! [3]
mapper = new QDataWidgetMapper(this);
- mapper->setModel(offices);
+ mapper->setModel(items);
mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
mapper->setItemDelegate(new QSqlRelationalDelegate(mapper));
mapper->addMapping(imageFileEditor, 1);
- mapper->addMapping(locationText, 2, "text");
- mapper->addMapping(countryText, 3, "text");
- mapper->addMapping(descriptionEditor, 4);
+ mapper->addMapping(itemText, 2, "text");
+ mapper->addMapping(descriptionEditor, 3);
mapper->setCurrentIndex(id);
//! [3]
@@ -83,8 +80,7 @@ InformationWindow::InformationWindow(int id, QSqlRelationalTableModel *offices,
this, SLOT(enableButtons()));
QFormLayout *formLayout = new QFormLayout;
- formLayout->addRow(locationLabel, locationText);
- formLayout->addRow(countryLabel, countryText);
+ formLayout->addRow(itemLabel, itemText);
formLayout->addRow(imageFileLabel, imageFileEditor);
formLayout->addRow(descriptionLabel, descriptionEditor);
@@ -93,23 +89,19 @@ InformationWindow::InformationWindow(int id, QSqlRelationalTableModel *offices,
layout->addWidget(buttonBox);
setLayout(layout);
- locationId = id;
+ itemId = id;
displayedImage = imageFileEditor->currentText();
- // Commented the following line. Now the window will look like dialog and the Qt will place the QDialogBox buttons to menu area in Symbian.
- // Too bad that the revert button is missing, Should the Qt place the buttons under Option menu in the menu area?!
- // If the Qt::Window flag was used, the background of window is white in symbian and the QLabels can't be regognized from the background.
-
- //setWindowFlags(Qt::Window);
+ setWindowFlags(Qt::Window);
enableButtons(false);
- setWindowTitle(tr("Office: %1").arg(locationText->text()));
+ setWindowTitle(itemText->text());
}
//! [4]
//! [5]
int InformationWindow::id()
{
- return locationId;
+ return itemId;
}
//! [5]
@@ -128,11 +120,11 @@ void InformationWindow::submit()
if (displayedImage != newImage) {
displayedImage = newImage;
- emit imageChanged(locationId, newImage);
+ emit imageChanged(itemId, newImage);
}
mapper->submit();
- mapper->setCurrentIndex(locationId);
+ mapper->setCurrentIndex(itemId);
enableButtons(false);
}
diff --git a/examples/sql/drilldown/informationwindow.h b/examples/sql/drilldown/informationwindow.h
index e1bb9bc958..f039e120ca 100644
--- a/examples/sql/drilldown/informationwindow.h
+++ b/examples/sql/drilldown/informationwindow.h
@@ -50,7 +50,7 @@ class InformationWindow : public QDialog
Q_OBJECT
public:
- InformationWindow(int id, QSqlRelationalTableModel *offices,
+ InformationWindow(int id, QSqlRelationalTableModel *items,
QWidget *parent = 0);
int id();
@@ -70,12 +70,11 @@ private slots:
private:
void createButtons();
- int locationId;
+ int itemId;
QString displayedImage;
QComboBox *imageFileEditor;
- QLabel *locationText;
- QLabel *countryText;
+ QLabel *itemText;
QTextEdit *descriptionEditor;
QPushButton *closeButton;
diff --git a/examples/sql/drilldown/logo.png b/examples/sql/drilldown/logo.png
deleted file mode 100644
index 4b1d235488..0000000000
--- a/examples/sql/drilldown/logo.png
+++ /dev/null
Binary files differ
diff --git a/examples/sql/drilldown/main.cpp b/examples/sql/drilldown/main.cpp
index 2ee32e446f..956cca9ef9 100644
--- a/examples/sql/drilldown/main.cpp
+++ b/examples/sql/drilldown/main.cpp
@@ -52,7 +52,7 @@ int main(int argc, char *argv[])
if (!createConnection())
return 1;
- View view("offices", "images");
+ View view("items", "images");
view.show();
#ifdef QT_KEYPAD_NAVIGATION
QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
diff --git a/examples/sql/drilldown/view.cpp b/examples/sql/drilldown/view.cpp
index d80a800e62..a64252cbd2 100644
--- a/examples/sql/drilldown/view.cpp
+++ b/examples/sql/drilldown/view.cpp
@@ -43,61 +43,62 @@
#include "view.h"
//! [0]
-View::View(const QString &offices, const QString &images, QWidget *parent)
+View::View(const QString &items, const QString &images, QWidget *parent)
: QGraphicsView(parent)
{
- officeTable = new QSqlRelationalTableModel(this);
- officeTable->setTable(offices);
- officeTable->setRelation(1, QSqlRelation(images, "locationid", "file"));
- officeTable->select();
+ itemTable = new QSqlRelationalTableModel(this);
+ itemTable->setTable(items);
+ itemTable->setRelation(1, QSqlRelation(images, "itemid", "file"));
+ itemTable->select();
//! [0]
//! [1]
scene = new QGraphicsScene(this);
- scene->setSceneRect(0, 0, 465, 615);
+ scene->setSceneRect(0, 0, 465, 365);
setScene(scene);
addItems();
- QGraphicsPixmapItem *logo = scene->addPixmap(QPixmap(":/logo.png"));
- logo->setPos(30, 515);
+ setMinimumSize(470, 370);
+ setMaximumSize(470, 370);
- setMinimumSize(470, 620);
- setMaximumSize(470, 620);
-
- setWindowTitle(tr("Offices World Wide"));
+ QLinearGradient gradient(QPointF(0, 0), QPointF(0, 370));
+ gradient.setColorAt(0, QColor("#868482"));
+ gradient.setColorAt(1, QColor("#5d5b59"));
+ setBackgroundBrush(gradient);
}
//! [1]
//! [3]
void View::addItems()
{
- int officeCount = officeTable->rowCount();
+ int itemCount = itemTable->rowCount();
int imageOffset = 150;
int leftMargin = 70;
int topMargin = 40;
- for (int i = 0; i < officeCount; i++) {
+ for (int i = 0; i < itemCount; i++) {
ImageItem *image;
QGraphicsTextItem *label;
- QSqlRecord record = officeTable->record(i);
+ QSqlRecord record = itemTable->record(i);
int id = record.value("id").toInt();
QString file = record.value("file").toString();
- QString location = record.value("location").toString();
+ QString item = record.value("itemtype").toString();
- int columnOffset = ((i / 3) * 37);
- int x = ((i / 3) * imageOffset) + leftMargin + columnOffset;
- int y = ((i % 3) * imageOffset) + topMargin;
+ int columnOffset = ((i % 2) * 37);
+ int x = ((i % 2) * imageOffset) + leftMargin + columnOffset;
+ int y = ((i / 2) * imageOffset) + topMargin;
image = new ImageItem(id, QPixmap(":/" + file));
image->setData(0, i);
image->setPos(x, y);
scene->addItem(image);
- label = scene->addText(location);
- QPointF labelOffset((150 - label->boundingRect().width()) / 2, 120.0);
+ label = scene->addText(item);
+ label->setDefaultTextColor(QColor("#d7d6d5"));
+ QPointF labelOffset((120 - label->boundingRect().width()) / 2, 120.0);
label->setPos(QPointF(x, y) + labelOffset);
}
}
@@ -118,7 +119,7 @@ void View::mouseReleaseEvent(QMouseEvent *event)
void View::showInformation(ImageItem *image)
{
int id = image->id();
- if (id < 0 || id >= officeTable->rowCount())
+ if (id < 0 || id >= itemTable->rowCount())
return;
InformationWindow *window = findWindow(id);
@@ -129,7 +130,7 @@ void View::showInformation(ImageItem *image)
window->show();
} else {
InformationWindow *window;
- window = new InformationWindow(id, officeTable, this);
+ window = new InformationWindow(id, itemTable, this);
connect(window, SIGNAL(imageChanged(int,QString)),
this, SLOT(updateImage(int,QString)));
diff --git a/examples/sql/drilldown/view.h b/examples/sql/drilldown/view.h
index 21193b1960..c9fc040bb1 100644
--- a/examples/sql/drilldown/view.h
+++ b/examples/sql/drilldown/view.h
@@ -53,7 +53,7 @@ class View : public QGraphicsView
Q_OBJECT
public:
- View(const QString &offices, const QString &images, QWidget *parent = 0);
+ View(const QString &items, const QString &images, QWidget *parent = 0);
protected:
void mouseReleaseEvent(QMouseEvent *event);
@@ -73,7 +73,7 @@ private:
QGraphicsScene *scene;
QList<InformationWindow *> informationWindows;
//! [2] //! [3]
- QSqlRelationalTableModel *officeTable;
+ QSqlRelationalTableModel *itemTable;
};
//! [3]
diff --git a/examples/tools/doc/src/customtype.qdoc b/examples/tools/doc/src/customtype.qdoc
index 56172a4e26..6e6d08fb35 100644
--- a/examples/tools/doc/src/customtype.qdoc
+++ b/examples/tools/doc/src/customtype.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \example tools/customtype
+ \example customtype
\title Custom Type Example
\brief The Custom Type example shows how to integrate a custom type into Qt's
diff --git a/examples/widgets/doc/images/orientation-landscape-ui.png b/examples/widgets/doc/images/orientation-landscape-ui.png
deleted file mode 100644
index c591ff14d2..0000000000
--- a/examples/widgets/doc/images/orientation-landscape-ui.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/doc/images/orientation-landscape.png b/examples/widgets/doc/images/orientation-landscape.png
deleted file mode 100644
index e606804d21..0000000000
--- a/examples/widgets/doc/images/orientation-landscape.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/doc/images/orientation-portrait-ui.png b/examples/widgets/doc/images/orientation-portrait-ui.png
deleted file mode 100644
index 304835b93e..0000000000
--- a/examples/widgets/doc/images/orientation-portrait-ui.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/doc/images/orientation-portrait.png b/examples/widgets/doc/images/orientation-portrait.png
deleted file mode 100644
index 3d778e8d90..0000000000
--- a/examples/widgets/doc/images/orientation-portrait.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/doc/orientation.qdoc b/examples/widgets/doc/orientation.qdoc
deleted file mode 100644
index df84595885..0000000000
--- a/examples/widgets/doc/orientation.qdoc
+++ /dev/null
@@ -1,142 +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 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*! \example widgets/orientation
- \title Orientation Example
-
- \brief The example shows a simple way to use different UIs depending on the screen
- orientation of a mobile device.
-
- \image orientation-landscape.png The UI in landscape mode
- \image orientation-portrait.png The UI in portrait mode
-
- The screen on many mobile devices can be viewed in both portrait and
- landscape orientation. The orientation can be swiched with the help of a
- hardware or software trigger. Due to the often small physical screen size,
- user interfaces has to be very simple and compact to stay usable, and
- applications usually occupy the whole screen. Designing a user interface
- that works equally well in both landscape and portrait mode is not always
- possible, however, so making a different layout for each case usually pays
- off.
-
- The example application makes use of two different UI widgets created with
- the Qt Designer, one for portrait and one for landscape orientation. The
- application has a widget that contains an image and the user is able to
- select one of three images for it to show. In addition to the two UIs, the
- application consists of a \c MainWindow class.
-
- \section1 Landscape UI
-
- If the screen is in landscape mode, the user probably holds the device with
- both hands and is ready to give full attention to the application. The
- landscape UI looks like this:
-
- \image orientation-landscape-ui.png The landscape UI
-
- To the left is a QWidget called \c choiceWidget, which will show the
- current image, and to the right are three QRadioButton instances. The
- active radio button specifies the image to show.
-
- \section1 Portrait UI
-
- When the device is in portrait mode, it usually means that the user holds
- it with one hand, and can comfortably use the thumb for small amounts of
- input. The layout is simpler, and is focused on consuming content. The
- portrait UI looks like this:
-
- \image orientation-portrait-ui.png The portrait UI
-
- Similarly, it contains a QWidget, also called \c choiceWidget, that will
- show the current image. In contrast to the landscape UI, this one doesn't
- provide any controls to change the image.
-
- \section1 MainWindow Class Definition
-
- \c MainWindow inherits from QWidget and acts as the top level widget of the
- application.
-
- \snippet widgets/orientation/mainwindow.h 0
-
- The \c resizeEvent() method is re-implemented, and used to check which
- UI to show. The \c onRadioButtonClicked() slot is connected to the
- landscape UI's radio button group and selects the current image.
-
- \c landscapeWidget and \c portraitWidget will contain the UI layouts. Only
- one of them is visible at a time.
-
- \section1 MainWindow Class Implementation
-
- In the constructor, the widgets that will hold the UIs are created and set
- up.
-
- \snippet widgets/orientation/mainwindow.cpp 0
-
- Since the exit buttons on the layouts are different from each other, both
- of them have to have their \c clicked() signal connected to the \c close()
- slot of the main widget. The first image is also made current with the call
- to \c onRadioButtonClicked().
-
- \snippet widgets/orientation/mainwindow.cpp 1
-
- On the Maemo platform, windows are stuck in landscape mode by default. The
- application has to explicitly say that rotation is supported.
-
- \snippet widgets/orientation/mainwindow.cpp 2
-
- The \c resizeEvent() is called when the main window is first created, and
- also whenever the window has been resized. If the window is shown in
- full screen, this is an indication that the orientation of the screen has
- changed.
-
- The dimensions of \c landscapeWidget is the transpose of the dimensions of
- \c portraitWidget. When the orientation is known, both are set to the
- (possibly transposed) size of the window. Depending on the orientation, one
- widget is made visible and the other invisible.
-
- \snippet widgets/orientation/mainwindow.cpp 3
-
- When the user selects one of the radio buttons in the landscape UI, the
- current image is changed. The image is displayed by specifying the
- background style of the choice widget. Since both \c portrait and
- \c landscape have a \c choiceWidget of their own, the change has to be
- reflected in both instances.
-
- \snippet widgets/orientation/mainwindow.cpp 4
-
- Synchronizing both UIs like this might become unfeasible when there are
- many things that can change. In that case it is better to make use of the
- \l{Introduction to Model/View Programming}{Model-View-Controller pattern}
- more extensively and share the content between both portrait and landscape
- widgets. Then an interface for displaying and manipulating it can be tailor
- made for both orientations.
-
- \section1 The \c main() Function
-
- The main function creates a \c MainWindow instance and shows it full
- screen.
- \snippet widgets/orientation/main.cpp 0
-*/
diff --git a/examples/widgets/doc/src/applicationicon.qdoc b/examples/widgets/doc/src/applicationicon.qdoc
deleted file mode 100644
index 8f9e133e9c..0000000000
--- a/examples/widgets/doc/src/applicationicon.qdoc
+++ /dev/null
@@ -1,52 +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 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*! \example widgets/applicationicon
- \title Application Icon Example
-
- \brief The example shows how to add an application icon to a mobile application.
-
- \image appicon_screenshot.png The icon on a Nokia XPressMusic 5800
-
- \section1 Adding the icons to the project
-
- For Maemo, we need to add that the \c .desktop and icon file should be
- installed.
-
- \quotefile widgets/applicationicon/applicationicon.pro
-
- Currently, Qt Creator doesn't include the icon and desktop files in the
- application package for Maemo, merely the executable file is included. As a
- workaround for this, the files can be added manually in the Projects tab.
- In the "Create Package" build step for the Maemo target, the \c .desktop
- file and icon can be added to be a part of the package contents.
- Unfortunately, these additions are only stored as a part of the
- \c .pro.user file. This issue will be resolved in a future release of
- Qt Creator.
-
- \image appicon_packagecontents.png Manual addition of files to the "Create Package" build step
-*/
diff --git a/examples/widgets/widgets/applicationicon/applicationicon.png b/examples/widgets/widgets/applicationicon/applicationicon.png
deleted file mode 100644
index 83a186ee56..0000000000
--- a/examples/widgets/widgets/applicationicon/applicationicon.png
+++ /dev/null
Binary files 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 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="44" height="44" baseProfile="tiny" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 44 44">
- <defs>
- <linearGradient id="linearGradient2824" y2="1051.4" gradientUnits="userSpaceOnUse" x2="30.217" y1="1009.4" x1="15.109">
- <stop stop-color="#41a200" offset="0"/>
- <stop stop-color="#9be948" offset="0.63897"/>
- <stop stop-color="#beff61" offset="1"/>
- </linearGradient>
- <linearGradient id="linearGradient2848" y2="1009.4" gradientUnits="userSpaceOnUse" y1="1053.7" gradientTransform="matrix(0.85714286,0,0,0.85714286,2.1428572,146.19467)" x2="15.085" x1="31.027">
- <stop stop-color="#41a200" offset="0"/>
- <stop stop-color="#9be948" offset="0.88602"/>
- <stop stop-color="#beff61" offset="1"/>
- </linearGradient>
- </defs>
- <g id="layer1" transform="translate(0,-1008.3622)">
- <path id="rect2816" d="m8.412,1009h27.18c4.106,0,7.412,3.306,7.412,7.412v27.18c0,4.106-3.306,7.412-7.412,7.412h-27.18c-4.106,0-7.412-3-7.412-7v-27.18c0-4.106,3.306-7.412,7.412-7.412z" stroke-linecap="round" stroke-miterlimit="4" stroke-width="0.64300001" fill="url(#linearGradient2824)"/>
- <path id="rect2816-4" d="m9.353,1011h25.29c3.52,0,6.353,2.833,6.353,6.353v25.29c0,3.519-2.833,6.353-6.353,6.353h-25.29c-3.52-0.1-6.353-2.1-6.353-6.1v-25.29c0-3.519,2.833-6.353,6.353-6.353z" stroke-linecap="round" stroke-miterlimit="4" stroke-width="0.64300001" fill="url(#linearGradient2848)"/>
- <g id="text2893" font-weight="normal" transform="translate(-1.100281,1010.3622)" font-style="normal" font-stretch="normal" font-size="48px" font-variant="normal" font-family="Cambria Math" fill="#e5ffd5">
- <path id="path2908" fill="#e5ffd5" d="m11.92,35.44c1.359-1.719,2.672-3.828,3.938-6.328l7.522-14.742c-0.8-3.13-1.54-5.321-2.24-6.586-0.69-1.266-1.76-1.899-3.2-1.899-1.328,0.0000307-2.594,0.6563-3.797,1.969l-1.148-1.266c2.156-2.359,4.289-3.539,6.398-3.539,1.469,0.0000335,2.609,0.418,3.422,1.254,0.8125,0.836,1.492,2.168,2.039,3.996,0.5469,1.828,1.32,5.359,2.32,10.59,1.297,6.828,2.309,11.14,3.035,12.93,0.7265,1.789,1.59,2.684,2.59,2.684,0.7187,0.000002,1.383-0.25,1.992-0.75l0.8906,1.406c-1.547,1.203-2.938,1.805-4.172,1.805-1.75,0-3-0.8984-3.75-2.695-0.75-1.797-1.797-6.633-3.141-14.51h-0.1406c-2.658,5.391-5.258,11.001-7.798,16.831h-4.758z"/>
- </g>
- </g>
-</svg> \ 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 <QtWidgets/QApplication>
-#include <QtWidgets/QLabel>
-
-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
--- a/examples/widgets/widgets/orientation/image_a.png
+++ /dev/null
Binary files 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
--- a/examples/widgets/widgets/orientation/image_b.png
+++ /dev/null
Binary files 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
--- a/examples/widgets/widgets/orientation/image_c.png
+++ /dev/null
Binary files 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 @@
-<RCC>
- <qresource prefix="/">
- <file>image_a.png</file>
- <file>image_b.png</file>
- <file>image_c.png</file>
- </qresource>
-</RCC>
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 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>LandscapeUI</class>
- <widget class="QWidget" name="LandscapeUI">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>514</width>
- <height>265</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0" colspan="2">
- <widget class="QLabel" name="label">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="styleSheet">
- <string notr="true">font-weight: bold;</string>
- </property>
- <property name="text">
- <string>Landscape mode</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QPushButton" name="exitButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Exit</string>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QGroupBox" name="groupBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title">
- <string>Choices</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QRadioButton" name="radioAButton">
- <property name="text">
- <string>Long description explaining choice A</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- <attribute name="buttonGroup">
- <string>buttonGroup</string>
- </attribute>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="radioBButton">
- <property name="text">
- <string>Long description explaining choice B</string>
- </property>
- <attribute name="buttonGroup">
- <string>buttonGroup</string>
- </attribute>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="radioCButton">
- <property name="text">
- <string>Long description explaining choice C</string>
- </property>
- <attribute name="buttonGroup">
- <string>buttonGroup</string>
- </attribute>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="1" column="0" colspan="2">
- <widget class="QWidget" name="choiceWidget" native="true">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
- <buttongroups>
- <buttongroup name="buttonGroup"/>
- </buttongroups>
-</ui>
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 <QtWidgets/QApplication>
-#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 <QDesktopWidget>
-#include <QResizeEvent>
-
-//! [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 <QWidget>
-
-#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 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>PortraitUI</class>
- <widget class="QWidget" name="PortraitUI">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>201</width>
- <height>300</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="styleSheet">
- <string notr="true">font-weight: bold;</string>
- </property>
- <property name="text">
- <string>Portrait mode</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QPushButton" name="exitButton">
- <property name="text">
- <string>Exit</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="helpLabel">
- <property name="text">
- <string>Switch to landscape mode. In landscape mode you can change visible image.</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QWidget" name="choiceWidget" native="true">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
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 \
diff --git a/examples/xml/doc/src/qxmlstreambookmarks.qdoc b/examples/xml/doc/src/qxmlstreambookmarks.qdoc
index fa1541608d..123058b02d 100644
--- a/examples/xml/doc/src/qxmlstreambookmarks.qdoc
+++ b/examples/xml/doc/src/qxmlstreambookmarks.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \example xml/streambookmarks
+ \example streambookmarks
\title QXmlStream Bookmarks Example
\brief Demonstrates how to read and write to XBEL files
\ingroup xml-examples