Diffstat (limited to 'noncore/net/opietooth/manager/bluebase.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 17 |
1 files changed, 17 insertions, 0 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,12 +57,14 @@ 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() ) ); |
63 | |||
64 | connect( rfcommBindButton, SIGNAL( clicked() ), this, SLOT( rfcommDialog() ) ); | ||
62 | // not good since lib is async | 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 ) ), |
@@ -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 | */ | ||
254 | void 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 | */ |
251 | void BlueBase::addSearchedDevices( const QValueList<RemoteDevice> &newDevices ) { | 268 | void BlueBase::addSearchedDevices( const QValueList<RemoteDevice> &newDevices ) { |
252 | BTDeviceItem * deviceItem; | 269 | BTDeviceItem * deviceItem; |
253 | QValueList<RemoteDevice>::ConstIterator it; | 270 | QValueList<RemoteDevice>::ConstIterator it; |