MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / eventFilter

Method eventFilter

src/qt/transactionview.cpp:625–637  ·  view source on GitHub ↗

Need to override default Ctrl+C action for amount as default behaviour is just to copy DisplayRole text

Source from the content-addressed store, hash-verified

623
624// Need to override default Ctrl+C action for amount as default behaviour is just to copy DisplayRole text
625bool TransactionView::eventFilter(QObject *obj, QEvent *event)
626{
627 if (event->type() == QEvent::KeyPress)
628 {
629 QKeyEvent *ke = static_cast<QKeyEvent *>(event);
630 if (ke->key() == Qt::Key_C && ke->modifiers().testFlag(Qt::ControlModifier))
631 {
632 GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::TxPlainTextRole);
633 return true;
634 }
635 }
636 return QWidget::eventFilter(obj, event);
637}
638
639// show/hide column Watch-only
640void TransactionView::updateWatchOnlyColumn(bool fHaveWatchOnly)

Callers

nothing calls this directly

Calls 3

copyEntryDataFunction · 0.85
typeMethod · 0.80
keyMethod · 0.45

Tested by

no test coverage detected