Akonadi Contacts

contactstreemodel.h
1 /*
2  This file is part of Akonadi Contact.
3 
4  SPDX-FileCopyrightText: 2009 Stephen Kelly <[email protected]>
5  SPDX-FileCopyrightText: 2009 Tobias Koenig <[email protected]>
6 
7  SPDX-License-Identifier: LGPL-2.0-or-later
8 */
9 
10 #ifndef AKONADI_CONTACTSTREEMODEL_H
11 #define AKONADI_CONTACTSTREEMODEL_H
12 
13 #include "akonadi-contact_export.h"
14 
15 #include <entitytreemodel.h>
16 
17 namespace Akonadi {
64 class AKONADI_CONTACT_EXPORT ContactsTreeModel : public EntityTreeModel
65 {
66  Q_OBJECT
67 
68 public:
72  enum Column {
77 
82 
87 
92 
97 
102 
107 
112 
117 
122 
127 
132 
136  Note
137  };
138 
143 
147  enum Roles {
148  DateRole = EntityTreeModel::UserRole + 1,
149  UserRole = DateRole + 42
150  };
151 
158  explicit ContactsTreeModel(Monitor *monitor, QObject *parent = nullptr);
159 
163  ~ContactsTreeModel() override;
164 
168  void setColumns(const Columns &columns);
169 
173  Q_REQUIRED_RESULT Columns columns() const;
174 
175  //@cond PRIVATE
176  Q_REQUIRED_RESULT QVariant entityData(const Item &item, int column, int role = Qt::DisplayRole) const override;
177  Q_REQUIRED_RESULT QVariant entityData(const Collection &collection, int column, int role = Qt::DisplayRole) const override;
178  Q_REQUIRED_RESULT QVariant entityHeaderData(int section, Qt::Orientation orientation, int role, HeaderGroup headerGroup) const override;
179  Q_REQUIRED_RESULT int entityColumnCount(HeaderGroup headerGroup) const override;
180  //@endcond
181 
182 private:
183  //@cond PRIVATE
184  class Private;
185  Private *const d;
186  //@endcond
187 };
188 }
189 
190 #endif
QList< Column > Columns
Describes a list of columns of the contacts tree model.
Column
Describes the columns that can be shown by the model.
Shows the formatted home address.
Shows the preferred email address.
DisplayRole
Shows the formatted name or, if empty, the assembled name.
A model for contacts and contact groups as available in Akonadi.
Shows the role of a contact.
Orientation
Shows the formatted business address.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Oct 27 2020 23:13:14 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.