KCoreAddons

ktexttohtml.h
1 /*
2  SPDX-FileCopyrightText: 2002 Dave Corrie <[email protected]>
3  SPDX-FileCopyrightText: 2014 Daniel Vr├ítil <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef KCOREADDONS_KTEXTTOHTML_H
9 #define KCOREADDONS_KTEXTTOHTML_H
10 
11 #include <kcoreaddons_export.h>
12 
13 #include <QString>
14 
18 namespace KTextToHTML
19 {
20 
25 enum Option
26 {
30  PreserveSpaces = 1 << 1,
31 
39  ReplaceSmileys = 1 << 2,
40 
44  IgnoreUrls = 1 << 3,
45 
50  HighlightText = 1 << 4,
51 
57 };
61 Q_DECLARE_FLAGS(Options, Option)
62 
63 
82 KCOREADDONS_EXPORT QString convertToHtml(const QString &plainText,
83  const KTextToHTML::Options &options,
84  int maxUrlLen = 4096,
85  int maxAddressLen = 255);
86 
87 }
88 
89 Q_DECLARE_OPERATORS_FOR_FLAGS(KTextToHTML::Options)
90 
91 #endif
Preserve white-space formatting of the text.
Definition: ktexttohtml.h:30
Interpret text highlighting markup, like bold, underline and /italic/, and wrap them in corresponding...
Definition: ktexttohtml.h:50
Replace text emoticons smileys by emoticons images.
Definition: ktexttohtml.h:39
KCOREADDONS_EXPORT QString convertToHtml(const QString &plainText, const KTextToHTML::Options &options, int maxUrlLen=4096, int maxAddressLen=255)
Converts plaintext into html.
Don&#39;t parse and replace any URLs.
Definition: ktexttohtml.h:44
Replace phone numbers with tel: links.
Definition: ktexttohtml.h:56
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri May 29 2020 23:04:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.