summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/scandialog.cpp5
-rw-r--r--noncore/net/opietooth/manager/scandialog.h2
2 files changed, 2 insertions, 5 deletions
diff --git a/noncore/net/opietooth/manager/scandialog.cpp b/noncore/net/opietooth/manager/scandialog.cpp
index b0ffbb3..63c5472 100644
--- a/noncore/net/opietooth/manager/scandialog.cpp
+++ b/noncore/net/opietooth/manager/scandialog.cpp
@@ -46,37 +46,33 @@ namespace OpieTooth {
resize( 240, 320 );
setCaption( tr( "Scan for devices" ) );
Frame7 = new QFrame( this, "Frame7" );
Frame7->setGeometry( QRect( 0, 0, 240, 331 ) );
Frame7->setFrameShape( QFrame::StyledPanel );
Frame7->setFrameShadow( QFrame::Raised );
-
QWidget* privateLayoutWidget = new QWidget( Frame7, "Layout11" );
privateLayoutWidget->setGeometry( QRect( 10, 9, 221, 280 ) );
Layout11 = new QVBoxLayout( privateLayoutWidget );
Layout11->setSpacing( 6 );
Layout11->setMargin( 0 );
-
progress = new QProgressBar(privateLayoutWidget, "progbar");
progress->setTotalSteps(20);
-
QFrame *buttonFrame = new QFrame(Frame7, "");
StartButton = new QPushButton( buttonFrame, "StartButton" );
StartButton->setText( tr( "Start" ) );
StopButton = new QPushButton( buttonFrame, "StopButton" );
StopButton->setText( tr( "Cancel" ) );
-
QHBoxLayout *buttonLayout = new QHBoxLayout(buttonFrame);
buttonLayout->addWidget(StartButton);
buttonLayout->addWidget(StopButton);
ListView1 = new QListView( privateLayoutWidget, "ListView1" );
ListView1->addColumn( tr( "Add" ) );
ListView1->addColumn( tr( "Device Name" ) );
@@ -97,16 +93,17 @@ namespace OpieTooth {
// hack, make cleaner later
void ScanDialog::progressTimer() {
progressStat++;
if (progressStat++ < 20) {
QTimer::singleShot( 1000, this, SLOT(progressTimer() ) );
}
+ progress->setProgress(progressStat++);
}
void ScanDialog::startSearch() {
progress->setProgress(0);
progressStat = 0;
progressTimer();
diff --git a/noncore/net/opietooth/manager/scandialog.h b/noncore/net/opietooth/manager/scandialog.h
index 22ee01d..fcaee6e 100644
--- a/noncore/net/opietooth/manager/scandialog.h
+++ b/noncore/net/opietooth/manager/scandialog.h
@@ -55,19 +55,19 @@ class Device;
protected:
QVBoxLayout* Layout11;
private slots:
void stopSearch();
void startSearch();
+ void progressTimer();
void fillList(const QString& device, RemoteDevices::ValueList list);
private:
- void progressTimer(int maxSeconds);
Manager *localDevice;
int progressStat;
};
}
#endif // SCANDIALOG_H