KPIMTextEdit::TextUtils
KPIMTextEdit::TextUtils Namespace Reference
Functions | |
KPIMTEXTEDIT_EXPORT bool | containsFormatting (const QTextDocument *document) |
KPIMTEXTEDIT_EXPORT QString | flowText (QString &text, const QString &indent, int maxLength) |
Detailed Description
Utility class for methods working with rich text.
- Since
- 4.5
Function Documentation
◆ containsFormatting()
|
nodiscard |
Returns whether the QTextDocument document
contains rich text formatting.
Definition at line 49 of file textutils.cpp.
◆ flowText()
|
nodiscard |
Changes the given text so that each line of it fits into the given maximal length.
At each line, the "indent" string is prepended, which is usually the quote prefix. The text parameter will be empty afterwards.
- Parameters
-
text the text to indent indent the indentation prefix string maxLength the maximal length the string of text will fit into Example: text = "Hello World, this is a test." indent = "> " maxLength = 16 Result: "> Hello World,\n" "> this is a test."
Definition at line 94 of file textutils.cpp.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:55:51 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:55:51 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.