• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

akonadi/contact

  • akonadi
  • contact
leafextensionproxymodel_p.h
1/*
2 This file is part of Akonadi Contact.
3
4 Copyright (c) 2010 KDAB
5 Author: Tobias Koenig <tokoe@kde.org>
6
7 This library is free software; you can redistribute it and/or modify it
8 under the terms of the GNU Library General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or (at your
10 option) any later version.
11
12 This library is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
15 License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to the
19 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 02110-1301, USA.
21*/
22
23#ifndef LEAFEXTENSIONPROXYMODEL_H
24#define LEAFEXTENSIONPROXYMODEL_H
25
26#include <QSortFilterProxyModel>
27
28namespace Akonadi {
29
30class LeafExtensionProxyModel : public QSortFilterProxyModel
31{
32 Q_OBJECT
33
34 public:
35 explicit LeafExtensionProxyModel( QObject *parent = 0 );
36 ~LeafExtensionProxyModel();
37
38 QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const;
39 QModelIndex parent( const QModelIndex &index ) const;
40 int rowCount( const QModelIndex &index ) const;
41 int columnCount( const QModelIndex &index ) const;
42
43 QVariant data( const QModelIndex &proxyIndex, int role = Qt::DisplayRole ) const;
44 Qt::ItemFlags flags( const QModelIndex &index ) const;
45 bool setData( const QModelIndex &index, const QVariant &data, int role = Qt::EditRole );
46 bool hasChildren( const QModelIndex &parent = QModelIndex() ) const;
47 QModelIndex buddy( const QModelIndex &index ) const;
48 void fetchMore( const QModelIndex &index );
49
50 void setSourceModel( QAbstractItemModel *sourceModel );
51
52 protected:
56 virtual int leafRowCount( const QModelIndex &index ) const = 0;
57
61 virtual int leafColumnCount( const QModelIndex &index ) const = 0;
62
67 virtual QVariant leafData( const QModelIndex &index, int row, int column, int role = Qt::DisplayRole ) const = 0;
68
69 private:
70 //@cond PRIVATE
71 class Private;
72 Private* const d;
73
74 Q_PRIVATE_SLOT( d, void sourceRowsInserted( const QModelIndex&, int, int ) )
75 Q_PRIVATE_SLOT( d, void sourceRowsRemoved( const QModelIndex&, int, int ) )
76 //@endcond
77};
78
79}
80
81#endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi/contact

Skip menu "akonadi/contact"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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