Changeset View
Changeset View
Standalone View
Standalone View
mimetreeparser/src/partnodebodypart.cpp
Show All 39 Lines | |||||
40 | #include <QUrl> | 40 | #include <QUrl> | ||
41 | 41 | | |||
42 | using namespace MimeTreeParser; | 42 | using namespace MimeTreeParser; | ||
43 | 43 | | |||
44 | PartNodeBodyPart::PartNodeBodyPart(ObjectTreeParser *otp, ProcessResult *result, KMime::Content *topLevelContent, KMime::Content *content, NodeHelper *nodeHelper) | 44 | PartNodeBodyPart::PartNodeBodyPart(ObjectTreeParser *otp, ProcessResult *result, KMime::Content *topLevelContent, KMime::Content *content, NodeHelper *nodeHelper) | ||
45 | : Interface::BodyPart() | 45 | : Interface::BodyPart() | ||
46 | , mTopLevelContent(topLevelContent) | 46 | , mTopLevelContent(topLevelContent) | ||
47 | , mContent(content) | 47 | , mContent(content) | ||
48 | , mDefaultDisplay(Interface::BodyPart::None) | | |||
49 | , mNodeHelper(nodeHelper) | 48 | , mNodeHelper(nodeHelper) | ||
50 | , mObjectTreeParser(otp) | 49 | , mObjectTreeParser(otp) | ||
51 | , mProcessResult(result) | 50 | , mProcessResult(result) | ||
52 | { | 51 | { | ||
53 | } | 52 | } | ||
54 | 53 | | |||
55 | Interface::BodyPartMemento *PartNodeBodyPart::memento() const | 54 | Interface::BodyPartMemento *PartNodeBodyPart::memento() const | ||
56 | { | 55 | { | ||
57 | /*TODO(Andras) Volker suggests to use a ContentIndex->Mememnto mapping | 56 | /*TODO(Andras) Volker suggests to use a ContentIndex->Mememnto mapping | ||
58 | Also review if the reader's bodyPartMemento should be returned or the NodeHelper's one | 57 | Also review if the reader's bodyPartMemento should be returned or the NodeHelper's one | ||
59 | */ | 58 | */ | ||
60 | return mNodeHelper->bodyPartMemento(mContent, "__plugin__"); | 59 | return mNodeHelper->bodyPartMemento(mContent, "__plugin__"); | ||
61 | } | 60 | } | ||
62 | 61 | | |||
63 | Interface::BodyPart::Display PartNodeBodyPart::defaultDisplay() const | | |||
64 | { | | |||
65 | return mDefaultDisplay; | | |||
66 | } | | |||
67 | 62 | | |||
68 | void PartNodeBodyPart::setDefaultDisplay(Interface::BodyPart::Display d) | | |||
69 | { | | |||
70 | mDefaultDisplay = d; | | |||
71 | } | | |||
72 | 63 | | |||
73 | Interface::ObjectTreeSource *PartNodeBodyPart::source() const | 64 | Interface::ObjectTreeSource *PartNodeBodyPart::source() const | ||
74 | { | 65 | { | ||
75 | return mObjectTreeParser->mSource; | 66 | return mObjectTreeParser->mSource; | ||
76 | } | 67 | } |