-
Notifications
You must be signed in to change notification settings - Fork 0
/
feed.cpp
41 lines (37 loc) · 907 Bytes
/
feed.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
#include "feed.h"
/*!
\brief Vychozi konstruktor
*/
Feed::Feed() {
_id = "";
_unreadCount = 0;
_newestItemTimestampUsec = 0;
_firstItemMsec = 0;
_labelList.empty();
}
/*!
\brief Konstruktor, ve kterem parametry prijimame id zdroje a nazev zdroje
*/
Feed::Feed(QString id, QString title) {
_id = id;
_title = title;
_unreadCount = 0;
}
/*!
\brief Konstruktor, ve kterem parametry prijimame id, pocet neprectenych polozek a cas nejnovejsi polozky
*/
Feed::Feed(QString id, QString title, QList<QString> label, QString firstItemMsec) {
_id = id;
_title = title;
_labelList.append(label);
_firstItemMsec = firstItemMsec.toLong();
_unreadCount = 0;
}
void Feed::removeLabel(QString label) {
for (int i = 0; i < _labelList.count(); i++) {
if (label == _labelList.at(i)) {
_labelList.removeAt(i);
break;
}
}
}