diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2020-05-29 10:28:47 +0200 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2020-05-29 10:29:14 +0200 |
commit | 0d5c18204b73ccb0d7c07f90c52de31edc25e28e (patch) | |
tree | 1b7f279d2caaef9c6d804d99d5a93f6e2da743fb /src/qt/guiutil.h | |
parent | a9024a42fcece274c094cc537275ab0c55bbce15 (diff) | |
parent | 2b18fd2242a589988fbb68205dae4afa0b8b3d34 (diff) |
Merge #17956: gui: Disable unavailable context menu items in transactions tab
2b18fd2242a589988fbb68205dae4afa0b8b3d34 Disable unavailable context menu items in transactions tab (Kristaps Kaupe)
Pull request description:
Fixes #9192.
ACKs for top commit:
jonatack:
Re-ACK 2b18fd2242a5899
jonasschnelli:
codereview utACK 2b18fd2242a589988fbb68205dae4afa0b8b3d34
Tree-SHA512: 4ea19c7b5976f1f0b1baecccb3077cf82f078af7257f92162686bcce2188efe49511a5f557853bc5fe0b10616708957d61c006944babbe60b8105e78751e865f
Diffstat (limited to 'src/qt/guiutil.h')
-rw-r--r-- | src/qt/guiutil.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index a26e7ff873..8741d90102 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -71,14 +71,21 @@ namespace GUIUtil @param[in] role Data role to extract from the model @see TransactionView::copyLabel, TransactionView::copyAmount, TransactionView::copyAddress */ - void copyEntryData(QAbstractItemView *view, int column, int role=Qt::EditRole); + void copyEntryData(const QAbstractItemView *view, int column, int role=Qt::EditRole); /** Return a field of the currently selected entry as a QString. Does nothing if nothing is selected. @param[in] column Data column to extract from the model @see TransactionView::copyLabel, TransactionView::copyAmount, TransactionView::copyAddress */ - QList<QModelIndex> getEntryData(QAbstractItemView *view, int column); + QList<QModelIndex> getEntryData(const QAbstractItemView *view, int column); + + /** Returns true if the specified field of the currently selected view entry is not empty. + @param[in] column Data column to extract from the model + @param[in] role Data role to extract from the model + @see TransactionView::contextualMenu + */ + bool hasEntryData(const QAbstractItemView *view, int column, int role); void setClipboard(const QString& str); |