1
0

qml: many UI updates and additions

This commit is contained in:
Sander van Grieken
2021-04-07 16:50:34 +02:00
parent 6e482f437a
commit ba7bcbfcbc
8 changed files with 411 additions and 192 deletions

View File

@@ -2,42 +2,104 @@ import QtQuick 2.6
import QtQuick.Layouts 1.0
import QtQuick.Controls 2.0
Item {
Pane {
id: rootItem
property string title: 'Wallets'
anchors.fill: parent
ListView {
ColumnLayout {
id: layout
width: parent.width
height: parent.height
model: Daemon.availableWallets
delegate: Item {
width: ListView.view.width
height: 50
Item {
width: parent.width
height: detailsLayout.height
RowLayout {
x: 20
spacing: 20
Image {
source: "../../../gui/kivy/theming/light/wallet.png"
GridLayout {
id: detailsLayout
width: parent.width
columns: 4
Label { text: 'Wallet'; Layout.columnSpan: 2 }
Label { text: Daemon.walletName; Layout.columnSpan: 2 }
Label { text: 'txinType' }
Label { text: Daemon.currentWallet.txinType }
Label { text: 'is deterministic' }
Label { text: Daemon.currentWallet.isDeterministic }
Label { text: 'is watch only' }
Label { text: Daemon.currentWallet.isWatchOnly }
Label { text: 'is Encrypted' }
Label { text: Daemon.currentWallet.isEncrypted }
Label { text: 'is Hardware' }
Label { text: Daemon.currentWallet.isHardware }
Label { text: 'derivation path (BIP32)'; visible: Daemon.currentWallet.isDeterministic }
Label { text: Daemon.currentWallet.derivationPath; visible: Daemon.currentWallet.isDeterministic }
}
}
// }
Label {
font.pointSize: model.active ? 14 : 13
font.bold: model.active
text: model.name
Layout.fillWidth: true
Item {
width: parent.width
// height: detailsFrame.height
Layout.fillHeight: true
Frame {
id: detailsFrame
width: parent.width
height: parent.height
ListView {
id: listview
width: parent.width
// Layout.fillHeight: true
height: parent.height
clip:true
model: Daemon.availableWallets
// header: sadly seems to be buggy
delegate: AbstractButton {
width: ListView.view.width
height: 50
onClicked: console.log('delegate clicked')
RowLayout {
x: 20
spacing: 20
Image {
source: "../../../gui/kivy/theming/light/wallet.png"
}
Label {
font.pointSize: 12
text: model.name
Layout.fillWidth: true
}
Button {
text: 'Load'
onClicked: {
Daemon.load_wallet(model.path, null)
}
}
}
}
}}}
MouseArea {
anchors.fill: parent
onClicked: openMenu()
Button {
Layout.alignment: Qt.AlignHCenter
text: 'Create Wallet'
onClicked: {
var dialog = app.newWalletWizard.createObject(rootItem)
dialog.open()
}
}
}
}