X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fbuffermodel.h;h=80f1ec0ab33e701c5aff00bd2478540edf657cb8;hp=e45c60e656ce10a2b8322f948f5b25432c93243f;hb=770b7ef54b03f3ebd1e29a58b4757505e1809b2d;hpb=50706d89d4d60e258ebb6873d3778383621898e4 diff --git a/src/client/buffermodel.h b/src/client/buffermodel.h index e45c60e6..80f1ec0a 100644 --- a/src/client/buffermodel.h +++ b/src/client/buffermodel.h @@ -23,16 +23,14 @@ #include #include -#include #include "types.h" - -class NetworkModel; #include "selectionmodelsynchronizer.h" #include "modelpropertymapper.h" + +class NetworkModel; class MappedSelectionModel; class QAbstractItemView; -class Buffer; class BufferModel : public QSortFilterProxyModel { Q_OBJECT @@ -43,24 +41,22 @@ public: bool filterAcceptsRow(int sourceRow, const QModelIndex &parent) const; - inline SelectionModelSynchronizer *selectionModelSynchronizer() { return _selectionModelSynchronizer; } - inline ModelPropertyMapper *propertyMapper() { return _propertyMapper; } + inline const SelectionModelSynchronizer *selectionModelSynchronizer() const { return &_selectionModelSynchronizer; } + inline const ModelPropertyMapper *propertyMapper() const { return &_propertyMapper; } + inline QItemSelectionModel *standardSelectionModel() const { return _propertyMapper.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 &); +private slots: + void currentChanged(const QModelIndex ¤t, const QModelIndex &previous); + private: - QPointer _selectionModelSynchronizer; - QPointer _propertyMapper; - BufferId currentBuffer; + SelectionModelSynchronizer _selectionModelSynchronizer; + ModelPropertyMapper _propertyMapper; }; #endif // BUFFERMODEL_H