X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fmappedselectionmodel.h;h=9641658a2902b728fd6644603ba78eace3cd6ccb;hp=35f3618096d7a16f00b1f515e6f771eb4e48dae9;hb=8aceefa7a5b9910c93bdf05fdc86d875193d6782;hpb=85cc2479ab9bd85b33f4d8494b1eeeb46a6a1049 diff --git a/src/client/mappedselectionmodel.h b/src/client/mappedselectionmodel.h index 35f36180..9641658a 100644 --- a/src/client/mappedselectionmodel.h +++ b/src/client/mappedselectionmodel.h @@ -1,11 +1,11 @@ /*************************************************************************** - * Copyright (C) 2005-07 by The Quassel Team * + * Copyright (C) 2005-08 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * + * (at your option) version 3. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -33,35 +33,13 @@ class MappedSelectionModel : public QItemSelectionModel { public: MappedSelectionModel(QAbstractItemModel *model = 0); - virtual ~MappedSelectionModel(); - inline bool isProxyModel() const { return _isProxyModel; } - - const QAbstractItemModel *baseModel() const; - const QAbstractProxyModel *proxyModel() const; - QModelIndex mapFromSource(const QModelIndex &sourceIndex); - QItemSelection mapFromSource(const QItemSelection &sourceSelection); - - QModelIndex mapToSource(const QModelIndex &proxyIndex); - QItemSelection mapToSource(const QItemSelection &proxySelection); + QItemSelection mapSelectionFromSource(const QItemSelection &sourceSelection); public slots: - void mappedSelect(const QModelIndex &index, QItemSelectionModel::SelectionFlags command); void mappedSelect(const QItemSelection &selection, QItemSelectionModel::SelectionFlags command); void mappedSetCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command); - -private slots: - void _currentChanged(const QModelIndex ¤t, const QModelIndex &previous); - void _selectionChanged(const QItemSelection &selected, const QItemSelection &deselected); - -signals: - void mappedCurrentChanged(const QModelIndex ¤t); - void mappedSelectionChanged(const QItemSelection &selected); - -private: - bool _isProxyModel; - }; #endif