|
|
@ -1,6 +1,7 @@ |
|
|
|
import QtQuick 2.0 |
|
|
|
import QtQuick.Layouts 1.0 |
|
|
|
import QtQuick.Controls 1.1 |
|
|
|
import QtQuick.Controls.Styles 1.3 |
|
|
|
import org.ethereum.qml.SortFilterProxyModel 1.0 |
|
|
|
import "." |
|
|
|
|
|
|
@ -15,10 +16,10 @@ Rectangle |
|
|
|
radius: 5 |
|
|
|
color: "#f7f7f7" |
|
|
|
border.color: "#808080" |
|
|
|
border.width: 2 |
|
|
|
border.width: 1 |
|
|
|
ColumnLayout { |
|
|
|
height: parent.height - 4 |
|
|
|
width: parent.width - 2 |
|
|
|
height: parent.height |
|
|
|
width: parent.width |
|
|
|
spacing: 0 |
|
|
|
Row |
|
|
|
{ |
|
|
@ -62,11 +63,93 @@ Rectangle |
|
|
|
for (var k = 0; k < logsModel.count; k++) |
|
|
|
{ |
|
|
|
var log = logsModel.get(k); |
|
|
|
content += log.type + "\t" + log.level + "\t" + log.date + "\t" + log.content; |
|
|
|
content += log.type + "\t" + log.level + "\t" + log.date + "\t" + log.content + "\n"; |
|
|
|
} |
|
|
|
appContext.toClipboard(content); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Rectangle { |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
width: 1; |
|
|
|
height: parent.height - 10 |
|
|
|
color : "#808080" |
|
|
|
} |
|
|
|
|
|
|
|
ToolButton { |
|
|
|
id: javascriptButton |
|
|
|
checkable: true |
|
|
|
height: 30 |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
checked: true |
|
|
|
onCheckedChanged: { |
|
|
|
proxyModel.toogleFilter("javascript") |
|
|
|
} |
|
|
|
tooltip: qsTr("JavaScript") |
|
|
|
style: |
|
|
|
ButtonStyle { |
|
|
|
label: |
|
|
|
Item { |
|
|
|
DefaultLabel { |
|
|
|
font.family: "sans serif" |
|
|
|
font.pointSize: Style.absoluteSize(-3) |
|
|
|
color: "#5391d8" |
|
|
|
anchors.centerIn: parent |
|
|
|
text: qsTr("JavaScript") |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
ToolButton { |
|
|
|
id: runButton |
|
|
|
checkable: true |
|
|
|
height: 30 |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
checked: true |
|
|
|
onCheckedChanged: { |
|
|
|
proxyModel.toogleFilter("run") |
|
|
|
} |
|
|
|
tooltip: qsTr("Run") |
|
|
|
style: |
|
|
|
ButtonStyle { |
|
|
|
label: |
|
|
|
Item { |
|
|
|
DefaultLabel { |
|
|
|
font.family: "sans serif" |
|
|
|
font.pointSize: Style.absoluteSize(-3) |
|
|
|
color: "#5391d8" |
|
|
|
anchors.centerIn: parent |
|
|
|
text: qsTr("Run") |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
ToolButton { |
|
|
|
id: stateButton |
|
|
|
checkable: true |
|
|
|
height: 30 |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
checked: true |
|
|
|
onCheckedChanged: { |
|
|
|
proxyModel.toogleFilter("state") |
|
|
|
} |
|
|
|
tooltip: qsTr("State") |
|
|
|
style: |
|
|
|
ButtonStyle { |
|
|
|
label: |
|
|
|
Item { |
|
|
|
DefaultLabel { |
|
|
|
font.family: "sans serif" |
|
|
|
font.pointSize: Style.absoluteSize(-3) |
|
|
|
color: "#5391d8" |
|
|
|
anchors.centerIn: parent |
|
|
|
text: qsTr("State") |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
ListModel { |
|
|
@ -89,9 +172,17 @@ Rectangle |
|
|
|
id: proxyModel |
|
|
|
source: logsModel |
|
|
|
|
|
|
|
filterRole: "" |
|
|
|
filterString: "" |
|
|
|
filterSyntax: SortFilterProxyModel.Wildcard |
|
|
|
function toogleFilter(_value) |
|
|
|
{ |
|
|
|
if (filterString.indexOf('_' + _value) !== -1) |
|
|
|
filterString = filterString.replace('_' + _value, _value); |
|
|
|
else |
|
|
|
filterString = filterString.replace(_value, '_' + _value); |
|
|
|
} |
|
|
|
|
|
|
|
filterRole: "type" |
|
|
|
filterString: "(?:javascript|run|state)" |
|
|
|
filterSyntax: SortFilterProxyModel.RegExp |
|
|
|
filterCaseSensitivity: Qt.CaseInsensitive |
|
|
|
} |
|
|
|
TableViewColumn |
|
|
|