X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fbufferview.h;fp=src%2Fuisupport%2Fbufferview.h;h=feb48a11b0a378f7c605e041d41df77f08bf1b35;hp=2bd122126729539c89271896545908aeee8f78ec;hb=5c4459d5df51a99bc6ee2e7389e3a7aec3f81091;hpb=e29496b663e59b7d5812069cfee4ebcfec7decfe diff --git a/src/uisupport/bufferview.h b/src/uisupport/bufferview.h index 2bd12212..feb48a11 100644 --- a/src/uisupport/bufferview.h +++ b/src/uisupport/bufferview.h @@ -69,6 +69,9 @@ public slots: void previousBuffer(); void hideCurrentBuffer(); void filterTextChanged(QString filterString); + void changeHighlight(const Direction direction); + void selectHighlighted(); + void clearHighlight(); signals: void removeBuffer(const QModelIndex &); @@ -132,6 +135,7 @@ private: WasActive = 0x02 }; QHash _expandedState; + QModelIndex m_currentHighlight; }; @@ -145,10 +149,13 @@ 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; + + QModelIndex currentHighlight; + void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override; protected: - virtual void customEvent(QEvent *event); + virtual void customEvent(QEvent *event) override; };