From fbadabe38b4611ecd373c88023fa3701bea827c9 Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Sat, 9 Apr 2022 15:33:54 +0800 Subject: Add config for refresh interval --- contents/ui/configGeneral.qml | 9 +++++++++ contents/ui/main.qml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'contents/ui') 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(); -- cgit v1.2.3