summaryrefslogtreecommitdiffabout
path: root/kmicromail/accountitem.h
authorzautrix <zautrix>2004-09-11 08:56:57 (UTC)
committer zautrix <zautrix>2004-09-11 08:56:57 (UTC)
commit0f45c977d7530b6ca827b7a7c7da7469f01800ca (patch) (unidiff)
tree0368bbd4865a0b21bb197cfd0a190fd0c2cd9242 /kmicromail/accountitem.h
parent1b41a0e3bf63364940daf132446939e3570c57ad (diff)
downloadkdepimpi-0f45c977d7530b6ca827b7a7c7da7469f01800ca.zip
kdepimpi-0f45c977d7530b6ca827b7a7c7da7469f01800ca.tar.gz
kdepimpi-0f45c977d7530b6ca827b7a7c7da7469f01800ca.tar.bz2
More config changes
Diffstat (limited to 'kmicromail/accountitem.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/accountitem.h1
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
8class POP3wrapper; 8class POP3wrapper;
9class RecMail; 9class RecMail;
10class RecBody; 10class RecBody;
11class QPopupMenu; 11class QPopupMenu;
12class Selectstore; 12class Selectstore;
13class AccountView; 13class AccountView;
14class POP3account; 14class POP3account;
15class NNTPaccount; 15class NNTPaccount;
16class IMAPaccount; 16class IMAPaccount;
17class AbstractMail; 17class AbstractMail;
18class Folder; 18class Folder;
19 19
20#define RECBODYP Opie::Core::OSmartPointer<RecBody> 20#define RECBODYP Opie::Core::OSmartPointer<RecBody>
21 21
22class AccountViewItem : public QListViewItem 22class AccountViewItem : public QListViewItem
23{ 23{
24 24
25public: 25public:
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
40protected: 41protected:
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
50class POP3viewItem : public AccountViewItem 51class POP3viewItem : public AccountViewItem
51{ 52{
52 53
53public: 54public:
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
62protected: 63protected:
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
70class POP3folderItem : public AccountViewItem 71class POP3folderItem : public AccountViewItem
71{ 72{
72 73
73public: 74public:
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
81protected: 82protected:
82 void downloadMails(); 83 void downloadMails();
83 POP3viewItem *pop3; 84 POP3viewItem *pop3;
84}; 85};
85 86
86 87
87class NNTPviewItem : public AccountViewItem 88class NNTPviewItem : public AccountViewItem
88{ 89{
89 90
90public: 91public:
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
99protected: 100protected:
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
108class NNTPfolderItem : public AccountViewItem 109class NNTPfolderItem : public AccountViewItem
109{ 110{
110 111
111public: 112public:
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
119protected: 120protected:
120 void downloadMails(); 121 void downloadMails();
121 NNTPviewItem *nntp; 122 NNTPviewItem *nntp;
122}; 123};
123 124
124 125
125 126
126class IMAPviewItem : public AccountViewItem 127class IMAPviewItem : public AccountViewItem
127{ 128{
128 friend class IMAPfolderItem; 129 friend class IMAPfolderItem;
129public: 130public:
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
141protected: 142protected:
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
148class IMAPfolderItem : public AccountViewItem 149class IMAPfolderItem : public AccountViewItem
149{ 150{
150 151
151public: 152public:
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;
160protected: 161protected:
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