Need to override default Ctrl+C action for amount as default behaviour is just to copy DisplayRole text
| 599 | |
| 600 | // Need to override default Ctrl+C action for amount as default behaviour is just to copy DisplayRole text |
| 601 | bool TransactionView::eventFilter(QObject *obj, QEvent *event) |
| 602 | { |
| 603 | if (event->type() == QEvent::KeyPress) |
| 604 | { |
| 605 | QKeyEvent *ke = static_cast<QKeyEvent *>(event); |
| 606 | if (ke->key() == Qt::Key_C && ke->modifiers().testFlag(Qt::ControlModifier)) |
| 607 | { |
| 608 | GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::TxPlainTextRole); |
| 609 | return true; |
| 610 | } |
| 611 | } |
| 612 | if (event->type() == QEvent::EnabledChange) { |
| 613 | if (!isEnabled()) { |
| 614 | closeOpenedDialogs(); |
| 615 | } |
| 616 | } |
| 617 | return QWidget::eventFilter(obj, event); |
| 618 | } |
| 619 | |
| 620 | void TransactionView::closeOpenedDialogs() |
| 621 | { |
nothing calls this directly
no test coverage detected