summaryrefslogtreecommitdiffabout
path: root/kmicromail
Unidiff
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/accountitem.h2
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,102 +1,104 @@
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
8class POP3wrapper; 10class POP3wrapper;
9class RecMail; 11class RecMail;
10class RecBody; 12class RecBody;
11class QPopupMenu; 13class QPopupMenu;
12class Selectstore; 14class Selectstore;
13class AccountView; 15class AccountView;
14class POP3account; 16class POP3account;
15class NNTPaccount; 17class NNTPaccount;
16class IMAPaccount; 18class IMAPaccount;
17class AbstractMail; 19class AbstractMail;
18class Folder; 20class Folder;
19 21
20#define RECBODYP Opie::Core::OSmartPointer<RecBody> 22#define RECBODYP Opie::Core::OSmartPointer<RecBody>
21 23
22class AccountViewItem : public QListViewItem 24class AccountViewItem : public QListViewItem
23{ 25{
24 26
25public: 27public:
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
41protected: 43protected:
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
51class POP3viewItem : public AccountViewItem 53class POP3viewItem : public AccountViewItem
52{ 54{
53 55
54public: 56public:
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
63protected: 65protected:
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
71class POP3folderItem : public AccountViewItem 73class POP3folderItem : public AccountViewItem
72{ 74{
73 75
74public: 76public:
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
82protected: 84protected:
83 void downloadMails(); 85 void downloadMails();
84 POP3viewItem *pop3; 86 POP3viewItem *pop3;
85}; 87};
86 88
87 89
88class NNTPviewItem : public AccountViewItem 90class NNTPviewItem : public AccountViewItem
89{ 91{
90 92
91public: 93public:
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
100protected: 102protected:
101 NNTPaccount *account; 103 NNTPaccount *account;
102 virtual void refresh(); 104 virtual void refresh();