author | harlekin <harlekin> | 2002-06-28 21:53:42 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-06-28 21:53:42 (UTC) |
commit | 05a76394214a0066325c71f91eb44ed7412df67c (patch) (unidiff) | |
tree | 2b8995a8670ab3bda9a93bd37792117a4a4fa603 | |
parent | 26be5facf38c25f2b22b18a19ea7fa710f5e2236 (diff) | |
download | opie-05a76394214a0066325c71f91eb44ed7412df67c.zip opie-05a76394214a0066325c71f91eb44ed7412df67c.tar.gz opie-05a76394214a0066325c71f91eb44ed7412df67c.tar.bz2 |
connection view started
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 40 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.h | 1 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/hciconfwrapper.cpp | 4 |
3 files changed, 25 insertions, 20 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 | } |
diff --git a/noncore/net/opietooth/manager/bluebase.h b/noncore/net/opietooth/manager/bluebase.h index ef67aa2..0516c16 100644 --- a/noncore/net/opietooth/manager/bluebase.h +++ b/noncore/net/opietooth/manager/bluebase.h | |||
@@ -71,2 +71,3 @@ namespace OpieTooth { | |||
71 | void addConnectedDevices(); | 71 | void addConnectedDevices(); |
72 | void addConnectedDevices( Connection::ValueList ); | ||
72 | void startServiceActionClicked( QListViewItem *item ); | 73 | void startServiceActionClicked( QListViewItem *item ); |
diff --git a/noncore/net/opietooth/manager/hciconfwrapper.cpp b/noncore/net/opietooth/manager/hciconfwrapper.cpp index 7b2497a..2d6d7da 100644 --- a/noncore/net/opietooth/manager/hciconfwrapper.cpp +++ b/noncore/net/opietooth/manager/hciconfwrapper.cpp | |||
@@ -101,6 +101,4 @@ namespace OpieTooth { | |||
101 | } | 101 | } |
102 | |||
103 | qDebug( str ); | 102 | qDebug( str ); |
104 | } | 103 | } |
105 | |||
106 | outstream << str << endl; | 104 | outstream << str << endl; |
@@ -109,2 +107,3 @@ namespace OpieTooth { | |||
109 | f.close(); | 107 | f.close(); |
108 | |||
110 | f2.flush(); | 109 | f2.flush(); |
@@ -112,3 +111,2 @@ namespace OpieTooth { | |||
112 | } | 111 | } |
113 | |||
114 | } | 112 | } |