Diffstat (limited to 'noncore/net/mail/accountview.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/accountview.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/noncore/net/mail/accountview.h b/noncore/net/mail/accountview.h index 2bc8023..805c2b3 100644 --- a/noncore/net/mail/accountview.h +++ b/noncore/net/mail/accountview.h | |||
@@ -1,34 +1,37 @@ | |||
1 | #ifndef ACCOUNTVIEW_H | 1 | #ifndef ACCOUNTVIEW_H |
2 | #define ACCOUNTVIEW_H | 2 | #define ACCOUNTVIEW_H |
3 | 3 | ||
4 | #include <qlistview.h> | 4 | #include <qlistview.h> |
5 | #include <qlist.h> | ||
5 | 6 | ||
6 | #include "settings.h" | 7 | #include "settings.h" |
7 | #include "mailwrapper.h" | 8 | #include "mailwrapper.h" |
8 | 9 | ||
9 | class IMAPwrapper; | 10 | class IMAPwrapper; |
11 | class RecMail; | ||
12 | class RecBody; | ||
10 | 13 | ||
11 | class AccountViewItem : public QListViewItem | 14 | class AccountViewItem : public QListViewItem |
12 | { | 15 | { |
13 | 16 | ||
14 | public: | 17 | public: |
15 | AccountViewItem( QListView *parent ) : QListViewItem( parent ) {} | 18 | AccountViewItem( QListView *parent ) : QListViewItem( parent ) {} |
16 | AccountViewItem( QListViewItem *parent ) : QListViewItem( parent ) {} | 19 | AccountViewItem( QListViewItem *parent ) : QListViewItem( parent ) {} |
17 | virtual void refresh(Maillist&)=0; | 20 | virtual void refresh(QList<RecMail>&)=0; |
18 | virtual QString fetchBody(const RecMail&)=0; | 21 | virtual RecBody fetchBody(const RecMail&)=0; |
19 | }; | 22 | }; |
20 | 23 | ||
21 | class IMAPviewItem : public AccountViewItem | 24 | class IMAPviewItem : public AccountViewItem |
22 | { | 25 | { |
23 | 26 | ||
24 | public: | 27 | public: |
25 | IMAPviewItem( IMAPaccount *a, QListView *parent ); | 28 | IMAPviewItem( IMAPaccount *a, QListView *parent ); |
26 | ~IMAPviewItem(); | 29 | ~IMAPviewItem(); |
27 | virtual void refresh(Maillist&); | 30 | virtual void refresh(QList<RecMail>&); |
28 | virtual QString fetchBody(const RecMail&){return "";} | 31 | virtual RecBody fetchBody(const RecMail&); |
29 | IMAPwrapper *getWrapper(); | 32 | IMAPwrapper *getWrapper(); |
30 | 33 | ||
31 | private: | 34 | private: |
32 | IMAPaccount *account; | 35 | IMAPaccount *account; |
33 | IMAPwrapper *wrapper; | 36 | IMAPwrapper *wrapper; |
34 | 37 | ||
@@ -37,14 +40,14 @@ private: | |||
37 | class IMAPfolderItem : public AccountViewItem | 40 | class IMAPfolderItem : public AccountViewItem |
38 | { | 41 | { |
39 | 42 | ||
40 | public: | 43 | public: |
41 | IMAPfolderItem( IMAPFolder *folder, IMAPviewItem *parent ); | 44 | IMAPfolderItem( IMAPFolder *folder, IMAPviewItem *parent ); |
42 | ~IMAPfolderItem(); | 45 | ~IMAPfolderItem(); |
43 | virtual void refresh(Maillist&); | 46 | virtual void refresh(QList<RecMail>&); |
44 | virtual QString fetchBody(const RecMail&); | 47 | virtual RecBody fetchBody(const RecMail&); |
45 | 48 | ||
46 | private: | 49 | private: |
47 | IMAPFolder *folder; | 50 | IMAPFolder *folder; |
48 | IMAPviewItem *imap; | 51 | IMAPviewItem *imap; |
49 | 52 | ||
50 | }; | 53 | }; |
@@ -53,17 +56,17 @@ class AccountView : public QListView | |||
53 | { | 56 | { |
54 | Q_OBJECT | 57 | Q_OBJECT |
55 | 58 | ||
56 | public: | 59 | public: |
57 | AccountView( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); | 60 | AccountView( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); |
58 | void populate( QList<Account> list ); | 61 | void populate( QList<Account> list ); |
59 | QString fetchBody(const RecMail&aMail); | 62 | RecBody fetchBody(const RecMail&aMail); |
60 | 63 | ||
61 | public slots: | 64 | public slots: |
62 | void refreshAll(); | 65 | void refreshAll(); |
63 | void refresh(QListViewItem *item); | 66 | void refresh(QListViewItem *item); |
64 | 67 | ||
65 | signals: | 68 | signals: |
66 | void refreshMailview(Maillist*); | 69 | void refreshMailview(QList<RecMail>*); |
67 | }; | 70 | }; |
68 | 71 | ||
69 | #endif | 72 | #endif |