X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fbuffermodel.h;h=0be559aaf287989e4ea0dd49a6b65c28eedf7a31;hp=80f1ec0ab33e701c5aff00bd2478540edf657cb8;hb=1b2d3ea62867220d7bffc3b23dda1dc14d429007;hpb=770b7ef54b03f3ebd1e29a58b4757505e1809b2d diff --git a/src/client/buffermodel.h b/src/client/buffermodel.h index 80f1ec0a..0be559aa 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; @@ -42,21 +41,17 @@ public: 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 const_cast(&_standardSelectionModel); } + void synchronizeSelectionModel(MappedSelectionModel *selectionModel); void synchronizeView(QAbstractItemView *view); - void mapProperty(int column, int role, QObject *target, const QByteArray &property); QModelIndex currentIndex(); + void setCurrentIndex(const QModelIndex &newCurrent); -private slots: - void currentChanged(const QModelIndex ¤t, const QModelIndex &previous); - private: SelectionModelSynchronizer _selectionModelSynchronizer; - ModelPropertyMapper _propertyMapper; + QItemSelectionModel _standardSelectionModel; }; #endif // BUFFERMODEL_H