From 2b18fd2242a589988fbb68205dae4afa0b8b3d34 Mon Sep 17 00:00:00 2001 From: Kristaps Kaupe Date: Sun, 26 Jan 2020 22:19:39 +0200 Subject: Disable unavailable context menu items in transactions tab --- src/qt/guiutil.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/qt/guiutil.h') diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index 05e73cc5f0..30c98a31d6 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -68,14 +68,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 getEntryData(QAbstractItemView *view, int column); + QList 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); -- cgit v1.2.3