X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fclient%2Fbuffermodel.h;h=7bd3fc9ead4c18f969535d2982bf81cc8ad9afa2;hb=2f83cb6d01ff68131528797020637887fe0e77b7;hp=4eb22308d380d4fce7c8991e368708390a640588;hpb=2a04cb443a50e37165fc2d5447cc705a813efd3e;p=quassel.git diff --git a/src/client/buffermodel.h b/src/client/buffermodel.h index 4eb22308..7bd3fc9e 100644 --- a/src/client/buffermodel.h +++ b/src/client/buffermodel.h @@ -23,45 +23,36 @@ #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 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); -public slots: QModelIndex currentIndex(); - void setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command); - -signals: - void selectionChanged(const QModelIndex &); + void setCurrentIndex(const QModelIndex &newCurrent); +private slots: + void debug_currentChanged(QModelIndex current, QModelIndex previous); + private: SelectionModelSynchronizer _selectionModelSynchronizer; - ModelPropertyMapper _propertyMapper; - BufferId currentBuffer; }; #endif // BUFFERMODEL_H