MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / setOptionsModel

Method setOptionsModel

src/qt/bitcoingui.cpp:1689–1701  ·  view source on GitHub ↗

Lets the control know about the Options Model (and its signals) */

Source from the content-addressed store, hash-verified

1687
1688/** Lets the control know about the Options Model (and its signals) */
1689void UnitDisplayStatusBarControl::setOptionsModel(OptionsModel *_optionsModel)
1690{
1691 if (_optionsModel)
1692 {
1693 this->optionsModel = _optionsModel;
1694
1695 // be aware of a display unit change reported by the OptionsModel object.
1696 connect(_optionsModel, &OptionsModel::displayUnitChanged, this, &UnitDisplayStatusBarControl::updateDisplayUnit);
1697
1698 // initialize the display units label with the current value in the model.
1699 updateDisplayUnit(_optionsModel->getDisplayUnit());
1700 }
1701}
1702
1703/** When Display Units are changed on OptionsModel it will refresh the display text of the control on the status bar */
1704void UnitDisplayStatusBarControl::updateDisplayUnit(BitcoinUnit newUnits)

Callers 2

initializeResultMethod · 0.45
setClientModelMethod · 0.45

Calls 1

getDisplayUnitMethod · 0.80

Tested by

no test coverage detected