github.com/jonasnick/go-ethereum@v0.7.12-0.20150216215225-22176f05d387/cmd/mist/assets/qml/views/pending_tx.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: "Pending Transactions"
    11  	property var menuItem
    12  
    13  	objectName: "pendingTxView"
    14  	anchors.fill: parent
    15  	visible: false
    16  	id: pendingTxView
    17  
    18  	property var pendingTxModel: ListModel {
    19  		id: pendingTxModel
    20  	}
    21  
    22  	TableView {
    23  		id: pendingTxTableView
    24  		anchors.fill: parent
    25  		TableViewColumn{ role: "value" ; title: "Value" ; width: 100 }
    26  		TableViewColumn{ role: "from" ; title: "sender" ; width: 230 }
    27  		TableViewColumn{ role: "to" ; title: "Reciever" ; width: 230 }
    28  		TableViewColumn{ role: "contract" ; title: "Contract" ; width: 100 }
    29  
    30  		model: pendingTxModel
    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  		pendingTxModel.insert(0, {hash: tx.hash, to: tx.address, from: tx.sender, value: tx.value, contract: isContract})
    43  	}
    44  }