blob: 0248ba0ea7a632bf79f63e5e80b1dc0f4a0afb06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
// Copyright (c) 2015 Ultimaker B.V.
// Cura is released under the terms of the AGPLv3 or higher.
import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import UM 1.0 as UM
UM.Dialog {
id: dialog;
//: Engine Log dialog title
title: qsTr("Engine Log");
modality: Qt.NonModal;
TextArea {
id: textArea
anchors.fill: parent;
Timer {
id: updateTimer;
interval: 1000;
running: false;
repeat: true;
onTriggered: textArea.text = Printer.getEngineLog();
}
}
rightButtons: Button {
//: Close engine log button
text: qsTr("Close");
onClicked: dialog.visible = false;
}
onVisibleChanged: {
if(visible) {
textArea.text = Printer.getEngineLog();
updateTimer.start();
} else {
updateTimer.stop();
}
}
}
|