Diffstat (limited to 'noncore/net/mail/accountview.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/accountview.h | 162 |
1 files changed, 6 insertions, 156 deletions
diff --git a/noncore/net/mail/accountview.h b/noncore/net/mail/accountview.h index 60e2b4b..9f92090 100644 --- a/noncore/net/mail/accountview.h +++ b/noncore/net/mail/accountview.h @@ -1,176 +1,26 @@ #ifndef ACCOUNTVIEW_H #define ACCOUNTVIEW_H #include <qlistview.h> #include <qlist.h> -#include <libmailwrapper/settings.h> -#include <libmailwrapper/mailwrapper.h> -#include <libmailwrapper/abstractmail.h> - -class POP3wrapper; +class Selectstore; class RecMail; class RecBody; -class QPopupMenu; -class Selectstore; -class AccountView; - -class AccountViewItem : public QListViewItem -{ - -public: - AccountViewItem( AccountView *parent ); - AccountViewItem( QListViewItem *parent); - AccountViewItem( QListViewItem *parent , QListViewItem*after ); - virtual ~AccountViewItem(); - virtual void refresh(QList<RecMail>&)=0; - virtual RecBody fetchBody(const RecMail&)=0; - virtual QPopupMenu * getContextMenu(){return 0;}; - virtual void contextMenuSelected(int){} - virtual AccountView*accountView(); -protected: - virtual void deleteAllMail(AbstractMail*wrapper,Folder*f); - static const QString contextName; - AccountView*m_Backlink; -}; - -class POP3viewItem : public AccountViewItem -{ - -public: - POP3viewItem( POP3account *a, AccountView *parent ); - virtual ~POP3viewItem(); - virtual void refresh( QList<RecMail> &target ); - virtual RecBody fetchBody( const RecMail &mail ); - AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); - virtual void contextMenuSelected(int); - -protected: - POP3account *account; - virtual void refresh(); - AbstractMail *wrapper; - void disconnect(); - void setOnOffline(); -}; - -class POP3folderItem : public AccountViewItem -{ - -public: - POP3folderItem( Folder *folder, POP3viewItem *parent , QListViewItem*after ); - virtual ~POP3folderItem(); - virtual void refresh(QList<RecMail>&); - virtual RecBody fetchBody(const RecMail&); - virtual QPopupMenu * getContextMenu(); - virtual void contextMenuSelected(int); - -protected: - void downloadMails(); - Folder *folder; - POP3viewItem *pop3; -}; - -class IMAPfolderItem; - -class IMAPviewItem : public AccountViewItem -{ - friend class IMAPfolderItem; -public: - IMAPviewItem( IMAPaccount *a, AccountView *parent ); - virtual ~IMAPviewItem(); - virtual void refresh(QList<RecMail>&); - virtual RecBody fetchBody(const RecMail&); - AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); - virtual void contextMenuSelected(int); - const QStringList&subFolders(); - virtual void refreshFolders(bool force=false); - bool offline(); - -protected: - IMAPfolderItem*findSubItem(const QString&path,IMAPfolderItem*start=0); - virtual void createNewFolder(); - virtual void removeChilds(); - IMAPaccount *account; - AbstractMail *wrapper; - QStringList currentFolders; -}; - -class IMAPfolderItem : public AccountViewItem -{ - -public: - IMAPfolderItem( Folder *folder, IMAPviewItem *parent , QListViewItem*after ); - IMAPfolderItem( Folder *folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); - virtual ~IMAPfolderItem(); - virtual void refresh(QList<RecMail>&); - virtual RecBody fetchBody(const RecMail&); - bool matchName(const QString&name)const; - virtual QPopupMenu * getContextMenu(); - virtual void contextMenuSelected(int); - virtual const QString& Delemiter()const; -protected: - virtual void createNewFolder(); - virtual void deleteFolder(); - virtual void downloadMails(); - Folder *folder; - IMAPviewItem *imap; -}; - -class MHviewItem : public AccountViewItem -{ - friend class MHfolderItem; - -public: - MHviewItem( const QString&aMboxPath, AccountView *parent ); - virtual ~MHviewItem(); - virtual void refresh( QList<RecMail> &target ); - virtual RecBody fetchBody( const RecMail &mail ); - AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); - virtual void contextMenuSelected(int); - QStringList subFolders(); - virtual void refresh(bool force=false); - -protected: - void downloadMails(); - void removeChilds(); - virtual void createFolder(); - QString m_Path; - AbstractMail *wrapper; - Folder *folder; -}; - -class MHfolderItem : public AccountViewItem -{ - -public: - MHfolderItem( Folder *folder, MHviewItem *parent , QListViewItem*after ); - MHfolderItem( Folder *folder, MHfolderItem *parent, QListViewItem*after, MHviewItem*master); - virtual ~MHfolderItem(); - virtual void refresh(QList<RecMail>&); - virtual RecBody fetchBody(const RecMail&); - virtual QPopupMenu * getContextMenu(); - virtual void contextMenuSelected(int); - virtual Folder*getFolder(); - -protected: - void downloadMails(); - virtual void deleteFolder(); - void initName(); - Folder *folder; - MHviewItem *mbox; -}; +class Folder; +class AbstractMail; +class Account; +class IMAPviewItem; +class MHviewItem; class AccountView : public QListView { Q_OBJECT public: AccountView( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); virtual ~AccountView(); virtual void populate( QList<Account> list ); virtual RecBody fetchBody(const RecMail&aMail); virtual void downloadMails(Folder*fromFolder,AbstractMail*fromWrapper); |