diff options
Diffstat (limited to 'board.h')
-rw-r--r-- | board.h | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -2,6 +2,7 @@ #define BOARD_H #include <QtCore/QDateTime> +#include <QtCore/QHash> #include <QtCore/QObject> #include <QtCore/QPair> #include <QtCore/QQueue> @@ -38,14 +39,16 @@ public: QString renderHumanTime(const QDateTime& dateTime); // These functions wrap emitting the signals below - void notifyConfigChanged(); + void notifyConfigChanged(const QString& key = QString()); void notifyForumsChanged(); + void notifySmiliesChanged(); void notifyForumTopicsChanged(int forumId, int start, int end); void notifyTopicPostsChanged(int topicId, int start, int end); signals: - void configChanged(); + void configChanged(const QString& key); void forumsChanged(); + void smiliesChanged(); void forumTopicsChanged(int forumId, int start, int end); void topicPostsChanged(int topicId, int start, int end); @@ -60,8 +63,10 @@ private: bool removeFromActionQueue(Action *action); void executeActionFromQueue(); void initializeBbCode(); + void initializeSmilies(); void fetchConfigIfOutdated(); void fetchForumsIfOutdated(); + void fetchSmiliesIfOutdated(); private slots: void handleActionFinished(Action *action); @@ -73,7 +78,10 @@ private: QSqlDatabase _db; XmlRpcInterface *_iface; QQueue<Action*> _queue; + /** Configuration cache */ + mutable QHash<QString, QString> _config; QList< QPair<QRegExp, QString> > _bbcodes; + QList< QPair<QString, QString> > _smilies; }; inline bool Board::busy() const |