Even though the last alpha was .91 this one is going to be 82 as I'd like to have...
[kdevelopdvcssupport.git] / plugins / projectmanagerview / proxyselectionmodel.h
blobaa831f26f5df2050d4517674da1bd88f9bfb1cc4
1 /* This file is part of KDevelop
2 Copyright 2005 Roberto Raggi <roberto@kdevelop.org>
3 Copyright 2007 Andreas Pakulat <apaku@gmx.de>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
21 #ifndef KDEVPROXYSELECTIONMODEL_H
22 #define KDEVPROXYSELECTIONMODEL_H
24 #include <QItemSelectionModel>
26 class QAbstractProxyModel;
27 class QAbstractItemView;
28 class QModelIndex;
30 class ProxySelectionModel : public QItemSelectionModel
32 Q_OBJECT
33 public:
34 ProxySelectionModel( QAbstractItemView*, QItemSelectionModel*, QObject* parent = 0 );
35 private slots:
36 void changeCurrent( const QModelIndex&, const QModelIndex& );
37 void changeCurrentColumn( const QModelIndex&, const QModelIndex& );
38 void changeCurrentRow( const QModelIndex&, const QModelIndex& );
39 void changeSelection( const QItemSelection&, const QItemSelection& );
41 void forwardChangeCurrent( const QModelIndex&, const QModelIndex& );
42 void forwardChangeCurrentColumn( const QModelIndex&, const QModelIndex& );
43 void forwardChangeCurrentRow( const QModelIndex&, const QModelIndex& );
44 void forwardChangeSelection( const QItemSelection&, const QItemSelection& );
45 private:
46 QItemSelectionModel::SelectionFlags selectionFlags() const;
47 QAbstractProxyModel* proxyModel;
48 QItemSelectionModel* selectionModel;
49 QAbstractItemView* view;
50 bool doingUpdate;
53 #endif // KDEVPROJECTMANAGER_H