2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
2020-06-02 01:02:50 +00:00
|
|
|
import "../../../../imports"
|
|
|
|
import "../../../../shared"
|
2020-06-04 16:00:07 +00:00
|
|
|
import "../data/"
|
2020-06-02 01:02:50 +00:00
|
|
|
|
|
|
|
Item {
|
|
|
|
id: element
|
|
|
|
property string currency: "USD"
|
|
|
|
|
|
|
|
Text {
|
|
|
|
id: modalDialogTitle
|
|
|
|
text: "Settings"
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.left: parent.left
|
|
|
|
font.bold: true
|
|
|
|
font.pixelSize: 17
|
|
|
|
anchors.leftMargin: 16
|
|
|
|
anchors.topMargin: 16
|
|
|
|
}
|
|
|
|
|
|
|
|
Image {
|
|
|
|
id: closeModalImg
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 16
|
|
|
|
anchors.topMargin: 16
|
2020-06-04 16:00:07 +00:00
|
|
|
source: "../../../../shared/img/close.svg"
|
2020-06-02 01:02:50 +00:00
|
|
|
MouseArea {
|
|
|
|
id: closeModalMouseArea
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
anchors.fill: parent
|
|
|
|
onClicked: {
|
|
|
|
popup.close()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Separator {
|
|
|
|
id: headerSeparator
|
|
|
|
anchors.top: modalDialogTitle.bottom
|
|
|
|
}
|
|
|
|
|
2020-06-04 16:00:07 +00:00
|
|
|
ButtonGroup {
|
|
|
|
id: currencyGroup
|
|
|
|
}
|
|
|
|
|
2020-06-02 01:02:50 +00:00
|
|
|
Item {
|
|
|
|
id: modalBody
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 32
|
2020-06-04 16:00:07 +00:00
|
|
|
anchors.top: headerSeparator.top
|
2020-06-02 01:02:50 +00:00
|
|
|
anchors.topMargin: Theme.padding
|
|
|
|
anchors.bottom: footerSeparator.top
|
2020-06-04 16:00:07 +00:00
|
|
|
anchors.bottomMargin: Theme.padding
|
2020-06-02 01:02:50 +00:00
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 32
|
|
|
|
|
2020-06-04 16:00:07 +00:00
|
|
|
ListView {
|
2020-06-02 01:02:50 +00:00
|
|
|
anchors.top: parent.top
|
2020-06-04 16:00:07 +00:00
|
|
|
anchors.topMargin: 10
|
2020-06-02 01:02:50 +00:00
|
|
|
anchors.left: parent.left
|
2020-06-04 16:00:07 +00:00
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
spacing: 10
|
|
|
|
id: tokenListView
|
|
|
|
model: Currencies {}
|
|
|
|
ScrollBar.vertical: ScrollBar { active: true }
|
|
|
|
|
|
|
|
delegate: Component {
|
|
|
|
Item {
|
|
|
|
id: element
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 0
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 10
|
|
|
|
width: parent.width
|
|
|
|
height: 52
|
|
|
|
|
|
|
|
Text {
|
|
|
|
text: name + " (" + code + ")"
|
|
|
|
font.pixelSize: 15
|
|
|
|
}
|
2020-06-02 01:02:50 +00:00
|
|
|
|
2020-06-04 16:00:07 +00:00
|
|
|
RadioButton {
|
|
|
|
checked: currency === key
|
|
|
|
anchors.right: parent.right
|
|
|
|
ButtonGroup.group: currencyGroup
|
|
|
|
onClicked: { walletModel.setDefaultCurrency(key) }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-02 01:02:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Separator {
|
|
|
|
id: footerSeparator
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.bottomMargin: 76
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledButton {
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: Theme.padding
|
|
|
|
label: "Save"
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.bottomMargin: Theme.padding
|
|
|
|
onClicked: {
|
2020-06-04 16:00:07 +00:00
|
|
|
console.log("TODO: apply all accounts")
|
2020-06-02 01:02:50 +00:00
|
|
|
popup.close()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*##^##
|
|
|
|
Designer {
|
|
|
|
D{i:0;autoSize:true;height:480;width:640}
|
|
|
|
}
|
|
|
|
##^##*/
|