From 14a5bd5dcc036a985a71e775a6d72cd5e703d322 Mon Sep 17 00:00:00 2001 From: Jacob Brydolf Date: Mon, 7 Nov 2016 14:59:00 +0100 Subject: [PATCH] settings: added daemon console --- pages/Settings.qml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/pages/Settings.qml b/pages/Settings.qml index 8a946fdf..eba450d7 100644 --- a/pages/Settings.qml +++ b/pages/Settings.qml @@ -308,17 +308,57 @@ Rectangle { daemonManager.stop(); } } + + StandardButton { + visible: true + // enabled: appWindow.daemonRunning + id: daemonConsolePopupButton + width: 110 + text: qsTr("Show concole") + translationManager.emptyString + shadowReleasedColor: "#FF4304" + shadowPressedColor: "#B32D00" + releasedColor: "#FF6C3C" + pressedColor: "#FF4304" + onClicked: { + daemonConsolePopup.open(); + } + } + } } + // Daemon console + StandardDialog { + id: daemonConsolePopup + height:800 + width:800 + cancelVisible: false + title: qsTr("Daemon console") + onAccepted: { + close(); + } + } + // fires on every page load function onPageCompleted() { console.log("Settings page loaded"); initSettings(); } + // fires only once + Component.onCompleted: { + daemonManager.daemonConsoleUpdated.connect(onDaemonConsoleUpdated) + } + + function onDaemonConsoleUpdated(message){ + // Update daemon console + daemonConsolePopup.textArea.append(message) + } + + + }