2023-09-15 08:51:06 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
2023-04-06 19:26:56 +00:00
|
|
|
|
2024-08-14 21:56:48 +00:00
|
|
|
import Qt.labs.settings 1.1
|
2023-04-06 19:26:56 +00:00
|
|
|
|
2024-08-14 21:56:48 +00:00
|
|
|
import shared.popups.send.views 1.0
|
2023-04-06 19:26:56 +00:00
|
|
|
|
|
|
|
SplitView {
|
2024-08-14 21:56:48 +00:00
|
|
|
orientation: Qt.Vertical
|
|
|
|
SplitView.fillWidth: true
|
2023-04-06 19:26:56 +00:00
|
|
|
|
2024-08-14 21:56:48 +00:00
|
|
|
Item {
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.fillHeight: true
|
2024-02-05 16:44:49 +00:00
|
|
|
|
2024-08-14 21:56:48 +00:00
|
|
|
AmountToSend {
|
|
|
|
id: amountToSend
|
2023-04-06 19:26:56 +00:00
|
|
|
|
2024-08-14 21:56:48 +00:00
|
|
|
anchors.centerIn: parent
|
2024-04-16 09:09:02 +00:00
|
|
|
|
2024-08-14 21:56:48 +00:00
|
|
|
interactive: interactiveCheckBox.checked
|
|
|
|
fiatInputInteractive: fiatInteractiveCheckBox.checked
|
|
|
|
markAsInvalid: markAsInvalidCheckBox.checked
|
2024-04-16 09:09:02 +00:00
|
|
|
|
2024-08-14 21:56:48 +00:00
|
|
|
mainInputLoading: ctrlMainInputLoading.checked
|
|
|
|
bottomTextLoading: ctrlBottomTextLoading.checked
|
2023-04-06 19:26:56 +00:00
|
|
|
|
2024-08-14 21:56:48 +00:00
|
|
|
caption: "Amount to send"
|
|
|
|
|
|
|
|
decimalPoint: decimalPointRadioButton.checked ? "." : ","
|
|
|
|
price: parseFloat(priceTextField.text)
|
|
|
|
|
|
|
|
multiplierIndex: multiplierIndexSpinBox.value
|
|
|
|
|
|
|
|
formatFiat: balance => `${balance.toLocaleString(Qt.locale())} USD`
|
|
|
|
formatBalance: balance => `${balance.toLocaleString(Qt.locale())} ETH`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Pane {
|
|
|
|
id: logsAndControlsPanel
|
|
|
|
|
|
|
|
SplitView.minimumHeight: 350
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
spacing: 15
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
Label {
|
|
|
|
text: "Price"
|
2023-04-06 19:26:56 +00:00
|
|
|
}
|
2024-08-14 21:56:48 +00:00
|
|
|
|
|
|
|
TextField {
|
|
|
|
id: priceTextField
|
|
|
|
|
|
|
|
text: "812.323"
|
2023-04-06 19:26:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-08-14 21:56:48 +00:00
|
|
|
RowLayout {
|
|
|
|
Label {
|
|
|
|
text: "Decimal point"
|
|
|
|
}
|
2023-04-06 19:26:56 +00:00
|
|
|
|
2024-08-14 21:56:48 +00:00
|
|
|
RadioButton {
|
|
|
|
id: decimalPointRadioButton
|
2023-04-06 19:26:56 +00:00
|
|
|
|
2024-08-14 21:56:48 +00:00
|
|
|
text: "."
|
|
|
|
}
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
text: ","
|
|
|
|
checked: true
|
|
|
|
}
|
|
|
|
}
|
2023-04-06 19:26:56 +00:00
|
|
|
|
2024-08-14 21:56:48 +00:00
|
|
|
RowLayout {
|
2024-05-28 17:39:41 +00:00
|
|
|
Label {
|
2024-08-14 21:56:48 +00:00
|
|
|
text: "Multiplier index"
|
2024-05-28 17:39:41 +00:00
|
|
|
}
|
2023-04-06 19:26:56 +00:00
|
|
|
|
2024-08-14 21:56:48 +00:00
|
|
|
SpinBox {
|
|
|
|
id: multiplierIndexSpinBox
|
|
|
|
|
|
|
|
editable: true
|
|
|
|
value: 18
|
|
|
|
to: 30
|
2024-05-28 17:39:41 +00:00
|
|
|
}
|
2024-08-14 21:56:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
CheckBox {
|
|
|
|
id: interactiveCheckBox
|
|
|
|
|
|
|
|
text: "Interactive"
|
|
|
|
checked: true
|
|
|
|
}
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: fiatInteractiveCheckBox
|
2023-04-06 19:26:56 +00:00
|
|
|
|
2024-08-14 21:56:48 +00:00
|
|
|
text: "Fiat mode interactive"
|
|
|
|
checked: true
|
|
|
|
}
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: markAsInvalidCheckBox
|
|
|
|
|
|
|
|
text: "Mark as invalid"
|
|
|
|
}
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: ctrlMainInputLoading
|
|
|
|
text: "Input loading"
|
|
|
|
}
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: ctrlBottomTextLoading
|
|
|
|
text: "Bottom text loading"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
font.bold: true
|
|
|
|
text: `fiat mode: ${amountToSend.fiatMode}, ` +
|
|
|
|
`valid: ${amountToSend.valid}, ` +
|
|
|
|
`empty: ${amountToSend.empty}, ` +
|
|
|
|
`amount: ${amountToSend.amount}`
|
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
2024-05-28 17:39:41 +00:00
|
|
|
Label {
|
2024-08-14 21:56:48 +00:00
|
|
|
text: `Set value`
|
2024-05-28 17:39:41 +00:00
|
|
|
}
|
2023-04-06 19:26:56 +00:00
|
|
|
|
2024-05-28 17:39:41 +00:00
|
|
|
TextField {
|
2024-08-14 21:56:48 +00:00
|
|
|
id: amountTextField
|
|
|
|
|
|
|
|
text: "0.0012"
|
2024-05-28 17:39:41 +00:00
|
|
|
}
|
2023-09-15 08:51:06 +00:00
|
|
|
|
2024-08-14 21:56:48 +00:00
|
|
|
Button {
|
|
|
|
text: "SET"
|
2023-09-15 08:51:06 +00:00
|
|
|
|
2024-08-14 21:56:48 +00:00
|
|
|
onClicked: {
|
|
|
|
amountToSend.setValue(amountTextField.text)
|
|
|
|
}
|
2024-05-28 17:39:41 +00:00
|
|
|
}
|
2023-09-15 08:51:06 +00:00
|
|
|
}
|
2023-04-06 19:26:56 +00:00
|
|
|
}
|
|
|
|
}
|
2024-08-14 21:56:48 +00:00
|
|
|
|
|
|
|
Settings {
|
|
|
|
property alias multiplier: multiplierIndexSpinBox.value
|
|
|
|
}
|
2023-04-06 19:26:56 +00:00
|
|
|
}
|
2023-07-31 12:21:14 +00:00
|
|
|
|
2023-09-15 08:51:06 +00:00
|
|
|
// category: Components
|