![]() |
Bitcoin Core 32.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. | |
| void | SetMinValue (const CAmount &value) |
| Set the minimum value in satoshis. | |
| void | setSingleStep (const CAmount &step) |
| Set single step in satoshis. | |
| void | setValid (bool valid) |
| Mark current value as invalid in UI. | |
| bool | validate () |
| Perform input validation, mark field as invalid if entered value is not valid. | |
| void | setDisplayUnit (BitcoinUnit new_unit) |
| Change unit used to display amount. | |
| void | clear () |
| Make field empty and ready for new input. | |
| void | setEnabled (bool fEnabled) |
| Enable/Disable. | |
| 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. | |
Protected Member Functions | |
| bool | eventFilter (QObject *object, QEvent *event) override |
| Intercept focus-in event and ',' key presses. | |
Properties | |
| qint64 | value |
Private Slots | |
| void | unitChanged (int idx) |
Private Attributes | |
| AmountSpinBox * | amount {nullptr} |
| QValueComboBox * | unit |
Widget for entering bitcoin amounts.
Definition at line 21 of file bitcoinamountfield.h.
|
explicit |
| void BitcoinAmountField::clear | ( | ) |
Make field empty and ready for new input.
Definition at line 244 of file bitcoinamountfield.cpp.
Intercept focus-in event and ',' key presses.
Definition at line 272 of file bitcoinamountfield.cpp.
If allow empty is set to false the field will be set to the minimum allowed value if left empty.
Definition at line 299 of file bitcoinamountfield.cpp.
| void BitcoinAmountField::setDisplayUnit | ( | BitcoinUnit | new_unit | ) |
Change unit used to display amount.
Definition at line 320 of file bitcoinamountfield.cpp.
Enable/Disable.
Definition at line 250 of file bitcoinamountfield.cpp.
Set the minimum value in satoshis.
Definition at line 304 of file bitcoinamountfield.cpp.
Set single step in satoshis.
Definition at line 325 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 282 of file bitcoinamountfield.cpp.
Mark current value as invalid in UI.
Definition at line 264 of file bitcoinamountfield.cpp.
Definition at line 309 of file bitcoinamountfield.cpp.
| bool BitcoinAmountField::validate | ( | ) |
Perform input validation, mark field as invalid if entered value is not valid.
Definition at line 256 of file bitcoinamountfield.cpp.
|
signal |
|
private |
Definition at line 71 of file bitcoinamountfield.h.
|
private |
Definition at line 72 of file bitcoinamountfield.h.
|
readwrite |
Definition at line 27 of file bitcoinamountfield.h.