summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager
Side-by-side diff
Diffstat (limited to 'noncore/net/opietooth/manager') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.h2
-rw-r--r--noncore/net/opietooth/manager/scandialog.cpp3
-rw-r--r--noncore/net/opietooth/manager/scandialog.h4
3 files changed, 5 insertions, 4 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.h b/noncore/net/opietooth/manager/bluebase.h
index ae5ce67..5364e51 100644
--- a/noncore/net/opietooth/manager/bluebase.h
+++ b/noncore/net/opietooth/manager/bluebase.h
@@ -1,24 +1,26 @@
#ifndef BLUEBASE_H
#define BLUEBASE_H
#include <qvariant.h>
#include <qwidget.h>
#include <qscrollview.h>
#include <qsplitter.h>
#include <qlist.h>
#include "bluetoothbase.h"
+#include <remotedevice.h>
+
class QVBox;
class QHBoxLayout;
class QGridLayout;
class QFrame;
class QLabel;
class QPushButton;
class QTabWidget;
class QCheckBox;
namespace OpieTooth {
diff --git a/noncore/net/opietooth/manager/scandialog.cpp b/noncore/net/opietooth/manager/scandialog.cpp
index 70ea77a..8a7ea01 100644
--- a/noncore/net/opietooth/manager/scandialog.cpp
+++ b/noncore/net/opietooth/manager/scandialog.cpp
@@ -125,42 +125,41 @@ namespace OpieTooth {
}
void ScanDialog::fillList(const QString& device, RemoteDevices::ValueList deviceList) {
QCheckListItem * deviceItem;
RemoteDevices::ValueList::Iterator it;
for( it = deviceList.begin(); it != deviceList.end(); ++it ) {
deviceItem = new QCheckListItem( ListView1, (*it).name() );
deviceItem->setText(1, (*it).mac() );
}
-
}
/*
* Iterates trough the items, and collects the checked items.
* Then it emits it, so the manager can connect to the signal to fill the listing.
*/
void ScanDialog::emitToManager() {
if (!ListView1) {
return;
}
QList<RemoteDevices> *deviceList = new QList<RemoteDevices>;
QListViewItemIterator it( ListView1 );
for ( ; it.current(); ++it ) {
- if ( it.current()->isSelected() ) {
+ if ( ((QCheckListItem*)it.current())->isOn() ) {
RemoteDevices* device = new RemoteDevices( it.current()->text(1), it.current()->text(0));
deviceList->append( device );
}
}
emit selectedDevices( *deviceList );
}
/*
* Cleanup
*/
ScanDialog::~ScanDialog() {
emitToManager();
diff --git a/noncore/net/opietooth/manager/scandialog.h b/noncore/net/opietooth/manager/scandialog.h
index 4785a62..0ca302a 100644
--- a/noncore/net/opietooth/manager/scandialog.h
+++ b/noncore/net/opietooth/manager/scandialog.h
@@ -12,39 +12,39 @@
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef SCANDIALOG_H
#define SCANDIALOG_H
#include <qvariant.h>
#include <qdialog.h>
#include <qlist.h>
-
+#include <remotedevice.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QFrame;
class QLabel;
class QListView;
class QListViewItem;
class QPushButton;
class QProgressBar;
namespace OpieTooth {
-#include <remotedevices.h>
+
class Manager;
class Device;
class ScanDialog : public QDialog {
Q_OBJECT
public:
ScanDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~ScanDialog();
QFrame* Frame7;
QProgressBar* progress;