author | harlekin <harlekin> | 2004-01-04 02:46:56 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2004-01-04 02:46:56 (UTC) |
commit | cda867a4d179eb3320c5a043cb9116014fa736b8 (patch) (unidiff) | |
tree | 1dafac9c041634e19fab18759f181c41500346a5 | |
parent | 7bfc0889cf761e20402f775a46c8b8508c48ed8f (diff) | |
download | opie-cda867a4d179eb3320c5a043cb9116014fa736b8.zip opie-cda867a4d179eb3320c5a043cb9116014fa736b8.tar.gz opie-cda867a4d179eb3320c5a043cb9116014fa736b8.tar.bz2 |
adapted includes to the new lib
-rw-r--r-- | noncore/net/mail/accountview.cpp | 10 | ||||
-rw-r--r-- | noncore/net/mail/accountview.h | 6 | ||||
-rw-r--r-- | noncore/net/mail/composemail.cpp | 11 | ||||
-rw-r--r-- | noncore/net/mail/composemail.h | 5 | ||||
-rw-r--r-- | noncore/net/mail/editaccounts.h | 3 | ||||
-rw-r--r-- | noncore/net/mail/mail.pro | 4 | ||||
-rw-r--r-- | noncore/net/mail/mailistviewitem.h | 3 | ||||
-rw-r--r-- | noncore/net/mail/mainwindow.cpp | 3 | ||||
-rw-r--r-- | noncore/net/mail/opiemail.cpp | 2 | ||||
-rw-r--r-- | noncore/net/mail/opiemail.h | 3 | ||||
-rw-r--r-- | noncore/net/mail/viewmail.cpp | 6 | ||||
-rw-r--r-- | noncore/net/mail/viewmail.h | 3 |
12 files changed, 33 insertions, 26 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index 9f07f56..2ce89db 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp | |||
@@ -1,15 +1,15 @@ | |||
1 | #include <stdlib.h> | 1 | #include <stdlib.h> |
2 | #include "accountview.h" | 2 | #include "accountview.h" |
3 | #include "mailtypes.h" | 3 | #include <libmailwrapper/mailtypes.h> |
4 | #include "defines.h" | 4 | #include "defines.h" |
5 | #include "newmaildir.h" | 5 | #include "newmaildir.h" |
6 | #include <qmessagebox.h> | 6 | #include <qmessagebox.h> |
7 | #include <qpopupmenu.h> | 7 | #include <qpopupmenu.h> |
8 | 8 | ||
9 | /** | 9 | /** |
10 | * POP3 Account stuff | 10 | * POP3 Account stuff |
11 | */ | 11 | */ |
12 | POP3viewItem::POP3viewItem( POP3account *a, QListView *parent ) | 12 | POP3viewItem::POP3viewItem( POP3account *a, QListView *parent ) |
13 | : AccountViewItem( parent ) | 13 | : AccountViewItem( parent ) |
14 | { | 14 | { |
15 | account = a; | 15 | account = a; |
@@ -154,39 +154,39 @@ IMAPfolderItem*IMAPviewItem::findSubItem(const QString&path,IMAPfolderItem*start | |||
154 | } | 154 | } |
155 | 155 | ||
156 | void IMAPviewItem::refresh(QList<RecMail>&) | 156 | void IMAPviewItem::refresh(QList<RecMail>&) |
157 | { | 157 | { |
158 | refreshFolders(false); | 158 | refreshFolders(false); |
159 | } | 159 | } |
160 | 160 | ||
161 | void IMAPviewItem::refreshFolders(bool force) | 161 | void IMAPviewItem::refreshFolders(bool force) |
162 | { | 162 | { |
163 | if (childCount()>0 && force==false) return; | 163 | if (childCount()>0 && force==false) return; |
164 | QList<Folder> *folders = wrapper->listFolders(); | 164 | QList<Folder> *folders = wrapper->listFolders(); |
165 | 165 | ||
166 | QListViewItem *child = firstChild(); | 166 | QListViewItem *child = firstChild(); |
167 | while ( child ) { | 167 | while ( child ) { |
168 | QListViewItem *tmp = child; | 168 | QListViewItem *tmp = child; |
169 | child = child->nextSibling(); | 169 | child = child->nextSibling(); |
170 | delete tmp; | 170 | delete tmp; |
171 | } | 171 | } |
172 | 172 | ||
173 | Folder *it; | 173 | Folder *it; |
174 | QListViewItem*item = 0; | 174 | QListViewItem*item = 0; |
175 | QListViewItem*titem = 0; | 175 | QListViewItem*titem = 0; |
176 | QString fname,del,search; | 176 | QString fname,del,search; |
177 | int pos; | 177 | int pos; |
178 | // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 178 | // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
179 | folders->setAutoDelete(false); | 179 | folders->setAutoDelete(false); |
180 | 180 | ||
181 | for ( it = folders->first(); it; it = folders->next() ) { | 181 | for ( it = folders->first(); it; it = folders->next() ) { |
182 | if (it->getDisplayName().lower()=="inbox") { | 182 | if (it->getDisplayName().lower()=="inbox") { |
183 | item = new IMAPfolderItem( it, this , item ); | 183 | item = new IMAPfolderItem( it, this , item ); |
184 | folders->remove(it); | 184 | folders->remove(it); |
185 | qDebug("inbox found"); | 185 | qDebug("inbox found"); |
186 | break; | 186 | break; |
187 | } | 187 | } |
188 | } | 188 | } |
189 | for ( it = folders->first(); it; it = folders->next() ) { | 189 | for ( it = folders->first(); it; it = folders->next() ) { |
190 | fname = it->getDisplayName(); | 190 | fname = it->getDisplayName(); |
191 | pos = fname.findRev(it->Separator()); | 191 | pos = fname.findRev(it->Separator()); |
192 | if (pos != -1) { | 192 | if (pos != -1) { |
@@ -408,25 +408,25 @@ void AccountViewItem::deleteAllMail(AbstractMail*wrapper,Folder*folder) | |||
408 | AccountView * view = (AccountView*)listView(); | 408 | AccountView * view = (AccountView*)listView(); |
409 | if (view) view->refreshCurrent(); | 409 | if (view) view->refreshCurrent(); |
410 | } | 410 | } |
411 | } | 411 | } |
412 | } | 412 | } |
413 | 413 | ||
414 | AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) | 414 | AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) |
415 | : QListView( parent, name, flags ) | 415 | : QListView( parent, name, flags ) |
416 | { | 416 | { |
417 | connect( this, SIGNAL( selectionChanged( QListViewItem * ) ), | 417 | connect( this, SIGNAL( selectionChanged( QListViewItem * ) ), |
418 | SLOT( refresh( QListViewItem * ) ) ); | 418 | SLOT( refresh( QListViewItem * ) ) ); |
419 | connect( this, SIGNAL( mouseButtonPressed(int, QListViewItem *,const QPoint&,int ) ),this, | 419 | connect( this, SIGNAL( mouseButtonPressed(int, QListViewItem *,const QPoint&,int ) ),this, |
420 | SLOT( slotHold( int, QListViewItem *,const QPoint&,int ) ) ); | 420 | SLOT( slotHold( int, QListViewItem *,const QPoint&,int ) ) ); |
421 | 421 | ||
422 | setSorting(0); | 422 | setSorting(0); |
423 | } | 423 | } |
424 | 424 | ||
425 | void AccountView::slotContextMenu(int id) | 425 | void AccountView::slotContextMenu(int id) |
426 | { | 426 | { |
427 | AccountViewItem *view = static_cast<AccountViewItem *>(currentItem()); | 427 | AccountViewItem *view = static_cast<AccountViewItem *>(currentItem()); |
428 | if (!view) return; | 428 | if (!view) return; |
429 | view->contextMenuSelected(id); | 429 | view->contextMenuSelected(id); |
430 | } | 430 | } |
431 | 431 | ||
432 | void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int) | 432 | void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int) |
@@ -598,25 +598,25 @@ MBOXfolderItem::~MBOXfolderItem() | |||
598 | } | 598 | } |
599 | 599 | ||
600 | MBOXfolderItem::MBOXfolderItem( Folder *folderInit, MBOXviewItem *parent , QListViewItem*after ) | 600 | MBOXfolderItem::MBOXfolderItem( Folder *folderInit, MBOXviewItem *parent , QListViewItem*after ) |
601 | : AccountViewItem( parent,after ) | 601 | : AccountViewItem( parent,after ) |
602 | { | 602 | { |
603 | folder = folderInit; | 603 | folder = folderInit; |
604 | mbox = parent; | 604 | mbox = parent; |
605 | if (folder->getDisplayName().lower() == "outgoing") { | 605 | if (folder->getDisplayName().lower() == "outgoing") { |
606 | setPixmap( 0, PIXMAP_OUTBOXFOLDER ); | 606 | setPixmap( 0, PIXMAP_OUTBOXFOLDER ); |
607 | } else if (folder->getDisplayName().lower() == "inbox") { | 607 | } else if (folder->getDisplayName().lower() == "inbox") { |
608 | setPixmap( 0, PIXMAP_INBOXFOLDER); | 608 | setPixmap( 0, PIXMAP_INBOXFOLDER); |
609 | } else { | 609 | } else { |
610 | setPixmap( 0, PIXMAP_MBOXFOLDER ); | 610 | setPixmap( 0, PIXMAP_MBOXFOLDER ); |
611 | } | 611 | } |
612 | setText( 0, folder->getDisplayName() ); | 612 | setText( 0, folder->getDisplayName() ); |
613 | } | 613 | } |
614 | 614 | ||
615 | void MBOXfolderItem::refresh(QList<RecMail>&target) | 615 | void MBOXfolderItem::refresh(QList<RecMail>&target) |
616 | { | 616 | { |
617 | if (folder->may_select()) | 617 | if (folder->may_select()) |
618 | mbox->getWrapper()->listMessages( folder->getName(),target ); | 618 | mbox->getWrapper()->listMessages( folder->getName(),target ); |
619 | } | 619 | } |
620 | 620 | ||
621 | RecBody MBOXfolderItem::fetchBody(const RecMail&aMail) | 621 | RecBody MBOXfolderItem::fetchBody(const RecMail&aMail) |
622 | { | 622 | { |
diff --git a/noncore/net/mail/accountview.h b/noncore/net/mail/accountview.h index 361dd86..1d2bf19 100644 --- a/noncore/net/mail/accountview.h +++ b/noncore/net/mail/accountview.h | |||
@@ -1,21 +1,21 @@ | |||
1 | #ifndef ACCOUNTVIEW_H | 1 | #ifndef ACCOUNTVIEW_H |
2 | #define ACCOUNTVIEW_H | 2 | #define ACCOUNTVIEW_H |
3 | 3 | ||
4 | #include <qlistview.h> | 4 | #include <qlistview.h> |
5 | #include <qlist.h> | 5 | #include <qlist.h> |
6 | 6 | ||
7 | #include "settings.h" | 7 | #include <libmailwrapper/settings.h> |
8 | #include "mailwrapper.h" | 8 | #include <libmailwrapper/mailwrapper.h> |
9 | #include "abstractmail.h" | 9 | #include <libmailwrapper/abstractmail.h> |
10 | 10 | ||
11 | class POP3wrapper; | 11 | class POP3wrapper; |
12 | class RecMail; | 12 | class RecMail; |
13 | class RecBody; | 13 | class RecBody; |
14 | class QPopupMenu; | 14 | class QPopupMenu; |
15 | 15 | ||
16 | class AccountViewItem : public QListViewItem | 16 | class AccountViewItem : public QListViewItem |
17 | { | 17 | { |
18 | 18 | ||
19 | public: | 19 | public: |
20 | AccountViewItem( QListView *parent ) : QListViewItem( parent ) {} | 20 | AccountViewItem( QListView *parent ) : QListViewItem( parent ) {} |
21 | AccountViewItem( QListViewItem *parent) : QListViewItem( parent) {} | 21 | AccountViewItem( QListViewItem *parent) : QListViewItem( parent) {} |
diff --git a/noncore/net/mail/composemail.cpp b/noncore/net/mail/composemail.cpp index 13c7900..5e823e8 100644 --- a/noncore/net/mail/composemail.cpp +++ b/noncore/net/mail/composemail.cpp | |||
@@ -1,57 +1,58 @@ | |||
1 | #include <qt.h> | 1 | #include <qt.h> |
2 | 2 | ||
3 | #include <opie/ofiledialog.h> | 3 | #include <opie/ofiledialog.h> |
4 | #include <qpe/resource.h> | 4 | #include <qpe/resource.h> |
5 | #include <qpe/config.h> | 5 | #include <qpe/config.h> |
6 | #include <qpe/global.h> | 6 | #include <qpe/global.h> |
7 | #include <qpe/contact.h> | 7 | #include <qpe/contact.h> |
8 | 8 | ||
9 | #include "composemail.h" | 9 | #include "composemail.h" |
10 | #include "smtpwrapper.h" | 10 | |
11 | #include <libmailwrapper/smtpwrapper.h> | ||
11 | 12 | ||
12 | ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) | 13 | ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) |
13 | : ComposeMailUI( parent, name, modal, flags ) | 14 | : ComposeMailUI( parent, name, modal, flags ) |
14 | { | 15 | { |
15 | settings = s; | 16 | settings = s; |
16 | 17 | ||
17 | QString vfilename = Global::applicationFileName("addressbook", | 18 | QString vfilename = Global::applicationFileName("addressbook", |
18 | "businesscard.vcf"); | 19 | "businesscard.vcf"); |
19 | Contact c; | 20 | Contact c; |
20 | if (QFile::exists(vfilename)) { | 21 | if (QFile::exists(vfilename)) { |
21 | c = Contact::readVCard( vfilename )[0]; | 22 | c = Contact::readVCard( vfilename )[0]; |
22 | } | 23 | } |
23 | 24 | ||
24 | QStringList mails = c.emailList(); | 25 | QStringList mails = c.emailList(); |
25 | QString defmail = c.defaultEmail(); | 26 | QString defmail = c.defaultEmail(); |
26 | 27 | ||
27 | if (defmail.length()!=0) { | 28 | if (defmail.length()!=0) { |
28 | fromBox->insertItem(defmail); | 29 | fromBox->insertItem(defmail); |
29 | } | 30 | } |
30 | QStringList::ConstIterator sit = mails.begin(); | 31 | QStringList::ConstIterator sit = mails.begin(); |
31 | for (;sit!=mails.end();++sit) { | 32 | for (;sit!=mails.end();++sit) { |
32 | if ( (*sit)==defmail) | 33 | if ( (*sit)==defmail) |
33 | continue; | 34 | continue; |
34 | fromBox->insertItem((*sit)); | 35 | fromBox->insertItem((*sit)); |
35 | } | 36 | } |
36 | senderNameEdit->setText(c.firstName()+" "+c.lastName()); | 37 | senderNameEdit->setText(c.firstName()+" "+c.lastName()); |
37 | Config cfg( "mail" ); | 38 | Config cfg( "mail" ); |
38 | cfg.setGroup( "Compose" ); | 39 | cfg.setGroup( "Compose" ); |
39 | checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) ); | 40 | checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) ); |
40 | 41 | ||
41 | attList->addColumn( tr( "Name" ) ); | 42 | attList->addColumn( tr( "Name" ) ); |
42 | attList->addColumn( tr( "Size" ) ); | 43 | attList->addColumn( tr( "Size" ) ); |
43 | 44 | ||
44 | QList<Account> accounts = settings->getAccounts(); | 45 | QList<Account> accounts = settings->getAccounts(); |
45 | 46 | ||
46 | Account *it; | 47 | Account *it; |
47 | for ( it = accounts.first(); it; it = accounts.next() ) { | 48 | for ( it = accounts.first(); it; it = accounts.next() ) { |
48 | if ( it->getType().compare( "SMTP" ) == 0 ) { | 49 | if ( it->getType().compare( "SMTP" ) == 0 ) { |
49 | SMTPaccount *smtp = static_cast<SMTPaccount *>(it); | 50 | SMTPaccount *smtp = static_cast<SMTPaccount *>(it); |
50 | smtpAccountBox->insertItem( smtp->getAccountName() ); | 51 | smtpAccountBox->insertItem( smtp->getAccountName() ); |
51 | smtpAccounts.append( smtp ); | 52 | smtpAccounts.append( smtp ); |
52 | } | 53 | } |
53 | } | 54 | } |
54 | 55 | ||
55 | if ( smtpAccounts.count() > 0 ) { | 56 | if ( smtpAccounts.count() > 0 ) { |
56 | fillValues( smtpAccountBox->currentItem() ); | 57 | fillValues( smtpAccountBox->currentItem() ); |
57 | } else { | 58 | } else { |
@@ -182,25 +183,25 @@ void ComposeMail::removeAttachment() | |||
182 | 183 | ||
183 | void ComposeMail::accept() | 184 | void ComposeMail::accept() |
184 | { | 185 | { |
185 | if ( checkBoxLater->isChecked() ) { | 186 | if ( checkBoxLater->isChecked() ) { |
186 | qDebug( "Send later" ); | 187 | qDebug( "Send later" ); |
187 | } | 188 | } |
188 | 189 | ||
189 | #if 0 | 190 | #if 0 |
190 | qDebug( "Sending Mail with " + | 191 | qDebug( "Sending Mail with " + |
191 | smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() ); | 192 | smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() ); |
192 | #endif | 193 | #endif |
193 | Mail *mail = new Mail(); | 194 | Mail *mail = new Mail(); |
194 | 195 | ||
195 | SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() ); | 196 | SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() ); |
196 | mail->setMail(fromBox->currentText()); | 197 | mail->setMail(fromBox->currentText()); |
197 | 198 | ||
198 | if ( !toLine->text().isEmpty() ) { | 199 | if ( !toLine->text().isEmpty() ) { |
199 | mail->setTo( toLine->text() ); | 200 | mail->setTo( toLine->text() ); |
200 | } else { | 201 | } else { |
201 | qDebug( "No Reciever spezified -> returning" ); | 202 | qDebug( "No Reciever spezified -> returning" ); |
202 | return; | 203 | return; |
203 | } | 204 | } |
204 | mail->setName(senderNameEdit->text()); | 205 | mail->setName(senderNameEdit->text()); |
205 | mail->setCC( ccLine->text() ); | 206 | mail->setCC( ccLine->text() ); |
206 | mail->setBCC( bccLine->text() ); | 207 | mail->setBCC( bccLine->text() ); |
@@ -212,25 +213,25 @@ void ComposeMail::accept() | |||
212 | txt.append( sigMultiLine->text() ); | 213 | txt.append( sigMultiLine->text() ); |
213 | } | 214 | } |
214 | qDebug(txt); | 215 | qDebug(txt); |
215 | mail->setMessage( txt ); | 216 | mail->setMessage( txt ); |
216 | AttachViewItem *it = (AttachViewItem *) attList->firstChild(); | 217 | AttachViewItem *it = (AttachViewItem *) attList->firstChild(); |
217 | while ( it != NULL ) { | 218 | while ( it != NULL ) { |
218 | mail->addAttachment( it->getAttachment() ); | 219 | mail->addAttachment( it->getAttachment() ); |
219 | it = (AttachViewItem *) it->nextSibling(); | 220 | it = (AttachViewItem *) it->nextSibling(); |
220 | } | 221 | } |
221 | 222 | ||
222 | SMTPwrapper wrapper( settings ); | 223 | SMTPwrapper wrapper( settings ); |
223 | wrapper.sendMail( *mail,smtp,checkBoxLater->isChecked() ); | 224 | wrapper.sendMail( *mail,smtp,checkBoxLater->isChecked() ); |
224 | 225 | ||
225 | QDialog::accept(); | 226 | QDialog::accept(); |
226 | } | 227 | } |
227 | 228 | ||
228 | AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) | 229 | AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) |
229 | : QListViewItem( parent ) | 230 | : QListViewItem( parent ) |
230 | { | 231 | { |
231 | attachment = att; | 232 | attachment = att; |
232 | qDebug( att->getMimeType() ); | 233 | qDebug( att->getMimeType() ); |
233 | setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ? | 234 | setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ? |
234 | Resource::loadPixmap( "UnknownDocument-14" ) : | 235 | Resource::loadPixmap( "UnknownDocument-14" ) : |
235 | attachment->getDocLnk().pixmap() ); | 236 | attachment->getDocLnk().pixmap() ); |
236 | setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() ); | 237 | setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() ); |
diff --git a/noncore/net/mail/composemail.h b/noncore/net/mail/composemail.h index 230e397..604c862 100644 --- a/noncore/net/mail/composemail.h +++ b/noncore/net/mail/composemail.h | |||
@@ -1,22 +1,23 @@ | |||
1 | #ifndef COMPOSEMAIL_H | 1 | #ifndef COMPOSEMAIL_H |
2 | #define COMPOSEMAIL_H | 2 | #define COMPOSEMAIL_H |
3 | 3 | ||
4 | #include <qlineedit.h> | 4 | #include <qlineedit.h> |
5 | #include <qlistview.h> | 5 | #include <qlistview.h> |
6 | 6 | ||
7 | #include "composemailui.h" | 7 | #include "composemailui.h" |
8 | #include "addresspickerui.h" | 8 | #include "addresspickerui.h" |
9 | #include "settings.h" | 9 | #include <libmailwrapper/settings.h> |
10 | #include "mailwrapper.h" | 10 | #include <libmailwrapper/mailwrapper.h> |
11 | |||
11 | 12 | ||
12 | 13 | ||
13 | class AddressPicker : public AddressPickerUI | 14 | class AddressPicker : public AddressPickerUI |
14 | { | 15 | { |
15 | Q_OBJECT | 16 | Q_OBJECT |
16 | 17 | ||
17 | public: | 18 | public: |
18 | AddressPicker( QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 ); | 19 | AddressPicker( QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 ); |
19 | static QString getNames(); | 20 | static QString getNames(); |
20 | 21 | ||
21 | protected: | 22 | protected: |
22 | QString selectedNames; | 23 | QString selectedNames; |
diff --git a/noncore/net/mail/editaccounts.h b/noncore/net/mail/editaccounts.h index 10ed8b8..6022eef 100644 --- a/noncore/net/mail/editaccounts.h +++ b/noncore/net/mail/editaccounts.h | |||
@@ -1,25 +1,26 @@ | |||
1 | #ifndef EDITACCOUNTS_H | 1 | #ifndef EDITACCOUNTS_H |
2 | #define EDITACCOUNTS_H | 2 | #define EDITACCOUNTS_H |
3 | 3 | ||
4 | #include <qstring.h> | 4 | #include <qstring.h> |
5 | #include <qlistview.h> | 5 | #include <qlistview.h> |
6 | 6 | ||
7 | #include "editaccountsui.h" | 7 | #include "editaccountsui.h" |
8 | #include "selectmailtypeui.h" | 8 | #include "selectmailtypeui.h" |
9 | #include "imapconfigui.h" | 9 | #include "imapconfigui.h" |
10 | #include "pop3configui.h" | 10 | #include "pop3configui.h" |
11 | #include "smtpconfigui.h" | 11 | #include "smtpconfigui.h" |
12 | #include "nntpconfigui.h" | 12 | #include "nntpconfigui.h" |
13 | #include "settings.h" | 13 | #include <libmailwrapper/settings.h> |
14 | |||
14 | 15 | ||
15 | class AccountListItem : public QListViewItem | 16 | class AccountListItem : public QListViewItem |
16 | { | 17 | { |
17 | 18 | ||
18 | public: | 19 | public: |
19 | AccountListItem( QListView *parent, Account *a); | 20 | AccountListItem( QListView *parent, Account *a); |
20 | Account *getAccount() { return account; } | 21 | Account *getAccount() { return account; } |
21 | 22 | ||
22 | private: | 23 | private: |
23 | Account *account; | 24 | Account *account; |
24 | 25 | ||
25 | }; | 26 | }; |
diff --git a/noncore/net/mail/mail.pro b/noncore/net/mail/mail.pro index 69e1450..a96c88e 100644 --- a/noncore/net/mail/mail.pro +++ b/noncore/net/mail/mail.pro | |||
@@ -33,20 +33,20 @@ INTERFACES = editaccountsui.ui \ | |||
33 | nntpconfigui.ui \ | 33 | nntpconfigui.ui \ |
34 | smtpconfigui.ui \ | 34 | smtpconfigui.ui \ |
35 | addresspickerui.ui \ | 35 | addresspickerui.ui \ |
36 | composemailui.ui \ | 36 | composemailui.ui \ |
37 | settingsdialogui.ui \ | 37 | settingsdialogui.ui \ |
38 | statuswidgetui.ui \ | 38 | statuswidgetui.ui \ |
39 | newmaildirui.ui | 39 | newmaildirui.ui |
40 | 40 | ||
41 | INCLUDEPATH += $(OPIEDIR)/include | 41 | INCLUDEPATH += $(OPIEDIR)/include |
42 | 42 | ||
43 | CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX ) | 43 | CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX ) |
44 | contains( CONFTEST, y ){ | 44 | contains( CONFTEST, y ){ |
45 | LIBS += -lqpe -letpan -lssl -lcrypto -lopie -liconv | 45 | LIBS += -lqpe -lopie -lmailwrapper -liconv |
46 | }else{ | 46 | }else{ |
47 | LIBS += -lqpe -lopie -llibmailwrapper | 47 | LIBS += -lqpe -lopie -lmailwrapper |
48 | } | 48 | } |
49 | 49 | ||
50 | TARGET = opiemail | 50 | TARGET = opiemail |
51 | 51 | ||
52 | include ( $(OPIEDIR)/include.pro ) | 52 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/net/mail/mailistviewitem.h b/noncore/net/mail/mailistviewitem.h index 60bfdda..271f616 100644 --- a/noncore/net/mail/mailistviewitem.h +++ b/noncore/net/mail/mailistviewitem.h | |||
@@ -1,17 +1,18 @@ | |||
1 | #ifndef __MAILLISTVIEWITEM_H | 1 | #ifndef __MAILLISTVIEWITEM_H |
2 | #define __MAILLISTVIEWITEM_H | 2 | #define __MAILLISTVIEWITEM_H |
3 | 3 | ||
4 | #include <qlistview.h> | 4 | #include <qlistview.h> |
5 | #include "mailtypes.h" | 5 | #include <libmailwrapper/mailtypes.h> |
6 | |||
6 | 7 | ||
7 | class MailListViewItem:public QListViewItem | 8 | class MailListViewItem:public QListViewItem |
8 | { | 9 | { |
9 | public: | 10 | public: |
10 | MailListViewItem(QListView * parent, MailListViewItem * after ); | 11 | MailListViewItem(QListView * parent, MailListViewItem * after ); |
11 | virtual ~MailListViewItem(){} | 12 | virtual ~MailListViewItem(){} |
12 | 13 | ||
13 | void storeData(const RecMail&data); | 14 | void storeData(const RecMail&data); |
14 | const RecMail&data()const; | 15 | const RecMail&data()const; |
15 | void showEntry(); | 16 | void showEntry(); |
16 | 17 | ||
17 | protected: | 18 | protected: |
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp index 6511b1f..43d02e7 100644 --- a/noncore/net/mail/mainwindow.cpp +++ b/noncore/net/mail/mainwindow.cpp | |||
@@ -1,27 +1,28 @@ | |||
1 | #include <qlabel.h> | 1 | #include <qlabel.h> |
2 | #include <qvbox.h> | 2 | #include <qvbox.h> |
3 | #include <qheader.h> | 3 | #include <qheader.h> |
4 | #include <qtimer.h> | 4 | #include <qtimer.h> |
5 | #include <qlayout.h> | 5 | #include <qlayout.h> |
6 | #include <qmessagebox.h> | 6 | #include <qmessagebox.h> |
7 | #include <qtextstream.h> | 7 | #include <qtextstream.h> |
8 | 8 | ||
9 | #include <qpe/qpeapplication.h> | 9 | #include <qpe/qpeapplication.h> |
10 | #include <qpe/resource.h> | 10 | #include <qpe/resource.h> |
11 | 11 | ||
12 | |||
12 | #include "defines.h" | 13 | #include "defines.h" |
13 | #include "mainwindow.h" | 14 | #include "mainwindow.h" |
14 | #include "viewmail.h" | 15 | #include "viewmail.h" |
15 | #include "mailtypes.h" | 16 | #include <libmailwrapper/mailtypes.h> |
16 | #include "mailistviewitem.h" | 17 | #include "mailistviewitem.h" |
17 | 18 | ||
18 | 19 | ||
19 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | 20 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) |
20 | : QMainWindow( parent, name, flags ) | 21 | : QMainWindow( parent, name, flags ) |
21 | { | 22 | { |
22 | 23 | ||
23 | setCaption( tr( "Mail" ) ); | 24 | setCaption( tr( "Mail" ) ); |
24 | setToolBarsMovable( false ); | 25 | setToolBarsMovable( false ); |
25 | 26 | ||
26 | toolBar = new QToolBar( this ); | 27 | toolBar = new QToolBar( this ); |
27 | menuBar = new QMenuBar( toolBar ); | 28 | menuBar = new QMenuBar( toolBar ); |
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp index 54453b7..fcd48e2 100644 --- a/noncore/net/mail/opiemail.cpp +++ b/noncore/net/mail/opiemail.cpp | |||
@@ -1,18 +1,18 @@ | |||
1 | #include <qmessagebox.h> | 1 | #include <qmessagebox.h> |
2 | #include "settingsdialog.h" | 2 | #include "settingsdialog.h" |
3 | #include "opiemail.h" | 3 | #include "opiemail.h" |
4 | #include "editaccounts.h" | 4 | #include "editaccounts.h" |
5 | #include "composemail.h" | 5 | #include "composemail.h" |
6 | #include "smtpwrapper.h" | 6 | #include <libmailwrapper/smtpwrapper.h> |
7 | #include <qpe/qcopenvelope_qws.h> | 7 | #include <qpe/qcopenvelope_qws.h> |
8 | #include <qaction.h> | 8 | #include <qaction.h> |
9 | #include <qapplication.h> | 9 | #include <qapplication.h> |
10 | 10 | ||
11 | OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) | 11 | OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) |
12 | : MainWindow( parent, name, flags ) | 12 | : MainWindow( parent, name, flags ) |
13 | { | 13 | { |
14 | settings = new Settings(); | 14 | settings = new Settings(); |
15 | 15 | ||
16 | folderView->populate( settings->getAccounts() ); | 16 | folderView->populate( settings->getAccounts() ); |
17 | 17 | ||
18 | connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); | 18 | connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); |
diff --git a/noncore/net/mail/opiemail.h b/noncore/net/mail/opiemail.h index 4e3c974..ebed5d8 100644 --- a/noncore/net/mail/opiemail.h +++ b/noncore/net/mail/opiemail.h | |||
@@ -1,17 +1,18 @@ | |||
1 | #ifndef OPIEMAIL_H | 1 | #ifndef OPIEMAIL_H |
2 | #define OPIEMAIL_H | 2 | #define OPIEMAIL_H |
3 | 3 | ||
4 | #include "mainwindow.h" | 4 | #include "mainwindow.h" |
5 | #include "settings.h" | 5 | #include <libmailwrapper/settings.h> |
6 | |||
6 | 7 | ||
7 | class OpieMail : public MainWindow | 8 | class OpieMail : public MainWindow |
8 | { | 9 | { |
9 | Q_OBJECT | 10 | Q_OBJECT |
10 | 11 | ||
11 | public: | 12 | public: |
12 | OpieMail( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); | 13 | OpieMail( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); |
13 | static QString appName() { return QString::fromLatin1("opiemail"); } | 14 | static QString appName() { return QString::fromLatin1("opiemail"); } |
14 | 15 | ||
15 | public slots: | 16 | public slots: |
16 | virtual void slotwriteMail(const QString&name,const QString&email); | 17 | virtual void slotwriteMail(const QString&name,const QString&email); |
17 | virtual void slotComposeMail(); | 18 | virtual void slotComposeMail(); |
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp index ed77eb5..9ca6383 100644 --- a/noncore/net/mail/viewmail.cpp +++ b/noncore/net/mail/viewmail.cpp | |||
@@ -2,30 +2,30 @@ | |||
2 | #include <qmessagebox.h> | 2 | #include <qmessagebox.h> |
3 | #include <qtextstream.h> | 3 | #include <qtextstream.h> |
4 | #include <qaction.h> | 4 | #include <qaction.h> |
5 | #include <qpopupmenu.h> | 5 | #include <qpopupmenu.h> |
6 | #include <qfile.h> | 6 | #include <qfile.h> |
7 | #include <qapplication.h> | 7 | #include <qapplication.h> |
8 | #include <qvaluelist.h> | 8 | #include <qvaluelist.h> |
9 | 9 | ||
10 | #include <qpe/config.h> | 10 | #include <qpe/config.h> |
11 | 11 | ||
12 | #include <opie/ofiledialog.h> | 12 | #include <opie/ofiledialog.h> |
13 | 13 | ||
14 | #include "settings.h" | 14 | #include <libmailwrapper/settings.h> |
15 | #include "composemail.h" | 15 | #include "composemail.h" |
16 | #include "viewmail.h" | 16 | #include "viewmail.h" |
17 | #include "abstractmail.h" | 17 | #include <libmailwrapper/abstractmail.h> |
18 | #include "accountview.h" | 18 | #include "accountview.h" |
19 | #include "mailtypes.h" | 19 | #include <libmailwrapper/mailtypes.h> |
20 | 20 | ||
21 | AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, | 21 | AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, |
22 | const QString&fsize,int num,const QValueList<int>&path) | 22 | const QString&fsize,int num,const QValueList<int>&path) |
23 | : QListViewItem(parent,after),_partNum(num) | 23 | : QListViewItem(parent,after),_partNum(num) |
24 | { | 24 | { |
25 | _path=path; | 25 | _path=path; |
26 | setText(0, mime); | 26 | setText(0, mime); |
27 | setText(1, desc); | 27 | setText(1, desc); |
28 | setText(2, file); | 28 | setText(2, file); |
29 | setText(3, fsize); | 29 | setText(3, fsize); |
30 | } | 30 | } |
31 | 31 | ||
diff --git a/noncore/net/mail/viewmail.h b/noncore/net/mail/viewmail.h index 29681cc..2d0e024 100644 --- a/noncore/net/mail/viewmail.h +++ b/noncore/net/mail/viewmail.h | |||
@@ -1,22 +1,23 @@ | |||
1 | #ifndef VIEWMAIL_H | 1 | #ifndef VIEWMAIL_H |
2 | #define VIEWMAIL_H | 2 | #define VIEWMAIL_H |
3 | 3 | ||
4 | #include <qlistview.h> | 4 | #include <qlistview.h> |
5 | #include <qmap.h> | 5 | #include <qmap.h> |
6 | #include <qstringlist.h> | 6 | #include <qstringlist.h> |
7 | #include <qvaluelist.h> | 7 | #include <qvaluelist.h> |
8 | 8 | ||
9 | #include "viewmailbase.h" | 9 | #include "viewmailbase.h" |
10 | #include "mailtypes.h" | 10 | #include <libmailwrapper/mailtypes.h> |
11 | |||
11 | 12 | ||
12 | class AttachItem : public QListViewItem | 13 | class AttachItem : public QListViewItem |
13 | { | 14 | { |
14 | public: | 15 | public: |
15 | AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, | 16 | AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, |
16 | const QString&fsize,int num,const QValueList<int>&path); | 17 | const QString&fsize,int num,const QValueList<int>&path); |
17 | AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, | 18 | AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, |
18 | const QString&fsize,int num,const QValueList<int>&path); | 19 | const QString&fsize,int num,const QValueList<int>&path); |
19 | int Partnumber() { return _partNum; } | 20 | int Partnumber() { return _partNum; } |
20 | bool isParentof(const QValueList<int>&path); | 21 | bool isParentof(const QValueList<int>&path); |
21 | 22 | ||
22 | private: | 23 | private: |