diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-04-07 03:13:14 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-04-07 03:13:14 +0200 |
commit | 9e67c13e587ccf10084144fea033beda316faed5 (patch) | |
tree | 33170309064aaf182d14e95e1d8121a8041180b3 /forummodel.h | |
parent | 1a66f6ee4f3806e2a18af718654e7281c7dd1066 (diff) | |
download | tapasboard-9e67c13e587ccf10084144fea033beda316faed5.tar.gz tapasboard-9e67c13e587ccf10084144fea033beda316faed5.zip |
add support for reading announcements & stickies
Diffstat (limited to 'forummodel.h')
-rw-r--r-- | forummodel.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/forummodel.h b/forummodel.h index 33a718e..709f5c4 100644 --- a/forummodel.h +++ b/forummodel.h @@ -5,7 +5,7 @@ #include <QtCore/QDateTime> #include <QtSql/QSqlQuery> -class Board; +#include "board.h" class ForumModel : public QAbstractListModel { @@ -48,6 +48,7 @@ signals: protected: struct Topic { int topic_id; + Board::TopicType type; QString title; int num_replies; bool unread; @@ -59,11 +60,11 @@ private: static QDateTime parseDateTime(const QVariant& v); static QDateTime oldestPostUpdate(const QList<Topic>& topics); QDateTime lastTopPostUpdate(); - QList<Topic> loadTopics(int start, int end); + QList<Topic> loadTopics(Board::TopicType type, int start, int end); void clearModel(); private slots: - void handleForumTopicsChanged(int forumId, int start, int end); + void handleForumTopicsChanged(int forumId, Board::TopicType type, int start, int end); void handleForumTopicChanged(int forumId, int topicId); void update(); void reload(); @@ -72,6 +73,8 @@ private: Board *_board; int _forumId; QList<Topic> _data; + int _numAnnouncements; + int _numSticky; bool _eof; }; |