summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/scandialog.cpp21
-rw-r--r--noncore/net/opietooth/manager/scandialog.h2
2 files changed, 17 insertions, 6 deletions
diff --git a/noncore/net/opietooth/manager/scandialog.cpp b/noncore/net/opietooth/manager/scandialog.cpp
index f8f7b15..ec8df82 100644
--- a/noncore/net/opietooth/manager/scandialog.cpp
+++ b/noncore/net/opietooth/manager/scandialog.cpp
@@ -89,8 +89,9 @@ namespace OpieTooth {
localDevice = new Manager( "hci0" );
- connect( (QObject*)StartButton, SIGNAL( clicked() ), this, SLOT( startSearch() ) );
- connect( (QObject*)StopButton, SIGNAL( clicked() ), this, SLOT( stopSearch() ) );
- connect( (QObject*)localDevice, SIGNAL( foundDevices( const QString& , RemoteDevices::ValueList ) ),
- this, SLOT(fillList(const QString& , RemoteDevices::ValueList ) ) ) ;
+ connect( StartButton, SIGNAL( clicked() ), this, SLOT( startSearch() ) );
+ connect( StopButton, SIGNAL( clicked() ), this, SLOT( stopSearch() ) );
+ connect( localDevice, SIGNAL( foundDevices( const QString& , RemoteDevice::ValueList ) ),
+ this, SLOT(fillList(const QString& , RemoteDevice::ValueList ) ) ) ;
+ // connect( this, SIGNAL( accept() ), this, SLOT( emitToManager() ));
progressStat = 0;
}
@@ -107,4 +108,10 @@ namespace OpieTooth {
}
+ void ScanDialog::accept() {
+ emitToManager();
+ QDialog::accept();
+ }
+
+
void ScanDialog::startSearch() {
progress->setProgress(0);
@@ -127,4 +134,5 @@ namespace OpieTooth {
void ScanDialog::fillList(const QString& device, RemoteDevice::ValueList deviceList) {
+ qDebug("fill List");
QCheckListItem * deviceItem;
@@ -132,5 +140,5 @@ namespace OpieTooth {
for( it = deviceList.begin(); it != deviceList.end(); ++it ) {
- deviceItem = new QCheckListItem( ListView1, (*it).name() );
+ deviceItem = new QCheckListItem( ListView1, (*it).name(), QCheckListItem::CheckBox );
deviceItem->setText(1, (*it).mac() );
}
@@ -142,4 +150,5 @@ namespace OpieTooth {
*/
void ScanDialog::emitToManager() {
+ qDebug("vor liste durchsuchen");
if (!ListView1) {
@@ -157,4 +166,5 @@ namespace OpieTooth {
}
}
+ qDebug("vor emit");
emit selectedDevices( *deviceList );
delete deviceList;
@@ -165,5 +175,4 @@ namespace OpieTooth {
*/
ScanDialog::~ScanDialog() {
- emitToManager();
delete localDevice;
}
diff --git a/noncore/net/opietooth/manager/scandialog.h b/noncore/net/opietooth/manager/scandialog.h
index adc960c..7c84ce2 100644
--- a/noncore/net/opietooth/manager/scandialog.h
+++ b/noncore/net/opietooth/manager/scandialog.h
@@ -53,4 +53,6 @@ class Device;
QListView* ListView1;
+public slots:
+ void accept();
protected: