Always put own nick last in nick completion
[quassel.git] / src / uisupport / bufferview.h
index 0732f54..0b826e0 100644 (file)
@@ -80,6 +80,9 @@ private slots:
   void setExpandedState(const QModelIndex &networkIdx);
 
   void on_configChanged();
+  void on_layoutChanged();
+
+  void setCustomFont(const QVariant &font);
 
 private:
   QPointer<BufferViewConfig> _config;
@@ -93,16 +96,33 @@ private:
 };
 
 // ******************************
-//  TristateDelgate
+//  BufferViewDelgate
 // ******************************
 #include <QStyledItemDelegate>
 
-class TristateDelegate : public QStyledItemDelegate {
+class BufferViewDelegate : public QStyledItemDelegate {
   Q_OBJECT
 
 public:
-  TristateDelegate(QObject *parent = 0) : QStyledItemDelegate(parent) {}
+  BufferViewDelegate(QObject *parent = 0);
   bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index);
+
+protected:
+  virtual void customEvent(QEvent *event);
+  virtual void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const;
+
+private slots:
+  void colorsChanged();
+  void loadColors();
+
+private:
+  QColor _FgColorInactiveActivity;
+  QColor _FgColorNoActivity;
+  QColor _FgColorHighlightActivity;
+  QColor _FgColorNewMessageActivity;
+  QColor _FgColorOtherActivity;
+
+  bool _updateColors;
 };