From 98bc2dd70847735d852b644da3fa5cc0f1fd1623 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 17 Feb 2018 11:22:40 +0100 Subject: Fix sorting in CollectionWidgets Sort everything ascending, except CollectionDatesView. --- collectionwidget.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'collectionwidget.h') diff --git a/collectionwidget.h b/collectionwidget.h index 86135bb..c76582c 100644 --- a/collectionwidget.h +++ b/collectionwidget.h @@ -2,8 +2,8 @@ #define COLLECTIONWIDGET_H #include +#include -class QTreeView; class QStandardItemModel; class QSortFilterProxyModel; @@ -18,6 +18,8 @@ class CollectionWidget : public QWidget { QSortFilterProxyModel *proxy() { return mProxy; } void setHeaders(const QStringList headers) { mHeaders = headers; } const QStringList headers() const { return mHeaders; } + void disableSorting() { mView->setSortingEnabled(false); } + void enableSorting(int column = 0, Qt::SortOrder sortOrder = Qt::AscendingOrder); signals: -- cgit v1.2.3-70-g09d2