diff options
author | Mitch Curtis <mitch.curtis@theqtcompany.com> | 2016-03-30 16:34:15 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@theqtcompany.com> | 2016-04-01 12:23:03 +0000 |
commit | 335b1fff26ef0c13e1cd1fe697c70d7b8f1a8139 (patch) | |
tree | 3f890be1b88ff1ca4383a3fcd6472cf985d61df0 /src | |
parent | cb3b2d7dab2f99a559c8dd6d89d43bb81978805d (diff) |
Improve documentation for delegate controls
- Add "Delegate Controls" doc page. This will list future delegate
controls, such as CheckDelegate, RadioDelegate and SwitchDelegate.
- Add GIF for ItemDelegate.
Change-Id: If8c66ab2178185f96d190f29ef7815beaa6e8d68
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/controls/doc/images/qtquickcontrols-itemdelegate.gif | bin | 0 -> 12468 bytes | |||
-rw-r--r-- | src/imports/controls/doc/src/qtquickcontrols2-delegates.qdoc | 48 | ||||
-rw-r--r-- | src/templates/qquickitemdelegate.cpp | 4 |
3 files changed, 51 insertions, 1 deletions
diff --git a/src/imports/controls/doc/images/qtquickcontrols-itemdelegate.gif b/src/imports/controls/doc/images/qtquickcontrols-itemdelegate.gif Binary files differnew file mode 100644 index 00000000..7f8a2af8 --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols-itemdelegate.gif diff --git a/src/imports/controls/doc/src/qtquickcontrols2-delegates.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-delegates.qdoc new file mode 100644 index 00000000..40c52996 --- /dev/null +++ b/src/imports/controls/doc/src/qtquickcontrols2-delegates.qdoc @@ -0,0 +1,48 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page qtquickcontrols2-delegates.html + \title Delegate Controls + + Qt Quick Controls 2 offers a selection of controls that are used as + delegates in views. + + \annotatedlist qtlabscontrols-delegates + + Each type of delegate has its own specific target use case. The following + sections offer guidelines for choosing the appropriate type of delegate, + depending on the use case. + + \section1 ItemDelegate Control + + \image qtquickcontrols-itemdelegate.gif + + \l ItemDelegate presents a checkable control that can be pressed and + clicked by the user. +*/ + diff --git a/src/templates/qquickitemdelegate.cpp b/src/templates/qquickitemdelegate.cpp index 8ae9b535..32efca9a 100644 --- a/src/templates/qquickitemdelegate.cpp +++ b/src/templates/qquickitemdelegate.cpp @@ -48,6 +48,8 @@ QT_BEGIN_NAMESPACE \inqmlmodule Qt.labs.controls \brief A standard view item that can be used in various views and controls. + \image qtquickcontrols-itemdelegate.gif + ItemDelegate presents a standard view item. It can be used as a delegate in various views and controls, such as \l ListView and \l ComboBox. @@ -59,7 +61,7 @@ QT_BEGIN_NAMESPACE \labs - \sa {Customizing ItemDelegate} + \sa {Customizing ItemDelegate}, {Delegate Controls} */ QQuickItemDelegate::QQuickItemDelegate(QQuickItem *parent) : QQuickAbstractButton(parent) |