11class TextPart::TextPartPrivate
14 TextPartPrivate() =
default;
16 KPIMTextEdit::ImageList embeddedImages;
20 bool wordWrappingEnabled =
true;
21 bool warnBadCharset =
true;
24TextPart::TextPart(
QObject *parent)
26 , d(new TextPartPrivate)
30TextPart::~TextPart() =
default;
34 return d->wordWrappingEnabled;
37void TextPart::setWordWrappingEnabled(
bool enabled)
39 if (d->wordWrappingEnabled == enabled) {
42 d->wordWrappingEnabled = enabled;
43 Q_EMIT wordWrappingChanged();
48 return d->warnBadCharset;
51void TextPart::setWarnBadCharset(
bool warn)
53 if (d->warnBadCharset == warn) {
56 d->warnBadCharset = warn;
57 Q_EMIT warnBadCharsetChanged();
60QString TextPart::cleanPlainText()
const
62 return d->cleanPlainText;
65void TextPart::setCleanPlainText(
const QString &text)
67 if (d->cleanPlainText == text) {
70 d->cleanPlainText = text;
71 Q_EMIT cleanPlainTextChanged();
74QString TextPart::wrappedPlainText()
const
76 return d->wrappedPlainText;
79void TextPart::setWrappedPlainText(
const QString &text)
81 if (d->wrappedPlainText == text) {
84 d->wrappedPlainText = text;
85 Q_EMIT wrappedPlainTextChanged();
88bool TextPart::isHtmlUsed()
const
90 return !d->cleanHtml.isEmpty();
93QString TextPart::cleanHtml()
const
98void TextPart::setCleanHtml(
const QString &text)
100 if (d->cleanHtml == text) {
104 Q_EMIT cleanHtmlChanged();
107bool TextPart::hasEmbeddedImages()
const
109 return !d->embeddedImages.isEmpty();
112KPIMTextEdit::ImageList TextPart::embeddedImages()
const
114 return d->embeddedImages;
117void TextPart::setEmbeddedImages(
const KPIMTextEdit::ImageList &images)
119 d->embeddedImages = images;
122#include "moc_textpart.cpp"
bool warnBadCharset
Default true.
bool isWordWrappingEnabled
True iff the text is word wrapped. By default: true.
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...