Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoinamountfield.cpp
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | void stepBy(int steps) override { | ||||
val = qBound(m_min_amount, val, m_max_amount); | val = qBound(m_min_amount, val, m_max_amount); | ||||
setValue(val); | setValue(val); | ||||
} | } | ||||
void setDisplayUnit(int unit) { | void setDisplayUnit(int unit) { | ||||
bool valid = false; | bool valid = false; | ||||
Amount val(value(&valid)); | Amount val(value(&valid)); | ||||
currentUnit = unit; | currentUnit = unit; | ||||
lineEdit()->setPlaceholderText(BitcoinUnits::format( | |||||
currentUnit, m_min_amount, false, BitcoinUnits::separatorAlways)); | |||||
if (valid) { | if (valid) { | ||||
setValue(val); | setValue(val); | ||||
} else { | } else { | ||||
clear(); | clear(); | ||||
} | } | ||||
} | } | ||||
void setSingleStep(const Amount step) { singleStep = step; } | void setSingleStep(const Amount step) { singleStep = step; } | ||||
▲ Show 20 Lines • Show All 228 Lines • Show Last 20 Lines |