KTextAddons

texttospeechinterface.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
9#include "textedittexttospeech_export.h"
10#include <QObject>
11#include <TextEditTextToSpeech/TextToSpeechWidget>
12namespace TextEditTextToSpeech
13{
14class TextToSpeechInterfacePrivate;
15/**
16 * @brief The TextToSpeechInterface class
17 * @author Laurent Montel <montel@kde.org>
18 */
19class TEXTEDITTEXTTOSPEECH_EXPORT TextToSpeechInterface : public QObject
20{
21 Q_OBJECT
22public:
23 explicit TextToSpeechInterface(TextToSpeechWidget *textToSpeechWidget, QObject *parent = nullptr);
24 ~TextToSpeechInterface() override;
25
26 [[nodiscard]] bool isReady() const;
27 void say(const QString &text);
28 [[nodiscard]] double volume() const;
29 void setVolume(double value);
30 void reloadSettings();
31
32private:
33 TEXTEDITTEXTTOSPEECH_NO_EXPORT void stateChanged(TextEditTextToSpeech::TextToSpeechWidget::State state);
34 std::unique_ptr<TextToSpeechInterfacePrivate> const d;
35};
36}
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.