author | alwin <alwin> | 2005-03-12 22:14:03 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-12 22:14:03 (UTC) |
commit | 3cb4c3983ee738f3221ecb4cb154ea1252d69d64 (patch) (unidiff) | |
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,9 +1,11 @@ | |||
1 | #ifndef __ACCOUNT_ITEM | 1 | #ifndef __ACCOUNT_ITEM |
2 | #define __ACCOUNT_ITEM | 2 | #define __ACCOUNT_ITEM |
3 | 3 | ||
4 | #include <opie2/osmartpointer.h> | ||
5 | |||
4 | #include <qlistview.h> | 6 | #include <qlistview.h> |
5 | #include <qlist.h> | 7 | #include <qlist.h> |
6 | #include <opie2/osmartpointer.h> | 8 | #include <qmap.h> |
7 | 9 | ||
8 | class POP3wrapper; | 10 | class POP3wrapper; |
9 | class RecMail; | 11 | class RecMail; |
@@ -31,16 +33,18 @@ public: | |||
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(); |
35 | virtual void contextMenuSelected(int){} | 37 | virtual bool contextMenuSelected(int){return false;} |
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 | /* 1 - server | 41 | /* 1 - server |
40 | * 2 - folder | 42 | * 2 - folder |
41 | * 3 - beides | 43 | * 3 - both |
42 | */ | 44 | */ |
43 | virtual int isServer()const=0; | 45 | virtual int isServer()const=0; |
46 | virtual QMap<int,QString> serverMenu(); | ||
47 | virtual QMap<int,QString> folderMenu(); | ||
44 | 48 | ||
45 | protected: | 49 | protected: |
46 | AccountViewItem*findSubItem(const QString&path,AccountViewItem*start=0); | 50 | AccountViewItem*findSubItem(const QString&path,AccountViewItem*start=0); |
@@ -61,9 +65,9 @@ public: | |||
61 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); | 65 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); |
62 | virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); | 66 | virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); |
63 | AbstractMail *getWrapper(); | 67 | AbstractMail *getWrapper(); |
64 | virtual QPopupMenu * getContextMenu(); | 68 | virtual bool contextMenuSelected(int); |
65 | virtual void contextMenuSelected(int); | ||
66 | virtual int isServer()const{return 1;} | 69 | virtual int isServer()const{return 1;} |
70 | virtual QMap<int,QString> serverMenu(); | ||
67 | 71 | ||
68 | protected: | 72 | protected: |
69 | POP3account *account; | 73 | POP3account *account; |
@@ -81,9 +85,9 @@ public: | |||
81 | virtual ~POP3folderItem(); | 85 | virtual ~POP3folderItem(); |
82 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); | 86 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
83 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); | 87 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
84 | virtual QPopupMenu * getContextMenu(); | 88 | virtual bool contextMenuSelected(int); |
85 | virtual void contextMenuSelected(int); | ||
86 | virtual int isServer()const{return 2;} | 89 | virtual int isServer()const{return 2;} |
90 | virtual QMap<int,QString> folderMenu(); | ||
87 | 91 | ||
88 | protected: | 92 | protected: |
89 | void downloadMails(); | 93 | void downloadMails(); |
@@ -100,9 +104,9 @@ public: | |||
100 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); | 104 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); |
101 | virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); | 105 | virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); |
102 | AbstractMail *getWrapper(); | 106 | AbstractMail *getWrapper(); |
103 | virtual QPopupMenu * getContextMenu(); | 107 | virtual bool contextMenuSelected(int); |
104 | virtual void contextMenuSelected(int); | ||
105 | virtual int isServer()const{return 1;} | 108 | virtual int isServer()const{return 1;} |
109 | virtual QMap<int,QString> serverMenu(); | ||
106 | 110 | ||
107 | protected: | 111 | protected: |
108 | NNTPaccount *account; | 112 | NNTPaccount *account; |
@@ -121,10 +125,9 @@ public: | |||
121 | virtual ~NNTPfolderItem(); | 125 | virtual ~NNTPfolderItem(); |
122 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); | 126 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
123 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); | 127 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
124 | virtual QPopupMenu * getContextMenu(); | 128 | virtual bool contextMenuSelected(int); |
125 | virtual void contextMenuSelected(int); | ||
126 | virtual int isServer()const{return 2;} | 129 | virtual int isServer()const{return 2;} |
127 | 130 | virtual QMap<int,QString> folderMenu(); | |
128 | protected: | 131 | protected: |
129 | void downloadMails(); | 132 | void downloadMails(); |
130 | NNTPviewItem *nntp; | 133 | NNTPviewItem *nntp; |
@@ -141,12 +144,12 @@ public: | |||
141 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); | 144 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
142 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); | 145 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
143 | AbstractMail *getWrapper(); | 146 | AbstractMail *getWrapper(); |
144 | virtual QPopupMenu * getContextMenu(); | 147 | virtual bool contextMenuSelected(int); |
145 | virtual void contextMenuSelected(int); | ||
146 | const QStringList&subFolders(); | 148 | const QStringList&subFolders(); |
147 | virtual void refreshFolders(bool force=false); | 149 | virtual void refreshFolders(bool force=false); |
148 | virtual int isServer()const{return 1;} | 150 | virtual int isServer()const{return 1;} |
149 | bool offline(); | 151 | bool offline(); |
152 | virtual QMap<int,QString> serverMenu(); | ||
150 | 153 | ||
151 | protected: | 154 | protected: |
152 | virtual void createNewFolder(); | 155 | virtual void createNewFolder(); |
@@ -164,13 +167,13 @@ public: | |||
164 | virtual ~IMAPfolderItem(); | 167 | virtual ~IMAPfolderItem(); |
165 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); | 168 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
166 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); | 169 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
167 | virtual QPopupMenu * getContextMenu(); | 170 | virtual bool contextMenuSelected(int); |
168 | virtual void contextMenuSelected(int); | ||
169 | virtual const QString& Delemiter()const; | 171 | virtual const QString& Delemiter()const; |
170 | virtual int isServer()const{return 2;} | 172 | virtual int isServer()const{return 2;} |
173 | virtual QMap<int,QString> folderMenu(); | ||
171 | protected: | 174 | protected: |
172 | virtual void createNewFolder(); | 175 | virtual void createNewFolder(); |
173 | virtual void deleteFolder(); | 176 | virtual bool deleteFolder(); |
174 | virtual void downloadMails(); | 177 | virtual void downloadMails(); |
175 | IMAPviewItem *imap; | 178 | IMAPviewItem *imap; |
176 | }; | 179 | }; |
@@ -185,11 +188,12 @@ public: | |||
185 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); | 188 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); |
186 | virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); | 189 | virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); |
187 | AbstractMail *getWrapper(); | 190 | AbstractMail *getWrapper(); |
188 | virtual QPopupMenu * getContextMenu(); | 191 | virtual bool contextMenuSelected(int); |
189 | virtual void contextMenuSelected(int); | ||
190 | QStringList subFolders(); | 192 | QStringList subFolders(); |
191 | virtual void refresh(bool force=false); | 193 | virtual void refresh(bool force=false); |
192 | virtual int isServer()const{return 3;} | 194 | virtual int isServer()const{return 3;} |
195 | virtual QMap<int,QString> serverMenu(); | ||
196 | virtual QMap<int,QString> folderMenu(); | ||
193 | 197 | ||
194 | protected: | 198 | protected: |
195 | void downloadMails(); | 199 | void downloadMails(); |
@@ -208,16 +212,16 @@ public: | |||
208 | virtual ~MHfolderItem(); | 212 | virtual ~MHfolderItem(); |
209 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); | 213 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
210 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); | 214 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
211 | virtual QPopupMenu * getContextMenu(); | 215 | virtual bool contextMenuSelected(int); |
212 | virtual void contextMenuSelected(int); | ||
213 | virtual const Opie::Core::OSmartPointer<Folder>&getFolder()const; | 216 | virtual const Opie::Core::OSmartPointer<Folder>&getFolder()const; |
214 | virtual bool isDraftfolder(); | 217 | virtual bool isDraftfolder(); |
215 | virtual int isServer()const{return 2;} | 218 | virtual int isServer()const{return 2;} |
219 | virtual QMap<int,QString> folderMenu(); | ||
216 | 220 | ||
217 | protected: | 221 | protected: |
218 | void downloadMails(); | 222 | void downloadMails(); |
219 | virtual void createFolder(); | 223 | virtual void createFolder(); |
220 | virtual void deleteFolder(); | 224 | virtual bool deleteFolder(); |
221 | void initName(); | 225 | void initName(); |
222 | MHviewItem *mbox; | 226 | MHviewItem *mbox; |
223 | }; | 227 | }; |