summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/bluebase.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/opietooth/manager/bluebase.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index 71da82e..c993c7c 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -33,16 +33,18 @@
#include <qmessagebox.h>
#include <qapplication.h>
#include <qcheckbox.h>
#include <qlineedit.h>
+#include <qlistview.h>
#include <qpe/resource.h>
#include <qpe/config.h>
namespace OpieTooth {
- class RemoteDevices;
+
+ #include <remotedevice.h>
BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl )
: BluetoothBase( parent, name, fl ) {
@@ -152,22 +154,31 @@ namespace OpieTooth {
// falls nötig hcid killhupen - die funktionalität adden
}
- void BlueBase::addSearchedDevices( QList<RemoteDevices> &newDevices ) {
+ void BlueBase::addSearchedDevices( QList<RemoteDevice> &newDevices ) {
+
+ QListViewItem * deviceItem;
+ QListIterator<RemoteDevice> it(newDevices);
+ for( ; it.current(); ++it ) {
+
+ RemoteDevice *dev = it.current();
+ deviceItem = new QListViewItem( ListView4, dev->name() );
+ deviceItem->setText(1, dev->mac() );
+ }
}
/**
* Open the "scan for devices" dialog
*/
void BlueBase::startScan() {
ScanDialog *scan = new ScanDialog( this, "", true);
- QObject::connect((QObject*)scan, SIGNAL( selectedDevices(QList<RemoteDevices>&) ),
- this, SLOT( addSearchedDevices(QList<RemoteDevices>& ) ));
+ QObject::connect((QObject*)scan, SIGNAL( selectedDevices(QList<RemoteDevice>&) ),
+ this, SLOT( addSearchedDevices(QList<RemoteDevice>& ) ));
scan->showMaximized();
}