Akonadi Contacts

standardcontactgroupformatter.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 #pragma once
10 
11 #include "akonadi-contact_export.h"
12 
13 #include "abstractcontactgroupformatter.h"
14 
15 #include <memory>
16 
17 namespace Akonadi
18 {
19 class 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 <[email protected]>
41  * @since 4.6
42  */
43 class AKONADI_CONTACT_EXPORT StandardContactGroupFormatter : public AbstractContactGroupFormatter
44 {
45 public:
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  Q_REQUIRED_RESULT QString toHtml(HtmlForm form = SelfcontainedForm) const override;
60 
61 private:
62  //@cond PRIVATE
63  std::unique_ptr<StandardContactGroupFormatterPrivate> const d;
64  //@endcond
65 };
66 }
HtmlForm
Describes the form of the HTML that is created.
A class that formats a contact group as HTML code.
The interface for all contact group 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.