akonadi/contact
contactstreemodel.h
00001 /* 00002 This file is part of Akonadi Contact. 00003 00004 Copyright (c) 2009 Stephen Kelly <steveire@gmail.com> 00005 Copyright (c) 2009 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 AKONADI_CONTACTSTREEMODEL_H 00024 #define AKONADI_CONTACTSTREEMODEL_H 00025 00026 #include "akonadi-contact_export.h" 00027 00028 #include <akonadi/entitytreemodel.h> 00029 00030 namespace Akonadi { 00031 00078 class AKONADI_CONTACT_EXPORT ContactsTreeModel : public EntityTreeModel 00079 { 00080 Q_OBJECT 00081 00082 public: 00086 enum Column 00087 { 00091 FullName, 00092 00096 FamilyName, 00097 00101 GivenName, 00102 00106 Birthday, 00107 00111 HomeAddress, 00112 00116 BusinessAddress, 00117 00121 PhoneNumbers, 00122 00126 PreferredEmail, 00127 00131 AllEmails, 00132 00136 Organization, 00137 00141 Role, 00142 00146 Homepage, 00147 00151 Note 00152 }; 00153 00157 typedef QList<Column> Columns; 00158 00162 enum Roles 00163 { 00164 DateRole = EntityTreeModel::UserRole + 1, 00165 UserRole = DateRole + 42 00166 }; 00167 00174 explicit ContactsTreeModel( ChangeRecorder *monitor, QObject *parent = 0 ); 00175 00179 virtual ~ContactsTreeModel(); 00180 00184 void setColumns( const Columns &columns ); 00185 00189 Columns columns() const; 00190 00191 //@cond PRIVATE 00192 virtual QVariant entityData( const Item &item, int column, int role = Qt::DisplayRole ) const; 00193 virtual QVariant entityData( const Collection &collection, int column, int role = Qt::DisplayRole ) const; 00194 virtual QVariant entityHeaderData( int section, Qt::Orientation orientation, int role, HeaderGroup headerGroup ) const; 00195 virtual int entityColumnCount( HeaderGroup headerGroup ) const; 00196 //@endcond 00197 00198 private: 00199 //@cond PRIVATE 00200 class Private; 00201 Private* const d; 00202 //@endcond 00203 }; 00204 00205 } 00206 00207 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Tue May 8 2012 00:02:51 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Tue May 8 2012 00:02:51 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.