X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fqtuimessageprocessor.h;h=553d580098979a9aaf3c235b7b0b9c93ada1705b;hp=161385b069886016f46f2590d2a1e6223ff78b58;hb=0d3d7a861472313710b51c8d19e81af56e2208a1;hpb=9950dd55446bedbccba1e7a27c4d042fb896d3c6 diff --git a/src/qtui/qtuimessageprocessor.h b/src/qtui/qtuimessageprocessor.h index 161385b0..553d5800 100644 --- a/src/qtui/qtuimessageprocessor.h +++ b/src/qtui/qtuimessageprocessor.h @@ -21,21 +21,46 @@ #ifndef QTUIMESSAGEPROCESSOR_H_ #define QTUIMESSAGEPROCESSOR_H_ +#include +#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(); + void updateProgress(bool start = false); + QList > _processQueue; + QList _currentBatch; + QTimer _processTimer; + bool _processing; + Mode _processMode; + int _msgsProcessed, _msgCount; + QTime _progressTimer; }; #endif