Messagelib

textpart.h
1 /*
2  SPDX-FileCopyrightText: 2009 Constantin Berzan <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef MESSAGECOMPOSER_TEXTPART_H
8 #define MESSAGECOMPOSER_TEXTPART_H
9 
10 #include <QString>
11 
12 #include "messagecomposer_export.h"
13 #include "messagepart.h"
14 #include <KPIMTextEdit/RichTextComposerImages>
15 
16 namespace MessageComposer {
20 class MESSAGECOMPOSER_EXPORT TextPart : public MessagePart
21 {
22  Q_OBJECT
23 
24 public:
25  explicit TextPart(QObject *parent = nullptr);
26  ~TextPart() override;
27 
28  // default true
29  Q_REQUIRED_RESULT bool isWordWrappingEnabled() const;
30  void setWordWrappingEnabled(bool enabled);
31  // default true
32  Q_REQUIRED_RESULT bool warnBadCharset() const;
33  void setWarnBadCharset(bool warn);
34 
35  Q_REQUIRED_RESULT QString cleanPlainText() const;
36  void setCleanPlainText(const QString &text);
37  Q_REQUIRED_RESULT QString wrappedPlainText() const;
38  void setWrappedPlainText(const QString &text);
39 
40  Q_REQUIRED_RESULT bool isHtmlUsed() const;
41  Q_REQUIRED_RESULT QString cleanHtml() const;
42  void setCleanHtml(const QString &text);
43 
44  Q_REQUIRED_RESULT bool hasEmbeddedImages() const;
45  Q_REQUIRED_RESULT KPIMTextEdit::ImageList embeddedImages() const;
46  void setEmbeddedImages(const KPIMTextEdit::ImageList &images);
47 
48 private:
49  class Private;
50  Private *const d;
51 };
52 } // namespace MessageComposer
53 
54 #endif // MESSAGECOMPOSER_TEXTPART_H
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
The TextPart class.
Definition: textpart.h:20
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Oct 30 2020 23:17:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.