summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@digia.com>2014-06-04 18:11:00 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-06-10 15:56:59 +0200
commit857c82f8a4a29399733218f783241b839b939f58 (patch)
tree4adeff4c3cb6d59a002d1ca839933b08619898e8 /examples
parent7da3228abbb77af653b716a3729fac9b20279bfb (diff)
Doc: Updated Layout examples.
-added links to and from the overviews. -added information on how to run the example. -updated copyright. Task-number: QTBUG-33597 Change-Id: Ib049cb94f136caa6916878959ae830248bd236b5 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/widgets/doc/src/basiclayouts.qdoc22
-rw-r--r--examples/widgets/doc/src/borderlayout.qdoc11
-rw-r--r--examples/widgets/doc/src/dynamiclayouts.qdoc12
-rw-r--r--examples/widgets/doc/src/flowlayout.qdoc17
4 files changed, 39 insertions, 23 deletions
diff --git a/examples/widgets/doc/src/basiclayouts.qdoc b/examples/widgets/doc/src/basiclayouts.qdoc
index d219b7bff3..0066317165 100644
--- a/examples/widgets/doc/src/basiclayouts.qdoc
+++ b/examples/widgets/doc/src/basiclayouts.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
@@ -28,31 +28,35 @@
/*!
\example layouts/basiclayouts
\title Basic Layouts Example
+ \brief Shows how to use the standard layout managers.
- \brief The Basic Layouts example shows how to use the standard layout
- managers that are available in Qt: QBoxLayout, QGridLayout and
- QFormLayout.
+ \e{Basic Layouts} shows how to use the standard layout managers that are
+ available in Qt: QBoxLayout, QGridLayout, and QFormLayout.
\image basiclayouts-example.png Screenshot of the Basic Layouts example
The QBoxLayout class lines up widgets horizontally or vertically.
QHBoxLayout and QVBoxLayout are convenience subclasses of QBoxLayout.
QGridLayout lays out widgets in cells by dividing the available space
- into rows and columns. QFormLayout, on the other hand, lays out its
+ into rows and columns. QFormLayout, on the other hand, sets its
children in a two-column form with labels in the left column and
input fields in the right column.
+ For more information, visit the \l{Layout Management} page.
+
+ \include examples-run.qdocinc
+
\section1 Dialog Class Definition
\snippet layouts/basiclayouts/dialog.h 0
The \c Dialog class inherits QDialog. It is a custom widget that
displays its child widgets using the geometry managers:
- QHBoxLayout, QVBoxLayout, QGridLayout and QFormLayout.
+ QHBoxLayout, QVBoxLayout, QGridLayout, and QFormLayout.
- We declare four private functions to simplify the class
- constructor: The \c createMenu(), \c createHorizontalGroupBox(),
- \c createGridGroupBox() and \c createFormGroupBox() functions create
+ There are four private functions to simplify the class
+ constructor: the \c createMenu(), \c createHorizontalGroupBox(),
+ \c createGridGroupBox(), and \c createFormGroupBox() functions create
several widgets that the example uses to demonstrate how the layout
affects their appearances.
diff --git a/examples/widgets/doc/src/borderlayout.qdoc b/examples/widgets/doc/src/borderlayout.qdoc
index 8a2958ee80..03a2bf1672 100644
--- a/examples/widgets/doc/src/borderlayout.qdoc
+++ b/examples/widgets/doc/src/borderlayout.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
@@ -28,9 +28,14 @@
/*!
\example layouts/borderlayout
\title Border Layout Example
+ \brief Shows how to arrange child widgets along a border.
- \brief The Border Layout example shows how to create a custom layout that arranges
- child widgets according to a simple set of rules.
+ \e{Border Layout} implements a layout that arranges child widgets to
+ surround the main area.
\image borderlayout-example.png
+
+ For more information, visit the \l{Layout Management} page.
+
+ \include examples-run.qdocinc
*/
diff --git a/examples/widgets/doc/src/dynamiclayouts.qdoc b/examples/widgets/doc/src/dynamiclayouts.qdoc
index 5590ec61f1..497a0d23fd 100644
--- a/examples/widgets/doc/src/dynamiclayouts.qdoc
+++ b/examples/widgets/doc/src/dynamiclayouts.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
@@ -28,7 +28,13 @@
/*!
\example layouts/dynamiclayouts
\title Dynamic Layouts Example
+ \brief Shows how to re-orient widgets in running applications.
- \brief The Dynamic Layouts example shows how to move widgets around in
- existing layouts.
+ \e{Dynamic Layouts} implements dynamically placed widgets within running
+ applications. The widget placement depends on whether \c Horizontal or \c
+ Vertical is chosen.
+
+ For more information, visit the \l{Layout Management} page.
+
+ \include examples-run.qdocinc
*/
diff --git a/examples/widgets/doc/src/flowlayout.qdoc b/examples/widgets/doc/src/flowlayout.qdoc
index b482edf946..84de22416c 100644
--- a/examples/widgets/doc/src/flowlayout.qdoc
+++ b/examples/widgets/doc/src/flowlayout.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
@@ -28,18 +28,19 @@
/*!
\example layouts/flowlayout
\title Flow Layout Example
+ \brief Shows how to arrange widgets for different window sizes.
- \brief The Flow Layout example demonstrates a custom layout that arranges child
- widgets from left to right and top to bottom in a top-level widget.
+ \e{Flow Layout} implements a layout that handles different window sizes. The
+ widget placement changes depending on the width of the application window.
\image flowlayout-example.png Screenshot of the Flow Layout example
- The items are first laid out horizontally and then vertically when each line
- in the layout runs out of space.
-
The Flowlayout class mainly uses QLayout and QWidgetItem, while the
- Window uses QWidget and QLabel. We will only document the definition
- and implementation of \c FlowLayout below.
+ Window uses QWidget and QLabel.
+
+ For more information, visit the \l{Layout Management} page.
+
+ \include examples-run.qdocinc
\section1 FlowLayout Class Definition