From 7535629ecb4a4af6c003ea0b3ba7e5eca6f1d847 Mon Sep 17 00:00:00 2001 From: Jonas Rabbe Date: Fri, 26 Aug 2011 10:59:19 +1000 Subject: Introduction of fake radio backend to enable testing the radio APIs Includes some behavior for all standard methods. Also fixes a typo in qradiotunercontrol.h and a couple of minor bugs in the radio example that came to light using this new backend. Change-Id: I65b8b8715a46f0fd702f9630ea81f7d5df527055 Reviewed-on: http://codereview.qt.nokia.com/3619 Reviewed-by: Qt Sanity Bot Reviewed-by: Dmytro Poplavskiy Reviewed-by: Michael Goddard --- examples/radio/radio.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/radio/radio.cpp b/examples/radio/radio.cpp index 0d4c33e93..34a034235 100644 --- a/examples/radio/radio.cpp +++ b/examples/radio/radio.cpp @@ -45,8 +45,6 @@ Radio::Radio() { radio = new QRadioTuner; - connect(radio,SIGNAL(frequencyChanged(int)),this,SLOT(freqChanged(int))); - connect(radio,SIGNAL(signalStrengthChanged(int)),this,SLOT(signalChanged(int))); connect(radio, SIGNAL(error(QRadioTuner::Error)), this, SLOT(error(QRadioTuner::Error))); if(radio->isBandSupported(QRadioTuner::FM)) @@ -62,6 +60,7 @@ Radio::Radio() freq = new QLabel; freq->setText(QString("%1 kHz").arg(radio->frequency()/1000)); topBar->addWidget(freq); + connect(radio,SIGNAL(frequencyChanged(int)),this,SLOT(freqChanged(int))); signal = new QLabel; if (radio->isAvailable()) @@ -69,6 +68,8 @@ Radio::Radio() else signal->setText(tr("No radio found")); topBar->addWidget(signal); + connect(radio,SIGNAL(signalStrengthChanged(int)),this,SLOT(signalChanged(int))); + volumeSlider = new QSlider(Qt::Vertical,this); volumeSlider->setRange(0,100); volumeSlider->setValue(50); -- cgit v1.2.3