-rw-r--r-- | noncore/net/mail/viewmail.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/noncore/net/mail/viewmail.h b/noncore/net/mail/viewmail.h new file mode 100644 index 0000000..9d3c6e4 --- a/dev/null +++ b/noncore/net/mail/viewmail.h | |||
@@ -0,0 +1,75 @@ | |||
1 | #ifndef VIEWMAIL_H | ||
2 | #define VIEWMAIL_H | ||
3 | |||
4 | #include <qlistview.h> | ||
5 | #include <qmap.h> | ||
6 | |||
7 | #include "viewmailbase.h" | ||
8 | //#include "imapresponse.h" | ||
9 | //#include "mailtable.h" | ||
10 | |||
11 | class AttachItemStore | ||
12 | { | ||
13 | public: | ||
14 | void setMimeType(QString mimeType) { _mimeType = mimeType; } | ||
15 | QString mimeType() { return _mimeType; } | ||
16 | void setFileName(QString fileName) { _fileName = fileName; } | ||
17 | QString fileName() { return _fileName; } | ||
18 | void setDescription(QString description) { _description = description; } | ||
19 | QString description() { return _description; } | ||
20 | void setPartNum(QString partNum) { _partNum = partNum; } | ||
21 | QString partNum() { return _partNum; } | ||
22 | |||
23 | private: | ||
24 | QString _mimeType, _fileName, _description, _partNum; | ||
25 | |||
26 | }; | ||
27 | |||
28 | class AttachItem : public QListViewItem | ||
29 | { | ||
30 | public: | ||
31 | AttachItem(QListView *parent, AttachItemStore &attachment); | ||
32 | AttachItem(QListViewItem *parent, AttachItemStore &attachment); | ||
33 | |||
34 | AttachItemStore attachItemStore() { return _attachItemStore; } | ||
35 | |||
36 | private: | ||
37 | AttachItemStore _attachItemStore; | ||
38 | |||
39 | }; | ||
40 | |||
41 | class ViewMail : public ViewMailBase | ||
42 | { | ||
43 | Q_OBJECT | ||
44 | |||
45 | public: | ||
46 | ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = Qt::WType_Modal); | ||
47 | ~ViewMail(); | ||
48 | |||
49 | void hide(); | ||
50 | void exec(); | ||
51 | static QString appName() { return QString::fromLatin1("mail"); } | ||
52 | void setMailInfo( const QString & from, const QString & to, const QString & subject, const QString & cc, const QString & bcc, const QString & bodytext ); | ||
53 | |||
54 | protected: | ||
55 | //void fillList(IMAPResponseBODYSTRUCTURE &structure); | ||
56 | QString deHtml(const QString &string); | ||
57 | |||
58 | protected slots: | ||
59 | void slotReply(); | ||
60 | void slotForward(); | ||
61 | void setText(); | ||
62 | |||
63 | //void slotIMAPUid(IMAPResponse &response); | ||
64 | |||
65 | private: | ||
66 | bool _inLoop; | ||
67 | //IMAPResponseFETCH _mail; | ||
68 | //IMAPHandler *_handler; | ||
69 | QString _mailHtml; | ||
70 | bool _gotBody; | ||
71 | QMap <int,QString> m_mail; | ||
72 | |||
73 | }; | ||
74 | |||
75 | #endif | ||