author | zautrix <zautrix> | 2004-09-11 23:25:03 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-11 23:25:03 (UTC) |
commit | 0a2900e71fd3d80393d67c81aab3aae19d2d680c (patch) (unidiff) | |
tree | 1f2926eca6bee600819932603eaaf28c7f267d6b /kmicromail | |
parent | a040c9d56282dae396b02627fafb602e44323837 (diff) | |
download | kdepimpi-0a2900e71fd3d80393d67c81aab3aae19d2d680c.zip kdepimpi-0a2900e71fd3d80393d67c81aab3aae19d2d680c.tar.gz kdepimpi-0a2900e71fd3d80393d67c81aab3aae19d2d680c.tar.bz2 |
Bugfixes
-rw-r--r-- | kmicromail/accountitem.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kmicromail/accountitem.h b/kmicromail/accountitem.h index faf919d..4c92bfc 100644 --- a/kmicromail/accountitem.h +++ b/kmicromail/accountitem.h | |||
@@ -1,213 +1,215 @@ | |||
1 | #ifndef __ACCOUNT_ITEM | 1 | #ifndef __ACCOUNT_ITEM |
2 | #define __ACCOUNT_ITEM | 2 | #define __ACCOUNT_ITEM |
3 | 3 | ||
4 | |||
4 | #include <qlistview.h> | 5 | #include <qlistview.h> |
5 | #include <qlist.h> | 6 | #include <qlist.h> |
6 | #include <opie2/osmartpointer.h> | 7 | #include <opie2/osmartpointer.h> |
8 | #include <libmailwrapper/mailwrapper.h> | ||
7 | 9 | ||
8 | class POP3wrapper; | 10 | class POP3wrapper; |
9 | class RecMail; | 11 | class RecMail; |
10 | class RecBody; | 12 | class RecBody; |
11 | class QPopupMenu; | 13 | class QPopupMenu; |
12 | class Selectstore; | 14 | class Selectstore; |
13 | class AccountView; | 15 | class AccountView; |
14 | class POP3account; | 16 | class POP3account; |
15 | class NNTPaccount; | 17 | class NNTPaccount; |
16 | class IMAPaccount; | 18 | class IMAPaccount; |
17 | class AbstractMail; | 19 | class AbstractMail; |
18 | class Folder; | 20 | class Folder; |
19 | 21 | ||
20 | #define RECBODYP Opie::Core::OSmartPointer<RecBody> | 22 | #define RECBODYP Opie::Core::OSmartPointer<RecBody> |
21 | 23 | ||
22 | class AccountViewItem : public QListViewItem | 24 | class AccountViewItem : public QListViewItem |
23 | { | 25 | { |
24 | 26 | ||
25 | public: | 27 | public: |
26 | AccountViewItem( AccountView *parent ); | 28 | AccountViewItem( AccountView *parent ); |
27 | AccountViewItem( QListViewItem *parent); | 29 | AccountViewItem( QListViewItem *parent); |
28 | AccountViewItem( QListViewItem *parent , QListViewItem*after ); | 30 | AccountViewItem( QListViewItem *parent , QListViewItem*after ); |
29 | AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ); | 31 | AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ); |
30 | 32 | ||
31 | virtual ~AccountViewItem(); | 33 | virtual ~AccountViewItem(); |
32 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&)=0; | 34 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&)=0; |
33 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&)=0; | 35 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&)=0; |
34 | virtual QPopupMenu * getContextMenu(){return 0;}; | 36 | virtual QPopupMenu * getContextMenu(){return 0;}; |
35 | virtual void contextMenuSelected(int){} | 37 | virtual void contextMenuSelected(int){} |
36 | virtual AccountView*accountView(); | 38 | virtual AccountView*accountView(); |
37 | virtual bool matchName(const QString&name)const; | 39 | virtual bool matchName(const QString&name)const; |
38 | virtual bool isDraftfolder(); | 40 | virtual bool isDraftfolder(); |
39 | Opie::Core::OSmartPointer<Folder> getFolder() { return folder; }; | 41 | Opie::Core::OSmartPointer<Folder> getFolder() { return folder; }; |
40 | 42 | ||
41 | protected: | 43 | protected: |
42 | AccountViewItem*findSubItem(const QString&path,AccountViewItem*start=0); | 44 | AccountViewItem*findSubItem(const QString&path,AccountViewItem*start=0); |
43 | virtual void init(); | 45 | virtual void init(); |
44 | virtual void removeChilds(); | 46 | virtual void removeChilds(); |
45 | virtual void deleteAllMail(AbstractMail*wrapper,const Opie::Core::OSmartPointer<Folder>&f); | 47 | virtual void deleteAllMail(AbstractMail*wrapper,const Opie::Core::OSmartPointer<Folder>&f); |
46 | static const QString contextName; | 48 | static const QString contextName; |
47 | AccountView*m_Backlink; | 49 | AccountView*m_Backlink; |
48 | Opie::Core::OSmartPointer<Folder> folder; | 50 | Opie::Core::OSmartPointer<Folder> folder; |
49 | }; | 51 | }; |
50 | 52 | ||
51 | class POP3viewItem : public AccountViewItem | 53 | class POP3viewItem : public AccountViewItem |
52 | { | 54 | { |
53 | 55 | ||
54 | public: | 56 | public: |
55 | POP3viewItem( POP3account *a, AccountView *parent ); | 57 | POP3viewItem( POP3account *a, AccountView *parent ); |
56 | virtual ~POP3viewItem(); | 58 | virtual ~POP3viewItem(); |
57 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); | 59 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); |
58 | virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); | 60 | virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); |
59 | AbstractMail *getWrapper(); | 61 | AbstractMail *getWrapper(); |
60 | virtual QPopupMenu * getContextMenu(); | 62 | virtual QPopupMenu * getContextMenu(); |
61 | virtual void contextMenuSelected(int); | 63 | virtual void contextMenuSelected(int); |
62 | 64 | ||
63 | protected: | 65 | protected: |
64 | POP3account *account; | 66 | POP3account *account; |
65 | virtual void refresh(); | 67 | virtual void refresh(); |
66 | AbstractMail *wrapper; | 68 | AbstractMail *wrapper; |
67 | void disconnect(); | 69 | void disconnect(); |
68 | void setOnOffline(); | 70 | void setOnOffline(); |
69 | }; | 71 | }; |
70 | 72 | ||
71 | class POP3folderItem : public AccountViewItem | 73 | class POP3folderItem : public AccountViewItem |
72 | { | 74 | { |
73 | 75 | ||
74 | public: | 76 | public: |
75 | POP3folderItem( const Opie::Core::OSmartPointer<Folder>&folder, POP3viewItem *parent , QListViewItem*after ); | 77 | POP3folderItem( const Opie::Core::OSmartPointer<Folder>&folder, POP3viewItem *parent , QListViewItem*after ); |
76 | virtual ~POP3folderItem(); | 78 | virtual ~POP3folderItem(); |
77 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); | 79 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
78 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); | 80 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
79 | virtual QPopupMenu * getContextMenu(); | 81 | virtual QPopupMenu * getContextMenu(); |
80 | virtual void contextMenuSelected(int); | 82 | virtual void contextMenuSelected(int); |
81 | 83 | ||
82 | protected: | 84 | protected: |
83 | void downloadMails(); | 85 | void downloadMails(); |
84 | POP3viewItem *pop3; | 86 | POP3viewItem *pop3; |
85 | }; | 87 | }; |
86 | 88 | ||
87 | 89 | ||
88 | class NNTPviewItem : public AccountViewItem | 90 | class NNTPviewItem : public AccountViewItem |
89 | { | 91 | { |
90 | 92 | ||
91 | public: | 93 | public: |
92 | NNTPviewItem( NNTPaccount *a, AccountView *parent ); | 94 | NNTPviewItem( NNTPaccount *a, AccountView *parent ); |
93 | virtual ~NNTPviewItem(); | 95 | virtual ~NNTPviewItem(); |
94 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); | 96 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); |
95 | virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); | 97 | virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); |
96 | AbstractMail *getWrapper(); | 98 | AbstractMail *getWrapper(); |
97 | virtual QPopupMenu * getContextMenu(); | 99 | virtual QPopupMenu * getContextMenu(); |
98 | virtual void contextMenuSelected(int); | 100 | virtual void contextMenuSelected(int); |
99 | 101 | ||
100 | protected: | 102 | protected: |
101 | NNTPaccount *account; | 103 | NNTPaccount *account; |
102 | virtual void refresh(); | 104 | virtual void refresh(); |
103 | AbstractMail *wrapper; | 105 | AbstractMail *wrapper; |
104 | void disconnect(); | 106 | void disconnect(); |
105 | void setOnOffline(); | 107 | void setOnOffline(); |
106 | void subscribeGroups(); | 108 | void subscribeGroups(); |
107 | }; | 109 | }; |
108 | 110 | ||
109 | class NNTPfolderItem : public AccountViewItem | 111 | class NNTPfolderItem : public AccountViewItem |
110 | { | 112 | { |
111 | 113 | ||
112 | public: | 114 | public: |
113 | NNTPfolderItem(const Opie::Core::OSmartPointer<Folder>&folder, NNTPviewItem *parent , QListViewItem*after ); | 115 | NNTPfolderItem(const Opie::Core::OSmartPointer<Folder>&folder, NNTPviewItem *parent , QListViewItem*after ); |
114 | virtual ~NNTPfolderItem(); | 116 | virtual ~NNTPfolderItem(); |
115 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); | 117 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
116 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); | 118 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
117 | virtual QPopupMenu * getContextMenu(); | 119 | virtual QPopupMenu * getContextMenu(); |
118 | virtual void contextMenuSelected(int); | 120 | virtual void contextMenuSelected(int); |
119 | 121 | ||
120 | protected: | 122 | protected: |
121 | void downloadMails(); | 123 | void downloadMails(); |
122 | NNTPviewItem *nntp; | 124 | NNTPviewItem *nntp; |
123 | }; | 125 | }; |
124 | 126 | ||
125 | 127 | ||
126 | 128 | ||
127 | class IMAPviewItem : public AccountViewItem | 129 | class IMAPviewItem : public AccountViewItem |
128 | { | 130 | { |
129 | friend class IMAPfolderItem; | 131 | friend class IMAPfolderItem; |
130 | public: | 132 | public: |
131 | IMAPviewItem( IMAPaccount *a, AccountView *parent ); | 133 | IMAPviewItem( IMAPaccount *a, AccountView *parent ); |
132 | virtual ~IMAPviewItem(); | 134 | virtual ~IMAPviewItem(); |
133 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); | 135 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
134 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); | 136 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
135 | AbstractMail *getWrapper(); | 137 | AbstractMail *getWrapper(); |
136 | virtual QPopupMenu * getContextMenu(); | 138 | virtual QPopupMenu * getContextMenu(); |
137 | virtual void contextMenuSelected(int); | 139 | virtual void contextMenuSelected(int); |
138 | const QStringList&subFolders(); | 140 | const QStringList&subFolders(); |
139 | virtual void refreshFolders(bool force=false); | 141 | virtual void refreshFolders(bool force=false); |
140 | bool offline(); | 142 | bool offline(); |
141 | 143 | ||
142 | protected: | 144 | protected: |
143 | virtual void createNewFolder(); | 145 | virtual void createNewFolder(); |
144 | IMAPaccount *account; | 146 | IMAPaccount *account; |
145 | AbstractMail *wrapper; | 147 | AbstractMail *wrapper; |
146 | QStringList currentFolders; | 148 | QStringList currentFolders; |
147 | }; | 149 | }; |
148 | 150 | ||
149 | class IMAPfolderItem : public AccountViewItem | 151 | class IMAPfolderItem : public AccountViewItem |
150 | { | 152 | { |
151 | 153 | ||
152 | public: | 154 | public: |
153 | IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPviewItem *parent , QListViewItem*after ); | 155 | IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPviewItem *parent , QListViewItem*after ); |
154 | IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); | 156 | IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); |
155 | virtual ~IMAPfolderItem(); | 157 | virtual ~IMAPfolderItem(); |
156 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); | 158 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
157 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); | 159 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
158 | virtual QPopupMenu * getContextMenu(); | 160 | virtual QPopupMenu * getContextMenu(); |
159 | virtual void contextMenuSelected(int); | 161 | virtual void contextMenuSelected(int); |
160 | virtual const QString& Delemiter()const; | 162 | virtual const QString& Delemiter()const; |
161 | protected: | 163 | protected: |
162 | virtual void createNewFolder(); | 164 | virtual void createNewFolder(); |
163 | virtual void deleteFolder(); | 165 | virtual void deleteFolder(); |
164 | virtual void downloadMails(); | 166 | virtual void downloadMails(); |
165 | IMAPviewItem *imap; | 167 | IMAPviewItem *imap; |
166 | }; | 168 | }; |
167 | 169 | ||
168 | class MHviewItem : public AccountViewItem | 170 | class MHviewItem : public AccountViewItem |
169 | { | 171 | { |
170 | friend class MHfolderItem; | 172 | friend class MHfolderItem; |
171 | 173 | ||
172 | public: | 174 | public: |
173 | MHviewItem( const QString&aMboxPath, AccountView *parent ); | 175 | MHviewItem( const QString&aMboxPath, AccountView *parent ); |
174 | virtual ~MHviewItem(); | 176 | virtual ~MHviewItem(); |
175 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); | 177 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); |
176 | virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); | 178 | virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); |
177 | AbstractMail *getWrapper(); | 179 | AbstractMail *getWrapper(); |
178 | virtual QPopupMenu * getContextMenu(); | 180 | virtual QPopupMenu * getContextMenu(); |
179 | virtual void contextMenuSelected(int); | 181 | virtual void contextMenuSelected(int); |
180 | QStringList subFolders(); | 182 | QStringList subFolders(); |
181 | virtual void refresh(bool force=false); | 183 | virtual void refresh(bool force=false); |
182 | 184 | ||
183 | protected: | 185 | protected: |
184 | void downloadMails(); | 186 | void downloadMails(); |
185 | virtual void createFolder(); | 187 | virtual void createFolder(); |
186 | QString m_Path; | 188 | QString m_Path; |
187 | AbstractMail *wrapper; | 189 | AbstractMail *wrapper; |
188 | QStringList currentFolders; | 190 | QStringList currentFolders; |
189 | }; | 191 | }; |
190 | 192 | ||
191 | class MHfolderItem : public AccountViewItem | 193 | class MHfolderItem : public AccountViewItem |
192 | { | 194 | { |
193 | 195 | ||
194 | public: | 196 | public: |
195 | MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHviewItem *parent , QListViewItem*after ); | 197 | MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHviewItem *parent , QListViewItem*after ); |
196 | MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHfolderItem *parent, QListViewItem*after, MHviewItem*master); | 198 | MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHfolderItem *parent, QListViewItem*after, MHviewItem*master); |
197 | virtual ~MHfolderItem(); | 199 | virtual ~MHfolderItem(); |
198 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); | 200 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
199 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); | 201 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
200 | virtual QPopupMenu * getContextMenu(); | 202 | virtual QPopupMenu * getContextMenu(); |
201 | virtual void contextMenuSelected(int); | 203 | virtual void contextMenuSelected(int); |
202 | virtual const Opie::Core::OSmartPointer<Folder>&getFolder()const; | 204 | virtual const Opie::Core::OSmartPointer<Folder>&getFolder()const; |
203 | virtual bool isDraftfolder(); | 205 | virtual bool isDraftfolder(); |
204 | 206 | ||
205 | protected: | 207 | protected: |
206 | void downloadMails(); | 208 | void downloadMails(); |
207 | virtual void createFolder(); | 209 | virtual void createFolder(); |
208 | virtual void deleteFolder(); | 210 | virtual void deleteFolder(); |
209 | void initName(); | 211 | void initName(); |
210 | MHviewItem *mbox; | 212 | MHviewItem *mbox; |
211 | }; | 213 | }; |
212 | 214 | ||
213 | #endif | 215 | #endif |