• Skip to content
  • Skip to link menu
KDE 4.8 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

akonadi

leafextensionproxymodel_p.h
00001 /*
00002     This file is part of Akonadi Contact.
00003 
00004     Copyright (c) 2010 KDAB
00005     Author: Tobias Koenig <tokoe@kde.org>
00006 
00007     This library is free software; you can redistribute it and/or modify it
00008     under the terms of the GNU Library General Public License as published by
00009     the Free Software Foundation; either version 2 of the License, or (at your
00010     option) any later version.
00011 
00012     This library is distributed in the hope that it will be useful, but WITHOUT
00013     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00015     License for more details.
00016 
00017     You should have received a copy of the GNU Library General Public License
00018     along with this library; see the file COPYING.LIB.  If not, write to the
00019     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00020     02110-1301, USA.
00021 */
00022 
00023 #ifndef LEAFEXTENSIONPROXYMODEL_H
00024 #define LEAFEXTENSIONPROXYMODEL_H
00025 
00026 #include <QtGui/QSortFilterProxyModel>
00027 
00028 namespace Akonadi {
00029 
00030 class LeafExtensionProxyModel : public QSortFilterProxyModel
00031 {
00032   Q_OBJECT
00033 
00034   public:
00035     LeafExtensionProxyModel( QObject *parent = 0 );
00036     ~LeafExtensionProxyModel();
00037 
00038     QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const;
00039     QModelIndex parent( const QModelIndex &index ) const;
00040     int rowCount( const QModelIndex &index ) const;
00041     int columnCount( const QModelIndex &index ) const;
00042 
00043     QVariant data( const QModelIndex &proxyIndex, int role = Qt::DisplayRole ) const;
00044     Qt::ItemFlags flags( const QModelIndex &index ) const;
00045     bool setData( const QModelIndex &index, const QVariant &data, int role = Qt::EditRole );
00046     bool hasChildren( const QModelIndex &parent = QModelIndex() ) const;
00047     QModelIndex buddy( const QModelIndex &index ) const;
00048     void fetchMore( const QModelIndex &index );
00049 
00050     void setSourceModel( QAbstractItemModel *sourceModel );
00051 
00052   protected:
00056     virtual int leafRowCount( const QModelIndex &index ) const = 0;
00057 
00061     virtual int leafColumnCount( const QModelIndex &index ) const = 0;
00062 
00067     virtual QVariant leafData( const QModelIndex &index, int row, int column, int role = Qt::DisplayRole ) const = 0;
00068 
00069   private:
00070     //@cond PRIVATE
00071     class Private;
00072     Private* const d;
00073 
00074     Q_PRIVATE_SLOT( d, void sourceRowsInserted( const QModelIndex&, int, int ) )
00075     Q_PRIVATE_SLOT( d, void sourceRowsRemoved( const QModelIndex&, int, int ) )
00076     //@endcond
00077 };
00078 
00079 }
00080 
00081 #endif

akonadi

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal