Sander van Grieken
4 years ago
8 changed files with 403 additions and 184 deletions
@ -0,0 +1,31 @@ |
|||
import QtQuick 2.6 |
|||
import QtQuick.Layouts 1.0 |
|||
import QtQuick.Controls 2.0 |
|||
|
|||
Item { |
|||
height: layout.height |
|||
|
|||
GridLayout { |
|||
id: layout |
|||
|
|||
columns: 3 |
|||
Label { |
|||
Layout.columnSpan: 3 |
|||
font.pointSize: 14 |
|||
text: 'Balance: ' + Daemon.currentWallet.confirmedBalance //'5.6201 mBTC' |
|||
} |
|||
Label { |
|||
font.pointSize: 8 |
|||
text: 'Confirmed: ' + Daemon.currentWallet.confirmedBalance |
|||
} |
|||
Label { |
|||
font.pointSize: 8 |
|||
text: 'Unconfirmed: ' + Daemon.currentWallet.unconfirmedBalance |
|||
} |
|||
Label { |
|||
font.pointSize: 8 |
|||
text: 'Lightning: ?' |
|||
} |
|||
} |
|||
|
|||
} |
@ -1,59 +1,87 @@ |
|||
import QtQuick 2.6 |
|||
import QtQuick.Controls 2.3 |
|||
import QtQuick.Layouts 1.0 |
|||
import QtQml 2.6 |
|||
|
|||
Item { |
|||
id: rootItem |
|||
|
|||
property string title: 'Network' |
|||
property string title: Daemon.walletName |
|||
|
|||
property QtObject menu: Menu { |
|||
MenuItem { text: 'Wallets'; onTriggered: stack.push(Qt.resolvedUrl('Wallets.qml')) } |
|||
MenuItem { text: 'Network'; onTriggered: stack.push(Qt.resolvedUrl('NetworkStats.qml')) } |
|||
} |
|||
|
|||
Column { |
|||
width: parent.width |
|||
ColumnLayout { |
|||
anchors.fill: parent |
|||
|
|||
Button { |
|||
text: 'Scan QR Code' |
|||
onClicked: app.stack.push(Qt.resolvedUrl('Scan.qml')) |
|||
TabBar { |
|||
id: tabbar |
|||
Layout.fillWidth: true |
|||
currentIndex: swipeview.currentIndex |
|||
TabButton { |
|||
text: qsTr('Receive') |
|||
} |
|||
TabButton { |
|||
text: qsTr('History') |
|||
} |
|||
TabButton { |
|||
enabled: !Daemon.currentWallet.isWatchOnly |
|||
text: qsTr('Send') |
|||
} |
|||
} |
|||
|
|||
Button { |
|||
text: 'Send' |
|||
onClicked: app.stack.push(Qt.resolvedUrl('Send.qml')) |
|||
} |
|||
SwipeView { |
|||
id: swipeview |
|||
|
|||
Button { |
|||
text: 'Show TX History' |
|||
onClicked: app.stack.push(Qt.resolvedUrl('History.qml')) |
|||
} |
|||
Layout.fillHeight: true |
|||
Layout.fillWidth: true |
|||
currentIndex: tabbar.currentIndex |
|||
|
|||
Item { |
|||
|
|||
ColumnLayout { |
|||
width: parent.width |
|||
y: 20 |
|||
spacing: 20 |
|||
|
|||
Button { |
|||
onClicked: stack.push(Qt.resolvedUrl('Wallets.qml')) |
|||
text: 'Wallets' |
|||
Layout.alignment: Qt.AlignHCenter |
|||
} |
|||
|
|||
Button { |
|||
text: 'Create Wallet' |
|||
onClicked: { |
|||
var dialog = newWalletWizard.createObject(rootItem) |
|||
dialog.open() |
|||
Button { |
|||
text: 'Create Wallet' |
|||
Layout.alignment: Qt.AlignHCenter |
|||
onClicked: { |
|||
var dialog = app.newWalletWizard.createObject(rootItem) |
|||
dialog.open() |
|||
} |
|||
} |
|||
|
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
Item { |
|||
History { |
|||
id: history |
|||
anchors.fill: parent |
|||
} |
|||
} |
|||
|
|||
Component { |
|||
id: newWalletWizard |
|||
NewWalletWizard { |
|||
parent: Overlay.overlay |
|||
x: 12 |
|||
y: 12 |
|||
width: parent.width - 24 |
|||
height: parent.height - 24 |
|||
|
|||
Overlay.modal: Rectangle { |
|||
color: "#aa000000" |
|||
|
|||
Item { |
|||
enabled: !Daemon.currentWallet.isWatchOnly |
|||
Send { |
|||
anchors.fill: parent |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
|
Loading…
Reference in new issue