author | zautrix <zautrix> | 2004-09-11 08:56:57 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-11 08:56:57 (UTC) |
commit | 0f45c977d7530b6ca827b7a7c7da7469f01800ca (patch) (unidiff) | |
tree | 0368bbd4865a0b21bb197cfd0a190fd0c2cd9242 /kmicromail/accountitem.h | |
parent | 1b41a0e3bf63364940daf132446939e3570c57ad (diff) | |
download | kdepimpi-0f45c977d7530b6ca827b7a7c7da7469f01800ca.zip kdepimpi-0f45c977d7530b6ca827b7a7c7da7469f01800ca.tar.gz kdepimpi-0f45c977d7530b6ca827b7a7c7da7469f01800ca.tar.bz2 |
More config changes
-rw-r--r-- | kmicromail/accountitem.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kmicromail/accountitem.h b/kmicromail/accountitem.h index f125eeb..faf919d 100644 --- a/kmicromail/accountitem.h +++ b/kmicromail/accountitem.h | |||
@@ -1,166 +1,167 @@ | |||
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/osmartpointer.h> | 6 | #include <opie2/osmartpointer.h> |
7 | 7 | ||
8 | class POP3wrapper; | 8 | class POP3wrapper; |
9 | class RecMail; | 9 | class RecMail; |
10 | class RecBody; | 10 | class RecBody; |
11 | class QPopupMenu; | 11 | class QPopupMenu; |
12 | class Selectstore; | 12 | class Selectstore; |
13 | class AccountView; | 13 | class AccountView; |
14 | class POP3account; | 14 | class POP3account; |
15 | class NNTPaccount; | 15 | class NNTPaccount; |
16 | class IMAPaccount; | 16 | class IMAPaccount; |
17 | class AbstractMail; | 17 | class AbstractMail; |
18 | class Folder; | 18 | class Folder; |
19 | 19 | ||
20 | #define RECBODYP Opie::Core::OSmartPointer<RecBody> | 20 | #define RECBODYP Opie::Core::OSmartPointer<RecBody> |
21 | 21 | ||
22 | class AccountViewItem : public QListViewItem | 22 | class AccountViewItem : public QListViewItem |
23 | { | 23 | { |
24 | 24 | ||
25 | public: | 25 | public: |
26 | AccountViewItem( AccountView *parent ); | 26 | AccountViewItem( AccountView *parent ); |
27 | AccountViewItem( QListViewItem *parent); | 27 | AccountViewItem( QListViewItem *parent); |
28 | AccountViewItem( QListViewItem *parent , QListViewItem*after ); | 28 | AccountViewItem( QListViewItem *parent , QListViewItem*after ); |
29 | AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ); | 29 | AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ); |
30 | 30 | ||
31 | virtual ~AccountViewItem(); | 31 | virtual ~AccountViewItem(); |
32 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&)=0; | 32 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&)=0; |
33 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&)=0; | 33 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&)=0; |
34 | virtual QPopupMenu * getContextMenu(){return 0;}; | 34 | virtual QPopupMenu * getContextMenu(){return 0;}; |
35 | virtual void contextMenuSelected(int){} | 35 | virtual void contextMenuSelected(int){} |
36 | virtual AccountView*accountView(); | 36 | virtual AccountView*accountView(); |
37 | virtual bool matchName(const QString&name)const; | 37 | virtual bool matchName(const QString&name)const; |
38 | virtual bool isDraftfolder(); | 38 | virtual bool isDraftfolder(); |
39 | Opie::Core::OSmartPointer<Folder> getFolder() { return folder; }; | ||
39 | 40 | ||
40 | protected: | 41 | protected: |
41 | AccountViewItem*findSubItem(const QString&path,AccountViewItem*start=0); | 42 | AccountViewItem*findSubItem(const QString&path,AccountViewItem*start=0); |
42 | virtual void init(); | 43 | virtual void init(); |
43 | virtual void removeChilds(); | 44 | virtual void removeChilds(); |
44 | virtual void deleteAllMail(AbstractMail*wrapper,const Opie::Core::OSmartPointer<Folder>&f); | 45 | virtual void deleteAllMail(AbstractMail*wrapper,const Opie::Core::OSmartPointer<Folder>&f); |
45 | static const QString contextName; | 46 | static const QString contextName; |
46 | AccountView*m_Backlink; | 47 | AccountView*m_Backlink; |
47 | Opie::Core::OSmartPointer<Folder> folder; | 48 | Opie::Core::OSmartPointer<Folder> folder; |
48 | }; | 49 | }; |
49 | 50 | ||
50 | class POP3viewItem : public AccountViewItem | 51 | class POP3viewItem : public AccountViewItem |
51 | { | 52 | { |
52 | 53 | ||
53 | public: | 54 | public: |
54 | POP3viewItem( POP3account *a, AccountView *parent ); | 55 | POP3viewItem( POP3account *a, AccountView *parent ); |
55 | virtual ~POP3viewItem(); | 56 | virtual ~POP3viewItem(); |
56 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); | 57 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); |
57 | virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); | 58 | virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); |
58 | AbstractMail *getWrapper(); | 59 | AbstractMail *getWrapper(); |
59 | virtual QPopupMenu * getContextMenu(); | 60 | virtual QPopupMenu * getContextMenu(); |
60 | virtual void contextMenuSelected(int); | 61 | virtual void contextMenuSelected(int); |
61 | 62 | ||
62 | protected: | 63 | protected: |
63 | POP3account *account; | 64 | POP3account *account; |
64 | virtual void refresh(); | 65 | virtual void refresh(); |
65 | AbstractMail *wrapper; | 66 | AbstractMail *wrapper; |
66 | void disconnect(); | 67 | void disconnect(); |
67 | void setOnOffline(); | 68 | void setOnOffline(); |
68 | }; | 69 | }; |
69 | 70 | ||
70 | class POP3folderItem : public AccountViewItem | 71 | class POP3folderItem : public AccountViewItem |
71 | { | 72 | { |
72 | 73 | ||
73 | public: | 74 | public: |
74 | POP3folderItem( const Opie::Core::OSmartPointer<Folder>&folder, POP3viewItem *parent , QListViewItem*after ); | 75 | POP3folderItem( const Opie::Core::OSmartPointer<Folder>&folder, POP3viewItem *parent , QListViewItem*after ); |
75 | virtual ~POP3folderItem(); | 76 | virtual ~POP3folderItem(); |
76 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); | 77 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
77 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); | 78 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
78 | virtual QPopupMenu * getContextMenu(); | 79 | virtual QPopupMenu * getContextMenu(); |
79 | virtual void contextMenuSelected(int); | 80 | virtual void contextMenuSelected(int); |
80 | 81 | ||
81 | protected: | 82 | protected: |
82 | void downloadMails(); | 83 | void downloadMails(); |
83 | POP3viewItem *pop3; | 84 | POP3viewItem *pop3; |
84 | }; | 85 | }; |
85 | 86 | ||
86 | 87 | ||
87 | class NNTPviewItem : public AccountViewItem | 88 | class NNTPviewItem : public AccountViewItem |
88 | { | 89 | { |
89 | 90 | ||
90 | public: | 91 | public: |
91 | NNTPviewItem( NNTPaccount *a, AccountView *parent ); | 92 | NNTPviewItem( NNTPaccount *a, AccountView *parent ); |
92 | virtual ~NNTPviewItem(); | 93 | virtual ~NNTPviewItem(); |
93 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); | 94 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); |
94 | virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); | 95 | virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); |
95 | AbstractMail *getWrapper(); | 96 | AbstractMail *getWrapper(); |
96 | virtual QPopupMenu * getContextMenu(); | 97 | virtual QPopupMenu * getContextMenu(); |
97 | virtual void contextMenuSelected(int); | 98 | virtual void contextMenuSelected(int); |
98 | 99 | ||
99 | protected: | 100 | protected: |
100 | NNTPaccount *account; | 101 | NNTPaccount *account; |
101 | virtual void refresh(); | 102 | virtual void refresh(); |
102 | AbstractMail *wrapper; | 103 | AbstractMail *wrapper; |
103 | void disconnect(); | 104 | void disconnect(); |
104 | void setOnOffline(); | 105 | void setOnOffline(); |
105 | void subscribeGroups(); | 106 | void subscribeGroups(); |
106 | }; | 107 | }; |
107 | 108 | ||
108 | class NNTPfolderItem : public AccountViewItem | 109 | class NNTPfolderItem : public AccountViewItem |
109 | { | 110 | { |
110 | 111 | ||
111 | public: | 112 | public: |
112 | NNTPfolderItem(const Opie::Core::OSmartPointer<Folder>&folder, NNTPviewItem *parent , QListViewItem*after ); | 113 | NNTPfolderItem(const Opie::Core::OSmartPointer<Folder>&folder, NNTPviewItem *parent , QListViewItem*after ); |
113 | virtual ~NNTPfolderItem(); | 114 | virtual ~NNTPfolderItem(); |
114 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); | 115 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
115 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); | 116 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
116 | virtual QPopupMenu * getContextMenu(); | 117 | virtual QPopupMenu * getContextMenu(); |
117 | virtual void contextMenuSelected(int); | 118 | virtual void contextMenuSelected(int); |
118 | 119 | ||
119 | protected: | 120 | protected: |
120 | void downloadMails(); | 121 | void downloadMails(); |
121 | NNTPviewItem *nntp; | 122 | NNTPviewItem *nntp; |
122 | }; | 123 | }; |
123 | 124 | ||
124 | 125 | ||
125 | 126 | ||
126 | class IMAPviewItem : public AccountViewItem | 127 | class IMAPviewItem : public AccountViewItem |
127 | { | 128 | { |
128 | friend class IMAPfolderItem; | 129 | friend class IMAPfolderItem; |
129 | public: | 130 | public: |
130 | IMAPviewItem( IMAPaccount *a, AccountView *parent ); | 131 | IMAPviewItem( IMAPaccount *a, AccountView *parent ); |
131 | virtual ~IMAPviewItem(); | 132 | virtual ~IMAPviewItem(); |
132 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); | 133 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
133 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); | 134 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
134 | AbstractMail *getWrapper(); | 135 | AbstractMail *getWrapper(); |
135 | virtual QPopupMenu * getContextMenu(); | 136 | virtual QPopupMenu * getContextMenu(); |
136 | virtual void contextMenuSelected(int); | 137 | virtual void contextMenuSelected(int); |
137 | const QStringList&subFolders(); | 138 | const QStringList&subFolders(); |
138 | virtual void refreshFolders(bool force=false); | 139 | virtual void refreshFolders(bool force=false); |
139 | bool offline(); | 140 | bool offline(); |
140 | 141 | ||
141 | protected: | 142 | protected: |
142 | virtual void createNewFolder(); | 143 | virtual void createNewFolder(); |
143 | IMAPaccount *account; | 144 | IMAPaccount *account; |
144 | AbstractMail *wrapper; | 145 | AbstractMail *wrapper; |
145 | QStringList currentFolders; | 146 | QStringList currentFolders; |
146 | }; | 147 | }; |
147 | 148 | ||
148 | class IMAPfolderItem : public AccountViewItem | 149 | class IMAPfolderItem : public AccountViewItem |
149 | { | 150 | { |
150 | 151 | ||
151 | public: | 152 | public: |
152 | IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPviewItem *parent , QListViewItem*after ); | 153 | IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPviewItem *parent , QListViewItem*after ); |
153 | IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); | 154 | IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); |
154 | virtual ~IMAPfolderItem(); | 155 | virtual ~IMAPfolderItem(); |
155 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); | 156 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
156 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); | 157 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
157 | virtual QPopupMenu * getContextMenu(); | 158 | virtual QPopupMenu * getContextMenu(); |
158 | virtual void contextMenuSelected(int); | 159 | virtual void contextMenuSelected(int); |
159 | virtual const QString& Delemiter()const; | 160 | virtual const QString& Delemiter()const; |
160 | protected: | 161 | protected: |
161 | virtual void createNewFolder(); | 162 | virtual void createNewFolder(); |
162 | virtual void deleteFolder(); | 163 | virtual void deleteFolder(); |
163 | virtual void downloadMails(); | 164 | virtual void downloadMails(); |
164 | IMAPviewItem *imap; | 165 | IMAPviewItem *imap; |
165 | }; | 166 | }; |
166 | 167 | ||