File indexing completed on 2024-05-19 04:35:47
0001 /* 0002 SPDX-FileCopyrightText: 2008 Pino Toscano <pino@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef _TTS_H_ 0008 #define _TTS_H_ 0009 0010 #include <QObject> 0011 #include <QTextToSpeech> 0012 0013 class OkularTTS : public QObject 0014 { 0015 Q_OBJECT 0016 public: 0017 explicit OkularTTS(QObject *parent = nullptr); 0018 ~OkularTTS() override; 0019 0020 void say(const QString &text); 0021 void stopAllSpeechs(); 0022 void pauseResumeSpeech(); 0023 0024 public Q_SLOTS: 0025 void slotSpeechStateChanged(QTextToSpeech::State state); 0026 void slotConfigChanged(); 0027 0028 Q_SIGNALS: 0029 void isSpeaking(bool speaking); 0030 void canPauseOrResume(bool speakingOrPaused); 0031 0032 private: 0033 // private storage 0034 class Private; 0035 Private *d; 0036 }; 0037 0038 #endif