Diffstat (limited to 'noncore/unsupported/mailit/emailclient.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mailit/emailclient.h | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/noncore/unsupported/mailit/emailclient.h b/noncore/unsupported/mailit/emailclient.h index 80457f9..0890dcf 100644 --- a/noncore/unsupported/mailit/emailclient.h +++ b/noncore/unsupported/mailit/emailclient.h | |||
@@ -23,32 +23,34 @@ | |||
23 | #include <qlist.h> | 23 | #include <qlist.h> |
24 | #include <qcstring.h> | 24 | #include <qcstring.h> |
25 | #include <qmainwindow.h> | 25 | #include <qmainwindow.h> |
26 | 26 | ||
27 | #include <qtoolbar.h> | 27 | #include <qtoolbar.h> |
28 | #include <qcheckbox.h> | 28 | #include <qcheckbox.h> |
29 | #include <qlabel.h> | 29 | #include <qlabel.h> |
30 | #include <qlineedit.h> | 30 | #include <qlineedit.h> |
31 | #include <qlistview.h> | 31 | #include <qlistview.h> |
32 | #include <qaction.h> | 32 | #include <qaction.h> |
33 | #include <qlayout.h> | 33 | #include <qlayout.h> |
34 | #include <qtooltip.h> | 34 | #include <qtooltip.h> |
35 | #include <qtoolbutton.h> | ||
35 | #include <qimage.h> | 36 | #include <qimage.h> |
36 | #include <qpixmap.h> | 37 | #include <qpixmap.h> |
37 | #include <qstringlist.h> | 38 | #include <qstringlist.h> |
38 | #include <qprogressbar.h> | 39 | #include <qprogressbar.h> |
39 | #include <qstatusbar.h> | 40 | #include <qstatusbar.h> |
40 | #include <qdir.h> | 41 | #include <qdir.h> |
41 | #include <stdlib.h> | 42 | #include <stdlib.h> |
42 | #include <opie/otabwidget.h> | 43 | #include <opie/otabwidget.h> |
44 | #include <qtimer.h> | ||
43 | 45 | ||
44 | #include "emailhandler.h" | 46 | #include "emailhandler.h" |
45 | #include "emaillistitem.h" | 47 | #include "emaillistitem.h" |
46 | #include "textparser.h" | 48 | #include "textparser.h" |
47 | #include "editaccount.h" | 49 | #include "editaccount.h" |
48 | #include "maillist.h" | 50 | #include "maillist.h" |
49 | #include "addresslist.h" | 51 | #include "addresslist.h" |
50 | 52 | ||
51 | #include <qpe/config.h> | 53 | #include <qpe/config.h> |
52 | 54 | ||
53 | class AccountList : public QList<MailAccount> | 55 | class AccountList : public QList<MailAccount> |
54 | { | 56 | { |
@@ -60,90 +62,110 @@ private: | |||
60 | }; | 62 | }; |
61 | 63 | ||
62 | //class EmailClient : public EmailClientBase | 64 | //class EmailClient : public EmailClientBase |
63 | class EmailClient : public QMainWindow | 65 | class EmailClient : public QMainWindow |
64 | { | 66 | { |
65 | Q_OBJECT | 67 | Q_OBJECT |
66 | 68 | ||
67 | public: | 69 | public: |
68 | EmailClient( QWidget* parent, const char* name, WFlags fl = 0 ); | 70 | EmailClient( QWidget* parent, const char* name, WFlags fl = 0 ); |
69 | ~EmailClient(); | 71 | ~EmailClient(); |
70 | AddressList* getAdrListRef(); | 72 | AddressList* getAdrListRef(); |
71 | 73 | ||
74 | protected: | ||
75 | void timerEvent(QTimerEvent*); | ||
76 | |||
72 | signals: | 77 | signals: |
73 | void composeRequested(); | 78 | void composeRequested(); |
74 | void viewEmail(QListView *, Email *); | 79 | void viewEmail(QListView *, Email *); |
75 | void mailUpdated(Email *); | 80 | void mailUpdated(Email *); |
76 | void newCaption(const QString &); | 81 | void newCaption(const QString &); |
77 | 82 | void replyRequested(Email&, bool&); | |
83 | void forwardRequested(Email&); | ||
84 | void removeItem(EmailListItem*, bool&); | ||
85 | /*void reply(Email&); | ||
86 | void replyAll(Email&); | ||
87 | void remove(Email&); | ||
88 | void forward(Email&);*/ | ||
89 | |||
78 | public slots: | 90 | public slots: |
79 | void compose(); | 91 | void compose(); |
80 | void cancel(); | 92 | void cancel(); |
81 | void enqueMail(const Email &mail); | 93 | void enqueMail(const Email &mail); |
82 | void setMailAccount(); | 94 | void setMailAccount(); |
83 | void sendQuedMail(); | 95 | void sendQuedMail(); |
84 | void mailSent(); | 96 | void mailSent(); |
97 | void deleteItem(); | ||
85 | void getNewMail(); | 98 | void getNewMail(); |
86 | void getAllNewMail(); | 99 | void getAllNewMail(); |
87 | void smtpError(int code); | 100 | void smtpError(int code); |
88 | void popError(int code); | 101 | void popError(int code); |
89 | void inboxItemSelected(); | 102 | void inboxItemSelected(); |
90 | void outboxItemSelected(); | 103 | void outboxItemSelected(); |
104 | void inboxItemPressed(); | ||
105 | void inboxItemReleased(); | ||
91 | void mailArrived(const Email &mail, bool fromDisk); | 106 | void mailArrived(const Email &mail, bool fromDisk); |
92 | void allMailArrived(int); | 107 | void allMailArrived(int); |
93 | void saveMail(QString fileName, QListView *view); | 108 | void saveMail(QString fileName, QListView *view); |
94 | void selectAccount(int); | 109 | void selectAccount(int); |
95 | void editAccount(int); | 110 | void editAccount(int); |
96 | void updateAccounts(); | 111 | void updateAccounts(); |
97 | void deleteAccount(int); | 112 | void deleteAccount(int); |
98 | void deleteMail(EmailListItem *mailItem, bool &inbox); | 113 | void deleteMail(EmailListItem *mailItem, bool &inbox); |
99 | void setTotalSize(int); | 114 | void setTotalSize(int); |
100 | void setMailSize(int); | 115 | void setMailSize(int); |
101 | void setDownloadedSize(int); | 116 | void setDownloadedSize(int); |
102 | void moveMailFront(Email *mailPtr); | 117 | void moveMailFront(Email *mailPtr); |
118 | /* void reply(); | ||
119 | void replyAll(); | ||
120 | void forward(); | ||
121 | void remove();*/ | ||
103 | 122 | ||
104 | private: | 123 | private: |
105 | void init(); | 124 | void init(); |
106 | void readMail(); | 125 | void readMail(); |
107 | QString getPath(bool enclosurePath); | 126 | QString getPath(bool enclosurePath); |
108 | void readSettings(); | 127 | void readSettings(); |
109 | void saveSettings(); | 128 | void saveSettings(); |
110 | 129 | Email* getCurrentMail(); | |
111 | private: | 130 | int timerID; |
112 | Config *mailconf; | 131 | Config *mailconf; |
113 | int newAccountId, idCount, mailIdCount; | 132 | int newAccountId, idCount, mailIdCount; |
114 | int accountIdCount; | 133 | int accountIdCount; |
115 | AccountList accountList; | 134 | AccountList accountList; |
116 | AddressList *addressList; | 135 | AddressList *addressList; |
117 | 136 | ||
118 | EditAccount *editAccountView; | 137 | EditAccount *editAccountView; |
119 | EmailListItem *item; | 138 | EmailListItem *item; |
120 | EmailHandler *emailHandler; | 139 | EmailHandler *emailHandler; |
121 | QList<Email> quedMessages; | 140 | QList<Email> quedMessages; |
122 | MailList mailDownloadList; | 141 | MailList mailDownloadList; |
123 | bool sending, receiving, previewingMail, allAccounts; | 142 | bool sending, receiving, previewingMail, allAccounts; |
124 | QString lineShift; | 143 | QString lineShift; |
125 | MailAccount account, *currentAccount; | 144 | MailAccount account, *currentAccount; |
126 | 145 | ||
127 | QToolBar *bar; | 146 | QToolBar *bar; |
128 | QProgressBar *progressBar; | 147 | QProgressBar *progressBar; |
129 | QStatusBar *statusBar; | 148 | QStatusBar *statusBar; |
130 | QLabel *status1Label, *status2Label; | 149 | QLabel *status1Label, *status2Label; |
131 | QAction *getMailButton; | 150 | QToolButton *getMailButton; |
132 | QAction *sendMailButton; | 151 | QAction *sendMailButton; |
133 | QAction *composeButton; | 152 | QAction *composeButton; |
134 | QAction *cancelButton; | 153 | QAction *cancelButton; |
135 | 154 | QAction *deleteButton; | |
155 | //QToolButton *setAccountButton; | ||
156 | |||
136 | QMenuBar *mb; | 157 | QMenuBar *mb; |
137 | QPopupMenu *selectAccountMenu; | 158 | QPopupMenu *selectAccountMenu; |
138 | QPopupMenu *editAccountMenu; | 159 | QPopupMenu *editAccountMenu; |
139 | QPopupMenu *deleteAccountMenu; | 160 | QPopupMenu *deleteAccountMenu; |
161 | QPopupMenu *setAccountMenu; | ||
140 | 162 | ||
141 | OTabWidget* mailboxView; | 163 | OTabWidget* mailboxView; |
142 | QListView* inboxView; | 164 | QListView* inboxView; |
143 | QListView* outboxView; | 165 | QListView* outboxView; |
144 | 166 | ||
145 | QGridLayout* grid_2; | 167 | QGridLayout* grid_2; |
146 | QGridLayout* grid_3; | 168 | QGridLayout* grid_3; |
147 | }; | 169 | }; |
148 | 170 | ||
149 | #endif // EMAILCLIENT_H | 171 | #endif // EMAILCLIENT_H |