-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathLogView.qml
43 lines (36 loc) · 1.18 KB
/
LogView.qml
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
import QtQuick 2.0
Rectangle {
color: application.layoutColor("#202020")
ListView {
anchors.fill: parent
model: logModel
delegate: Text {
//height: font.pointSize
color: switch (status) {
case "pending": return "#aaaaaa";
case "confirmed": return "#ffffff";
case "failed": return "#FF0000";
default: return "#0088ff";
}
text: {
var ts_string = "<" + timestamp.toLocaleString(Qt.locale(), "--MM-dd HH:mm") + "> ";
var suffix = "";
switch (status) {
case "pending":
suffix = " (pending)";
break;
case "failed":
suffix = " (failed)";
break;
default: suffix = "";
}
return ts_string + message + suffix;
}
font.family: application.fontFace
font.pixelSize: application.fontSize
}
onCountChanged: {
currentIndex = count - 1
}
}
}