![]() |
Bitcoin Core 22.99.0
P2P Digital Currency
|
Widget for entering bitcoin amounts. More...
#include <bitcoinamountfield.h>
Signals | |
| void | valueChanged () |
Public Member Functions | |
| BitcoinAmountField (QWidget *parent=nullptr) | |
| CAmount | value (bool *value=nullptr) const |
| void | setValue (const CAmount &value) |
| void | SetAllowEmpty (bool allow) |
| If allow empty is set to false the field will be set to the minimum allowed value if left empty. More... | |
| void | SetMinValue (const CAmount &value) |
| Set the minimum value in satoshis. More... | |
| void | SetMaxValue (const CAmount &value) |
| Set the maximum value in satoshis. More... | |
| void | setSingleStep (const CAmount &step) |
| Set single step in satoshis. More... | |
| void | setReadOnly (bool fReadOnly) |
| Make read-only. More... | |
| void | setValid (bool valid) |
| Mark current value as invalid in UI. More... | |
| bool | validate () |
| Perform input validation, mark field as invalid if entered value is not valid. More... | |
| void | setDisplayUnit (int unit) |
| Change unit used to display amount. More... | |
| void | clear () |
| Make field empty and ready for new input. More... | |
| void | setEnabled (bool fEnabled) |
| Enable/Disable. More... | |
| QWidget * | setupTabChain (QWidget *prev) |
| Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907), in these cases we have to set it up manually. More... | |
Protected Member Functions | |
| bool | eventFilter (QObject *object, QEvent *event) override |
| Intercept focus-in event and ',' key presses. More... | |
Properties | |
| qint64 | value |
Private Slots | |
| void | unitChanged (int idx) |
Private Attributes | |
| AmountSpinBox * | amount |
| QValueComboBox * | unit |
Widget for entering bitcoin amounts.
Definition at line 20 of file bitcoinamountfield.h.
|
explicit |
| void BitcoinAmountField::clear | ( | ) |
Make field empty and ready for new input.
Definition at line 248 of file bitcoinamountfield.cpp.
|
overrideprotected |
Intercept focus-in event and ',' key presses.
Definition at line 276 of file bitcoinamountfield.cpp.
| void BitcoinAmountField::SetAllowEmpty | ( | bool | allow | ) |
If allow empty is set to false the field will be set to the minimum allowed value if left empty.
Definition at line 303 of file bitcoinamountfield.cpp.
| void BitcoinAmountField::setDisplayUnit | ( | int | unit | ) |
Change unit used to display amount.
Definition at line 334 of file bitcoinamountfield.cpp.
| void BitcoinAmountField::setEnabled | ( | bool | fEnabled | ) |
Enable/Disable.
Definition at line 254 of file bitcoinamountfield.cpp.
| void BitcoinAmountField::SetMaxValue | ( | const CAmount & | value | ) |
Set the maximum value in satoshis.
Definition at line 313 of file bitcoinamountfield.cpp.
| void BitcoinAmountField::SetMinValue | ( | const CAmount & | value | ) |
Set the minimum value in satoshis.
Definition at line 308 of file bitcoinamountfield.cpp.
| void BitcoinAmountField::setReadOnly | ( | bool | fReadOnly | ) |
Make read-only.
Definition at line 318 of file bitcoinamountfield.cpp.
| void BitcoinAmountField::setSingleStep | ( | const CAmount & | step | ) |
Set single step in satoshis.
Definition at line 339 of file bitcoinamountfield.cpp.
| QWidget * BitcoinAmountField::setupTabChain | ( | QWidget * | prev | ) |
Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907), in these cases we have to set it up manually.
Definition at line 286 of file bitcoinamountfield.cpp.
| void BitcoinAmountField::setValid | ( | bool | valid | ) |
Mark current value as invalid in UI.
Definition at line 268 of file bitcoinamountfield.cpp.
| void BitcoinAmountField::setValue | ( | const CAmount & | value | ) |
Definition at line 298 of file bitcoinamountfield.cpp.
|
privateslot |
Definition at line 323 of file bitcoinamountfield.cpp.
| bool BitcoinAmountField::validate | ( | ) |
Perform input validation, mark field as invalid if entered value is not valid.
Definition at line 260 of file bitcoinamountfield.cpp.
| CAmount BitcoinAmountField::value | ( | bool * | value = nullptr | ) | const |
|
signal |
Definition at line 182 of file moc_bitcoinamountfield.cpp.
|
private |
Definition at line 76 of file bitcoinamountfield.h.
|
private |
Definition at line 77 of file bitcoinamountfield.h.
|
readwrite |
Definition at line 16 of file bitcoinamountfield.h.