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 #include <memory>
15 
16 namespace GrantleeTheme
17 {
18 class Theme;
19 }
20 
21 namespace KAddressBookGrantlee
22 {
23 class GrantleeContactFormatterPrivate;
24 
25 /**
26  * @short A class that formats a contact as HTML code.
27  *
28  * @author Tobias Koenig <[email protected]>
29  */
30 class AKONADI_CONTACT_EXPORT GrantleeContactFormatter : public Akonadi::AbstractContactFormatter
31 {
32 public:
33  /**
34  * Creates a new grantlee contact formatter.
35  */
36  explicit GrantleeContactFormatter();
37 
38  /**
39  * Destroys the grantlee contact formatter.
40  */
41  ~GrantleeContactFormatter() override;
42 
43  void setAbsoluteThemePath(const QString &path);
44 
45  void setGrantleeTheme(const GrantleeTheme::Theme &theme);
46 
47  void setForceDisableQRCode(bool b);
48  Q_REQUIRED_RESULT bool forceDisableQRCode() const;
49 
50  /**
51  * Returns the contact formatted as HTML
52  */
53  Q_REQUIRED_RESULT QString toHtml(HtmlForm form = SelfcontainedForm) const override;
54 
55  void setShowQRCode(bool b);
56 
57  /** Translation domain for the Grantlee localizer. */
58  void setApplicationDomain(const QByteArray &domain);
59 
60 private:
61  //@cond PRIVATE
62  std::unique_ptr<GrantleeContactFormatterPrivate> const d;
63  //@endcond
64 };
65 }
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-2023 The KDE developers.
Generated on Sat Apr 1 2023 04:09:05 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.