summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/bluebase.cpp
Unidiff
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 @@
17 17
18#include "bluebase.h" 18#include "bluebase.h"
19#include "scandialog.h" 19#include "scandialog.h"
20#include "hciconfwrapper.h" 20#include "hciconfwrapper.h"
21#include "devicehandler.h" 21#include "devicehandler.h"
22#include "btconnectionitem.h" 22#include "btconnectionitem.h"
23#include "rfcommassigndialogimpl.h"
23 24
24#include <remotedevice.h> 25#include <remotedevice.h>
25#include <services.h> 26#include <services.h>
26 27
27#include <stdlib.h> 28#include <stdlib.h>
28 29
@@ -56,13 +57,15 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl )
56 : BluetoothBase( parent, name, fl ) { 57 : BluetoothBase( parent, name, fl ) {
57 58
58 m_localDevice = new Manager( "hci0" ); 59 m_localDevice = new Manager( "hci0" );
59 60
60 connect( PushButton2, SIGNAL( clicked() ), this, SLOT(startScan() ) ); 61 connect( PushButton2, SIGNAL( clicked() ), this, SLOT(startScan() ) );
61 connect( configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges() ) ); 62 connect( configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges() ) );
62 // not good since lib is async 63
64 connect( rfcommBindButton, SIGNAL( clicked() ), this, SLOT( rfcommDialog() ) );
65// not good since lib is async
63 // connect( ListView2, SIGNAL( expanded ( QListViewItem* ) ), 66 // connect( ListView2, SIGNAL( expanded ( QListViewItem* ) ),
64 // this, SLOT( addServicesToDevice( QListViewItem * ) ) ); 67 // this, SLOT( addServicesToDevice( QListViewItem * ) ) );
65 connect( ListView2, SIGNAL( clicked( QListViewItem* )), 68 connect( ListView2, SIGNAL( clicked( QListViewItem* )),
66 this, SLOT( startServiceActionClicked( QListViewItem* ) ) ); 69 this, SLOT( startServiceActionClicked( QListViewItem* ) ) );
67 connect( ListView2, SIGNAL( rightButtonClicked( QListViewItem *, const QPoint &, int ) ), 70 connect( ListView2, SIGNAL( rightButtonClicked( QListViewItem *, const QPoint &, int ) ),
68 this, SLOT(startServiceActionHold( QListViewItem *, const QPoint &, int) ) ); 71 this, SLOT(startServiceActionHold( QListViewItem *, const QPoint &, int) ) );
@@ -219,13 +222,13 @@ void BlueBase::initGui() {
219 * Get the status informations and returns it 222 * Get the status informations and returns it
220 * @return QString the status informations gathered 223 * @return QString the status informations gathered
221 */ 224 */
222QString BlueBase::status()const{ 225QString BlueBase::status()const{
223 QString infoString = tr( "<b>Device name : </b> Ipaq" ); 226 QString infoString = tr( "<b>Device name : </b> Ipaq" );
224 infoString += QString( "<br><b>" + tr( "MAC adress: " ) +"</b> No idea" ); 227 infoString += QString( "<br><b>" + tr( "MAC adress: " ) +"</b> No idea" );
225 infoString += QString( "<br><b>" + tr( "Class" ) + "</b> PDA" ); 228 infoString += QString( "<br><b>" + tr( "Class" ) + "</b> PDA" );
226 229
227 return (infoString); 230 return (infoString);
228} 231}
229 232
230 233
231/** 234/**
@@ -242,12 +245,26 @@ void BlueBase::applyConfigChanges() {
242 writeConfig(); 245 writeConfig();
243 246
244 QMessageBox::information( this, tr("Test") , tr("Changes were applied.") ); 247 QMessageBox::information( this, tr("Test") , tr("Changes were applied.") );
245} 248}
246 249
247/** 250/**
251 * Launch Rfcomm Bind dialog
252 *
253 */
254void BlueBase::rfcommDialog() {
255 RfcommAssignDialog rfcommAssign ( this, "RfcommAssignDialog", true, WStyle_ContextHelp );
256
257 rfcommAssign.showMaximized();
258
259 if ( rfcommAssign.exec() == QDialog::Accepted ) {
260 rfcommAssign.saveConfig();
261 }
262}
263
264/**
248 * Add fresh found devices from scan dialog to the listing 265 * Add fresh found devices from scan dialog to the listing
249 * 266 *
250 */ 267 */
251void BlueBase::addSearchedDevices( const QValueList<RemoteDevice> &newDevices ) { 268void BlueBase::addSearchedDevices( const QValueList<RemoteDevice> &newDevices ) {
252 BTDeviceItem * deviceItem; 269 BTDeviceItem * deviceItem;
253 QValueList<RemoteDevice>::ConstIterator it; 270 QValueList<RemoteDevice>::ConstIterator it;