CopperSpice API  1.7.2
QRadioTunerControl Class Referenceabstract

Provides access to the radio tuning functionality of a QMediaService. More...

Inheritance diagram for QRadioTunerControl:
QMediaControl QObject

Public Signals

void antennaConnectedChanged (bool connectionStatus)
 
void bandChanged (QRadioTuner::Band band)
 
void error (QRadioTuner::Error err)
 
void frequencyChanged (int frequency)
 
void mutedChanged (bool muted)
 
void searchingChanged (bool searching)
 
void signalStrengthChanged (int signalStrength)
 
void stateChanged (QRadioTuner::State state)
 
void stationFound (int frequency, QString stationId)
 
void stereoStatusChanged (bool stereo)
 
void volumeChanged (int volume)
 
- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 

Public Methods

 ~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 b) const = 0
 
virtual int frequencyStep (QRadioTuner::Band b) const = 0
 
virtual bool isAntennaConnected () const
 
virtual bool isBandSupported (QRadioTuner::Band b) 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 b) = 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
 
- Public Methods inherited from QMediaControl
 ~QMediaControl ()
 
- Public Methods inherited from QObject
 QObject (QObject *parent=nullptr)
 
 ~QObject ()
 
bool blockSignals (bool block)
 
const QList< QObject * > & children () const
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool disconnect (const QObject *receiver, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod, const QString &location, const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod=QString (), const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QStringdynamicPropertyNames () const
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
template<typename T >
findChild (const QString &childName=QString ()) const
 
template<class T >
QList< T > findChildren (const QRegularExpression &regExp, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<class T >
QList< T > findChildren (const QString &objName=QString (), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
bool inherits (const QString &className) const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const
 
bool isWindowType () const
 
void killTimer (int id)
 
const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const
 
QObject * parent () const
 
template<class T = QVariant>
property (const QString &name) const
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const QString &name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
QThreadthread () const
 

Protected Methods

 QRadioTunerControl (QObject *parent=nullptr)
 
- Protected Methods inherited from QMediaControl
 QMediaControl (QObject *parent=nullptr)
 
- Protected Methods inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signalMethod) const
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signalMethod) const
 
bool isSignalConnected (const QMetaMethod &signalMethod) const
 
int receivers (const QString &signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Related Functions

These are not member functions

#define QRadioTunerControl_iid   "com.copperspice.CS.radioTunerControl/1.0"
 

Additional Inherited Members

- Public Slots inherited from QObject
void deleteLater ()
 
- Static Public Methods inherited from QObject
static bool connect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection, const QString &location=QString ())
 
static bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...), Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotLambda, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...))
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, std::nullptr_t slotMethod=nullptr)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotMethod)
 
static QMetaObjectstaticMetaObject ()
 
static QString tr (const char *text, const char *comment=nullptr, std::optional< int > numArg=std::optional< int >())
 
- Properties inherited from QObject
 objectName
 

Detailed Description

The QRadioTunerControl class provides access to the radio tuning functionality of a QMediaService. If a 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 class.

The interface name of QRadioTunerControl is "com.copperspice.CS.radioTunerControl/1.0" as defined in QRadioTunerControl_iid.

See also
QMediaService::requestControl(), QRadioTuner

Constructor & Destructor Documentation

QRadioTunerControl::~QRadioTunerControl ( )

Destroys a radio tuner control.

QRadioTunerControl::QRadioTunerControl ( QObject parent = nullptr)
explicitprotected

Constructs a radio tuner control with the given parent.

Method Documentation

void QRadioTunerControl::antennaConnectedChanged ( bool  connectionStatus)
signal

Signals that the antenna has either been connected or disconnected as reflected with the connectionStatus.

QRadioTuner::Band QRadioTunerControl::band ( ) const
pure virtual

Returns the frequency band a radio tuner is tuned to.

See also
setBand()
void QRadioTunerControl::bandChanged ( QRadioTuner::Band  band)
signal

Signals that the frequency band a radio tuner is tuned to has changed.

void QRadioTunerControl::cancelSearch ( )
pure virtual

Stops scanning for a signal.

QRadioTuner::Error QRadioTunerControl::error ( ) const
pure virtual

Returns the error state of a radio tuner.

void QRadioTunerControl::error ( QRadioTuner::Error  error)
signal

Signals that an error has occurred. The error signal is overloaded in this class. To connect to this overload use the function pointer syntax.

connect(radioTunerControl,
this,
[](QRadioTuner::Error error){ handle_error_here(); });
QString QRadioTunerControl::errorString ( ) const
pure virtual

Returns a string describing a radio tuner's error state.

int QRadioTunerControl::frequency ( ) const
pure virtual

