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

akonadi

  • sources
  • kde-4.12
  • kdepimlibs
  • akonadi
  • contact
contactstreemodel.h
1 /*
2  This file is part of Akonadi Contact.
3 
4  Copyright (c) 2009 Stephen Kelly <steveire@gmail.com>
5  Copyright (c) 2009 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 AKONADI_CONTACTSTREEMODEL_H
24 #define AKONADI_CONTACTSTREEMODEL_H
25 
26 #include "akonadi-contact_export.h"
27 
28 #include <akonadi/entitytreemodel.h>
29 
30 namespace Akonadi {
31 
78 class AKONADI_CONTACT_EXPORT ContactsTreeModel : public EntityTreeModel
79 {
80  Q_OBJECT
81 
82  public:
86  enum Column {
90  FullName,
91 
95  FamilyName,
96 
100  GivenName,
101 
105  Birthday,
106 
110  HomeAddress,
111 
115  BusinessAddress,
116 
120  PhoneNumbers,
121 
125  PreferredEmail,
126 
130  AllEmails,
131 
135  Organization,
136 
140  Role,
141 
145  Homepage,
146 
150  Note
151  };
152 
156  typedef QList<Column> Columns;
157 
161  enum Roles {
162  DateRole = EntityTreeModel::UserRole + 1,
163  UserRole = DateRole + 42
164  };
165 
172  explicit ContactsTreeModel( ChangeRecorder *monitor, QObject *parent = 0 );
173 
177  virtual ~ContactsTreeModel();
178 
182  void setColumns( const Columns &columns );
183 
187  Columns columns() const;
188 
189  //@cond PRIVATE
190  virtual QVariant entityData( const Item &item, int column, int role = Qt::DisplayRole ) const;
191  virtual QVariant entityData( const Collection &collection, int column, int role = Qt::DisplayRole ) const;
192  virtual QVariant entityHeaderData( int section, Qt::Orientation orientation, int role, HeaderGroup headerGroup ) const;
193  virtual int entityColumnCount( HeaderGroup headerGroup ) const;
194  //@endcond
195 
196  private:
197  //@cond PRIVATE
198  class Private;
199  Private* const d;
200  //@endcond
201 };
202 
203 }
204 
205 #endif
Akonadi::ContactsTreeModel::Columns
QList< Column > Columns
Describes a list of columns of the contacts tree model.
Definition: contactstreemodel.h:156
Akonadi::Collection
Represents a collection of PIM items.
Definition: collection.h:75
Akonadi::ContactsTreeModel::Column
Column
Describes the columns that can be shown by the model.
Definition: contactstreemodel.h:86
Akonadi::ContactsTreeModel::GivenName
Shows the given name.
Definition: contactstreemodel.h:100
Akonadi::ContactsTreeModel::HomeAddress
Shows the formatted home address.
Definition: contactstreemodel.h:110
Akonadi::EntityTreeModel::UserRole
First role for user extensions.
Definition: entitytreemodel.h:353
Akonadi::ContactsTreeModel::PreferredEmail
Shows the preferred email address.
Definition: contactstreemodel.h:125
Akonadi::ContactsTreeModel::AllEmails
Shows all email address.
Definition: contactstreemodel.h:130
Akonadi::ContactsTreeModel::FullName
Shows the formatted name or, if empty, the assembled name.
Definition: contactstreemodel.h:90
Akonadi::ContactsTreeModel::FamilyName
Shows the family name.
Definition: contactstreemodel.h:95
Akonadi::ContactsTreeModel
A model for contacts and contact groups as available in Akonadi.
Definition: contactstreemodel.h:78
Akonadi::ContactsTreeModel::Organization
Shows organization name.
Definition: contactstreemodel.h:135
Akonadi::EntityTreeModel
A model for collections and items together.
Definition: entitytreemodel.h:317
Akonadi::ContactsTreeModel::Role
Shows the role of a contact.
Definition: contactstreemodel.h:140
Akonadi::ContactsTreeModel::BusinessAddress
Shows the formatted business address.
Definition: contactstreemodel.h:115
Akonadi::ContactsTreeModel::Birthday
Shows the birthday.
Definition: contactstreemodel.h:105
Akonadi::ContactsTreeModel::PhoneNumbers
Shows the phone numbers.
Definition: contactstreemodel.h:120
Akonadi::ContactsTreeModel::Roles
Roles
Describes the role for contacts and contact groups.
Definition: contactstreemodel.h:161
Akonadi::ContactsTreeModel::Homepage
Shows homepage url.
Definition: contactstreemodel.h:145
Akonadi::ChangeRecorder
Records and replays change notification.
Definition: changerecorder.h:47
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

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

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



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