X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fqtuimessageprocessor.h;fp=src%2Fqtui%2Fqtuimessageprocessor.h;h=58af4c86b8af74daf42e110cc20af2aa1970672c;hp=3073c7bfbb325ab285e25d04ea251afad52086a1;hb=694f9bfbf7f1af19108461c7e00d133e55082bce;hpb=61c8d84d1c849373e0f115dc748ed45cff95287d diff --git a/src/qtui/qtuimessageprocessor.h b/src/qtui/qtuimessageprocessor.h index 3073c7bf..58af4c86 100644 --- a/src/qtui/qtuimessageprocessor.h +++ b/src/qtui/qtuimessageprocessor.h @@ -26,55 +26,57 @@ #include "abstractmessageprocessor.h" -class QtUiMessageProcessor : public AbstractMessageProcessor { - Q_OBJECT +class QtUiMessageProcessor : public AbstractMessageProcessor +{ + Q_OBJECT public: - enum Mode { - TimerBased, - Concurrent - }; + enum Mode { + TimerBased, + Concurrent + }; - QtUiMessageProcessor(QObject *parent); + QtUiMessageProcessor(QObject *parent); - inline bool isProcessing() const { return _processing; } - inline Mode processMode() const { return _processMode; } + inline bool isProcessing() const { return _processing; } + inline Mode processMode() const { return _processMode; } - void reset(); + void reset(); public slots: - void process(Message &msg); - void process(QList &msgs); + void process(Message &msg); + void process(QList &msgs); private slots: - void processNextMessage(); - void nicksCaseSensitiveChanged(const QVariant &variant); - void highlightListChanged(const QVariant &variant); - void highlightNickChanged(const QVariant &variant); + void processNextMessage(); + void nicksCaseSensitiveChanged(const QVariant &variant); + void highlightListChanged(const QVariant &variant); + void highlightNickChanged(const QVariant &variant); private: - void checkForHighlight(Message &msg); - void startProcessing(); - - QList > _processQueue; - QList _currentBatch; - QTimer _processTimer; - bool _processing; - Mode _processMode; - - struct HighlightRule { - QString name; - bool isEnabled; - Qt::CaseSensitivity caseSensitive; - bool isRegExp; - QString chanName; - inline HighlightRule(const QString &name, bool enabled, Qt::CaseSensitivity cs, bool regExp, const QString &chanName) - : name(name), isEnabled(enabled), caseSensitive(cs), isRegExp(regExp), chanName(chanName) {} - }; - - QList _highlightRules; - NotificationSettings::HighlightNickType _highlightNick; - bool _nicksCaseSensitive; + void checkForHighlight(Message &msg); + void startProcessing(); + + QList > _processQueue; + QList _currentBatch; + QTimer _processTimer; + bool _processing; + Mode _processMode; + + struct HighlightRule { + QString name; + bool isEnabled; + Qt::CaseSensitivity caseSensitive; + bool isRegExp; + QString chanName; + inline HighlightRule(const QString &name, bool enabled, Qt::CaseSensitivity cs, bool regExp, const QString &chanName) + : name(name), isEnabled(enabled), caseSensitive(cs), isRegExp(regExp), chanName(chanName) {} + }; + + QList _highlightRules; + NotificationSettings::HighlightNickType _highlightNick; + bool _nicksCaseSensitive; }; + #endif