X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fbufferview.h;h=2a32eb2c3a08c2af5dcb079b0114cde9ce0b1a5d;hb=155e04deec1d50c0c46807fad5f2b87730a96028;hp=d2f577aa44c8795ad579d27fa24822542af96e82;hpb=58223212a45f91cdcb332fd63fd6815f48ec5f96;p=quassel.git diff --git a/src/uisupport/bufferview.h b/src/uisupport/bufferview.h index d2f577aa..2a32eb2c 100644 --- a/src/uisupport/bufferview.h +++ b/src/uisupport/bufferview.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2016 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -68,7 +68,10 @@ public slots: void nextBuffer(); void previousBuffer(); void hideCurrentBuffer(); - void filterTextChanged(QString filterString); + void filterTextChanged(const QString& filterString); + void changeHighlight(Direction direction); + void selectHighlighted(); + void clearHighlight(); signals: void removeBuffer(const QModelIndex &); @@ -132,11 +135,12 @@ private: WasActive = 0x02 }; QHash _expandedState; + QModelIndex _currentHighlight; }; // ****************************** -// BufferViewDelgate +// BufferViewDelegate // ****************************** class BufferViewDelegate : public QStyledItemDelegate @@ -145,10 +149,15 @@ class BufferViewDelegate : public QStyledItemDelegate public: BufferViewDelegate(QObject *parent = 0); - bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index); + bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override; + + void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override; + +public: + QModelIndex currentHighlight; protected: - virtual void customEvent(QEvent *event); + void customEvent(QEvent *event) override; };