summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp
Unidiff
Diffstat (limited to 'noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp51
1 files changed, 33 insertions, 18 deletions
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 @@
5 5
6/* OPIE */
6#include <qpe/config.h> 7#include <qpe/config.h>
8#include <qpe/qpeapplication.h>
7 9
10/* QT */
8#include <qlayout.h> 11#include <qlayout.h>
@@ -17,3 +20,4 @@ using namespace OpieTooth;
17RfcommAssignDialog::RfcommAssignDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) 20RfcommAssignDialog::RfcommAssignDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
18 : RfcommAssignDialogBase( parent, name, modal, fl ) { 21 : RfcommAssignDialogBase( parent, name, modal, fl )
22{
19 23
@@ -35,4 +39,6 @@ RfcommAssignDialog::RfcommAssignDialog( QWidget* parent, const char* name, bool
35 39
36RfcommAssignDialog::~RfcommAssignDialog() { 40RfcommAssignDialog::~RfcommAssignDialog()
37 if ( confHandler ) { 41{
42 if ( confHandler )
43 {
38 delete confHandler; 44 delete confHandler;
@@ -42,5 +48,7 @@ RfcommAssignDialog::~RfcommAssignDialog() {
42 48
43void RfcommAssignDialog::newDevice( const QString & mac ) { 49void RfcommAssignDialog::newDevice( const QString & mac )
50{
44 51
45 for ( int i = 0 ; i < m_range; i++ ) { 52 for ( int i = 0 ; i < m_range; i++ )
53 {
46 54
@@ -49,5 +57,6 @@ void RfcommAssignDialog::newDevice( const QString & mac ) {
49 // make sure that rfcommX is not assigned yet 57 // make sure that rfcommX is not assigned yet
50 if ( it == confHandler->foundEntries().end() ) { 58 if ( it == confHandler->foundEntries().end() )
59 {
51 QDialog dialog( this, "newdevice", true, WStyle_ContextHelp ); 60 QDialog dialog( this, "newdevice", true, WStyle_ContextHelp );
52 dialog.showMaximized(); 61
53 RfcommDialogItem *newDev = new RfcommDialogItem( &dialog ); 62 RfcommDialogItem *newDev = new RfcommDialogItem( &dialog );
@@ -56,3 +65,4 @@ void RfcommAssignDialog::newDevice( const QString & mac ) {
56 65
57 if ( dialog.exec() == QDialog::Accepted ) { 66 if ( QPEApplication::execDialog( &dialog ) == QDialog::Accepted )
67 {
58 RfcommDialogItem *rfcomm = new RfcommDialogItem( m_box ); 68 RfcommDialogItem *rfcomm = new RfcommDialogItem( m_box );
@@ -69,3 +79,4 @@ void RfcommAssignDialog::newDevice( const QString & mac ) {
69 79
70void RfcommAssignDialog::loadConfig() { 80void RfcommAssignDialog::loadConfig()
81{
71 82
@@ -73,3 +84,4 @@ void RfcommAssignDialog::loadConfig() {
73 84
74 for ( int i = 0 ; i < m_range; i++ ) { 85 for ( int i = 0 ; i < m_range; i++ )
86 {
75 // cfg.setGroup( QString("%1").arg( i ) ); 87 // cfg.setGroup( QString("%1").arg( i ) );
@@ -80,3 +92,4 @@ void RfcommAssignDialog::loadConfig() {
80 it = confHandler->foundEntries().find( QString("%1").arg( i ) ); 92 it = confHandler->foundEntries().find( QString("%1").arg( i ) );
81 if ( it != confHandler->foundEntries().end() ) { 93 if ( it != confHandler->foundEntries().end() )
94 {
82 qDebug( "Found key in foundEntries() " ); 95 qDebug( "Found key in foundEntries() " );
@@ -86,7 +99,7 @@ void RfcommAssignDialog::loadConfig() {
86 } 99 }
87 /* Use rfcomm.conf directly for now 100 /* Use rfcomm.conf directly for now
88 * rfcomm->setMac( cfg.readEntry( "mac", "" ) ); 101 * rfcomm->setMac( cfg.readEntry( "mac", "" ) );
89 * rfcomm->setChannel( cfg.readNumEntry( "channel", 1 ) ); 102 * rfcomm->setChannel( cfg.readNumEntry( "channel", 1 ) );
90 * rfcomm->setComment( cfg.readEntry( "comment", "" ) ); 103 * rfcomm->setComment( cfg.readEntry( "comment", "" ) );
91 */ 104 */
92 } 105 }
@@ -95,3 +108,4 @@ void RfcommAssignDialog::loadConfig() {
95 108
96void RfcommAssignDialog::saveConfig() { 109void RfcommAssignDialog::saveConfig()
110{
97 111
@@ -103,3 +117,4 @@ void RfcommAssignDialog::saveConfig() {
103 117
104 for( it = m_itemList.begin(); it != m_itemList.end(); ++it ) { 118 for( it = m_itemList.begin(); it != m_itemList.end(); ++it )
119 {
105 120