Akonadi Contacts

grantleecontactformatter.h
1/*
2 This file is part of KAddressBook.
3
4 SPDX-FileCopyrightText: 2010 Tobias Koenig <tokoe@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#pragma once
10
11#include "abstractcontactformatter.h"
12#include "akonadi-contact-core_export.h"
13
14#include <memory>
15
16namespace GrantleeTheme
17{
18class Theme;
19}
20
21namespace KAddressBookGrantlee
22{
23class GrantleeContactFormatterPrivate;
24
25/**
26 * @short A class that formats a contact as HTML code.
27 *
28 * @author Tobias Koenig <tokoe@kde.org>
29 */
30class AKONADI_CONTACT_CORE_EXPORT GrantleeContactFormatter : public Akonadi::AbstractContactFormatter
31{
32public:
33 /**
34 * Creates a new grantlee contact formatter.
35 */
36 explicit GrantleeContactFormatter();
37
38 /**
39 * Destroys the grantlee contact formatter.
40 */
42
43 void setAbsoluteThemePath(const QString &path);
44
45 void setGrantleeTheme(const GrantleeTheme::Theme &theme);
46
47 void setForceDisableQRCode(bool b);
48 [[nodiscard]] bool forceDisableQRCode() const;
49
50 /**
51 * Returns the contact formatted as HTML
52 */
53 [[nodiscard]] 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
60private:
61 //@cond PRIVATE
62 std::unique_ptr<GrantleeContactFormatterPrivate> const d;
63 //@endcond
64};
65}
The interface for all contact formatters.
HtmlForm
Describes the form of the HTML that is created.
A class that formats a contact as HTML code.
~GrantleeContactFormatter() override
Destroys the grantlee contact formatter.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:05:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.