Diffstat (limited to 'noncore/net/mail/accountitem.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/accountitem.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/noncore/net/mail/accountitem.h b/noncore/net/mail/accountitem.h index 99208b6..a138c9b 100644 --- a/noncore/net/mail/accountitem.h +++ b/noncore/net/mail/accountitem.h | |||
@@ -2,24 +2,25 @@ | |||
2 | #define __ACCOUNT_ITEM | 2 | #define __ACCOUNT_ITEM |
3 | 3 | ||
4 | #include <qlistview.h> | 4 | #include <qlistview.h> |
5 | #include <qlist.h> | 5 | #include <qlist.h> |
6 | 6 | ||
7 | class POP3wrapper; | 7 | class POP3wrapper; |
8 | class RecMail; | 8 | class RecMail; |
9 | class RecBody; | 9 | class RecBody; |
10 | class QPopupMenu; | 10 | class QPopupMenu; |
11 | class Selectstore; | 11 | class Selectstore; |
12 | class AccountView; | 12 | class AccountView; |
13 | class POP3account; | 13 | class POP3account; |
14 | class NNTPaccount; | ||
14 | class IMAPaccount; | 15 | class IMAPaccount; |
15 | class AbstractMail; | 16 | class AbstractMail; |
16 | class Folder; | 17 | class Folder; |
17 | 18 | ||
18 | class AccountViewItem : public QListViewItem | 19 | class AccountViewItem : public QListViewItem |
19 | { | 20 | { |
20 | 21 | ||
21 | public: | 22 | public: |
22 | AccountViewItem( AccountView *parent ); | 23 | AccountViewItem( AccountView *parent ); |
23 | AccountViewItem( QListViewItem *parent); | 24 | AccountViewItem( QListViewItem *parent); |
24 | AccountViewItem( QListViewItem *parent , QListViewItem*after ); | 25 | AccountViewItem( QListViewItem *parent , QListViewItem*after ); |
25 | virtual ~AccountViewItem(); | 26 | virtual ~AccountViewItem(); |
@@ -67,24 +68,63 @@ public: | |||
67 | POP3folderItem( Folder *folder, POP3viewItem *parent , QListViewItem*after ); | 68 | POP3folderItem( Folder *folder, POP3viewItem *parent , QListViewItem*after ); |
68 | virtual ~POP3folderItem(); | 69 | virtual ~POP3folderItem(); |
69 | virtual void refresh(QList<RecMail>&); | 70 | virtual void refresh(QList<RecMail>&); |
70 | virtual RecBody fetchBody(const RecMail&); | 71 | virtual RecBody fetchBody(const RecMail&); |
71 | virtual QPopupMenu * getContextMenu(); | 72 | virtual QPopupMenu * getContextMenu(); |
72 | virtual void contextMenuSelected(int); | 73 | virtual void contextMenuSelected(int); |
73 | 74 | ||
74 | protected: | 75 | protected: |
75 | void downloadMails(); | 76 | void downloadMails(); |
76 | POP3viewItem *pop3; | 77 | POP3viewItem *pop3; |
77 | }; | 78 | }; |
78 | 79 | ||
80 | |||
81 | class NNTPviewItem : public AccountViewItem | ||
82 | { | ||
83 | |||
84 | public: | ||
85 | NNTPviewItem( NNTPaccount *a, AccountView *parent ); | ||
86 | virtual ~NNTPviewItem(); | ||
87 | virtual void refresh( QList<RecMail> &target ); | ||
88 | virtual RecBody fetchBody( const RecMail &mail ); | ||
89 | AbstractMail *getWrapper(); | ||
90 | virtual QPopupMenu * getContextMenu(); | ||
91 | virtual void contextMenuSelected(int); | ||
92 | |||
93 | protected: | ||
94 | NNTPaccount *account; | ||
95 | virtual void refresh(); | ||
96 | AbstractMail *wrapper; | ||
97 | void disconnect(); | ||
98 | void setOnOffline(); | ||
99 | }; | ||
100 | |||
101 | class NNTPfolderItem : public AccountViewItem | ||
102 | { | ||
103 | |||
104 | public: | ||
105 | NNTPfolderItem( Folder *folder, NNTPviewItem *parent , QListViewItem*after ); | ||
106 | virtual ~NNTPfolderItem(); | ||
107 | virtual void refresh(QList<RecMail>&); | ||
108 | virtual RecBody fetchBody(const RecMail&); | ||
109 | virtual QPopupMenu * getContextMenu(); | ||
110 | virtual void contextMenuSelected(int); | ||
111 | |||
112 | protected: | ||
113 | void downloadMails(); | ||
114 | NNTPviewItem *nntp; | ||
115 | }; | ||
116 | |||
117 | |||
118 | |||
79 | class IMAPviewItem : public AccountViewItem | 119 | class IMAPviewItem : public AccountViewItem |
80 | { | 120 | { |
81 | friend class IMAPfolderItem; | 121 | friend class IMAPfolderItem; |
82 | public: | 122 | public: |
83 | IMAPviewItem( IMAPaccount *a, AccountView *parent ); | 123 | IMAPviewItem( IMAPaccount *a, AccountView *parent ); |
84 | virtual ~IMAPviewItem(); | 124 | virtual ~IMAPviewItem(); |
85 | virtual void refresh(QList<RecMail>&); | 125 | virtual void refresh(QList<RecMail>&); |
86 | virtual RecBody fetchBody(const RecMail&); | 126 | virtual RecBody fetchBody(const RecMail&); |
87 | AbstractMail *getWrapper(); | 127 | AbstractMail *getWrapper(); |
88 | virtual QPopupMenu * getContextMenu(); | 128 | virtual QPopupMenu * getContextMenu(); |
89 | virtual void contextMenuSelected(int); | 129 | virtual void contextMenuSelected(int); |
90 | const QStringList&subFolders(); | 130 | const QStringList&subFolders(); |