context menu
| 261 | |
| 262 | // context menu |
| 263 | void 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 |
| 281 | void ReceiveCoinsDialog::copyAddress() |
nothing calls this directly
no test coverage detected