diff options
| author | Wladimir J. van der Laan <[email protected]> | 2013-03-29 01:39:41 -0700 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2013-03-29 01:39:41 -0700 |
| commit | 792f9c81eb80fc68d868dcc1e494d2b5d899073f (patch) | |
| tree | 1490dbb7a808f160c08707bea778431e4d801932 /src | |
| parent | Merge pull request #2400 from gladoscc/master (diff) | |
| parent | Adding 'copy txid' to qt tx overview context menu (diff) | |
| download | discoin-792f9c81eb80fc68d868dcc1e494d2b5d899073f.tar.xz discoin-792f9c81eb80fc68d868dcc1e494d2b5d899073f.zip | |
Merge pull request #2396 from Nothing4You/add-copytxid-contextmenu-qt-txoverview
Adding 'copy txid' to qt tx overview context menu
Diffstat (limited to 'src')
| -rw-r--r-- | src/qt/transactionview.cpp | 8 | ||||
| -rw-r--r-- | src/qt/transactionview.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index e7c384161..9240b71c7 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -123,6 +123,7 @@ TransactionView::TransactionView(QWidget *parent) : QAction *copyAddressAction = new QAction(tr("Copy address"), this); QAction *copyLabelAction = new QAction(tr("Copy label"), this); QAction *copyAmountAction = new QAction(tr("Copy amount"), this); + QAction *copyTxIDAction = new QAction(tr("Copy transaction ID"), this); QAction *editLabelAction = new QAction(tr("Edit label"), this); QAction *showDetailsAction = new QAction(tr("Show transaction details"), this); @@ -130,6 +131,7 @@ TransactionView::TransactionView(QWidget *parent) : contextMenu->addAction(copyAddressAction); contextMenu->addAction(copyLabelAction); contextMenu->addAction(copyAmountAction); + contextMenu->addAction(copyTxIDAction); contextMenu->addAction(editLabelAction); contextMenu->addAction(showDetailsAction); @@ -145,6 +147,7 @@ TransactionView::TransactionView(QWidget *parent) : connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(copyAddress())); connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(copyLabel())); connect(copyAmountAction, SIGNAL(triggered()), this, SLOT(copyAmount())); + connect(copyTxIDAction, SIGNAL(triggered()), this, SLOT(copyTxID())); connect(editLabelAction, SIGNAL(triggered()), this, SLOT(editLabel())); connect(showDetailsAction, SIGNAL(triggered()), this, SLOT(showDetails())); } @@ -309,6 +312,11 @@ void TransactionView::copyAmount() GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::FormattedAmountRole); } +void TransactionView::copyTxID() +{ + GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::TxIDRole); +} + void TransactionView::editLabel() { if(!transactionView->selectionModel() ||!model) diff --git a/src/qt/transactionview.h b/src/qt/transactionview.h index e61515fda..bb41a83e3 100644 --- a/src/qt/transactionview.h +++ b/src/qt/transactionview.h @@ -66,6 +66,7 @@ private slots: void editLabel(); void copyLabel(); void copyAmount(); + void copyTxID(); signals: void doubleClicked(const QModelIndex&); |