KDEUI
kmodelindexproxymapper.h
Go to the documentation of this file.
00001 /* 00002 Copyright (C) 2010 Klarälvdalens Datakonsult AB, 00003 a KDAB Group company, info@kdab.net, 00004 author Stephen Kelly <stephen@kdab.com> 00005 00006 This library is free software; you can redistribute it and/or modify it 00007 under the terms of the GNU Library General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or (at your 00009 option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, but WITHOUT 00012 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00013 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00014 License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to the 00018 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00019 02110-1301, USA. 00020 */ 00021 00022 #ifndef KMODELINDEXPROXYMAPPER_H 00023 #define KMODELINDEXPROXYMAPPER_H 00024 00025 #include <QObject> 00026 00027 #include "kdeui_export.h" 00028 00029 class QAbstractItemModel; 00030 class QModelIndex; 00031 class QItemSelection; 00032 class KModelIndexProxyMapperPrivate; 00033 00079 class KDEUI_EXPORT KModelIndexProxyMapper : public QObject 00080 { 00081 Q_OBJECT 00082 public: 00086 KModelIndexProxyMapper(const QAbstractItemModel *leftModel, const QAbstractItemModel *rightModel, QObject* parent = 0); 00087 00088 ~KModelIndexProxyMapper(); 00089 00093 QModelIndex mapLeftToRight(const QModelIndex &index) const; 00094 00098 QModelIndex mapRightToLeft(const QModelIndex &index) const; 00099 00103 QItemSelection mapSelectionLeftToRight(const QItemSelection &selection) const; 00104 00108 QItemSelection mapSelectionRightToLeft(const QItemSelection &selection) const; 00109 00110 private: 00111 //@cond PRIVATE 00112 Q_DECLARE_PRIVATE(KModelIndexProxyMapper) 00113 KModelIndexProxyMapperPrivate * const d_ptr; 00114 //@endcond 00115 }; 00116 00117 #endif
KDE 4.6 API Reference