summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-07-10 16:14:18 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-07-13 11:30:11 +0200
commit86b86e5c48481f81fa43d3da49fd5177bc9925ef (patch)
tree7e0a20e1166085314f24be0777779aae7d38dd2a
parent36660168791b5e86561661b1987d741757cf7be3 (diff)
Fix and edit the example documentation
If the exampledirs variable in qdocconf doesn't include the /speech subdirectory, but each example page does, then the link generated to code.qt.io is incorrect. Since the qdocconf is for the texttospeech module, all examples will live in the same tree anyway. Link to Qt Widgets and Qt Quick Controls from the respective examples, which requires that those modules are added as dependencies. Improve the phrasing of the text, and update and optimize the screenshots of the examples. Pick-to: 6.4 Change-Id: I3de4e707c2aeed40735a714934adea59afdea1e8 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r--examples/speech/hello_speak/doc/images/hellospeak-example.pngbin34979 -> 71273 bytes
-rw-r--r--examples/speech/hello_speak/doc/src/hellospeakex.qdoc16
-rw-r--r--examples/speech/quickspeech/doc/images/quickspeech-example.pngbin34979 -> 62879 bytes
-rw-r--r--examples/speech/quickspeech/doc/src/quickspeech.qdoc16
-rw-r--r--examples/speech/quickspeech/main.qml1
-rw-r--r--src/tts/doc/qttexttospeech.qdocconf4
6 files changed, 21 insertions, 16 deletions
diff --git a/examples/speech/hello_speak/doc/images/hellospeak-example.png b/examples/speech/hello_speak/doc/images/hellospeak-example.png
index 03a2f60..0625595 100644
--- a/examples/speech/hello_speak/doc/images/hellospeak-example.png
+++ b/examples/speech/hello_speak/doc/images/hellospeak-example.png
Binary files differ
diff --git a/examples/speech/hello_speak/doc/src/hellospeakex.qdoc b/examples/speech/hello_speak/doc/src/hellospeakex.qdoc
index 15a0b23..81d05e8 100644
--- a/examples/speech/hello_speak/doc/src/hellospeakex.qdoc
+++ b/examples/speech/hello_speak/doc/src/hellospeakex.qdoc
@@ -1,17 +1,19 @@
-// Copyright (C) 2017 The Qt Company Ltd.
+// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
- \example speech/hello_speak
+ \example hello_speak
\title Hello Speak Example
\ingroup texttospeech_examples
- \brief The Hello Speak example reads out a small piece of text.
+ \brief The Hello Speak example reads out user-provided text.
- \e{Hello Speak} example demonstrates how QTextToSpeech can be used to read
- out text, as well as control the pitch, volume, and rate of the speech.
- It also lets you select a language and voice, if additional languages
- and voices are found.
+ The \e{Hello Speak} example demonstrates how QTextToSpeech can be used in
+ a Qt C++ application to read out text, and to control the speech.
+
+ The example uses a \l{Qt Widgets}{widget UI} to provide controls for the pitch,
+ volume, and rate of the speech. It also lets the user select an engine,
+ the language, and a voice.
\image hellospeak-example.png
*/
diff --git a/examples/speech/quickspeech/doc/images/quickspeech-example.png b/examples/speech/quickspeech/doc/images/quickspeech-example.png
index 03a2f60..68d8352 100644
--- a/examples/speech/quickspeech/doc/images/quickspeech-example.png
+++ b/examples/speech/quickspeech/doc/images/quickspeech-example.png
Binary files differ
diff --git a/examples/speech/quickspeech/doc/src/quickspeech.qdoc b/examples/speech/quickspeech/doc/src/quickspeech.qdoc
index b22d909..dda3539 100644
--- a/examples/speech/quickspeech/doc/src/quickspeech.qdoc
+++ b/examples/speech/quickspeech/doc/src/quickspeech.qdoc
@@ -2,17 +2,19 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
- \example speech/quickspeech
+ \example quickspeech
\title Quick Speech Example
\ingroup texttospeech_examples
- \brief Using text-to-speech in a Qt Quick application.
+ \brief The Quick Speech example reads out user-provided text.
- \e{Quick Speech} example demonstrates how the TextToSpeech type can be used
- from QML to read out text, as well as control the pitch, volume, and rate
- of the speech. It also lets you select a language and voice, if additional
- languages and voices are found.
+ The \e{Quick Speech} example demonstrates how the TextToSpeech type can be used
+ in a \l{Qt Quick} application to read out text, and to control the speech.
- \image hellospeak-example.png
+ The example uses \l{Qt Quick Controls} to provide controls for the pitch, volume, and
+ rate of the speech. It also lets the user select an engine, the language, and a
+ voice.
+
+ \image quickspeech-example.png
\include examples-run.qdocinc
*/
diff --git a/examples/speech/quickspeech/main.qml b/examples/speech/quickspeech/main.qml
index 209d476..9099636 100644
--- a/examples/speech/quickspeech/main.qml
+++ b/examples/speech/quickspeech/main.qml
@@ -39,6 +39,7 @@ ApplicationWindow {
ColumnLayout {
anchors.fill: parent
+ anchors.margins: 8
id: inputForm
TextArea {
diff --git a/src/tts/doc/qttexttospeech.qdocconf b/src/tts/doc/qttexttospeech.qdocconf
index 5242575..d8d4026 100644
--- a/src/tts/doc/qttexttospeech.qdocconf
+++ b/src/tts/doc/qttexttospeech.qdocconf
@@ -10,12 +10,12 @@ headerdirs += ../..
imagedirs += src/images
-exampledirs += ../../../examples
+exampledirs += ../../../examples/speech
moduleheader = QtTextToSpeechDoc
includepaths += .
-depends += qtcore qtdoc qtgui qtquick qtmultimedia qtcmake
+depends += qtcore qtdoc qtgui qtwidgets qtquick qtquickcontrols qtmultimedia qtcmake
# Ignore \since commands for versions earlier than 6.4
ignoresince = 6.4