diff options
Diffstat (limited to 'ethereal/assets/qml/wallet.qml')
-rw-r--r-- | ethereal/assets/qml/wallet.qml | 111 |
1 files changed, 100 insertions, 11 deletions
diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml index b22e82f9a..e759757b2 100644 --- a/ethereal/assets/qml/wallet.qml +++ b/ethereal/assets/qml/wallet.qml @@ -194,20 +194,32 @@ ApplicationWindow { width: parent.width /2 } - Button { - id: txButton - text: "Send" - onClicked: { - //this.enabled = false - var res = eth.createTx(txRecipient.text, txValue.text, txGas.text, txGasPrice.text, codeView.text) - if(res[1]) { - txOutput.text = "Output:\n" + res[1].error() - } else { - txOutput.text = "Output:\n" + res[0] + RowLayout { + Button { + id: txButton + text: "Send" + onClicked: { + //this.enabled = false + var res = eth.createTx(txRecipient.text, txValue.text, txGas.text, txGasPrice.text, codeView.text) + if(res[1]) { + txOutput.text = "Output:\n" + res[1].error() + } else { + txOutput.text = "Output:\n" + res[0] + } + txOutput.visible = true + } + } + + Button { + id: debugButton + text: "Debug" + onClicked: { + var res = ui.debugTx(txRecipient.text, txValue.text, txGas.text, txGasPrice.text, codeView.text) + debugWindow.visible = true } - txOutput.visible = true } } + TextArea { id: txOutput visible: false @@ -409,6 +421,83 @@ ApplicationWindow { } + Window { + id: debugWindow + visible: false + title: "Debugger" + minimumWidth: 600 + minimumHeight: 600 + width: 800 + height: 600 + + SplitView { + anchors.fill: parent + property var asmModel: ListModel { + id: asmModel + } + TableView { + id: asmTableView + width: 200 + TableViewColumn{ role: "value" ; title: "" ; width: 100 } + model: asmModel + } + + Rectangle { + anchors.left: asmTableView.right + anchors.right: parent.right + SplitView { + orientation: Qt.Vertical + anchors.fill: parent + + TableView { + property var memModel: ListModel { + id: memModel + } + height: parent.height/2 + width: parent.width + TableViewColumn{ id:mnumColmn ; role: "num" ; title: "#" ; width: 50} + TableViewColumn{ role: "value" ; title: "Memory" ; width: 750} + model: memModel + } + + TableView { + property var stackModel: ListModel { + id: stackModel + } + height: parent.height/2 + width: parent.width + TableViewColumn{ role: "value" ; title: "Stack" ; width: parent.width } + model: stackModel + } + } + } + } + } + + function setAsm(asm) { + //for(var i = 0; i < asm.length; i++) { + asmModel.append({asm: asm}) + //} + } + function clearAsm() { + asmModel.clear() + } + + function setMem(mem) { + memModel.append({num: mem.num, value: mem.value}) + } + function clearMem(){ + memModel.clear() + } + + function setStack(stack) { + stackModel.append({value: stack}) + } + + function clearStack() { + stackModel.clear() + } + function loadPlugin(name) { console.log("Loading plugin" + name) mainView.addPlugin(name) |