author | alwin <alwin> | 2004-01-02 02:47:12 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-01-02 02:47:12 (UTC) |
commit | fec64a3eb7b198666eb9937df47323bad94b1ba0 (patch) (unidiff) | |
tree | a781a5999d7efb3b3926aa056bf8bac471f5e484 /noncore/net/mail/viewmail.h | |
parent | 5fbf2a6b9cda98ab16fa1f0e1ac848a9bb523a72 (diff) | |
download | opie-fec64a3eb7b198666eb9937df47323bad94b1ba0.zip opie-fec64a3eb7b198666eb9937df47323bad94b1ba0.tar.gz opie-fec64a3eb7b198666eb9937df47323bad94b1ba0.tar.bz2 |
display of attachments has a hierarchic structure (if needed)
-rw-r--r-- | noncore/net/mail/viewmail.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/noncore/net/mail/viewmail.h b/noncore/net/mail/viewmail.h index bf7a4dd..b3d3b4e 100644 --- a/noncore/net/mail/viewmail.h +++ b/noncore/net/mail/viewmail.h | |||
@@ -1,49 +1,56 @@ | |||
1 | #ifndef VIEWMAIL_H | 1 | #ifndef VIEWMAIL_H |
2 | #define VIEWMAIL_H | 2 | #define VIEWMAIL_H |
3 | 3 | ||
4 | #include <qlistview.h> | 4 | #include <qlistview.h> |
5 | #include <qmap.h> | 5 | #include <qmap.h> |
6 | #include <qstringlist.h> | 6 | #include <qstringlist.h> |
7 | #include <qvaluelist.h> | ||
7 | 8 | ||
8 | #include "viewmailbase.h" | 9 | #include "viewmailbase.h" |
9 | #include "mailtypes.h" | 10 | #include "mailtypes.h" |
10 | 11 | ||
11 | class AttachItem : public QListViewItem | 12 | class AttachItem : public QListViewItem |
12 | { | 13 | { |
13 | public: | 14 | public: |
14 | AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, | 15 | AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, |
15 | const QString&fsize,int num); | 16 | const QString&fsize,int num,const QValueList<int>&path); |
17 | AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, | ||
18 | const QString&fsize,int num,const QValueList<int>&path); | ||
16 | int Partnumber() { return _partNum; } | 19 | int Partnumber() { return _partNum; } |
20 | bool isParentof(const QValueList<int>&path); | ||
17 | 21 | ||
18 | private: | 22 | private: |
19 | int _partNum; | 23 | int _partNum; |
24 | /* needed for a better display of attachments */ | ||
25 | QValueList<int> _path; | ||
20 | }; | 26 | }; |
21 | 27 | ||
22 | class ViewMail : public ViewMailBase | 28 | class ViewMail : public ViewMailBase |
23 | { | 29 | { |
24 | Q_OBJECT | 30 | Q_OBJECT |
25 | 31 | ||
26 | public: | 32 | public: |
27 | ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = Qt::WType_Modal); | 33 | ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = Qt::WType_Modal); |
28 | ~ViewMail(); | 34 | ~ViewMail(); |
29 | 35 | ||
30 | void hide(); | 36 | void hide(); |
31 | void exec(); | 37 | void exec(); |
32 | void setMail( RecMail mail ); | 38 | void setMail( RecMail mail ); |
33 | void setBody( RecBody body ); | 39 | void setBody( RecBody body ); |
34 | bool deleted; | 40 | bool deleted; |
35 | 41 | ||
36 | protected: | 42 | protected: |
37 | QString deHtml(const QString &string); | 43 | QString deHtml(const QString &string); |
44 | AttachItem* searchParent(const QValueList<int>&path); | ||
38 | 45 | ||
39 | protected slots: | 46 | protected slots: |
40 | void slotReply(); | 47 | void slotReply(); |
41 | void slotForward(); | 48 | void slotForward(); |
42 | void setText(); | 49 | void setText(); |
43 | void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); | 50 | void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); |
44 | void slotDeleteMail( ); | 51 | void slotDeleteMail( ); |
45 | void slotShowHtml( bool ); | 52 | void slotShowHtml( bool ); |
46 | 53 | ||
47 | private: | 54 | private: |
48 | void readConfig(); | 55 | void readConfig(); |
49 | 56 | ||