mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-20 05:07:50 -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();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue