summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/bluebase.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/opietooth/manager/bluebase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index 54808fa..2e68984 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -17,12 +17,13 @@
#include "bluebase.h"
#include "scandialog.h"
#include "hciconfwrapper.h"
#include "devicehandler.h"
#include "btconnectionitem.h"
+#include "rfcommassigndialogimpl.h"
#include <remotedevice.h>
#include <services.h>
#include <stdlib.h>
@@ -56,13 +57,15 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl )
: BluetoothBase( parent, name, fl ) {
m_localDevice = new Manager( "hci0" );
connect( PushButton2, SIGNAL( clicked() ), this, SLOT(startScan() ) );
connect( configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges() ) );
- // not good since lib is async
+
+ connect( rfcommBindButton, SIGNAL( clicked() ), this, SLOT( rfcommDialog() ) );
+// not good since lib is async
// connect( ListView2, SIGNAL( expanded ( QListViewItem* ) ),
// this, SLOT( addServicesToDevice( QListViewItem * ) ) );
connect( ListView2, SIGNAL( clicked( QListViewItem* )),
this, SLOT( startServiceActionClicked( QListViewItem* ) ) );
connect( ListView2, SIGNAL( rightButtonClicked( QListViewItem *, const QPoint &, int ) ),
this, SLOT(startServiceActionHold( QListViewItem *, const QPoint &, int) ) );
@@ -219,13 +222,13 @@ void BlueBase::initGui() {
* Get the status informations and returns it
* @return QString the status informations gathered
*/
QString BlueBase::status()const{
QString infoString = tr( "<b>Device name : </b> Ipaq" );
infoString += QString( "<br><b>" + tr( "MAC adress: " ) +"</b> No idea" );
- infoString += QString( "<br><b>" + tr( "Class" ) + "</b> PDA" );
+ infoString += QString( "<br><b>" + tr( "Class" ) + "</b> PDA" );
return (infoString);
}
/**
@@ -242,12 +245,26 @@ void BlueBase::applyConfigChanges() {
writeConfig();
QMessageBox::information( this, tr("Test") , tr("Changes were applied.") );
}
/**
+ * Launch Rfcomm Bind dialog
+ *
+ */
+void BlueBase::rfcommDialog() {
+ RfcommAssignDialog rfcommAssign ( this, "RfcommAssignDialog", true, WStyle_ContextHelp );
+
+ rfcommAssign.showMaximized();
+
+ if ( rfcommAssign.exec() == QDialog::Accepted ) {
+ rfcommAssign.saveConfig();
+ }
+}
+
+/**
* Add fresh found devices from scan dialog to the listing
*
*/
void BlueBase::addSearchedDevices( const QValueList<RemoteDevice> &newDevices ) {
BTDeviceItem * deviceItem;
QValueList<RemoteDevice>::ConstIterator it;