fixes #413 - Icons in Nicklist
[quassel.git] / src / uisupport / nickviewfilter.h
index 534600f..7bf9b6b 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  *
 #ifndef NICKVIEWFILTER_H
 #define NICKVIEWFILTER_H
 
-#include <QColor>
 #include <QSortFilterProxyModel>
+
+#include <QPixmap>
+
 #include "types.h"
 
 class NetworkModel;
@@ -33,16 +35,27 @@ class NickViewFilter : public QSortFilterProxyModel {
 
 public:
   NickViewFilter(const BufferId &bufferId, NetworkModel *parent = 0);
-  QVariant data(const QModelIndex &index, int role) const;
-  QVariant foreground(const QModelIndex &index) const;
+
+  virtual QVariant data(const QModelIndex &index, int role) const;
+  QVariant icon(const QModelIndex &index) const;
 
 protected:
   virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
 
+private slots:
+  void showUserStateIconsChanged();
+
 private:
   BufferId _bufferId;
-  QColor _FgOnlineStatus;
-  QColor _FgAwayStatus;
+
+  QHash<int, QPixmap> _categoryIconHash;
+  QPixmap _userOnlineIcon;
+  QPixmap _userAwayIcon;
+  QPixmap _categoryOpIcon;
+  QPixmap _categoryVoiceIcon;
+  int _opIconLimit;
+  int _voiceIconLimit;
+  bool _showUserStateIcons;
 
   void loadColors();
 };