-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 561989e..fc5edcf 100644 --- a/kmicromail/viewmail.h +++ b/kmicromail/viewmail.h | |||
@@ -1,91 +1,93 @@ | |||
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 | #include <qapplication.h> | ||
8 | 9 | ||
9 | #include <qlistview.h> | 10 | #include <qlistview.h> |
10 | #include <qmap.h> | 11 | #include <qmap.h> |
12 | #include <klocale.h> | ||
11 | #include <qstringlist.h> | 13 | #include <qstringlist.h> |
12 | #include <qvaluelist.h> | 14 | #include <qvaluelist.h> |
13 | 15 | ||
14 | //namespace Opie { namespace MM { class OImageScrollView; } } | 16 | //namespace Opie { namespace MM { class OImageScrollView; } } |
15 | 17 | ||
16 | class AttachItem : public QListViewItem | 18 | class AttachItem : public QListViewItem |
17 | { | 19 | { |
18 | public: | 20 | public: |
19 | AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, | 21 | AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, |
20 | const QString&fsize,int num,const QValueList<int>&path); | 22 | const QString&fsize,int num,const QValueList<int>&path); |
21 | AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, | 23 | AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, |
22 | const QString&fsize,int num,const QValueList<int>&path); | 24 | const QString&fsize,int num,const QValueList<int>&path); |
23 | int Partnumber() { return _partNum; } | 25 | int Partnumber() { return _partNum; } |
24 | bool isParentof(const QValueList<int>&path); | 26 | bool isParentof(const QValueList<int>&path); |
25 | 27 | ||
26 | private: | 28 | private: |
27 | int _partNum; | 29 | int _partNum; |
28 | /* needed for a better display of attachments */ | 30 | /* needed for a better display of attachments */ |
29 | QValueList<int> _path; | 31 | QValueList<int> _path; |
30 | }; | 32 | }; |
31 | 33 | ||
32 | class ViewMail : public ViewMailBase | 34 | class ViewMail : public ViewMailBase |
33 | { | 35 | { |
34 | Q_OBJECT | 36 | Q_OBJECT |
35 | 37 | ||
36 | public: | 38 | public: |
37 | ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = 0); | 39 | ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = 0); |
38 | ~ViewMail(); | 40 | ~ViewMail(); |
39 | 41 | ||
40 | void hide(); | 42 | void hide(); |
41 | void exec(); | 43 | void exec(); |
42 | void setMail(const RecMailP&mail ); | 44 | void setMail(const RecMailP&mail ); |
43 | void setBody(const RecBodyP&body); | 45 | void setBody(const RecBodyP&body); |
44 | bool deleted; | 46 | bool deleted; |
45 | signals: | 47 | signals: |
46 | void showNextMail(ViewMail*); | 48 | void showNextMail(ViewMail*); |
47 | void deleteAndDisplayNextMail(ViewMail *); | 49 | void deleteAndDisplayNextMail(ViewMail *); |
48 | void signalDownloadMail(); | 50 | void signalDownloadMail(); |
49 | protected: | 51 | protected: |
50 | QString deHtml(const QString &string); | 52 | QString deHtml(const QString &string); |
51 | AttachItem* searchParent(const QValueList<int>&path); | 53 | AttachItem* searchParent(const QValueList<int>&path); |
52 | AttachItem* lastChild(AttachItem*parent); | 54 | AttachItem* lastChild(AttachItem*parent); |
53 | 55 | ||
54 | protected slots: | 56 | protected slots: |
55 | void slotNextMail() { emit showNextMail(this); }; | 57 | void slotNextMail() { setCaption(i18n("Displaying next mail...please wait!")); qApp->processEvents();emit showNextMail(this); }; |
56 | void slotReply(); | 58 | void slotReply(); |
57 | void slotForward(); | 59 | void slotForward(); |
58 | void setText(); | 60 | void setText(); |
59 | void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); | 61 | void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); |
60 | void slotDeleteMail( ); | 62 | void slotDeleteMail( ); |
61 | void slotShowHtml( bool ); | 63 | void slotShowHtml( bool ); |
62 | void slotViewSource(); | 64 | void slotViewSource(); |
63 | 65 | ||
64 | private: | 66 | private: |
65 | void readConfig(); | 67 | void readConfig(); |
66 | bool sourceOn;; | 68 | bool sourceOn;; |
67 | bool _inLoop; | 69 | bool _inLoop; |
68 | QString m_mailHtml; | 70 | QString m_mailHtml; |
69 | bool m_gotBody; | 71 | bool m_gotBody; |
70 | RecBodyP m_body; | 72 | RecBodyP m_body; |
71 | RecMailP m_recMail; | 73 | RecMailP m_recMail; |
72 | bool m_showHtml; | 74 | bool m_showHtml; |
73 | 75 | ||
74 | // 0 from 1 subject 2 bodytext 3 date | 76 | // 0 from 1 subject 2 bodytext 3 date |
75 | QMap <int,QString> m_mail; | 77 | QMap <int,QString> m_mail; |
76 | // 0 to 1 cc 2 bcc | 78 | // 0 to 1 cc 2 bcc |
77 | QMap <int,QStringList> m_mail2; | 79 | QMap <int,QStringList> m_mail2; |
78 | }; | 80 | }; |
79 | 81 | ||
80 | class MailImageDlg:public QDialog | 82 | class MailImageDlg:public QDialog |
81 | { | 83 | { |
82 | Q_OBJECT | 84 | Q_OBJECT |
83 | public: | 85 | public: |
84 | MailImageDlg(const QString&,QWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0); | 86 | MailImageDlg(const QString&,QWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0); |
85 | ~MailImageDlg(); | 87 | ~MailImageDlg(); |
86 | void setName(const QString&); | 88 | void setName(const QString&); |
87 | protected: | 89 | protected: |
88 | //Opie::MM::OImageScrollView*m_imageview; | 90 | //Opie::MM::OImageScrollView*m_imageview; |
89 | }; | 91 | }; |
90 | 92 | ||
91 | #endif | 93 | #endif |