Changeset View
Changeset View
Standalone View
Standalone View
mimetreeparser/src/interfaces/bodypartformatter.h
Show All 37 Lines | |||||
38 | 38 | | |||
39 | #include <QObject> | 39 | #include <QObject> | ||
40 | #include <QSharedPointer> | 40 | #include <QSharedPointer> | ||
41 | 41 | | |||
42 | #include "mimetreeparser/objecttreeparser.h" | 42 | #include "mimetreeparser/objecttreeparser.h" | ||
43 | 43 | | |||
44 | namespace MimeTreeParser { | 44 | namespace MimeTreeParser { | ||
45 | class HtmlWriter; | 45 | class HtmlWriter; | ||
46 | class MessagePart; | ||||
47 | typedef QSharedPointer<MessagePart> MessagePartPtr; | ||||
46 | 48 | | |||
47 | namespace Interface { | 49 | namespace Interface { | ||
48 | class BodyPartURLHandler; | 50 | class BodyPartURLHandler; | ||
49 | class BodyPart; | 51 | class BodyPart; | ||
50 | class MessagePartPrivate; | | |||
51 | | ||||
52 | class MIMETREEPARSER_EXPORT MessagePart : public QObject | | |||
53 | { | | |||
54 | Q_OBJECT | | |||
55 | Q_PROPERTY(QString plaintextContent READ plaintextContent) | | |||
56 | Q_PROPERTY(QString htmlContent READ htmlContent) | | |||
57 | public: | | |||
58 | typedef QSharedPointer<MessagePart> Ptr; | | |||
59 | MessagePart(); | | |||
60 | virtual ~MessagePart(); | | |||
61 | | ||||
62 | virtual QString text() const; | | |||
63 | | ||||
64 | void setParentPart(MessagePart *parentPart); | | |||
65 | MessagePart *parentPart() const; | | |||
66 | | ||||
67 | virtual QString plaintextContent() const; | | |||
68 | virtual QString htmlContent() const; | | |||
69 | | ||||
70 | private: | | |||
71 | MessagePartPrivate *d; | | |||
72 | }; | | |||
73 | 52 | | |||
74 | class MIMETREEPARSER_EXPORT BodyPartFormatter | 53 | class MIMETREEPARSER_EXPORT BodyPartFormatter | ||
75 | { | 54 | { | ||
76 | public: | 55 | public: | ||
77 | virtual ~BodyPartFormatter() | 56 | virtual ~BodyPartFormatter() | ||
78 | { | 57 | { | ||
79 | } | 58 | } | ||
80 | 59 | | |||
Show All 13 Lines | |||||
94 | 73 | | |||
95 | If you a async process and need to send an update information you can use | 74 | If you a async process and need to send an update information you can use | ||
96 | MimeTreeParser::NodeHelper::Update signal with the corresponding instance of BodyPart::nodeHelper() | 75 | MimeTreeParser::NodeHelper::Update signal with the corresponding instance of BodyPart::nodeHelper() | ||
97 | 76 | | |||
98 | @return the result code (see above) | 77 | @return the result code (see above) | ||
99 | */ | 78 | */ | ||
100 | virtual Result format(BodyPart *part, MimeTreeParser::HtmlWriter *writer) const; | 79 | virtual Result format(BodyPart *part, MimeTreeParser::HtmlWriter *writer) const; | ||
101 | 80 | | |||
102 | virtual MessagePart::Ptr process(BodyPart &part) const; | 81 | virtual MimeTreeParser::MessagePartPtr process(BodyPart &part) const; | ||
103 | }; | 82 | }; | ||
104 | 83 | | |||
105 | /** | 84 | /** | ||
106 | @short interface for BodyPartFormatter plugins | 85 | @short interface for BodyPartFormatter plugins | ||
107 | 86 | | |||
108 | The interface is queried by for types, subtypes, and the | 87 | The interface is queried by for types, subtypes, and the | ||
109 | corresponding bodypart formatter, and the result inserted into | 88 | corresponding bodypart formatter, and the result inserted into | ||
110 | the bodypart formatter factory. | 89 | the bodypart formatter factory. | ||
Show All 21 Lines |