aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/designer
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@theqtcompany.com>2016-03-31 16:58:08 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-04-11 19:26:11 +0000
commitb663020c9a60704dc53014522a3faa23892280a0 (patch)
tree80dd4f47910ce2313491d19167f3dfb94ea9d9e5 /src/imports/controls/designer
parent1acb34a40ea0fbc0c0730cdc81dcfd46bdeb4ef7 (diff)
Add RadioDelegate
RadioDelegate is an item delegate that is used in lists, and can be checked and unchecked. It derives from QQuickItemDelegate and hence has background press effects. The order of the indicator and text is reversed (compared to RadioButton) to reflect what is most commonly seen on mobile. Change-Id: I143ee9a30cd8ce1d624354f4cb981c41dfddc2d2 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/designer')
-rw-r--r--src/imports/controls/designer/RadioDelegateSpecifics.qml56
-rw-r--r--src/imports/controls/designer/designer.pri1
-rw-r--r--src/imports/controls/designer/qtlabscontrols.metainfo15
3 files changed, 72 insertions, 0 deletions
diff --git a/src/imports/controls/designer/RadioDelegateSpecifics.qml b/src/imports/controls/designer/RadioDelegateSpecifics.qml
new file mode 100644
index 00000000..767a03e7
--- /dev/null
+++ b/src/imports/controls/designer/RadioDelegateSpecifics.qml
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** 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 Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later 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 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import HelperWidgets 2.0
+import QtQuick.Layouts 1.0
+
+Column {
+ width: parent.width
+
+ ButtonSection {
+ caption: qsTr("Radio Delegate")
+ width: parent.width
+ }
+
+ ControlSection {
+ width: parent.width
+ }
+
+ PaddingSection {
+ width: parent.width
+ }
+}
diff --git a/src/imports/controls/designer/designer.pri b/src/imports/controls/designer/designer.pri
index 6636e160..b5b14f77 100644
--- a/src/imports/controls/designer/designer.pri
+++ b/src/imports/controls/designer/designer.pri
@@ -20,6 +20,7 @@ QML_FILES += \
$$PWD/PaneSpecifics.qml \
$$PWD/ProgressBarSpecifics.qml \
$$PWD/RadioButtonSpecifics.qml \
+ $$PWD/RadioDelegateSpecifics.qml \
$$PWD/SliderSpecifics.qml \
$$PWD/SpinBoxSpecifics.qml \
$$PWD/SwipeDelegateSpecifics.qml \
diff --git a/src/imports/controls/designer/qtlabscontrols.metainfo b/src/imports/controls/designer/qtlabscontrols.metainfo
index 0006880a..55110b15 100644
--- a/src/imports/controls/designer/qtlabscontrols.metainfo
+++ b/src/imports/controls/designer/qtlabscontrols.metainfo
@@ -208,6 +208,21 @@ MetaInfo {
}
Type {
+ name: "Qt.labs.controls.RadioDelegate"
+ icon: "images/radiobutton-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Radio Delegate"
+ category: "Qt Labs - Controls"
+ libraryIcon: "images/radiobutton-icon.png"
+ version: "1.0"
+ requiredImport: "Qt.labs.controls"
+
+ Property { name: "text"; type: "binding"; value: "qsTr('Radio Delegate')" }
+ }
+ }
+
+ Type {
name: "Qt.labs.controls.Slider"
icon: "images/slider-icon16.png"