X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fqtuimessageprocessor.h;h=c918d8f1873680a254fa78ac94a372a1ff5bf461;hp=553d580098979a9aaf3c235b7b0b9c93ada1705b;hb=85c06c037fa8cc34ceb7c4b8b73ef692c1ce6166;hpb=0d3d7a861472313710b51c8d19e81af56e2208a1 diff --git a/src/qtui/qtuimessageprocessor.h b/src/qtui/qtuimessageprocessor.h index 553d5800..c918d8f1 100644 --- a/src/qtui/qtuimessageprocessor.h +++ b/src/qtui/qtuimessageprocessor.h @@ -1,38 +1,38 @@ /*************************************************************************** -* Copyright (C) 2005-08 by the Quassel Project * -* devel@quassel-irc.org * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) version 3. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU General Public License * -* along with this program; if not, write to the * -* Free Software Foundation, Inc., * -* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * -***************************************************************************/ + * Copyright (C) 2005-2014 by the Quassel Project * + * devel@quassel-irc.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) version 3. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ #ifndef QTUIMESSAGEPROCESSOR_H_ #define QTUIMESSAGEPROCESSOR_H_ -#include #include #include "abstractmessageprocessor.h" -class QtUiMessageProcessor : public AbstractMessageProcessor { - Q_OBJECT +class QtUiMessageProcessor : public AbstractMessageProcessor +{ + Q_OBJECT - public: +public: enum Mode { - TimerBased, - Concurrent + TimerBased, + Concurrent }; QtUiMessageProcessor(QObject *parent); @@ -42,25 +42,40 @@ class QtUiMessageProcessor : public AbstractMessageProcessor { void reset(); - public slots: +public slots: void process(Message &msg); void process(QList &msgs); - private slots: +private slots: void processNextMessage(); + void nicksCaseSensitiveChanged(const QVariant &variant); + void highlightListChanged(const QVariant &variant); + void highlightNickChanged(const QVariant &variant); - private: +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; + + 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