diff options
author | obscuren <geffobscura@gmail.com> | 2014-08-17 18:41:23 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-08-17 18:41:23 +0800 |
commit | 27735bbdfc4e32e2e5ca11f48591d62b766aa3f5 (patch) | |
tree | ceb02da5048d2f592944ff7bc41186fc81f8e76b /ethereal/assets/qml/views/chain.qml | |
parent | 2eab964a00b998068f49b088949730f4896e256c (diff) | |
download | go-tangerine-27735bbdfc4e32e2e5ca11f48591d62b766aa3f5.tar go-tangerine-27735bbdfc4e32e2e5ca11f48591d62b766aa3f5.tar.gz go-tangerine-27735bbdfc4e32e2e5ca11f48591d62b766aa3f5.tar.bz2 go-tangerine-27735bbdfc4e32e2e5ca11f48591d62b766aa3f5.tar.lz go-tangerine-27735bbdfc4e32e2e5ca11f48591d62b766aa3f5.tar.xz go-tangerine-27735bbdfc4e32e2e5ca11f48591d62b766aa3f5.tar.zst go-tangerine-27735bbdfc4e32e2e5ca11f48591d62b766aa3f5.zip |
State dumps from gui
Diffstat (limited to 'ethereal/assets/qml/views/chain.qml')
-rw-r--r-- | ethereal/assets/qml/views/chain.qml | 54 |
1 files changed, 51 insertions, 3 deletions
diff --git a/ethereal/assets/qml/views/chain.qml b/ethereal/assets/qml/views/chain.qml index 2b968d56c..0f5604a9f 100644 --- a/ethereal/assets/qml/views/chain.qml +++ b/ethereal/assets/qml/views/chain.qml @@ -25,9 +25,57 @@ Rectangle { model: blockModel - onDoubleClicked: { - popup.visible = true - popup.setDetails(blockModel.get(row)) + itemDelegate: Item { + Text { + anchors { + left: parent.left + right: parent.right + leftMargin: 10 + verticalCenter: parent.verticalCenter + } + color: styleData.textColor + elide: styleData.elideMode + text: styleData.value + font.pixelSize: 11 + MouseArea { + acceptedButtons: Qt.RightButton + propagateComposedEvents: true + anchors.fill: parent + onClicked: { + blockTable.selection.clear() + blockTable.selection.select(styleData.row) + + contextMenu.row = styleData.row; + contextMenu.popup() + } + } + } + + } + + Menu { + id: contextMenu + property var row; + MenuItem { + text: "Details" + onTriggered: { + popup.visible = true + popup.setDetails(blockModel.get(this.row)) + } + } + + MenuSeparator{} + + MenuItem { + text: "Dump State" + onTriggered: { + generalFileDialog.show(false, function(path) { + var hash = blockModel.get(this.row).hash; + + gui.dumpState(hash, path); + }); + } + } } } |