summaryrefslogtreecommitdiffstats
path: root/filesorter.h
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2016-09-03 07:06:55 +0200
committerArno <arno@disconnect.de>2016-09-03 07:06:55 +0200
commitc3cfc9dd9d94a3c3ce2d58c0ec9320c03489f496 (patch)
treeafae7b4c9754ed5c986a8988c0b5f5f74f988b96 /filesorter.h
parentea8d506033f5694ad3053aa691640aff3a675fb9 (diff)
downloadShemovCleaner-c3cfc9dd9d94a3c3ce2d58c0ec9320c03489f496.tar.gz
ShemovCleaner-c3cfc9dd9d94a3c3ce2d58c0ec9320c03489f496.tar.bz2
ShemovCleaner-c3cfc9dd9d94a3c3ce2d58c0ec9320c03489f496.zip
Fix Video sorting
Show directories in FileWidget and always put ".." first, then the directories by creating a new QSortFilterProxyModel. For this the file attribute is needed for every column, so use QList<QStandardItem*> instead of individual QStandardItem*s. Use enums to access columns.
Diffstat (limited to 'filesorter.h')
-rw-r--r--filesorter.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/filesorter.h b/filesorter.h
index 92bc71e..11012ed 100644
--- a/filesorter.h
+++ b/filesorter.h
@@ -10,7 +10,16 @@ class FileSorter : public QSortFilterProxyModel {
protected:
virtual bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const;
+};
+
+class VideoSorter : public QSortFilterProxyModel {
+ Q_OBJECT
+ public:
+ explicit VideoSorter(QObject *parent = 0);
+ protected:
+ virtual bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const;
};
+
#endif // FILESORTER_H