-rw-r--r-- | noncore/net/opietooth/blue-pin/pindlg.cc | 41 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 261 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/obexpopup.cpp | 22 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp | 51 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/rfcpopup.cpp | 49 |
5 files changed, 261 insertions, 163 deletions
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> @@ -17,3 +21,3 @@ PinDlg::PinDlg( const QString& status, const char* name ) - : PinDlgBase( parent, name, WType_Modal ) + : PinDlgBase( parent, name, WType_Modal ) { @@ -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 ) +{ @@ -64,3 +66,3 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) connect( rfcommBindButton, SIGNAL( clicked() ), this, SLOT( rfcommDialog() ) ); -// not good since lib is async + // not good since lib is async // connect( ListView2, SIGNAL( expanded ( QListViewItem* ) ), @@ -78,3 +80,3 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) connect( m_localDevice, SIGNAL( signalStrength( const QString&, const QString& ) ), - this, SLOT( addSignalStrength( const QString&, const QString& ) ) ); + this, SLOT( addSignalStrength( const QString&, const QString& ) ) ); @@ -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,4 +367,5 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin QPopupMenu *popup =0l; - if ( it != list.end() ) { - qWarning("Searching id %d %s", it.key(), it.data().latin1() ); + if ( it != list.end() ) + { + qWarning("Searching id %d %s", it.key(), it.data().latin1() ); popup = m_popHelper.find( it.key(), @@ -355,7 +373,10 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin (BTDeviceItem*)service->parent() ); - }else { - qWarning("Empty"); - } + } + else + { + qWarning("Empty"); + } - 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,5 +440,6 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s QListViewItem * child = deviceItem->firstChild(); - while( child ) { - tempList.append( child ); - child = child->nextSibling(); + while( child ) + { + tempList.append( child ); + child = child->nextSibling(); } @@ -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,20 +484,25 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s -void BlueBase::addSignalStrength() { +void BlueBase::addSignalStrength() +{ - QListViewItemIterator it( ListView4 ); - for ( ; it.current(); ++it ) { - m_localDevice->signalStrength( ((BTConnectionItem*)it.current() )->connection().mac() ); - } + QListViewItemIterator it( ListView4 ); + for ( ; it.current(); ++it ) + { + m_localDevice->signalStrength( ((BTConnectionItem*)it.current() )->connection().mac() ); + } - QTimer::singleShot( 5000, this, SLOT( addSignalStrength() ) ); + QTimer::singleShot( 5000, this, SLOT( 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 ) { - ((BTConnectionItem*)it.current() )->setSignalStrength( strength ); - } - } + QListViewItemIterator it( ListView4 ); + for ( ; it.current(); ++it ) + { + if( ((BTConnectionItem*)it.current())->connection().mac() == mac ) + { + ((BTConnectionItem*)it.current() )->setSignalStrength( strength ); + } + } } @@ -476,4 +513,5 @@ void BlueBase::addSignalStrength( const QString& mac, const QString& strength ) */ -void BlueBase::addConnectedDevices() { - m_localDevice->searchConnections(); +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,36 +528,46 @@ 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) + { QListViewItemIterator it2( ListView4 ); - bool found = false; - for ( ; it2.current(); ++it2 ) { - if( ( (BTConnectionItem*)it2.current())->connection().mac() == (*it).mac() ) { - found = true; - } - } + bool found = false; + for ( ; it2.current(); ++it2 ) + { + if( ( (BTConnectionItem*)it2.current())->connection().mac() == (*it).mac() ) + { + found = true; + } + } - if ( found == false ) { - connectionItem = new BTConnectionItem( ListView4, (*it) ); + if ( found == false ) + { + connectionItem = new BTConnectionItem( ListView4, (*it) ); - if( m_deviceList.find((*it).mac()).data() ) { - connectionItem->setName( m_deviceList.find( (*it).mac()).data()->name() ); - } - } + if( m_deviceList.find((*it).mac()).data() ) + { + connectionItem->setName( m_deviceList.find( (*it).mac()).data()->name() ); + } + } - } + } QListViewItemIterator it2( ListView4 ); - for ( ; it2.current(); ++it2 ) { - bool found = false; - for (it = connectionList.begin(); it != connectionList.end(); ++it) { - if( ( ((BTConnectionItem*)it2.current())->connection().mac() ) == (*it).mac() ) { - found = true; - } + for ( ; it2.current(); ++it2 ) + { + bool found = false; + for (it = connectionList.begin(); it != connectionList.end(); ++it) + { + if( ( ((BTConnectionItem*)it2.current())->connection().mac() ) == (*it).mac() ) + { + found = true; + } } - if ( !found ) { - delete it2.current(); - } + 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() " ); @@ -86,7 +99,7 @@ void RfcommAssignDialog::loadConfig() { } - /* Use rfcomm.conf directly for now - * rfcomm->setMac( cfg.readEntry( "mac", "" ) ); - * rfcomm->setChannel( cfg.readNumEntry( "channel", 1 ) ); - * rfcomm->setComment( cfg.readEntry( "comment", "" ) ); - */ + /* Use rfcomm.conf directly for now + * rfcomm->setMac( cfg.readEntry( "mac", "" ) ); + * rfcomm->setChannel( cfg.readNumEntry( "channel", 1 ) ); + * rfcomm->setComment( cfg.readEntry( "comment", "" ) ); + */ } @@ -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"); @@ -34,3 +39,3 @@ RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item ) connect( a, SIGNAL( activated() ) , - this, SLOT( slotDisconnect() ) ); + this, SLOT( slotDisconnect() ) ); @@ -42,3 +47,3 @@ RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item ) connect( a, SIGNAL( activated() ), - this, SLOT( slotBind() ) ); + this, SLOT( slotBind() ) ); @@ -50,3 +55,3 @@ RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item ) connect( a, SIGNAL( activated() ), - this, SLOT( slotBar() ) ); + this, SLOT( slotBar() ) ); @@ -55,7 +60,8 @@ RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item ) -RfcCommPopup::~RfcCommPopup() { -/* delete m_con; - delete m_dis; - delete m_foo; - delete m_bar; */ +RfcCommPopup::~RfcCommPopup() +{ + /* delete m_con; + delete m_dis; + delete m_foo; + delete m_bar; */ } @@ -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"); |