author | alwin <alwin> | 2004-03-12 14:12:00 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-12 14:12:00 (UTC) |
commit | d1929ef43f0eaaa17aa42196384d1ed925132873 (patch) (unidiff) | |
tree | eff911f93fe7919d7820e5a2e68b72f2f76143da /noncore/net/mail/accountitem.h | |
parent | d38384a6edb0110117e0297864f813b379d52789 (diff) | |
download | opie-d1929ef43f0eaaa17aa42196384d1ed925132873.zip opie-d1929ef43f0eaaa17aa42196384d1ed925132873.tar.gz opie-d1929ef43f0eaaa17aa42196384d1ed925132873.tar.bz2 |
some pointers embedded into osmart_pointer handling
Diffstat (limited to 'noncore/net/mail/accountitem.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/accountitem.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/noncore/net/mail/accountitem.h b/noncore/net/mail/accountitem.h index eb3baa3..8f712f5 100644 --- a/noncore/net/mail/accountitem.h +++ b/noncore/net/mail/accountitem.h | |||
@@ -1,11 +1,12 @@ | |||
1 | #ifndef __ACCOUNT_ITEM | 1 | #ifndef __ACCOUNT_ITEM |
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 | #include <opie2/osmart_pointer.h> | ||
6 | 7 | ||
7 | class POP3wrapper; | 8 | class POP3wrapper; |
8 | class RecMail; | 9 | class RecMail; |
9 | class RecBody; | 10 | class RecBody; |
10 | class QPopupMenu; | 11 | class QPopupMenu; |
11 | class Selectstore; | 12 | class Selectstore; |
@@ -15,17 +16,19 @@ class NNTPaccount; | |||
15 | class IMAPaccount; | 16 | class IMAPaccount; |
16 | class AbstractMail; | 17 | class AbstractMail; |
17 | class Folder; | 18 | class Folder; |
18 | 19 | ||
19 | class AccountViewItem : public QListViewItem | 20 | class AccountViewItem : public QListViewItem |
20 | { | 21 | { |
21 | 22 | ||
22 | public: | 23 | public: |
23 | AccountViewItem( AccountView *parent ); | 24 | AccountViewItem( AccountView *parent ); |
24 | AccountViewItem( QListViewItem *parent); | 25 | AccountViewItem( QListViewItem *parent); |
25 | AccountViewItem( QListViewItem *parent , QListViewItem*after ); | 26 | AccountViewItem( QListViewItem *parent , QListViewItem*after ); |
27 | AccountViewItem( const Opie::osmart_pointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ); | ||
28 | |||
26 | virtual ~AccountViewItem(); | 29 | virtual ~AccountViewItem(); |
27 | virtual void refresh(QList<RecMail>&)=0; | 30 | virtual void refresh(QList<RecMail>&)=0; |
28 | virtual RecBody fetchBody(const RecMail&)=0; | 31 | virtual RecBody fetchBody(const RecMail&)=0; |
29 | virtual QPopupMenu * getContextMenu(){return 0;}; | 32 | virtual QPopupMenu * getContextMenu(){return 0;}; |
30 | virtual void contextMenuSelected(int){} | 33 | virtual void contextMenuSelected(int){} |
31 | virtual AccountView*accountView(); | 34 | virtual AccountView*accountView(); |
@@ -33,16 +36,16 @@ public: | |||
33 | virtual bool isDraftfolder(); | 36 | virtual bool isDraftfolder(); |
34 | 37 | ||
35 | protected: | 38 | protected: |
36 | AccountViewItem*findSubItem(const QString&path,AccountViewItem*start=0); | 39 | AccountViewItem*findSubItem(const QString&path,AccountViewItem*start=0); |
37 | virtual void init(); | 40 | virtual void init(); |
38 | virtual void removeChilds(); | 41 | virtual void removeChilds(); |
39 | virtual void deleteAllMail(AbstractMail*wrapper,Folder*f); | 42 | virtual void deleteAllMail(AbstractMail*wrapper,const Opie::osmart_pointer<Folder>&f); |
40 | static const QString contextName; | 43 | static const QString contextName; |
41 | AccountView*m_Backlink; | 44 | AccountView*m_Backlink; |
42 | Folder *folder; | 45 | Opie::osmart_pointer<Folder> folder; |
43 | }; | 46 | }; |
44 | 47 | ||
45 | class POP3viewItem : public AccountViewItem | 48 | class POP3viewItem : public AccountViewItem |
46 | { | 49 | { |
47 | 50 | ||
48 | public: | 51 | public: |
@@ -63,13 +66,13 @@ protected: | |||
63 | }; | 66 | }; |
64 | 67 | ||
65 | class POP3folderItem : public AccountViewItem | 68 | class POP3folderItem : public AccountViewItem |
66 | { | 69 | { |
67 | 70 | ||
68 | public: | 71 | public: |
69 | POP3folderItem( Folder *folder, POP3viewItem *parent , QListViewItem*after ); | 72 | POP3folderItem( const Opie::osmart_pointer<Folder>&folder, POP3viewItem *parent , QListViewItem*after ); |
70 | virtual ~POP3folderItem(); | 73 | virtual ~POP3folderItem(); |
71 | virtual void refresh(QList<RecMail>&); | 74 | virtual void refresh(QList<RecMail>&); |
72 | virtual RecBody fetchBody(const RecMail&); | 75 | virtual RecBody fetchBody(const RecMail&); |
73 | virtual QPopupMenu * getContextMenu(); | 76 | virtual QPopupMenu * getContextMenu(); |
74 | virtual void contextMenuSelected(int); | 77 | virtual void contextMenuSelected(int); |
75 | 78 | ||
@@ -101,13 +104,13 @@ protected: | |||
101 | }; | 104 | }; |
102 | 105 | ||
103 | class NNTPfolderItem : public AccountViewItem | 106 | class NNTPfolderItem : public AccountViewItem |
104 | { | 107 | { |
105 | 108 | ||
106 | public: | 109 | public: |
107 | NNTPfolderItem( Folder *folder, NNTPviewItem *parent , QListViewItem*after ); | 110 | NNTPfolderItem(const Opie::osmart_pointer<Folder>&folder, NNTPviewItem *parent , QListViewItem*after ); |
108 | virtual ~NNTPfolderItem(); | 111 | virtual ~NNTPfolderItem(); |
109 | virtual void refresh(QList<RecMail>&); | 112 | virtual void refresh(QList<RecMail>&); |
110 | virtual RecBody fetchBody(const RecMail&); | 113 | virtual RecBody fetchBody(const RecMail&); |
111 | virtual QPopupMenu * getContextMenu(); | 114 | virtual QPopupMenu * getContextMenu(); |
112 | virtual void contextMenuSelected(int); | 115 | virtual void contextMenuSelected(int); |
113 | 116 | ||
@@ -141,14 +144,14 @@ protected: | |||
141 | }; | 144 | }; |
142 | 145 | ||
143 | class IMAPfolderItem : public AccountViewItem | 146 | class IMAPfolderItem : public AccountViewItem |
144 | { | 147 | { |
145 | 148 | ||
146 | public: | 149 | public: |
147 | IMAPfolderItem( Folder *folder, IMAPviewItem *parent , QListViewItem*after ); | 150 | IMAPfolderItem( const Opie::osmart_pointer<Folder>&folder, IMAPviewItem *parent , QListViewItem*after ); |
148 | IMAPfolderItem( Folder *folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); | 151 | IMAPfolderItem( const Opie::osmart_pointer<Folder>&folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); |
149 | virtual ~IMAPfolderItem(); | 152 | virtual ~IMAPfolderItem(); |
150 | virtual void refresh(QList<RecMail>&); | 153 | virtual void refresh(QList<RecMail>&); |
151 | virtual RecBody fetchBody(const RecMail&); | 154 | virtual RecBody fetchBody(const RecMail&); |
152 | virtual QPopupMenu * getContextMenu(); | 155 | virtual QPopupMenu * getContextMenu(); |
153 | virtual void contextMenuSelected(int); | 156 | virtual void contextMenuSelected(int); |
154 | virtual const QString& Delemiter()const; | 157 | virtual const QString& Delemiter()const; |
@@ -183,20 +186,20 @@ protected: | |||
183 | }; | 186 | }; |
184 | 187 | ||
185 | class MHfolderItem : public AccountViewItem | 188 | class MHfolderItem : public AccountViewItem |
186 | { | 189 | { |
187 | 190 | ||
188 | public: | 191 | public: |
189 | MHfolderItem( Folder *folder, MHviewItem *parent , QListViewItem*after ); | 192 | MHfolderItem( const Opie::osmart_pointer<Folder>&folder, MHviewItem *parent , QListViewItem*after ); |
190 | MHfolderItem( Folder *folder, MHfolderItem *parent, QListViewItem*after, MHviewItem*master); | 193 | MHfolderItem( const Opie::osmart_pointer<Folder>&folder, MHfolderItem *parent, QListViewItem*after, MHviewItem*master); |
191 | virtual ~MHfolderItem(); | 194 | virtual ~MHfolderItem(); |
192 | virtual void refresh(QList<RecMail>&); | 195 | virtual void refresh(QList<RecMail>&); |
193 | virtual RecBody fetchBody(const RecMail&); | 196 | virtual RecBody fetchBody(const RecMail&); |
194 | virtual QPopupMenu * getContextMenu(); | 197 | virtual QPopupMenu * getContextMenu(); |
195 | virtual void contextMenuSelected(int); | 198 | virtual void contextMenuSelected(int); |
196 | virtual Folder*getFolder(); | 199 | virtual const Opie::osmart_pointer<Folder>&getFolder()const; |
197 | virtual bool isDraftfolder(); | 200 | virtual bool isDraftfolder(); |
198 | 201 | ||
199 | protected: | 202 | protected: |
200 | void downloadMails(); | 203 | void downloadMails(); |
201 | virtual void createFolder(); | 204 | virtual void createFolder(); |
202 | virtual void deleteFolder(); | 205 | virtual void deleteFolder(); |