MCPcopy Create free account
hub / github.com/ElementsProject/elements / setOptionsModel

Method setOptionsModel

src/qt/bitcoingui.cpp:1517–1529  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1515
1516/** Lets the control know about the Options Model (and its signals) */
1517void UnitDisplayStatusBarControl::setOptionsModel(OptionsModel *_optionsModel)
1518{
1519 if (_optionsModel)
1520 {
1521 this->optionsModel = _optionsModel;
1522
1523 // be aware of a display unit change reported by the OptionsModel object.
1524 connect(_optionsModel, &OptionsModel::displayUnitChanged, this, &UnitDisplayStatusBarControl::updateDisplayUnit);
1525
1526 // initialize the display units label with the current value in the model.
1527 updateDisplayUnit(_optionsModel->getDisplayUnit());
1528 }
1529}
1530
1531/** When Display Units are changed on OptionsModel it will refresh the display text of the control on the status bar */
1532void UnitDisplayStatusBarControl::updateDisplayUnit(int newUnits)

Callers 1

setClientModelMethod · 0.45

Calls 1

getDisplayUnitMethod · 0.80

Tested by

no test coverage detected