-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtraktshowsmodel.h
42 lines (34 loc) · 1009 Bytes
/
traktshowsmodel.h
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef TRAKTSHOWSMODEL_H
#define TRAKTSHOWSMODEL_H
#include "traktpaginatedmodel.h"
#include "traktshow.h"
class TraktShowsModel : public TraktPaginatedModel<TraktShow*>
{
Q_OBJECT
public:
enum Roles {
RoleYear = TraktModel::RoleImage + 1,
RoleOverview,
RoleFirstAired,
RoleRuntime,
RoleCertification,
RoleNetwork,
RoleCountry,
RoleUpdatedAt,
RoleTrailer,
RoleHomepage,
RoleStatus,
RoleRating,
RoleVotes,
RoleLanguage,
RoleAvailableTranslations,
RoleGenres,
RoleAiredEpisodes
};
explicit TraktShowsModel(TraktRequest *request, QObject *parent = 0);
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;
TraktShow *convertItem(const QVariantMap &item) Q_DECL_OVERRIDE;
Q_INVOKABLE TraktShow *at(int i) const Q_DECL_OVERRIDE;
};
#endif // TRAKTSHOWSMODEL_H