github.com/jonasnick/go-ethereum@v0.7.12-0.20150216215225-22176f05d387/cmd/mist/assets/qml/views/history.qml (about) 1 import QtQuick 2.0 2 import QtQuick.Controls 1.0; 3 import QtQuick.Layouts 1.0; 4 import QtQuick.Dialogs 1.0; 5 import QtQuick.Window 2.1; 6 import QtQuick.Controls.Styles 1.1 7 import Ethereum 1.0 8 9 Rectangle { 10 property var title: "Transactions" 11 property var menuItem 12 13 14 id: historyView 15 visible: false 16 anchors.fill: parent 17 objectName: "transactionView" 18 19 property var txModel: ListModel { 20 id: txModel 21 } 22 TableView { 23 id: txTableView 24 anchors.fill: parent 25 TableViewColumn{ role: "inout" ; title: "" ; width: 40 } 26 TableViewColumn{ role: "value" ; title: "Value" ; width: 100 } 27 TableViewColumn{ role: "address" ; title: "Address" ; width: 430 } 28 TableViewColumn{ role: "contract" ; title: "Contract" ; width: 100 } 29 30 model: txModel 31 } 32 33 function addTx(tx, inout) { 34 var isContract 35 if (tx.contract == true){ 36 isContract = "Yes" 37 }else{ 38 isContract = "No" 39 } 40 41 42 var address; 43 if(inout == "recv") { 44 address = tx.sender; 45 } else { 46 address = tx.address; 47 } 48 49 txModel.insert(0, {inout: inout, hash: tx.hash, address: address, value: tx.value, contract: isContract}) 50 } 51 }