author | harlekin <harlekin> | 2002-06-19 00:18:46 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-06-19 00:18:46 (UTC) |
commit | 35ecb27ed64368d30d6360cbd5e30acf3a216a46 (patch) (side-by-side diff) | |
tree | 814fd75d019af357c5c78f5166b0a0a0b218689c /noncore/net/opietooth/manager/scandialog.cpp | |
parent | 14881bb4baf3ac470a135bdde6ffb115c91ea124 (diff) | |
download | opie-35ecb27ed64368d30d6360cbd5e30acf3a216a46.zip opie-35ecb27ed64368d30d6360cbd5e30acf3a216a46.tar.gz opie-35ecb27ed64368d30d6360cbd5e30acf3a216a46.tar.bz2 |
update
Diffstat (limited to 'noncore/net/opietooth/manager/scandialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/scandialog.cpp | 21 |
1 files changed, 15 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 @@ -88,10 +88,11 @@ 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; } @@ -106,6 +107,12 @@ namespace OpieTooth { } + void ScanDialog::accept() { + emitToManager(); + QDialog::accept(); + } + + void ScanDialog::startSearch() { progress->setProgress(0); progressStat = 0; @@ -126,12 +133,13 @@ namespace OpieTooth { void ScanDialog::fillList(const QString& device, RemoteDevice::ValueList deviceList) { + qDebug("fill List"); QCheckListItem * deviceItem; RemoteDevice::ValueList::Iterator it; 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() ); } } @@ -141,6 +149,7 @@ namespace OpieTooth { * Then it emits it, so the manager can connect to the signal to fill the listing. */ void ScanDialog::emitToManager() { + qDebug("vor liste durchsuchen"); if (!ListView1) { return; @@ -156,6 +165,7 @@ namespace OpieTooth { deviceList->append( device ); } } + qDebug("vor emit"); emit selectedDevices( *deviceList ); delete deviceList; } @@ -164,7 +174,6 @@ namespace OpieTooth { * Cleanup */ ScanDialog::~ScanDialog() { - emitToManager(); delete localDevice; } |