Akonadi Contacts

grantleecontactformatter.h
1 /*
2  This file is part of KAddressBook.
3 
4  SPDX-FileCopyrightText: 2010 Tobias Koenig <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #pragma once
10 
11 #include "abstractcontactformatter.h"
12 #include "akonadi-contact_export.h"
13 
14 namespace GrantleeTheme
15 {
16 class Theme;
17 }
18 
19 namespace KAddressBookGrantlee
20 {
21 /**
22  * @short A class that formats a contact as HTML code.
23  *
24  * @author Tobias Koenig <[email protected]>
25  */
26 class AKONADI_CONTACT_EXPORT GrantleeContactFormatter : public Akonadi::AbstractContactFormatter
27 {
28 public:
29  /**
30  * Creates a new grantlee contact formatter.
31  */
32  explicit GrantleeContactFormatter();
33 
34  /**
35  * Destroys the grantlee contact formatter.
36  */
37  ~GrantleeContactFormatter() override;
38 
39  void setAbsoluteThemePath(const QString &path);
40 
41  void setGrantleeTheme(const GrantleeTheme::Theme &theme);
42 
43  void setForceDisableQRCode(bool b);
44  Q_REQUIRED_RESULT bool forceDisableQRCode() const;
45 
46  /**
47  * Returns the contact formatted as HTML
48  */
49  Q_REQUIRED_RESULT QString toHtml(HtmlForm form = SelfcontainedForm) const override;
50 
51  void setShowQRCode(bool b);
52 
53  /** Translation domain for the Grantlee localizer. */
54  void setApplicationDomain(const QByteArray &domain);
55 
56 private:
57  //@cond PRIVATE
58  class Private;
59  Private *const d;
60  //@endcond
61 };
62 }
63 
HtmlForm
Describes the form of the HTML that is created.
A class that formats a contact as HTML code.
The interface for all contact formatters.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Jun 23 2021 23:09:25 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.