summaryrefslogtreecommitdiff
authorharlekin <harlekin>2004-01-04 02:46:56 (UTC)
committer harlekin <harlekin>2004-01-04 02:46:56 (UTC)
commitcda867a4d179eb3320c5a043cb9116014fa736b8 (patch) (unidiff)
tree1dafac9c041634e19fab18759f181c41500346a5
parent7bfc0889cf761e20402f775a46c8b8508c48ed8f (diff)
downloadopie-cda867a4d179eb3320c5a043cb9116014fa736b8.zip
opie-cda867a4d179eb3320c5a043cb9116014fa736b8.tar.gz
opie-cda867a4d179eb3320c5a043cb9116014fa736b8.tar.bz2
adapted includes to the new lib
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/accountview.cpp10
-rw-r--r--noncore/net/mail/accountview.h6
-rw-r--r--noncore/net/mail/composemail.cpp11
-rw-r--r--noncore/net/mail/composemail.h5
-rw-r--r--noncore/net/mail/editaccounts.h3
-rw-r--r--noncore/net/mail/mail.pro4
-rw-r--r--noncore/net/mail/mailistviewitem.h3
-rw-r--r--noncore/net/mail/mainwindow.cpp3
-rw-r--r--noncore/net/mail/opiemail.cpp2
-rw-r--r--noncore/net/mail/opiemail.h3
-rw-r--r--noncore/net/mail/viewmail.cpp6
-rw-r--r--noncore/net/mail/viewmail.h3
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,9 +1,9 @@
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/**
@@ -160,13 +160,13 @@ void IMAPviewItem::refresh(QList<RecMail>&)
160 160
161void IMAPviewItem::refreshFolders(bool force) 161void 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
@@ -174,13 +174,13 @@ void IMAPviewItem::refreshFolders(bool force)
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;
@@ -414,13 +414,13 @@ void AccountViewItem::deleteAllMail(AbstractMail*wrapper,Folder*folder)
414AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) 414AccountView::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
425void AccountView::slotContextMenu(int id) 425void AccountView::slotContextMenu(int id)
426{ 426{
@@ -604,13 +604,13 @@ MBOXfolderItem::MBOXfolderItem( Folder *folderInit, MBOXviewItem *parent , QList
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
615void MBOXfolderItem::refresh(QList<RecMail>&target) 615void MBOXfolderItem::refresh(QList<RecMail>&target)
616{ 616{
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,15 +1,15 @@
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
11class POP3wrapper; 11class POP3wrapper;
12class RecMail; 12class RecMail;
13class RecBody; 13class RecBody;
14class QPopupMenu; 14class QPopupMenu;
15 15
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
@@ -4,13 +4,14 @@
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
12ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) 13ComposeMail::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
@@ -20,13 +21,13 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
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)
@@ -39,13 +40,13 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
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 );
@@ -188,13 +189,13 @@ void ComposeMail::accept()
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 {
@@ -218,13 +219,13 @@ void ComposeMail::accept()
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
228AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) 229AttachViewItem::AttachViewItem( QListView *parent, Attachment *att )
229 : QListViewItem( parent ) 230 : QListViewItem( parent )
230{ 231{
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
@@ -3,14 +3,15 @@
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
13class AddressPicker : public AddressPickerUI 14class AddressPicker : public AddressPickerUI
14{ 15{
15 Q_OBJECT 16 Q_OBJECT
16 17
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
@@ -7,13 +7,14 @@
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
15class AccountListItem : public QListViewItem 16class AccountListItem : public QListViewItem
16{ 17{
17 18
18public: 19public:
19 AccountListItem( QListView *parent, Account *a); 20 AccountListItem( QListView *parent, Account *a);
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
@@ -39,14 +39,14 @@ INTERFACES = editaccountsui.ui \
39 newmaildirui.ui 39 newmaildirui.ui
40 40
41INCLUDEPATH += $(OPIEDIR)/include 41INCLUDEPATH += $(OPIEDIR)/include
42 42
43CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX ) 43CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX )
44contains( CONFTEST, y ){ 44contains( 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
50TARGET = opiemail 50TARGET = opiemail
51 51
52include ( $(OPIEDIR)/include.pro ) 52include ( $(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,11 +1,12 @@
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
7class MailListViewItem:public QListViewItem 8class MailListViewItem:public QListViewItem
8{ 9{
9public: 10public:
10 MailListViewItem(QListView * parent, MailListViewItem * after ); 11 MailListViewItem(QListView * parent, MailListViewItem * after );
11 virtual ~MailListViewItem(){} 12 virtual ~MailListViewItem(){}
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
@@ -6,16 +6,17 @@
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
19MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 20MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
20 : QMainWindow( parent, name, flags ) 21 : QMainWindow( parent, name, flags )
21{ 22{
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,12 +1,12 @@
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
11OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) 11OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags )
12 : MainWindow( parent, name, flags ) 12 : MainWindow( parent, name, flags )
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,11 +1,12 @@
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
7class OpieMail : public MainWindow 8class OpieMail : public MainWindow
8{ 9{
9 Q_OBJECT 10 Q_OBJECT
10 11
11public: 12public:
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
@@ -8,18 +8,18 @@
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
21AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, 21AttachItem::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;
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
@@ -4,13 +4,14 @@
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
12class AttachItem : public QListViewItem 13class AttachItem : public QListViewItem
13{ 14{
14public: 15public:
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);