author | harlekin <harlekin> | 2003-03-07 22:55:36 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-03-07 22:55:36 (UTC) |
commit | ee1d48a9a5f3672f329301a844e69f2e184afcac (patch) (unidiff) | |
tree | a549cd37f837e2704527b7b40a0f9f8ef9372a7b /noncore/net/opietooth/manager/bluebase.cpp | |
parent | eeb28ead6d3050d662783696661d9360a049104f (diff) | |
download | opie-ee1d48a9a5f3672f329301a844e69f2e184afcac.zip opie-ee1d48a9a5f3672f329301a844e69f2e184afcac.tar.gz opie-ee1d48a9a5f3672f329301a844e69f2e184afcac.tar.bz2 |
show signal strength for connections
Diffstat (limited to 'noncore/net/opietooth/manager/bluebase.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index 8b15c4f..9663b52 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp | |||
@@ -74,2 +74,4 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) | |||
74 | this, SLOT( addConnectedDevices( ConnectionState::ValueList ) ) ); | 74 | this, SLOT( addConnectedDevices( ConnectionState::ValueList ) ) ); |
75 | connect( m_localDevice, SIGNAL( signalStrength( const QString&, const QString& ) ), | ||
76 | this, SLOT( addSignalStrength( const QString&, const QString& ) ) ); | ||
75 | 77 | ||
@@ -100,2 +102,3 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) | |||
100 | 102 | ||
103 | |||
101 | writeToHciConfig(); | 104 | writeToHciConfig(); |
@@ -103,2 +106,3 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) | |||
103 | addConnectedDevices(); | 106 | addConnectedDevices(); |
107 | addSignalStrength(); | ||
104 | m_iconLoader = new BTIconLoader(); | 108 | m_iconLoader = new BTIconLoader(); |
@@ -372,3 +376,4 @@ void BlueBase::addServicesToDevice( BTDeviceItem * item ) { | |||
372 | /** | 376 | /** |
373 | * Overloaded. This one it the one that is connected to the foundServices signal | 377 | * Overloaded. This one it the one that is |
378 | ted to the foundServices signal | ||
374 | * @param device the mac address of the remote device | 379 | * @param device the mac address of the remote device |
@@ -427,2 +432,25 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s | |||
427 | 432 | ||
433 | |||
434 | |||
435 | |||
436 | void BlueBase::addSignalStrength() { | ||
437 | |||
438 | QListViewItemIterator it( ListView4 ); | ||
439 | for ( ; it.current(); ++it ) { | ||
440 | m_localDevice->signalStrength( ((BTConnectionItem*)it.current() )->connection().mac() ); | ||
441 | } | ||
442 | |||
443 | QTimer::singleShot( 5000, this, SLOT( addSignalStrength() ) ); | ||
444 | } | ||
445 | |||
446 | void BlueBase::addSignalStrength( const QString& mac, const QString& strength ) { | ||
447 | |||
448 | QListViewItemIterator it( ListView4 ); | ||
449 | for ( ; it.current(); ++it ) { | ||
450 | if( ((BTConnectionItem*)it.current())->connection().mac() == mac ) { | ||
451 | ((BTConnectionItem*)it.current() )->setSignalStrength( strength ); | ||
452 | } | ||
453 | } | ||
454 | } | ||
455 | |||
428 | /** | 456 | /** |
@@ -435,3 +463,2 @@ void BlueBase::addConnectedDevices() { | |||
435 | 463 | ||
436 | |||
437 | /** | 464 | /** |
@@ -452,2 +479,7 @@ void BlueBase::addConnectedDevices( ConnectionState::ValueList connectionList ) | |||
452 | connectionItem = new BTConnectionItem( ListView4 , (*it) ); | 479 | connectionItem = new BTConnectionItem( ListView4 , (*it) ); |
480 | |||
481 | if( m_deviceList.find((*it).mac()).data() ) { | ||
482 | |||
483 | connectionItem->setName( m_deviceList.find( (*it).mac()).data()->name() ); | ||
484 | } | ||
453 | } | 485 | } |