X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fbuffermodel.h;h=d863dc954bd655b9fe8a94e27cc45483dee4d57d;hp=9a94fbe45bde0a408f196bd7f13f92a380a04956;hb=14a1ee538d01e41dc55a6e733a7804930aa9fff8;hpb=eabf97d25da5af06033807c2697fd687fc48d2e7 diff --git a/src/client/buffermodel.h b/src/client/buffermodel.h index 9a94fbe4..d863dc95 100644 --- a/src/client/buffermodel.h +++ b/src/client/buffermodel.h @@ -25,10 +25,10 @@ #include #include "network.h" +#include "networkmodel.h" #include "types.h" #include "selectionmodelsynchronizer.h" -class NetworkModel; class QAbstractItemView; class BufferModel : public QSortFilterProxyModel { @@ -46,6 +46,7 @@ public: void synchronizeView(QAbstractItemView *view); inline QModelIndex currentIndex() { return standardSelectionModel()->currentIndex(); } + inline BufferId currentBuffer() { return currentIndex().data(NetworkModel::BufferIdRole).value(); } public slots: void setCurrentIndex(const QModelIndex &newCurrent);