Keep book metadata in Sqlite. Display progress while loading and upgrading library.
[dorian] / model / sortedlibrary.h
1 #ifndef SORTEDLIBRARY_H
2 #define SORTEDLIBRARY_H
3
4 #include <QSortFilterProxyModel>
5 #include "library.h"
6
7 class SortedLibrary: public QSortFilterProxyModel
8 {
9     Q_OBJECT
10
11 public:
12     enum SortBy {SortByTitle, SortByAuthor};
13     explicit SortedLibrary(QObject *parent = 0);
14     bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
15     void sortBy(SortBy key);
16
17 signals:
18
19 public slots:
20
21 protected:
22     SortBy mSortBy;
23 };
24
25 #endif // SORTEDLIBRARY_H