• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

KPIMTextedit Library

  • KPIMTextEdit
  • TextUtils
Functions
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()

bool KPIMTextEdit::TextUtils::containsFormatting ( const QTextDocument *  document)

Returns whether the QTextDocument document contains rich text formatting.

Definition at line 69 of file textutils.cpp.

◆ flowText()

QString KPIMTextEdit::TextUtils::flowText ( QString &  text,
const QString &  indent,
int  maxLength 
)

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
textthe text to indent
indentthe indentation prefix string
maxLengththe 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 116 of file textutils.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KPIMTextedit Library

Skip menu "KPIMTextedit Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal