summaryrefslogtreecommitdiff
path: root/contents/ui
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2022-04-09 15:33:54 +0800
committerFrederick Yin <fkfd@fkfd.me>2022-04-09 15:33:54 +0800
commitfbadabe38b4611ecd373c88023fa3701bea827c9 (patch)
tree156be022c942263354200b9229b5630e759f424c /contents/ui
parent0a2bf162712d3c5d468b8b93815e6e2f161d555f (diff)
Add config for refresh interval
Diffstat (limited to 'contents/ui')
-rw-r--r--contents/ui/configGeneral.qml9
-rw-r--r--contents/ui/main.qml2
2 files changed, 10 insertions, 1 deletions
diff --git a/contents/ui/configGeneral.qml b/contents/ui/configGeneral.qml
index 479b9e6..dc73ca9 100644
--- a/contents/ui/configGeneral.qml
+++ b/contents/ui/configGeneral.qml
@@ -5,10 +5,19 @@ import org.kde.kirigami 2.5 as Kirigami
Kirigami.FormLayout {
property alias cfg_showSubmittedAssignments: showSubmittedAssignments.checked
+ property alias cfg_refreshInterval: refreshInterval.value
CheckBox {
id: showSubmittedAssignments
text: i18n("Show submitted assignments")
}
+
+ SpinBox {
+ id: refreshInterval
+ Kirigami.FormData.label: i18n("Refresh interval (minutes):")
+ editable: true
+ from: 1
+ to: 1440
+ }
}
diff --git a/contents/ui/main.qml b/contents/ui/main.qml
index f42ed15..8568116 100644
--- a/contents/ui/main.qml
+++ b/contents/ui/main.qml
@@ -99,7 +99,7 @@ Item {
}
Timer {
- interval: 10 * 60 * 1000
+ interval: plasmoid.configuration.refreshInterval * 60 * 1000
running: true;
repeat: true;
onTriggered: syncCanvas();