MessageComposer::TextPart Class

Header: #include <MessageComposer/TextPart>
CMake: find_package(KPim6MessageComposer REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::MessageComposer)
Inherits: MessageComposer::MessagePart

Public Functions

TextPart(QObject *parent = nullptr)
virtual ~TextPart() override
QString cleanHtml() const
QString cleanPlainText() const
KPIMTextEdit::ImageList embeddedImages() const
bool hasEmbeddedImages() const
bool isHtmlUsed() const
bool isWordWrappingEnabled() const
void setCleanHtml(const QString &text)
void setCleanPlainText(const QString &text)
void setEmbeddedImages(const KPIMTextEdit::ImageList &images)
void setWarnBadCharset(bool warn)
void setWordWrappingEnabled(bool enabled)
void setWrappedPlainText(const QString &text)
bool warnBadCharset() const
QString wrappedPlainText() const

Signals

Detailed Description

The TextPart class.

Member Function Documentation

[explicit] TextPart::TextPart(QObject *parent = nullptr)

Constructs a TextPart. parent The parent object.

[override virtual noexcept] TextPart::~TextPart()

Destroys the TextPart.

QString TextPart::cleanHtml() const

Returns the HTML content with cleaned elements.

See also setCleanHtml().

[signal] void TextPart::cleanHtmlChanged()

Emitted when the HTML content changes.

QString TextPart::cleanPlainText() const

Returns the plain text content with cleaned characters.

See also setCleanPlainText().

[signal] void TextPart::cleanPlainTextChanged()

Emitted when the clean plain text content changes.

KPIMTextEdit::ImageList TextPart::embeddedImages() const

Returns the list of embedded images.

See also setEmbeddedImages().

[signal] void TextPart::embeddedImagesChanged()

Emitted when the embedded images list changes.

bool TextPart::hasEmbeddedImages() const

Returns whether the message has embedded images.

bool TextPart::isHtmlUsed() const

Returns whether HTML content is being used.

bool TextPart::isWordWrappingEnabled() const

Returns whether word wrapping is enabled.

void TextPart::setCleanHtml(const QString &text)

Sets the HTML content. text The HTML text to set.

See also cleanHtml().

void TextPart::setCleanPlainText(const QString &text)

Sets the plain text content. text The plain text to set.

See also cleanPlainText().

void TextPart::setEmbeddedImages(const KPIMTextEdit::ImageList &images)

Sets the list of embedded images. images The list of images to embed.

See also embeddedImages().

void TextPart::setWarnBadCharset(bool warn)

Sets whether to warn about bad character sets. warn True to enable the warning.

See also warnBadCharset().

void TextPart::setWordWrappingEnabled(bool enabled)

Sets whether word wrapping is enabled. enabled True to enable word wrapping.

See also isWordWrappingEnabled().

void TextPart::setWrappedPlainText(const QString &text)

Sets the wrapped plain text content. text The wrapped text to set.

See also wrappedPlainText().

bool TextPart::warnBadCharset() const

Returns whether to warn about bad character sets.

See also setWarnBadCharset().

[signal] void TextPart::warnBadCharsetChanged()

Emitted when the bad charset warning setting changes.

[signal] void TextPart::wordWrappingChanged()

Emitted when the word wrapping setting changes.

QString TextPart::wrappedPlainText() const

Returns the plain text content wrapped to the appropriate line length.

See also setWrappedPlainText().

[signal] void TextPart::wrappedPlainTextChanged()

Emitted when the wrapped plain text content changes.