Akonadi Contacts

abstractcontactgroupformatter.h
1 /*
2  This file is part of Akonadi Contact.
3 
4  SPDX-FileCopyrightText: 2010 Tobias Koenig <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #ifndef AKONADI_ABSTRACTCONTACTGROUPFORMATTER_H
10 #define AKONADI_ABSTRACTCONTACTGROUPFORMATTER_H
11 
12 #include "akonadi-contact_export.h"
13 
14 #include <QVariant>
15 
16 namespace KContacts {
17 class ContactGroup;
18 }
19 
20 namespace Akonadi {
21 class Item;
22 
33 class AKONADI_CONTACT_EXPORT AbstractContactGroupFormatter
34 {
35 public:
39  enum HtmlForm {
42  UserForm = SelfcontainedForm + 42
43  };
44 
49 
54 
58  void setContactGroup(const KContacts::ContactGroup &group);
59 
63  Q_REQUIRED_RESULT KContacts::ContactGroup contactGroup() const;
64 
72  void setItem(const Akonadi::Item &item);
73 
77  Q_REQUIRED_RESULT Akonadi::Item item() const;
78 
90  void setAdditionalFields(const QVector<QVariantMap> &fields);
91 
95  Q_REQUIRED_RESULT QVector<QVariantMap> additionalFields() const;
96 
101  virtual QString toHtml(HtmlForm form = SelfcontainedForm) const = 0;
102 
103 private:
104  //@cond PRIVATE
105  Q_DISABLE_COPY(AbstractContactGroupFormatter)
106 
107  class Private;
108  Private *const d;
109  //@endcond
110 };
111 }
112 
113 #endif
The interface for all contact group formatters.
Creates a div HTML element that can be embedded.
HtmlForm
Describes the form of the HTML that is created.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 23 2021 05:59:51 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.