X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fbuffermodel.h;h=0be559aaf287989e4ea0dd49a6b65c28eedf7a31;hp=4eb22308d380d4fce7c8991e368708390a640588;hb=1b2d3ea62867220d7bffc3b23dda1dc14d429007;hpb=2a04cb443a50e37165fc2d5447cc705a813efd3e diff --git a/src/client/buffermodel.h b/src/client/buffermodel.h index 4eb22308..0be559aa 100644 --- a/src/client/buffermodel.h +++ b/src/client/buffermodel.h @@ -23,16 +23,13 @@ #include #include -#include #include "types.h" +#include "selectionmodelsynchronizer.h" class NetworkModel; -#include "selectionmodelsynchronizer.h" -#include "modelpropertymapper.h" class MappedSelectionModel; class QAbstractItemView; -class Buffer; class BufferModel : public QSortFilterProxyModel { Q_OBJECT @@ -44,24 +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); -public slots: QModelIndex currentIndex(); - void setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command); - -signals: - void selectionChanged(const QModelIndex &); + void setCurrentIndex(const QModelIndex &newCurrent); private: SelectionModelSynchronizer _selectionModelSynchronizer; - ModelPropertyMapper _propertyMapper; - BufferId currentBuffer; + QItemSelectionModel _standardSelectionModel; }; #endif // BUFFERMODEL_H