Reformat ALL the source!
[quassel.git] / src / qtui / qtuimessageprocessor.h
index 553d580..58af4c8 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
-*   Copyright (C) 2005-08 by the Quassel Project                          *
+*   Copyright (C) 2005-09 by the Quassel Project                          *
 *   devel@quassel-irc.org                                                 *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 
 #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 +43,40 @@ class QtUiMessageProcessor : public AbstractMessageProcessor {
 
     void reset();
 
-  public slots:
+public slots:
     void process(Message &msg);
     void process(QList<Message> &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<QList<Message> > _processQueue;
     QList<Message> _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<HighlightRule> _highlightRules;
+    NotificationSettings::HighlightNickType _highlightNick;
+    bool _nicksCaseSensitive;
 };
 
+
 #endif