Akonadi Contacts

abstractcontactgroupformatter.cpp
1 /*
2  This file is part of Akonadi Contact.
3 
4  Copyright (c) 2010 Tobias Koenig <[email protected]>
5 
6  This library is free software; you can redistribute it and/or modify it
7  under the terms of the GNU Library General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or (at your
9  option) any later version.
10 
11  This library is distributed in the hope that it will be useful, but WITHOUT
12  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14  License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to the
18  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  02110-1301, USA.
20 */
21 
22 #include "abstractcontactgroupformatter.h"
23 
24 #include <item.h>
25 #include <kcontacts/contactgroup.h>
26 
27 using namespace Akonadi;
28 
29 class Q_DECL_HIDDEN AbstractContactGroupFormatter::Private
30 {
31 public:
32  KContacts::ContactGroup mContactGroup;
33  Akonadi::Item mItem;
34  QVector<QVariantMap> mAdditionalFields;
35 };
36 
38  : d(new Private)
39 {
40 }
41 
43 {
44  delete d;
45 }
46 
48 {
49  d->mContactGroup = group;
50 }
51 
53 {
54  return d->mContactGroup;
55 }
56 
57 void AbstractContactGroupFormatter::setItem(const Akonadi::Item &item)
58 {
59  d->mItem = item;
60 }
61 
63 {
64  return d->mItem;
65 }
66 
68 {
69  d->mAdditionalFields = fields;
70 }
71 
73 {
74  return d->mAdditionalFields;
75 }
AbstractContactGroupFormatter()
Creates a new abstract contact group formatter.
The interface for all contact group formatters.
Akonadi::Item item() const
Returns the item who&#39;s payload will be formatted.
QVector< QVariantMap > additionalFields() const
Returns the additional fields that will be shown.
KContacts::ContactGroup contactGroup() const
Returns the contact group that will be formatted.
void setItem(const Akonadi::Item &item)
Sets the item who&#39;s payload will be formatted.
virtual ~AbstractContactGroupFormatter()
Destroys the abstract contact group formatter.
void setContactGroup(const KContacts::ContactGroup &group)
Sets the contact group that will be formatted.
void setAdditionalFields(const QVector< QVariantMap > &fields)
Sets the additional fields that will be shown.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Jul 4 2020 23:08:30 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.