Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Widget for entering bitcoin amounts. More...
#include <bitcoinamountfield.h>
Signals | |
void | valueChanged () |
Public Member Functions | |
BitcoinAmountField (QWidget *parent=0) | |
CAmount | value (bool *value=0) const |
void | setValue (const CAmount &value) |
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) |
Intercept focus-in event and ',' key presses. More... | |
Properties | |
qint64 | value |
Private Member Functions | |
void | unitChanged (int idx) |
Private Attributes | |
AmountLineEdit * | amount |
BitcoinUnits * | units |
Detailed Description
Widget for entering bitcoin amounts.
Definition at line 22 of file bitcoinamountfield.h.
Constructor & Destructor Documentation
◆ BitcoinAmountField()
|
explicit |
Definition at line 159 of file bitcoinamountfield.cpp.
References amount, units, and valueChanged().
Member Function Documentation
◆ clear()
void BitcoinAmountField::clear | ( | ) |
Make field empty and ready for new input.
Definition at line 184 of file bitcoinamountfield.cpp.
References amount.
◆ eventFilter()
|
protected |
Intercept focus-in event and ',' key presses.
Definition at line 210 of file bitcoinamountfield.cpp.
References setValid().
◆ setDisplayUnit()
void BitcoinAmountField::setDisplayUnit | ( | int | unit | ) |
Change unit used to display amount.
Definition at line 254 of file bitcoinamountfield.cpp.
References unitChanged().
◆ setEnabled()
void BitcoinAmountField::setEnabled | ( | bool | fEnabled | ) |
◆ setReadOnly()
void BitcoinAmountField::setReadOnly | ( | bool | fReadOnly | ) |
◆ setupTabChain()
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 220 of file bitcoinamountfield.cpp.
References amount.
◆ setValid()
void BitcoinAmountField::setValid | ( | bool | valid | ) |
Mark current value as invalid in UI.
Definition at line 202 of file bitcoinamountfield.cpp.
References amount, GUIUtil::getThemedStyleQString(), and GUIUtil::TS_INVALID.
Referenced by eventFilter(), and validate().
◆ setValue()
void BitcoinAmountField::setValue | ( | const CAmount & | value | ) |
Definition at line 231 of file bitcoinamountfield.cpp.
References amount, AmountLineEdit::setValue(), and value.
◆ unitChanged()
|
private |
Definition at line 241 of file bitcoinamountfield.cpp.
References amount, BitcoinUnits::data(), AmountLineEdit::setDisplayUnit(), BitcoinUnits::UnitRole, and units.
Referenced by setDisplayUnit().
◆ validate()
bool BitcoinAmountField::validate | ( | ) |
Perform input validation, mark field as invalid if entered value is not valid.
Definition at line 194 of file bitcoinamountfield.cpp.
References setValid(), and value.
◆ value()
CAmount BitcoinAmountField::value | ( | bool * | value = 0 | ) | const |
Definition at line 226 of file bitcoinamountfield.cpp.
References amount, and AmountLineEdit::value().
◆ valueChanged
|
signal |
Referenced by BitcoinAmountField().
Member Data Documentation
◆ amount
|
private |
Definition at line 66 of file bitcoinamountfield.h.
Referenced by BitcoinAmountField(), clear(), setEnabled(), setReadOnly(), setupTabChain(), setValid(), setValue(), unitChanged(), and value().
◆ units
|
private |
Definition at line 67 of file bitcoinamountfield.h.
Referenced by BitcoinAmountField(), and unitChanged().
Property Documentation
◆ value
|
readwrite |
Definition at line 28 of file bitcoinamountfield.h.
Referenced by setValue(), and validate().
The documentation for this class was generated from the following files:
- src/qt/bitcoinamountfield.h
- src/qt/bitcoinamountfield.cpp