QRadioTuner Class ReferenceThe QRadioTuner class provides an interface to the systems analog radio device. More... #include <QRadioTuner> Inherits QMediaObject. Public Types
Properties
Public Functions
Public Slots
Signals
Additional Inherited Members
Detailed DescriptionThe QRadioTuner class provides an interface to the systems analog radio device. You can control the systems analog radio device using this interface, for example: radio = new QRadioTuner; connect(radio,SIGNAL(frequencyChanged(int)),this,SLOT(freqChanged(int))); if (radio->isBandSupported(QRadioTuner::FM)) { radio->setBand(QRadioTuner::FM); radio->setFrequency(yourRadioStationFrequency); radio->setVolume(100); radio->start(); } The radio object will emit signals for any changes in state such as: bandChanged(), frequencyChanged(), stereoStatusChanged(), searchingStatusChanged(), signalStrengthChanged(), volumeChanged(), mutingChanged(). You can change between the frequency bands using setBand() however it is recommended that you check to make sure the band is available first using isBandSupported(). Member Type Documentation
|
Constant | Value | Description |
---|---|---|
QRadioTuner::AM | 0 | 520 to 1610 kHz, 9 or 10kHz channel spacing, extended 1610 to 1710 kHz |
QRadioTuner::FM | 1 | 87.5 to 108.0 MHz, except Japan 76-90 MHz |
QRadioTuner::SW | 2 | 1.711 to 30.0 MHz, divided into 15 bands. 5kHz channel spacing |
QRadioTuner::LW | 3 | 148.5 to 283.5 kHz, 9kHz channel spacing (Europe, Africa, Asia) |
Enumerates radio tuner error conditions.
Constant | Value | Description |
---|---|---|
QRadioTuner::NoError | 0 | No errors have occurred. |
QRadioTuner::ResourceError | 1 | There is no radio service available. |
QRadioTuner::OpenError | 2 | Unable to open radio device. |
QRadioTuner::OutOfRangeError | 3 | An attempt to set a frequency or band that is not supported by radio device. |
Enumerates radio tuner states.
Constant | Value | Description |
---|---|---|
QRadioTuner::ActiveState | 0 | The tuner is started and active. |
QRadioTuner::StoppedState | 1 | The tuner device is stopped. |
Enumerates radio tuner policy for receiving stereo signals.
Constant | Value | Description |
---|---|---|
QRadioTuner::Auto | 2 | Uses the stereo mode matching the station. |
QRadioTuner::ForceStereo | 0 | Provide stereo mode, converting if required. |
QRadioTuner::ForceMono | 1 | Provide mono mode, converting if required. |
This property holds the frequency band a radio tuner is tuned to.
Access functions:
Band | band () const |
void | setBand ( Band band ) |
Notifier signal:
void | bandChanged ( QRadioTuner::Band band ) |
See also QRadioTuner::Band.
This property holds the frequency in Hertz a radio tuner is tuned to.
Access functions:
int | frequency () const |
void | setFrequency ( int frequency ) |
Notifier signal:
void | frequencyChanged ( int frequency ) |
This property holds whether a radio tuner's audio output is muted.
Access functions:
bool | isMuted () const |
void | setMuted ( bool muted ) |
Notifier signal:
void | mutingChanged ( bool muted ) |
This property holds whether a radio tuner is currently scanning for a signal.
Access functions:
bool | isSearching () const |
Notifier signal:
void | searchingStatusChanged ( bool searching ) |
See also searchForward(), searchBackward(), and cancelSearch().
This property holds the strength of the current radio signal as a percentage.
Access functions:
int | signalStrength () const |
Notifier signal:
void | signalStrengthChanged ( int strength ) |
Return the current radio tuner state.
Access functions:
State | state () const |
Notifier signal:
void | stateChanged ( QRadioTuner::State state ) |
See also QRadioTuner::State.
This property holds whether a radio tuner is receiving a stereo signal.
Access functions:
bool | isStereo () const |
Notifier signal:
void | stereoStatusChanged ( bool stereo ) |
This property holds the stereo mode of a radio tuner.
Access functions:
StereoMode | stereoMode () const |
void | setStereoMode ( QRadioTuner::StereoMode mode ) |
This property holds the volume of a radio tuner's audio output as a percentage.
Access functions:
int | volume () const |
void | setVolume ( int volume ) |
Notifier signal:
void | volumeChanged ( int volume ) |
Constructs a radio tuner based on a media service allocated by a media service provider.
The parent is passed to QMediaObject.
Destroys a radio tuner.
Signals a radio tuner's band has changed.
Stops scanning for a signal.
See also searchForward(), searchBackward(), and searching.
Returns the error state of a radio tuner.
See also errorString().
Signals that an error occurred.
Returns a description of a radio tuner's error state.
See also error().
Signals that the frequency a radio tuner is tuned to has changed.
Returns a frequency band's minimum and maximum frequency.
Returns the number of Hertz to increment the frequency by when stepping through frequencies within a given band.
Identifies if a frequency band is supported by a radio tuner.
Returns true if the band is supported, and false if it is not.
Signals that the muted state of a radio tuner's audio output has changed.
Starts a backwards scan for a signal, starting from the current frequency.
See also searchForward(), cancelSearch(), and searching.
Starts a forward scan for a signal, starting from the current frequency.
See also searchBackward(), cancelSearch(), and searching.
Signals that the searching state of a radio tuner has changed.
Signals that the strength of the signal received by a radio tuner has changed.
Activate the radio device.
This signal is emitted when the state changes to state.
Signals that the stereo state of a radio tuner has changed.
Deactivate the radio device.
Signals that the volume of a radio tuner's audio output has changed.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt qtmobility-1.0-tp | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com