5#ifndef BITCOIN_QT_BITCOINAMOUNTFIELD_H
6#define BITCOIN_QT_BITCOINAMOUNTFIELD_H
QSpinBox that uses fixed-point numbers internally and uses our own formatting/parsing functions.
Widget for entering bitcoin amounts.
void setEnabled(bool fEnabled)
Enable/Disable.
void SetMaxValue(const Amount &value)
Set the maximum value in satoshis.
bool eventFilter(QObject *object, QEvent *event) override
Intercept focus-in event and ',' key presses.
void setReadOnly(bool fReadOnly)
Make read-only.
void unitChanged(int idx)
void setDisplayUnit(int unit)
Change unit used to display amount.
void clear()
Make field empty and ready for new input.
bool validate()
Perform input validation, mark field as invalid if entered value is not valid.
QWidget * setupTabChain(QWidget *prev)
Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project....
void setValue(const Amount value)
void setValid(bool valid)
Mark current value as invalid in UI.
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 setSingleStep(const Amount step)
Set single step in satoshis.
void SetMinValue(const Amount &value)
Set the minimum value in satoshis.
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...