Warning, file /libraries/ktextaddons/textedittexttospeech/texttospeechinterface.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002    SPDX-FileCopyrightText: 2014-2023 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "textedittexttospeech_export.h"
0010 #include <QObject>
0011 #include <TextEditTextToSpeech/TextToSpeechWidget>
0012 namespace TextEditTextToSpeech
0013 {
0014 class TextToSpeechInterfacePrivate;
0015 /**
0016  * @brief The TextToSpeechInterface class
0017  * @author Laurent Montel <montel@kde.org>
0018  */
0019 class TEXTEDITTEXTTOSPEECH_EXPORT TextToSpeechInterface : public QObject
0020 {
0021     Q_OBJECT
0022 public:
0023     explicit TextToSpeechInterface(TextToSpeechWidget *textToSpeechWidget, QObject *parent = nullptr);
0024     ~TextToSpeechInterface() override;
0025 
0026     Q_REQUIRED_RESULT bool isReady() const;
0027     void say(const QString &text);
0028     Q_REQUIRED_RESULT double volume() const;
0029     void setVolume(double value);
0030     void reloadSettings();
0031 
0032 private:
0033     TEXTEDITTEXTTOSPEECH_NO_EXPORT void stateChanged(TextEditTextToSpeech::TextToSpeechWidget::State state);
0034     std::unique_ptr<TextToSpeechInterfacePrivate> const d;
0035 };
0036 }