summaryrefslogtreecommitdiffstats
path: root/filesorter.h
blob: 968edf2f5a56ade719ee7e92ca359b077391cc30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef FILESORTER_H
#define FILESORTER_H

#include <QSortFilterProxyModel>

class FileSorter : public QSortFilterProxyModel {
    Q_OBJECT
    public:
        explicit FileSorter(QObject *parent = 0);

    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;
        virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
};


#endif // FILESORTER_H