Returns the frequency a radio tuner is tuned to.

See also
setFrequency()
void QRadioTunerControl::frequencyChanged ( int  frequency)
signal

Signals the frequency a radio tuner is tuned to has changed.

QPair< int, int > QRadioTunerControl::frequencyRange ( QRadioTuner::Band  band) const
pure virtual

Returns the minimum and maximum frequency for the given band.

int QRadioTunerControl::frequencyStep ( QRadioTuner::Band  band) const
pure virtual

Returns the number of Hertz to increment the frequency by when stepping through frequencies within a given band.

bool QRadioTunerControl::isAntennaConnected ( ) const
inlinevirtual

Identifies if there is an antenna connected to the device. Returns true if there is a connected antenna, and false otherwise.

bool QRadioTunerControl::isBandSupported ( QRadioTuner::Band  band) const
pure virtual

Identifies if a frequency band is supported. Returns true if the band is supported, and false if it is not.

bool QRadioTunerControl::isMuted ( ) const
pure virtual

Identifies if a radio tuner's audio output is muted. Returns true if the audio is muted, and false if it is not.

bool QRadioTunerControl::isSearching ( ) const
pure virtual

Identifies if a radio tuner is currently scanning for signal. Returns true if the tuner is scanning, and false if it is not.

bool QRadioTunerControl::isStereo ( ) const
pure virtual

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.

void QRadioTunerControl::mutedChanged ( bool  muted)
signal

Signals the muted state of a radio tuner's audio output has changed.

void QRadioTunerControl::searchAllStations ( QRadioTuner::SearchMode  searchMode = QRadioTuner::SearchFast)
pure virtual

Starts a scan through the whole frequency band searching all stations with a specific searchMode.

void QRadioTunerControl::searchBackward ( )
pure virtual

Starts a backwards scan for a signal, starting from the current frequency.

void QRadioTunerControl::searchForward ( )
pure virtual

Starts a forward scan for a signal, starting from the current frequency.

void QRadioTunerControl::searchingChanged ( bool  searching)
signal

Signals that the searching state of a radio tuner has changed.

void QRadioTunerControl::setBand ( QRadioTuner::Band  band)
pure virtual

Sets the frequency band a radio tuner is tuned to. Changing the frequency band will reset the frequency to the minimum frequency of the new band.

See also
band()
void QRadioTunerControl::setFrequency ( int  frequency)
pure virtual

Sets the frequency a radio tuner is tuned to.

See also
frequency()
void QRadioTunerControl::setMuted ( bool  muted)
pure virtual

Sets the muted state of a radio tuner's audio output.

See also
isMuted()
void QRadioTunerControl::setStereoMode ( QRadioTuner::StereoMode  mode)
pure virtual

Sets a radio tuner's stereo mode.

See also
stereoMode(), QRadioTuner::StereoMode
void QRadioTunerControl::setVolume ( int  volume)
pure virtual

Sets the percentage volume of a radio tuner's audio output.

See also
volume()
int QRadioTunerControl::signalStrength ( ) const
pure virtual

Return a radio tuner's current signal strength as a percentage.

void QRadioTunerControl::signalStrengthChanged ( int  strength)
signal

Signals the percentage strength of the signal received by a radio tuner has changed.

void QRadioTunerControl::start ( )
pure virtual

Activate the radio device.

QRadioTuner::State QRadioTunerControl::state ( ) const
pure virtual

Returns the current radio tuner state.

void QRadioTunerControl::stateChanged ( QRadioTuner::State  state)
signal

Signals the state of a radio tuner has changed to the value of state.

void QRadioTunerControl::stationFound ( int  frequency,
QString  stationId 
)
signal

Signals that a new station with frequency and stationId was found when scanning.

QRadioTuner::StereoMode QRadioTunerControl::stereoMode ( ) const
pure virtual

Returns a radio tuner's stereo mode.

See also
setStereoMode(), QRadioTuner::StereoMode
void QRadioTunerControl::stereoStatusChanged ( bool  stereo)
signal

Signals that the stereo state of a radio tuner has changed.

void QRadioTunerControl::stop ( )
pure virtual

Deactivate the radio device.

int QRadioTunerControl::volume ( ) const
pure virtual

Returns the volume of a radio tuner's audio output as a percentage.

See also
setVolume()
void QRadioTunerControl::volumeChanged ( int  volume)
signal

Signals the percentage volume of radio tuner's audio output has changed.

Friends And Related Function Documentation

#define QRadioTunerControl_iid   "com.copperspice.CS.radioTunerControl/1.0"
related

Defines the interface name of the QRadioTunerControl class to "com.copperspice.CS.radioTunerControl/1.0".