diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-05-25 02:49:19 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-05-25 12:59:35 +0200 |
commit | c264cc55854cc4bab92b32518d4614a5974e6a35 (patch) | |
tree | d4759fbe3c4a08ba632ffc411edaf30147fb0e31 /examples/speech/quickspeech/main.qml | |
parent | b76115a843707e9cce0dd8d14d72f943b345cf54 (diff) |
Add PauseResume capability flag
Android lacks this capability as the native TextToSpeech class has no
API for this. Since we now have the capabilities enum, add PauseResume
and don't list that for Android, so that applications can disable the
respective UI.
Do that for our examples - hide the pause & resume buttons if the
capability flag is not set.
Document the unsupported capabilities for all engines that lacks some
features
Fixes: QTBUG-113805
Change-Id: Ia8139e235f4cd968519423515e31c81285a2d349
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'examples/speech/quickspeech/main.qml')
-rw-r--r-- | examples/speech/quickspeech/main.qml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/speech/quickspeech/main.qml b/examples/speech/quickspeech/main.qml index 169a33c..3d7b019 100644 --- a/examples/speech/quickspeech/main.qml +++ b/examples/speech/quickspeech/main.qml @@ -79,6 +79,7 @@ ApplicationWindow { text: qsTr("Pause") enabled: tts.state == TextToSpeech.Speaking onClicked: tts.pause() + visible: tts.engineCapabilities & TextToSpeech.Capabilities.PauseResume } //! [pause] //! [resume] @@ -86,6 +87,7 @@ ApplicationWindow { text: qsTr("Resume") enabled: tts.state == TextToSpeech.Paused onClicked: tts.resume() + visible: tts.engineCapabilities & TextToSpeech.Capabilities.PauseResume } //! [resume] Button { |