summaryrefslogtreecommitdiffstats
path: root/collectionwidget.h
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2018-02-17 11:22:40 +0100
committerArno <arno@disconnect.de>2018-02-17 11:22:40 +0100
commit98bc2dd70847735d852b644da3fa5cc0f1fd1623 (patch)
treecd52008cb9f9dd6b3c1414ac7aa5665e15da0d6f /collectionwidget.h
parent3788e9c79550a7e1ac1b3b9e722a53e388db890f (diff)
downloadBeetPlayer-98bc2dd70847735d852b644da3fa5cc0f1fd1623.tar.gz
BeetPlayer-98bc2dd70847735d852b644da3fa5cc0f1fd1623.tar.bz2
BeetPlayer-98bc2dd70847735d852b644da3fa5cc0f1fd1623.zip
Fix sorting in CollectionWidgets
Sort everything ascending, except CollectionDatesView.
Diffstat (limited to 'collectionwidget.h')
-rw-r--r--collectionwidget.h4
1 files changed, 3 insertions, 1 deletions
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 <QWidget>
+#include <QTreeView>
-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: