libdrmconf 0.15.0
A library to program DMR radios.
Loading...
Searching...
No Matches
AudioSettings Class Reference

Collects common audio and tone settings. More...

#include <audiosettings.hh>

Inheritance diagram for AudioSettings:
Collaboration diagram for AudioSettings:

Public Member Functions

 AudioSettings (QObject *parent=nullptr)
 Default constructor.
ConfigItemclone () const override
 Clones this item.
Level squelch () const
 Returns the default (FM) squelch.
void setSquelch (Level squelch)
 Sets the default squelch.
bool dmrSquelchEnabled () const
 Returns true if the DMR squelch is set.
Level dmrSquelch () const
 Returns the DMR squelch.
void setDMRSquelch (Level dmrSquelch)
 Set the DMR squelch.
void disableDMRSquelch ()
 Disables the DMR squelch setting.
Level micGain () const
 Returns the default mic gain.
void setMicGain (Level micGain)
 Sets the default mic gain.
bool fmMicGainEnabled () const
 Returns true if the FM mic gain is enabled.
Level fmMicGain () const
 Returns the FM mic gain.
void setFMMicGain (Level fmMicGain)
 Sets the FM mic gain.
void disableFMMicGain ()
 Disables FM mic gain.
bool m17MicGainEnabled () const
 Returns true if the M17 mic gain is enabled.
Level m17MicGain () const
 Returns the M17 mic gain.
void setM17MicGain (Level m17MicGain)
 Sets the M17 mic gain.
void disableM17MicGain ()
 Disables M17 mic gain.
bool voxEnabled () const
 Returns true, if the VOX is enabled.
Level vox () const
 Returns the VOX sensitivity.
void setVox (Level vox)
 Sets the VOX sensitivity.
void disableVox ()
 Disables VOX.
Interval voxDelay () const
 Returns the VOX delay.
void setVOXDelay (Interval ms)
 Sets the VOX delay.
Level maxSpeakerVolume () const
 Returns the maximum speaker volume.
void setMaxSpeakerVolume (Level maxSpeakerVolume)
 Sets the maximum speaker volume.
Level maxHeadphoneVolume () const
 Returns the maximum headphone volume.
void setMaxHeadphoneVolume (Level maxHeadphoneVolume)
 Sets the maximum headphone volume.
bool speechSynthesisEnabled () const
 Returns true if the speech synthesis is enabled.
void enableSpeechSynthesis (bool enabled)
 Enable speech synthesis.
Public Member Functions inherited from ConfigItem
virtual bool copy (const ConfigItem &other)
 Copies the given item into this one.
virtual int compare (const ConfigItem &other) const
 Compares the items.
virtual bool label (Context &context, const ErrorStack &err=ErrorStack())
 Recursively labels the config object.
virtual YAML::Node serialize (const Context &context, const ErrorStack &err=ErrorStack())
 Recursively serializes the configuration to YAML nodes.
virtual ConfigItemallocateChild (QMetaProperty &prop, const YAML::Node &node, const Context &ctx, const ErrorStack &err=ErrorStack())
 Allocates an instance for the given property on the given YAML node.
virtual bool parse (const YAML::Node &node, Context &ctx, const ErrorStack &err=ErrorStack())
 Parses the given YAML node, updates the given object and updates the given context (IDs).
virtual bool link (const YAML::Node &node, const Context &ctx, const ErrorStack &err=ErrorStack())
 Links the given object to the rest of the codeplug using the given context.
virtual void clear ()
 Clears the config object.
virtual const Configconfig () const
 Returns the config, the item belongs to or nullptr if not part of a config.
virtual void findItemsOfTypes (const QStringList &typeNames, QSet< ConfigItem * > &items) const
 Searches the config tree to find all instances of the given type names.
template<class Object>
bool is () const
 Returns true if this object is of class Object.
template<class Object>
const Object * as () const
 Casts this object to the given type.
template<class Object>
Object * as ()
 Casts this object to the given type.
bool hasDescription () const
 Returns true if there is a class info "description" for this instance.
bool hasLongDescription () const
 Returns true if there is a class info "longDescription" for this instance.
bool hasDescription (const QMetaProperty &prop) const
 Returns true if there is a class info "[PropertyName]Description" for the given property.
bool hasLongDescription (const QMetaProperty &prop) const
 Returns true if there is a class info "[PropertyName]LongDescription" for the given property.
QString description () const
 Returns the description of this instance if set by a class info.
QString longDescription () const
 Returns the long description of this instance if set by a class info.
QString description (const QMetaProperty &prop) const
 Returns the description of property if set by a class info.
QString longDescription (const QMetaProperty &prop) const
 Returns the long description of property if set by a class info.

Protected Attributes

Level _squelch
 Default (FM) squelch.
Level _dmrSquelch
 DMR squelch setting.
Level _micGain
 Default mic gain.
Level _fmMicGain
 The FM mic gain.
Level _m17MicGain
 The M17 mic gain.
Level _maxSpeakerVolume
 Maximum speaker volume.
Level _maxHeadphoneVolume
 Maximum headphone volume.
Level _vox
 Specifies the VOX level.
Interval _voxDelay
 Specifies the VOX delay.
bool _speech
 Enables speech synthesis.

Properties

Level squelch
Level dmrSquelch
Level micGain
Level fmMicGain
Level m17MicGain
Level maxSpeakerVolume
Level maxHeadphoneVolume
Level vox
Interval voxDelay
bool speech

Additional Inherited Members

Signals inherited from ConfigItem
void modified (ConfigItem *obj)
 Gets emitted once the config object is modified.
void beginClear ()
 Gets emitted before clearing the item.
void endClear ()
 Gets emitted after clearing the item.
Protected Member Functions inherited from ConfigItem
 ConfigItem (QObject *parent=nullptr)
 Hidden constructor.
virtual bool populate (YAML::Node &node, const Context &context, const ErrorStack &err=ErrorStack())
 Recursively serializes the configuration to YAML nodes.

Detailed Description

Collects common audio and tone settings.

Member Function Documentation

◆ clone()

ConfigItem * AudioSettings::clone ( ) const
overridevirtual

Clones this item.

Implements ConfigItem.

◆ disableDMRSquelch()

void AudioSettings::disableDMRSquelch ( )

Disables the DMR squelch setting.

The global FM squelch is then used.

◆ fmMicGain()

Level AudioSettings::fmMicGain ( ) const

Returns the FM mic gain.

If null, the dmr mic gain is used.

◆ m17MicGain()

Level AudioSettings::m17MicGain ( ) const

Returns the M17 mic gain.

If null, the dmr mic gain is used.

◆ setFMMicGain()

void AudioSettings::setFMMicGain ( Level fmMicGain)

Sets the FM mic gain.

If set to null, the global DMR mic gain is used.

◆ setM17MicGain()

void AudioSettings::setM17MicGain ( Level m17MicGain)

Sets the M17 mic gain.

If set to null, the global DMR mic gain is used.


The documentation for this class was generated from the following files:
  • /builddir/build/BUILD/qdmr-0.15.0-build/qdmr-0.15.0/lib/audiosettings.hh
  • /builddir/build/BUILD/qdmr-0.15.0-build/qdmr-0.15.0/lib/audiosettings.cc