diff options
author | obscuren <geffobscura@gmail.com> | 2014-08-17 19:49:46 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-08-17 19:49:46 +0800 |
commit | 88655439a017ea74041d022a9f23a919d27f51e2 (patch) | |
tree | 1f83245dbb3d2d3efbcc98bb3a3215cdbbf628d5 /ethereal/assets/qml/views | |
parent | e12abfd43b99e05a05957922f01e4f5460d286fb (diff) | |
download | go-tangerine-88655439a017ea74041d022a9f23a919d27f51e2.tar go-tangerine-88655439a017ea74041d022a9f23a919d27f51e2.tar.gz go-tangerine-88655439a017ea74041d022a9f23a919d27f51e2.tar.bz2 go-tangerine-88655439a017ea74041d022a9f23a919d27f51e2.tar.lz go-tangerine-88655439a017ea74041d022a9f23a919d27f51e2.tar.xz go-tangerine-88655439a017ea74041d022a9f23a919d27f51e2.tar.zst go-tangerine-88655439a017ea74041d022a9f23a919d27f51e2.zip |
Copy to clipboard hax
Diffstat (limited to 'ethereal/assets/qml/views')
-rw-r--r-- | ethereal/assets/qml/views/chain.qml | 7 | ||||
-rw-r--r-- | ethereal/assets/qml/views/info.qml | 41 |
2 files changed, 48 insertions, 0 deletions
diff --git a/ethereal/assets/qml/views/chain.qml b/ethereal/assets/qml/views/chain.qml index 270018eb2..9fbc02954 100644 --- a/ethereal/assets/qml/views/chain.qml +++ b/ethereal/assets/qml/views/chain.qml @@ -74,6 +74,13 @@ Rectangle { MenuSeparator{} MenuItem { + text: "Copy" + onTriggered: { + copyToClipboard(blockModel.get(this.row).hash) + } + } + + MenuItem { text: "Dump State" onTriggered: { generalFileDialog.show(false, function(path) { diff --git a/ethereal/assets/qml/views/info.qml b/ethereal/assets/qml/views/info.qml index 3335a306a..60b6a62ec 100644 --- a/ethereal/assets/qml/views/info.qml +++ b/ethereal/assets/qml/views/info.qml @@ -57,6 +57,47 @@ Rectangle { TableViewColumn{ role: "address"; title: "address"; width: 300} model: addressModel + 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.LeftButton | Qt.RightButton + propagateComposedEvents: true + anchors.fill: parent + onClicked: { + addressView.selection.clear() + addressView.selection.select(styleData.row) + + if(mouse.button == Qt.RightButton) { + contextMenu.row = styleData.row; + contextMenu.popup() + } + } + } + } + + } + + Menu { + id: contextMenu + property var row; + + MenuItem { + text: "Copy" + onTriggered: { + copyToClipboard(addressModel.get(this.row).address) + } + } + } } property var logModel: ListModel { |