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

Method showMenu

src/qt/receivecoinsdialog.cpp:263–278  ·  view source on GitHub ↗

context menu

Source from the content-addressed store, hash-verified

261
262// context menu
263void ReceiveCoinsDialog::showMenu(const QPoint &point)
264{
265 const QModelIndex sel = selectedRow();
266 if (!sel.isValid()) {
267 return;
268 }
269
270 // disable context menu actions when appropriate
271 const RecentRequestsTableModel* const submodel = model->getRecentRequestsTableModel();
272 const RecentRequestEntry& req = submodel->entry(sel.row());
273 copyLabelAction->setDisabled(req.recipient.label.isEmpty());
274 copyMessageAction->setDisabled(req.recipient.message.isEmpty());
275 copyAmountAction->setDisabled(req.recipient.amount == 0);
276
277 contextMenu->exec(QCursor::pos());
278}
279
280// context menu action: copy address
281void ReceiveCoinsDialog::copyAddress()

Callers

nothing calls this directly

Calls 3

execMethod · 0.80
isValidMethod · 0.45

Tested by

no test coverage detected