2020-08-14 19:19:08 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import "../../../imports"
|
|
|
|
import "../../../shared"
|
|
|
|
|
|
|
|
ModalPopup {
|
2020-08-20 04:45:29 +00:00
|
|
|
property alias selectedAccount: accountSelector.selectedAccount
|
2020-08-14 19:19:08 +00:00
|
|
|
id: popup
|
|
|
|
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "Receive"
|
|
|
|
title: qsTrId("receive")
|
2020-08-14 19:19:08 +00:00
|
|
|
height: 500
|
|
|
|
width: 500
|
|
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: qrCodeBox
|
|
|
|
height: 240
|
|
|
|
width: 240
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
radius: Style.current.radius
|
|
|
|
border.width: 1
|
|
|
|
border.color: Style.current.border
|
|
|
|
|
|
|
|
Image {
|
|
|
|
id: qrCodeImage
|
|
|
|
asynchronous: true
|
|
|
|
fillMode: Image.PreserveAspectFit
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
height: parent.height - Style.current.padding
|
|
|
|
width: parent.width - Style.current.padding
|
|
|
|
mipmap: true
|
|
|
|
smooth: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
AccountSelector {
|
|
|
|
id: accountSelector
|
|
|
|
label: ""
|
|
|
|
showAccountDetails: false
|
2021-06-08 12:48:31 +00:00
|
|
|
accounts: walletModel.accountsView.accounts
|
|
|
|
currency: walletModel.balanceView.defaultCurrency
|
2020-08-14 19:19:08 +00:00
|
|
|
anchors.top: qrCodeBox.bottom
|
|
|
|
anchors.topMargin: Style.current.padding
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
width: 240
|
2020-08-13 08:24:51 +00:00
|
|
|
dropdownWidth: parent.width - (Style.current.padding * 2)
|
|
|
|
dropdownAlignment: Select.MenuAlignment.Center
|
2020-08-20 04:45:29 +00:00
|
|
|
onSelectedAccountChanged: {
|
|
|
|
if (selectedAccount.address) {
|
|
|
|
qrCodeImage.source = profileModel.qrCode(selectedAccount.address)
|
|
|
|
txtWalletAddress.text = selectedAccount.address
|
|
|
|
}
|
|
|
|
}
|
2020-08-14 19:19:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Input {
|
2021-04-13 15:06:15 +00:00
|
|
|
id: txtWalletAddress
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "Wallet address"
|
|
|
|
label: qsTrId("wallet-address")
|
2020-08-14 19:19:08 +00:00
|
|
|
anchors.top: accountSelector.bottom
|
|
|
|
anchors.topMargin: Style.current.padding
|
|
|
|
copyToClipboard: true
|
|
|
|
textField.readOnly: true
|
|
|
|
customHeight: 56
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*##^##
|
|
|
|
Designer {
|
|
|
|
D{i:0;autoSize:true;height:480;width:640}
|
|
|
|
}
|
|
|
|
##^##*/
|
|
|
|
|