The QTextToSpeechPlugin class is the base for all text-to-speech plug-ins. 更多...
头: | #include <QTextToSpeechPlugin> |
qmake: | QT += texttospeech |
virtual | ~QTextToSpeechPlugin () |
virtual QTextToSpeechEngine * | createTextToSpeechEngine (const QVariantMap & 参数 , QObject * parent , QString * errorString ) const |
The QTextToSpeechPlugin class is the base for all text-to-speech plug-ins.
A plug-in implementation should derive from QTextToSpeechPlugin and re-implement createTextToSpeechEngine ().
[虚拟]
QTextToSpeechPlugin::
~QTextToSpeechPlugin
()
Destroys the instance of QTextToSpeechPlugin. The destructor is virtual.
[虚拟]
QTextToSpeechEngine
*QTextToSpeechPlugin::
createTextToSpeechEngine
(const
QVariantMap
&
参数
,
QObject
*
parent
,
QString
*
errorString
) const
Factory method that is triggered by a call to QTextToSpeech::QTextToSpeech () when a provider name is given in the constructor and a text-to-speech plug-in matching the provider name was successfully loaded.
Value of 参数 is currently always empty.
If an error occurs, the method should return 0 and (optionally) give a description of the error in errorString . In this case, QTextToSpeech::state () 会返回 QTextToSpeech::BackendError .
若 parent is 0, the caller takes the ownership of the returned engine instance.