2021-05-24 07:25:56 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2008 Pino Toscano <pino@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2008-03-05 02:13:09 +00:00
|
|
|
|
|
|
|
#ifndef _TTS_H_
|
|
|
|
#define _TTS_H_
|
|
|
|
|
2020-07-08 11:54:37 +00:00
|
|
|
#include <QObject>
|
2014-11-08 04:33:23 +00:00
|
|
|
#include <QTextToSpeech>
|
2008-03-05 02:13:09 +00:00
|
|
|
|
|
|
|
class OkularTTS : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2018-09-01 08:25:57 +00:00
|
|
|
explicit OkularTTS(QObject *parent = nullptr);
|
2019-12-18 11:51:13 +00:00
|
|
|
~OkularTTS() override;
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2008-03-05 02:13:09 +00:00
|
|
|
void say(const QString &text);
|
2008-03-05 12:02:14 +00:00
|
|
|
void stopAllSpeechs();
|
2019-09-19 19:50:58 +00:00
|
|
|
void pauseResumeSpeech();
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2022-03-18 21:38:36 +00:00
|
|
|
public Q_SLOTS:
|
2014-11-08 04:33:23 +00:00
|
|
|
void slotSpeechStateChanged(QTextToSpeech::State state);
|
2019-09-26 06:08:50 +00:00
|
|
|
void slotConfigChanged();
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2022-03-18 21:53:32 +00:00
|
|
|
Q_SIGNALS:
|
2014-11-08 04:33:23 +00:00
|
|
|
void isSpeaking(bool speaking);
|
2019-09-26 05:46:33 +00:00
|
|
|
void canPauseOrResume(bool speakingOrPaused);
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2008-03-05 02:13:09 +00:00
|
|
|
private:
|
|
|
|
// private storage
|
|
|
|
class Private;
|
|
|
|
Private *d;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|