From a8cc5f4861e6a4165d0e26cc660e54dd8123ad59 Mon Sep 17 00:00:00 2001 From: Black Hat Date: Tue, 2 Jul 2019 16:03:33 +0800 Subject: [PATCH] Add initial sync indicator. #144 --- qml/main.qml | 11 +++++++++++ src/controller.h | 3 +++ 2 files changed, 14 insertions(+) diff --git a/qml/main.qml b/qml/main.qml index 70a47744a..244844ceb 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -68,6 +68,17 @@ ApplicationWindow { onActivated: Qt.quit() } + ToolTip { + id: busyIndicator + + parent: ApplicationWindow.overlay + + visible: spectralController.busy + text: "Loading, please wait" + + font.pixelSize: 14 + } + ToolTip { id: errorControl diff --git a/src/controller.h b/src/controller.h index 600ac140d..a5a4a1012 100644 --- a/src/controller.h +++ b/src/controller.h @@ -56,6 +56,9 @@ class Controller : public QObject { bool busy() { return m_busy; } void setBusy(bool busy) { + if (m_busy == busy) { + return; + } m_busy = busy; emit busyChanged(); }