peerplays_migrated/programs/light_client/qml/TransactionDelegate.qml
Nathan Hourt 762c8712a8 [GUI] Properly implement transaction delegate
Now that sending transactions works, it was time to rewrite the GUI
representation of a transaction to be general enough for more than just
one transaction type.
2015-08-05 16:03:13 -04:00

37 lines
894 B
QML

import QtQuick 2.5
import QtQuick.Layouts 1.2
import Graphene.Client 0.1
import "."
ColumnLayout {
id: base
spacing: Scaling.mm(2)
property Transaction trx
property GrapheneApplication app
Repeater {
model: trx.operations
Loader {
function load() {
var source
switch (modelData.operationType) {
case OperationBase.TransferOperationType: source = "TransferOperationDelegate.qml"
}
setSource(source, {"op": modelData, "app": base.app, "width": base.width})
}
Component.onCompleted: load()
// Debugging shim; disable before release
MouseArea {
anchors.fill: item
onClicked: {
console.log("Reloading " + parent.source)
parent.source = ""
parent.load()
}
}
}
}
}