-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtraktmodelbase.h
39 lines (28 loc) · 929 Bytes
/
traktmodelbase.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
#ifndef TRAKTMODELBASE_H
#define TRAKTMODELBASE_H
#include <QAbstractItemModel>
class TraktItem;
class TraktModelBase : public QAbstractItemModel
{
Q_OBJECT
Q_PROPERTY(bool loading READ loading NOTIFY loadingChanged)
Q_PROPERTY(bool loaded READ loaded NOTIFY loadedChanged)
public:
explicit TraktModelBase(QObject *parent = 0);
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const Q_DECL_OVERRIDE;
virtual QModelIndex parent(const QModelIndex &child) const Q_DECL_OVERRIDE;
virtual int columnCount(const QModelIndex &parent) const Q_DECL_OVERRIDE;
virtual TraktItem *get(int i) const = 0;
bool loading() const;
bool loaded() const;
signals:
void loadingChanged();
void loadedChanged();
protected:
void setLoading(bool loading);
void setLoaded(bool loaded);
private:
bool m_loading;
bool m_loaded;
};
#endif // TRAKTMODELBASE_H