From 77787755b01e58da51cc327c6e514246104f9c9e Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Thu, 22 Jul 2021 23:50:21 +0200 Subject: [PATCH] Alerts! Giving proper feedback to shortcut actions. --- .../eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml index 9180032..b689ea1 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml @@ -41,6 +41,12 @@ ApplicationWindow { About {id: about} + Alert { + id: alert + anchors.bottom: parent.bottom + anchors.bottomMargin: 5 + z: 3 + } Drawer { id: sidebar @@ -166,10 +172,11 @@ ApplicationWindow { "objects": objs, "type": "logplotv1" })) + alert.show("Saved plot to " + filename) } function loadDiagram(filename) { - console.log("Loading file '" + filename + "'.") + alert.show("Loading file '" + filename + "'.") var data = JSON.parse(Helper.load(filename)) var error = ""; if(Object.keys(data).includes("type") && data["type"] == "logplotv1") { @@ -226,10 +233,11 @@ ApplicationWindow { } if(error != "") { console.log(error) + alert.show("Could not save file: " + error) // TODO: Error handling } drawCanvas.requestPaint() - console.log("Loaded file '" + filename + "'.") + alert.show("Loaded file '" + filename + "'.") } Timer { @@ -250,5 +258,6 @@ ApplicationWindow { var file = Helper.gettmpfile() drawCanvas.save(file) Helper.copyImageToClipboard() + alert.show("Copied plot to clipboard!") } }