summaryrefslogtreecommitdiff
authorar <ar>2004-02-21 15:27:41 (UTC)
committer ar <ar>2004-02-21 15:27:41 (UTC)
commit460258f203be746ff79e14f32a823f381b8ea513 (patch) (side-by-side diff)
tree87dddbacda3050027d343730cf021b53045e80cb
parent76b70b355d2c1c32c0f74e844e0654e39db2a175 (diff)
downloadopie-460258f203be746ff79e14f32a823f381b8ea513.zip
opie-460258f203be746ff79e14f32a823f381b8ea513.tar.gz
opie-460258f203be746ff79e14f32a823f381b8ea513.tar.bz2
improve support for BigScreen
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/accountitem.cpp259
-rw-r--r--noncore/net/mail/accountview.cpp40
-rw-r--r--noncore/net/mail/addresspicker.cpp54
-rw-r--r--noncore/net/mail/editaccounts.cpp153
-rw-r--r--noncore/net/mail/opiemail.cpp101
-rw-r--r--noncore/net/mail/viewmail.cpp151
-rw-r--r--noncore/net/opieirc/ircservereditor.cpp10
-rw-r--r--noncore/net/opieirc/ircserverlist.cpp72
-rw-r--r--noncore/net/opieirc/ircsettings.cpp22
-rw-r--r--noncore/net/opietooth/blue-pin/pindlg.cc39
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp201
-rw-r--r--noncore/net/opietooth/manager/obexpopup.cpp22
-rw-r--r--noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp41
-rw-r--r--noncore/net/opietooth/manager/rfcpopup.cpp35
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp5
15 files changed, 791 insertions, 414 deletions
diff --git a/noncore/net/mail/accountitem.cpp b/noncore/net/mail/accountitem.cpp
index 2d3cd4b..c8f6ec4 100644
--- a/noncore/net/mail/accountitem.cpp
+++ b/noncore/net/mail/accountitem.cpp
@@ -1,7 +1,9 @@
+
#include "accountitem.h"
#include "accountview.h"
-#include <qpopupmenu.h>
-#include <qmessagebox.h>
#include "selectstore.h"
#include "newmaildir.h"
+#include "defines.h"
+
+/* OPIE */
#include <libmailwrapper/mailtypes.h>
@@ -9,3 +11,7 @@
#include <libmailwrapper/mailwrapper.h>
-#include "defines.h"
+#include <qpe/qpeapplication.h>
+
+/* QT */
+#include <qpopupmenu.h>
+#include <qmessagebox.h>
@@ -22,5 +28,8 @@ POP3viewItem::POP3viewItem( POP3account *a, AccountView *parent )
#if 0
- if (!account->getOffline()) {
+ if (!account->getOffline())
+ {
setPixmap( 0, );
- } else {
+ }
+ else
+ {
setPixmap( 0, PIXMAP_OFFLINE );
@@ -52,3 +61,4 @@ void POP3viewItem::refresh()
QListViewItem *child = firstChild();
- while ( child ) {
+ while ( child )
+ {
QListViewItem *tmp = child;
@@ -59,3 +69,4 @@ void POP3viewItem::refresh()
QListViewItem*item = 0;
- for ( it = folders->first(); it; it = folders->next() ) {
+ for ( it = folders->first(); it; it = folders->next() )
+ {
item = new POP3folderItem( it, this , item );
@@ -77,7 +88,11 @@ QPopupMenu * POP3viewItem::getContextMenu()
QPopupMenu *m = new QPopupMenu(0);
- if (m) {
- if (!account->getOffline()) {
+ if (m)
+ {
+ if (!account->getOffline())
+ {
m->insertItem(QObject::tr("Disconnect",contextName),0);
m->insertItem(QObject::tr("Set offline",contextName),1);
- } else {
+ }
+ else
+ {
m->insertItem(QObject::tr("Set online",contextName),1);
@@ -91,3 +106,4 @@ void POP3viewItem::disconnect()
QListViewItem *child = firstChild();
- while ( child ) {
+ while ( child )
+ {
QListViewItem *tmp = child;
@@ -101,3 +117,4 @@ void POP3viewItem::setOnOffline()
{
- if (!account->getOffline()) {
+ if (!account->getOffline())
+ {
disconnect();
@@ -112,3 +129,4 @@ void POP3viewItem::contextMenuSelected(int which)
{
- switch (which) {
+ switch (which)
+ {
case 0:
@@ -123,4 +141,3 @@ void POP3viewItem::contextMenuSelected(int which)
POP3folderItem::~POP3folderItem()
-{
-}
+{}
@@ -131,5 +148,8 @@ POP3folderItem::POP3folderItem( Folder *folderInit, POP3viewItem *parent , QList
pop3 = parent;
- if (folder->getDisplayName().lower()!="inbox") {
+ if (folder->getDisplayName().lower()!="inbox")
+ {
setPixmap( 0, PIXMAP_POP3FOLDER );
- } else {
+ }
+ else
+ {
setPixmap( 0, PIXMAP_INBOXFOLDER);
@@ -153,3 +173,4 @@ QPopupMenu * POP3folderItem::getContextMenu()
QPopupMenu *m = new QPopupMenu(0);
- if (m) {
+ if (m)
+ {
m->insertItem(QObject::tr("Refresh header list",contextName),0);
@@ -171,3 +192,4 @@ void POP3folderItem::contextMenuSelected(int which)
AccountView * view = (AccountView*)listView();
- switch (which) {
+ switch (which)
+ {
case 0:
@@ -238,4 +260,6 @@ void IMAPviewItem::refreshFolders(bool force)
- for ( it = folders->first(); it; it = folders->next() ) {
- if (it->getDisplayName().lower()=="inbox") {
+ for ( it = folders->first(); it; it = folders->next() )
+ {
+ if (it->getDisplayName().lower()=="inbox")
+ {
item = new IMAPfolderItem( it, this , item );
@@ -246,3 +270,4 @@ void IMAPviewItem::refreshFolders(bool force)
}
- for ( it = folders->first(); it; it = folders->next() ) {
+ for ( it = folders->first(); it; it = folders->next() )
+ {
fname = it->getDisplayName();
@@ -250,3 +275,4 @@ void IMAPviewItem::refreshFolders(bool force)
pos = fname.findRev(it->Separator());
- if (pos != -1) {
+ if (pos != -1)
+ {
fname = fname.left(pos);
@@ -254,3 +280,4 @@ void IMAPviewItem::refreshFolders(bool force)
IMAPfolderItem*pitem = (IMAPfolderItem*)findSubItem(fname);
- if (pitem) {
+ if (pitem)
+ {
titem = item;
@@ -260,3 +287,5 @@ void IMAPviewItem::refreshFolders(bool force)
item = titem;
- } else {
+ }
+ else
+ {
item = new IMAPfolderItem( it, this , item );
@@ -270,4 +299,6 @@ QPopupMenu * IMAPviewItem::getContextMenu()
QPopupMenu *m = new QPopupMenu(0);
- if (m) {
- if (!account->getOffline()) {
+ if (m)
+ {
+ if (!account->getOffline())
+ {
m->insertItem(QObject::tr("Refresh folder list",contextName),0);
@@ -277,3 +308,5 @@ QPopupMenu * IMAPviewItem::getContextMenu()
m->insertItem(QObject::tr("Set offline",contextName),3);
- } else {
+ }
+ else
+ {
m->insertItem(QObject::tr("Set online",contextName),3);
@@ -287,4 +320,4 @@ void IMAPviewItem::createNewFolder()
Newmdirdlg ndirdlg;
- ndirdlg.showMaximized();
- if (ndirdlg.exec()) {
+ if ( QPEApplication::execDialog( &ndirdlg ))
+ {
QString ndir = ndirdlg.Newdir();
@@ -293,6 +326,8 @@ void IMAPviewItem::createNewFolder()
IMAPfolderItem*item = (IMAPfolderItem*)firstChild();
- if (item) {
+ if (item)
+ {
delemiter = item->Delemiter();
}
- if (wrapper->createMbox(ndir,0,delemiter,makesubs)) {
+ if (wrapper->createMbox(ndir,0,delemiter,makesubs))
+ {
refreshFolders(true);
@@ -305,3 +340,4 @@ void IMAPviewItem::contextMenuSelected(int id)
qDebug("Id selected: %i",id);
- switch (id) {
+ switch (id)
+ {
case 0:
@@ -317,3 +353,4 @@ void IMAPviewItem::contextMenuSelected(int id)
case 3:
- if (account->getOffline()==false) {
+ if (account->getOffline()==false)
+ {
removeChilds();
@@ -346,5 +383,8 @@ IMAPfolderItem::IMAPfolderItem( Folder *folderInit, IMAPviewItem *parent , QList
imap = parent;
- if (folder->getDisplayName().lower()!="inbox") {
+ if (folder->getDisplayName().lower()!="inbox")
+ {
setPixmap( 0, PIXMAP_IMAPFOLDER );
- } else {
+ }
+ else
+ {
setPixmap( 0, PIXMAP_INBOXFOLDER);
@@ -359,5 +399,8 @@ IMAPfolderItem::IMAPfolderItem( Folder *folderInit, IMAPfolderItem *parent , QLi
imap = master;
- if (folder->getDisplayName().lower()!="inbox") {
+ if (folder->getDisplayName().lower()!="inbox")
+ {
setPixmap( 0, PIXMAP_IMAPFOLDER );
- } else {
+ }
+ else
+ {
setPixmap( 0, PIXMAP_INBOXFOLDER);
@@ -368,4 +411,3 @@ IMAPfolderItem::IMAPfolderItem( Folder *folderInit, IMAPfolderItem *parent , QLi
IMAPfolderItem::~IMAPfolderItem()
-{
-}
+{}
@@ -378,5 +420,8 @@ void IMAPfolderItem::refresh(QList<RecMail>&target)
{
- if (folder->may_select()) {
+ if (folder->may_select())
+ {
imap->getWrapper()->listMessages( folder->getName(),target );
- } else {
+ }
+ else
+ {
target.clear();
@@ -393,4 +438,6 @@ QPopupMenu * IMAPfolderItem::getContextMenu()
QPopupMenu *m = new QPopupMenu(0);
- if (m) {
- if (folder->may_select()) {
+ if (m)
+ {
+ if (folder->may_select())
+ {
m->insertItem(QObject::tr("Refresh header list",contextName),0);
@@ -399,6 +446,8 @@ QPopupMenu * IMAPfolderItem::getContextMenu()
}
- if (folder->no_inferior()==false) {
+ if (folder->no_inferior()==false)
+ {
m->insertItem(QObject::tr("Create new subfolder",contextName),2);
}
- if (folder->getDisplayName().lower()!="inbox") {
+ if (folder->getDisplayName().lower()!="inbox")
+ {
m->insertItem(QObject::tr("Delete folder",contextName),3);
@@ -412,4 +461,4 @@ void IMAPfolderItem::createNewFolder()
Newmdirdlg ndirdlg;
- ndirdlg.showMaximized();
- if (ndirdlg.exec()) {
+ if ( QPEApplication::execDialog( &ndirdlg ) )
+ {
QString ndir = ndirdlg.Newdir();
@@ -417,3 +466,4 @@ void IMAPfolderItem::createNewFolder()
QString delemiter = Delemiter();
- if (imap->wrapper->createMbox(ndir,folder,delemiter,makesubs)) {
+ if (imap->wrapper->createMbox(ndir,folder,delemiter,makesubs))
+ {
imap->refreshFolders(true);
@@ -430,4 +480,6 @@ void IMAPfolderItem::deleteFolder()
qDebug("Auswahl: %i",yesno);
- if (yesno == 0) {
- if (imap->getWrapper()->deleteMbox(folder)) {
+ if (yesno == 0)
+ {
+ if (imap->getWrapper()->deleteMbox(folder))
+ {
QListView*v=listView();
@@ -437,3 +489,4 @@ void IMAPfolderItem::deleteFolder()
imap->refreshFolders(true);
- if (v) {
+ if (v)
+ {
v->setSelected(box,true);
@@ -455,3 +508,4 @@ void IMAPfolderItem::contextMenuSelected(int id)
AccountView * view = (AccountView*)listView();
- switch(id) {
+ switch(id)
+ {
case 0:
@@ -520,6 +574,8 @@ void MHviewItem::refresh(bool force)
int pos;
- for ( it = folders->first(); it; it = folders->next() ) {
+ for ( it = folders->first(); it; it = folders->next() )
+ {
fname = it->getDisplayName();
/* this folder itself */
- if (fname=="/") {
+ if (fname=="/")
+ {
currentFolders.append(fname);
@@ -530,11 +586,17 @@ void MHviewItem::refresh(bool force)
pos = fname.findRev("/");
- if (pos > 0) {
+ if (pos > 0)
+ {
fname = fname.left(pos);
pmaster = (MHfolderItem*)findSubItem(fname);
- } else {
+ }
+ else
+ {
pmaster = 0;
}
- if (pmaster) {
+ if (pmaster)
+ {
item = new MHfolderItem( it, pmaster, item, this );
- } else {
+ }
+ else
+ {
item = new MHfolderItem( it, this , item );
@@ -557,3 +619,4 @@ QPopupMenu * MHviewItem::getContextMenu()
QPopupMenu *m = new QPopupMenu(0);
- if (m) {
+ if (m)
+ {
m->insertItem(QObject::tr("Refresh folder list",contextName),0);
@@ -569,6 +632,7 @@ void MHviewItem::createFolder()
Newmdirdlg ndirdlg(0,0,true);
- ndirdlg.showMaximized();
- if (ndirdlg.exec()) {
+ if ( QPEApplication::execDialog( &ndirdlg ) )
+ {
QString ndir = ndirdlg.Newdir();
- if (wrapper->createMbox(ndir)) {
+ if (wrapper->createMbox(ndir))
+ {
refresh(true);
@@ -592,3 +656,4 @@ void MHviewItem::contextMenuSelected(int which)
{
- switch (which) {
+ switch (which)
+ {
case 0:
@@ -611,4 +676,3 @@ void MHviewItem::contextMenuSelected(int which)
MHfolderItem::~MHfolderItem()
-{
-}
+{}
@@ -633,3 +697,4 @@ void MHfolderItem::initName()
QString bName = folder->getDisplayName();
- if (bName.startsWith("/")&&bName.length()>1) {
+ if (bName.startsWith("/")&&bName.length()>1)
+ {
bName.replace(0,1,"");
@@ -637,10 +702,16 @@ void MHfolderItem::initName()
int pos = bName.findRev("/");
- if (pos > 0) {
+ if (pos > 0)
+ {
bName.replace(0,pos+1,"");
}
- if (bName.lower() == "outgoing") {
+ if (bName.lower() == "outgoing")
+ {
setPixmap( 0, PIXMAP_OUTBOXFOLDER );
- } else if (bName.lower() == "inbox") {
+ }
+ else if (bName.lower() == "inbox")
+ {
setPixmap( 0, PIXMAP_INBOXFOLDER);
- } else {
+ }
+ else
+ {
setPixmap( 0, PIXMAP_MBOXFOLDER );
@@ -673,4 +744,6 @@ void MHfolderItem::deleteFolder()
qDebug("Auswahl: %i",yesno);
- if (yesno == 0) {
- if (mbox->getWrapper()->deleteMbox(folder)) {
+ if (yesno == 0)
+ {
+ if (mbox->getWrapper()->deleteMbox(folder))
+ {
QListView*v=listView();
@@ -680,3 +753,4 @@ void MHfolderItem::deleteFolder()
mbox->refresh(true);
- if (v) {
+ if (v)
+ {
v->setSelected(box,true);
@@ -690,3 +764,4 @@ QPopupMenu * MHfolderItem::getContextMenu()
QPopupMenu *m = new QPopupMenu(0);
- if (m) {
+ if (m)
+ {
m->insertItem(QObject::tr("Move/Copie all mails",contextName),2);
@@ -709,6 +784,7 @@ void MHfolderItem::createFolder()
Newmdirdlg ndirdlg(0,0,true);
- ndirdlg.showMaximized();
- if (ndirdlg.exec()) {
+ if ( QPEApplication::execDialog( &ndirdlg ) )
+ {
QString ndir = ndirdlg.Newdir();
- if (mbox->getWrapper()->createMbox(ndir,folder)) {
+ if (mbox->getWrapper()->createMbox(ndir,folder))
+ {
QListView*v=listView();
@@ -718,3 +794,4 @@ void MHfolderItem::createFolder()
mbox->refresh(true);
- if (v) {
+ if (v)
+ {
v->setSelected(box,true);
@@ -727,3 +804,4 @@ void MHfolderItem::contextMenuSelected(int which)
{
- switch(which) {
+ switch(which)
+ {
case 0:
@@ -797,4 +875,6 @@ void AccountViewItem::deleteAllMail(AbstractMail*wrapper,Folder*folder)
qDebug("Auswahl: %i",yesno);
- if (yesno == 0) {
- if (wrapper->deleteAllMail(folder)) {
+ if (yesno == 0)
+ {
+ if (wrapper->deleteAllMail(folder))
+ {
AccountView * view = (AccountView*)listView();
@@ -808,3 +888,4 @@ void AccountViewItem::removeChilds()
QListViewItem *child = firstChild();
- while ( child ) {
+ while ( child )
+ {
QListViewItem *tmp = child;
@@ -827,9 +908,13 @@ AccountViewItem*AccountViewItem::findSubItem(const QString&path,AccountViewItem*
else pitem = (AccountViewItem*)start->firstChild();
- while (pitem) {
- if (pitem->matchName(path)) {
+ while (pitem)
+ {
+ if (pitem->matchName(path))
+ {
break;
}
- if (pitem->childCount()>0) {
+ if (pitem->childCount()>0)
+ {
sitem = findSubItem(path,pitem);
- if (sitem) {
+ if (sitem)
+ {
pitem = sitem;
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp
index d9792d4..2ddf834 100644
--- a/noncore/net/mail/accountview.cpp
+++ b/noncore/net/mail/accountview.cpp
@@ -1 +1,2 @@
+
#include "accountview.h"
@@ -3,4 +4,4 @@
#include "selectstore.h"
-#include <qmessagebox.h>
-#include <qpopupmenu.h>
+
+/* OPIE */
#include <libmailwrapper/settings.h>
@@ -9,3 +10,7 @@
#include <libmailwrapper/abstractmail.h>
+#include <qpe/qpeapplication.h>
+/* QT */
+#include <qmessagebox.h>
+#include <qpopupmenu.h>
@@ -57,4 +62,6 @@ void AccountView::populate( QList<Account> list )
Account *it;
- for ( it = list.first(); it; it = list.next() ) {
- if ( it->getType().compare( "IMAP" ) == 0 ) {
+ for ( it = list.first(); it; it = list.next() )
+ {
+ if ( it->getType().compare( "IMAP" ) == 0 )
+ {
IMAPaccount *imap = static_cast<IMAPaccount *>(it);
@@ -62,3 +69,5 @@ void AccountView::populate( QList<Account> list )
imapAccounts.append(new IMAPviewItem( imap, this ));
- } else if ( it->getType().compare( "POP3" ) == 0 ) {
+ }
+ else if ( it->getType().compare( "POP3" ) == 0 )
+ {
POP3account *pop3 = static_cast<POP3account *>(it);
@@ -71,6 +80,8 @@ void AccountView::populate( QList<Account> list )
-void AccountView::refresh(QListViewItem *item) {
+void AccountView::refresh(QListViewItem *item)
+{
qDebug("AccountView refresh...");
- if ( item ) {
+ if ( item )
+ {
m_currentItem = item;
@@ -97,3 +108,2 @@ void AccountView::refreshAll()
{
-
}
@@ -110,6 +120,7 @@ void AccountView::setupFolderselect(Selectstore*sels)
{
- sels->showMaximized();
+ QPEApplication::showDialog( sels );
QStringList sFolders;
unsigned int i = 0;
- for (i=0; i < mhAccounts.count();++i) {
+ for (i=0; i < mhAccounts.count();++i)
+ {
mhAccounts[i]->refresh(false);
@@ -118,3 +129,4 @@ void AccountView::setupFolderselect(Selectstore*sels)
}
- for (i=0; i < imapAccounts.count();++i) {
+ for (i=0; i < imapAccounts.count();++i)
+ {
if (imapAccounts[i]->offline())
@@ -136,6 +148,8 @@ void AccountView::downloadMails(Folder*fromFolder,AbstractMail*fromWrapper)
if ( (fromWrapper==targetMail && fromFolder->getName()==targetFolder) ||
- targetFolder.isEmpty()) {
+ targetFolder.isEmpty())
+ {
return;
}
- if (sels.newFolder() && !targetMail->createMbox(targetFolder)) {
+ if (sels.newFolder() && !targetMail->createMbox(targetFolder))
+ {
QMessageBox::critical(0,tr("Error creating new Folder"),
diff --git a/noncore/net/mail/addresspicker.cpp b/noncore/net/mail/addresspicker.cpp
index f4f4cea..8cdabde 100644
--- a/noncore/net/mail/addresspicker.cpp
+++ b/noncore/net/mail/addresspicker.cpp
@@ -1 +1,11 @@
+
+#include "composemail.h"
+
+/* OPIE */
+#include <opie2/ocontactaccess.h>
+#include <opie2/ocontact.h>
+#include <qpe/resource.h>
+#include <qpe/qpeapplication.h>
+
+/* QT */
#include <qpushbutton.h>
@@ -6,11 +16,5 @@
-#include <qpe/resource.h>
-#include <opie2/ocontactaccess.h>
-#include <opie2/ocontact.h>
-
-
+/* STD */
#include <stdlib.h>
-#include "composemail.h"
-
AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFlags flags )
@@ -32,9 +36,14 @@ AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFl
Opie::OContactAccess::List m_list = m_contactdb.sorted( true, 0, 0, 0 );
- for ( it = m_list.begin(); it != m_list.end(); ++it ) {
- if ((*it).defaultEmail().length()!=0) {
+ for ( it = m_list.begin(); it != m_list.end(); ++it )
+ {
+ if ((*it).defaultEmail().length()!=0)
+ {
mails = (*it).emailList();
- if ((*it).fileAs().length()>0) {
+ if ((*it).fileAs().length()>0)
+ {
pre = "\""+(*it).firstName()+" "+(*it).lastName()+"\" <";
suf = ">";
- } else {
+ }
+ else
+ {
pre = "";
@@ -43,3 +52,4 @@ AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFl
QStringList::ConstIterator sit = mails.begin();
- for (;sit!=mails.end();++sit) {
+ for (;sit!=mails.end();++sit)
+ {
contactLine=pre+(*sit)+suf;
@@ -49,3 +59,4 @@ AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFl
}
- if ( addressList->count() <= 0 ) {
+ if ( addressList->count() <= 0 )
+ {
#if 0
@@ -57,3 +68,5 @@ AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFl
okButton->setEnabled( false );
- } else {
+ }
+ else
+ {
// addressList->sort();
@@ -67,3 +80,4 @@ void AddressPicker::accept()
- while ( item ) {
+ while ( item )
+ {
if ( item->selected() )
@@ -74,3 +88,4 @@ void AddressPicker::accept()
- if ( names.isEmpty() ) {
+ if ( names.isEmpty() )
+ {
QMessageBox::information(this, tr("Error"), tr("<p>You have to select"
@@ -89,7 +104,6 @@ QString AddressPicker::getNames()
AddressPicker picker(0, 0, true);
- picker.showMaximized();
- picker.show();
- int ret = picker.exec();
- if ( QDialog::Accepted == ret ) {
+ int ret = QPEApplication::execDialog( &picker );
+ if ( QDialog::Accepted == ret )
+ {
return picker.selectedNames;
diff --git a/noncore/net/mail/editaccounts.cpp b/noncore/net/mail/editaccounts.cpp
index 1cb202e..60bffa5 100644
--- a/noncore/net/mail/editaccounts.cpp
+++ b/noncore/net/mail/editaccounts.cpp
@@ -1,2 +1 @@
-#include <qt.h>
@@ -5,2 +4,8 @@
+/* OPIE */
+#include <qpe/qpeapplication.h>
+
+/* QT */
+#include <qt.h>
+
AccountListItem::AccountListItem( QListView *parent, Account *a)
@@ -41,6 +46,10 @@ void EditAccounts::slotFillLists()
Account *it;
- for ( it = accounts.first(); it; it = accounts.next() ) {
- if ( it->getType().compare( "NNTP" ) == 0 ) {
+ for ( it = accounts.first(); it; it = accounts.next() )
+ {
+ if ( it->getType().compare( "NNTP" ) == 0 )
+ {
(void) new AccountListItem( newsList, it );
- } else {
+ }
+ else
+ {
(void) new AccountListItem( mailList, it );
@@ -56,3 +65,4 @@ void EditAccounts::slotNewMail()
selType.show();
- if ( QDialog::Accepted == selType.exec() ) {
+ if ( QDialog::Accepted == selType.exec() )
+ {
slotNewAccount( *selection );
@@ -63,3 +73,4 @@ void EditAccounts::slotNewAccount( const QString &type )
{
- if ( type.compare( "IMAP" ) == 0 ) {
+ if ( type.compare( "IMAP" ) == 0 )
+ {
qDebug( "-> config IMAP" );
@@ -67,4 +78,4 @@ void EditAccounts::slotNewAccount( const QString &type )
IMAPconfig imap( account, this, 0, true );
- imap.showMaximized();
- if ( QDialog::Accepted == imap.exec() ) {
+ if ( QDialog::Accepted == QPEApplication::execDialog( &imap ) )
+ {
settings->addAccount( account );
@@ -72,6 +83,10 @@ void EditAccounts::slotNewAccount( const QString &type )
slotFillLists();
- } else {
+ }
+ else
+ {
account->remove();
}
- } else if ( type.compare( "POP3" ) == 0 ) {
+ }
+ else if ( type.compare( "POP3" ) == 0 )
+ {
qDebug( "-> config POP3" );
@@ -79,4 +94,4 @@ void EditAccounts::slotNewAccount( const QString &type )
POP3config pop3( account, this, 0, true, WStyle_ContextHelp );
- pop3.showMaximized();
- if ( QDialog::Accepted == pop3.exec() ) {
+ if ( QDialog::Accepted == QPEApplication::execDialog( &pop3 ) )
+ {
settings->addAccount( account );
@@ -84,6 +99,10 @@ void EditAccounts::slotNewAccount( const QString &type )
slotFillLists();
- } else {
+ }
+ else
+ {
account->remove();
}
- } else if ( type.compare( "SMTP" ) == 0 ) {
+ }
+ else if ( type.compare( "SMTP" ) == 0 )
+ {
qDebug( "-> config SMTP" );
@@ -91,4 +110,4 @@ void EditAccounts::slotNewAccount( const QString &type )
SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp );
- smtp.showMaximized();
- if ( QDialog::Accepted == smtp.exec() ) {
+ if ( QDialog::Accepted == QPEApplication::execDialog( &smtp ) )
+ {
settings->addAccount( account );
@@ -97,6 +116,10 @@ void EditAccounts::slotNewAccount( const QString &type )
- } else {
+ }
+ else
+ {
account->remove();
}
- } else if ( type.compare( "NNTP" ) == 0 ) {
+ }
+ else if ( type.compare( "NNTP" ) == 0 )
+ {
qDebug( "-> config NNTP" );
@@ -104,4 +127,4 @@ void EditAccounts::slotNewAccount( const QString &type )
NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp );
- nntp.showMaximized();
- if ( QDialog::Accepted == nntp.exec() ) {
+ if ( QDialog::Accepted == QPEApplication::execDialog( &nntp ) )
+ {
settings->addAccount( account );
@@ -109,3 +132,5 @@ void EditAccounts::slotNewAccount( const QString &type )
slotFillLists();
- } else {
+ }
+ else
+ {
account->remove();
@@ -117,28 +142,35 @@ void EditAccounts::slotEditAccount( Account *account )
{
- if ( account->getType().compare( "IMAP" ) == 0 ) {
+ if ( account->getType().compare( "IMAP" ) == 0 )
+ {
IMAPaccount *imapAcc = static_cast<IMAPaccount *>(account);
IMAPconfig imap( imapAcc, this, 0, true, WStyle_ContextHelp );
- imap.showMaximized();
- if ( QDialog::Accepted == imap.exec() ) {
+ if ( QDialog::Accepted == QPEApplication::execDialog( &imap ) )
+ {
slotFillLists();
}
- } else if ( account->getType().compare( "POP3" ) == 0 ) {
+ }
+ else if ( account->getType().compare( "POP3" ) == 0 )
+ {
POP3account *pop3Acc = static_cast<POP3account *>(account);
POP3config pop3( pop3Acc, this, 0, true, WStyle_ContextHelp );
- pop3.showMaximized();
- if ( QDialog::Accepted == pop3.exec() ) {
+ if ( QDialog::Accepted == QPEApplication::execDialog( &pop3 ) )
+ {
slotFillLists();
}
- } else if ( account->getType().compare( "SMTP" ) == 0 ) {
+ }
+ else if ( account->getType().compare( "SMTP" ) == 0 )
+ {
SMTPaccount *smtpAcc = static_cast<SMTPaccount *>(account);
SMTPconfig smtp( smtpAcc, this, 0, true, WStyle_ContextHelp );
- smtp.showMaximized();
- if ( QDialog::Accepted == smtp.exec() ) {
+ if ( QDialog::Accepted == QPEApplication::execDialog( &smtp ) )
+ {
slotFillLists();
}
- } else if ( account->getType().compare( "NNTP" ) == 0 ) {
+ }
+ else if ( account->getType().compare( "NNTP" ) == 0 )
+ {
NNTPaccount *nntpAcc = static_cast<NNTPaccount *>(account);
NNTPconfig nntp( nntpAcc, this, 0, true, WStyle_ContextHelp );
- nntp.showMaximized();
- if ( QDialog::Accepted == nntp.exec() ) {
+ if ( QDialog::Accepted == QPEApplication::execDialog( &nntp ) )
+ {
slotFillLists();
@@ -152,3 +184,4 @@ void EditAccounts::slotDeleteAccount( Account *account )
tr( "<p>Do you really want to delete the selected Account?</p>" ),
- tr( "Yes" ), tr( "No" ) ) == 0 ) {
+ tr( "Yes" ), tr( "No" ) ) == 0 )
+ {
settings->delAccount( account );
@@ -161,3 +194,4 @@ void EditAccounts::slotEditMail()
qDebug( "Edit Mail Account" );
- if ( !mailList->currentItem() ) {
+ if ( !mailList->currentItem() )
+ {
QMessageBox::information( this, tr( "Error" ),
@@ -174,3 +208,4 @@ void EditAccounts::slotDeleteMail()
{
- if ( !mailList->currentItem() ) {
+ if ( !mailList->currentItem() )
+ {
QMessageBox::information( this, tr( "Error" ),
@@ -194,3 +229,4 @@ void EditAccounts::slotEditNews()
qDebug( "Edit News Account" );
- if ( !newsList->currentItem() ) {
+ if ( !newsList->currentItem() )
+ {
QMessageBox::information( this, tr( "Error" ),
@@ -208,3 +244,4 @@ void EditAccounts::slotDeleteNews()
qDebug( "Delete News Account" );
- if ( !newsList->currentItem() ) {
+ if ( !newsList->currentItem() )
+ {
QMessageBox::information( this, tr( "Error" ),
@@ -279,8 +316,13 @@ void IMAPconfig::slotConnectionToggle( int index )
{
- if ( index == 2 ) {
+ if ( index == 2 )
+ {
portLine->setText( IMAP_SSL_PORT );
- } else if ( index == 3 ) {
+ }
+ else if ( index == 3 )
+ {
portLine->setText( IMAP_PORT );
CommandEdit->show();
- } else {
+ }
+ else
+ {
portLine->setText( IMAP_PORT );
@@ -335,8 +377,13 @@ void POP3config::slotConnectionToggle( int index )
// 2 is ssl connection
- if ( index == 2 ) {
+ if ( index == 2 )
+ {
portLine->setText( POP3_SSL_PORT );
- } else if ( index == 3 ) {
+ }
+ else if ( index == 3 )
+ {
portLine->setText( POP3_PORT );
CommandEdit->show();
- } else {
+ }
+ else
+ {
portLine->setText( POP3_PORT );
@@ -393,8 +440,13 @@ void SMTPconfig::slotConnectionToggle( int index )
// 2 is ssl connection
- if ( index == 2 ) {
+ if ( index == 2 )
+ {
portLine->setText( SMTP_SSL_PORT );
- } else if ( index == 3 ) {
+ }
+ else if ( index == 3 )
+ {
portLine->setText( SMTP_PORT );
CommandEdit->show();
- } else {
+ }
+ else
+ {
portLine->setText( SMTP_PORT );
@@ -446,5 +498,8 @@ void NNTPconfig::slotSSL( bool enabled )
{
- if ( enabled ) {
+ if ( enabled )
+ {
portLine->setText( NNTP_SSL_PORT );
- } else {
+ }
+ else
+ {
portLine->setText( NNTP_PORT );
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp
index 0795436..abf93dc 100644
--- a/noncore/net/mail/opiemail.cpp
+++ b/noncore/net/mail/opiemail.cpp
@@ -1,2 +1,2 @@
-#include <qmessagebox.h>
+
#include "settingsdialog.h"
@@ -5,13 +5,19 @@
#include "composemail.h"
+#include "mailistviewitem.h"
+#include "viewmail.h"
+#include "selectstore.h"
+#include "selectsmtp.h"
+
+/* OPIE */
#include <libmailwrapper/smtpwrapper.h>
+#include <libmailwrapper/mailtypes.h>
+#include <libmailwrapper/abstractmail.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/resource.h>
+#include <qpe/qpeapplication.h>
+
+/* QT */
+#include <qmessagebox.h>
#include <qaction.h>
#include <qapplication.h>
-#include <libmailwrapper/mailtypes.h>
-#include <libmailwrapper/abstractmail.h>
-#include "mailistviewitem.h"
-#include "viewmail.h"
-#include "selectstore.h"
-#include "selectsmtp.h"
@@ -33,3 +39,4 @@ void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
// copied from old mail2
- if (msg == "writeMail(QString,QString)") {
+ if (msg == "writeMail(QString,QString)")
+ {
QDataStream stream(data,IO_ReadOnly);
@@ -39,3 +46,5 @@ void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace());
- } else if (msg == "newMail()") {
+ }
+ else if (msg == "newMail()")
+ {
slotComposeMail();
@@ -47,6 +56,10 @@ void OpieMail::slotwriteMail(const QString&name,const QString&email)
ComposeMail compose( settings, this, 0, true , WStyle_ContextHelp );
- if (!email.isEmpty()) {
- if (!name.isEmpty()) {
+ if (!email.isEmpty())
+ {
+ if (!name.isEmpty())
+ {
compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">");
- } else {
+ }
+ else
+ {
compose.setTo(email);
@@ -54,5 +67,4 @@ void OpieMail::slotwriteMail(const QString&name,const QString&email)
}
- compose.showMaximized();
compose.slotAdjustColumns();
- compose.exec();
+ QPEApplication::execDialog( &compose );
}
@@ -74,4 +86,6 @@ void OpieMail::slotSendQueued()
Account *it;
- for ( it = list.first(); it; it = list.next() ) {
- if ( it->getType().compare( "SMTP" ) == 0 ) {
+ for ( it = list.first(); it; it = list.next() )
+ {
+ if ( it->getType().compare( "SMTP" ) == 0 )
+ {
smtp = static_cast<SMTPaccount *>(it);
@@ -80,3 +94,4 @@ void OpieMail::slotSendQueued()
}
- if (smtpList.count()==0) {
+ if (smtpList.count()==0)
+ {
QMessageBox::information(0,tr("Info"),tr("Define a smtp account first"));
@@ -84,5 +99,8 @@ void OpieMail::slotSendQueued()
}
- if (smtpList.count()==1) {
+ if (smtpList.count()==1)
+ {
smtp = smtpList.at(0);
- } else {
+ }
+ else
+ {
smtp = 0;
@@ -90,4 +108,4 @@ void OpieMail::slotSendQueued()
selsmtp.setSelectionlist(&smtpList);
- selsmtp.showMaximized();
- if (selsmtp.exec()==QDialog::Accepted) {
+ if ( QPEApplication::execDialog( &selsmtp ) == QDialog::Accepted )
+ {
smtp = selsmtp.selected_smtp();
@@ -95,5 +113,7 @@ void OpieMail::slotSendQueued()
}
- if (smtp) {
+ if (smtp)
+ {
SMTPwrapper * wrap = new SMTPwrapper(smtp);
- if ( wrap->flushOutbox() ) {
+ if ( wrap->flushOutbox() )
+ {
QMessageBox::information(0,tr("Info"),tr("Mail queue flushed"));
@@ -112,4 +132,3 @@ void OpieMail::slotEditSettings()
SettingsDialog settingsDialog( this, 0, true, WStyle_ContextHelp );
- settingsDialog.showMaximized();
- settingsDialog.exec();
+ QPEApplication::execDialog( &settingsDialog );
}
@@ -120,5 +139,4 @@ void OpieMail::slotEditAccounts()
EditAccounts eaDialog( settings, this, 0, true, WStyle_ContextHelp );
- eaDialog.showMaximized();
eaDialog.slotAdjustColumns();
- eaDialog.exec();
+ QPEApplication::execDialog( &eaDialog );
if ( settings ) delete settings;
@@ -141,5 +159,8 @@ void OpieMail::displayMail()
- if ( readMail.deleted ) {
+ if ( readMail.deleted )
+ {
folderView->refreshCurrent();
- } else {
+ }
+ else
+ {
( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "" ) );
@@ -152,3 +173,4 @@ void OpieMail::slotDeleteMail()
RecMail mail = ((MailListViewItem*)mailView->currentItem() )->data();
- if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + mail.getFrom() + " - " + mail.getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) {
+ if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + mail.getFrom() + " - " + mail.getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
+ {
mail.Wrapper()->deleteMail( mail );
@@ -165,3 +187,4 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int )
QPopupMenu *m = new QPopupMenu(0);
- if (m) {
+ if (m)
+ {
m->insertItem(tr("Read this mail"),this,SLOT(displayMail()));
@@ -178,6 +201,9 @@ void OpieMail::slotShowFolders( bool show )
qDebug( "Show Folders" );
- if ( show && folderView->isHidden() ) {
+ if ( show && folderView->isHidden() )
+ {
qDebug( "-> showing" );
folderView->show();
- } else if ( !show && !folderView->isHidden() ) {
+ }
+ else if ( !show && !folderView->isHidden() )
+ {
qDebug( "-> hiding" );
@@ -191,3 +217,4 @@ void OpieMail::refreshMailView(QList<RecMail>*list)
mailView->clear();
- for (unsigned int i = 0; i < list->count();++i) {
+ for (unsigned int i = 0; i < list->count();++i)
+ {
item = new MailListViewItem(mailView,item);
@@ -218,6 +245,8 @@ void OpieMail::slotMoveCopyMail()
if ( (mail.Wrapper()==targetMail && mail.getMbox()==targetFolder) ||
- targetFolder.isEmpty()) {
+ targetFolder.isEmpty())
+ {
return;
}
- if (sels.newFolder() && !targetMail->createMbox(targetFolder)) {
+ if (sels.newFolder() && !targetMail->createMbox(targetFolder))
+ {
QMessageBox::critical(0,tr("Error creating new Folder"),
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp
index 99965d4..f015228 100644
--- a/noncore/net/mail/viewmail.cpp
+++ b/noncore/net/mail/viewmail.cpp
@@ -1 +1,15 @@
+#include "composemail.h"
+#include "viewmail.h"
+#include "accountview.h"
+
+/* OPIE */
+#include <libmailwrapper/settings.h>
+#include <libmailwrapper/abstractmail.h>
+#include <libmailwrapper/mailtypes.h>
+
+#include <opie2/ofiledialog.h>
+#include <qpe/config.h>
+#include <qpe/qpeapplication.h>
+
+/* QT */
#include <qtextbrowser.h>
@@ -9,13 +23,2 @@
-#include <qpe/config.h>
-
-#include <opie2/ofiledialog.h>
-
-#include <libmailwrapper/settings.h>
-#include "composemail.h"
-#include "viewmail.h"
-#include <libmailwrapper/abstractmail.h>
-#include "accountview.h"
-#include <libmailwrapper/mailtypes.h>
-
AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file,
@@ -48,3 +51,4 @@ bool AttachItem::isParentof(const QValueList<int>&path)
if (path.count()!=_path.count()+1) return false;
- for (unsigned int i=0; i < _path.count();++i) {
+ for (unsigned int i=0; i < _path.count();++i)
+ {
if (_path[i]!=path[i]) return false;
@@ -57,3 +61,4 @@ AttachItem* ViewMail::searchParent(const QValueList<int>&path)
QListViewItemIterator it( attachments );
- for ( ; it.current(); ++it ) {
+ for ( ; it.current(); ++it )
+ {
AttachItem*ati = (AttachItem*)it.current();
@@ -70,3 +75,4 @@ AttachItem* ViewMail::lastChild(AttachItem*parent)
AttachItem*temp=0;
- while( (temp=(AttachItem*)item->nextSibling())) {
+ while( (temp=(AttachItem*)item->nextSibling()))
+ {
item = temp;
@@ -76,3 +82,4 @@ AttachItem* ViewMail::lastChild(AttachItem*parent)
-void ViewMail::setBody( RecBody body ) {
+void ViewMail::setBody( RecBody body )
+{
@@ -82,3 +89,4 @@ attachbutton->setEnabled(body.Parts().count()>0);
attachments->setEnabled(body.Parts().count()>0);
-if (body.Parts().count()==0) {
+ if (body.Parts().count()==0)
+ {
return;
@@ -93,3 +101,4 @@ w=0;
-while (s>1024) {
+ while (s>1024)
+ {
s/=1024;
@@ -100,3 +109,4 @@ while (s>1024) {
QString q="";
-switch(w) {
+ switch(w)
+ {
case 1:
@@ -126,8 +136,11 @@ QString filename = "";
-for (unsigned int i = 0; i < body.Parts().count();++i) {
+ for (unsigned int i = 0; i < body.Parts().count();++i)
+ {
type = body.Parts()[i].Type()+"/"+body.Parts()[i].Subtype();
part_plist_t::ConstIterator it = body.Parts()[i].Parameters().begin();
- for (;it!=body.Parts()[i].Parameters().end();++it) {
+ for (;it!=body.Parts()[i].Parameters().end();++it)
+ {
qDebug(it.key());
- if (it.key().lower()=="name") {
+ if (it.key().lower()=="name")
+ {
filename=it.data();
@@ -137,3 +150,4 @@ for (unsigned int i = 0; i < body.Parts().count();++i) {
w = 0;
- while (s>1024) {
+ while (s>1024)
+ {
s/=1024;
@@ -142,3 +156,4 @@ for (unsigned int i = 0; i < body.Parts().count();++i) {
}
- switch(w) {
+ switch(w)
+ {
case 1:
@@ -159,3 +174,4 @@ for (unsigned int i = 0; i < body.Parts().count();++i) {
parentItem = searchParent(body.Parts()[i].Positionlist());
- if (parentItem) {
+ if (parentItem)
+ {
AttachItem*temp = lastChild(parentItem);
@@ -165,3 +181,5 @@ for (unsigned int i = 0; i < body.Parts().count();++i) {
curItem = parentItem;
- } else {
+ }
+ else
+ {
curItem=new AttachItem(attachments,curItem,type,desc,filename,fsize,i,body.Parts()[i].Positionlist());
@@ -172,3 +190,4 @@ for (unsigned int i = 0; i < body.Parts().count();++i) {
-void ViewMail::slotShowHtml( bool state ) {
+void ViewMail::slotShowHtml( bool state )
+{
m_showHtml = state;
@@ -177,3 +196,4 @@ void ViewMail::slotShowHtml( bool state ) {
-void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int ) {
+void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int )
+{
if (!item )
@@ -181,3 +201,4 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
- if ( ( ( AttachItem* )item )->Partnumber() == -1 ) {
+ if ( ( ( AttachItem* )item )->Partnumber() == -1 )
+ {
setText();
@@ -188,3 +209,4 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
- if ( item->text( 0 ).left( 5 ) == "text/" || item->text(0)=="message/rfc822" ) {
+ if ( item->text( 0 ).left( 5 ) == "text/" || item->text(0)=="message/rfc822" )
+ {
menu->insertItem( tr( "Show Text" ), 1 );
@@ -196,5 +218,7 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
- switch(ret) {
+ switch(ret)
+ {
case 0:
- { MimeTypes types;
+ {
+ MimeTypes types;
types.insert( "all", "*" );
@@ -203,5 +227,7 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
- if( !str.isEmpty() ) {
+ if( !str.isEmpty() )
+ {
encodedString*content = m_recMail.Wrapper()->fetchDecodedPart( m_recMail, m_body.Parts()[ ( ( AttachItem* )item )->Partnumber() ] );
- if (content) {
+ if (content)
+ {
QFile output(str);
@@ -217,6 +243,10 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
case 1:
- if ( ( ( AttachItem* )item )->Partnumber() == -1 ) {
+ if ( ( ( AttachItem* )item )->Partnumber() == -1 )
+ {
setText();
- } else {
- if ( m_recMail.Wrapper() != 0l ) { // make sure that there is a wrapper , even after delete or simular actions
+ }
+ else
+ {
+ if ( m_recMail.Wrapper() != 0l )
+ { // make sure that there is a wrapper , even after delete or simular actions
browser->setText( m_recMail.Wrapper()->fetchTextPart( m_recMail, m_body.Parts()[ ( ( AttachItem* )item )->Partnumber() ] ) );
@@ -230,3 +260,4 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
-void ViewMail::setMail( RecMail mail ) {
+void ViewMail::setMail( RecMail mail )
+{
@@ -266,3 +297,4 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl)
-void ViewMail::readConfig() {
+void ViewMail::readConfig()
+{
Config cfg( "mail" );
@@ -280,9 +312,12 @@ void ViewMail::setText()
- for ( QStringList::Iterator it = ( m_mail2[0] ).begin(); it != ( m_mail2[0] ).end(); ++it ) {
+ for ( QStringList::Iterator it = ( m_mail2[0] ).begin(); it != ( m_mail2[0] ).end(); ++it )
+ {
toString += (*it);
}
- for ( QStringList::Iterator it = ( m_mail2[1] ).begin(); it != ( m_mail2[1] ).end(); ++it ) {
+ for ( QStringList::Iterator it = ( m_mail2[1] ).begin(); it != ( m_mail2[1] ).end(); ++it )
+ {
ccString += (*it);
}
- for ( QStringList::Iterator it = ( m_mail2[2] ).begin(); it != ( m_mail2[2] ).end(); ++it ) {
+ for ( QStringList::Iterator it = ( m_mail2[2] ).begin(); it != ( m_mail2[2] ).end(); ++it )
+ {
bccString += (*it);
@@ -302,5 +337,8 @@ void ViewMail::setText()
- if ( !m_showHtml ) {
+ if ( !m_showHtml )
+ {
browser->setText( QString( m_mailHtml) + deHtml( m_mail[2] ) + "</font></html>" );
- } else {
+ }
+ else
+ {
browser->setText( QString( m_mailHtml) + m_mail[2] + "</font></html>" );
@@ -322,3 +360,4 @@ void ViewMail::hide()
- if (_inLoop) {
+ if (_inLoop)
+ {
_inLoop = false;
@@ -334,3 +373,4 @@ void ViewMail::exec()
- if (!_inLoop) {
+ if (!_inLoop)
+ {
_inLoop = true;
@@ -353,3 +393,4 @@ void ViewMail::slotReply()
{
- if (!m_gotBody) {
+ if (!m_gotBody)
+ {
QMessageBox::information(this, tr("Error"), tr("<p>The mail body is not yet downloaded, so you cannot reply yet."), tr("Ok"));
@@ -366,3 +407,4 @@ void ViewMail::slotReply()
QStringList::Iterator it;
- for (it = lines.begin(); it != lines.end(); it++) {
+ for (it = lines.begin(); it != lines.end(); it++)
+ {
rtext += "> " + *it + "\n";
@@ -380,4 +422,4 @@ void ViewMail::slotReply()
composer.setMessage( rtext );
- composer.showMaximized();
- if ( QDialog::Accepted==composer.exec()) {
+ if ( QDialog::Accepted == QPEApplication::execDialog( &composer ) )
+ {
m_recMail.Wrapper()->answeredMail(m_recMail);
@@ -388,3 +430,4 @@ void ViewMail::slotForward()
{
- if (!m_gotBody) {
+ if (!m_gotBody)
+ {
QMessageBox::information(this, tr("Error"), tr("<p>The mail body is not yet downloaded, so you cannot forward yet."), tr("Ok"));
@@ -415,5 +458,4 @@ void ViewMail::slotForward()
composer.setMessage( ftext );
- composer.showMaximized();
- if ( QDialog::Accepted==composer.exec()) {
-
+ if ( QDialog::Accepted == QPEApplication::execDialog( &composer ))
+ {
}
@@ -423,3 +465,4 @@ void ViewMail::slotDeleteMail( )
{
- if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + m_mail[0] + " - " + m_mail[1] ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) {
+ if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + m_mail[0] + " - " + m_mail[1] ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
+ {
m_recMail.Wrapper()->deleteMail( m_recMail );
diff --git a/noncore/net/opieirc/ircservereditor.cpp b/noncore/net/opieirc/ircservereditor.cpp
index 60274d1..2d11bf0 100644
--- a/noncore/net/opieirc/ircservereditor.cpp
+++ b/noncore/net/opieirc/ircservereditor.cpp
@@ -1 +1,7 @@
+#include "ircservereditor.h"
+
+/* OPIE */
+#include <qpe/qpeapplication.h>
+
+/* QT */
#include <qmessagebox.h>
@@ -4,3 +10,2 @@
#include <qwhatsthis.h>
-#include "ircservereditor.h"
@@ -45,3 +50,4 @@ IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char*
setCaption(tr("Edit server information"));
- showMaximized();
+
+ QPEApplication::showDialog( this );
}
diff --git a/noncore/net/opieirc/ircserverlist.cpp b/noncore/net/opieirc/ircserverlist.cpp
index 595ae3e..62bfc17 100644
--- a/noncore/net/opieirc/ircserverlist.cpp
+++ b/noncore/net/opieirc/ircserverlist.cpp
@@ -1 +1,9 @@
+
+#include "ircserverlist.h"
+#include "ircservereditor.h"
+
+/* OPIE */
+#include <qpe/qpeapplication.h>
+
+/* QT */
#include <qlayout.h>
@@ -5,8 +13,8 @@
#include <qwhatsthis.h>
-#include "ircserverlist.h"
-#include "ircservereditor.h"
-class IRCListBoxServer : public QListBoxText {
+class IRCListBoxServer : public QListBoxText
+{
public:
- IRCListBoxServer(IRCServer server) : QListBoxText(server.name()) {
+ IRCListBoxServer(IRCServer server) : QListBoxText(server.name())
+ {
m_server = server;
@@ -14,3 +22,4 @@ public:
- IRCServer server() {
+ IRCServer server()
+ {
return m_server;
@@ -18,3 +27,4 @@ public:
- void setServer(IRCServer server) {
+ void setServer(IRCServer server)
+ {
m_server = server;
@@ -26,3 +36,4 @@ protected:
-IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp) {
+IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp)
+{
QVBoxLayout *layout = new QVBoxLayout(this, 5, 5);
@@ -50,7 +61,10 @@ IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFla
int count = m_config->readNumEntry("ServerCount", 0);
- if (count) {
- for (int i=0; i<count; i++) {
+ if (count)
+ {
+ for (int i=0; i<count; i++)
+ {
m_config->setGroup("OpieIRC");
QString name = m_config->readEntry("Server"+QString::number(i));
- if (name.length() > 0) {
+ if (name.length() > 0)
+ {
IRCServer server;
@@ -70,9 +84,11 @@ IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFla
- showMaximized();
+ QPEApplication::showDialog( this );
}
-void IRCServerList::addServer() {
+void IRCServerList::addServer()
+{
IRCServer server;
IRCServerEditor editor(server, this, "ServerEditor", TRUE);
- if (editor.exec() == QDialog::Accepted) {
+ if (editor.exec() == QDialog::Accepted)
+ {
server = editor.getServer();
@@ -83,5 +99,7 @@ void IRCServerList::addServer() {
-void IRCServerList::delServer() {
+void IRCServerList::delServer()
+{
int index = m_list->currentItem();
- if (index != -1) {
+ if (index != -1)
+ {
m_list->removeItem(index);
@@ -90,5 +108,7 @@ void IRCServerList::delServer() {
-void IRCServerList::editServer() {
+void IRCServerList::editServer()
+{
int index = m_list->currentItem();
- if (index != -1) {
+ if (index != -1)
+ {
IRCListBoxServer *item = (IRCListBoxServer *)m_list->item(index);
@@ -96,3 +116,4 @@ void IRCServerList::editServer() {
IRCServerEditor editor(server, this, "ServerEditor", TRUE);
- if (editor.exec() == QDialog::Accepted) {
+ if (editor.exec() == QDialog::Accepted)
+ {
server = editor.getServer();
@@ -103,3 +124,4 @@ void IRCServerList::editServer() {
-int IRCServerList::exec() {
+int IRCServerList::exec()
+{
int returncode = QDialog::exec();
@@ -108,3 +130,4 @@ int IRCServerList::exec() {
m_config->writeEntry("ServerCount", QString::number(m_list->count()));
- for (unsigned int i=0; i<m_list->count(); i++) {
+ for (unsigned int i=0; i<m_list->count(); i++)
+ {
IRCServer server = ((IRCListBoxServer *)m_list->item(i))->server();
@@ -124,3 +147,4 @@ int IRCServerList::exec() {
-bool IRCServerList::hasServer() {
+bool IRCServerList::hasServer()
+{
return (m_list->currentItem() != -1);
@@ -128,3 +152,4 @@ bool IRCServerList::hasServer() {
-IRCServer IRCServerList::server() {
+IRCServer IRCServerList::server()
+{
return ((IRCListBoxServer *)m_list->item(m_list->currentItem()))->server();
@@ -132,3 +157,4 @@ IRCServer IRCServerList::server() {
-IRCServerList::~IRCServerList() {
+IRCServerList::~IRCServerList()
+{
delete m_config;
diff --git a/noncore/net/opieirc/ircsettings.cpp b/noncore/net/opieirc/ircsettings.cpp
index 2862296..f69d2c4 100644
--- a/noncore/net/opieirc/ircsettings.cpp
+++ b/noncore/net/opieirc/ircsettings.cpp
@@ -1,9 +1,16 @@
+
+#include "ircsettings.h"
+#include "irctab.h"
+
+/* OPIE */
#include <opie/ocolorbutton.h>
#include <opie/otabwidget.h>
+#include <qpe/qpeapplication.h>
+
+/* QT */
#include <qvalidator.h>
#include <qwhatsthis.h>
-#include "ircsettings.h"
-#include "irctab.h"
-IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp) {
+IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp)
+{
setCaption(tr("Settings") );
@@ -72,6 +79,8 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags)
tw->setCurrentTab( genwidget );
- showMaximized();
+
+ QPEApplication::showDialog( this );
}
-void IRCSettings::accept() {
+void IRCSettings::accept()
+{
IRCTab::m_backgroundColor = m_background->color().name();
@@ -95,3 +104,4 @@ void IRCSettings::accept() {
-IRCSettings::~IRCSettings() {
+IRCSettings::~IRCSettings()
+{
delete m_config;
diff --git a/noncore/net/opietooth/blue-pin/pindlg.cc b/noncore/net/opietooth/blue-pin/pindlg.cc
index 7d60d6c..9418a20 100644
--- a/noncore/net/opietooth/blue-pin/pindlg.cc
+++ b/noncore/net/opietooth/blue-pin/pindlg.cc
@@ -1,4 +1,9 @@
-#include <stdio.h>
+#include "pindlg.h"
+
+/* OPIE */
+#include <qpe/config.h>
+#include <qpe/qpeapplication.h>
+/* QT */
#include <qcheckbox.h>
@@ -8,5 +13,4 @@
-#include <qpe/config.h>
-
-#include "pindlg.h"
+/* STD */
+#include <stdio.h>
@@ -22,11 +26,13 @@ PinDlg::PinDlg( const QString& status,
txtStatus->setText(status);
- showMaximized();
+ QPEApplication::showDialog( this );
}
-PinDlg::~PinDlg() {
-}
-void PinDlg::setMac( const QString& mac ) {
+PinDlg::~PinDlg()
+{}
+void PinDlg::setMac( const QString& mac )
+{
txtStatus->setText( mac );
}
-QString PinDlg::pin() const{
+QString PinDlg::pin() const
+{
return lnePin->text();
@@ -34,4 +40,6 @@ QString PinDlg::pin() const{
-void PinDlg::test( const QString& mac ) {
- if (!mac.isEmpty() ) {
+void PinDlg::test( const QString& mac )
+{
+ if (!mac.isEmpty() )
+ {
Config cfg("bluepin");
@@ -39,3 +47,4 @@ void PinDlg::test( const QString& mac ) {
lnePin->setText(cfg.readEntryCrypt("pin", QString::null ) );
- if ( !lnePin->text().isEmpty() ) {
+ if ( !lnePin->text().isEmpty() )
+ {
//QTimer::singleShot(100, this, SLOT(accept() ) );
@@ -46,4 +55,6 @@ void PinDlg::test( const QString& mac ) {
}
-void PinDlg::accept() {
- if ( ckbPin->isChecked() ) {
+void PinDlg::accept()
+{
+ if ( ckbPin->isChecked() )
+ {
Config cfg("bluepin");
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index 2e68984..0ea45d2 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -24,7 +24,8 @@
-#include <remotedevice.h>
-#include <services.h>
-
-#include <stdlib.h>
+/* OPIE */
+#include <qpe/qpeapplication.h>
+#include <qpe/resource.h>
+#include <qpe/config.h>
+/* QT */
#include <qframe.h>
@@ -48,6 +49,6 @@
-#include <qpe/qpeapplication.h>
-#include <qpe/resource.h>
-#include <qpe/config.h>
-
+/* STD */
+#include <remotedevice.h>
+#include <services.h>
+#include <stdlib.h>
@@ -56,3 +57,4 @@ using namespace OpieTooth;
BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl )
- : BluetoothBase( parent, name, fl ) {
+ : BluetoothBase( parent, name, fl )
+{
@@ -117,3 +119,4 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl )
*/
-void BlueBase::readConfig() {
+void BlueBase::readConfig()
+{
@@ -133,3 +136,4 @@ void BlueBase::readConfig() {
*/
-void BlueBase::writeConfig() {
+void BlueBase::writeConfig()
+{
@@ -151,3 +155,4 @@ void BlueBase::writeConfig() {
*/
-void BlueBase::writeToHciConfig() {
+void BlueBase::writeToHciConfig()
+{
qWarning("writeToHciConfig");
@@ -168,3 +173,4 @@ void BlueBase::writeToHciConfig() {
*/
-void BlueBase::readSavedDevices() {
+void BlueBase::readSavedDevices()
+{
@@ -181,3 +187,4 @@ void BlueBase::readSavedDevices() {
*/
-void BlueBase::writeSavedDevices() {
+void BlueBase::writeSavedDevices()
+{
QListViewItemIterator it( ListView2 );
@@ -186,3 +193,4 @@ void BlueBase::writeSavedDevices() {
RemoteDevice::ValueList list;
- for ( ; it.current(); ++it ) {
+ for ( ; it.current(); ++it )
+ {
item = (BTListItem*)it.current();
@@ -207,3 +215,4 @@ void BlueBase::writeSavedDevices() {
*/
-void BlueBase::initGui() {
+void BlueBase::initGui()
+{
StatusLabel->setText( status() ); // maybe move it to getStatus()
@@ -224,3 +233,4 @@ void BlueBase::initGui() {
*/
-QString BlueBase::status()const{
+QString BlueBase::status()const
+{
QString infoString = tr( "<b>Device name : </b> Ipaq" );
@@ -236,3 +246,4 @@ QString BlueBase::status()const{
*/
-void BlueBase::applyConfigChanges() {
+void BlueBase::applyConfigChanges()
+{
m_deviceName = deviceNameLine->text();
@@ -253,8 +264,8 @@ void BlueBase::applyConfigChanges() {
*/
-void BlueBase::rfcommDialog() {
+void BlueBase::rfcommDialog()
+{
RfcommAssignDialog rfcommAssign ( this, "RfcommAssignDialog", true, WStyle_ContextHelp );
- rfcommAssign.showMaximized();
-
- if ( rfcommAssign.exec() == QDialog::Accepted ) {
+ if ( QPEApplication::execDialog( &rfcommAssign ) == QDialog::Accepted )
+ {
rfcommAssign.saveConfig();
@@ -267,3 +278,4 @@ void BlueBase::rfcommDialog() {
*/
-void BlueBase::addSearchedDevices( const QValueList<RemoteDevice> &newDevices ) {
+void BlueBase::addSearchedDevices( const QValueList<RemoteDevice> &newDevices )
+{
BTDeviceItem * deviceItem;
@@ -271,3 +283,4 @@ void BlueBase::addSearchedDevices( const QValueList<RemoteDevice> &newDevices )
- for( it = newDevices.begin(); it != newDevices.end() ; ++it ) {
+ for( it = newDevices.begin(); it != newDevices.end() ; ++it )
+ {
@@ -292,4 +305,4 @@ void BlueBase::addSearchedDevices( const QValueList<RemoteDevice> &newDevices )
*/
-void BlueBase::startServiceActionClicked( QListViewItem */*item*/ ) {
-}
+void BlueBase::startServiceActionClicked( QListViewItem */*item*/ )
+{}
@@ -299,3 +312,4 @@ void BlueBase::startServiceActionClicked( QListViewItem */*item*/ ) {
*/
-void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & point, int /*column*/ ) {
+void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & point, int /*column*/ )
+{
if (!item )
@@ -306,3 +320,4 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin
- if ( ((BTListItem*)item)->type() == "device") {
+ if ( ((BTListItem*)item)->type() == "device")
+ {
@@ -318,3 +333,4 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin
- switch(ret) {
+ switch(ret)
+ {
case -1:
@@ -345,3 +361,4 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin
*/
- else if ( ((BTListItem*)item)->type() == "service") {
+ else if ( ((BTListItem*)item)->type() == "service")
+ {
BTServiceItem* service = (BTServiceItem*)item;
@@ -350,3 +367,4 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin
QPopupMenu *popup =0l;
- if ( it != list.end() ) {
+ if ( it != list.end() )
+ {
qWarning("Searching id %d %s", it.key(), it.data().latin1() );
@@ -355,3 +373,5 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin
(BTDeviceItem*)service->parent() );
- }else {
+ }
+ else
+ {
qWarning("Empty");
@@ -359,3 +379,4 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin
- if ( popup == 0l ) {
+ if ( popup == 0l )
+ {
qWarning("factory returned 0l");
@@ -367,5 +388,8 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin
qWarning("returned from exec() ");
- if ( ret == -1 ) {
+ if ( ret == -1 )
+ {
;
- } else if ( ret == test1 ) {
+ }
+ else if ( ret == test1 )
+ {
;
@@ -382,3 +406,4 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin
*/
-void BlueBase::addServicesToDevice( BTDeviceItem * item ) {
+void BlueBase::addServicesToDevice( BTDeviceItem * item )
+{
qDebug("addServicesToDevice");
@@ -398,3 +423,4 @@ void BlueBase::addServicesToDevice( BTDeviceItem * item ) {
*/
-void BlueBase::addServicesToDevice( const QString& device, Services::ValueList servicesList ) {
+void BlueBase::addServicesToDevice( const QString& device, Services::ValueList servicesList )
+{
qDebug("fill services list");
@@ -414,3 +440,4 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s
QListViewItem * child = deviceItem->firstChild();
- while( child ) {
+ while( child )
+ {
tempList.append( child );
@@ -424,3 +451,4 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s
- if (!servicesList.isEmpty() ) {
+ if (!servicesList.isEmpty() )
+ {
// add services
@@ -428,3 +456,4 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s
QMap<int, QString>::Iterator classIt;
- for( it2 = servicesList.begin(); it2 != servicesList.end(); ++it2 ) {
+ for( it2 = servicesList.begin(); it2 != servicesList.end(); ++it2 )
+ {
serviceItem = new BTServiceItem( deviceItem, (*it2) );
@@ -433,3 +462,4 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s
int classId=0;
- if ( classIt != list.end() ) {
+ if ( classIt != list.end() )
+ {
classId = classIt.key();
@@ -439,3 +469,5 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s
}
- } else {
+ }
+ else
+ {
Services s1;
@@ -452,6 +484,8 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s
-void BlueBase::addSignalStrength() {
+void BlueBase::addSignalStrength()
+{
QListViewItemIterator it( ListView4 );
- for ( ; it.current(); ++it ) {
+ for ( ; it.current(); ++it )
+ {
m_localDevice->signalStrength( ((BTConnectionItem*)it.current() )->connection().mac() );
@@ -462,7 +496,10 @@ void BlueBase::addSignalStrength() {
-void BlueBase::addSignalStrength( const QString& mac, const QString& strength ) {
+void BlueBase::addSignalStrength( const QString& mac, const QString& strength )
+{
QListViewItemIterator it( ListView4 );
- for ( ; it.current(); ++it ) {
- if( ((BTConnectionItem*)it.current())->connection().mac() == mac ) {
+ for ( ; it.current(); ++it )
+ {
+ if( ((BTConnectionItem*)it.current())->connection().mac() == mac )
+ {
((BTConnectionItem*)it.current() )->setSignalStrength( strength );
@@ -476,3 +513,4 @@ void BlueBase::addSignalStrength( const QString& mac, const QString& strength )
*/
-void BlueBase::addConnectedDevices() {
+void BlueBase::addConnectedDevices()
+{
m_localDevice->searchConnections();
@@ -484,3 +522,4 @@ void BlueBase::addConnectedDevices() {
*/
-void BlueBase::addConnectedDevices( ConnectionState::ValueList connectionList ) {
+void BlueBase::addConnectedDevices( ConnectionState::ValueList connectionList )
+{
@@ -489,5 +528,7 @@ void BlueBase::addConnectedDevices( ConnectionState::ValueList connectionList )
- if ( !connectionList.isEmpty() ) {
+ if ( !connectionList.isEmpty() )
+ {
- for (it = connectionList.begin(); it != connectionList.end(); ++it) {
+ for (it = connectionList.begin(); it != connectionList.end(); ++it)
+ {
@@ -495,4 +536,6 @@ void BlueBase::addConnectedDevices( ConnectionState::ValueList connectionList )
bool found = false;
- for ( ; it2.current(); ++it2 ) {
- if( ( (BTConnectionItem*)it2.current())->connection().mac() == (*it).mac() ) {
+ for ( ; it2.current(); ++it2 )
+ {
+ if( ( (BTConnectionItem*)it2.current())->connection().mac() == (*it).mac() )
+ {
found = true;
@@ -501,6 +544,8 @@ void BlueBase::addConnectedDevices( ConnectionState::ValueList connectionList )
- if ( found == false ) {
+ if ( found == false )
+ {
connectionItem = new BTConnectionItem( ListView4, (*it) );
- if( m_deviceList.find((*it).mac()).data() ) {
+ if( m_deviceList.find((*it).mac()).data() )
+ {
connectionItem->setName( m_deviceList.find( (*it).mac()).data()->name() );
@@ -512,6 +557,9 @@ void BlueBase::addConnectedDevices( ConnectionState::ValueList connectionList )
QListViewItemIterator it2( ListView4 );
- for ( ; it2.current(); ++it2 ) {
+ for ( ; it2.current(); ++it2 )
+ {
bool found = false;
- for (it = connectionList.begin(); it != connectionList.end(); ++it) {
- if( ( ((BTConnectionItem*)it2.current())->connection().mac() ) == (*it).mac() ) {
+ for (it = connectionList.begin(); it != connectionList.end(); ++it)
+ {
+ if( ( ((BTConnectionItem*)it2.current())->connection().mac() ) == (*it).mac() )
+ {
found = true;
@@ -520,3 +568,4 @@ void BlueBase::addConnectedDevices( ConnectionState::ValueList connectionList )
- if ( !found ) {
+ if ( !found )
+ {
delete it2.current();
@@ -527,3 +576,5 @@ void BlueBase::addConnectedDevices( ConnectionState::ValueList connectionList )
- } else {
+ }
+ else
+ {
ListView4->clear();
@@ -543,3 +594,4 @@ void BlueBase::addConnectedDevices( ConnectionState::ValueList connectionList )
*/
-void BlueBase::deviceActive( const RemoteDevice &device ) {
+void BlueBase::deviceActive( const RemoteDevice &device )
+{
// search by mac, async, gets a signal back
@@ -555,3 +607,4 @@ void BlueBase::deviceActive( const RemoteDevice &device ) {
*/
-void BlueBase::deviceActive( const QString& device, bool connected ) {
+void BlueBase::deviceActive( const QString& device, bool connected )
+{
qDebug("deviceActive slot");
@@ -567,5 +620,8 @@ void BlueBase::deviceActive( const QString& device, bool connected ) {
- if ( connected ) {
+ if ( connected )
+ {
deviceItem->setPixmap( 1, m_onPix );
- } else {
+ }
+ else
+ {
deviceItem->setPixmap( 1, m_offPix );
@@ -579,3 +635,4 @@ void BlueBase::deviceActive( const QString& device, bool connected ) {
*/
-void BlueBase::startScan() {
+void BlueBase::startScan()
+{
ScanDialog *scan = new ScanDialog( this, "ScanDialog",
@@ -585,3 +642,3 @@ void BlueBase::startScan() {
- scan->showMaximized();
+ QPEApplication::showDialog( scan );
}
@@ -592,3 +649,4 @@ void BlueBase::startScan() {
*/
-void BlueBase::setInfo() {
+void BlueBase::setInfo()
+{
StatusLabel->setText( status() );
@@ -600,3 +658,4 @@ void BlueBase::setInfo() {
*/
-BlueBase::~BlueBase() {
+BlueBase::~BlueBase()
+{
writeSavedDevices();
@@ -612,3 +671,4 @@ BlueBase::~BlueBase() {
*/
-bool BlueBase::find( const RemoteDevice& rem ) {
+bool BlueBase::find( const RemoteDevice& rem )
+{
QListViewItemIterator it( ListView2 );
@@ -616,3 +676,4 @@ bool BlueBase::find( const RemoteDevice& rem ) {
BTDeviceItem* device;
- for (; it.current(); ++it ) {
+ for (; it.current(); ++it )
+ {
item = (BTListItem*) it.current();
diff --git a/noncore/net/opietooth/manager/obexpopup.cpp b/noncore/net/opietooth/manager/obexpopup.cpp
index a550648..d147d52 100644
--- a/noncore/net/opietooth/manager/obexpopup.cpp
+++ b/noncore/net/opietooth/manager/obexpopup.cpp
@@ -1,4 +1,2 @@
-#include <qtimer.h>
-
#include "obexdialog.h"
@@ -6,2 +4,8 @@
+/* OPIE */
+#include <qpe/qpeapplication.h>
+
+/* QT */
+#include <qtimer.h>
+
using namespace OpieTooth;
@@ -12,3 +16,4 @@ using namespace OpieTooth;
ObexPopup::ObexPopup()
- : QPopupMenu() {
+ : QPopupMenu()
+{
qWarning("RfcCommPopup c'tor");
@@ -26,7 +31,8 @@ ObexPopup::ObexPopup()
-ObexPopup::~ObexPopup() {
-}
+ObexPopup::~ObexPopup()
+{}
-void ObexPopup::slotPush() {
+void ObexPopup::slotPush()
+{
@@ -34,6 +40,4 @@ void ObexPopup::slotPush() {
-
ObexDialog obexDialog;
- obexDialog.showMaximized();
- obexDialog.exec();
+ QPEApplication::execDialog( &obexDialog );
}
diff --git a/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp b/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp
index b5cc074..fc76301 100644
--- a/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp
+++ b/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp
@@ -5,4 +5,7 @@
+/* OPIE */
#include <qpe/config.h>
+#include <qpe/qpeapplication.h>
+/* QT */
#include <qlayout.h>
@@ -17,3 +20,4 @@ using namespace OpieTooth;
RfcommAssignDialog::RfcommAssignDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
- : RfcommAssignDialogBase( parent, name, modal, fl ) {
+ : RfcommAssignDialogBase( parent, name, modal, fl )
+{
@@ -35,4 +39,6 @@ RfcommAssignDialog::RfcommAssignDialog( QWidget* parent, const char* name, bool
-RfcommAssignDialog::~RfcommAssignDialog() {
- if ( confHandler ) {
+RfcommAssignDialog::~RfcommAssignDialog()
+{
+ if ( confHandler )
+ {
delete confHandler;
@@ -42,5 +48,7 @@ RfcommAssignDialog::~RfcommAssignDialog() {
-void RfcommAssignDialog::newDevice( const QString & mac ) {
+void RfcommAssignDialog::newDevice( const QString & mac )
+{
- for ( int i = 0 ; i < m_range; i++ ) {
+ for ( int i = 0 ; i < m_range; i++ )
+ {
@@ -49,5 +57,6 @@ void RfcommAssignDialog::newDevice( const QString & mac ) {
// make sure that rfcommX is not assigned yet
- if ( it == confHandler->foundEntries().end() ) {
+ if ( it == confHandler->foundEntries().end() )
+ {
QDialog dialog( this, "newdevice", true, WStyle_ContextHelp );
- dialog.showMaximized();
+
RfcommDialogItem *newDev = new RfcommDialogItem( &dialog );
@@ -56,3 +65,4 @@ void RfcommAssignDialog::newDevice( const QString & mac ) {
- if ( dialog.exec() == QDialog::Accepted ) {
+ if ( QPEApplication::execDialog( &dialog ) == QDialog::Accepted )
+ {
RfcommDialogItem *rfcomm = new RfcommDialogItem( m_box );
@@ -69,3 +79,4 @@ void RfcommAssignDialog::newDevice( const QString & mac ) {
-void RfcommAssignDialog::loadConfig() {
+void RfcommAssignDialog::loadConfig()
+{
@@ -73,3 +84,4 @@ void RfcommAssignDialog::loadConfig() {
- for ( int i = 0 ; i < m_range; i++ ) {
+ for ( int i = 0 ; i < m_range; i++ )
+ {
// cfg.setGroup( QString("%1").arg( i ) );
@@ -80,3 +92,4 @@ void RfcommAssignDialog::loadConfig() {
it = confHandler->foundEntries().find( QString("%1").arg( i ) );
- if ( it != confHandler->foundEntries().end() ) {
+ if ( it != confHandler->foundEntries().end() )
+ {
qDebug( "Found key in foundEntries() " );
@@ -95,3 +108,4 @@ void RfcommAssignDialog::loadConfig() {
-void RfcommAssignDialog::saveConfig() {
+void RfcommAssignDialog::saveConfig()
+{
@@ -103,3 +117,4 @@ void RfcommAssignDialog::saveConfig() {
- for( it = m_itemList.begin(); it != m_itemList.end(); ++it ) {
+ for( it = m_itemList.begin(); it != m_itemList.end(); ++it )
+ {
diff --git a/noncore/net/opietooth/manager/rfcpopup.cpp b/noncore/net/opietooth/manager/rfcpopup.cpp
index d95f14b..04bfe48 100644
--- a/noncore/net/opietooth/manager/rfcpopup.cpp
+++ b/noncore/net/opietooth/manager/rfcpopup.cpp
@@ -1,4 +1,2 @@
-#include <qtimer.h>
-
#include "pppdialog.h"
@@ -7,2 +5,8 @@
+/* OPIE */
+#include <qpe/qpeapplication.h>
+
+/* QT */
+#include <qtimer.h>
+
using namespace OpieTooth;
@@ -13,3 +17,4 @@ using namespace OpieTooth;
RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item )
- : QPopupMenu() {
+ : QPopupMenu()
+{
qWarning("RfcCommPopup c'tor");
@@ -55,3 +60,4 @@ RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item )
-RfcCommPopup::~RfcCommPopup() {
+RfcCommPopup::~RfcCommPopup()
+{
/* delete m_con;
@@ -63,3 +69,4 @@ RfcCommPopup::~RfcCommPopup() {
-void RfcCommPopup::slotConnect() {
+void RfcCommPopup::slotConnect()
+{
@@ -67,7 +74,4 @@ void RfcCommPopup::slotConnect() {
-
-
PPPDialog pppDialog;
- pppDialog.showMaximized();
- pppDialog.exec();
+ QPEApplication::execDialog( &pppDialog );
}
@@ -75,3 +79,4 @@ void RfcCommPopup::slotConnect() {
-void RfcCommPopup::slotDisconnect() {
+void RfcCommPopup::slotDisconnect()
+{
qWarning("slot disconnected");
@@ -80,9 +85,10 @@ void RfcCommPopup::slotDisconnect() {
-void RfcCommPopup::slotBind() {
+void RfcCommPopup::slotBind()
+{
RfcommAssignDialog rfcommAssign ( this, "RfcommAssignDialog", true, WStyle_ContextHelp );
- rfcommAssign.showMaximized();
rfcommAssign.newDevice( m_item->mac() );
- if ( rfcommAssign.exec() == QDialog::Accepted ) {
+ if ( QPEApplication::execDialog( &rfcommAssign ) == QDialog::Accepted )
+ {
rfcommAssign.saveConfig();
@@ -92,3 +98,4 @@ void RfcCommPopup::slotBind() {
-void RfcCommPopup::slotBar() {
+void RfcCommPopup::slotBar()
+{
qWarning("slotBar");
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp
index 3729ed0..95a8294 100644
--- a/noncore/net/wellenreiter/gui/mainwindow.cpp
+++ b/noncore/net/wellenreiter/gui/mainwindow.cpp
@@ -179,6 +179,3 @@ void WellenreiterMainWindow::showConfigure()
cw->setCaption( tr( "Configure" ) );
- #ifdef QWS
- cw->showMaximized();
- #endif
- int result = cw->exec();
+ int result = QPEApplication::execDialog( cw );