• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • kdeui
  • itemviews
kidentityproxymodel.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2010 Klarälvdalens Datakonsult AB,
3 a KDAB Group company, info@kdab.net,
4 author Stephen Kelly <stephen@kdab.com>
5
6 This library is free software; you can redistribute it and/or modify it
7 under the terms of the GNU Library General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or (at your
9 option) any later version.
10
11 This library is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14 License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 02110-1301, USA.
20*/
21
22#ifndef KIDENTITYPROXYMODEL_H
23#define KIDENTITYPROXYMODEL_H
24
25#include <QtGui/QAbstractProxyModel>
26
27#include "kdeui_export.h"
28
29class KIdentityProxyModelPrivate;
30
31class KDEUI_EXPORT KIdentityProxyModel : public QAbstractProxyModel
32{
33 Q_OBJECT
34public:
35 explicit KIdentityProxyModel(QObject* parent = 0);
36 virtual ~KIdentityProxyModel();
37
38 int columnCount(const QModelIndex& parent = QModelIndex()) const;
39 QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const;
40 QModelIndex mapFromSource(const QModelIndex& sourceIndex) const;
41 QModelIndex mapToSource(const QModelIndex& proxyIndex) const;
42 QModelIndex parent(const QModelIndex& child) const;
43 int rowCount(const QModelIndex& parent = QModelIndex()) const;
44 bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent);
45 QVariant headerData(int section, Qt::Orientation orientation, int role) const;
46
47 QItemSelection mapSelectionFromSource(const QItemSelection& selection) const;
48 QItemSelection mapSelectionToSource(const QItemSelection& selection) const;
49 QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits = 1, Qt::MatchFlags flags = Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const;
50 void setSourceModel(QAbstractItemModel* sourceModel);
51
52 bool insertColumns(int column, int count, const QModelIndex& parent = QModelIndex());
53 bool insertRows(int row, int count, const QModelIndex& parent = QModelIndex());
54 bool removeColumns(int column, int count, const QModelIndex& parent = QModelIndex());
55 bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex());
56
57 virtual bool canFetchMore(const QModelIndex& parent) const;
58 virtual void fetchMore(const QModelIndex& parent);
59 virtual QStringList mimeTypes() const;
60 virtual QMimeData* mimeData(const QModelIndexList& indexes) const;
61 virtual Qt::DropActions supportedDropActions() const;
62
63protected:
64 KIdentityProxyModel(KIdentityProxyModelPrivate *privateClass, QObject* parent);
65 KIdentityProxyModelPrivate * const d_ptr;
66
67protected Q_SLOTS:
68 virtual void resetInternalData();
69
70private:
71 Q_DECLARE_PRIVATE(KIdentityProxyModel)
72 Q_DISABLE_COPY(KIdentityProxyModel)
73
74 Q_PRIVATE_SLOT(d_func(), void _k_sourceRowsAboutToBeInserted(QModelIndex,int,int))
75 Q_PRIVATE_SLOT(d_func(), void _k_sourceRowsInserted(QModelIndex,int,int))
76 Q_PRIVATE_SLOT(d_func(), void _k_sourceRowsAboutToBeRemoved(QModelIndex,int,int))
77 Q_PRIVATE_SLOT(d_func(), void _k_sourceRowsRemoved(QModelIndex,int,int))
78 Q_PRIVATE_SLOT(d_func(), void _k_sourceRowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))
79 Q_PRIVATE_SLOT(d_func(), void _k_sourceRowsMoved(QModelIndex,int,int,QModelIndex,int))
80
81 Q_PRIVATE_SLOT(d_func(), void _k_sourceColumnsAboutToBeInserted(QModelIndex,int,int))
82 Q_PRIVATE_SLOT(d_func(), void _k_sourceColumnsInserted(QModelIndex,int,int))
83 Q_PRIVATE_SLOT(d_func(), void _k_sourceColumnsAboutToBeRemoved(QModelIndex,int,int))
84 Q_PRIVATE_SLOT(d_func(), void _k_sourceColumnsRemoved(QModelIndex,int,int))
85 Q_PRIVATE_SLOT(d_func(), void _k_sourceColumnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))
86 Q_PRIVATE_SLOT(d_func(), void _k_sourceColumnsMoved(QModelIndex,int,int,QModelIndex,int))
87
88 Q_PRIVATE_SLOT(d_func(), void _k_sourceDataChanged(QModelIndex,QModelIndex))
89 Q_PRIVATE_SLOT(d_func(), void _k_sourceHeaderDataChanged(Qt::Orientation orientation, int first, int last))
90
91 Q_PRIVATE_SLOT(d_func(), void _k_sourceLayoutAboutToBeChanged())
92 Q_PRIVATE_SLOT(d_func(), void _k_sourceLayoutChanged())
93 // Q_PRIVATE_SLOT(d_func(), void _k_sourceChildrenLayoutsAboutToBeChanged(const QModelIndex &parent1, const QModelIndex &parent2))
94 // Q_PRIVATE_SLOT(d_func(), void _k_sourceChildrenLayoutsChanged(const QModelIndex &parent1, const QModelIndex &parent2))
95 Q_PRIVATE_SLOT(d_func(), void _k_sourceModelAboutToBeReset())
96 Q_PRIVATE_SLOT(d_func(), void _k_sourceModelReset())
97 Q_PRIVATE_SLOT(d_func(), void _k_sourceModelDestroyed())
98};
99
100#endif // KIDENTITYPROXYMODEL_H
KIdentityProxyModel
The KIdentityProxyModel class proxies its source model unmodified.
Definition: kidentityproxymodel.h:32
KIdentityProxyModel::d_ptr
KIdentityProxyModelPrivate *const d_ptr
Definition: kidentityproxymodel.h:65
QAbstractItemModel
QAbstractProxyModel
QObject
kdeui_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal