|
|
@ -142,6 +142,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
|
|
|
|
QAction *copyAmountAction = new QAction(tr("Copy amount"), this);
|
|
|
|
QAction *copyAmountAction = new QAction(tr("Copy amount"), this);
|
|
|
|
QAction *copyTxIDAction = new QAction(tr("Copy transaction ID"), this);
|
|
|
|
QAction *copyTxIDAction = new QAction(tr("Copy transaction ID"), this);
|
|
|
|
QAction *copyTxHexAction = new QAction(tr("Copy raw transaction"), this);
|
|
|
|
QAction *copyTxHexAction = new QAction(tr("Copy raw transaction"), this);
|
|
|
|
|
|
|
|
QAction *copyTxPlainText = new QAction(tr("Copy full transaction details"), this);
|
|
|
|
QAction *editLabelAction = new QAction(tr("Edit label"), this);
|
|
|
|
QAction *editLabelAction = new QAction(tr("Edit label"), this);
|
|
|
|
QAction *showDetailsAction = new QAction(tr("Show transaction details"), this);
|
|
|
|
QAction *showDetailsAction = new QAction(tr("Show transaction details"), this);
|
|
|
|
|
|
|
|
|
|
|
@ -151,6 +152,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
|
|
|
|
contextMenu->addAction(copyAmountAction);
|
|
|
|
contextMenu->addAction(copyAmountAction);
|
|
|
|
contextMenu->addAction(copyTxIDAction);
|
|
|
|
contextMenu->addAction(copyTxIDAction);
|
|
|
|
contextMenu->addAction(copyTxHexAction);
|
|
|
|
contextMenu->addAction(copyTxHexAction);
|
|
|
|
|
|
|
|
contextMenu->addAction(copyTxPlainText);
|
|
|
|
contextMenu->addAction(editLabelAction);
|
|
|
|
contextMenu->addAction(editLabelAction);
|
|
|
|
contextMenu->addAction(showDetailsAction);
|
|
|
|
contextMenu->addAction(showDetailsAction);
|
|
|
|
|
|
|
|
|
|
|
@ -173,6 +175,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
|
|
|
|
connect(copyAmountAction, SIGNAL(triggered()), this, SLOT(copyAmount()));
|
|
|
|
connect(copyAmountAction, SIGNAL(triggered()), this, SLOT(copyAmount()));
|
|
|
|
connect(copyTxIDAction, SIGNAL(triggered()), this, SLOT(copyTxID()));
|
|
|
|
connect(copyTxIDAction, SIGNAL(triggered()), this, SLOT(copyTxID()));
|
|
|
|
connect(copyTxHexAction, SIGNAL(triggered()), this, SLOT(copyTxHex()));
|
|
|
|
connect(copyTxHexAction, SIGNAL(triggered()), this, SLOT(copyTxHex()));
|
|
|
|
|
|
|
|
connect(copyTxPlainText, SIGNAL(triggered()), this, SLOT(copyTxPlainText()));
|
|
|
|
connect(editLabelAction, SIGNAL(triggered()), this, SLOT(editLabel()));
|
|
|
|
connect(editLabelAction, SIGNAL(triggered()), this, SLOT(editLabel()));
|
|
|
|
connect(showDetailsAction, SIGNAL(triggered()), this, SLOT(showDetails()));
|
|
|
|
connect(showDetailsAction, SIGNAL(triggered()), this, SLOT(showDetails()));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -388,6 +391,11 @@ void TransactionView::copyTxHex()
|
|
|
|
GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::TxHexRole);
|
|
|
|
GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::TxHexRole);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void TransactionView::copyTxPlainText()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::TxPlainTextRole);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void TransactionView::editLabel()
|
|
|
|
void TransactionView::editLabel()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(!transactionView->selectionModel() ||!model)
|
|
|
|
if(!transactionView->selectionModel() ||!model)
|
|
|
@ -526,12 +534,8 @@ bool TransactionView::eventFilter(QObject *obj, QEvent *event)
|
|
|
|
QKeyEvent *ke = static_cast<QKeyEvent *>(event);
|
|
|
|
QKeyEvent *ke = static_cast<QKeyEvent *>(event);
|
|
|
|
if (ke->key() == Qt::Key_C && ke->modifiers().testFlag(Qt::ControlModifier))
|
|
|
|
if (ke->key() == Qt::Key_C && ke->modifiers().testFlag(Qt::ControlModifier))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QModelIndex i = this->transactionView->currentIndex();
|
|
|
|
GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::TxPlainTextRole);
|
|
|
|
if (i.isValid() && i.column() == TransactionTableModel::Amount)
|
|
|
|
return true;
|
|
|
|
{
|
|
|
|
|
|
|
|
GUIUtil::setClipboard(i.data(TransactionTableModel::FormattedAmountRole).toString());
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return QWidget::eventFilter(obj, event);
|
|
|
|
return QWidget::eventFilter(obj, event);
|
|
|
|