-
Notifications
You must be signed in to change notification settings - Fork 0
/
feed.h
53 lines (40 loc) · 1.5 KB
/
feed.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
43
44
45
46
47
48
49
50
51
52
53
#ifndef FEED_H
#define FEED_H
#include "entry.h"
#include <QObject>
class Feed : public QObject {
public:
QList<Entry*> entries;
Feed();
Feed(QString, QString);
Feed(QString, QString, QList<QString>, QString);
//navrati ID zdroje
QString getId() { return _id; }
//navrati nazev zdroje
QString getTitle() { return _title; }
//navrati stitek pokud je zdroj oznacen
QList<QString> getLabel() { return _labelList; }
//navrati pocet neprectenych polozek ve zdroji
int getUnreadCount() { return _unreadCount; }
long getFirstItemTime() { return _firstItemMsec; }
//nastavi stitek zdroje
void setLabel(QString label) { _labelList.append(label); }
//nastavi nazev zdroje
void setTitle(QString title) { _title = title; }
//nastavi stitek zdroje
void setNewestItemTimestamp(int newestItemTimestamp) { _newestItemTimestampUsec = newestItemTimestamp; }
//nastavi pocet neprectenych polozek
void setUnreadCount(int count) { _unreadCount = count; }
//znizi pocet neprectenych polozek
void decrementUnreadCount() { if (_unreadCount > 0) _unreadCount--; }
void removeLabel(QString);
QList<Entry*> getEntriesList() { return entries; }
private:
QString _id;
QString _title;
QList<QString> _labelList;
int _unreadCount;
long _newestItemTimestampUsec;
long _firstItemMsec;
};
#endif // FEED_H