summaryrefslogtreecommitdiff
authorkorovkin <korovkin>2006-03-25 18:10:13 (UTC)
committer korovkin <korovkin>2006-03-25 18:10:13 (UTC)
commitc4f82599db775f52c7e04cce09c7c45ecc89ccfd (patch) (side-by-side diff)
tree81d48e5363a2135bb6820510ae7f5dee9999e8f2
parentda3c4a6231882bc56266162415a8d1a2a1bf0293 (diff)
downloadopie-c4f82599db775f52c7e04cce09c7c45ecc89ccfd.zip
opie-c4f82599db775f52c7e04cce09c7c45ecc89ccfd.tar.gz
opie-c4f82599db775f52c7e04cce09c7c45ecc89ccfd.tar.bz2
Added RFCOMM binding table functionality.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/TODO.txt5
-rw-r--r--noncore/net/opietooth/manager/btdeviceitem.cpp2
-rw-r--r--noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp115
-rw-r--r--noncore/net/opietooth/manager/rfcommassigndialogimpl.h40
-rw-r--r--noncore/net/opietooth/manager/rfcommassigndialogitem.cpp9
-rw-r--r--noncore/net/opietooth/manager/rfcommassigndialogitem.h4
-rw-r--r--noncore/net/opietooth/manager/rfcommconfhandler.cpp98
-rw-r--r--noncore/net/opietooth/manager/rfcommconfhandler.h7
-rw-r--r--noncore/net/opietooth/manager/rfcommdialogitembase.ui298
-rw-r--r--noncore/net/opietooth/manager/rfcpopup.cpp3
10 files changed, 349 insertions, 232 deletions
diff --git a/noncore/net/opietooth/manager/TODO.txt b/noncore/net/opietooth/manager/TODO.txt
index e6bd9b1..76fae68 100644
--- a/noncore/net/opietooth/manager/TODO.txt
+++ b/noncore/net/opietooth/manager/TODO.txt
@@ -1,4 +1,3 @@
-1. Make bind table edit /etc/bluetooth/rfcomm.conf file.
-2. Add an rfcomm port number to the connection dialog.
-3. Collect requirements from others.
+1. Add an rfcomm port number to the connection dialog.
+2. Collect requirements from others.
diff --git a/noncore/net/opietooth/manager/btdeviceitem.cpp b/noncore/net/opietooth/manager/btdeviceitem.cpp
index fb1b1c1..c112463 100644
--- a/noncore/net/opietooth/manager/btdeviceitem.cpp
+++ b/noncore/net/opietooth/manager/btdeviceitem.cpp
@@ -9,3 +9,3 @@ BTDeviceItem::BTDeviceItem( QListView* parent, const RemoteDevice& dev )
- setText( 0, dev.name() );
+ setText( 0, dev.name().utf8() );
m_device = dev;
diff --git a/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp b/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp
index be720b8..7943deb 100644
--- a/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp
+++ b/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp
@@ -1 +1,11 @@
+/* $Id$ */
+/* RFCOMM binding table edit dialog */
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
@@ -24,6 +34,5 @@ RfcommAssignDialog::RfcommAssignDialog( QWidget* parent, const char* name, bool
{
-
m_range = 5;
- m_scrollView = new QScrollView( this );
+ m_scrollView = new QScrollView(this);
m_scrollView->setResizePolicy( QScrollView::AutoOneFit );
@@ -31,6 +40,6 @@ RfcommAssignDialog::RfcommAssignDialog( QWidget* parent, const char* name, bool
- RfcommAssignDialogBaseLayout->addWidget( m_scrollView );
+ RfcommAssignDialogBaseLayout->addWidget(m_scrollView);
- m_box = new QVBox( m_scrollView->viewport() );
- m_scrollView->addChild( m_box );
+ m_box = new QVBox(m_scrollView->viewport());
+ m_scrollView->addChild(m_box);
@@ -50,3 +59,3 @@ RfcommAssignDialog::~RfcommAssignDialog()
-void RfcommAssignDialog::newDevice( const QString & mac )
+void RfcommAssignDialog::newDevice(const QString & mac, int channel)
{
@@ -55,7 +64,6 @@ void RfcommAssignDialog::newDevice( const QString & mac )
{
-
QMap<QString, RfCommConfObject*>::Iterator it;
- it = confHandler->foundEntries().find( QString("%1").arg( i ) );
+ it = confHandler->foundEntries().find(QString::number(i));
// make sure that rfcommX is not assigned yet
- if ( it == confHandler->foundEntries().end() )
+ if ( it == confHandler->foundEntries().end() )
{
@@ -64,6 +72,11 @@ void RfcommAssignDialog::newDevice( const QString & mac )
(QSizePolicy::SizeType)7, sizePolicy().hasHeightForWidth()));
-
- RfcommDialogItem *newDev = new RfcommDialogItem( &dialog );
- newDev->setIdent( i );
- newDev->setMac( mac );
+ QVBoxLayout layout(&dialog);
+ layout.setSpacing( 0 );
+ layout.setMargin( 0 );
+
+ RfcommDialogItem newDev(&dialog);
+ newDev.setIdent( i );
+ newDev.setMac( mac );
+ newDev.setChannel( channel );
+ layout.addWidget(&newDev);
@@ -71,10 +84,13 @@ void RfcommAssignDialog::newDevice( const QString & mac )
{
- RfcommDialogItem *rfcomm = new RfcommDialogItem( m_box );
- m_itemList.insert( i , rfcomm );
+ QMap<int, RfcommDialogItem*>::Iterator it;
+ it = m_itemList.find( i );
+ RfcommDialogItem *rfcomm = it.data();
rfcomm->setIdent( i );
rfcomm->setMac( mac );
- rfcomm->setChannel( newDev->channel() );
- rfcomm->setComment( newDev->comment() );
+ rfcomm->setChannel( newDev.channel() );
+ rfcomm->setComment( newDev.comment() );
+ rfcomm->setBind( newDev.isBind() );
odebug << "New device set up" << oendl;
}
+ break;
}
@@ -83,27 +99,21 @@ void RfcommAssignDialog::newDevice( const QString & mac )
+/*
+ * Load rfcomm bind configuration
+ */
void RfcommAssignDialog::loadConfig()
{
-
- //Config cfg( "bluetoothmanager-rfcommbind" );
-
for ( int i = 0 ; i < m_range; i++ )
{
- // cfg.setGroup( QString("%1").arg( i ) );
RfcommDialogItem *rfcomm = new RfcommDialogItem( m_box );
- m_itemList.insert( i , rfcomm );
- rfcomm->setIdent( i );
+ m_itemList.insert(i, rfcomm);
+ rfcomm->setIdent(i);
QMap<QString, RfCommConfObject*>::Iterator it;
- it = confHandler->foundEntries().find( QString("%1").arg( i ) );
- if ( it != confHandler->foundEntries().end() )
+ it = confHandler->foundEntries().find(QString::number(i));
+ if (it != confHandler->foundEntries().end())
{
- odebug << "Found key in foundEntries() " << oendl;
- rfcomm->setMac( it.data()->mac() );
- rfcomm->setChannel( it.data()->channel() );
- rfcomm->setComment( it.data()->comment() );
+ rfcomm->setMac(it.data()->mac());
+ rfcomm->setChannel(it.data()->channel());
+ rfcomm->setComment(it.data()->comment());
+ rfcomm->setBind(it.data()->isBind());
}
- /* Use rfcomm.conf directly for now
- * rfcomm->setMac( cfg.readEntry( "mac", "" ) );
- * rfcomm->setChannel( cfg.readNumEntry( "channel", 1 ) );
- * rfcomm->setComment( cfg.readEntry( "comment", "" ) );
- */
}
@@ -112,9 +122,8 @@ void RfcommAssignDialog::loadConfig()
+/*
+ * Save rfcomm bind configuration
+ */
void RfcommAssignDialog::saveConfig()
{
-
- //Config cfg( "bluetoothmanager-rfcommbind" );
-
QMap< int, RfcommDialogItem*>::Iterator it;
-
QMap< QString, RfCommConfObject*> outMap;
@@ -123,17 +132,23 @@ void RfcommAssignDialog::saveConfig()
{
-
- //cfg.setGroup( QString("%1").arg( it.key() ) );
RfcommDialogItem *rfcomm = it.data();
-
-
- outMap.insert( QString( "%1").arg( it.key() ), new RfCommConfObject( it.key(), rfcomm->mac(), rfcomm->channel(), rfcomm->comment() ) );
-
-
- //cfg.writeEntry( "mac", rfcomm->mac() );
- //cfg.writeEntry( "channel", rfcomm->channel() );
- //cfg.writeEntry( "comment", rfcomm->comment() );
+ if (rfcomm->mac().isEmpty())
+ continue;
+ outMap.insert(QString::number(it.key()),
+ new RfCommConfObject(it.key(),
+ rfcomm->mac(), rfcomm->channel(), rfcomm->comment(),
+ rfcomm->isBind()));
}
+ confHandler->save(outMap);
+}
- confHandler->save( outMap );
-
+/*
+ * Reaction on the OK button
+ */
+void RfcommAssignDialog::accept()
+{
+ odebug << "save configuration" << oendl;
+ saveConfig();
+ RfcommAssignDialogBase::accept();
}
+
+//eof
diff --git a/noncore/net/opietooth/manager/rfcommassigndialogimpl.h b/noncore/net/opietooth/manager/rfcommassigndialogimpl.h
index 9983632..12cde0e 100644
--- a/noncore/net/opietooth/manager/rfcommassigndialogimpl.h
+++ b/noncore/net/opietooth/manager/rfcommassigndialogimpl.h
@@ -1 +1,11 @@
+/* $Id$ */
+/* RFCOMM binding table edit dialog */
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
#ifndef RFCOMMASSIGN
@@ -14,22 +24,22 @@ namespace OpieTooth {
class RfcommAssignDialog: public RfcommAssignDialogBase {
-
- Q_OBJECT
-
+ Q_OBJECT
public:
+ RfcommAssignDialog(QWidget* parent = 0, const char* name = 0,
+ bool modal = 0, WFlags fl = 0);
+ ~RfcommAssignDialog();
- RfcommAssignDialog( QWidget* parent = 0, const char* name = 0,bool modal = 0, WFlags fl = 0 );
- ~RfcommAssignDialog();
-
- void loadConfig();
- void saveConfig();
+ void loadConfig();
+ void saveConfig();
- void newDevice( const QString & mac );
+ void newDevice( const QString & mac, int channel );
private:
- QScrollView *m_scrollView;
- // how many rfcomm devices are possible
- int m_range;
- QMap< int, RfcommDialogItem* > m_itemList;
- QVBox *m_box;
- RfCommConfHandler *confHandler;
+ QScrollView *m_scrollView;
+ // how many rfcomm devices are possible
+ int m_range;
+ QMap< int, RfcommDialogItem* > m_itemList;
+ QVBox *m_box;
+ RfCommConfHandler *confHandler;
+ protected slots:
+ virtual void accept();
};
diff --git a/noncore/net/opietooth/manager/rfcommassigndialogitem.cpp b/noncore/net/opietooth/manager/rfcommassigndialogitem.cpp
index a41f304..472b86c 100644
--- a/noncore/net/opietooth/manager/rfcommassigndialogitem.cpp
+++ b/noncore/net/opietooth/manager/rfcommassigndialogitem.cpp
@@ -6,2 +6,3 @@
#include <qgroupbox.h>
+#include <qcheckbox.h>
@@ -35,2 +36,6 @@ QString RfcommDialogItem::comment() {
+bool RfcommDialogItem::isBind() {
+ return m_bind->isChecked();
+}
+
void RfcommDialogItem::setIdent( int ident ) {
@@ -52,2 +57,6 @@ void RfcommDialogItem::setComment( const QString &comment ) {
+void RfcommDialogItem::setBind( bool dobind ) {
+ m_bind->setChecked( dobind );
+}
+//eof
diff --git a/noncore/net/opietooth/manager/rfcommassigndialogitem.h b/noncore/net/opietooth/manager/rfcommassigndialogitem.h
index 34a794f..cc9c8db 100644
--- a/noncore/net/opietooth/manager/rfcommassigndialogitem.h
+++ b/noncore/net/opietooth/manager/rfcommassigndialogitem.h
@@ -23,4 +23,5 @@ namespace OpieTooth {
QString comment();
+ bool isBind();
- void setIdent( int ident );
+ void setIdent( int ident );
void setMac( const QString& mac );
@@ -28,2 +29,3 @@ namespace OpieTooth {
void setComment( const QString& comment );
+ void setBind(bool dobind);
diff --git a/noncore/net/opietooth/manager/rfcommconfhandler.cpp b/noncore/net/opietooth/manager/rfcommconfhandler.cpp
index f82d2c8..054b446 100644
--- a/noncore/net/opietooth/manager/rfcommconfhandler.cpp
+++ b/noncore/net/opietooth/manager/rfcommconfhandler.cpp
@@ -13,3 +13,4 @@ using namespace OpieTooth;
-RfCommConfObject::RfCommConfObject( int number, QString mac, int channel, QString comment ) {
+RfCommConfObject::RfCommConfObject(int number, QString mac, int channel,
+ QString comment, bool bind) {
m_number = number;
@@ -18,3 +19,3 @@ RfCommConfObject::RfCommConfObject( int number, QString mac, int channel, QStrin
m_comment = comment;
- // m_foundEntries = 0;
+ m_doBind = bind;
}
@@ -43,3 +44,2 @@ RfCommConfObject::~RfCommConfObject() {
RfCommConfHandler::RfCommConfHandler( const QString & filename ) {
-
m_filename = filename;
@@ -54,15 +54,28 @@ void RfCommConfHandler::save( QMap<QString, RfCommConfObject*> devices ) {
- QFile rfCommConf( "/tmp/test" );
+//// For debugging purposes
+//// QFile rfCommConf( "/mnt/net/opie/bin/rfcomm.conf" );
+ QFile rfCommConf( m_filename );
QTextStream outStream( &rfCommConf );
if ( rfCommConf.open( IO_WriteOnly ) ) {
-
QMap<QString, RfCommConfObject*>::Iterator it;
+ outStream << "#\n";
+ outStream << "# RFCOMM configuration file.\n";
+ outStream << "#\n";
+ outStream << "# $Id$\n";
+ outStream << "#\n\n";
for( it = devices.begin(); it != devices.end(); ++it ) {
outStream << "rfcomm" + QString("%1").arg( it.data()->number() ) + " {\n";
- outStream << " device " + it.data()->mac() + ";\n";
- outStream << " channel " + QString( "%1" ).arg( it.data()->channel() ) + ";\n";
- outStream << " comment \"" + it.data()->comment() + "\";\n";
+ outStream << "\t# Automatically bind the device at startup\n";
+ outStream << "\tbind " << ((it.data()->isBind())? "yes": "no") << ";\n";
+ outStream << "\n";
+ outStream << "\t# Bluetooth address of the device\n";
+ outStream << "\tdevice " + it.data()->mac() + ";\n";
+ outStream << "\n";
+ outStream << "\t# RFCOMM channel for the connection\n";
+ outStream << "\tchannel\t" + QString( "%1" ).arg( it.data()->channel() ) + ";\n";
+ outStream << "\n";
+ outStream << "\t# Description of the connection\n";
+ outStream << "\tcomment \"" + it.data()->comment() + "\";\n";
outStream << "}\n\n";
}
-
rfCommConf.close();
@@ -77,5 +90,12 @@ QMap<QString, RfCommConfObject*> RfCommConfHandler::foundEntries() {
void RfCommConfHandler::load() {
+ //Keywords
+ QCString k_rfcomm("rfcomm");
+ QCString k_device("device ");
+ QCString k_channel("channel ");
+ QCString k_comment("comment ");
+ QCString k_bind("bind ");
- QFile rfCommConf( m_filename );
- if ( rfCommConf.open( IO_ReadOnly ) ) {
+ m_foundEntries.clear();
+ QFile rfCommConf(m_filename); //File we read
+ if (rfCommConf.open(IO_ReadOnly)) {
@@ -85,3 +105,2 @@ void RfCommConfHandler::load() {
- QString number;
QString mac;
@@ -89,22 +108,45 @@ void RfCommConfHandler::load() {
QString comment;
+ QString bind;
+ bool bbind;
+ QString number;
- for ( QStringList::Iterator line=list.begin(); line != list.end(); line++ ) {
+ for (QStringList::Iterator line = list.begin();
+ line != list.end(); line++) {
- QString tmpLine = ( *line ).stripWhiteSpace();
+ QString tmpLine = (*line).simplifyWhiteSpace();
- if ( tmpLine.startsWith("rfcomm") ) {
- QString number = tmpLine.mid( 6,1 );
+ if (tmpLine.startsWith(k_rfcomm)) {
+ number = tmpLine.mid( k_rfcomm.length(), 1 );
odebug << tmpLine << oendl;
- odebug << "TEST " + number << oendl;
+ odebug << "device " << number << oendl;
} else if ( tmpLine.startsWith( "}" ) ) {
- m_foundEntries.insert( number, new RfCommConfObject( number.toInt(), mac, channel.toInt(), comment ) );
- } else if ( tmpLine.startsWith( "device" ) ) {
- mac = tmpLine.mid( 7, 17 );
- odebug << "mac" + mac << oendl;
- } else if ( tmpLine.startsWith( "channel" ) ) {
- channel = tmpLine.mid( 8, 1 );
- odebug << "Channel :" << channel << oendl;
- } else if ( tmpLine.startsWith( "comment" ) ) {
- comment = tmpLine.mid( 9, tmpLine.find( ';' ) - 9 - 1 );
+ m_foundEntries.insert(number,
+ new RfCommConfObject(number.toInt(), mac, channel.toInt(),
+ comment, bbind));
+ } else if ( tmpLine.startsWith(k_device) ) {
+ mac = tmpLine.mid(k_device.length(),
+ tmpLine.find(';') - k_device.length());
+ odebug << "mac " + mac << oendl;
+ } else if ( tmpLine.startsWith(k_channel) ) {
+ channel = tmpLine.mid(k_channel.length(),
+ tmpLine.find(';') - k_channel.length());
+ odebug << "Channel: " << channel << oendl;
+ } else if ( tmpLine.startsWith(k_comment) ) {
+ comment = tmpLine.mid(k_comment.length(),
+ tmpLine.find(';') - k_comment.length());
+ if (comment.left(1) == "\"")
+ comment.remove(0, 1);
+ if (comment.right(1) == "\"")
+ comment.remove(comment.length() - 1, 1);
odebug << "Comment: " + comment << oendl;
+ } else if ( tmpLine.startsWith(k_bind) ) {
+ bind = tmpLine.mid(k_bind.length(),
+ tmpLine.find(';') - k_bind.length());
+ if (bind == "no")
+ bbind = false;
+ else if (bind == "yes")
+ bbind = true;
+ else
+ bbind = true;
+ odebug << "bind: " + bind << oendl;
}
@@ -113,4 +155,6 @@ void RfCommConfHandler::load() {
}
- save( m_foundEntries );
+ save(m_foundEntries);
odebug << QString( "ENTries: %1").arg( m_foundEntries.count() ) << oendl;
}
+
+//eof
diff --git a/noncore/net/opietooth/manager/rfcommconfhandler.h b/noncore/net/opietooth/manager/rfcommconfhandler.h
index e13c833..46aaa26 100644
--- a/noncore/net/opietooth/manager/rfcommconfhandler.h
+++ b/noncore/net/opietooth/manager/rfcommconfhandler.h
@@ -13,3 +13,4 @@ namespace OpieTooth {
public:
- RfCommConfObject( int number, QString mac, int channel, QString comment );
+ RfCommConfObject( int number, QString mac, int channel, QString comment,
+ bool bind);
~RfCommConfObject();
@@ -24,5 +25,7 @@ namespace OpieTooth {
QString comment() { return m_comment; };
-
+ bool isBind() { return m_doBind; }
+ void doBind(bool arg) { m_doBind = arg; }
private:
+ bool m_doBind;
int m_number;
diff --git a/noncore/net/opietooth/manager/rfcommdialogitembase.ui b/noncore/net/opietooth/manager/rfcommdialogitembase.ui
index dd8f121..43f3269 100644
--- a/noncore/net/opietooth/manager/rfcommdialogitembase.ui
+++ b/noncore/net/opietooth/manager/rfcommdialogitembase.ui
@@ -13,3 +13,3 @@
<y>0</y>
- <width>239</width>
+ <width>235</width>
<height>95</height>
@@ -46,6 +46,6 @@
</property>
- <grid>
+ <vbox>
<property stdset="1">
<name>margin</name>
- <number>5</number>
+ <number>0</number>
</property>
@@ -53,5 +53,5 @@
<name>spacing</name>
- <number>5</number>
+ <number>2</number>
</property>
- <widget row="0" column="0" >
+ <widget>
<class>QLayoutWidget</class>
@@ -61,3 +61,6 @@
</property>
- <hbox>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <vbox>
<property stdset="1">
@@ -68,9 +71,9 @@
<name>spacing</name>
- <number>6</number>
+ <number>2</number>
</property>
<widget>
- <class>QLabel</class>
+ <class>QCheckBox</class>
<property stdset="1">
<name>name</name>
- <cstring>TextLabel4</cstring>
+ <cstring>m_bind</cstring>
</property>
@@ -78,10 +81,3 @@
<name>text</name>
- <string>Mac</string>
- </property>
- </widget>
- <widget>
- <class>QLineEdit</class>
- <property stdset="1">
- <name>name</name>
- <cstring>m_macAddress</cstring>
+ <string>bind automatically</string>
</property>
@@ -89,130 +85,168 @@
<widget>
- <class>QLabel</class>
+ <class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>TextLabel5</cstring>
+ <cstring>Layout3</cstring>
</property>
- <property stdset="1">
- <name>text</name>
- <string>Channel</string>
+ <property>
+ <name>layoutSpacing</name>
</property>
- </widget>
- <widget>
- <class>QComboBox</class>
- <item>
- <property>
- <name>text</name>
- <string>0</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>1</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>2</string>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
</property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>3</string>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
</property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>4</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>5</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>6</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>7</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>8</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>9</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>10</string>
- </property>
- </item>
- <property stdset="1">
- <name>name</name>
- <cstring>m_channelDropdown</cstring>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget row="1" column="0" >
- <class>QLayoutWidget</class>
- <property stdset="1">
- <name>name</name>
- <cstring>Layout4</cstring>
- </property>
- <hbox>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget>
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>TextLabel3</cstring>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>1</vsizetype>
- </sizepolicy>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Comment:</string>
- </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Mac</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>m_macAddress</cstring>
+ </property>
+ </widget>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel5</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Channel</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QComboBox</class>
+ <item>
+ <property>
+ <name>text</name>
+ <string>0</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>1</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>2</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>3</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>4</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>5</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>6</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>7</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>8</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>9</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>10</string>
+ </property>
+ </item>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>m_channelDropdown</cstring>
+ </property>
+ </widget>
+ </hbox>
</widget>
<widget>
- <class>QLineEdit</class>
+ <class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>m_commentLine</cstring>
+ <cstring>Layout4</cstring>
</property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Comment:</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>m_commentLine</cstring>
+ </property>
+ </widget>
+ </hbox>
</widget>
- </hbox>
+ </vbox>
</widget>
- </grid>
+ </vbox>
</widget>
diff --git a/noncore/net/opietooth/manager/rfcpopup.cpp b/noncore/net/opietooth/manager/rfcpopup.cpp
index 7711f0a..04da19f 100644
--- a/noncore/net/opietooth/manager/rfcpopup.cpp
+++ b/noncore/net/opietooth/manager/rfcpopup.cpp
@@ -107,3 +107,4 @@ void RfcCommPopup::slotBind()
- rfcommAssign.newDevice( m_item->mac() );
+ rfcommAssign.newDevice( m_item->mac(),
+ m_service.protocolDescriptorList().last().port());