diff --git a/examples/gallery/contents/ui/gallery/CheckBoxGallery.qml b/examples/gallery/contents/ui/gallery/CheckBoxGallery.qml index 8ac50c6c..8cbd65a7 100644 --- a/examples/gallery/contents/ui/gallery/CheckBoxGallery.qml +++ b/examples/gallery/contents/ui/gallery/CheckBoxGallery.qml @@ -1,110 +1,110 @@ /* * Copyright 2015 Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 import QtQuick.Controls 1.2 as Controls import QtQuick.Layouts 1.2 import org.kde.kirigami 1.0 ScrollablePage { id: page actions { main: Action { iconName: sheet.opened ? "dialog-cancel" : "document-edit" text: "Main Action Text" checked: sheet.opened checkable: true onCheckedChanged: sheet.opened = checked; } contextualActions: [ Controls.Action { text:"Action 1" onTriggered: showPassiveNotification("Action 1 clicked") }, Controls.Action { text:"Action 2" onTriggered: showPassiveNotification("Action 2 clicked") } ] } Layout.fillWidth: true title: "Checkboxes" OverlaySheet { id: sheet Label { property int implicitWidth: Units.gridUnit * 45 wrapMode: Text.WordWrap text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id risus id augue euismod accumsan. Nunc vestibulum placerat bibendum. Morbi commodo auctor varius. Donec molestie euismod ultrices. Sed facilisis augue nec eros auctor, vitae mattis quam rhoncus. Nam ut erat diam. Curabitur iaculis accumsan magna, eget fermentum massa scelerisque eu. Cras elementum erat non erat euismod accumsan. Vestibulum ac mi sed dui finibus pulvinar. Vivamus dictum, leo sed lobortis porttitor, nisl magna faucibus orci, sit amet euismod arcu elit eget est. Duis et vehicula nibh. In arcu sapien, laoreet sit amet porttitor non, rhoncus vel magna. Suspendisse imperdiet consectetur est nec ornare. Pellentesque bibendum sapien at erat efficitur vehicula. Morbi sed porta nibh. Vestibulum ut urna ut dolor sagittis mattis." } } ColumnLayout { //This OverlaySheet is put in the "wrong place", but will be automatically reparented // to "page" Item { Layout.fillWidth: true - Layout.minimumHeight: units.gridUnit * 10 + Layout.minimumHeight: Units.gridUnit * 10 GridLayout { anchors.centerIn: parent columns: 3 rows: 3 rowSpacing: Units.smallSpacing Item { width: 1 height: 1 } Label { text: "Normal" } Label { text: "Disabled" enabled: false } Label { text: "On" } Controls.CheckBox { text: "On" checked: true } Controls.CheckBox { text: "On" checked: true enabled: false } Label { text: "Off" } Controls.CheckBox { text: "Off" checked: false } Controls.CheckBox { text: "Off" checked: false enabled: false } } } } } diff --git a/examples/gallery/contents/ui/gallery/ProgressBarGallery.qml b/examples/gallery/contents/ui/gallery/ProgressBarGallery.qml index 3b769998..5d0614db 100644 --- a/examples/gallery/contents/ui/gallery/ProgressBarGallery.qml +++ b/examples/gallery/contents/ui/gallery/ProgressBarGallery.qml @@ -1,131 +1,131 @@ /* * Copyright 2015 Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 import QtQuick.Controls 1.2 as Controls import QtQuick.Layouts 1.2 import org.kde.kirigami 1.0 ScrollablePage { id: page Layout.fillWidth: true title: "Progress Indicators" actions { main: Action { iconName: "document-edit" text: "Main Action Text" onTriggered: { showPassiveNotification("Main action triggered"); } } right: Action { iconName: "folder-sync" text: "Right Action Text" onTriggered: { showPassiveNotification("Right action triggered") } } } ColumnLayout { width: page.width Timer { id: timer property int value: 0 interval: 80 repeat: true running: true onTriggered: { value = (value + 1) % 100 } } GridLayout { anchors.centerIn: parent rowSpacing: Units.largeSpacing columns: 2 - width: parent.width - units.gridUnit*2 + width: parent.width - Units.gridUnit*2 Label { text: "Determinate:" Layout.alignment: Qt.AlignRight } Controls.ProgressBar { minimumValue: 0 maximumValue: 100 value: timer.value - Layout.maximumWidth: units.gridUnit * 10 + Layout.maximumWidth: Units.gridUnit * 10 } Label { text: "Indeterminate:" Layout.alignment: Qt.AlignRight } Controls.ProgressBar { minimumValue: 0 maximumValue: 100 indeterminate: true - Layout.maximumWidth: units.gridUnit * 10 + Layout.maximumWidth: Units.gridUnit * 10 } Label { text: "Busy indicator:" Layout.alignment: Qt.AlignRight } Controls.BusyIndicator { } Label { text: "Inactive indicator:" Layout.alignment: Qt.AlignRight } Controls.BusyIndicator { running: false } Label { text: "Custom size:" Layout.alignment: Qt.AlignRight } Controls.BusyIndicator { Layout.minimumWidth: Units.iconSizes.enormous Layout.minimumHeight: width } Label { text: "Vertical:" Layout.alignment: Qt.AlignRight } RowLayout { Controls.ProgressBar { Layout.minimumWidth: Units.gridUnit * 2 Layout.maximumHeight: Units.gridUnit * 8 minimumValue: 0 maximumValue: 100 value: timer.value orientation: Qt.Vertical } Controls.ProgressBar { Layout.minimumWidth: Units.gridUnit * 2 Layout.maximumHeight: Units.gridUnit * 8 indeterminate: true orientation: Qt.Vertical } } } } } diff --git a/examples/gallery/contents/ui/gallery/RadioButtonGallery.qml b/examples/gallery/contents/ui/gallery/RadioButtonGallery.qml index c44e903a..6ae90e09 100644 --- a/examples/gallery/contents/ui/gallery/RadioButtonGallery.qml +++ b/examples/gallery/contents/ui/gallery/RadioButtonGallery.qml @@ -1,108 +1,108 @@ /* * Copyright 2015 Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 import QtQuick.Controls 1.2 as Controls import QtQuick.Layouts 1.2 import org.kde.kirigami 1.0 ScrollablePage { id: page Layout.fillWidth: true title: "Radio buttons" actions { main: Action { iconName: "document-edit" text: "Main Action Text" onTriggered: { showPassiveNotification("Action button in buttons page clicked"); } } left: Action { iconName: "folder-sync" text: "Left Action Text" onTriggered: { showPassiveNotification("Left action triggered") } } } ColumnLayout { width: page.width Controls.ExclusiveGroup { id: radioGroup } Controls.ExclusiveGroup { id: radioGroup2 } Item { Layout.fillWidth: true - Layout.minimumHeight: units.gridUnit * 10 + Layout.minimumHeight: Units.gridUnit * 10 GridLayout { anchors.centerIn: parent columns: 3 rows: 3 rowSpacing: Units.smallSpacing Item { width: 1 height: 1 } Label { text: "Normal" } Label { text: "Disabled" enabled: false } Label { text: "On" } Controls.RadioButton { text: "On" checked: true exclusiveGroup: radioGroup } Controls.RadioButton { text: "On" checked: true enabled: false exclusiveGroup: radioGroup2 } Label { text: "Off" } Controls.RadioButton { text: "Off" checked: false exclusiveGroup: radioGroup } Controls.RadioButton { text: "Off" checked: false enabled: false exclusiveGroup: radioGroup2 } } } } } diff --git a/examples/gallery/contents/ui/gallery/SwitchGallery.qml b/examples/gallery/contents/ui/gallery/SwitchGallery.qml index f44b32d1..be2da6f7 100644 --- a/examples/gallery/contents/ui/gallery/SwitchGallery.qml +++ b/examples/gallery/contents/ui/gallery/SwitchGallery.qml @@ -1,76 +1,76 @@ /* * Copyright 2015 Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 import QtQuick.Controls 1.2 as Controls import QtQuick.Layouts 1.2 import org.kde.kirigami 1.0 ScrollablePage { id: page Layout.fillWidth: true title: "Switches" ColumnLayout { width: page.width Item { Layout.fillWidth: true - Layout.minimumHeight: units.gridUnit * 10 + Layout.minimumHeight: Units.gridUnit * 10 GridLayout { anchors.centerIn: parent columns: 3 rows: 3 rowSpacing: Units.smallSpacing Item { width: 1 height: 1 } Label { text: "Normal" } Label { text: "Disabled" enabled: false } Label { text: "On" } Controls.Switch { checked: true } Controls.Switch { checked: true enabled: false } Label { text: "Off" } Controls.Switch { checked: false } Controls.Switch { checked: false enabled: false } } } } }