Warning, /utilities/daykountdown/src/contents/ui/SettingsPage.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2021 Claudio Cambra <claudio.cambra@gmail.com> 0003 * SPDX-LicenseRef: GPL-3.0-or-later 0004 */ 0005 0006 import QtQuick 2.12 0007 import QtQuick.Controls 2.12 as Controls 0008 import QtQuick.Layouts 1.12 0009 0010 import org.kde.kirigami 2.13 as Kirigami 0011 import org.kde.plasma.calendar 2.0 as PlasmaCalendar 0012 0013 import org.kde.daykountdown.private 1.0 0014 0015 Kirigami.ScrollablePage { 0016 id: settingsPage 0017 0018 title: i18nc("@title", "Settings") 0019 Component.onCompleted: { 0020 PlasmaCalendar.EventPluginsManager.enabledPlugins = Config.enabledCalendarPlugins 0021 } 0022 0023 ColumnLayout { 0024 id: settingsLayout 0025 ColumnLayout { 0026 id: calendarSettingsLayout 0027 0028 Kirigami.Heading { 0029 level: 1 0030 text: i18n("Calendar settings") 0031 } 0032 0033 Repeater { 0034 id: calendarPluginsRepeater 0035 model: PlasmaCalendar.EventPluginsManager.model 0036 delegate: RowLayout { 0037 Controls.CheckBox { 0038 text: model.display 0039 checked: model.checked 0040 onClicked: { 0041 //needed for model's setData to be called 0042 model.checked = checked; 0043 Config.enabledCalendarPlugins = PlasmaCalendar.EventPluginsManager.enabledPlugins; 0044 Config.save() 0045 } 0046 } 0047 } 0048 } 0049 0050 Repeater { 0051 id: calendarPluginsSettings 0052 0053 model: PlasmaCalendar.EventPluginsManager.model 0054 delegate: ColumnLayout { 0055 Layout.fillWidth: true 0056 Layout.fillHeight: true 0057 Kirigami.Heading { 0058 level: 2 0059 text: model.display 0060 visible: Config.enabledCalendarPlugins.indexOf(model.pluginPath) > -1 0061 } 0062 Loader { 0063 Layout.fillWidth: true 0064 source: "file:" + model.configUi 0065 visible: Config.enabledCalendarPlugins.indexOf(model.pluginPath) > -1 0066 onLoaded: { 0067 this.item.configurationChanged.connect(this.item.saveConfig) 0068 if(model.label = "PIM Events Plugin") 0069 this.item.height = Kirigami.Units.gridUnit * 15 0070 if (model.label = "Astronomical Events") 0071 this.item.wideMode = false 0072 } 0073 } 0074 } 0075 } 0076 } 0077 } 0078 }