|
|
@ -47,7 +47,10 @@ ApplicationWindow { |
|
|
|
MenuItem { |
|
|
|
MenuItem { |
|
|
|
text: "Import App" |
|
|
|
text: "Import App" |
|
|
|
shortcut: "Ctrl+o" |
|
|
|
shortcut: "Ctrl+o" |
|
|
|
onTriggered: openAppDialog.open() |
|
|
|
onTriggered: { |
|
|
|
|
|
|
|
generalFileDialog.callback = importApp; |
|
|
|
|
|
|
|
generalFileDialog.open() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
MenuItem { |
|
|
|
MenuItem { |
|
|
@ -58,7 +61,10 @@ ApplicationWindow { |
|
|
|
MenuItem { |
|
|
|
MenuItem { |
|
|
|
text: "Add plugin" |
|
|
|
text: "Add plugin" |
|
|
|
onTriggered: { |
|
|
|
onTriggered: { |
|
|
|
mainSplit.addPlugin("test") |
|
|
|
generalFileDialog.callback = function(path) { |
|
|
|
|
|
|
|
addPlugin(path, {canClose: true}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
generalFileDialog.open() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -67,16 +73,23 @@ ApplicationWindow { |
|
|
|
MenuItem { |
|
|
|
MenuItem { |
|
|
|
text: "Import key" |
|
|
|
text: "Import key" |
|
|
|
shortcut: "Ctrl+i" |
|
|
|
shortcut: "Ctrl+i" |
|
|
|
onTriggered: importDialog.open() |
|
|
|
onTriggered: { |
|
|
|
|
|
|
|
generalFileDialog.callback = function(path) { |
|
|
|
|
|
|
|
ui.importKey(path) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
generalFileDialog.open() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
MenuItem { |
|
|
|
MenuItem { |
|
|
|
text: "Export keys" |
|
|
|
text: "Export keys" |
|
|
|
shortcut: "Ctrl+e" |
|
|
|
shortcut: "Ctrl+e" |
|
|
|
onTriggered: exportDialog.open() |
|
|
|
onTriggered: { |
|
|
|
|
|
|
|
generalFileDialog.callback = function(path) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
generalFileDialog.open() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//MenuSeparator {} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Menu { |
|
|
|
Menu { |
|
|
@ -135,6 +148,81 @@ ApplicationWindow { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
statusBar: StatusBar { |
|
|
|
|
|
|
|
height: 32 |
|
|
|
|
|
|
|
RowLayout { |
|
|
|
|
|
|
|
Button { |
|
|
|
|
|
|
|
id: miningButton |
|
|
|
|
|
|
|
text: "Start Mining" |
|
|
|
|
|
|
|
onClicked: { |
|
|
|
|
|
|
|
eth.toggleMining() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Button { |
|
|
|
|
|
|
|
id: importAppButton |
|
|
|
|
|
|
|
text: "Browser" |
|
|
|
|
|
|
|
onClicked: { |
|
|
|
|
|
|
|
ui.openBrowser() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RowLayout { |
|
|
|
|
|
|
|
Label { |
|
|
|
|
|
|
|
anchors.left: importAppButton.right |
|
|
|
|
|
|
|
anchors.leftMargin: 5 |
|
|
|
|
|
|
|
id: walletValueLabel |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
font.pixelSize: 10 |
|
|
|
|
|
|
|
styleColor: "#797979" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Label { |
|
|
|
|
|
|
|
y: 6 |
|
|
|
|
|
|
|
id: lastBlockLabel |
|
|
|
|
|
|
|
objectName: "lastBlockLabel" |
|
|
|
|
|
|
|
visible: true |
|
|
|
|
|
|
|
text: "" |
|
|
|
|
|
|
|
font.pixelSize: 10 |
|
|
|
|
|
|
|
anchors.right: peerGroup.left |
|
|
|
|
|
|
|
anchors.rightMargin: 5 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ProgressBar { |
|
|
|
|
|
|
|
id: syncProgressIndicator |
|
|
|
|
|
|
|
visible: false |
|
|
|
|
|
|
|
objectName: "syncProgressIndicator" |
|
|
|
|
|
|
|
y: 3 |
|
|
|
|
|
|
|
width: 140 |
|
|
|
|
|
|
|
indeterminate: true |
|
|
|
|
|
|
|
anchors.right: peerGroup.left |
|
|
|
|
|
|
|
anchors.rightMargin: 5 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RowLayout { |
|
|
|
|
|
|
|
id: peerGroup |
|
|
|
|
|
|
|
y: 7 |
|
|
|
|
|
|
|
anchors.right: parent.right |
|
|
|
|
|
|
|
MouseArea { |
|
|
|
|
|
|
|
onDoubleClicked: peerWindow.visible = true |
|
|
|
|
|
|
|
anchors.fill: parent |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Label { |
|
|
|
|
|
|
|
id: peerLabel |
|
|
|
|
|
|
|
font.pixelSize: 8 |
|
|
|
|
|
|
|
text: "0 / 0" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Image { |
|
|
|
|
|
|
|
id: peerImage |
|
|
|
|
|
|
|
width: 10; height: 10 |
|
|
|
|
|
|
|
source: "../network.png" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
property var blockModel: ListModel { |
|
|
|
property var blockModel: ListModel { |
|
|
|
id: blockModel |
|
|
|
id: blockModel |
|
|
@ -168,6 +256,9 @@ ApplicationWindow { |
|
|
|
return view |
|
|
|
return view |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/********************* |
|
|
|
|
|
|
|
* Main menu. |
|
|
|
|
|
|
|
********************/ |
|
|
|
Rectangle { |
|
|
|
Rectangle { |
|
|
|
id: menu |
|
|
|
id: menu |
|
|
|
Layout.minimumWidth: 80 |
|
|
|
Layout.minimumWidth: 80 |
|
|
@ -201,9 +292,13 @@ ApplicationWindow { |
|
|
|
y: 50 |
|
|
|
y: 50 |
|
|
|
anchors.left: parent.left |
|
|
|
anchors.left: parent.left |
|
|
|
anchors.right: parent.right |
|
|
|
anchors.right: parent.right |
|
|
|
|
|
|
|
spacing: 10 |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/********************* |
|
|
|
|
|
|
|
* Main view |
|
|
|
|
|
|
|
********************/ |
|
|
|
Rectangle { |
|
|
|
Rectangle { |
|
|
|
id: mainView |
|
|
|
id: mainView |
|
|
|
color: "#00000000" |
|
|
|
color: "#00000000" |
|
|
@ -223,28 +318,18 @@ ApplicationWindow { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FileDialog { |
|
|
|
function importApp(path) { |
|
|
|
id: openAppDialog |
|
|
|
var ext = path.split('.').pop() |
|
|
|
title: "Open QML Application" |
|
|
|
if(ext == "html" || ext == "htm") { |
|
|
|
onAccepted: { |
|
|
|
ui.openHtml(path) |
|
|
|
var path = openAppDialog.fileUrl.toString() |
|
|
|
}else if(ext == "qml"){ |
|
|
|
var ext = path.split('.').pop() |
|
|
|
ui.openQml(path) |
|
|
|
if(ext == "html" || ext == "htm") { |
|
|
|
|
|
|
|
ui.openHtml(path) |
|
|
|
|
|
|
|
}else if(ext == "qml"){ |
|
|
|
|
|
|
|
ui.openQml(path) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FileDialog { |
|
|
|
/****************** |
|
|
|
id: exportDialog |
|
|
|
* Dialogs |
|
|
|
title: "Export keys" |
|
|
|
*****************/ |
|
|
|
onAccepted: { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FileDialog { |
|
|
|
FileDialog { |
|
|
|
id: generalFileDialog |
|
|
|
id: generalFileDialog |
|
|
|
property var callback; |
|
|
|
property var callback; |
|
|
@ -254,93 +339,6 @@ ApplicationWindow { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FileDialog { |
|
|
|
|
|
|
|
id: importDialog |
|
|
|
|
|
|
|
title: "Import key" |
|
|
|
|
|
|
|
onAccepted: { |
|
|
|
|
|
|
|
var path = this.fileUrl.toString() |
|
|
|
|
|
|
|
ui.importKey(path) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
statusBar: StatusBar { |
|
|
|
|
|
|
|
height: 30 |
|
|
|
|
|
|
|
RowLayout { |
|
|
|
|
|
|
|
Button { |
|
|
|
|
|
|
|
id: miningButton |
|
|
|
|
|
|
|
onClicked: { |
|
|
|
|
|
|
|
eth.toggleMining() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
text: "Start Mining" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Button { |
|
|
|
|
|
|
|
property var enabled: true |
|
|
|
|
|
|
|
id: debuggerWindow |
|
|
|
|
|
|
|
onClicked: { |
|
|
|
|
|
|
|
ui.startDebugger() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
text: "Debugger" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Button { |
|
|
|
|
|
|
|
id: importAppButton |
|
|
|
|
|
|
|
anchors.left: debuggerWindow.right |
|
|
|
|
|
|
|
anchors.leftMargin: 5 |
|
|
|
|
|
|
|
onClicked: openAppDialog.open() |
|
|
|
|
|
|
|
text: "Import App" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Label { |
|
|
|
|
|
|
|
anchors.left: importAppButton.right |
|
|
|
|
|
|
|
anchors.leftMargin: 5 |
|
|
|
|
|
|
|
id: walletValueLabel |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Label { |
|
|
|
|
|
|
|
y: 6 |
|
|
|
|
|
|
|
id: lastBlockLabel |
|
|
|
|
|
|
|
objectName: "lastBlockLabel" |
|
|
|
|
|
|
|
visible: true |
|
|
|
|
|
|
|
text: "" |
|
|
|
|
|
|
|
font.pixelSize: 10 |
|
|
|
|
|
|
|
anchors.right: peerGroup.left |
|
|
|
|
|
|
|
anchors.rightMargin: 5 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ProgressBar { |
|
|
|
|
|
|
|
id: syncProgressIndicator |
|
|
|
|
|
|
|
visible: false |
|
|
|
|
|
|
|
objectName: "syncProgressIndicator" |
|
|
|
|
|
|
|
y: 3 |
|
|
|
|
|
|
|
width: 140 |
|
|
|
|
|
|
|
indeterminate: true |
|
|
|
|
|
|
|
anchors.right: peerGroup.left |
|
|
|
|
|
|
|
anchors.rightMargin: 5 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RowLayout { |
|
|
|
|
|
|
|
id: peerGroup |
|
|
|
|
|
|
|
y: 7 |
|
|
|
|
|
|
|
anchors.right: parent.right |
|
|
|
|
|
|
|
MouseArea { |
|
|
|
|
|
|
|
onDoubleClicked: peerWindow.visible = true |
|
|
|
|
|
|
|
anchors.fill: parent |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Label { |
|
|
|
|
|
|
|
id: peerLabel |
|
|
|
|
|
|
|
font.pixelSize: 8 |
|
|
|
|
|
|
|
text: "0 / 0" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Image { |
|
|
|
|
|
|
|
id: peerImage |
|
|
|
|
|
|
|
width: 10; height: 10 |
|
|
|
|
|
|
|
source: "../network.png" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function setWalletValue(value) { |
|
|
|
function setWalletValue(value) { |
|
|
|