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,51 +1,51 @@
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 */
12POP3viewItem::POP3viewItem( POP3account *a, QListView *parent ) 12POP3viewItem::POP3viewItem( POP3account *a, QListView *parent )
13 : AccountViewItem( parent ) 13 : AccountViewItem( parent )
14{ 14{
15 account = a; 15 account = a;
16 wrapper = AbstractMail::getWrapper( account ); 16 wrapper = AbstractMail::getWrapper( account );
17 setPixmap( 0, PIXMAP_POP3FOLDER ); 17 setPixmap( 0, PIXMAP_POP3FOLDER );
18 setText( 0, account->getAccountName() ); 18 setText( 0, account->getAccountName() );
19 setOpen( true ); 19 setOpen( true );
20} 20}
21 21
22POP3viewItem::~POP3viewItem() 22POP3viewItem::~POP3viewItem()
23{ 23{
24 delete wrapper; 24 delete wrapper;
25} 25}
26 26
27AbstractMail *POP3viewItem::getWrapper() 27AbstractMail *POP3viewItem::getWrapper()
28{ 28{
29 return wrapper; 29 return wrapper;
30} 30}
31 31
32void POP3viewItem::refresh( QList<RecMail> & ) 32void POP3viewItem::refresh( QList<RecMail> & )
33{ 33{
34 QList<Folder> *folders = wrapper->listFolders(); 34 QList<Folder> *folders = wrapper->listFolders();
35 QListViewItem *child = firstChild(); 35 QListViewItem *child = firstChild();
36 while ( child ) { 36 while ( child ) {
37 QListViewItem *tmp = child; 37 QListViewItem *tmp = child;
38 child = child->nextSibling(); 38 child = child->nextSibling();
39 delete tmp; 39 delete tmp;
40 } 40 }
41 Folder *it; 41 Folder *it;
42 QListViewItem*item = 0; 42 QListViewItem*item = 0;
43 for ( it = folders->first(); it; it = folders->next() ) { 43 for ( it = folders->first(); it; it = folders->next() ) {
44 item = new POP3folderItem( it, this , item ); 44 item = new POP3folderItem( it, this , item );
45 item->setSelectable(it->may_select()); 45 item->setSelectable(it->may_select());
46 } 46 }
47 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 47 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
48 folders->setAutoDelete(false); 48 folders->setAutoDelete(false);
49 delete folders; 49 delete folders;
50} 50}
51 51
@@ -118,111 +118,111 @@ IMAPviewItem::IMAPviewItem( IMAPaccount *a, QListView *parent )
118 account = a; 118 account = a;
119 wrapper = AbstractMail::getWrapper( account ); 119 wrapper = AbstractMail::getWrapper( account );
120 setPixmap( 0, PIXMAP_IMAPFOLDER ); 120 setPixmap( 0, PIXMAP_IMAPFOLDER );
121 setText( 0, account->getAccountName() ); 121 setText( 0, account->getAccountName() );
122 setOpen( true ); 122 setOpen( true );
123} 123}
124 124
125IMAPviewItem::~IMAPviewItem() 125IMAPviewItem::~IMAPviewItem()
126{ 126{
127 delete wrapper; 127 delete wrapper;
128} 128}
129 129
130AbstractMail *IMAPviewItem::getWrapper() 130AbstractMail *IMAPviewItem::getWrapper()
131{ 131{
132 return wrapper; 132 return wrapper;
133} 133}
134 134
135IMAPfolderItem*IMAPviewItem::findSubItem(const QString&path,IMAPfolderItem*start) 135IMAPfolderItem*IMAPviewItem::findSubItem(const QString&path,IMAPfolderItem*start)
136{ 136{
137 IMAPfolderItem*pitem,*sitem; 137 IMAPfolderItem*pitem,*sitem;
138 if (!start) pitem = (IMAPfolderItem*)firstChild(); 138 if (!start) pitem = (IMAPfolderItem*)firstChild();
139 else pitem = (IMAPfolderItem*)start->firstChild(); 139 else pitem = (IMAPfolderItem*)start->firstChild();
140 while (pitem) { 140 while (pitem) {
141 if (pitem->matchName(path)) { 141 if (pitem->matchName(path)) {
142 break; 142 break;
143 } 143 }
144 if (pitem->childCount()>0) { 144 if (pitem->childCount()>0) {
145 sitem = findSubItem(path,pitem); 145 sitem = findSubItem(path,pitem);
146 if (sitem) { 146 if (sitem) {
147 pitem = sitem; 147 pitem = sitem;
148 break; 148 break;
149 } 149 }
150 } 150 }
151 pitem=(IMAPfolderItem*)pitem->nextSibling(); 151 pitem=(IMAPfolderItem*)pitem->nextSibling();
152 } 152 }
153 return pitem; 153 return pitem;
154} 154}
155 155
156void IMAPviewItem::refresh(QList<RecMail>&) 156void IMAPviewItem::refresh(QList<RecMail>&)
157{ 157{
158 refreshFolders(false); 158 refreshFolders(false);
159} 159}
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
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) {
193 fname = fname.left(pos); 193 fname = fname.left(pos);
194 } 194 }
195 IMAPfolderItem*pitem = findSubItem(fname); 195 IMAPfolderItem*pitem = findSubItem(fname);
196 if (pitem) { 196 if (pitem) {
197 titem = item; 197 titem = item;
198 item = new IMAPfolderItem(it,pitem,pitem->firstChild(),this); 198 item = new IMAPfolderItem(it,pitem,pitem->firstChild(),this);
199 /* setup the short name */ 199 /* setup the short name */
200 item->setText(0,it->getDisplayName().right(it->getDisplayName().length()-pos-1)); 200 item->setText(0,it->getDisplayName().right(it->getDisplayName().length()-pos-1));
201 item = titem; 201 item = titem;
202 } else { 202 } else {
203 item = new IMAPfolderItem( it, this , item ); 203 item = new IMAPfolderItem( it, this , item );
204 } 204 }
205 } 205 }
206 delete folders; 206 delete folders;
207} 207}
208 208
209QPopupMenu * IMAPviewItem::getContextMenu() 209QPopupMenu * IMAPviewItem::getContextMenu()
210{ 210{
211 QPopupMenu *m = new QPopupMenu(0); 211 QPopupMenu *m = new QPopupMenu(0);
212 if (m) { 212 if (m) {
213 m->insertItem(QObject::tr("Refresh folder list",contextName),0); 213 m->insertItem(QObject::tr("Refresh folder list",contextName),0);
214 m->insertItem(QObject::tr("Create new folder",contextName),1); 214 m->insertItem(QObject::tr("Create new folder",contextName),1);
215 m->insertSeparator(); 215 m->insertSeparator();
216 m->insertItem(QObject::tr("Disconnect",contextName),2); 216 m->insertItem(QObject::tr("Disconnect",contextName),2);
217 } 217 }
218 return m; 218 return m;
219} 219}
220 220
221void IMAPviewItem::createNewFolder() 221void IMAPviewItem::createNewFolder()
222{ 222{
223 Newmdirdlg ndirdlg; 223 Newmdirdlg ndirdlg;
224 ndirdlg.showMaximized(); 224 ndirdlg.showMaximized();
225 if (ndirdlg.exec()) { 225 if (ndirdlg.exec()) {
226 QString ndir = ndirdlg.Newdir(); 226 QString ndir = ndirdlg.Newdir();
227 bool makesubs = ndirdlg.subpossible(); 227 bool makesubs = ndirdlg.subpossible();
228 QString delemiter = "/"; 228 QString delemiter = "/";
@@ -372,97 +372,97 @@ void IMAPfolderItem::contextMenuSelected(int id)
372 case 0: 372 case 0:
373 view->refreshCurrent(); 373 view->refreshCurrent();
374 break; 374 break;
375 case 1: 375 case 1:
376 deleteAllMail(imap->getWrapper(),folder); 376 deleteAllMail(imap->getWrapper(),folder);
377 break; 377 break;
378 case 2: 378 case 2:
379 createNewFolder(); 379 createNewFolder();
380 break; 380 break;
381 case 3: 381 case 3:
382 deleteFolder(); 382 deleteFolder();
383 break; 383 break;
384 default: 384 default:
385 break; 385 break;
386 } 386 }
387} 387}
388 388
389/** 389/**
390 * Generic stuff 390 * Generic stuff
391 */ 391 */
392 392
393const QString AccountViewItem::contextName="AccountViewItem"; 393const QString AccountViewItem::contextName="AccountViewItem";
394 394
395void AccountViewItem::deleteAllMail(AbstractMail*wrapper,Folder*folder) 395void AccountViewItem::deleteAllMail(AbstractMail*wrapper,Folder*folder)
396{ 396{
397 if (!wrapper) return; 397 if (!wrapper) return;
398 QString fname=""; 398 QString fname="";
399 if (folder) fname = folder->getDisplayName(); 399 if (folder) fname = folder->getDisplayName();
400 int yesno = QMessageBox::warning(0,QObject::tr("Delete all mails",contextName), 400 int yesno = QMessageBox::warning(0,QObject::tr("Delete all mails",contextName),
401 QObject::tr("<center>Realy delete all mails in box <br>%1</center>",contextName). 401 QObject::tr("<center>Realy delete all mails in box <br>%1</center>",contextName).
402 arg(fname), 402 arg(fname),
403 QObject::tr("Yes",contextName), 403 QObject::tr("Yes",contextName),
404 QObject::tr("No",contextName),QString::null,1,1); 404 QObject::tr("No",contextName),QString::null,1,1);
405 qDebug("Auswahl: %i",yesno); 405 qDebug("Auswahl: %i",yesno);
406 if (yesno == 0) { 406 if (yesno == 0) {
407 if (wrapper->deleteAllMail(folder)) { 407 if (wrapper->deleteAllMail(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
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{
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
432void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int) 432void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int)
433{ 433{
434 if (button==1) {return;} 434 if (button==1) {return;}
435 if (!item) return; 435 if (!item) return;
436 AccountViewItem *view = static_cast<AccountViewItem *>(item); 436 AccountViewItem *view = static_cast<AccountViewItem *>(item);
437 QPopupMenu*m = view->getContextMenu(); 437 QPopupMenu*m = view->getContextMenu();
438 if (!m) return; 438 if (!m) return;
439 connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int))); 439 connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int)));
440 m->setFocus(); 440 m->setFocus();
441 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); 441 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) );
442 delete m; 442 delete m;
443} 443}
444 444
445void AccountView::populate( QList<Account> list ) 445void AccountView::populate( QList<Account> list )
446{ 446{
447 clear(); 447 clear();
448 448
449 QString localfolders = (QString) getenv( "HOME" ) + QString("/Applications/opiemail/localmail/"); 449 QString localfolders = (QString) getenv( "HOME" ) + QString("/Applications/opiemail/localmail/");
450 (void) new MBOXviewItem(localfolders,this); 450 (void) new MBOXviewItem(localfolders,this);
451 451
452 Account *it; 452 Account *it;
453 for ( it = list.first(); it; it = list.next() ) { 453 for ( it = list.first(); it; it = list.next() ) {
454 if ( it->getType().compare( "IMAP" ) == 0 ) { 454 if ( it->getType().compare( "IMAP" ) == 0 ) {
455 IMAPaccount *imap = static_cast<IMAPaccount *>(it); 455 IMAPaccount *imap = static_cast<IMAPaccount *>(it);
456 qDebug( "added IMAP " + imap->getAccountName() ); 456 qDebug( "added IMAP " + imap->getAccountName() );
457 (void) new IMAPviewItem( imap, this ); 457 (void) new IMAPviewItem( imap, this );
458 } else if ( it->getType().compare( "POP3" ) == 0 ) { 458 } else if ( it->getType().compare( "POP3" ) == 0 ) {
459 POP3account *pop3 = static_cast<POP3account *>(it); 459 POP3account *pop3 = static_cast<POP3account *>(it);
460 qDebug( "added POP3 " + pop3->getAccountName() ); 460 qDebug( "added POP3 " + pop3->getAccountName() );
461 (void) new POP3viewItem( pop3, this ); 461 (void) new POP3viewItem( pop3, this );
462 } 462 }
463 } 463 }
464} 464}
465 465
466void AccountView::refresh(QListViewItem *item) { 466void AccountView::refresh(QListViewItem *item) {
467 467
468 qDebug("AccountView refresh..."); 468 qDebug("AccountView refresh...");
@@ -562,97 +562,97 @@ QPopupMenu * MBOXviewItem::getContextMenu()
562 if (m) { 562 if (m) {
563 m->insertItem(QObject::tr("Refresh folder list",contextName),0); 563 m->insertItem(QObject::tr("Refresh folder list",contextName),0);
564 m->insertItem(QObject::tr("Create new folder",contextName),1); 564 m->insertItem(QObject::tr("Create new folder",contextName),1);
565 } 565 }
566 return m; 566 return m;
567} 567}
568 568
569void MBOXviewItem::createFolder() 569void MBOXviewItem::createFolder()
570{ 570{
571 Newmdirdlg ndirdlg(0,0,true); 571 Newmdirdlg ndirdlg(0,0,true);
572 ndirdlg.showMaximized(); 572 ndirdlg.showMaximized();
573 if (ndirdlg.exec()) { 573 if (ndirdlg.exec()) {
574 QString ndir = ndirdlg.Newdir(); 574 QString ndir = ndirdlg.Newdir();
575 if (wrapper->createMbox(ndir)) { 575 if (wrapper->createMbox(ndir)) {
576 refresh(true); 576 refresh(true);
577 } 577 }
578 } 578 }
579} 579}
580 580
581void MBOXviewItem::contextMenuSelected(int which) 581void MBOXviewItem::contextMenuSelected(int which)
582{ 582{
583 switch (which) { 583 switch (which) {
584 case 0: 584 case 0:
585 refresh(true); 585 refresh(true);
586 break; 586 break;
587 case 1: 587 case 1:
588 createFolder(); 588 createFolder();
589 break; 589 break;
590 default: 590 default:
591 break; 591 break;
592 } 592 }
593} 593}
594 594
595MBOXfolderItem::~MBOXfolderItem() 595MBOXfolderItem::~MBOXfolderItem()
596{ 596{
597 delete folder; 597 delete folder;
598} 598}
599 599
600MBOXfolderItem::MBOXfolderItem( Folder *folderInit, MBOXviewItem *parent , QListViewItem*after ) 600MBOXfolderItem::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
615void MBOXfolderItem::refresh(QList<RecMail>&target) 615void 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
621RecBody MBOXfolderItem::fetchBody(const RecMail&aMail) 621RecBody MBOXfolderItem::fetchBody(const RecMail&aMail)
622{ 622{
623 return mbox->getWrapper()->fetchBody(aMail); 623 return mbox->getWrapper()->fetchBody(aMail);
624} 624}
625 625
626void MBOXfolderItem::deleteFolder() 626void MBOXfolderItem::deleteFolder()
627{ 627{
628 int yesno = QMessageBox::warning(0,QObject::tr("Delete folder",contextName), 628 int yesno = QMessageBox::warning(0,QObject::tr("Delete folder",contextName),
629 QObject::tr("<center>Realy delete folder <br><b>%1</b><br>and all if it content?</center>",contextName).arg(folder->getDisplayName()), 629 QObject::tr("<center>Realy delete folder <br><b>%1</b><br>and all if it content?</center>",contextName).arg(folder->getDisplayName()),
630 QObject::tr("Yes",contextName), 630 QObject::tr("Yes",contextName),
631 QObject::tr("No",contextName),QString::null,1,1); 631 QObject::tr("No",contextName),QString::null,1,1);
632 qDebug("Auswahl: %i",yesno); 632 qDebug("Auswahl: %i",yesno);
633 if (yesno == 0) { 633 if (yesno == 0) {
634 if (mbox->getWrapper()->deleteMbox(folder)) { 634 if (mbox->getWrapper()->deleteMbox(folder)) {
635 QListView*v=listView(); 635 QListView*v=listView();
636 MBOXviewItem * box = mbox; 636 MBOXviewItem * box = mbox;
637 /* be carefull - after that this object is destroyd so don't use 637 /* be carefull - after that this object is destroyd so don't use
638 * any member of it after that call!!*/ 638 * any member of it after that call!!*/
639 mbox->refresh(true); 639 mbox->refresh(true);
640 if (v) { 640 if (v) {
641 v->setSelected(box,true); 641 v->setSelected(box,true);
642 } 642 }
643 } 643 }
644 } 644 }
645} 645}
646 646
647QPopupMenu * MBOXfolderItem::getContextMenu() 647QPopupMenu * MBOXfolderItem::getContextMenu()
648{ 648{
649 QPopupMenu *m = new QPopupMenu(0); 649 QPopupMenu *m = new QPopupMenu(0);
650 if (m) { 650 if (m) {
651 m->insertItem(QObject::tr("Delete all mails",contextName),0); 651 m->insertItem(QObject::tr("Delete all mails",contextName),0);
652 m->insertItem(QObject::tr("Delete folder",contextName),1); 652 m->insertItem(QObject::tr("Delete folder",contextName),1);
653 } 653 }
654 return m; 654 return m;
655} 655}
656 656
657void MBOXfolderItem::contextMenuSelected(int which) 657void MBOXfolderItem::contextMenuSelected(int which)
658{ 658{
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,57 +1,57 @@
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
16class AccountViewItem : public QListViewItem 16class AccountViewItem : public QListViewItem
17{ 17{
18 18
19public: 19public:
20 AccountViewItem( QListView *parent ) : QListViewItem( parent ) {} 20 AccountViewItem( QListView *parent ) : QListViewItem( parent ) {}
21 AccountViewItem( QListViewItem *parent) : QListViewItem( parent) {} 21 AccountViewItem( QListViewItem *parent) : QListViewItem( parent) {}
22 AccountViewItem( QListViewItem *parent , QListViewItem*after ) : QListViewItem( parent,after ) {} 22 AccountViewItem( QListViewItem *parent , QListViewItem*after ) : QListViewItem( parent,after ) {}
23 virtual void refresh(QList<RecMail>&)=0; 23 virtual void refresh(QList<RecMail>&)=0;
24 virtual RecBody fetchBody(const RecMail&)=0; 24 virtual RecBody fetchBody(const RecMail&)=0;
25 virtual QPopupMenu * getContextMenu(){return 0;}; 25 virtual QPopupMenu * getContextMenu(){return 0;};
26 virtual void contextMenuSelected(int){} 26 virtual void contextMenuSelected(int){}
27protected: 27protected:
28 virtual void deleteAllMail(AbstractMail*wrapper,Folder*f); 28 virtual void deleteAllMail(AbstractMail*wrapper,Folder*f);
29 static const QString contextName; 29 static const QString contextName;
30}; 30};
31 31
32class POP3viewItem : public AccountViewItem 32class POP3viewItem : public AccountViewItem
33{ 33{
34 34
35public: 35public:
36 POP3viewItem( POP3account *a, QListView *parent ); 36 POP3viewItem( POP3account *a, QListView *parent );
37 ~POP3viewItem(); 37 ~POP3viewItem();
38 virtual void refresh( QList<RecMail> &target ); 38 virtual void refresh( QList<RecMail> &target );
39 virtual RecBody fetchBody( const RecMail &mail ); 39 virtual RecBody fetchBody( const RecMail &mail );
40 AbstractMail *getWrapper(); 40 AbstractMail *getWrapper();
41private: 41private:
42 POP3account *account; 42 POP3account *account;
43 AbstractMail *wrapper; 43 AbstractMail *wrapper;
44 44
45}; 45};
46 46
47class POP3folderItem : public AccountViewItem 47class POP3folderItem : public AccountViewItem
48{ 48{
49 49
50public: 50public:
51 POP3folderItem( Folder *folder, POP3viewItem *parent , QListViewItem*after ); 51 POP3folderItem( Folder *folder, POP3viewItem *parent , QListViewItem*after );
52 ~POP3folderItem(); 52 ~POP3folderItem();
53 virtual void refresh(QList<RecMail>&); 53 virtual void refresh(QList<RecMail>&);
54 virtual RecBody fetchBody(const RecMail&); 54 virtual RecBody fetchBody(const RecMail&);
55 virtual QPopupMenu * getContextMenu(); 55 virtual QPopupMenu * getContextMenu();
56 virtual void contextMenuSelected(int); 56 virtual void contextMenuSelected(int);
57 57
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,93 +1,94 @@
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
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
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 {
58 QMessageBox::information( this, tr( "Problem" ), 59 QMessageBox::information( this, tr( "Problem" ),
59 tr( "<p>Please create an SMTP account first.</p>" ), 60 tr( "<p>Please create an SMTP account first.</p>" ),
60 tr( "Ok" ) ); 61 tr( "Ok" ) );
61 return; 62 return;
62 } 63 }
63 64
64 connect( smtpAccountBox, SIGNAL( activated( int ) ), SLOT( fillValues( int ) ) ); 65 connect( smtpAccountBox, SIGNAL( activated( int ) ), SLOT( fillValues( int ) ) );
65 connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); 66 connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) );
66 connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) ); 67 connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) );
67 connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) ); 68 connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) );
68 connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) ); 69 connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) );
69 connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) ); 70 connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) );
70 connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) ); 71 connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) );
71} 72}
72 73
73void ComposeMail::pickAddress( QLineEdit *line ) 74void ComposeMail::pickAddress( QLineEdit *line )
74{ 75{
75 QString names = AddressPicker::getNames(); 76 QString names = AddressPicker::getNames();
76 if ( line->text().isEmpty() ) { 77 if ( line->text().isEmpty() ) {
77 line->setText( names ); 78 line->setText( names );
78 } else if ( !names.isEmpty() ) { 79 } else if ( !names.isEmpty() ) {
79 line->setText( line->text() + ", " + names ); 80 line->setText( line->text() + ", " + names );
80 } 81 }
81} 82}
82 83
83 84
84void ComposeMail::setTo( const QString & to ) 85void ComposeMail::setTo( const QString & to )
85{ 86{
86/* QString toline; 87/* QString toline;
87 QStringList toEntry = to; 88 QStringList toEntry = to;
88 for ( QStringList::Iterator it = toEntry.begin(); it != toEntry.end(); ++it ) { 89 for ( QStringList::Iterator it = toEntry.begin(); it != toEntry.end(); ++it ) {
89 toline += (*it); 90 toline += (*it);
90 } 91 }
91 toLine->setText( toline ); 92 toLine->setText( toline );
92*/ 93*/
93toLine->setText( to ); 94toLine->setText( to );
@@ -146,94 +147,94 @@ void ComposeMail::fillValues( int current )
146 replyLine->setText( smtp->getReply() ); 147 replyLine->setText( smtp->getReply() );
147 } 148 }
148 sigMultiLine->setText( smtp->getSignature() ); 149 sigMultiLine->setText( smtp->getSignature() );
149#endif 150#endif
150} 151}
151 152
152void ComposeMail::slotAdjustColumns() 153void ComposeMail::slotAdjustColumns()
153{ 154{
154 int currPage = tabWidget->currentPageIndex(); 155 int currPage = tabWidget->currentPageIndex();
155 156
156 tabWidget->showPage( attachTab ); 157 tabWidget->showPage( attachTab );
157 attList->setColumnWidth( 0, attList->visibleWidth() - 80 ); 158 attList->setColumnWidth( 0, attList->visibleWidth() - 80 );
158 attList->setColumnWidth( 1, 80 ); 159 attList->setColumnWidth( 1, 80 );
159 160
160 tabWidget->setCurrentPage( currPage ); 161 tabWidget->setCurrentPage( currPage );
161} 162}
162 163
163void ComposeMail::addAttachment() 164void ComposeMail::addAttachment()
164{ 165{
165 DocLnk lnk = OFileDialog::getOpenFileName( 1, "/" ); 166 DocLnk lnk = OFileDialog::getOpenFileName( 1, "/" );
166 if ( !lnk.name().isEmpty() ) { 167 if ( !lnk.name().isEmpty() ) {
167 Attachment *att = new Attachment( lnk ); 168 Attachment *att = new Attachment( lnk );
168 (void) new AttachViewItem( attList, att ); 169 (void) new AttachViewItem( attList, att );
169 } 170 }
170} 171}
171 172
172void ComposeMail::removeAttachment() 173void ComposeMail::removeAttachment()
173{ 174{
174 if ( !attList->currentItem() ) { 175 if ( !attList->currentItem() ) {
175 QMessageBox::information( this, tr( "Error" ), 176 QMessageBox::information( this, tr( "Error" ),
176 tr( "<p>Please select a File.</p>" ), 177 tr( "<p>Please select a File.</p>" ),
177 tr( "Ok" ) ); 178 tr( "Ok" ) );
178 } else { 179 } else {
179 attList->takeItem( attList->currentItem() ); 180 attList->takeItem( attList->currentItem() );
180 } 181 }
181} 182}
182 183
183void ComposeMail::accept() 184void 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() );
207 mail->setReply( replyLine->text() ); 208 mail->setReply( replyLine->text() );
208 mail->setSubject( subjectLine->text() ); 209 mail->setSubject( subjectLine->text() );
209 QString txt = message->text(); 210 QString txt = message->text();
210 if ( !sigMultiLine->text().isEmpty() ) { 211 if ( !sigMultiLine->text().isEmpty() ) {
211 txt.append( "\n--\n" ); 212 txt.append( "\n--\n" );
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
228AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) 229AttachViewItem::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() );
237 setText( 1, QString::number( att->getSize() ) ); 238 setText( 1, QString::number( att->getSize() ) );
238} 239}
239 240
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,58 +1,59 @@
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
13class AddressPicker : public AddressPickerUI 14class AddressPicker : public AddressPickerUI
14{ 15{
15 Q_OBJECT 16 Q_OBJECT
16 17
17public: 18public:
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
21protected: 22protected:
22 QString selectedNames; 23 QString selectedNames;
23 void accept(); 24 void accept();
24 25
25}; 26};
26 27
27 28
28class ComposeMail : public ComposeMailUI 29class ComposeMail : public ComposeMailUI
29{ 30{
30 Q_OBJECT 31 Q_OBJECT
31 32
32public: 33public:
33 ComposeMail( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 ); 34 ComposeMail( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 );
34 35
35public slots: 36public slots:
36 void slotAdjustColumns(); 37 void slotAdjustColumns();
37 38
38 void setTo( const QString & to ); 39 void setTo( const QString & to );
39 void setSubject( const QString & subject ); 40 void setSubject( const QString & subject );
40 void setInReplyTo( const QString & messageId ); 41 void setInReplyTo( const QString & messageId );
41 void setMessage( const QString & text ); 42 void setMessage( const QString & text );
42 43
43protected slots: 44protected slots:
44 void accept(); 45 void accept();
45 46
46private slots: 47private slots:
47 void fillValues( int current ); 48 void fillValues( int current );
48 void pickAddress( QLineEdit *line ); 49 void pickAddress( QLineEdit *line );
49 void pickAddressTo(); 50 void pickAddressTo();
50 void pickAddressCC(); 51 void pickAddressCC();
51 void pickAddressBCC(); 52 void pickAddressBCC();
52 void pickAddressReply(); 53 void pickAddressReply();
53 void addAttachment(); 54 void addAttachment();
54 void removeAttachment(); 55 void removeAttachment();
55 56
56 57
57 58
58private: 59private:
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,61 +1,62 @@
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
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);
20 Account *getAccount() { return account; } 21 Account *getAccount() { return account; }
21 22
22private: 23private:
23 Account *account; 24 Account *account;
24 25
25}; 26};
26 27
27class EditAccounts : public EditAccountsUI 28class EditAccounts : public EditAccountsUI
28{ 29{
29 Q_OBJECT 30 Q_OBJECT
30 31
31public: 32public:
32 EditAccounts( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); 33 EditAccounts( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 );
33 34
34public slots: 35public slots:
35 void slotNewAccount( const QString &type ); 36 void slotNewAccount( const QString &type );
36 void slotEditAccount( Account *account ); 37 void slotEditAccount( Account *account );
37 void slotDeleteAccount( Account * account ); 38 void slotDeleteAccount( Account * account );
38 void slotAdjustColumns(); 39 void slotAdjustColumns();
39 40
40protected slots: 41protected slots:
41 void slotFillLists(); 42 void slotFillLists();
42 void slotNewMail(); 43 void slotNewMail();
43 void slotEditMail(); 44 void slotEditMail();
44 void slotDeleteMail(); 45 void slotDeleteMail();
45 void slotNewNews(); 46 void slotNewNews();
46 void slotEditNews(); 47 void slotEditNews();
47 void slotDeleteNews(); 48 void slotDeleteNews();
48 void accept(); 49 void accept();
49 50
50private: 51private:
51 Settings *settings; 52 Settings *settings;
52 53
53}; 54};
54 55
55class SelectMailType : public SelectMailTypeUI 56class SelectMailType : public SelectMailTypeUI
56{ 57{
57 Q_OBJECT 58 Q_OBJECT
58 59
59public: 60public:
60 SelectMailType( QString *selection = 0, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); 61 SelectMailType( QString *selection = 0, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 );
61 62
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
@@ -1,52 +1,52 @@
1CONFIG += qt warn_on debug quick-app 1CONFIG += qt warn_on debug quick-app
2 2
3HEADERS = defines.h \ 3HEADERS = defines.h \
4 editaccounts.h \ 4 editaccounts.h \
5 composemail.h \ 5 composemail.h \
6 accountview.h \ 6 accountview.h \
7 mainwindow.h \ 7 mainwindow.h \
8 viewmail.h \ 8 viewmail.h \
9 viewmailbase.h \ 9 viewmailbase.h \
10 opiemail.h \ 10 opiemail.h \
11 mailistviewitem.h \ 11 mailistviewitem.h \
12 settingsdialog.h \ 12 settingsdialog.h \
13 statuswidget.h \ 13 statuswidget.h \
14 newmaildir.h 14 newmaildir.h
15 15
16SOURCES = main.cpp \ 16SOURCES = main.cpp \
17 opiemail.cpp \ 17 opiemail.cpp \
18 mainwindow.cpp \ 18 mainwindow.cpp \
19 accountview.cpp \ 19 accountview.cpp \
20 composemail.cpp \ 20 composemail.cpp \
21 addresspicker.cpp \ 21 addresspicker.cpp \
22 editaccounts.cpp \ 22 editaccounts.cpp \
23 viewmail.cpp \ 23 viewmail.cpp \
24 viewmailbase.cpp \ 24 viewmailbase.cpp \
25 settingsdialog.cpp \ 25 settingsdialog.cpp \
26 statuswidget.cpp \ 26 statuswidget.cpp \
27 newmaildir.cpp 27 newmaildir.cpp
28 28
29INTERFACES = editaccountsui.ui \ 29INTERFACES = editaccountsui.ui \
30 selectmailtypeui.ui \ 30 selectmailtypeui.ui \
31 imapconfigui.ui \ 31 imapconfigui.ui \
32 pop3configui.ui \ 32 pop3configui.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
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,21 +1,22 @@
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(){}
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
17protected: 18protected:
18 RecMail mail_data; 19 RecMail mail_data;
19}; 20};
20 21
21#endif 22#endif
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,63 +1,64 @@
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
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{
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 );
28 mailMenu = new QPopupMenu( menuBar ); 29 mailMenu = new QPopupMenu( menuBar );
29 menuBar->insertItem( tr( "Mail" ), mailMenu ); 30 menuBar->insertItem( tr( "Mail" ), mailMenu );
30 settingsMenu = new QPopupMenu( menuBar ); 31 settingsMenu = new QPopupMenu( menuBar );
31 menuBar->insertItem( tr( "Settings" ), settingsMenu ); 32 menuBar->insertItem( tr( "Settings" ), settingsMenu );
32 33
33 addToolBar( toolBar ); 34 addToolBar( toolBar );
34 toolBar->setHorizontalStretchable( true ); 35 toolBar->setHorizontalStretchable( true );
35 36
36 QLabel *spacer = new QLabel( toolBar ); 37 QLabel *spacer = new QLabel( toolBar );
37 spacer->setBackgroundMode( QWidget::PaletteButton ); 38 spacer->setBackgroundMode( QWidget::PaletteButton );
38 toolBar->setStretchableWidget( spacer ); 39 toolBar->setStretchableWidget( spacer );
39 40
40 composeMail = new QAction( tr( "Compose new mail" ), ICON_COMPOSEMAIL, 41 composeMail = new QAction( tr( "Compose new mail" ), ICON_COMPOSEMAIL,
41 0, 0, this ); 42 0, 0, this );
42 composeMail->addTo( toolBar ); 43 composeMail->addTo( toolBar );
43 composeMail->addTo( mailMenu ); 44 composeMail->addTo( mailMenu );
44 45
45 sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED, 46 sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED,
46 0, 0, this ); 47 0, 0, this );
47 sendQueued->addTo( toolBar ); 48 sendQueued->addTo( toolBar );
48 sendQueued->addTo( mailMenu ); 49 sendQueued->addTo( mailMenu );
49 50
50 /* 51 /*
51 syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC, 52 syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC,
52 0, 0, this ); 53 0, 0, this );
53 syncFolders->addTo( toolBar ); 54 syncFolders->addTo( toolBar );
54 syncFolders->addTo( mailMenu ); 55 syncFolders->addTo( mailMenu );
55 */ 56 */
56 57
57 showFolders = new QAction( tr( "Show/Hide folders" ), ICON_SHOWFOLDERS, 58 showFolders = new QAction( tr( "Show/Hide folders" ), ICON_SHOWFOLDERS,
58 0, 0, this, 0, true ); 59 0, 0, this, 0, true );
59 showFolders->addTo( toolBar ); 60 showFolders->addTo( toolBar );
60 showFolders->addTo( mailMenu ); 61 showFolders->addTo( mailMenu );
61 showFolders->setOn( true ); 62 showFolders->setOn( true );
62 connect(showFolders, SIGNAL( toggled( bool ) ), 63 connect(showFolders, SIGNAL( toggled( bool ) ),
63 SLOT( slotShowFolders( bool ) ) ); 64 SLOT( slotShowFolders( bool ) ) );
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,54 +1,54 @@
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 )
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() ) );
19 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); 19 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) );
20// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); 20// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) );
21 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); 21 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) );
22 // Added by Stefan Eilers to allow starting by addressbook.. 22 // Added by Stefan Eilers to allow starting by addressbook..
23 // copied from old mail2 23 // copied from old mail2
24#if !defined(QT_NO_COP) 24#if !defined(QT_NO_COP)
25 connect( qApp, SIGNAL( appMessage( const QCString&, const QByteArray& ) ), 25 connect( qApp, SIGNAL( appMessage( const QCString&, const QByteArray& ) ),
26 this, SLOT( appMessage( const QCString&, const QByteArray& ) ) ); 26 this, SLOT( appMessage( const QCString&, const QByteArray& ) ) );
27#endif 27#endif
28 28
29 29
30 30
31} 31}
32 32
33void OpieMail::appMessage(const QCString &msg, const QByteArray &data) 33void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
34{ 34{
35 // copied from old mail2 35 // copied from old mail2
36 if (msg == "writeMail(QString,QString)") { 36 if (msg == "writeMail(QString,QString)") {
37 QDataStream stream(data,IO_ReadOnly); 37 QDataStream stream(data,IO_ReadOnly);
38 QString name, email; 38 QString name, email;
39 stream >> name >> email; 39 stream >> name >> email;
40 // removing the whitespaces at beginning and end is needed! 40 // removing the whitespaces at beginning and end is needed!
41 slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace()); 41 slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace());
42 } else if (msg == "newMail()") { 42 } else if (msg == "newMail()") {
43 slotComposeMail(); 43 slotComposeMail();
44 } 44 }
45} 45}
46 46
47void OpieMail::slotwriteMail(const QString&name,const QString&email) 47void OpieMail::slotwriteMail(const QString&name,const QString&email)
48{ 48{
49 ComposeMail compose( settings, this, 0 , true ); 49 ComposeMail compose( settings, this, 0 , true );
50 if (!email.isEmpty()) { 50 if (!email.isEmpty()) {
51 if (!name.isEmpty()) { 51 if (!name.isEmpty()) {
52 compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">"); 52 compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">");
53 } else { 53 } else {
54 compose.setTo(email); 54 compose.setTo(email);
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,29 +1,30 @@
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:
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
15public slots: 16public 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();
18 virtual void appMessage(const QCString &msg, const QByteArray &data); 19 virtual void appMessage(const QCString &msg, const QByteArray &data);
19protected slots: 20protected slots:
20 virtual void slotSendQueued(); 21 virtual void slotSendQueued();
21 virtual void slotSearchMails(); 22 virtual void slotSearchMails();
22 virtual void slotEditSettings(); 23 virtual void slotEditSettings();
23 virtual void slotEditAccounts(); 24 virtual void slotEditAccounts();
24private: 25private:
25 Settings *settings; 26 Settings *settings;
26 27
27}; 28};
28 29
29#endif 30#endif
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
@@ -1,67 +1,67 @@
1#include <qtextbrowser.h> 1#include <qtextbrowser.h>
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
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;
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
32AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, 32AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file,
33 const QString&fsize,int num,const QValueList<int>&path) 33 const QString&fsize,int num,const QValueList<int>&path)
34 : QListViewItem(parent,after),_partNum(num) 34 : QListViewItem(parent,after),_partNum(num)
35{ 35{
36 _path=path; 36 _path=path;
37 setText(0, mime); 37 setText(0, mime);
38 setText(1, desc); 38 setText(1, desc);
39 setText(2, file); 39 setText(2, file);
40 setText(3, fsize); 40 setText(3, fsize);
41} 41}
42 42
43bool AttachItem::isParentof(const QValueList<int>&path) 43bool AttachItem::isParentof(const QValueList<int>&path)
44{ 44{
45 /* if not set, then no parent */ 45 /* if not set, then no parent */
46 if (path.count()==0||_path.count()==0) return false; 46 if (path.count()==0||_path.count()==0) return false;
47 /* the parent must have one digit less then a child */ 47 /* the parent must have one digit less then a child */
48 if (path.count()!=_path.count()+1) return false; 48 if (path.count()!=_path.count()+1) return false;
49 for (unsigned int i=0; i < _path.count();++i) { 49 for (unsigned int i=0; i < _path.count();++i) {
50 if (_path[i]!=path[i]) return false; 50 if (_path[i]!=path[i]) return false;
51 } 51 }
52 return true; 52 return true;
53} 53}
54 54
55AttachItem* ViewMail::searchParent(const QValueList<int>&path) 55AttachItem* ViewMail::searchParent(const QValueList<int>&path)
56{ 56{
57 QListViewItemIterator it( attachments ); 57 QListViewItemIterator it( attachments );
58 for ( ; it.current(); ++it ) { 58 for ( ; it.current(); ++it ) {
59 AttachItem*ati = (AttachItem*)it.current(); 59 AttachItem*ati = (AttachItem*)it.current();
60 if (ati->isParentof(path)) return ati; 60 if (ati->isParentof(path)) return ati;
61 } 61 }
62 return 0; 62 return 0;
63} 63}
64 64
65AttachItem* ViewMail::lastChild(AttachItem*parent) 65AttachItem* ViewMail::lastChild(AttachItem*parent)
66{ 66{
67 if (!parent) return 0; 67 if (!parent) return 0;
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,58 +1,59 @@
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
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);
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
22private: 23private:
23 int _partNum; 24 int _partNum;
24 /* needed for a better display of attachments */ 25 /* needed for a better display of attachments */
25 QValueList<int> _path; 26 QValueList<int> _path;
26}; 27};
27 28
28class ViewMail : public ViewMailBase 29class ViewMail : public ViewMailBase
29{ 30{
30 Q_OBJECT 31 Q_OBJECT
31 32
32public: 33public:
33 ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = Qt::WType_Modal); 34 ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = Qt::WType_Modal);
34 ~ViewMail(); 35 ~ViewMail();
35 36
36 void hide(); 37 void hide();
37 void exec(); 38 void exec();
38 void setMail( RecMail mail ); 39 void setMail( RecMail mail );
39 void setBody( RecBody body ); 40 void setBody( RecBody body );
40 bool deleted; 41 bool deleted;
41 42
42protected: 43protected:
43 QString deHtml(const QString &string); 44 QString deHtml(const QString &string);
44 AttachItem* searchParent(const QValueList<int>&path); 45 AttachItem* searchParent(const QValueList<int>&path);
45 AttachItem* lastChild(AttachItem*parent); 46 AttachItem* lastChild(AttachItem*parent);
46 47
47protected slots: 48protected slots:
48 void slotReply(); 49 void slotReply();
49 void slotForward(); 50 void slotForward();
50 void setText(); 51 void setText();
51 void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); 52 void slotItemClicked( QListViewItem * item , const QPoint & point, int c );
52 void slotDeleteMail( ); 53 void slotDeleteMail( );
53 void slotShowHtml( bool ); 54 void slotShowHtml( bool );
54 55
55private: 56private:
56 void readConfig(); 57 void readConfig();
57 58
58 bool _inLoop; 59 bool _inLoop;