X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fqtuimessageprocessor.h;h=53d4f0216db090f38a67a817187d68b2d6b25a6f;hb=019a59ffca44ddc32fc6b16fd6cdcc8f3e1c93c6;hp=161385b069886016f46f2590d2a1e6223ff78b58;hpb=9950dd55446bedbccba1e7a27c4d042fb896d3c6;p=quassel.git diff --git a/src/qtui/qtuimessageprocessor.h b/src/qtui/qtuimessageprocessor.h index 161385b0..53d4f021 100644 --- a/src/qtui/qtuimessageprocessor.h +++ b/src/qtui/qtuimessageprocessor.h @@ -21,21 +21,42 @@ #ifndef QTUIMESSAGEPROCESSOR_H_ #define QTUIMESSAGEPROCESSOR_H_ +#include + #include "abstractmessageprocessor.h" class QtUiMessageProcessor : public AbstractMessageProcessor { Q_OBJECT public: + enum Mode { + TimerBased, + Concurrent + }; + QtUiMessageProcessor(QObject *parent); + inline bool isProcessing() const { return _processing; } + inline Mode processMode() const { return _processMode; } - private: - void processMessage(Message &msg); - void processMessages(QList &msgs); + void reset(); + public slots: + void process(Message &msg); + void process(QList &msgs); + + private slots: + void processNextMessage(); + + private: void checkForHighlight(Message &msg); + void startProcessing(); + QList > _processQueue; + QList _currentBatch; + QTimer _processTimer; + bool _processing; + Mode _processMode; }; #endif