-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtraktmodelbase.cpp
54 lines (45 loc) · 967 Bytes
/
traktmodelbase.cpp
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
43
44
45
46
47
48
49
50
51
52
53
54
#include "traktmodelbase.h"
#include <QTimer>
TraktModelBase::TraktModelBase(QObject *parent) :
QAbstractItemModel(parent),
m_loading(false),
m_loaded(false)
{
}
bool TraktModelBase::loading() const
{
return m_loading;
}
bool TraktModelBase::loaded() const
{
return m_loaded;
}
void TraktModelBase::setLoading(bool loading)
{
if (m_loading != loading) {
m_loading = loading;
emit loadingChanged();
}
}
void TraktModelBase::setLoaded(bool loaded)
{
if (m_loaded != loaded) {
m_loaded = loaded;
emit loadedChanged();
}
}
QModelIndex TraktModelBase::index(int row, int column, const QModelIndex &parent) const
{
Q_UNUSED(parent)
return createIndex(row, column);
}
QModelIndex TraktModelBase::parent(const QModelIndex &child) const
{
Q_UNUSED(child)
return QModelIndex();
}
int TraktModelBase::columnCount(const QModelIndex &parent) const
{
Q_UNUSED(parent)
return 1;
}