QIfAmFmTuner Class
Provides a interface to control the AM/FM tuner. More...
Header: | #include <QIfAmFmTuner> |
qmake: | QT += ifmedia |
In QML: | AmFmTuner |
Inherits: | QIfAbstractFeature |
Public Types
enum | Band { AMBand, FMBand } |
Properties
|
|
Public Functions
QIfAmFmTuner(QObject *parent = nullptr) | |
QIfAmFmTuner::Band | band() const |
int | frequency() const |
bool | isScanRunning() const |
int | maximumFrequency() const |
int | minimumFrequency() const |
QIfAmFmTunerStation | station() const |
int | stepSize() const |
void | tune(const QIfAmFmTunerStation &station) |
Public Slots
void | seekDown() |
void | seekUp() |
void | setBand(QIfAmFmTuner::Band band) |
void | setFrequency(int frequency) |
void | startScan() |
void | stepDown() |
void | stepUp() |
void | stopScan() |
Signals
void | bandChanged(QIfAmFmTuner::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 QIfAmFmTunerStation &station) |
void | stepSizeChanged(int stepSize) |
Reimplemented Protected Functions
virtual void | clearServiceObject() override |
virtual void | connectToServiceObject(QIfServiceObject *serviceObject) override |
Detailed Description
The QIfAmFmTuner provides the methods to control a AM/FM tuner.
Uses qtifmedia
as configurationId for QIfConfiguration based settings.
Member Type Documentation
enum QIfAmFmTuner::Band
Constant | Value | Description |
---|---|---|
QIfAmFmTuner::AMBand | 0 | The 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. |
QIfAmFmTuner::FMBand | 1 | The 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 : QIfAmFmTuner::Band
This property holds the current band of the tuner.
Access functions:
QIfAmFmTuner::Band | band() const |
void | setBand(QIfAmFmTuner::Band band) |
Notifier signal:
void | bandChanged(QIfAmFmTuner::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) |
[read-only]
maximumFrequency : const int
This property holds the maximum frequency of the current band.
Access functions:
int | maximumFrequency() const |
Notifier signal:
void | maximumFrequencyChanged(int maximumFrequency) |
[read-only]
minimumFrequency : const int
This property holds the minimum frequency of the current band.
Access functions:
int | minimumFrequency() const |
Notifier signal:
void | minimumFrequencyChanged(int minimumFrequency) |
[read-only]
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().
[read-only]
station : const QIfAmFmTunerStation
This property holds the currently tuned station.
Access functions:
QIfAmFmTunerStation | station() const |
Notifier signal:
void | stationChanged(const QIfAmFmTunerStation &station) |
[read-only]
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) |
Member Function Documentation
[explicit]
QIfAmFmTuner::QIfAmFmTuner(QObject *parent = nullptr)
Constructs a QIfAmFmTuner.
The parent argument is passed on to the QIfAbstractFeature base class.
[override virtual protected]
void QIfAmFmTuner::clearServiceObject()
Reimplements: QIfAbstractFeature::clearServiceObject().
[override virtual protected]
void QIfAmFmTuner::connectToServiceObject(QIfServiceObject *serviceObject)
Reimplements: QIfAbstractFeature::connectToServiceObject(QIfServiceObject *serviceObject).
[signal]
void QIfAmFmTuner::scanStarted()
A new scan has started and is now running.
See also startScan, stopScan, scanRunning, and scanStopped.
[signal]
void QIfAmFmTuner::scanStopped()
The currently active scan has stopped.
See also startScan, stopScan, scanRunning, and scanStarted.
[slot]
void QIfAmFmTuner::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 QIfAmFmTuner::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 QIfAmFmTuner::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 QIfAmFmTuner::stepDown()
Decreases the frequency by the current bands step size.
[slot]
void QIfAmFmTuner::stepUp()
Increases the frequency by the current bands step size.
[slot]
void QIfAmFmTuner::stopScan()
Stops the currently active scan. If no scan is active, this method does nothing.
See also startScan, scanRunning, scanStarted, and scanStopped.
[invokable]
void QIfAmFmTuner::tune(const QIfAmFmTunerStation &station)
Tunes to the provided station.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
© 2024 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.