author | zautrix <zautrix> | 2005-01-24 16:32:44 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-24 16:32:44 (UTC) |
commit | 6c89efd80c1e94a0c070025d07c7a4c656f2a81e (patch) (unidiff) | |
tree | 44e8cac0fe7b117be19ec8c1f14c9c888838fdb3 /kmicromail/viewmail.h | |
parent | d4f5ce1bedd03191da5ecef2dc68381c10ef1fba (diff) | |
download | kdepimpi-6c89efd80c1e94a0c070025d07c7a4c656f2a81e.zip kdepimpi-6c89efd80c1e94a0c070025d07c7a4c656f2a81e.tar.gz kdepimpi-6c89efd80c1e94a0c070025d07c7a4c656f2a81e.tar.bz2 |
view source
-rw-r--r-- | kmicromail/viewmail.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h index d85b8b2..561989e 100644 --- a/kmicromail/viewmail.h +++ b/kmicromail/viewmail.h | |||
@@ -1,89 +1,91 @@ | |||
1 | #ifndef VIEWMAIL_H | 1 | #ifndef VIEWMAIL_H |
2 | #define VIEWMAIL_H | 2 | #define VIEWMAIL_H |
3 | 3 | ||
4 | #include "viewmailbase.h" | 4 | #include "viewmailbase.h" |
5 | #include <libmailwrapper/mailtypes.h> | 5 | #include <libmailwrapper/mailtypes.h> |
6 | 6 | ||
7 | #include <qdialog.h> | 7 | #include <qdialog.h> |
8 | 8 | ||
9 | #include <qlistview.h> | 9 | #include <qlistview.h> |
10 | #include <qmap.h> | 10 | #include <qmap.h> |
11 | #include <qstringlist.h> | 11 | #include <qstringlist.h> |
12 | #include <qvaluelist.h> | 12 | #include <qvaluelist.h> |
13 | 13 | ||
14 | //namespace Opie { namespace MM { class OImageScrollView; } } | 14 | //namespace Opie { namespace MM { class OImageScrollView; } } |
15 | 15 | ||
16 | class AttachItem : public QListViewItem | 16 | class AttachItem : public QListViewItem |
17 | { | 17 | { |
18 | public: | 18 | public: |
19 | AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, | 19 | AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, |
20 | const QString&fsize,int num,const QValueList<int>&path); | 20 | const QString&fsize,int num,const QValueList<int>&path); |
21 | AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, | 21 | AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, |
22 | const QString&fsize,int num,const QValueList<int>&path); | 22 | const QString&fsize,int num,const QValueList<int>&path); |
23 | int Partnumber() { return _partNum; } | 23 | int Partnumber() { return _partNum; } |
24 | bool isParentof(const QValueList<int>&path); | 24 | bool isParentof(const QValueList<int>&path); |
25 | 25 | ||
26 | private: | 26 | private: |
27 | int _partNum; | 27 | int _partNum; |
28 | /* needed for a better display of attachments */ | 28 | /* needed for a better display of attachments */ |
29 | QValueList<int> _path; | 29 | QValueList<int> _path; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | class ViewMail : public ViewMailBase | 32 | class ViewMail : public ViewMailBase |
33 | { | 33 | { |
34 | Q_OBJECT | 34 | Q_OBJECT |
35 | 35 | ||
36 | public: | 36 | public: |
37 | ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = 0); | 37 | ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = 0); |
38 | ~ViewMail(); | 38 | ~ViewMail(); |
39 | 39 | ||
40 | void hide(); | 40 | void hide(); |
41 | void exec(); | 41 | void exec(); |
42 | void setMail(const RecMailP&mail ); | 42 | void setMail(const RecMailP&mail ); |
43 | void setBody(const RecBodyP&body); | 43 | void setBody(const RecBodyP&body); |
44 | bool deleted; | 44 | bool deleted; |
45 | signals: | 45 | signals: |
46 | void showNextMail(ViewMail*); | 46 | void showNextMail(ViewMail*); |
47 | void deleteAndDisplayNextMail(ViewMail *); | 47 | void deleteAndDisplayNextMail(ViewMail *); |
48 | void signalDownloadMail(); | ||
48 | protected: | 49 | protected: |
49 | QString deHtml(const QString &string); | 50 | QString deHtml(const QString &string); |
50 | AttachItem* searchParent(const QValueList<int>&path); | 51 | AttachItem* searchParent(const QValueList<int>&path); |
51 | AttachItem* lastChild(AttachItem*parent); | 52 | AttachItem* lastChild(AttachItem*parent); |
52 | 53 | ||
53 | protected slots: | 54 | protected slots: |
54 | void slotNextMail() { emit showNextMail(this); }; | 55 | void slotNextMail() { emit showNextMail(this); }; |
55 | void slotReply(); | 56 | void slotReply(); |
56 | void slotForward(); | 57 | void slotForward(); |
57 | void setText(); | 58 | void setText(); |
58 | void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); | 59 | void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); |
59 | void slotDeleteMail( ); | 60 | void slotDeleteMail( ); |
60 | void slotShowHtml( bool ); | 61 | void slotShowHtml( bool ); |
62 | void slotViewSource(); | ||
61 | 63 | ||
62 | private: | 64 | private: |
63 | void readConfig(); | 65 | void readConfig(); |
64 | 66 | bool sourceOn;; | |
65 | bool _inLoop; | 67 | bool _inLoop; |
66 | QString m_mailHtml; | 68 | QString m_mailHtml; |
67 | bool m_gotBody; | 69 | bool m_gotBody; |
68 | RecBodyP m_body; | 70 | RecBodyP m_body; |
69 | RecMailP m_recMail; | 71 | RecMailP m_recMail; |
70 | bool m_showHtml; | 72 | bool m_showHtml; |
71 | 73 | ||
72 | // 0 from 1 subject 2 bodytext 3 date | 74 | // 0 from 1 subject 2 bodytext 3 date |
73 | QMap <int,QString> m_mail; | 75 | QMap <int,QString> m_mail; |
74 | // 0 to 1 cc 2 bcc | 76 | // 0 to 1 cc 2 bcc |
75 | QMap <int,QStringList> m_mail2; | 77 | QMap <int,QStringList> m_mail2; |
76 | }; | 78 | }; |
77 | 79 | ||
78 | class MailImageDlg:public QDialog | 80 | class MailImageDlg:public QDialog |
79 | { | 81 | { |
80 | Q_OBJECT | 82 | Q_OBJECT |
81 | public: | 83 | public: |
82 | MailImageDlg(const QString&,QWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0); | 84 | MailImageDlg(const QString&,QWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0); |
83 | ~MailImageDlg(); | 85 | ~MailImageDlg(); |
84 | void setName(const QString&); | 86 | void setName(const QString&); |
85 | protected: | 87 | protected: |
86 | //Opie::MM::OImageScrollView*m_imageview; | 88 | //Opie::MM::OImageScrollView*m_imageview; |
87 | }; | 89 | }; |
88 | 90 | ||
89 | #endif | 91 | #endif |