QIviAmFmTuner Class

Provides a interface to control the AM/FM tuner. More...

Header: #include <QIviAmFmTuner>
qmake: QT += ivimedia
Instantiated By: AmFmTuner
Inherits: QIviAbstractFeature

Public Types

enum Band { AMBand, FMBand }

Properties

Public Functions

QIviAmFmTuner(QObject *parent = nullptr)
QIviAmFmTuner::Band band() const
int frequency() const
bool isScanRunning() const
int maximumFrequency() const
int minimumFrequency() const
QIviAmFmTunerStation station() const
int stepSize() const
void tune(const QIviAmFmTunerStation &station)

Public Slots

void seekDown()
void seekUp()
void setBand(QIviAmFmTuner::Band band)
void setFrequency(int frequency)
void startScan()
void stepDown()
void stepUp()
void stopScan()

Signals

void bandChanged(QIviAmFmTuner::Band band)
void frequencyChanged(int frequency)
void maximumFrequencyChanged(int maximumFrequency)
void minimumFrequencyChanged(int minimumFrequency)
void scanRunningChanged(bool scanRunning)
void scanStarted()
void scanStopped()
void stationChanged(const QIviAmFmTunerStation &station)
void stepSizeChanged(int stepSize)

Reimplemented Protected Functions

virtual void clearServiceObject() override
virtual void connectToServiceObject(QIviServiceObject *serviceObject) override

Detailed Description

The QIviAmFmTuner provides the methods to control a AM/FM tuner.

Member Type Documentation

enum QIviAmFmTuner::Band

ConstantValueDescription
QIviAmFmTuner::AMBand0The AM Band is based on the Amplitude Modulation technique and can range from 520 to 1610 kHz (1710 kHz). The step size is usually between 9 or 10 kHz.
QIviAmFmTuner::FMBand1The FM Band is based on the Frequency Modulation technique and can range from 87.5 to 108.0 MHz. The step size is usually 100 kHz.

Property Documentation

band : QIviAmFmTuner::Band

This property holds the current band of the tuner.

Access functions:

QIviAmFmTuner::Band band() const
void setBand(QIviAmFmTuner::Band band)

Notifier signal:

void bandChanged(QIviAmFmTuner::Band band)

frequency : int

This property holds the current frequency of the tuner.

Access functions:

int frequency() const
void setFrequency(int frequency)

Notifier signal:

void frequencyChanged(int frequency)

maximumFrequency : const int

This property holds the maximum frequency of the current band.

Access functions:

int maximumFrequency() const

Notifier signal:

void maximumFrequencyChanged(int maximumFrequency)

minimumFrequency : const int

This property holds the minimum frequency of the current band.

Access functions:

int minimumFrequency() const

Notifier signal:

void minimumFrequencyChanged(int minimumFrequency)

scanRunning : const bool

true while a scan is in progress, false otherwise.

Access functions:

bool isScanRunning() const

Notifier signal:

void scanRunningChanged(bool scanRunning)

See also startScan(), stopScan(), scanStarted(), and scanStopped().

station : const QIviAmFmTunerStation

This property holds the currently tuned station.

Access functions:

QIviAmFmTunerStation station() const

Notifier signal:

void stationChanged(const QIviAmFmTunerStation &station)

stepSize : const int

This property holds the frequency step size of the current band.

Access functions:

int stepSize() const

Notifier signal:

void stepSizeChanged(int stepSize)

See also stepUp() and stepDown().

Member Function Documentation

QIviAmFmTuner::QIviAmFmTuner(QObject *parent = nullptr)

Constructs a QIviAmFmTuner.

The parent argument is passed on to the QIviAbstractFeature base class.

[signal] void QIviAmFmTuner::scanStarted()

A new scan has started and is now running.

See also startScan, stopScan, scanRunning, and scanStopped.

[signal] void QIviAmFmTuner::scanStopped()

The currently active scan has stopped.

See also startScan, stopScan, scanRunning, and scanStarted.

[slot] void QIviAmFmTuner::seekDown()

Seeks the next available Station in downwards direction and tunes it.

If the beginning of the band where hit without finding a station, the search will be continued from the end of the band.

[slot] void QIviAmFmTuner::seekUp()

Seeks the next available Station in upwards direction and tunes it.

If the end of the band where hit without finding a station, the search will be continued from the beginning of the band.

[slot] void QIviAmFmTuner::startScan()

Starts a scan through all available stations.

The scan will seek to the next available station and will stay there for some seconds until it seeks to the next station.

See also stopScan, scanRunning, scanStarted, and scanStopped.

[slot] void QIviAmFmTuner::stepDown()

Decreases the frequency by the current bands step size.

[slot] void QIviAmFmTuner::stepUp()

Increases the frequency by the current bands step size.

[slot] void QIviAmFmTuner::stopScan()

Stops the currently active scan. If no scan is active, this method does nothing.

See also startScan, scanRunning, scanStarted, and scanStopped.

[override virtual protected] void QIviAmFmTuner::clearServiceObject()

Reimplements: QIviAbstractFeature::clearServiceObject().

[override virtual protected] void QIviAmFmTuner::connectToServiceObject(QIviServiceObject *serviceObject)

Reimplements: QIviAbstractFeature::connectToServiceObject(QIviServiceObject *serviceObject).

void QIviAmFmTuner::tune(const QIviAmFmTunerStation &station)

Tunes to the provided station.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

© 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.