2 Copyright (c) 2009 Constantin Berzan <exit3219@gmail.com>
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 using namespace KPIMTextEdit
;
23 using namespace Message
;
25 class TextPart::Private
28 bool wordWrappingEnabled
;
30 QString cleanPlainText
;
31 QString wrappedPlainText
;
33 ImageList embeddedImages
;
36 TextPart::TextPart( QObject
*parent
)
37 : MessagePart( parent
)
40 d
->wordWrappingEnabled
= true;
41 d
->warnBadCharset
= true;
49 bool TextPart::isWordWrappingEnabled() const
51 return d
->wordWrappingEnabled
;
54 void TextPart::setWordWrappingEnabled( bool enabled
)
56 d
->wordWrappingEnabled
= enabled
;
59 bool TextPart::warnBadCharset() const
61 return d
->warnBadCharset
;
64 void TextPart::setWarnBadCharset( bool warn
)
66 d
->warnBadCharset
= warn
;
69 QString
TextPart::cleanPlainText() const
71 return d
->cleanPlainText
;
74 void TextPart::setCleanPlainText( const QString
&text
)
76 d
->cleanPlainText
= text
;
79 QString
TextPart::wrappedPlainText() const
81 return d
->wrappedPlainText
;
84 void TextPart::setWrappedPlainText( const QString
&text
)
86 d
->wrappedPlainText
= text
;
89 bool TextPart::isHtmlUsed() const
91 return !d
->cleanHtml
.isEmpty();
94 QString
TextPart::cleanHtml() const
99 void TextPart::setCleanHtml( const QString
&text
)
104 bool TextPart::hasEmbeddedImages() const
106 return !d
->embeddedImages
.isEmpty();
109 ImageList
TextPart::embeddedImages() const
111 return d
->embeddedImages
;
114 void TextPart::setEmbeddedImages( const ImageList
&images
)
116 d
->embeddedImages
= images
;
119 #include "textpart.moc"