KTextAddons

texttospeechconfiginterface.h
1/*
2 SPDX-FileCopyrightText: 2014-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8#include "textedittexttospeech_export.h"
9#include <QObject>
10#include <QVoice>
11
12class QTextToSpeech;
13namespace TextEditTextToSpeech
14{
15/**
16 * @brief The TextToSpeechConfigInterface class
17 * @author Laurent Montel <montel@kde.org>
18 */
19class TEXTEDITTEXTTOSPEECH_EXPORT TextToSpeechConfigInterface : public QObject
20{
21 Q_OBJECT
22public:
23 struct EngineSettings {
24 int rate = 0;
25 int pitch = 0;
26 int volume = 0;
27 QVoice voice;
28 QString localeName;
29 };
30 explicit TextToSpeechConfigInterface(QObject *parent = nullptr);
32
33 [[nodiscard]] QVector<QLocale> availableLocales() const;
34 [[nodiscard]] QLocale locale() const;
35
36 [[nodiscard]] QStringList availableEngines() const;
37 [[nodiscard]] QVector<QVoice> availableVoices() const;
38 void setEngine(const QString &engineName);
39 void testEngine(const EngineSettings &engineSettings);
40 QTextToSpeech *mTextToSpeech = nullptr;
41};
42}
43TEXTEDITTEXTTOSPEECH_EXPORT QDebug operator<<(QDebug d, const TextEditTextToSpeech::TextToSpeechConfigInterface::EngineSettings &t);
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:29:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.