mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 05:23:58 -06:00
Add a dialog that shows the engine log
This commit is contained in:
parent
52d4424635
commit
1118219f7d
4 changed files with 65 additions and 0 deletions
41
qml/EngineLog.qml
Normal file
41
qml/EngineLog.qml
Normal file
|
@ -0,0 +1,41 @@
|
|||
import QtQuick 2.2
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Controls 1.2
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
Dialog {
|
||||
id: dialog
|
||||
|
||||
title: qsTr("Cura Engine Log");
|
||||
|
||||
standardButtons: StandardButton.Close;
|
||||
modality: Qt.NonModal;
|
||||
|
||||
width: 640;
|
||||
|
||||
TextArea {
|
||||
id: textArea
|
||||
|
||||
anchors.left: parent.left;
|
||||
anchors.right: parent.right;
|
||||
|
||||
implicitHeight: 480;
|
||||
}
|
||||
|
||||
onVisibleChanged: {
|
||||
if(visible) {
|
||||
textArea.text = Printer.getEngineLog();
|
||||
updateTimer.start();
|
||||
} else {
|
||||
updateTimer.stop();
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: updateTimer;
|
||||
interval: 1000;
|
||||
running: false;
|
||||
repeat: true;
|
||||
onTriggered: textArea.text = Printer.getEngineLog();
|
||||
}
|
||||
}
|
|
@ -116,6 +116,7 @@ UM.MainWindow {
|
|||
//: Help menu
|
||||
title: qsTr("&Help");
|
||||
|
||||
MenuItem { action: actions.showEngineLog; }
|
||||
MenuItem { action: actions.documentation; }
|
||||
MenuItem { action: actions.reportBug; }
|
||||
MenuSeparator { }
|
||||
|
@ -300,6 +301,7 @@ UM.MainWindow {
|
|||
|
||||
documentation.onTriggered: Qt.openUrlExternally("https://ultimaker.com/en/support");
|
||||
reportBug.onTriggered: Qt.openUrlExternally("https://github.com/Ultimaker/PluggableCura/issues");
|
||||
showEngineLog.onTriggered: engineLog.open();
|
||||
}
|
||||
|
||||
Menu {
|
||||
|
@ -372,6 +374,10 @@ UM.MainWindow {
|
|||
}
|
||||
}
|
||||
|
||||
EngineLog {
|
||||
id: engineLog;
|
||||
}
|
||||
|
||||
AddMachineWizard {
|
||||
id: addMachine;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ Item {
|
|||
property alias configureMachines: settingsAction;
|
||||
|
||||
property alias preferences: preferencesAction;
|
||||
|
||||
property alias showEngineLog: showEngineLogAction;
|
||||
property alias documentation: documentationAction;
|
||||
property alias reportBug: reportBugAction;
|
||||
property alias about: aboutAction;
|
||||
|
@ -169,4 +171,11 @@ Item {
|
|||
iconName: "document-save";
|
||||
shortcut: StandardKey.Save;
|
||||
}
|
||||
|
||||
Action {
|
||||
id: showEngineLogAction;
|
||||
//: Show engine log action
|
||||
text: qsTr("Show engine log...");
|
||||
iconName: "view-list-text";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue