The QRadioTunerControl class provides access to the radio tuning functionality of a QMediaService . 更多...
头: | #include <QRadioTunerControl> |
qmake: | QT += multimedia |
继承: | QMediaControl |
该类已过时。 提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
virtual | ~QRadioTunerControl () |
virtual QRadioTuner::Band | band () const = 0 |
virtual void | cancelSearch () = 0 |
virtual QRadioTuner::Error | error () const = 0 |
virtual QString | errorString () const = 0 |
virtual int | frequency () const = 0 |
virtual QPair<int, int> | frequencyRange (QRadioTuner::Band band ) const = 0 |
virtual int | frequencyStep (QRadioTuner::Band band ) const = 0 |
virtual bool | isAntennaConnected () const |
virtual bool | isBandSupported (QRadioTuner::Band band ) const = 0 |
virtual bool | isMuted () const = 0 |
virtual bool | isSearching () const = 0 |
virtual bool | isStereo () const = 0 |
virtual void | searchAllStations (QRadioTuner::SearchMode searchMode = QRadioTuner::SearchFast) = 0 |
virtual void | searchBackward () = 0 |
virtual void | searchForward () = 0 |
virtual void | setBand (QRadioTuner::Band band ) = 0 |
virtual void | setFrequency (int frequency ) = 0 |
virtual void | setMuted (bool muted ) = 0 |
virtual void | setStereoMode (QRadioTuner::StereoMode mode ) = 0 |
virtual void | setVolume (int volume ) = 0 |
virtual int | signalStrength () const = 0 |
virtual void | start () = 0 |
virtual QRadioTuner::State | state () const = 0 |
virtual QRadioTuner::StereoMode | stereoMode () const = 0 |
virtual void | stop () = 0 |
virtual int | volume () const = 0 |
void | antennaConnectedChanged (bool connectionStatus ) |
void | bandChanged (QRadioTuner::Band band ) |
void | error (QRadioTuner::Error error ) |
void | frequencyChanged (int frequency ) |
void | mutedChanged (bool muted ) |
void | searchingChanged (bool searching ) |
void | signalStrengthChanged (int strength ) |
void | stateChanged (QRadioTuner::State state ) |
void | stationFound (int frequency , QString stationId ) |
void | stereoStatusChanged (bool stereo ) |
void | volumeChanged (int volume ) |
QRadioTunerControl (QObject * parent = nullptr) |
QRadioTunerControl_iid |
若 QMediaService can tune an analog radio device it will implement QRadioTunerControl. This control provides a means to tune a radio device to a specific frequency as well as search forwards and backwards for a signal.
The functionality provided by this control is exposed to application code through the QRadioTuner 类。
The interface name of QRadioTunerControl is
org.qt-project.qt.radiotunercontrol/5.0
作为定义在
QRadioTunerControl_iid
.
另请参阅 QMediaService::requestControl () 和 QRadioTuner .
[protected]
QRadioTunerControl::
QRadioTunerControl
(
QObject
*
parent
= nullptr)
Constructs a radio tuner control with the given parent .
[signal]
void
QRadioTunerControl::
antennaConnectedChanged
(
bool
connectionStatus
)
Signals that the antenna has either been connected or disconnected as reflected with the connectionStatus .
[signal]
void
QRadioTunerControl::
bandChanged
(
QRadioTuner::Band
band
)
Signals that the frequency band a radio tuner is tuned to has changed.
[signal]
void
QRadioTunerControl::
error
(
QRadioTuner::Error
error
)
Signals that an error has occurred.
注意: 信号 error 在此类中被重载。通过使用函数指针句法连接到此信号,Qt 提供用于获得如此范例展示的函数指针的方便帮助程序:
connect(radioTunerControl, QOverload<QRadioTuner::Error>::of(&QRadioTunerControl::error), [=](QRadioTuner::Error error){ /* ... */ });
[signal]
void
QRadioTunerControl::
frequencyChanged
(
int
frequency
)
信号 frequency a radio tuner is tuned to has changed.
[signal]
void
QRadioTunerControl::
mutedChanged
(
bool
muted
)
信号 muted state of a radio tuner's audio output has changed.
[signal]
void
QRadioTunerControl::
searchingChanged
(
bool
searching
)
信号 searching state of a radio tuner has changed.
[signal]
void
QRadioTunerControl::
signalStrengthChanged
(
int
strength
)
Signals that the percentage strength of the signal received by a radio tuner has changed.
[signal]
void
QRadioTunerControl::
stateChanged
(
QRadioTuner::State
state
)
信号 state of a radio tuner has changed.
[signal]
void
QRadioTunerControl::
stationFound
(
int
frequency
,
QString
stationId
)
Signals that new station with frequency and stationId was found when scanning
[signal]
void
QRadioTunerControl::
stereoStatusChanged
(
bool
stereo
)
信号 stereo state of a radio tuner has changed.
[signal]
void
QRadioTunerControl::
volumeChanged
(
int
volume
)
Signals that the percentage volume of radio tuner's audio output has changed.
[虚拟]
QRadioTunerControl::
~QRadioTunerControl
()
Destroys a radio tuner control.
[pure virtual]
QRadioTuner::Band
QRadioTunerControl::
band
() const
Returns the frequency band a radio tuner is tuned to.
另请参阅 setBand ().
[pure virtual]
void
QRadioTunerControl::
cancelSearch
()
Stops scanning for a signal.
[pure virtual]
QRadioTuner::Error
QRadioTunerControl::
error
() const
Returns the error state of a radio tuner.
[pure virtual]
QString
QRadioTunerControl::
errorString
() const
Returns a string describing a radio tuner's error state.
[pure virtual]
int
QRadioTunerControl::
frequency
() const
Returns the frequency a radio tuner is tuned to.
另请参阅 setFrequency ().
[pure virtual]
QPair
<
int
,
int
> QRadioTunerControl::
frequencyRange
(
QRadioTuner::Band
band
) const
Returns a frequency band 's minimum and maximum frequency.
[pure virtual]
int
QRadioTunerControl::
frequencyStep
(
QRadioTuner::Band
band
) const
Returns the number of Hertz to increment the frequency by when stepping through frequencies within a given band .
[虚拟]
bool
QRadioTunerControl::
isAntennaConnected
() const
Identifies if there is an antenna connected to the device.
Returns true if there is a connected antenna, and false otherwise.
[pure virtual]
bool
QRadioTunerControl::
isBandSupported
(
QRadioTuner::Band
band
) const
Identifies if a frequency band is supported.
Returns true if the band is supported, and false if it is not.
[pure virtual]
bool
QRadioTunerControl::
isMuted
() const
Identifies if a radio tuner's audio output is muted.
Returns true if the audio is muted, and false if it is not.
[pure virtual]
bool
QRadioTunerControl::
isSearching
() const
Identifies if a radio tuner is currently scanning for signal.
Returns true if the tuner is scanning, and false if it is not.
[pure virtual]
bool
QRadioTunerControl::
isStereo
() const
Identifies if a radio tuner is receiving a stereo signal.
Returns true if the tuner is receiving a stereo signal, and false if it is not.
[pure virtual]
void
QRadioTunerControl::
searchAllStations
(
QRadioTuner::SearchMode
searchMode
= QRadioTuner::SearchFast)
Starts a scan through the whole frequency band searching all stations with a specific searchMode .
[pure virtual]
void
QRadioTunerControl::
searchBackward
()
Starts a backwards scan for a signal, starting from the current frequency ().
[pure virtual]
void
QRadioTunerControl::
searchForward
()
Starts a forward scan for a signal, starting from the current frequency ().
[pure virtual]
void
QRadioTunerControl::
setBand
(
QRadioTuner::Band
band
)
Sets the frequecy band a radio tuner is tuned to.
Changing the frequency band will reset the frequency to the minimum frequency of the new band.
另请参阅 band ().
[pure virtual]
void
QRadioTunerControl::
setFrequency
(
int
frequency
)
设置 frequency a radio tuner is tuned to.
另请参阅 frequency ().
[pure virtual]
void
QRadioTunerControl::
setMuted
(
bool
muted
)
设置 muted state of a radio tuner's audio output.
另请参阅 isMuted ().
[pure virtual]
void
QRadioTunerControl::
setStereoMode
(
QRadioTuner::StereoMode
mode
)
Sets a radio tuner's stereo mode .
另请参阅 stereoMode () 和 QRadioTuner::StereoMode .
[pure virtual]
void
QRadioTunerControl::
setVolume
(
int
volume
)
Sets the percentage volume of a radio tuner's audio output.
另请参阅 volume ().
[pure virtual]
int
QRadioTunerControl::
signalStrength
() const
Return a radio tuner's current signal strength as a percentage.
[pure virtual]
void
QRadioTunerControl::
start
()
Activate the radio device.
[pure virtual]
QRadioTuner::State
QRadioTunerControl::
state
() const
Returns the current radio tuner state.
[pure virtual]
QRadioTuner::StereoMode
QRadioTunerControl::
stereoMode
() const
Returns a radio tuner's stereo mode.
另请参阅 setStereoMode () 和 QRadioTuner::StereoMode .
[pure virtual]
void
QRadioTunerControl::
stop
()
Deactivate the radio device.
[pure virtual]
int
QRadioTunerControl::
volume
() const
Returns the volume of a radio tuner's audio output as a percentage.
另请参阅 setVolume ().
org.qt-project.qt.radiotunercontrol/5.0
定义接口名为 QRadioTunerControl 类。