Akonadi Contacts

standardcontactgroupformatter.h
1/*
2 This file is part of Akonadi Contact.
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 "akonadi-contact-core_export.h"
12
13#include "abstractcontactgroupformatter.h"
14
15#include <memory>
16
17namespace Akonadi
18{
19class StandardContactGroupFormatterPrivate;
20
21/**
22 * @short A class that formats a contact group as HTML code.
23 *
24 * Examples:
25 *
26 * @code
27 *
28 * using namespace Akonadi;
29 *
30 * const KContacts::ContactGroup group = ...
31 *
32 * StandardContactGroupFormatter formatter;
33 * formatter.setContactGroup( group );
34 *
35 * QTextBrowser *view = new QTextBrowser;
36 * view->setHtml( formatter.toHtml() );
37 *
38 * @endcode
39 *
40 * @author Tobias Koenig <tokoe@kde.org>
41 * @since 4.6
42 */
43class AKONADI_CONTACT_CORE_EXPORT StandardContactGroupFormatter : public AbstractContactGroupFormatter
44{
45public:
46 /**
47 * Creates a new standard contact group formatter.
48 */
50
51 /**
52 * Destroys the standard contact group formatter.
53 */
55
56 /**
57 * Returns the contact group formatted as HTML.
58 */
59 [[nodiscard]] QString toHtml(HtmlForm form = SelfcontainedForm) const override;
60
61private:
62 //@cond PRIVATE
63 std::unique_ptr<StandardContactGroupFormatterPrivate> const d;
64 //@endcond
65};
66}
The interface for all contact group formatters.
HtmlForm
Describes the form of the HTML that is created.
A class that formats a contact group as HTML code.
~StandardContactGroupFormatter() override
Destroys the standard contact group formatter.
A widget for editing the display name of a contact.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:08 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.