author | alwin <alwin> | 2005-03-12 22:14:03 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-12 22:14:03 (UTC) |
commit | 3cb4c3983ee738f3221ecb4cb154ea1252d69d64 (patch) (side-by-side diff) | |
tree | 13357c046fd618b10546ad6d21992826eab3ad01 /noncore/net/mail/accountitem.h | |
parent | 9dddeb81d7db5da718f3f467bb1511b7e72b9caa (diff) | |
download | opie-3cb4c3983ee738f3221ecb4cb154ea1252d69d64.zip opie-3cb4c3983ee738f3221ecb4cb154ea1252d69d64.tar.gz opie-3cb4c3983ee738f3221ecb4cb154ea1252d69d64.tar.bz2 |
rework of the structure of the main menues, them depends now on state of current selected folder/server
on small screens some "Folder" and "Server" menu will get submenus of the menu-item "Mail" cause lack of space on screen - have no other idea.
Diffstat (limited to 'noncore/net/mail/accountitem.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/accountitem.h | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/noncore/net/mail/accountitem.h b/noncore/net/mail/accountitem.h index b2c50a1..6518899 100644 --- a/noncore/net/mail/accountitem.h +++ b/noncore/net/mail/accountitem.h @@ -1,10 +1,12 @@ #ifndef __ACCOUNT_ITEM #define __ACCOUNT_ITEM +#include <opie2/osmartpointer.h> + #include <qlistview.h> #include <qlist.h> -#include <opie2/osmartpointer.h> +#include <qmap.h> class POP3wrapper; class RecMail; class RecBody; @@ -30,18 +32,20 @@ public: virtual ~AccountViewItem(); virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&)=0; virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&)=0; - virtual QPopupMenu * getContextMenu(){return 0;}; - virtual void contextMenuSelected(int){} + virtual QPopupMenu * getContextMenu(); + virtual bool contextMenuSelected(int){return false;} virtual AccountView*accountView(); virtual bool matchName(const QString&name)const; virtual bool isDraftfolder(); /* 1 - server * 2 - folder - * 3 - beides + * 3 - both */ virtual int isServer()const=0; + virtual QMap<int,QString> serverMenu(); + virtual QMap<int,QString> folderMenu(); protected: AccountViewItem*findSubItem(const QString&path,AccountViewItem*start=0); virtual void init(); @@ -60,11 +64,11 @@ public: virtual ~POP3viewItem(); virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); - virtual void contextMenuSelected(int); + virtual bool contextMenuSelected(int); virtual int isServer()const{return 1;} + virtual QMap<int,QString> serverMenu(); protected: POP3account *account; virtual void refresh(); @@ -80,11 +84,11 @@ public: POP3folderItem( const Opie::Core::OSmartPointer<Folder>&folder, POP3viewItem *parent , QListViewItem*after ); virtual ~POP3folderItem(); virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); - virtual QPopupMenu * getContextMenu(); - virtual void contextMenuSelected(int); + virtual bool contextMenuSelected(int); virtual int isServer()const{return 2;} + virtual QMap<int,QString> folderMenu(); protected: void downloadMails(); POP3viewItem *pop3; @@ -99,11 +103,11 @@ public: virtual ~NNTPviewItem(); virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); - virtual void contextMenuSelected(int); + virtual bool contextMenuSelected(int); virtual int isServer()const{return 1;} + virtual QMap<int,QString> serverMenu(); protected: NNTPaccount *account; virtual void refresh(); @@ -120,12 +124,11 @@ public: NNTPfolderItem(const Opie::Core::OSmartPointer<Folder>&folder, NNTPviewItem *parent , QListViewItem*after ); virtual ~NNTPfolderItem(); virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); - virtual QPopupMenu * getContextMenu(); - virtual void contextMenuSelected(int); + virtual bool contextMenuSelected(int); virtual int isServer()const{return 2;} - + virtual QMap<int,QString> folderMenu(); protected: void downloadMails(); NNTPviewItem *nntp; }; @@ -140,14 +143,14 @@ public: virtual ~IMAPviewItem(); virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); - virtual void contextMenuSelected(int); + virtual bool contextMenuSelected(int); const QStringList&subFolders(); virtual void refreshFolders(bool force=false); virtual int isServer()const{return 1;} bool offline(); + virtual QMap<int,QString> serverMenu(); protected: virtual void createNewFolder(); IMAPaccount *account; @@ -163,15 +166,15 @@ public: IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); virtual ~IMAPfolderItem(); virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); - virtual QPopupMenu * getContextMenu(); - virtual void contextMenuSelected(int); + virtual bool contextMenuSelected(int); virtual const QString& Delemiter()const; virtual int isServer()const{return 2;} + virtual QMap<int,QString> folderMenu(); protected: virtual void createNewFolder(); - virtual void deleteFolder(); + virtual bool deleteFolder(); virtual void downloadMails(); IMAPviewItem *imap; }; @@ -184,13 +187,14 @@ public: virtual ~MHviewItem(); virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); - virtual void contextMenuSelected(int); + virtual bool contextMenuSelected(int); QStringList subFolders(); virtual void refresh(bool force=false); virtual int isServer()const{return 3;} + virtual QMap<int,QString> serverMenu(); + virtual QMap<int,QString> folderMenu(); protected: void downloadMails(); virtual void createFolder(); @@ -207,18 +211,18 @@ public: MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHfolderItem *parent, QListViewItem*after, MHviewItem*master); virtual ~MHfolderItem(); virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); - virtual QPopupMenu * getContextMenu(); - virtual void contextMenuSelected(int); + virtual bool contextMenuSelected(int); virtual const Opie::Core::OSmartPointer<Folder>&getFolder()const; virtual bool isDraftfolder(); virtual int isServer()const{return 2;} + virtual QMap<int,QString> folderMenu(); protected: void downloadMails(); virtual void createFolder(); - virtual void deleteFolder(); + virtual bool deleteFolder(); void initName(); MHviewItem *mbox; }; |