From 1789930645650d9302b484cf21317e606e8f14e8 Mon Sep 17 00:00:00 2001 From: Arno Date: Mon, 19 Feb 2018 02:07:23 +0100 Subject: Add customActions to CollectionWidget This is supposed to be an easy way to add custom QActions to the context menu. The idea seems sound, but let's see how it turns out... --- collectionwidget.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'collectionwidget.h') diff --git a/collectionwidget.h b/collectionwidget.h index bb85e49..d464054 100644 --- a/collectionwidget.h +++ b/collectionwidget.h @@ -8,6 +8,7 @@ class QStandardItemModel; class QSortFilterProxyModel; class QLineEdit; +class QActionGroup; class CollectionWidget : public QWidget { Q_OBJECT @@ -21,6 +22,7 @@ class CollectionWidget : public QWidget { const QStringList headers() const { return mHeaders; } void disableSorting() { mView->setSortingEnabled(false); } void enableSorting(int column = 0, Qt::SortOrder sortOrder = Qt::AscendingOrder); + QActionGroup *customActions() { return mCustomActions; } public slots: virtual void populate() { return; } @@ -30,7 +32,7 @@ class CollectionWidget : public QWidget { QStandardItemModel *mModel; QLineEdit *mFilter; QStringList mHeaders; - + QActionGroup *mCustomActions; }; #endif // COLLECTIONWIDGET_H -- cgit v1.2.3-70-g09d2