Bitcoin
|
#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) |
void | SetMinValue (const CAmount &value) |
void | SetMaxValue (const CAmount &value) |
void | setSingleStep (const CAmount &step) |
void | setReadOnly (bool fReadOnly) |
void | setValid (bool valid) |
bool | validate () |
void | setDisplayUnit (int unit) |
void | clear () |
void | setEnabled (bool fEnabled) |
QWidget * | setupTabChain (QWidget *prev) |
Protected Member Functions | |
bool | eventFilter (QObject *object, QEvent *event) |
Properties | |
qint64 | value |
Private Slots | |
void | unitChanged (int idx) |
Private Attributes | |
AmountSpinBox * | amount |
QValueComboBox * | unit |
Widget for entering bitcoin amounts.
|
explicit |
void BitcoinAmountField::clear | ( | ) |
Make field empty and ready for new input.
|
protected |
Intercept focus-in event and ',' key presses
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.
void BitcoinAmountField::setDisplayUnit | ( | int | unit | ) |
Change unit used to display amount.
void BitcoinAmountField::setEnabled | ( | bool | fEnabled | ) |
Enable/Disable.
void BitcoinAmountField::SetMaxValue | ( | const CAmount & | value | ) |
Set the maximum value in satoshis
void BitcoinAmountField::SetMinValue | ( | const CAmount & | value | ) |
Set the minimum value in satoshis
void BitcoinAmountField::setReadOnly | ( | bool | fReadOnly | ) |
Make read-only
void BitcoinAmountField::setSingleStep | ( | const CAmount & | step | ) |
Set single step in satoshis
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.
void BitcoinAmountField::setValid | ( | bool | valid | ) |
Mark current value as invalid in UI.
void BitcoinAmountField::setValue | ( | const CAmount & | value | ) |
|
privateslot |
bool BitcoinAmountField::validate | ( | ) |
Perform input validation, mark field as invalid if entered value is not valid.
CAmount BitcoinAmountField::value | ( | bool * | value = nullptr | ) | const |
|
signal |
|
private |
|
private |
|
readwrite |