AmFmTuner QML Type
Provides a interface to control the AM/FM tuner. More...
Import Statement: | import QtInterfaceFramework.Media 1.0 |
Instantiates: | QIfAmFmTuner |
Inherits: |
Properties
- band : enumeration
- configurationId : string
- discoveryMode : enumeration
- discoveryResult : enumeration
- frequency : int
- isInitialized : bool
- isValid : bool
- maximumFrequency : int
- minimumFrequency : int
- preferredBackends : list<string>
- scanRunning : bool
- serviceObject : ServiceObject
- station : AmFmTunerStation
- stepSize : int
Signals
Methods
- seekDown()
- seekUp()
- enumeration startAutoDiscovery()
- startScan()
- stepDown()
- stepUp()
- stopScan()
- tune(AmFmTunerStation station)
Detailed Description
The AmFmTuner provides the methods to control a AM/FM tuner.
Uses qtifmedia
as configurationId for InterfaceFrameworkConfiguration based settings.
Property Documentation
band : enumeration |
The current band of the tuner.
Available values are:
Constant | Description |
---|---|
AMBand | 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. |
FMBand | 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. |
configurationId : string |
Holds the id to determine which configuration this feature belongs to.
Once the id has been set, it is possible to change certain values using the InterfaceFrameworkConfiguration API.
Note: Values set in the matching InterfaceFrameworkConfiguration can override the initial values set during the component creation.
See also InterfaceFrameworkConfiguration.
discoveryMode : enumeration |
Holds the mode that is used for the autoDiscovery
Available values are:
Constant | Description |
---|---|
NoAutoDiscovery | No auto discovery is done and the ServiceObject needs to be set manually. |
AutoDiscovery | Tries to find a production backend with a matching interface and falls back to a simulation backend if not found. |
LoadOnlyProductionBackends | Only tries to load a production backend with a matching interface. |
LoadOnlySimulationBackends | Only tries to load a simulation backend with a matching interface. |
If necessary, auto discovery is started once the feature creation is completed.
Note: If you change this property after the feature is instantiated, make sure to call startAutoDiscovery() to search for a new service object.
discoveryResult : enumeration |
The result of the last autoDiscovery
Available values are:
Constant | Description |
---|---|
NoResult | Indicates that no auto discovery was started because the feature has already assigned a valid ServiceObject. |
ErrorWhileLoading | An error has happened while searching for a backend with a matching interface. |
ProductionBackendLoaded | A production backend was loaded, as a result of auto discovery. |
SimulationBackendLoaded | A simulation backend was loaded, as a result of auto discovery. |
frequency : int |
The current frequency of the tuner.
isInitialized : bool |
Indicates whether the feature has been initialized with all the values from the backend.
The property is true
once the backend sends the QIfFeatureInterface::initializationDone signal to indicate that all values have now been initialized with values from the backend.
See also isValid and QIfFeatureInterface::initializationDone.
isValid : bool |
Indicates whether the feature is ready for use.
The property is true
if the feature is ready to be used, otherwise false
. Not being ready usually indicates that no suitable service object could be found, or that automatic discovery has not been triggered.
The backend still might not have sent all properties yet and is not fully initialized. Use isInitialized instead to know when the feature holds all correct values.
See also QIfServiceObject, discoveryMode, and isInitialized.
maximumFrequency : int |
The maximum frequency of the current band.
minimumFrequency : int |
The minimum frequency of the current band.
Holds a list of wildcards to load the preferred backend during auto discovery.
The auto discovery mechanism will automatically search for backends which provide a matching interface for this feature implementation. See startAutoDiscovery() for more information.
In case multiple backends implement the same interface, the list of wildcards can be used to determine the correct one to load.
The wildcards are applied in order to the found backends. If the wildcard matches some backends those backends will be loaded, otherwise the next wildcard is used.
For example: Given an AbstractFeature with two backends, backend_mqtt.so and backend_qtro.so, the property can be set to "*_mqtt*"
to always select the backend_mqtt.so backend when available.
scanRunning : bool |
true
while a scan is in progress, false
otherwise.
See also startScan(), stopScan(), scanStarted(), and scanStopped().
serviceObject : ServiceObject |
Sets the service object for the feature.
As Features only expose the front API facing the developer, a service object implementing the actual function is required. This is usually retrieved through the auto discovery mechanism.
The setter for this property returns false if the QIfServiceObject
is already set to this particular instance or the QIfServiceObject isn't accepted by the feature.
See also discoveryMode.
station : AmFmTunerStation |
The currently tuned station.
stepSize : int |
Signal Documentation
scanStarted() |
A new scan has started and is now running.
Note: The corresponding handler is onScanStarted
.
See also startScan, stopScan, scanRunning, and scanStopped.
scanStopped() |
The currently active scan has stopped.
Note: The corresponding handler is onScanStopped
.
See also startScan, stopScan, scanRunning, and scanStarted.
Method Documentation
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.
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.
enumeration startAutoDiscovery() |
Performs an automatic discovery attempt.
The feature tries to locate a single ServiceObject that implements the required interface.
If no ServiceObject is found, the feature remains invalid. If more than one ServiceObject is found, the first instance is used.
This function returns either the type of the backend that was loaded; or an error.
If the discoveryMode
is set to QIfAbstractFeature::NoAutoDiscovery, this function does nothing and returns QIfAbstractFeature::NoResult.
Return values are:
Constant | Description |
---|---|
NoResult | Indicates that no auto discovery was started because the feature already has a valid ServiceObject assigned. |
ErrorWhileLoading | Indicates an error has occurred while searching for a backend with a matching interface. |
ProductionBackendLoaded | A production backend was loaded, as a result of auto discovery. |
SimulationBackendLoaded | A simulation backend was loaded, as a result of auto discovery. |
See also Dynamic Backend System and QIfServiceManager.
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.
stepDown() |
Decreases the frequency by the current bands step size.
stepUp() |
Increases the frequency by the current bands step size.
stopScan() |
Stops the currently active scan. If no scan is active, this method does nothing.
See also startScan, scanRunning, scanStarted, and scanStopped.
tune(AmFmTunerStation station) |
Tunes to the provided station.
© 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.