diff --git a/applets/analog-clock/contents/ui/configGeneral.qml b/applets/analog-clock/contents/ui/configGeneral.qml index 95163b670..f0222ff2b 100644 --- a/applets/analog-clock/contents/ui/configGeneral.qml +++ b/applets/analog-clock/contents/ui/configGeneral.qml @@ -1,45 +1,46 @@ /* * Copyright 2013 David Edmundson * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. */ import QtQuick 2.0 import QtQuick.Controls 1.0 as QtControls //FIXME this causes a crash in Oxygen style //QtControls.GroupBox { Item { width: childrenRect.width height: childrenRect.height //FIXME enable when we're back to being a group box // flat: true // title: i18n("Appearance") property alias cfg_showSecondHand: showSecondHandCheckBox.checked property alias cfg_showTimezoneString: showTimezoneCheckBox.checked Column { + anchors.left: parent.left QtControls.CheckBox { id: showSecondHandCheckBox text: i18n("Show seconds hand") } QtControls.CheckBox { id: showTimezoneCheckBox text: i18n("Show time zone") } } } diff --git a/applets/calendar/package/contents/ui/configGeneral.qml b/applets/calendar/package/contents/ui/configGeneral.qml index 78efb419f..0bff92140 100644 --- a/applets/calendar/package/contents/ui/configGeneral.qml +++ b/applets/calendar/package/contents/ui/configGeneral.qml @@ -1,70 +1,71 @@ /* * Copyright 2015 Martin Klapetek * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License or (at your option) version 3 or any later version * accepted by the membership of KDE e.V. (or its successor approved * by the membership of KDE e.V.), which shall act as a proxy * defined in Section 14 of version 3 of the license. * * 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see */ import QtQuick 2.0 import QtQuick.Controls 1.0 as QtControls import QtQuick.Layouts 1.0 as QtLayouts Item { id: generalPage width: childrenRect.width height: childrenRect.height property alias cfg_showWeekNumbers: showWeekNumbers.checked property string cfg_compactDisplay QtLayouts.ColumnLayout { + anchors.left: parent.left QtControls.CheckBox { id: showWeekNumbers text: i18n("Show week numbers in Calendar") } QtLayouts.RowLayout { QtControls.Label { text: i18nc("What information is shown in the calendar icon", "Icon:") } QtControls.ComboBox { id: compactDisplayCombo QtLayouts.Layout.minimumWidth: units.gridUnit * 7 // horrible default sizing in ComboBox model: [{ text: i18nc("Show the number of the day (eg. 31) in the icon", "Day in month"), value: "d" }, { text: i18nc("Show the week number (eg. 50) in the icon", "Week number"), value: "w" }] onActivated: { cfg_compactDisplay = compactDisplayCombo.model[index].value } Component.onCompleted: { for (var i = 0, length = model.length; i < length; ++i) { if (model[i].value === cfg_compactDisplay) { currentIndex = i return } } } } } } } diff --git a/applets/devicenotifier/package/contents/ui/configGeneral.qml b/applets/devicenotifier/package/contents/ui/configGeneral.qml index dd60ddbd4..875caa426 100644 --- a/applets/devicenotifier/package/contents/ui/configGeneral.qml +++ b/applets/devicenotifier/package/contents/ui/configGeneral.qml @@ -1,65 +1,66 @@ /* * Copyright 2013 Bhushan Shah * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. */ import QtQuick 2.0 import QtQuick.Controls 1.1 as Controls import QtQuick.Layouts 1.1 as Layouts import org.kde.plasma.core 2.0 as PlasmaCore Item { id: iconsPage width: childrenRect.width height: childrenRect.height implicitWidth: mainColumn.implicitWidth implicitHeight: mainColumn.implicitHeight property alias cfg_removableDevices: removableOnly.checked property alias cfg_nonRemovableDevices: nonRemovableOnly.checked property alias cfg_allDevices: allDevices.checked property alias cfg_popupOnNewDevice: autoPopup.checked Layouts.ColumnLayout { id: mainColumn + anchors.left: parent.left Controls.ExclusiveGroup{ id: deviceFilter } Controls.RadioButton { id: removableOnly text: i18n("Removable devices only") exclusiveGroup: deviceFilter } Controls.RadioButton { id: nonRemovableOnly text: i18n("Non-removable devices only") exclusiveGroup: deviceFilter } Controls.RadioButton { id: allDevices text: i18n("All devices") exclusiveGroup: deviceFilter } Controls.CheckBox { id: autoPopup Layouts.Layout.fillWidth: true text: i18n("Open popup when new device is plugged in") } } } diff --git a/applets/digital-clock/package/contents/ui/configAppearance.qml b/applets/digital-clock/package/contents/ui/configAppearance.qml index 5d562b037..24ed74f6a 100644 --- a/applets/digital-clock/package/contents/ui/configAppearance.qml +++ b/applets/digital-clock/package/contents/ui/configAppearance.qml @@ -1,223 +1,224 @@ /* * Copyright 2013 Bhushan Shah * Copyright 2013 Sebastian Kügler * Copyright 2015 Kai Uwe Broulik * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License or (at your option) version 3 or any later version * accepted by the membership of KDE e.V. (or its successor approved * by the membership of KDE e.V.), which shall act as a proxy * defined in Section 14 of version 3 of the license. * * 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see */ import QtQuick 2.0 import QtQuick.Controls 1.0 as QtControls import QtQuick.Layouts 1.0 as QtLayouts import org.kde.plasma.calendar 2.0 as PlasmaCalendar Item { id: appearancePage width: childrenRect.width height: childrenRect.height signal configurationChanged property string cfg_fontFamily property alias cfg_boldText: boldCheckBox.checked property string cfg_timeFormat: "" property alias cfg_italicText: italicCheckBox.checked property alias cfg_showLocalTimezone: showLocalTimezone.checked property alias cfg_displayTimezoneAsCode: timezoneCodeRadio.checked property alias cfg_showSeconds: showSeconds.checked property alias cfg_showDate: showDate.checked property string cfg_dateFormat: "shortDate" property alias cfg_use24hFormat: use24hFormat.checkedState onCfg_fontFamilyChanged: { // HACK by the time we populate our model and/or the ComboBox is finished the value is still undefined if (cfg_fontFamily) { for (var i = 0, j = fontsModel.count; i < j; ++i) { if (fontsModel.get(i).value == cfg_fontFamily) { fontFamilyComboBox.currentIndex = i break } } } } ListModel { id: fontsModel Component.onCompleted: { var arr = [] // use temp array to avoid constant binding stuff arr.push({text: i18nc("Use default font", "Default"), value: ""}) var fonts = Qt.fontFamilies() var foundIndex = 0 for (var i = 0, j = fonts.length; i < j; ++i) { arr.push({text: fonts[i], value: fonts[i]}) } append(arr) } } QtLayouts.ColumnLayout { + anchors.left: parent.left QtControls.GroupBox { QtLayouts.Layout.fillWidth: true title: i18n("Font") flat: true QtLayouts.GridLayout { // there's no FormLayout :( columns: 2 QtLayouts.Layout.fillWidth: true QtControls.Label { QtLayouts.Layout.fillWidth: true horizontalAlignment: Text.AlignRight text: i18n("Font style:") } QtControls.ComboBox { id: fontFamilyComboBox QtLayouts.Layout.fillWidth: true // ComboBox's sizing is just utterly broken QtLayouts.Layout.minimumWidth: units.gridUnit * 10 model: fontsModel // doesn't autodeduce from model because we manually populate it textRole: "text" onCurrentIndexChanged: { var current = model.get(currentIndex) if (current) { cfg_fontFamily = current.value appearancePage.configurationChanged() } } } // spacer, cannot do Qt.AlignTop on the font style label + rowSpan 3, otherwise looks odd Item { QtLayouts.Layout.fillWidth: true QtLayouts.Layout.rowSpan: 2 } QtControls.CheckBox { id: boldCheckBox text: i18n("Bold text") } QtControls.CheckBox { id: italicCheckBox text: i18n("Italic text") } } } QtControls.GroupBox { QtLayouts.Layout.fillWidth: true title: i18n("Information") flat: true QtLayouts.ColumnLayout { QtControls.CheckBox { id: showDate text: i18n("Show date") } QtControls.CheckBox { id: showSeconds text: i18n("Show seconds") } QtControls.CheckBox { id: use24hFormat text: i18nc("Checkbox label; means 24h clock format, without am/pm", "Use 24-hour Clock") } QtControls.CheckBox { id: showLocalTimezone text: i18n("Show local time zone") } QtControls.Label { text: i18n("Display time zone as:") } QtControls.GroupBox { QtLayouts.Layout.fillWidth: true flat: true QtLayouts.ColumnLayout { QtControls.ExclusiveGroup { id: timezoneDisplayType } QtControls.RadioButton { id: timezoneCityRadio text: i18n("Time zone city") exclusiveGroup: timezoneDisplayType } QtControls.RadioButton { id: timezoneCodeRadio text: i18n("Time zone code") exclusiveGroup: timezoneDisplayType } } } QtLayouts.RowLayout { QtControls.Label { text: i18n("Date format:") } QtControls.ComboBox { id: dateFormat enabled: showDate.checked textRole: "label" model: [ { 'label': i18n("Long Date"), 'name': "longDate" }, { 'label': i18n("Short Date"), 'name': "shortDate" }, { 'label': i18n("ISO Date"), 'name': "isoDate" } ] onCurrentIndexChanged: cfg_dateFormat = model[currentIndex]["name"] Component.onCompleted: { for (var i = 0; i < model.length; i++) { if (model[i]["name"] == plasmoid.configuration.dateFormat) { dateFormat.currentIndex = i; } } } } } } } } Component.onCompleted: { if (plasmoid.configuration.displayTimezoneAsCode) { timezoneCodeRadio.checked = true; } else { timezoneCityRadio.checked = true; } } } diff --git a/applets/digital-clock/package/contents/ui/configCalendar.qml b/applets/digital-clock/package/contents/ui/configCalendar.qml index 4381a3a3b..31aaa9be2 100644 --- a/applets/digital-clock/package/contents/ui/configCalendar.qml +++ b/applets/digital-clock/package/contents/ui/configCalendar.qml @@ -1,75 +1,76 @@ /* * Copyright 2015 Martin Klapetek * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License or (at your option) version 3 or any later version * accepted by the membership of KDE e.V. (or its successor approved * by the membership of KDE e.V.), which shall act as a proxy * defined in Section 14 of version 3 of the license. * * 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see */ import QtQuick 2.0 import QtQuick.Controls 1.0 as QtControls import QtQuick.Layouts 1.0 as QtLayouts import org.kde.plasma.calendar 2.0 as PlasmaCalendar Item { id: calendarPage width: childrenRect.width height: childrenRect.height signal configurationChanged property alias cfg_showWeekNumbers: showWeekNumbers.checked function saveConfig() { plasmoid.configuration.enabledCalendarPlugins = PlasmaCalendar.EventPluginsManager.enabledPlugins; } QtLayouts.ColumnLayout { + anchors.left: parent.left QtControls.CheckBox { id: showWeekNumbers text: i18n("Show week numbers in Calendar") } QtControls.GroupBox { QtLayouts.Layout.fillWidth: true title: i18n("Available Calendar Plugins") flat: true QtLayouts.ColumnLayout { Repeater { id: calendarPluginsRepeater model: PlasmaCalendar.EventPluginsManager.model delegate: QtLayouts.RowLayout { QtControls.CheckBox { text: model.display checked: model.checked onClicked: { //needed for model's setData to be called model.checked = checked; calendarPage.configurationChanged(); } } } } } } } Component.onCompleted: { PlasmaCalendar.EventPluginsManager.populateEnabledPluginsList(plasmoid.configuration.enabledCalendarPlugins); } } diff --git a/applets/lock_logout/contents/ui/ConfigGeneral.qml b/applets/lock_logout/contents/ui/ConfigGeneral.qml index 384ec728e..1f5e7b704 100644 --- a/applets/lock_logout/contents/ui/ConfigGeneral.qml +++ b/applets/lock_logout/contents/ui/ConfigGeneral.qml @@ -1,92 +1,93 @@ /* * Copyright 2013 Sebastian Kügler * Copyright 2015 Kai Uwe Broulik * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. */ import QtQuick 2.0 import QtQuick.Layouts 1.1 as QtLayouts import QtQuick.Controls 1.0 as QtControls import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.extras 2.0 as PlasmaExtras Item { id: iconsPage width: childrenRect.width height: childrenRect.height implicitWidth: pageColumn.implicitWidth implicitHeight: pageColumn.implicitHeight readonly property int checkedOptions: leave.checked + lock.checked + switchUser.checked + hibernate.checked + sleep.checked property alias cfg_show_requestShutDown: leave.checked property alias cfg_show_lockScreen: lock.checked property alias cfg_show_switchUser: switchUser.checked property alias cfg_show_suspendToDisk: hibernate.checked property alias cfg_show_suspendToRam: sleep.checked readonly property bool canLockScreen: dataEngine.data["Sleep States"].LockScreen readonly property bool canSuspend: dataEngine.data["Sleep States"].Suspend readonly property bool canHibernate: dataEngine.data["Sleep States"].Hibernate SystemPalette { id: sypal } PlasmaCore.DataSource { id: dataEngine engine: "powermanagement" connectedSources: ["Sleep States"] } QtLayouts.ColumnLayout { id: pageColumn + anchors.left: parent.left PlasmaExtras.Heading { text: i18nc("Heading for list of actions (leave, lock, shutdown, ...)", "Actions") color: syspal.text level: 2 } QtControls.CheckBox { id: leave text: i18n("Leave") // ensure user cannot have all options unchecked enabled: checkedOptions > 1 || !checked } QtControls.CheckBox { id: lock text: i18n("Lock") enabled: iconsPage.canLockScreen && (checkedOptions > 1 || !checked) } QtControls.CheckBox { id: switchUser text: i18n("Switch User") enabled: checkedOptions > 1 || !checked } QtControls.CheckBox { id: hibernate text: i18n("Hibernate") enabled: iconsPage.canHibernate && (checkedOptions > 1 || !checked) } QtControls.CheckBox { id: sleep text: i18n("Suspend") enabled: iconsPage.canSuspend && (checkedOptions > 1 || !checked) } } } diff --git a/applets/notifications/package/contents/ui/configNotifications.qml b/applets/notifications/package/contents/ui/configNotifications.qml index b2da83217..65406d0cb 100644 --- a/applets/notifications/package/contents/ui/configNotifications.qml +++ b/applets/notifications/package/contents/ui/configNotifications.qml @@ -1,66 +1,67 @@ /* * Copyright 2014 Kai Uwe Broulik * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License or (at your option) version 3 or any later version * accepted by the membership of KDE e.V. (or its successor approved * by the membership of KDE e.V.), which shall act as a proxy * defined in Section 14 of version 3 of the license. * * 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see */ import QtQuick 2.0 import QtQuick.Controls 1.0 as QtControls import QtQuick.Layouts 1.1 as QtLayouts import QtQuick.Window 2.2 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.private.notifications 1.0 Item { id: appearancePage width: childrenRect.width height: childrenRect.height signal configurationChanged property alias cfg_showNotifications: showNotificationsCheckBox.checked property alias cfg_showJobs: showJobsCheckBox.checked QtLayouts.ColumnLayout { + anchors.left: parent.left QtControls.CheckBox { id: showNotificationsCheckBox text: i18n("Show application and system notifications") } QtControls.CheckBox { id: showJobsCheckBox text: i18n("Track file transfers and other jobs") } QtControls.CheckBox { id: useCustomPopupPositionCheckBox text: i18n("Use custom position for the notification popup") checked: plasmoid.nativeInterface.configScreenPosition() != NotificationsHelper.Default } ScreenPositionSelector { id: screenPositionSelector enabled: useCustomPopupPositionCheckBox.checked selectedPosition: plasmoid.nativeInterface.screenPosition disabledPositions: [NotificationsHelper.Left, NotificationsHelper.Center, NotificationsHelper.Right] } } Component.onCompleted: { plasmoid.nativeInterface.screenPosition = Qt.binding(function() {configurationChanged(); return screenPositionSelector.selectedPosition; }); } } diff --git a/applets/systemmonitor/common/contents/ui/ConfigGeneral.qml b/applets/systemmonitor/common/contents/ui/ConfigGeneral.qml index 2148624aa..f1b03f0e9 100644 --- a/applets/systemmonitor/common/contents/ui/ConfigGeneral.qml +++ b/applets/systemmonitor/common/contents/ui/ConfigGeneral.qml @@ -1,127 +1,128 @@ /* * Copyright 2013 Bhushan Shah * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. */ import QtQuick 2.0 import QtQuick.Controls 1.1 as Controls import QtQuick.Layouts 1.1 as Layouts import org.kde.plasma.core 2.0 as PlasmaCore Item { id: iconsPage width: childrenRect.width height: childrenRect.height implicitWidth: mainColumn.implicitWidth implicitHeight: mainColumn.implicitHeight property var cfg_sources: [] onCfg_sourcesChanged: { if (cfg_sources.length == 0) { for (var i in mainColumn.children) { var child = mainColumn.children[i]; if (child.checked !== undefined) { child.checked = true; } } } else { for (var i in mainColumn.children) { var child = mainColumn.children[i]; if (child.checked !== undefined) { child.checked = cfg_sources.indexOf(child.source) !== -1; } } } } signal sourceAdded(string source) function addSource(source, friendlyName) { var found = false; for (var i = 0; i < sourcesModel.count; ++i) { var obj = sourcesModel.get(i); if (obj.source == source) { found = true; break; } } if (found) { return; } sourcesModel.append( {"source": encodeURIComponent(source), "friendlyName": friendlyName}); } PlasmaCore.DataSource { id: smSource engine: "systemmonitor" onSourceAdded: { iconsPage.sourceAdded(source); } onSourceRemoved: { for (var i = sourcesModel.count - 1; i >= 0; --i) { var obj = sourcesModel.get(i); if (obj.source == source) { sourcesModel.remove(i); } } } } Component.onCompleted: { for (var i in smSource.sources) { var source = smSource.sources[i]; iconsPage.sourceAdded(source); } } ListModel { id: sourcesModel } Layouts.ColumnLayout { id: mainColumn + anchors.left: parent.left Repeater { id: repeater model: sourcesModel Controls.CheckBox { id: checkBox text: model.friendlyName property string source: model.source onCheckedChanged: { if (checked) { if (cfg_sources.indexOf(model.source) == -1) { cfg_sources.push(model.source); } } else { var idx = cfg_sources.indexOf(model.source); if (idx !== -1) { cfg_sources.splice(idx, 1); } } cfg_sourcesChanged(); } } } } } diff --git a/applets/systemtray/package/contents/ui/ConfigGeneral.qml b/applets/systemtray/package/contents/ui/ConfigGeneral.qml index 4fcfcf62f..be169553d 100644 --- a/applets/systemtray/package/contents/ui/ConfigGeneral.qml +++ b/applets/systemtray/package/contents/ui/ConfigGeneral.qml @@ -1,139 +1,140 @@ /* * Copyright 2013 Sebastian Kügler * Copyright 2014 Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. */ import QtQuick 2.0 import QtQuick.Controls 1.0 as QtControls import QtQuick.Layouts 1.0 as QtLayouts import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.kquickcontrolsaddons 2.0 Item { id: iconsPage signal configurationChanged width: childrenRect.width height: childrenRect.height implicitWidth: mainColumn.implicitWidth implicitHeight: pageColumn.implicitHeight property alias cfg_applicationStatusShown: applicationStatus.checked property alias cfg_communicationsShown: communications.checked property alias cfg_systemServicesShown: systemServices.checked property alias cfg_hardwareControlShown: hardwareControl.checked property alias cfg_miscellaneousShown: miscellaneous.checked property var cfg_extraItems: [] SystemPalette { id: palette } QtLayouts.ColumnLayout { id: pageColumn + anchors.left: parent.left PlasmaExtras.Heading { level: 2 text: i18n("Categories") color: palette.text } Item { width: height height: units.gridUnit / 2 } QtLayouts.ColumnLayout { spacing: units.smallSpacing * 2 QtControls.CheckBox { id: applicationStatus text: i18n("Application Status") } QtControls.CheckBox { id: communications text: i18n("Communications") } QtControls.CheckBox { id: systemServices text: i18n("System Services") } QtControls.CheckBox { id: hardwareControl text: i18n("Hardware Control") } QtControls.CheckBox { id: miscellaneous text: i18n("Miscellaneous") } } Item { width: height height: units.gridUnit } PlasmaExtras.Heading { level: 2 text: i18n("Extra Items") color: palette.text } Item { width: height height: units.gridUnit / 2 } QtLayouts.ColumnLayout { spacing: units.smallSpacing * 2 QtControls.CheckBox { id: dummyCheckbox visible: false } Repeater { model: plasmoid.nativeInterface.availablePlasmoids delegate: QtControls.CheckBox { QtLayouts.Layout.minimumWidth: childrenRect.width checked: cfg_extraItems.indexOf(plugin) != -1 onCheckedChanged: { var index = cfg_extraItems.indexOf(plugin); if (checked) { if (index == -1) { cfg_extraItems.push(plugin); } } else { if (index > -1) { cfg_extraItems.splice(index, 1); } } configurationChanged() // qml cannot detect changes inside an Array } QtLayouts.RowLayout { anchors.verticalCenter: parent.verticalCenter x: dummyCheckbox.width QIconItem { icon: decoration width: units.iconSizes.small height: width } QtControls.Label { text: display } } } } } } }