author | zecke <zecke> | 2002-07-14 18:04:14 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-07-14 18:04:14 (UTC) |
commit | 26c7e63572e729b4846e4f7551bb041aa6d4bd83 (patch) (side-by-side diff) | |
tree | 5c3bc09142bd19e84fbebb88f2e37b02e6d603cd /noncore/net/opietooth/manager/scandialog.cpp | |
parent | 31e233a6cf72bc853137ea05285f4d0f41665365 (diff) | |
download | opie-26c7e63572e729b4846e4f7551bb041aa6d4bd83.zip opie-26c7e63572e729b4846e4f7551bb041aa6d4bd83.tar.gz opie-26c7e63572e729b4846e4f7551bb041aa6d4bd83.tar.bz2 |
- able to configure HCID
- able to save and restore known devices
- able to scan servivces and shows the right pixmap too
- able to do some more
- scan dialog clean up ( tiny )
Diffstat (limited to 'noncore/net/opietooth/manager/scandialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/scandialog.cpp | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/noncore/net/opietooth/manager/scandialog.cpp b/noncore/net/opietooth/manager/scandialog.cpp index 3d6c928..9ce1b6a 100644 --- a/noncore/net/opietooth/manager/scandialog.cpp +++ b/noncore/net/opietooth/manager/scandialog.cpp @@ -67,7 +67,5 @@ namespace OpieTooth { - StartButton = new QPushButton( buttonFrame, "StartButton" ); - StartButton->setText( tr( "Start scan" ) ); + StartStopButton = new QPushButton( buttonFrame, "StartButton" ); + StartStopButton->setText( tr( "Start scan" ) ); - StopButton = new QPushButton( buttonFrame, "StopButton" ); - StopButton->setText( tr( "Cancel scan" ) ); @@ -75,4 +73,4 @@ namespace OpieTooth { - buttonLayout->addWidget(StartButton); - buttonLayout->addWidget(StopButton); + buttonLayout->addWidget(StartStopButton); +// buttonLayout->addWidget(StopButton); @@ -90,4 +88,3 @@ namespace OpieTooth { - connect( StartButton, SIGNAL( clicked() ), this, SLOT( startSearch() ) ); - connect( StopButton, SIGNAL( clicked() ), this, SLOT( stopSearch() ) ); + connect( StartStopButton, SIGNAL( clicked() ), this, SLOT( startSearch() ) ); connect( localDevice, SIGNAL( foundDevices( const QString& , RemoteDevice::ValueList ) ), @@ -96,2 +93,3 @@ namespace OpieTooth { progressStat = 0; + m_search = false; } @@ -102,6 +100,6 @@ namespace OpieTooth { progressStat++; - if (progressStat++ < 20) { - QTimer::singleShot( 2000, this, SLOT(progressTimer() ) ); - } + if (progressStat++ < 20 && m_search ) { + QTimer::singleShot( 2000, this, SLOT(progressTimer() ) ); progress->setProgress(progressStat++); + } @@ -116,2 +114,7 @@ namespace OpieTooth { void ScanDialog::startSearch() { + if ( m_search ) { + stopSearch(); + return; + } + m_search = true; progress->setProgress(0); @@ -128,2 +131,4 @@ namespace OpieTooth { // checken ob initialisiert , qcop ans applet. + StartStopButton->setText( tr("Stop scan")); + localDevice->searchDevices(); @@ -133,7 +138,8 @@ namespace OpieTooth { void ScanDialog::stopSearch() { - + m_search = true; } - void ScanDialog::fillList(const QString& device, RemoteDevice::ValueList deviceList) { - + void ScanDialog::fillList(const QString&, RemoteDevice::ValueList deviceList) { + progress->setProgress(0); + progressStat = 0; qDebug("fill List"); @@ -147,2 +153,4 @@ namespace OpieTooth { } + m_search = false; + StartStopButton->setText(tr ("Start scan") ); } @@ -177,2 +185,3 @@ namespace OpieTooth { ScanDialog::~ScanDialog() { + qWarning("delete scan dialog"); delete localDevice; |