summaryrefslogtreecommitdiff
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
parent0a2bf162712d3c5d468b8b93815e6e2f161d555f (diff)
Add config for refresh interval
-rw-r--r--contents/config/main.xml3
-rw-r--r--contents/ui/configGeneral.qml9
-rw-r--r--contents/ui/main.qml2
3 files changed, 13 insertions, 1 deletions
diff --git a/contents/config/main.xml b/contents/config/main.xml
index 923dc15..70a84c6 100644
--- a/contents/config/main.xml
+++ b/contents/config/main.xml
@@ -5,6 +5,9 @@
<entry name="showSubmittedAssignments" type="Bool">
<default>true</default>
</entry>
+ <entry name="refreshInterval" type="Int">
+ <default>10</default>
+ </entry>
</group>
<group name="Canvas">
<entry name="canvasUrl" type="String">
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();