summaryrefslogtreecommitdiff
authorchicken <chicken>2004-03-02 16:24:30 (UTC)
committer chicken <chicken>2004-03-02 16:24:30 (UTC)
commit10d627d55eaab6cda26b03879f1b0fe31d1b273b (patch) (unidiff)
treeeb04a35ba5e359eb808bf0bd85b1be51dcb4b0a9
parent49bee7ab52b819a07e9b6de4576eda467d632a66 (diff)
downloadopie-10d627d55eaab6cda26b03879f1b0fe31d1b273b.zip
opie-10d627d55eaab6cda26b03879f1b0fe31d1b273b.tar.gz
opie-10d627d55eaab6cda26b03879f1b0fe31d1b273b.tar.bz2
fix includes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/accountitem.cpp1
-rw-r--r--noncore/net/mail/addresspicker.cpp2
-rw-r--r--noncore/net/mail/libmailwrapper/abstractmail.cpp2
-rw-r--r--noncore/net/mail/libmailwrapper/sendmailprogress.cpp1
-rw-r--r--noncore/net/mail/libmailwrapper/smtpwrapper.cpp2
-rw-r--r--noncore/net/mail/libmailwrapper/statusmail.cpp1
-rw-r--r--noncore/net/mail/mainwindow.cpp2
-rw-r--r--noncore/net/mail/newmaildir.cpp2
-rw-r--r--noncore/net/mail/opiemail.cpp4
-rw-r--r--noncore/net/mail/selectsmtp.cpp7
-rw-r--r--noncore/net/mail/viewmail.cpp3
-rw-r--r--noncore/net/mail/viewmailbase.cpp1
-rw-r--r--noncore/net/opietooth/applet/bluezapplet.cpp3
-rw-r--r--noncore/net/opietooth/blue-pin/main.cc1
-rw-r--r--noncore/net/opietooth/blue-pin/pindlg.cc1
-rw-r--r--noncore/net/opietooth/manager/bticonloader.cpp1
-rw-r--r--noncore/net/opietooth/manager/btserviceitem.cpp1
-rw-r--r--noncore/net/opietooth/manager/hciconfwrapper.cpp1
-rw-r--r--noncore/net/opietooth/manager/rfcommassigndialogitem.cpp1
-rw-r--r--noncore/net/wellenreiter/gui/protolistview.cpp4
-rw-r--r--noncore/net/wellenreiter/gui/resource.cpp1
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp1
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiterbase.cpp9
23 files changed, 1 insertions, 51 deletions
diff --git a/noncore/net/mail/accountitem.cpp b/noncore/net/mail/accountitem.cpp
index 32a96ff..e925d8d 100644
--- a/noncore/net/mail/accountitem.cpp
+++ b/noncore/net/mail/accountitem.cpp
@@ -1,52 +1,51 @@
1 1
2#include "accountitem.h" 2#include "accountitem.h"
3#include "accountview.h" 3#include "accountview.h"
4#include "selectstore.h"
5#include "newmaildir.h" 4#include "newmaildir.h"
6#include "defines.h" 5#include "defines.h"
7 6
8/* OPIE */ 7/* OPIE */
9#include <libmailwrapper/mailtypes.h> 8#include <libmailwrapper/mailtypes.h>
10#include <libmailwrapper/abstractmail.h> 9#include <libmailwrapper/abstractmail.h>
11#include <libmailwrapper/mailwrapper.h> 10#include <libmailwrapper/mailwrapper.h>
12#include <qpe/qpeapplication.h> 11#include <qpe/qpeapplication.h>
13 12
14/* QT */ 13/* QT */
15#include <qpopupmenu.h> 14#include <qpopupmenu.h>
16#include <qmessagebox.h> 15#include <qmessagebox.h>
17 16
18#define SETPIX(x) if (!account->getOffline()) {setPixmap( 0,x);} else {setPixmap( 0, PIXMAP_OFFLINE );} 17#define SETPIX(x) if (!account->getOffline()) {setPixmap( 0,x);} else {setPixmap( 0, PIXMAP_OFFLINE );}
19/** 18/**
20 * POP3 Account stuff 19 * POP3 Account stuff
21 */ 20 */
22POP3viewItem::POP3viewItem( POP3account *a, AccountView *parent ) 21POP3viewItem::POP3viewItem( POP3account *a, AccountView *parent )
23 : AccountViewItem( parent ) 22 : AccountViewItem( parent )
24{ 23{
25 account = a; 24 account = a;
26 wrapper = AbstractMail::getWrapper( account ); 25 wrapper = AbstractMail::getWrapper( account );
27 SETPIX(PIXMAP_POP3FOLDER); 26 SETPIX(PIXMAP_POP3FOLDER);
28#if 0 27#if 0
29 if (!account->getOffline()) 28 if (!account->getOffline())
30 { 29 {
31 setPixmap( 0, ); 30 setPixmap( 0, );
32 } 31 }
33 else 32 else
34 { 33 {
35 setPixmap( 0, PIXMAP_OFFLINE ); 34 setPixmap( 0, PIXMAP_OFFLINE );
36 } 35 }
37#endif 36#endif
38 setText( 0, account->getAccountName() ); 37 setText( 0, account->getAccountName() );
39 setOpen( true ); 38 setOpen( true );
40} 39}
41 40
42POP3viewItem::~POP3viewItem() 41POP3viewItem::~POP3viewItem()
43{ 42{
44 delete wrapper; 43 delete wrapper;
45} 44}
46 45
47AbstractMail *POP3viewItem::getWrapper() 46AbstractMail *POP3viewItem::getWrapper()
48{ 47{
49 return wrapper; 48 return wrapper;
50} 49}
51 50
52void POP3viewItem::refresh( QList<RecMail> & ) 51void POP3viewItem::refresh( QList<RecMail> & )
diff --git a/noncore/net/mail/addresspicker.cpp b/noncore/net/mail/addresspicker.cpp
index 35f9cd4..50c82e5 100644
--- a/noncore/net/mail/addresspicker.cpp
+++ b/noncore/net/mail/addresspicker.cpp
@@ -1,63 +1,61 @@
1 1
2#include "composemail.h" 2#include "composemail.h"
3 3
4/* OPIE */ 4/* OPIE */
5#include <opie2/ocontactaccess.h> 5#include <opie2/ocontactaccess.h>
6#include <opie2/opimcontact.h> 6#include <opie2/opimcontact.h>
7#include <qpe/resource.h> 7#include <qpe/resource.h>
8#include <qpe/qpeapplication.h> 8#include <qpe/qpeapplication.h>
9 9
10/* QT */ 10/* QT */
11#include <qpushbutton.h> 11#include <qpushbutton.h>
12#include <qmessagebox.h> 12#include <qmessagebox.h>
13#include <qtextstream.h>
14#include <qlistbox.h> 13#include <qlistbox.h>
15#include <qfile.h>
16 14
17/* STD */ 15/* STD */
18#include <stdlib.h> 16#include <stdlib.h>
19 17
20AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFlags flags ) 18AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFlags flags )
21 : AddressPickerUI( parent, name, modal, flags ) 19 : AddressPickerUI( parent, name, modal, flags )
22{ 20{
23 okButton->setIconSet( Resource::loadPixmap( "enter" ) ); 21 okButton->setIconSet( Resource::loadPixmap( "enter" ) );
24 cancelButton->setIconSet( Resource::loadPixmap( "editdelete" ) ); 22 cancelButton->setIconSet( Resource::loadPixmap( "editdelete" ) );
25 23
26 connect(okButton, SIGNAL(clicked()), SLOT(accept())); 24 connect(okButton, SIGNAL(clicked()), SLOT(accept()));
27 connect(cancelButton, SIGNAL(clicked()), SLOT(close())); 25 connect(cancelButton, SIGNAL(clicked()), SLOT(close()));
28 Opie::OPimContactAccess::List::Iterator it; 26 Opie::OPimContactAccess::List::Iterator it;
29 27
30 QString lineEmail, lineName, contactLine; 28 QString lineEmail, lineName, contactLine;
31 /* what name has to set here???? */ 29 /* what name has to set here???? */
32 Opie::OPimContactAccess m_contactdb("opiemail"); 30 Opie::OPimContactAccess m_contactdb("opiemail");
33 31
34 QStringList mails; 32 QStringList mails;
35 QString pre,suf; 33 QString pre,suf;
36 Opie::OPimContactAccess::List m_list = m_contactdb.sorted( true, 0, 0, 0 ); 34 Opie::OPimContactAccess::List m_list = m_contactdb.sorted( true, 0, 0, 0 );
37 for ( it = m_list.begin(); it != m_list.end(); ++it ) 35 for ( it = m_list.begin(); it != m_list.end(); ++it )
38 { 36 {
39 if ((*it).defaultEmail().length()!=0) 37 if ((*it).defaultEmail().length()!=0)
40 { 38 {
41 mails = (*it).emailList(); 39 mails = (*it).emailList();
42 if ((*it).fileAs().length()>0) 40 if ((*it).fileAs().length()>0)
43 { 41 {
44 pre = "\""+(*it).firstName()+" "+(*it).lastName()+"\" <"; 42 pre = "\""+(*it).firstName()+" "+(*it).lastName()+"\" <";
45 suf = ">"; 43 suf = ">";
46 } 44 }
47 else 45 else
48 { 46 {
49 pre = ""; 47 pre = "";
50 suf = ""; 48 suf = "";
51 } 49 }
52 QStringList::ConstIterator sit = mails.begin(); 50 QStringList::ConstIterator sit = mails.begin();
53 for (;sit!=mails.end();++sit) 51 for (;sit!=mails.end();++sit)
54 { 52 {
55 contactLine=pre+(*sit)+suf; 53 contactLine=pre+(*sit)+suf;
56 addressList->insertItem(contactLine); 54 addressList->insertItem(contactLine);
57 } 55 }
58 } 56 }
59 } 57 }
60 if ( addressList->count() <= 0 ) 58 if ( addressList->count() <= 0 )
61 { 59 {
62#if 0 60#if 0
63 // makes this realy sense?? 61 // makes this realy sense??
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.cpp b/noncore/net/mail/libmailwrapper/abstractmail.cpp
index 741a8e1..9960f88 100644
--- a/noncore/net/mail/libmailwrapper/abstractmail.cpp
+++ b/noncore/net/mail/libmailwrapper/abstractmail.cpp
@@ -1,57 +1,55 @@
1#include "abstractmail.h" 1#include "abstractmail.h"
2#include "imapwrapper.h" 2#include "imapwrapper.h"
3#include "pop3wrapper.h" 3#include "pop3wrapper.h"
4#include "nntpwrapper.h" 4#include "nntpwrapper.h"
5#include "mhwrapper.h" 5#include "mhwrapper.h"
6#include "mboxwrapper.h"
7#include "mailtypes.h" 6#include "mailtypes.h"
8 7
9#include <qstring.h>
10#include <qfile.h> 8#include <qfile.h>
11#include <qtextstream.h> 9#include <qtextstream.h>
12#include <stdlib.h> 10#include <stdlib.h>
13#include <libetpan/mailmime_content.h> 11#include <libetpan/mailmime_content.h>
14#include <libetpan/mailmime.h> 12#include <libetpan/mailmime.h>
15 13
16AbstractMail* AbstractMail::getWrapper(IMAPaccount *a) 14AbstractMail* AbstractMail::getWrapper(IMAPaccount *a)
17{ 15{
18 return new IMAPwrapper(a); 16 return new IMAPwrapper(a);
19} 17}
20 18
21AbstractMail* AbstractMail::getWrapper(POP3account *a) 19AbstractMail* AbstractMail::getWrapper(POP3account *a)
22{ 20{
23 return new POP3wrapper(a); 21 return new POP3wrapper(a);
24} 22}
25 23
26AbstractMail* AbstractMail::getWrapper(NNTPaccount *a) 24AbstractMail* AbstractMail::getWrapper(NNTPaccount *a)
27{ 25{
28 return new NNTPwrapper(a); 26 return new NNTPwrapper(a);
29} 27}
30 28
31AbstractMail* AbstractMail::getWrapper(const QString&a,const QString&name) 29AbstractMail* AbstractMail::getWrapper(const QString&a,const QString&name)
32{ 30{
33 return new MHwrapper(a,name); 31 return new MHwrapper(a,name);
34} 32}
35 33
36encodedString* AbstractMail::decode_String(const encodedString*text,const QString&enc) 34encodedString* AbstractMail::decode_String(const encodedString*text,const QString&enc)
37{ 35{
38 qDebug("Decode string start"); 36 qDebug("Decode string start");
39 char*result_text; 37 char*result_text;
40 size_t index = 0; 38 size_t index = 0;
41 /* reset for recursive use! */ 39 /* reset for recursive use! */
42 size_t target_length = 0; 40 size_t target_length = 0;
43 result_text = 0; 41 result_text = 0;
44 int mimetype = MAILMIME_MECHANISM_7BIT; 42 int mimetype = MAILMIME_MECHANISM_7BIT;
45 if (enc.lower()=="quoted-printable") { 43 if (enc.lower()=="quoted-printable") {
46 mimetype = MAILMIME_MECHANISM_QUOTED_PRINTABLE; 44 mimetype = MAILMIME_MECHANISM_QUOTED_PRINTABLE;
47 } else if (enc.lower()=="base64") { 45 } else if (enc.lower()=="base64") {
48 mimetype = MAILMIME_MECHANISM_BASE64; 46 mimetype = MAILMIME_MECHANISM_BASE64;
49 } else if (enc.lower()=="8bit") { 47 } else if (enc.lower()=="8bit") {
50 mimetype = MAILMIME_MECHANISM_8BIT; 48 mimetype = MAILMIME_MECHANISM_8BIT;
51 } else if (enc.lower()=="binary") { 49 } else if (enc.lower()=="binary") {
52 mimetype = MAILMIME_MECHANISM_BINARY; 50 mimetype = MAILMIME_MECHANISM_BINARY;
53 } 51 }
54 52
55 int err = mailmime_part_parse(text->Content(),text->Length(),&index,mimetype, 53 int err = mailmime_part_parse(text->Content(),text->Length(),&index,mimetype,
56 &result_text,&target_length); 54 &result_text,&target_length);
57 55
diff --git a/noncore/net/mail/libmailwrapper/sendmailprogress.cpp b/noncore/net/mail/libmailwrapper/sendmailprogress.cpp
index ef22750..dc0c75a 100644
--- a/noncore/net/mail/libmailwrapper/sendmailprogress.cpp
+++ b/noncore/net/mail/libmailwrapper/sendmailprogress.cpp
@@ -1,48 +1,47 @@
1#include "sendmailprogress.h" 1#include "sendmailprogress.h"
2#include <qprogressbar.h> 2#include <qprogressbar.h>
3#include <qlabel.h> 3#include <qlabel.h>
4#include <qstring.h>
5 4
6progressMailSend::progressMailSend(QWidget*parent, const char * name) 5progressMailSend::progressMailSend(QWidget*parent, const char * name)
7 :progressMailSendUI(parent,name,true),m_current_mail(0),m_current_single(0),m_max_mail(0),m_max_single(0) 6 :progressMailSendUI(parent,name,true),m_current_mail(0),m_current_single(0),m_max_mail(0),m_max_single(0)
8{ 7{
9} 8}
10 9
11progressMailSend::~progressMailSend() 10progressMailSend::~progressMailSend()
12{ 11{
13} 12}
14 13
15void progressMailSend::setMaxMails(unsigned int aMaxMails) 14void progressMailSend::setMaxMails(unsigned int aMaxMails)
16{ 15{
17 m_max_mail = aMaxMails; 16 m_max_mail = aMaxMails;
18 allMailProgressBar->setTotalSteps(aMaxMails); 17 allMailProgressBar->setTotalSteps(aMaxMails);
19 setMails(); 18 setMails();
20} 19}
21 20
22void progressMailSend::setCurrentMails(unsigned int aCurrent) 21void progressMailSend::setCurrentMails(unsigned int aCurrent)
23{ 22{
24 m_current_mail = aCurrent; 23 m_current_mail = aCurrent;
25 allMailProgressBar->setProgress(aCurrent); 24 allMailProgressBar->setProgress(aCurrent);
26 setMails(); 25 setMails();
27} 26}
28 27
29void progressMailSend::setSingleMail(unsigned int aCurrent,unsigned int aMax) 28void progressMailSend::setSingleMail(unsigned int aCurrent,unsigned int aMax)
30{ 29{
31 m_current_single = aCurrent; 30 m_current_single = aCurrent;
32 m_max_single = aMax; 31 m_max_single = aMax;
33 setSingle(); 32 setSingle();
34} 33}
35 34
36void progressMailSend::setSingle() 35void progressMailSend::setSingle()
37{ 36{
38 QString text = QString(tr("%1 of %2 bytes send")).arg(m_current_single).arg(m_max_single); 37 QString text = QString(tr("%1 of %2 bytes send")).arg(m_current_single).arg(m_max_single);
39 singleMailLabel->setText(text); 38 singleMailLabel->setText(text);
40 singleMailProgressBar->setTotalSteps(m_max_single); 39 singleMailProgressBar->setTotalSteps(m_max_single);
41 singleMailProgressBar->setProgress(m_current_single); 40 singleMailProgressBar->setProgress(m_current_single);
42} 41}
43 42
44void progressMailSend::setMails() 43void progressMailSend::setMails()
45{ 44{
46 QString text = QString(tr("Sending mail %1 of %2")).arg(m_current_mail+1).arg(m_max_mail); 45 QString text = QString(tr("Sending mail %1 of %2")).arg(m_current_mail+1).arg(m_max_mail);
47 allMailLabel->setText(text); 46 allMailLabel->setText(text);
48} 47}
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp
index d75d52a..d7a005e 100644
--- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp
@@ -1,57 +1,55 @@
1#include <stdlib.h> 1#include <stdlib.h>
2#include <sys/stat.h> 2#include <sys/stat.h>
3#include <sys/types.h> 3#include <sys/types.h>
4#include <unistd.h> 4#include <unistd.h>
5#include <fcntl.h> 5#include <fcntl.h>
6#include <string.h> 6#include <string.h>
7#include <qdir.h>
8#include <qt.h> 7#include <qt.h>
9#include <qmessagebox.h>
10 8
11#include <qpe/config.h> 9#include <qpe/config.h>
12#include <qpe/qcopenvelope_qws.h> 10#include <qpe/qcopenvelope_qws.h>
13 11
14#include <libetpan/libetpan.h> 12#include <libetpan/libetpan.h>
15 13
16#include "smtpwrapper.h" 14#include "smtpwrapper.h"
17#include "mailwrapper.h" 15#include "mailwrapper.h"
18#include "abstractmail.h" 16#include "abstractmail.h"
19#include "logindialog.h" 17#include "logindialog.h"
20#include "mailtypes.h" 18#include "mailtypes.h"
21#include "sendmailprogress.h" 19#include "sendmailprogress.h"
22 20
23const char* SMTPwrapper::USER_AGENT="OpieMail v0.4"; 21const char* SMTPwrapper::USER_AGENT="OpieMail v0.4";
24 22
25progressMailSend*SMTPwrapper::sendProgress = 0; 23progressMailSend*SMTPwrapper::sendProgress = 0;
26 24
27SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp ) 25SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp )
28 : QObject() 26 : QObject()
29{ 27{
30 m_SmtpAccount = aSmtp; 28 m_SmtpAccount = aSmtp;
31 Config cfg( "mail" ); 29 Config cfg( "mail" );
32 cfg.setGroup( "Status" ); 30 cfg.setGroup( "Status" );
33 m_queuedMail = cfg.readNumEntry( "outgoing", 0 ); 31 m_queuedMail = cfg.readNumEntry( "outgoing", 0 );
34 emit queuedMails( m_queuedMail ); 32 emit queuedMails( m_queuedMail );
35 connect( this, SIGNAL( queuedMails(int) ), this, SLOT( emitQCop(int) ) ); 33 connect( this, SIGNAL( queuedMails(int) ), this, SLOT( emitQCop(int) ) );
36 m_smtp = 0; 34 m_smtp = 0;
37} 35}
38 36
39SMTPwrapper::~SMTPwrapper() 37SMTPwrapper::~SMTPwrapper()
40{ 38{
41 disc_server(); 39 disc_server();
42} 40}
43 41
44void SMTPwrapper::emitQCop( int queued ) { 42void SMTPwrapper::emitQCop( int queued ) {
45 QCopEnvelope env( "QPE/Pim", "outgoingMails(int)" ); 43 QCopEnvelope env( "QPE/Pim", "outgoingMails(int)" );
46 env << queued; 44 env << queued;
47} 45}
48 46
49QString SMTPwrapper::mailsmtpError( int errnum ) { 47QString SMTPwrapper::mailsmtpError( int errnum ) {
50 switch ( errnum ) { 48 switch ( errnum ) {
51 case MAILSMTP_NO_ERROR: 49 case MAILSMTP_NO_ERROR:
52 return tr( "No error" ); 50 return tr( "No error" );
53 case MAILSMTP_ERROR_UNEXPECTED_CODE: 51 case MAILSMTP_ERROR_UNEXPECTED_CODE:
54 return tr( "Unexpected error code" ); 52 return tr( "Unexpected error code" );
55 case MAILSMTP_ERROR_SERVICE_NOT_AVAILABLE: 53 case MAILSMTP_ERROR_SERVICE_NOT_AVAILABLE:
56 return tr( "Service not available" ); 54 return tr( "Service not available" );
57 case MAILSMTP_ERROR_STREAM: 55 case MAILSMTP_ERROR_STREAM:
diff --git a/noncore/net/mail/libmailwrapper/statusmail.cpp b/noncore/net/mail/libmailwrapper/statusmail.cpp
index 172c58f..4134e79 100644
--- a/noncore/net/mail/libmailwrapper/statusmail.cpp
+++ b/noncore/net/mail/libmailwrapper/statusmail.cpp
@@ -1,50 +1,49 @@
1#include "statusmail.h" 1#include "statusmail.h"
2#include <qlist.h>
3 2
4StatusMail::StatusMail(QList<Account>&list) 3StatusMail::StatusMail(QList<Account>&list)
5{ 4{
6 currentImapStat.message_count=0; 5 currentImapStat.message_count=0;
7 currentImapStat.message_unseen=0; 6 currentImapStat.message_unseen=0;
8 currentImapStat.message_recent=0; 7 currentImapStat.message_recent=0;
9 lastPop3Stat = currentImapStat; 8 lastPop3Stat = currentImapStat;
10 currentPop3Stat = currentImapStat; 9 currentPop3Stat = currentImapStat;
11 connectionList.setAutoDelete(true); 10 connectionList.setAutoDelete(true);
12 connectionList.clear(); 11 connectionList.clear();
13 initAccounts(list); 12 initAccounts(list);
14} 13}
15 14
16StatusMail::~StatusMail() 15StatusMail::~StatusMail()
17{ 16{
18} 17}
19 18
20void StatusMail::initAccounts(QList<Account>&accounts) 19void StatusMail::initAccounts(QList<Account>&accounts)
21{ 20{
22 21
23 Account *it; 22 Account *it;
24 folderStat currentStat; 23 folderStat currentStat;
25 AbstractMail * current = 0; 24 AbstractMail * current = 0;
26 currentPop3Stat.message_count=0; 25 currentPop3Stat.message_count=0;
27 currentPop3Stat.message_recent=0; 26 currentPop3Stat.message_recent=0;
28 currentPop3Stat.message_unseen=0; 27 currentPop3Stat.message_unseen=0;
29 for ( it = accounts.first(); it; it = accounts.next() ) { 28 for ( it = accounts.first(); it; it = accounts.next() ) {
30 if ( it->getType().compare( "IMAP" ) == 0 && !it->getOffline() ) { 29 if ( it->getType().compare( "IMAP" ) == 0 && !it->getOffline() ) {
31 IMAPaccount*ima = static_cast<IMAPaccount *>(it); 30 IMAPaccount*ima = static_cast<IMAPaccount *>(it);
32 current = AbstractMail::getWrapper(ima); 31 current = AbstractMail::getWrapper(ima);
33 connectionList.append(current); 32 connectionList.append(current);
34 current->statusFolder(currentStat); 33 current->statusFolder(currentStat);
35 currentImapStat.message_count+=currentStat.message_unseen; 34 currentImapStat.message_count+=currentStat.message_unseen;
36 currentImapStat.message_count+=currentStat.message_recent; 35 currentImapStat.message_count+=currentStat.message_recent;
37 currentImapStat.message_count+=currentStat.message_count; 36 currentImapStat.message_count+=currentStat.message_count;
38 } else if ( it->getType().compare( "POP3" ) == 0 && !it->getOffline() ) { 37 } else if ( it->getType().compare( "POP3" ) == 0 && !it->getOffline() ) {
39 POP3account *pop3 = static_cast<POP3account *>(it); 38 POP3account *pop3 = static_cast<POP3account *>(it);
40 current = AbstractMail::getWrapper(pop3); 39 current = AbstractMail::getWrapper(pop3);
41 connectionList.append(current); 40 connectionList.append(current);
42 current->statusFolder(currentStat); 41 current->statusFolder(currentStat);
43 currentPop3Stat.message_count+=currentStat.message_count; 42 currentPop3Stat.message_count+=currentStat.message_count;
44 } 43 }
45 current->logout(); 44 current->logout();
46 } 45 }
47 qDebug("Pop3 init count: %i",currentPop3Stat.message_count); 46 qDebug("Pop3 init count: %i",currentPop3Stat.message_count);
48 currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0; 47 currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0;
49 lastPop3Stat.message_unseen = currentPop3Stat.message_unseen; 48 lastPop3Stat.message_unseen = currentPop3Stat.message_unseen;
50 lastPop3Stat.message_recent = currentPop3Stat.message_recent; 49 lastPop3Stat.message_recent = currentPop3Stat.message_recent;
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp
index 3f34fe7..bcf0866 100644
--- a/noncore/net/mail/mainwindow.cpp
+++ b/noncore/net/mail/mainwindow.cpp
@@ -1,57 +1,55 @@
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>
7 6
8#include <qpe/qpeapplication.h> 7#include <qpe/qpeapplication.h>
9#include <qpe/resource.h>
10 8
11#include "defines.h" 9#include "defines.h"
12#include "mainwindow.h" 10#include "mainwindow.h"
13 11
14 12
15MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 13MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
16 : QMainWindow( parent, name, flags ) 14 : QMainWindow( parent, name, flags )
17{ 15{
18 16
19 setCaption( tr( "Mail" ) ); 17 setCaption( tr( "Mail" ) );
20 setToolBarsMovable( false ); 18 setToolBarsMovable( false );
21 19
22 toolBar = new QToolBar( this ); 20 toolBar = new QToolBar( this );
23 menuBar = new QMenuBar( toolBar ); 21 menuBar = new QMenuBar( toolBar );
24 mailMenu = new QPopupMenu( menuBar ); 22 mailMenu = new QPopupMenu( menuBar );
25 menuBar->insertItem( tr( "Mail" ), mailMenu ); 23 menuBar->insertItem( tr( "Mail" ), mailMenu );
26 settingsMenu = new QPopupMenu( menuBar ); 24 settingsMenu = new QPopupMenu( menuBar );
27 menuBar->insertItem( tr( "Settings" ), settingsMenu ); 25 menuBar->insertItem( tr( "Settings" ), settingsMenu );
28 26
29 addToolBar( toolBar ); 27 addToolBar( toolBar );
30 toolBar->setHorizontalStretchable( true ); 28 toolBar->setHorizontalStretchable( true );
31 29
32 QLabel *spacer = new QLabel( toolBar ); 30 QLabel *spacer = new QLabel( toolBar );
33 spacer->setBackgroundMode( QWidget::PaletteButton ); 31 spacer->setBackgroundMode( QWidget::PaletteButton );
34 toolBar->setStretchableWidget( spacer ); 32 toolBar->setStretchableWidget( spacer );
35 33
36 composeMail = new QAction( tr( "Compose new mail" ), ICON_COMPOSEMAIL, 34 composeMail = new QAction( tr( "Compose new mail" ), ICON_COMPOSEMAIL,
37 0, 0, this ); 35 0, 0, this );
38 composeMail->addTo( toolBar ); 36 composeMail->addTo( toolBar );
39 composeMail->addTo( mailMenu ); 37 composeMail->addTo( mailMenu );
40 38
41 sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED, 39 sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED,
42 0, 0, this ); 40 0, 0, this );
43 sendQueued->addTo( toolBar ); 41 sendQueued->addTo( toolBar );
44 sendQueued->addTo( mailMenu ); 42 sendQueued->addTo( mailMenu );
45 43
46 /* 44 /*
47 syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC, 45 syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC,
48 0, 0, this ); 46 0, 0, this );
49 syncFolders->addTo( toolBar ); 47 syncFolders->addTo( toolBar );
50 syncFolders->addTo( mailMenu ); 48 syncFolders->addTo( mailMenu );
51 */ 49 */
52 50
53 showFolders = new QAction( tr( "Show/Hide folders" ), ICON_SHOWFOLDERS, 51 showFolders = new QAction( tr( "Show/Hide folders" ), ICON_SHOWFOLDERS,
54 0, 0, this, 0, true ); 52 0, 0, this, 0, true );
55 showFolders->addTo( toolBar ); 53 showFolders->addTo( toolBar );
56 showFolders->addTo( mailMenu ); 54 showFolders->addTo( mailMenu );
57 showFolders->setOn( true ); 55 showFolders->setOn( true );
diff --git a/noncore/net/mail/newmaildir.cpp b/noncore/net/mail/newmaildir.cpp
index ab0d4e3..e6e9dc7 100644
--- a/noncore/net/mail/newmaildir.cpp
+++ b/noncore/net/mail/newmaildir.cpp
@@ -1,38 +1,36 @@
1#include "newmaildir.h" 1#include "newmaildir.h"
2#include <qdialog.h>
3#include <qvariant.h>
4#include <qlineedit.h> 2#include <qlineedit.h>
5#include <qcheckbox.h> 3#include <qcheckbox.h>
6 4
7Newmdirdlg::Newmdirdlg( QWidget* parent, const char* name,bool no_sub) 5Newmdirdlg::Newmdirdlg( QWidget* parent, const char* name,bool no_sub)
8 : Newmdirdlgui(parent,name,true),ndir(""),possible_subs(false) 6 : Newmdirdlgui(parent,name,true),ndir(""),possible_subs(false)
9{ 7{
10 if (no_sub) { 8 if (no_sub) {
11 subdirsPossibleBox->setChecked(false); 9 subdirsPossibleBox->setChecked(false);
12 subdirsPossibleBox->hide(); 10 subdirsPossibleBox->hide();
13 } 11 }
14} 12}
15 13
16Newmdirdlg::~Newmdirdlg() 14Newmdirdlg::~Newmdirdlg()
17{ 15{
18} 16}
19 17
20void Newmdirdlg::accept() 18void Newmdirdlg::accept()
21{ 19{
22 ndir = dirnameEdit->text(); 20 ndir = dirnameEdit->text();
23 possible_subs = subdirsPossibleBox->isChecked(); 21 possible_subs = subdirsPossibleBox->isChecked();
24 if (ndir.isEmpty()) { 22 if (ndir.isEmpty()) {
25 return; 23 return;
26 } 24 }
27 Newmdirdlgui::accept(); 25 Newmdirdlgui::accept();
28} 26}
29 27
30const QString&Newmdirdlg::Newdir()const 28const QString&Newmdirdlg::Newdir()const
31{ 29{
32 return ndir; 30 return ndir;
33} 31}
34 32
35const bool Newmdirdlg::subpossible()const 33const bool Newmdirdlg::subpossible()const
36{ 34{
37 return possible_subs; 35 return possible_subs;
38} 36}
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp
index abf93dc..6bfc824 100644
--- a/noncore/net/mail/opiemail.cpp
+++ b/noncore/net/mail/opiemail.cpp
@@ -1,70 +1,66 @@
1 1
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 "mailistviewitem.h" 6#include "mailistviewitem.h"
7#include "viewmail.h" 7#include "viewmail.h"
8#include "selectstore.h" 8#include "selectstore.h"
9#include "selectsmtp.h" 9#include "selectsmtp.h"
10 10
11/* OPIE */ 11/* OPIE */
12#include <libmailwrapper/smtpwrapper.h> 12#include <libmailwrapper/smtpwrapper.h>
13#include <libmailwrapper/mailtypes.h> 13#include <libmailwrapper/mailtypes.h>
14#include <libmailwrapper/abstractmail.h> 14#include <libmailwrapper/abstractmail.h>
15#include <qpe/qcopenvelope_qws.h>
16#include <qpe/resource.h> 15#include <qpe/resource.h>
17#include <qpe/qpeapplication.h> 16#include <qpe/qpeapplication.h>
18 17
19/* QT */ 18/* QT */
20#include <qmessagebox.h>
21#include <qaction.h>
22#include <qapplication.h>
23 19
24OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) 20OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags )
25 : MainWindow( parent, name, WStyle_ContextHelp ) 21 : MainWindow( parent, name, WStyle_ContextHelp )
26{ 22{
27 settings = new Settings(); 23 settings = new Settings();
28 24
29 folderView->populate( settings->getAccounts() ); 25 folderView->populate( settings->getAccounts() );
30} 26}
31 27
32OpieMail::~OpieMail() 28OpieMail::~OpieMail()
33{ 29{
34 if (settings) delete settings; 30 if (settings) delete settings;
35} 31}
36 32
37void OpieMail::appMessage(const QCString &msg, const QByteArray &data) 33void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
38{ 34{
39 // copied from old mail2 35 // copied from old mail2
40 if (msg == "writeMail(QString,QString)") 36 if (msg == "writeMail(QString,QString)")
41 { 37 {
42 QDataStream stream(data,IO_ReadOnly); 38 QDataStream stream(data,IO_ReadOnly);
43 QString name, email; 39 QString name, email;
44 stream >> name >> email; 40 stream >> name >> email;
45 // removing the whitespaces at beginning and end is needed! 41 // removing the whitespaces at beginning and end is needed!
46 slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace()); 42 slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace());
47 } 43 }
48 else if (msg == "newMail()") 44 else if (msg == "newMail()")
49 { 45 {
50 slotComposeMail(); 46 slotComposeMail();
51 } 47 }
52} 48}
53 49
54void OpieMail::slotwriteMail(const QString&name,const QString&email) 50void OpieMail::slotwriteMail(const QString&name,const QString&email)
55{ 51{
56 ComposeMail compose( settings, this, 0, true , WStyle_ContextHelp ); 52 ComposeMail compose( settings, this, 0, true , WStyle_ContextHelp );
57 if (!email.isEmpty()) 53 if (!email.isEmpty())
58 { 54 {
59 if (!name.isEmpty()) 55 if (!name.isEmpty())
60 { 56 {
61 compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">"); 57 compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">");
62 } 58 }
63 else 59 else
64 { 60 {
65 compose.setTo(email); 61 compose.setTo(email);
66 } 62 }
67 } 63 }
68 compose.slotAdjustColumns(); 64 compose.slotAdjustColumns();
69 QPEApplication::execDialog( &compose ); 65 QPEApplication::execDialog( &compose );
70} 66}
diff --git a/noncore/net/mail/selectsmtp.cpp b/noncore/net/mail/selectsmtp.cpp
index 79b10ef..82e8a0b 100644
--- a/noncore/net/mail/selectsmtp.cpp
+++ b/noncore/net/mail/selectsmtp.cpp
@@ -1,57 +1,50 @@
1#include "selectsmtp.h" 1#include "selectsmtp.h"
2#include <libmailwrapper/mailwrapper.h> 2#include <libmailwrapper/mailwrapper.h>
3#include <qlist.h>
4#include <qlabel.h>
5#include <qlayout.h>
6#include <qcheckbox.h>
7#include <qframe.h>
8#include <qlineedit.h>
9#include <qcombobox.h>
10 3
11selectsmtp::selectsmtp(QWidget* parent, const char* name, bool modal, WFlags fl) 4selectsmtp::selectsmtp(QWidget* parent, const char* name, bool modal, WFlags fl)
12 : selectstoreui(parent,name,modal,fl) 5 : selectstoreui(parent,name,modal,fl)
13{ 6{
14 //m_smtpList.setAutoDelete(false); 7 //m_smtpList.setAutoDelete(false);
15 m_smtpList = 0; 8 m_smtpList = 0;
16 //headlabel->setText(tr("<center>Select SMTP account to use</center>")); 9 //headlabel->setText(tr("<center>Select SMTP account to use</center>"));
17 headlabel->hide(); 10 headlabel->hide();
18 folderSelection->hide(); 11 folderSelection->hide();
19 folderLabel->hide(); 12 folderLabel->hide();
20 accountlabel->setText("<center>SMTP Accounts</center>"); 13 accountlabel->setText("<center>SMTP Accounts</center>");
21 Line1->hide(); 14 Line1->hide();
22 newFoldersel->hide(); 15 newFoldersel->hide();
23 newFolderedit->hide(); 16 newFolderedit->hide();
24 newFolderLabel->hide(); 17 newFolderLabel->hide();
25 Line2->hide(); 18 Line2->hide();
26 selMove->hide(); 19 selMove->hide();
27 m_current_smtp = 0; 20 m_current_smtp = 0;
28 setCaption(tr("Select SMTP Account")); 21 setCaption(tr("Select SMTP Account"));
29} 22}
30 23
31selectsmtp::~selectsmtp() 24selectsmtp::~selectsmtp()
32{ 25{
33} 26}
34 27
35void selectsmtp::slotAccountselected(int which) 28void selectsmtp::slotAccountselected(int which)
36{ 29{
37 if (!m_smtpList || (unsigned)which>=m_smtpList->count() || which < 0) { 30 if (!m_smtpList || (unsigned)which>=m_smtpList->count() || which < 0) {
38 m_current_smtp = 0; 31 m_current_smtp = 0;
39 return; 32 return;
40 } 33 }
41 m_current_smtp = m_smtpList->at(which); 34 m_current_smtp = m_smtpList->at(which);
42} 35}
43 36
44void selectsmtp::setSelectionlist(QList<SMTPaccount>*list) 37void selectsmtp::setSelectionlist(QList<SMTPaccount>*list)
45{ 38{
46 m_smtpList = list; 39 m_smtpList = list;
47 accountSelection->clear(); 40 accountSelection->clear();
48 if (!m_smtpList || m_smtpList->count()==0) { 41 if (!m_smtpList || m_smtpList->count()==0) {
49 accountSelection->setEnabled(false); 42 accountSelection->setEnabled(false);
50 return; 43 return;
51 } 44 }
52 accountSelection->setEnabled(true); 45 accountSelection->setEnabled(true);
53 for (unsigned i = 0; m_smtpList!=0 && i < m_smtpList->count(); ++i) { 46 for (unsigned i = 0; m_smtpList!=0 && i < m_smtpList->count(); ++i) {
54 accountSelection->insertItem( m_smtpList->at(i)->getAccountName()); 47 accountSelection->insertItem( m_smtpList->at(i)->getAccountName());
55 } 48 }
56 m_current_smtp = m_smtpList->at(0); 49 m_current_smtp = m_smtpList->at(0);
57} 50}
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp
index 8636957..ec93f8d 100644
--- a/noncore/net/mail/viewmail.cpp
+++ b/noncore/net/mail/viewmail.cpp
@@ -1,70 +1,67 @@
1#include "composemail.h" 1#include "composemail.h"
2#include "viewmail.h" 2#include "viewmail.h"
3#include "accountview.h"
4 3
5/* OPIE */ 4/* OPIE */
6#include <libmailwrapper/settings.h> 5#include <libmailwrapper/settings.h>
7#include <libmailwrapper/abstractmail.h> 6#include <libmailwrapper/abstractmail.h>
8#include <libmailwrapper/mailtypes.h> 7#include <libmailwrapper/mailtypes.h>
9 8
10#include <opie2/ofiledialog.h> 9#include <opie2/ofiledialog.h>
11#include <qpe/config.h> 10#include <qpe/config.h>
12#include <qpe/qpeapplication.h> 11#include <qpe/qpeapplication.h>
13 12
14/* QT */ 13/* QT */
15#include <qtextbrowser.h> 14#include <qtextbrowser.h>
16#include <qmessagebox.h> 15#include <qmessagebox.h>
17#include <qtextstream.h> 16#include <qtextstream.h>
18#include <qaction.h> 17#include <qaction.h>
19#include <qpopupmenu.h> 18#include <qpopupmenu.h>
20#include <qfile.h> 19#include <qfile.h>
21#include <qapplication.h>
22#include <qvaluelist.h>
23 20
24AttachItem::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,
25 const QString&fsize,int num,const QValueList<int>&path) 22 const QString&fsize,int num,const QValueList<int>&path)
26 : QListViewItem(parent,after),_partNum(num) 23 : QListViewItem(parent,after),_partNum(num)
27{ 24{
28 _path=path; 25 _path=path;
29 setText(0, mime); 26 setText(0, mime);
30 setText(1, desc); 27 setText(1, desc);
31 setText(2, file); 28 setText(2, file);
32 setText(3, fsize); 29 setText(3, fsize);
33} 30}
34 31
35AttachItem::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,
36 const QString&fsize,int num,const QValueList<int>&path) 33 const QString&fsize,int num,const QValueList<int>&path)
37 : QListViewItem(parent,after),_partNum(num) 34 : QListViewItem(parent,after),_partNum(num)
38{ 35{
39 _path=path; 36 _path=path;
40 setText(0, mime); 37 setText(0, mime);
41 setText(1, desc); 38 setText(1, desc);
42 setText(2, file); 39 setText(2, file);
43 setText(3, fsize); 40 setText(3, fsize);
44} 41}
45 42
46bool AttachItem::isParentof(const QValueList<int>&path) 43bool AttachItem::isParentof(const QValueList<int>&path)
47{ 44{
48 /* if not set, then no parent */ 45 /* if not set, then no parent */
49 if (path.count()==0||_path.count()==0) return false; 46 if (path.count()==0||_path.count()==0) return false;
50 /* the parent must have one digit less then a child */ 47 /* the parent must have one digit less then a child */
51 if (path.count()!=_path.count()+1) return false; 48 if (path.count()!=_path.count()+1) return false;
52 for (unsigned int i=0; i < _path.count();++i) 49 for (unsigned int i=0; i < _path.count();++i)
53 { 50 {
54 if (_path[i]!=path[i]) return false; 51 if (_path[i]!=path[i]) return false;
55 } 52 }
56 return true; 53 return true;
57} 54}
58 55
59AttachItem* ViewMail::searchParent(const QValueList<int>&path) 56AttachItem* ViewMail::searchParent(const QValueList<int>&path)
60{ 57{
61 QListViewItemIterator it( attachments ); 58 QListViewItemIterator it( attachments );
62 for ( ; it.current(); ++it ) 59 for ( ; it.current(); ++it )
63 { 60 {
64 AttachItem*ati = (AttachItem*)it.current(); 61 AttachItem*ati = (AttachItem*)it.current();
65 if (ati->isParentof(path)) return ati; 62 if (ati->isParentof(path)) return ati;
66 } 63 }
67 return 0; 64 return 0;
68} 65}
69 66
70AttachItem* ViewMail::lastChild(AttachItem*parent) 67AttachItem* ViewMail::lastChild(AttachItem*parent)
diff --git a/noncore/net/mail/viewmailbase.cpp b/noncore/net/mail/viewmailbase.cpp
index 7f1d8a0..c2bf08c 100644
--- a/noncore/net/mail/viewmailbase.cpp
+++ b/noncore/net/mail/viewmailbase.cpp
@@ -1,54 +1,53 @@
1#include <qtextbrowser.h> 1#include <qtextbrowser.h>
2#include <qlistview.h> 2#include <qlistview.h>
3#include <qaction.h> 3#include <qaction.h>
4#include <qlabel.h> 4#include <qlabel.h>
5#include <qvbox.h> 5#include <qvbox.h>
6#include <qpopupmenu.h>
7 6
8#include <qpe/qpetoolbar.h> 7#include <qpe/qpetoolbar.h>
9#include <qmenubar.h> 8#include <qmenubar.h>
10#include <qpe/resource.h> 9#include <qpe/resource.h>
11 10
12#include "viewmailbase.h" 11#include "viewmailbase.h"
13//#include "opendiag.h" 12//#include "opendiag.h"
14 13
15ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) 14ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
16 : QMainWindow(parent, name, fl) 15 : QMainWindow(parent, name, fl)
17{ 16{
18 setCaption(tr("E-Mail by %1")); 17 setCaption(tr("E-Mail by %1"));
19 setToolBarsMovable(false); 18 setToolBarsMovable(false);
20 19
21 toolbar = new QToolBar(this); 20 toolbar = new QToolBar(this);
22 menubar = new QMenuBar( toolbar ); 21 menubar = new QMenuBar( toolbar );
23 mailmenu = new QPopupMenu( menubar ); 22 mailmenu = new QPopupMenu( menubar );
24 menubar->insertItem( tr( "Mail" ), mailmenu ); 23 menubar->insertItem( tr( "Mail" ), mailmenu );
25 24
26 toolbar->setHorizontalStretchable(true); 25 toolbar->setHorizontalStretchable(true);
27 addToolBar(toolbar); 26 addToolBar(toolbar);
28 27
29 QLabel *spacer = new QLabel(toolbar); 28 QLabel *spacer = new QLabel(toolbar);
30 spacer->setBackgroundMode(QWidget::PaletteButton); 29 spacer->setBackgroundMode(QWidget::PaletteButton);
31 toolbar->setStretchableWidget(spacer); 30 toolbar->setStretchableWidget(spacer);
32 31
33 reply = new QAction(tr("Reply"), QIconSet(Resource::loadPixmap("mail/reply")), 0, 0, this); 32 reply = new QAction(tr("Reply"), QIconSet(Resource::loadPixmap("mail/reply")), 0, 0, this);
34 reply->addTo(toolbar); 33 reply->addTo(toolbar);
35 reply->addTo(mailmenu); 34 reply->addTo(mailmenu);
36 35
37 forward = new QAction(tr("Forward"), QIconSet(Resource::loadPixmap("mail/forward")), 0, 0, this); 36 forward = new QAction(tr("Forward"), QIconSet(Resource::loadPixmap("mail/forward")), 0, 0, this);
38 forward->addTo(toolbar); 37 forward->addTo(toolbar);
39 forward->addTo(mailmenu); 38 forward->addTo(mailmenu);
40 39
41 attachbutton = new QAction(tr("Attachments"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true); 40 attachbutton = new QAction(tr("Attachments"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true);
42 attachbutton->addTo(toolbar); 41 attachbutton->addTo(toolbar);
43 attachbutton->addTo(mailmenu); 42 attachbutton->addTo(mailmenu);
44 connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool))); 43 connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool)));
45 44
46 45
47 showHtml = new QAction( tr( "Show Html" ), QIconSet( Resource::loadPixmap( "mail/html" ) ), 0, 0, this, 0, true ); 46 showHtml = new QAction( tr( "Show Html" ), QIconSet( Resource::loadPixmap( "mail/html" ) ), 0, 0, this, 0, true );
48 showHtml->addTo( toolbar ); 47 showHtml->addTo( toolbar );
49 showHtml->addTo( mailmenu ); 48 showHtml->addTo( mailmenu );
50 49
51 deleteMail = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("trash")), 0, 0, this); 50 deleteMail = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("trash")), 0, 0, this);
52 deleteMail->addTo(toolbar); 51 deleteMail->addTo(toolbar);
53 deleteMail->addTo(mailmenu); 52 deleteMail->addTo(mailmenu);
54 53
diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp
index b76b397..817936d 100644
--- a/noncore/net/opietooth/applet/bluezapplet.cpp
+++ b/noncore/net/opietooth/applet/bluezapplet.cpp
@@ -1,84 +1,83 @@
1/* 1/*
2               =. This file is part of the OPIE Project 2               =. This file is part of the OPIE Project
3             .=l. Copyright (c) 2002 Maximilian Reiss <max.reiss@gmx.de> 3             .=l. Copyright (c) 2002 Maximilian Reiss <max.reiss@gmx.de>
4           .>+-= 4           .>+-=
5 _;:,     .>    :=|. This library is free software; you can 5 _;:,     .>    :=|. This library is free software; you can
6.> <,   >  .   <= redistribute it and/or modify it under 6.> <,   >  .   <= redistribute it and/or modify it under
7:=1 )Y*s>-.--   : the terms of the GNU Library General Public 7:=1 )Y*s>-.--   : the terms of the GNU Library General Public
8.="- .-=="i,     .._ License as published by the Free Software 8.="- .-=="i,     .._ License as published by the Free Software
9 - .   .-<_>     .<> Foundation; either version 2 of the License, 9 - .   .-<_>     .<> Foundation; either version 2 of the License,
10     ._= =}       : or (at your option) any later version. 10     ._= =}       : or (at your option) any later version.
11    .%+i>       _;_. 11    .%+i>       _;_.
12    .i_,=:_.      -<s. This library is distributed in the hope that 12    .i_,=:_.      -<s. This library is distributed in the hope that
13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
14    : ..    .:,     . . . without even the implied warranty of 14    : ..    .:,     . . . without even the implied warranty of
15    =_        +     =;=| MERCHANTABILITY or FITNESS FOR A 15    =_        +     =;=| MERCHANTABILITY or FITNESS FOR A
16  _.=:.       :    :=>: PARTICULAR PURPOSE. See the GNU 16  _.=:.       :    :=>: PARTICULAR PURPOSE. See the GNU
17..}^=.=       =       ; Library General Public License for more 17..}^=.=       =       ; Library General Public License for more
18++=   -.     .     .: details. 18++=   -.     .     .: details.
19 :     =  ...= . :.=- 19 :     =  ...= . :.=-
20 -.   .:....=;==+<; You should have received a copy of the GNU 20 -.   .:....=;==+<; You should have received a copy of the GNU
21  -_. . .   )=.  = Library General Public License along with 21  -_. . .   )=.  = Library General Public License along with
22    --        :-= this library; see the file COPYING.LIB. 22    --        :-= this library; see the file COPYING.LIB.
23 If not, write to the Free Software Foundation, 23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330, 24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29 29
30#include "bluezapplet.h" 30#include "bluezapplet.h"
31#include <qapplication.h> 31#include <qapplication.h>
32 32
33#include <qpe/resource.h>
34#include <qpe/qcopenvelope_qws.h> 33#include <qpe/qcopenvelope_qws.h>
35#include <qpe/resource.h>
36#include <qpe/config.h> 34#include <qpe/config.h>
35#include <qpe/resource.h>
37 36
38#include <opie/odevice.h> 37#include <opie/odevice.h>
39 38
40#include <qpoint.h> 39#include <qpoint.h>
41#include <qpainter.h> 40#include <qpainter.h>
42#include <qlayout.h> 41#include <qlayout.h>
43#include <qframe.h> 42#include <qframe.h>
44#include <qpixmap.h> 43#include <qpixmap.h>
45#include <qstring.h> 44#include <qstring.h>
46#include <qtimer.h> 45#include <qtimer.h>
47#include <qpopupmenu.h> 46#include <qpopupmenu.h>
48 47
49#include <device.h> 48#include <device.h>
50 49
51using namespace Opie; 50using namespace Opie;
52 51
53namespace OpieTooth { 52namespace OpieTooth {
54 53
55 BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { 54 BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) {
56 setFixedHeight( 18 ); 55 setFixedHeight( 18 );
57 setFixedWidth( 14 ); 56 setFixedWidth( 14 );
58 bluezOnPixmap = Resource::loadPixmap( "bluetoothapplet/bluezon" ); 57 bluezOnPixmap = Resource::loadPixmap( "bluetoothapplet/bluezon" );
59 bluezOffPixmap = Resource::loadPixmap( "bluetoothapplet/bluezoff" ); 58 bluezOffPixmap = Resource::loadPixmap( "bluetoothapplet/bluezoff" );
60 // bluezDiscoveryOnPixmap = Resource::loadPixmap( "bluetoothapplet/magglass" ); 59 // bluezDiscoveryOnPixmap = Resource::loadPixmap( "bluetoothapplet/magglass" );
61 startTimer(4000); 60 startTimer(4000);
62 btDevice = 0; 61 btDevice = 0;
63 bluezactive = false; 62 bluezactive = false;
64 bluezDiscoveryActive = false; 63 bluezDiscoveryActive = false;
65 64
66 } 65 }
67 66
68 BluezApplet::~BluezApplet() { 67 BluezApplet::~BluezApplet() {
69 if ( btDevice ) { 68 if ( btDevice ) {
70 delete btDevice; 69 delete btDevice;
71 } 70 }
72 } 71 }
73 72
74 bool BluezApplet::checkBluezStatus() { 73 bool BluezApplet::checkBluezStatus() {
75 if (btDevice) { 74 if (btDevice) {
76 if (btDevice->isLoaded() ) { 75 if (btDevice->isLoaded() ) {
77 return true; 76 return true;
78 } else { 77 } else {
79 return false; 78 return false;
80 } 79 }
81 } else { 80 } else {
82 return false; 81 return false;
83 } 82 }
84 } 83 }
diff --git a/noncore/net/opietooth/blue-pin/main.cc b/noncore/net/opietooth/blue-pin/main.cc
index 1b7daec..aa360aa 100644
--- a/noncore/net/opietooth/blue-pin/main.cc
+++ b/noncore/net/opietooth/blue-pin/main.cc
@@ -1,39 +1,38 @@
1#include <stdio.h> 1#include <stdio.h>
2#include <stdlib.h> 2#include <stdlib.h>
3 3
4 4
5#include <qpe/qpeapplication.h> 5#include <qpe/qpeapplication.h>
6#include <qpe/config.h>
7 6
8#include "pindlg.h" 7#include "pindlg.h"
9 8
10 9
11int main( int argc, char* argv[] ) 10int main( int argc, char* argv[] )
12{ 11{
13 if (argc < 2 ) { 12 if (argc < 2 ) {
14 printf("ERR\n"); 13 printf("ERR\n");
15 exit(0); 14 exit(0);
16 } 15 }
17 QCString dir(argv[1] ); 16 QCString dir(argv[1] );
18 QCString bdaddr( argv[2] ); 17 QCString bdaddr( argv[2] );
19 QCString name; 18 QCString name;
20 if ( argc > 3 ) { 19 if ( argc > 3 ) {
21 name = argv[3]; 20 name = argv[3];
22 } 21 }
23 QPEApplication a(argc, argv ); 22 QPEApplication a(argc, argv );
24 QString status; 23 QString status;
25 if (dir == "out" ) { 24 if (dir == "out" ) {
26 status = QObject::tr("Outgoing connection to "); 25 status = QObject::tr("Outgoing connection to ");
27 }else 26 }else
28 status = QObject::tr("Incoming connection from "); 27 status = QObject::tr("Incoming connection from ");
29 status += name; 28 status += name;
30 status += "<br>"; 29 status += "<br>";
31 status += "[" + bdaddr + "]"; 30 status += "[" + bdaddr + "]";
32 OpieTooth::PinDlg dlg( status, bdaddr ); 31 OpieTooth::PinDlg dlg( status, bdaddr );
33 if ( dlg.exec() ) { 32 if ( dlg.exec() ) {
34 printf("PIN:%s\n", dlg.pin().stripWhiteSpace().latin1() ); 33 printf("PIN:%s\n", dlg.pin().stripWhiteSpace().latin1() );
35 }else 34 }else
36 printf("ERR\n"); 35 printf("ERR\n");
37 return 0; 36 return 0;
38} 37}
39 38
diff --git a/noncore/net/opietooth/blue-pin/pindlg.cc b/noncore/net/opietooth/blue-pin/pindlg.cc
index 9418a20..f0b2309 100644
--- a/noncore/net/opietooth/blue-pin/pindlg.cc
+++ b/noncore/net/opietooth/blue-pin/pindlg.cc
@@ -1,60 +1,59 @@
1 1
2#include "pindlg.h" 2#include "pindlg.h"
3 3
4/* OPIE */ 4/* OPIE */
5#include <qpe/config.h> 5#include <qpe/config.h>
6#include <qpe/qpeapplication.h> 6#include <qpe/qpeapplication.h>
7 7
8/* QT */ 8/* QT */
9#include <qcheckbox.h> 9#include <qcheckbox.h>
10#include <qlabel.h> 10#include <qlabel.h>
11#include <qlineedit.h> 11#include <qlineedit.h>
12#include <qtimer.h>
13 12
14/* STD */ 13/* STD */
15#include <stdio.h> 14#include <stdio.h>
16 15
17using namespace OpieTooth; 16using namespace OpieTooth;
18 17
19PinDlg::PinDlg( const QString& status, 18PinDlg::PinDlg( const QString& status,
20 const QString& mac, QWidget* parent, 19 const QString& mac, QWidget* parent,
21 const char* name ) 20 const char* name )
22 : PinDlgBase( parent, name, WType_Modal ) 21 : PinDlgBase( parent, name, WType_Modal )
23{ 22{
24 m_mac = mac; 23 m_mac = mac;
25 test( mac ); 24 test( mac );
26 txtStatus->setText(status); 25 txtStatus->setText(status);
27 QPEApplication::showDialog( this ); 26 QPEApplication::showDialog( this );
28} 27}
29 28
30PinDlg::~PinDlg() 29PinDlg::~PinDlg()
31{} 30{}
32void PinDlg::setMac( const QString& mac ) 31void PinDlg::setMac( const QString& mac )
33{ 32{
34 txtStatus->setText( mac ); 33 txtStatus->setText( mac );
35} 34}
36QString PinDlg::pin() const 35QString PinDlg::pin() const
37{ 36{
38 return lnePin->text(); 37 return lnePin->text();
39} 38}
40 39
41void PinDlg::test( const QString& mac ) 40void PinDlg::test( const QString& mac )
42{ 41{
43 if (!mac.isEmpty() ) 42 if (!mac.isEmpty() )
44 { 43 {
45 Config cfg("bluepin"); 44 Config cfg("bluepin");
46 cfg.setGroup(mac); 45 cfg.setGroup(mac);
47 lnePin->setText(cfg.readEntryCrypt("pin", QString::null ) ); 46 lnePin->setText(cfg.readEntryCrypt("pin", QString::null ) );
48 if ( !lnePin->text().isEmpty() ) 47 if ( !lnePin->text().isEmpty() )
49 { 48 {
50 //QTimer::singleShot(100, this, SLOT(accept() ) ); 49 //QTimer::singleShot(100, this, SLOT(accept() ) );
51 } 50 }
52 51
53 } 52 }
54 53
55} 54}
56void PinDlg::accept() 55void PinDlg::accept()
57{ 56{
58 if ( ckbPin->isChecked() ) 57 if ( ckbPin->isChecked() )
59 { 58 {
60 Config cfg("bluepin"); 59 Config cfg("bluepin");
diff --git a/noncore/net/opietooth/manager/bticonloader.cpp b/noncore/net/opietooth/manager/bticonloader.cpp
index e5d8092..6bac256 100644
--- a/noncore/net/opietooth/manager/bticonloader.cpp
+++ b/noncore/net/opietooth/manager/bticonloader.cpp
@@ -1,52 +1,51 @@
1 1
2#include "bticonloader.h" 2#include "bticonloader.h"
3 3
4#include <qpixmap.h>
5#include <qpe/resource.h> 4#include <qpe/resource.h>
6 5
7namespace OpieTooth { 6namespace OpieTooth {
8 7
9 8
10 BTIconLoader::BTIconLoader() { 9 BTIconLoader::BTIconLoader() {
11 10
12 // still need to find out real ids 11 // still need to find out real ids
13 deviceIcons.insert( 100 , "computer_16" ); 12 deviceIcons.insert( 100 , "computer_16" );
14 deviceIcons.insert( 101 , "phone_16" ); 13 deviceIcons.insert( 101 , "phone_16" );
15 deviceIcons.insert( 102 , "brain_16" ); 14 deviceIcons.insert( 102 , "brain_16" );
16 deviceIcons.insert( 103 , "conduit_16" ); 15 deviceIcons.insert( 103 , "conduit_16" );
17 16
18 17
19 serviceIcons.insert( 4357 , "obex_16" ); //OBEXObjectPush 18 serviceIcons.insert( 4357 , "obex_16" ); //OBEXObjectPush
20 serviceIcons.insert( 4358 , "obex_16" ); //OBEXFileTransfer 19 serviceIcons.insert( 4358 , "obex_16" ); //OBEXFileTransfer
21 serviceIcons.insert( 4369 , "print_16" ); //Fax 20 serviceIcons.insert( 4369 , "print_16" ); //Fax
22 serviceIcons.insert( 4353 , "serial_16" ); //SerialPort 21 serviceIcons.insert( 4353 , "serial_16" ); //SerialPort
23 serviceIcons.insert( 4356 , "sync_16" ); //IrMCSync 22 serviceIcons.insert( 4356 , "sync_16" ); //IrMCSync
24 serviceIcons.insert( 4359 , "sync_16" ); //IrMCSyncCommand 23 serviceIcons.insert( 4359 , "sync_16" ); //IrMCSyncCommand
25 serviceIcons.insert( 4354 , "network_16" ); //LANAccessUsingPPP 24 serviceIcons.insert( 4354 , "network_16" ); //LANAccessUsingPPP
26 serviceIcons.insert( 4355 , "network_16"); //DialupNetworking 25 serviceIcons.insert( 4355 , "network_16"); //DialupNetworking
27 serviceIcons.insert( 4360 , "phone_16"); // Headset 26 serviceIcons.insert( 4360 , "phone_16"); // Headset
28 serviceIcons.insert( 4370 , "audio_16"); //HeadsetAudioGateway 27 serviceIcons.insert( 4370 , "audio_16"); //HeadsetAudioGateway
29 serviceIcons.insert( 4374 , "network_16"); // Network Access Point 28 serviceIcons.insert( 4374 , "network_16"); // Network Access Point
30 serviceIcons.insert( 4361 , "phone_16"); // CordlessTelephony 29 serviceIcons.insert( 4361 , "phone_16"); // CordlessTelephony
31 serviceIcons.insert( 4362 , "audio_16"); // AudioSource 30 serviceIcons.insert( 4362 , "audio_16"); // AudioSource
32 serviceIcons.insert( 4363 , "audio_16"); // AudioSink 31 serviceIcons.insert( 4363 , "audio_16"); // AudioSink
33 serviceIcons.insert( 4390 , "print_16" ); //HCR_Print 32 serviceIcons.insert( 4390 , "print_16" ); //HCR_Print
34 serviceIcons.insert( 4392 , "phone_16" ); //Common_ISDN_Access 33 serviceIcons.insert( 4392 , "phone_16" ); //Common_ISDN_Access
35 34
36 serviceIcons.insert( 4609 , "network_16" ); //GenericNetworking 35 serviceIcons.insert( 4609 , "network_16" ); //GenericNetworking
37 serviceIcons.insert( 4610 , "folder_16" ); //GenericFileTransfer 36 serviceIcons.insert( 4610 , "folder_16" ); //GenericFileTransfer
38 serviceIcons.insert( 4392 , "audio_16" ); //GenericAudio 37 serviceIcons.insert( 4392 , "audio_16" ); //GenericAudio
39 // serviceIcons.insert( 4392 , "phone_16" ); //GenericTelephony 38 // serviceIcons.insert( 4392 , "phone_16" ); //GenericTelephony
40 // the above is duplicated? -zecke 39 // the above is duplicated? -zecke
41 40
42 //serviceIcons.insert( "106" , "link_16" ); 41 //serviceIcons.insert( "106" , "link_16" );
43 //serviceIcons.insert( "107" , "misc_16" ); 42 //serviceIcons.insert( "107" , "misc_16" );
44 } 43 }
45 44
46 BTIconLoader::~BTIconLoader() { 45 BTIconLoader::~BTIconLoader() {
47 } 46 }
48 47
49 QPixmap BTIconLoader::deviceIcon( int deviceClass ) { 48 QPixmap BTIconLoader::deviceIcon( int deviceClass ) {
50 49
51 QString iconName; 50 QString iconName;
52 51
diff --git a/noncore/net/opietooth/manager/btserviceitem.cpp b/noncore/net/opietooth/manager/btserviceitem.cpp
index 7db93c9..fb5f21e 100644
--- a/noncore/net/opietooth/manager/btserviceitem.cpp
+++ b/noncore/net/opietooth/manager/btserviceitem.cpp
@@ -1,26 +1,25 @@
1 1
2#include <qobject.h>
3#include "btserviceitem.h" 2#include "btserviceitem.h"
4 3
5using namespace OpieTooth; 4using namespace OpieTooth;
6 5
7BTServiceItem::BTServiceItem( QListViewItem* item, const Services& serv ) 6BTServiceItem::BTServiceItem( QListViewItem* item, const Services& serv )
8 : BTListItem( item ) { 7 : BTListItem( item ) {
9 m_service = serv; 8 m_service = serv;
10 setText(0, QObject::tr(serv.serviceName() ) ); 9 setText(0, QObject::tr(serv.serviceName() ) );
11} 10}
12BTServiceItem::~BTServiceItem() { 11BTServiceItem::~BTServiceItem() {
13 12
14} 13}
15QString BTServiceItem::type() const { 14QString BTServiceItem::type() const {
16 return QString::fromLatin1("service"); 15 return QString::fromLatin1("service");
17} 16}
18int BTServiceItem::typeId() const { 17int BTServiceItem::typeId() const {
19 return Service; 18 return Service;
20} 19}
21Services BTServiceItem::services() const { 20Services BTServiceItem::services() const {
22 return m_service; 21 return m_service;
23} 22}
24int BTServiceItem::serviceId() const { 23int BTServiceItem::serviceId() const {
25 return m_service.recHandle(); 24 return m_service.recHandle();
26}; 25};
diff --git a/noncore/net/opietooth/manager/hciconfwrapper.cpp b/noncore/net/opietooth/manager/hciconfwrapper.cpp
index 46eed42..35e9cd9 100644
--- a/noncore/net/opietooth/manager/hciconfwrapper.cpp
+++ b/noncore/net/opietooth/manager/hciconfwrapper.cpp
@@ -1,53 +1,52 @@
1#include "hciconfwrapper.h" 1#include "hciconfwrapper.h"
2 2
3#include <qfile.h> 3#include <qfile.h>
4#include <qtextstream.h> 4#include <qtextstream.h>
5#include <qstringlist.h>
6#include <qregexp.h> 5#include <qregexp.h>
7 6
8namespace OpieTooth { 7namespace OpieTooth {
9 8
10 9
11 HciConfWrapper::HciConfWrapper( const QString &fileName) { 10 HciConfWrapper::HciConfWrapper( const QString &fileName) {
12 m_fileName = fileName; 11 m_fileName = fileName;
13 } 12 }
14 13
15 HciConfWrapper::~HciConfWrapper() { 14 HciConfWrapper::~HciConfWrapper() {
16 } 15 }
17 16
18 17
19 void HciConfWrapper::setPinHelper( const QString& app ) { 18 void HciConfWrapper::setPinHelper( const QString& app ) {
20 setValue( "pin_helper" , app ); 19 setValue( "pin_helper" , app );
21 } 20 }
22 21
23 void HciConfWrapper::setName( const QString &name ) { 22 void HciConfWrapper::setName( const QString &name ) {
24 qDebug ("NAME : " + name); 23 qDebug ("NAME : " + name);
25 setValue( "name" , "\"" + name + "\"" ); 24 setValue( "name" , "\"" + name + "\"" );
26 } 25 }
27 26
28 void HciConfWrapper::setIscan( bool enable) { 27 void HciConfWrapper::setIscan( bool enable) {
29 28
30 if ( enable ) { 29 if ( enable ) {
31 setValue( "iscan" , "enable" ); 30 setValue( "iscan" , "enable" );
32 } else { 31 } else {
33 setValue( "iscan" , "disable" ); 32 setValue( "iscan" , "disable" );
34 } 33 }
35 } 34 }
36 35
37 void HciConfWrapper::setPscan( bool enable) { 36 void HciConfWrapper::setPscan( bool enable) {
38 37
39 if ( enable ) { 38 if ( enable ) {
40 setValue( "pscan" , "enable" ); 39 setValue( "pscan" , "enable" );
41 } else { 40 } else {
42 setValue( "pscan" , "disable" ); 41 setValue( "pscan" , "disable" );
43 } 42 }
44 } 43 }
45 44
46 45
47 void HciConfWrapper::setAuth( bool enable) { 46 void HciConfWrapper::setAuth( bool enable) {
48 47
49 if ( enable ) { 48 if ( enable ) {
50 setValue( "auth" , "enable" ); 49 setValue( "auth" , "enable" );
51 } else { 50 } else {
52 setValue( "auth" , "disable" ); 51 setValue( "auth" , "disable" );
53 } 52 }
diff --git a/noncore/net/opietooth/manager/rfcommassigndialogitem.cpp b/noncore/net/opietooth/manager/rfcommassigndialogitem.cpp
index 1e7130f..a41f304 100644
--- a/noncore/net/opietooth/manager/rfcommassigndialogitem.cpp
+++ b/noncore/net/opietooth/manager/rfcommassigndialogitem.cpp
@@ -1,54 +1,53 @@
1 1
2#include "rfcommassigndialogitem.h" 2#include "rfcommassigndialogitem.h"
3 3
4#include <qlineedit.h> 4#include <qlineedit.h>
5#include <qcombobox.h> 5#include <qcombobox.h>
6#include <qlabel.h>
7#include <qgroupbox.h> 6#include <qgroupbox.h>
8 7
9using namespace OpieTooth; 8using namespace OpieTooth;
10 9
11 10
12RfcommDialogItem::RfcommDialogItem( QWidget* parent, const char* name, WFlags fl ) 11RfcommDialogItem::RfcommDialogItem( QWidget* parent, const char* name, WFlags fl )
13 : RfcommDialogItemBase( parent, name, fl ) { 12 : RfcommDialogItemBase( parent, name, fl ) {
14 13
15} 14}
16 15
17RfcommDialogItem::~RfcommDialogItem() { 16RfcommDialogItem::~RfcommDialogItem() {
18} 17}
19 18
20 19
21int RfcommDialogItem::ident() { 20int RfcommDialogItem::ident() {
22 return m_ident; 21 return m_ident;
23} 22}
24 23
25QString RfcommDialogItem::mac() { 24QString RfcommDialogItem::mac() {
26 return m_macAddress->text(); 25 return m_macAddress->text();
27} 26}
28 27
29int RfcommDialogItem::channel() { 28int RfcommDialogItem::channel() {
30 return m_channelDropdown->currentItem(); 29 return m_channelDropdown->currentItem();
31} 30}
32 31
33QString RfcommDialogItem::comment() { 32QString RfcommDialogItem::comment() {
34 return m_commentLine->text(); 33 return m_commentLine->text();
35} 34}
36 35
37void RfcommDialogItem::setIdent( int ident ) { 36void RfcommDialogItem::setIdent( int ident ) {
38 m_ident = ident; 37 m_ident = ident;
39 m_identLabel->setTitle( QString( "rfcomm%1").arg( ident ) ); 38 m_identLabel->setTitle( QString( "rfcomm%1").arg( ident ) );
40} 39}
41 40
42void RfcommDialogItem::setMac( const QString &mac ) { 41void RfcommDialogItem::setMac( const QString &mac ) {
43 m_macAddress->setText( mac ); 42 m_macAddress->setText( mac );
44} 43}
45 44
46void RfcommDialogItem::setChannel( int channel ) { 45void RfcommDialogItem::setChannel( int channel ) {
47 m_channelDropdown->setCurrentItem( channel ); 46 m_channelDropdown->setCurrentItem( channel );
48} 47}
49 48
50void RfcommDialogItem::setComment( const QString &comment ) { 49void RfcommDialogItem::setComment( const QString &comment ) {
51 m_commentLine->setText( comment ); 50 m_commentLine->setText( comment );
52} 51}
53 52
54 53
diff --git a/noncore/net/wellenreiter/gui/protolistview.cpp b/noncore/net/wellenreiter/gui/protolistview.cpp
index daca095..ed22bdd 100644
--- a/noncore/net/wellenreiter/gui/protolistview.cpp
+++ b/noncore/net/wellenreiter/gui/protolistview.cpp
@@ -1,74 +1,70 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
3** 3**
4** This file is part of Opie Environment. 4** This file is part of Opie Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14**********************************************************************/ 14**********************************************************************/
15 15
16/* LOCAL */ 16/* LOCAL */
17#include "protolistview.h" 17#include "protolistview.h"
18 18
19#include <qcheckbox.h> 19#include <qcheckbox.h>
20#include <qcombobox.h> 20#include <qcombobox.h>
21#include <qhbox.h>
22#include <qvbox.h> 21#include <qvbox.h>
23#include <qpalette.h>
24#include <qcolor.h>
25#include <qlabel.h> 22#include <qlabel.h>
26#include <qframe.h>
27 23
28ProtocolListView::ProtocolListView( QWidget* parent, const char* name, WFlags f ) 24ProtocolListView::ProtocolListView( QWidget* parent, const char* name, WFlags f )
29 :QScrollView( parent, name, f ) 25 :QScrollView( parent, name, f )
30{ 26{
31 parse = ( QString( "parsePackets" ) == QString( name ) ); 27 parse = ( QString( "parsePackets" ) == QString( name ) );
32 28
33 setMargins( 3, 3, 0, 0 ); 29 setMargins( 3, 3, 0, 0 );
34 viewport()->setBackgroundColor( QCheckBox(0).palette().color( QPalette::Active, QColorGroup::Background ) ); 30 viewport()->setBackgroundColor( QCheckBox(0).palette().color( QPalette::Active, QColorGroup::Background ) );
35 31
36 vbox = new QVBox( viewport() ); 32 vbox = new QVBox( viewport() );
37 vbox->setSpacing( 1 ); 33 vbox->setSpacing( 1 );
38 addChild( vbox ); 34 addChild( vbox );
39 35
40 QHBox* hbox = new QHBox( vbox ); 36 QHBox* hbox = new QHBox( vbox );
41 hbox->setSpacing( 40 ); 37 hbox->setSpacing( 40 );
42 new QLabel( tr( "Protocol Family" ), hbox ); 38 new QLabel( tr( "Protocol Family" ), hbox );
43 new QLabel( tr( "Perform Action" ), hbox ); 39 new QLabel( tr( "Perform Action" ), hbox );
44 QFrame* frame = new QFrame( vbox ); 40 QFrame* frame = new QFrame( vbox );
45 frame->setFrameStyle( QFrame::HLine + QFrame::Sunken ); 41 frame->setFrameStyle( QFrame::HLine + QFrame::Sunken );
46 42
47 //TODO: hardcoded for now...a protocol database would be nice!? 43 //TODO: hardcoded for now...a protocol database would be nice!?
48 44
49 //addProtocol( "Ethernet" ); 45 //addProtocol( "Ethernet" );
50 addProtocol( "Prism" ); 46 addProtocol( "Prism" );
51 //addProtocol( "802.11" ); 47 //addProtocol( "802.11" );
52 addProtocol( "802.11 Management" ); 48 addProtocol( "802.11 Management" );
53 addProtocol( "802.11 SSID" ); 49 addProtocol( "802.11 SSID" );
54 addProtocol( "802.11 Rates" ); 50 addProtocol( "802.11 Rates" );
55 addProtocol( "802.11 CF" ); 51 addProtocol( "802.11 CF" );
56 addProtocol( "802.11 FH" ); 52 addProtocol( "802.11 FH" );
57 addProtocol( "802.11 DS" ); 53 addProtocol( "802.11 DS" );
58 addProtocol( "802.11 Tim" ); 54 addProtocol( "802.11 Tim" );
59 addProtocol( "802.11 IBSS" ); 55 addProtocol( "802.11 IBSS" );
60 addProtocol( "802.11 Challenge" ); 56 addProtocol( "802.11 Challenge" );
61 addProtocol( "802.11 Data" ); 57 addProtocol( "802.11 Data" );
62 addProtocol( "802.11 LLC" ); 58 addProtocol( "802.11 LLC" );
63 addProtocol( "802.11 Data" ); 59 addProtocol( "802.11 Data" );
64 addProtocol( "IP" ); 60 addProtocol( "IP" );
65 addProtocol( "ARP" ); 61 addProtocol( "ARP" );
66 addProtocol( "UDP" ); 62 addProtocol( "UDP" );
67 addProtocol( "TCP" ); 63 addProtocol( "TCP" );
68} 64}
69 65
70 66
71ProtocolListView::~ProtocolListView() 67ProtocolListView::~ProtocolListView()
72{ 68{
73} 69}
74 70
diff --git a/noncore/net/wellenreiter/gui/resource.cpp b/noncore/net/wellenreiter/gui/resource.cpp
index a39bbcc..5e5ddc6 100644
--- a/noncore/net/wellenreiter/gui/resource.cpp
+++ b/noncore/net/wellenreiter/gui/resource.cpp
@@ -1,50 +1,49 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
3** 3**
4** This file is part of Opie Environment. 4** This file is part of Opie Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14**********************************************************************/ 14**********************************************************************/
15 15
16#include "resource.h" 16#include "resource.h"
17 17
18#define PIXMAPPATH "/usr/local/share" 18#define PIXMAPPATH "/usr/local/share"
19 19
20#include <qpixmap.h>
21#include <qiconset.h> 20#include <qiconset.h>
22 21
23namespace Resource 22namespace Resource
24{ 23{
25 24
26QPixmap loadPixmap( const QString& pix ) 25QPixmap loadPixmap( const QString& pix )
27{ 26{
28 QString filename; 27 QString filename;
29 filename.sprintf( "%s/%s.png", (const char*) PIXMAPPATH, (const char*) pix ); 28 filename.sprintf( "%s/%s.png", (const char*) PIXMAPPATH, (const char*) pix );
30 QPixmap pixmap( filename ); 29 QPixmap pixmap( filename );
31 if ( pixmap.isNull() ) 30 if ( pixmap.isNull() )
32 { 31 {
33 qDebug( "Wellenreiter::Resource: can't find pixmap " + filename ); 32 qDebug( "Wellenreiter::Resource: can't find pixmap " + filename );
34 } 33 }
35 return pixmap; 34 return pixmap;
36}; 35};
37 36
38QIconSet loadIconSet( const QString& pix ) 37QIconSet loadIconSet( const QString& pix )
39{ 38{
40 QString filename; 39 QString filename;
41 filename.sprintf( "%s/%s.png", (const char*) PIXMAPPATH, (const char*) pix ); 40 filename.sprintf( "%s/%s.png", (const char*) PIXMAPPATH, (const char*) pix );
42 QPixmap pixmap( filename ); 41 QPixmap pixmap( filename );
43 if ( pixmap.isNull() ) 42 if ( pixmap.isNull() )
44 { 43 {
45 qDebug( "Wellenreiter::Resource: can't find pixmap " + filename ); 44 qDebug( "Wellenreiter::Resource: can't find pixmap " + filename );
46 } 45 }
47 return QIconSet( pixmap ); 46 return QIconSet( pixmap );
48}; 47};
49 48
50}; 49};
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp
index b42f1df..c75f9b1 100644
--- a/noncore/net/wellenreiter/gui/scanlist.cpp
+++ b/noncore/net/wellenreiter/gui/scanlist.cpp
@@ -1,71 +1,70 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
3** 3**
4** This file is part of Opie Environment. 4** This file is part of Opie Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14**********************************************************************/ 14**********************************************************************/
15 15
16#include "scanlist.h" 16#include "scanlist.h"
17#include "configwindow.h" 17#include "configwindow.h"
18#include "logwindow.h" 18#include "logwindow.h"
19 19
20#include <assert.h> 20#include <assert.h>
21#include <qcursor.h> 21#include <qcursor.h>
22#include <qdatetime.h> 22#include <qdatetime.h>
23#include <qtextstream.h>
24#include <qpopupmenu.h> 23#include <qpopupmenu.h>
25#include <qcheckbox.h> 24#include <qcheckbox.h>
26 25
27#ifdef QWS 26#ifdef QWS
28#include <qpe/qpeapplication.h> 27#include <qpe/qpeapplication.h>
29#endif 28#endif
30 29
31#ifdef QWS 30#ifdef QWS
32#include <qpe/resource.h> 31#include <qpe/resource.h>
33#else 32#else
34#include "resource.h" 33#include "resource.h"
35#endif 34#endif
36 35
37const int col_type = 0; 36const int col_type = 0;
38const int col_essid = 0; 37const int col_essid = 0;
39const int col_sig = 1; 38const int col_sig = 1;
40const int col_ap = 2; 39const int col_ap = 2;
41const int col_channel = 3; 40const int col_channel = 3;
42const int col_wep = 4; 41const int col_wep = 4;
43const int col_traffic = 5; 42const int col_traffic = 5;
44const int col_ip = 6; 43const int col_ip = 6;
45const int col_manuf = 7; 44const int col_manuf = 7;
46const int col_firstseen = 8; 45const int col_firstseen = 8;
47const int col_lastseen = 9; 46const int col_lastseen = 9;
48const int col_location = 10; 47const int col_location = 10;
49 48
50MScanListView::MScanListView( QWidget* parent, const char* name ) 49MScanListView::MScanListView( QWidget* parent, const char* name )
51 :OListView( parent, name ) 50 :OListView( parent, name )
52{ 51{
53 52
54 setFrameShape( QListView::StyledPanel ); 53 setFrameShape( QListView::StyledPanel );
55 setFrameShadow( QListView::Sunken ); 54 setFrameShadow( QListView::Sunken );
56 55
57 addColumn( tr( "Net/Station" ) ); 56 addColumn( tr( "Net/Station" ) );
58 setColumnAlignment( col_essid, AlignLeft || AlignVCenter ); 57 setColumnAlignment( col_essid, AlignLeft || AlignVCenter );
59 addColumn( tr( "#" ) ); 58 addColumn( tr( "#" ) );
60 setColumnAlignment( col_sig, AlignCenter ); 59 setColumnAlignment( col_sig, AlignCenter );
61 addColumn( tr( "MAC" ) ); 60 addColumn( tr( "MAC" ) );
62 setColumnAlignment( col_ap, AlignCenter ); 61 setColumnAlignment( col_ap, AlignCenter );
63 addColumn( tr( "Chn" ) ); 62 addColumn( tr( "Chn" ) );
64 setColumnAlignment( col_channel, AlignCenter ); 63 setColumnAlignment( col_channel, AlignCenter );
65 addColumn( tr( "W" ) ); 64 addColumn( tr( "W" ) );
66 setColumnAlignment( col_wep, AlignCenter ); 65 setColumnAlignment( col_wep, AlignCenter );
67 addColumn( tr( "T" ) ); 66 addColumn( tr( "T" ) );
68 setColumnAlignment( col_traffic, AlignCenter ); 67 setColumnAlignment( col_traffic, AlignCenter );
69 addColumn( tr( "IP" ) ); 68 addColumn( tr( "IP" ) );
70 setColumnAlignment( col_ip, AlignCenter ); 69 setColumnAlignment( col_ip, AlignCenter );
71 addColumn( tr( "Manufacturer" ) ); 70 addColumn( tr( "Manufacturer" ) );
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
index c2413dc..b8b6730 100644
--- a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
@@ -1,76 +1,67 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
3** 3**
4** This file is part of Opie Environment. 4** This file is part of Opie Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14***********************************************************************/ 14***********************************************************************/
15 15
16#include "wellenreiterbase.h" 16#include "wellenreiterbase.h"
17 17
18#include <qheader.h>
19#include <qlabel.h> 18#include <qlabel.h>
20#include <qlistview.h>
21#include <qmultilineedit.h>
22#include <qpushbutton.h>
23#include <qlayout.h> 19#include <qlayout.h>
24#include <qvariant.h>
25#include <qtooltip.h>
26#include <qwhatsthis.h>
27#include <qimage.h>
28#include <qpixmap.h>
29 20
30#include "logwindow.h" 21#include "logwindow.h"
31#include "hexwindow.h" 22#include "hexwindow.h"
32#include "scanlist.h" 23#include "scanlist.h"
33#include "statwindow.h" 24#include "statwindow.h"
34#include "graphwindow.h" 25#include "graphwindow.h"
35 26
36#ifdef QWS 27#ifdef QWS
37#include <qpe/resource.h> 28#include <qpe/resource.h>
38#include <opie2/otabwidget.h> 29#include <opie2/otabwidget.h>
39using namespace Opie; 30using namespace Opie;
40#else 31#else
41#include "resource.h" 32#include "resource.h"
42#include <qtabwidget.h> 33#include <qtabwidget.h>
43#endif 34#endif
44 35
45 36
46/* 37/*
47 * Constructs a WellenreiterBase which is a child of 'parent', with the 38 * Constructs a WellenreiterBase which is a child of 'parent', with the
48 * name 'name' and widget flags set to 'f' 39 * name 'name' and widget flags set to 'f'
49 */ 40 */
50WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags fl ) 41WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags fl )
51 : QWidget( parent, name, fl ) 42 : QWidget( parent, name, fl )
52{ 43{
53 //ani1 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot0" ) ); 44 //ani1 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot0" ) );
54 //ani2 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot90" ) ); 45 //ani2 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot90" ) );
55 //ani3 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot180" ) ); 46 //ani3 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot180" ) );
56 //ani4 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot270" ) ); 47 //ani4 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot270" ) );
57 48
58 if ( !name ) 49 if ( !name )
59 setName( "WellenreiterBase" ); 50 setName( "WellenreiterBase" );
60 resize( 191, 294 ); 51 resize( 191, 294 );
61#ifdef QWS 52#ifdef QWS
62 setCaption( tr( "Wellenreiter/Opie" ) ); 53 setCaption( tr( "Wellenreiter/Opie" ) );
63#else 54#else
64 setCaption( tr( "Wellenreiter/X11" ) ); 55 setCaption( tr( "Wellenreiter/X11" ) );
65#endif 56#endif
66 WellenreiterBaseLayout = new QVBoxLayout( this ); 57 WellenreiterBaseLayout = new QVBoxLayout( this );
67 WellenreiterBaseLayout->setSpacing( 2 ); 58 WellenreiterBaseLayout->setSpacing( 2 );
68 WellenreiterBaseLayout->setMargin( 0 ); 59 WellenreiterBaseLayout->setMargin( 0 );
69#ifdef QWS 60#ifdef QWS
70 TabWidget = new OTabWidget( this, "TabWidget", OTabWidget::Global ); 61 TabWidget = new OTabWidget( this, "TabWidget", OTabWidget::Global );
71#else 62#else
72 TabWidget = new QTabWidget( this, "TabWidget" ); 63 TabWidget = new QTabWidget( this, "TabWidget" );
73#endif 64#endif
74 ap = new QWidget( TabWidget, "ap" ); 65 ap = new QWidget( TabWidget, "ap" );
75 apLayout = new QVBoxLayout( ap ); 66 apLayout = new QVBoxLayout( ap );
76 apLayout->setSpacing( 2 ); 67 apLayout->setSpacing( 2 );