Merging -r 859:865 branches/0.2/ with trunk
[quassel.git] / src / uisupport / bufferviewfilter.h
index 581cd6c..128b3e8 100644 (file)
@@ -21,6 +21,7 @@
 #ifndef BUFFERVIEWFILTER_H_
 #define BUFFERVIEWFILTER_H_
 
+#include <QColor>
 #include <QDropEvent>
 #include <QFlags>
 #include <QPointer>
@@ -61,20 +62,36 @@ public:
   inline BufferViewConfig *config() const { return _config; }
 
 public slots:
-  void removeBuffer(const QModelIndex &);
+  void checkPreviousCurrentForRemoval(const QModelIndex &current, const QModelIndex &previous);
+  void checkItemForRemoval(const QModelIndex &index) { checkItemsForRemoval(index, index); }
+  void checkItemsForRemoval(const QModelIndex &topLeft, const QModelIndex &bottomRight);
   
 protected:
   bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
   bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const;
   bool bufferLessThan(const QModelIndex &source_left, const QModelIndex &source_right) const;
   bool networkLessThan(const QModelIndex &source_left, const QModelIndex &source_right) const;
+  virtual void customEvent(QEvent *event);
 
+signals:
+  void _dataChanged(const QModelIndex &source_topLeft, const QModelIndex &source_bottomRight);
+
+private slots:
+  void configInitialized();
+    
 private:
   QPointer<BufferViewConfig> _config;
+  
+  QColor _FgColorInactiveActivity;
+  QColor _FgColorNoActivity;
+  QColor _FgColorHighlightActivity;
+  QColor _FgColorNewMessageActivity;
+  QColor _FgColorOtherActivity;
+  void loadColors();
 
   bool filterAcceptBuffer(const QModelIndex &) const;
   bool filterAcceptNetwork(const QModelIndex &) const;
-  void addBuffer(const BufferId &);
+  void addBuffer(const BufferId &) const;
 };
 Q_DECLARE_OPERATORS_FOR_FLAGS(BufferViewFilter::Modes)