Lets the control know about the Options Model (and its signals) */
| 1687 | |
| 1688 | /** Lets the control know about the Options Model (and its signals) */ |
| 1689 | void 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 */ |
| 1704 | void UnitDisplayStatusBarControl::updateDisplayUnit(BitcoinUnit newUnits) |
no test coverage detected