equal
deleted
inserted
replaced
23 |
23 |
24 #ifndef HEDGEWARS_THEMEMODEL_H |
24 #ifndef HEDGEWARS_THEMEMODEL_H |
25 #define HEDGEWARS_THEMEMODEL_H |
25 #define HEDGEWARS_THEMEMODEL_H |
26 |
26 |
27 #include <QAbstractListModel> |
27 #include <QAbstractListModel> |
|
28 #include <QSortFilterProxyModel> |
28 #include <QStringList> |
29 #include <QStringList> |
29 #include <QMap> |
30 #include <QMap> |
30 #include <QIcon> |
31 #include <QIcon> |
31 |
32 |
32 #include "DataManager.h" |
33 #include "DataManager.h" |
42 enum Roles { ActualNameRole = Qt::UserRole, IsDlcRole, IconPathRole }; |
43 enum Roles { ActualNameRole = Qt::UserRole, IsDlcRole, IconPathRole }; |
43 explicit ThemeModel(QObject *parent = 0); |
44 explicit ThemeModel(QObject *parent = 0); |
44 |
45 |
45 int rowCount(const QModelIndex &parent = QModelIndex()) const; |
46 int rowCount(const QModelIndex &parent = QModelIndex()) const; |
46 QVariant data(const QModelIndex &index, int role) const; |
47 QVariant data(const QModelIndex &index, int role) const; |
|
48 QSortFilterProxyModel * withoutDLC(); |
47 |
49 |
48 private: |
50 private: |
49 mutable QList<QMap<int, QVariant> > m_data; |
51 mutable QList<QMap<int, QVariant> > m_data; |
50 mutable bool m_themesLoaded; |
52 mutable bool m_themesLoaded; |
|
53 mutable QSortFilterProxyModel * m_filteredNoDLC; |
51 |
54 |
52 void loadThemes() const; |
55 void loadThemes() const; |
53 }; |
56 }; |
54 |
57 |
55 #endif // HEDGEWARS_THEMEMODEL_H |
58 #endif // HEDGEWARS_THEMEMODEL_H |