X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fclient%2Fbuffermodel.h;h=4794afeb8f9c41bd22c0776c3b1ffee378eb876d;hb=fa4d0a5606f0c9ed49e196278611fce6b017fb0b;hp=2d6f4b478b08ce987472f95f29ff7d2ccd38da66;hpb=23eed68958b7585552be04fab4e5871a781b7f38;p=quassel.git diff --git a/src/client/buffermodel.h b/src/client/buffermodel.h index 2d6f4b47..4794afeb 100644 --- a/src/client/buffermodel.h +++ b/src/client/buffermodel.h @@ -26,7 +26,6 @@ #include "types.h" #include "selectionmodelsynchronizer.h" -#include "modelpropertymapper.h" class NetworkModel; class MappedSelectionModel; @@ -37,23 +36,23 @@ class BufferModel : public QSortFilterProxyModel { public: BufferModel(NetworkModel *parent = 0); - virtual ~BufferModel(); bool filterAcceptsRow(int sourceRow, const QModelIndex &parent) const; inline const SelectionModelSynchronizer *selectionModelSynchronizer() const { return &_selectionModelSynchronizer; } - inline const ModelPropertyMapper *propertyMapper() const { return &_propertyMapper; } - inline QItemSelectionModel *standardSelectionModel() const { return _propertyMapper.selectionModel(); } - + inline QItemSelectionModel *standardSelectionModel() const { return _selectionModelSynchronizer.selectionModel(); } + void synchronizeSelectionModel(MappedSelectionModel *selectionModel); void synchronizeView(QAbstractItemView *view); - void mapProperty(int column, int role, QObject *target, const QByteArray &property); - QModelIndex currentIndex(); + inline QModelIndex currentIndex() { return standardSelectionModel()->currentIndex(); } + void setCurrentIndex(const QModelIndex &newCurrent); +private slots: + void debug_currentChanged(QModelIndex current, QModelIndex previous); + private: SelectionModelSynchronizer _selectionModelSynchronizer; - ModelPropertyMapper _propertyMapper; }; #endif // BUFFERMODEL_H