|
QGroundControl
Ground Control Station for MAVLink Drones
|
The AudioOutput class provides functionality for audio output using text-to-speech. More...
#include <AudioOutput.h>
Inheritance diagram for AudioOutput:
Collaboration diagram for AudioOutput:Public Types | |
| enum class | TextMod { None = 0 , Translate = 1 << 0 } |
| Enumeration for text modification options. More... | |
Public Member Functions | |
| AudioOutput (QObject *parent=nullptr) | |
| ~AudioOutput () | |
| Destructor for the AudioOutput class. | |
| void | init (Fact *mutedFact) |
| Initialize the Singleton. | |
| bool | isMuted () const |
| void | setMuted (bool muted) |
| void | say (const QString &text, TextMods textMods=TextMod::None) |
Static Public Member Functions | |
| static AudioOutput * | instance () |
The AudioOutput class provides functionality for audio output using text-to-speech.
Definition at line 13 of file AudioOutput.h.
|
strong |
Enumeration for text modification options.
| Enumerator | |
|---|---|
| None | |
| Translate | |
Definition at line 21 of file AudioOutput.h.
|
explicit |
Constructs an AudioOutput object.
| parent | The parent QObject. |
Definition at line 37 of file AudioOutput.cc.
| AudioOutput::~AudioOutput | ( | ) |
Destructor for the AudioOutput class.
Definition at line 44 of file AudioOutput.cc.
| void AudioOutput::init | ( | Fact * | mutedFact | ) |
Initialize the Singleton.
Definition at line 54 of file AudioOutput.cc.
References errorString, setMuted(), and Fact::valueChanged().
|
static |
Gets the singleton instance of AudioOutput.
Definition at line 49 of file AudioOutput.cc.
|
inline |
Checks if the audio output is muted.
Definition at line 44 of file AudioOutput.h.
| void AudioOutput::say | ( | const QString & | text, |
| TextMods | textMods = TextMod::None |
||
| ) |
Reads the specified text with optional text modifications.
| text | The text to be read. |
| textMods | The text modifications to apply. |
Definition at line 123 of file AudioOutput.cc.
| void AudioOutput::setMuted | ( | bool | muted | ) |
Sets the mute state of the audio output.
| enable | True to mute, false to unmute. |
Definition at line 115 of file AudioOutput.cc.
Referenced by init().