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.cpp40
1 files changed, 23 insertions, 17 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index 3e7e2ab..d023302 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -38,2 +38,3 @@
38#include <qpopupmenu.h> 38#include <qpopupmenu.h>
39#include <qtimer.h>
39 40
@@ -67,2 +68,4 @@ namespace OpieTooth {
67 this, SLOT( deviceActive( const QString& , bool ) ) ); 68 this, SLOT( deviceActive( const QString& , bool ) ) );
69 connect( localDevice, SIGNAL( connections( Connection::ValueList ) ),
70 this, SLOT( addConnectedDevices( Connection::ValueList ) ) );
68 71
@@ -94,2 +97,4 @@ namespace OpieTooth {
94 writeToHciConfig(); 97 writeToHciConfig();
98 // search conncetions
99 addConnectedDevices();
95 } 100 }
@@ -297,7 +302,2 @@ namespace OpieTooth {
297 302
298 // move into the c'tor
299 // deviceItem->setMac( dev->mac() );
300 // what kind of entry is it.
301 //deviceItem->setType( "device");
302
303 // ggf auch hier? 303 // ggf auch hier?
@@ -412,12 +412,2 @@ namespace OpieTooth {
412 412
413
414 // empty entries
415 // QListViewItem * myChild = deviceItem->firstChild();
416 //QList<QListViewItem*> tmpList;
417 //while( myChild ) {
418 // tmpList.append(myChild);
419 // myChild = myChild->nextSibling();
420 // }
421
422
423 QValueList<OpieTooth::Services>::Iterator it2; 413 QValueList<OpieTooth::Services>::Iterator it2;
@@ -441,9 +431,25 @@ namespace OpieTooth {
441 * Add the existing connections (pairs) to the connections tab. 431 * Add the existing connections (pairs) to the connections tab.
442 * 432 * This one triggers the search
443 */ 433 */
444 void BlueBase::addConnectedDevices() { 434 void BlueBase::addConnectedDevices() {
435 localDevice->searchConnections();
436 }
445 437
446 438
447 //mac address 439 void BlueBase::addConnectedDevices( Connection::ValueList connectionList ) {
440
441 QValueList<OpieTooth::Connection>::Iterator it;
442 BTListItem * connectionItem;
443
444 if ( !connectionList.isEmpty() ) {
445
446 for (it = connectionList.begin(); it != connectionList.end(); ++it) {
447 connectionItem = new BTListItem( ListView4 , (*it).mac() , (*it).mac() , "connection" );
448 }
449 } else {
450 connectionItem = new BTListItem( ListView4 , tr("No connections found"), "", "connection" );
451 }
448 452
453 // recall connection search after some time
454 QTimer::singleShot( 20000, this, SLOT( addConnectedDevices() ) );
449 } 455 }