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

Method createContextMenu

src/qt/bitcoingui.cpp:1507–1514  ·  view source on GitHub ↗

Creates context menu, its actions, and wires up all the relevant signals for mouse events. */

Source from the content-addressed store, hash-verified

1505
1506/** Creates context menu, its actions, and wires up all the relevant signals for mouse events. */
1507void UnitDisplayStatusBarControl::createContextMenu()
1508{
1509 menu = new QMenu(this);
1510 for (const BitcoinUnits::Unit u : BitcoinUnits::availableUnits()) {
1511 menu->addAction(BitcoinUnits::longName(u))->setData(QVariant(u));
1512 }
1513 connect(menu, &QMenu::triggered, this, &UnitDisplayStatusBarControl::onMenuSelection);
1514}
1515
1516/** Lets the control know about the Options Model (and its signals) */
1517void UnitDisplayStatusBarControl::setOptionsModel(OptionsModel *_optionsModel)

Callers

nothing calls this directly

Calls 1

setDataMethod · 0.45

Tested by

no test coverage detected