diff options
author | obscuren <geffobscura@gmail.com> | 2014-02-22 00:29:59 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-02-22 00:29:59 +0800 |
commit | 3e8b27c9dc78ffeeefae987e67730fae17707df4 (patch) | |
tree | ccc51eac0f5772d3500b6555325ec97c55a7f0b0 /wallet.qml | |
parent | 95a48cea18eccd4ea2cb298027dbd01bd21f43e8 (diff) | |
download | go-tangerine-3e8b27c9dc78ffeeefae987e67730fae17707df4.tar.gz go-tangerine-3e8b27c9dc78ffeeefae987e67730fae17707df4.tar.zst go-tangerine-3e8b27c9dc78ffeeefae987e67730fae17707df4.zip |
WIP library, sample app
Diffstat (limited to 'wallet.qml')
-rw-r--r-- | wallet.qml | 59 |
1 files changed, 38 insertions, 21 deletions
diff --git a/wallet.qml b/wallet.qml index b19e7f32b..f9bd8ec76 100644 --- a/wallet.qml +++ b/wallet.qml @@ -1,6 +1,7 @@ import QtQuick 2.0 import QtQuick.Controls 1.0; import QtQuick.Layouts 1.0; +import QtQuick.Dialogs 1.0; import GoExtensions 1.0 ApplicationWindow { @@ -12,6 +13,7 @@ ApplicationWindow { title: "Ethereal" + toolBar: ToolBar { id: mainToolbar @@ -19,7 +21,7 @@ ApplicationWindow { width: parent.width Button { text: "Send" - onClicked: tester.compile(codeView) + onClicked: console.log("SEND") } TextField { @@ -66,35 +68,50 @@ ApplicationWindow { TableViewColumn{ role: "hash" ; title: "Hash" ; width: 560 } model: blockModel + + onDoubleClicked: { + console.log(eth.getBlock(blockModel.get(row).hash)) + } } + FileDialog { + id: openAppDialog + title: "Open QML Application" + onAccepted: { + ui.open(openAppDialog.fileUrl.toString()) + } + } statusBar: StatusBar { - RowLayout { - anchors.fill: parent - Label { text: "0.0.1" } - Label { - anchors.right: peerImage.left - anchors.rightMargin: 5 - id: peerLabel - font.pixelSize: 8 - text: "0 / 0" - } - - Image { - id: peerImage - anchors.right: parent.right - width: 10; height: 10 - source: "network.png" - } + RowLayout { + anchors.fill: parent + Button { + onClicked: openAppDialog.open() + text: "Import App" + } + + Label { text: "0.0.1" } + Label { + anchors.right: peerImage.left + anchors.rightMargin: 5 + id: peerLabel + font.pixelSize: 8 + text: "0 / 0" } + Image { + id: peerImage + anchors.right: parent.right + width: 10; height: 10 + source: "network.png" + } + } } function addBlock(block) { - blockModel.insert(0, {number: block.number, hash: block.hash}) + blockModel.insert(0, {number: block.number, hash: block.hash}) } function setPeers(text) { - peerLabel.text = text - } + peerLabel.text = text + } } |