From 00bb99ac80741fc50ef8a289719373032f2391eb Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaccessibility@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ksayit/KTTSD_Lib/kttsdlib.h | 119 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 ksayit/KTTSD_Lib/kttsdlib.h (limited to 'ksayit/KTTSD_Lib/kttsdlib.h') diff --git a/ksayit/KTTSD_Lib/kttsdlib.h b/ksayit/KTTSD_Lib/kttsdlib.h new file mode 100644 index 0000000..6d8de9b --- /dev/null +++ b/ksayit/KTTSD_Lib/kttsdlib.h @@ -0,0 +1,119 @@ +// +// C++ Interface: kttsdplugin +// +// Description: +// +// +// Author: Robert Vogl , (C) 2004 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef KTTSDLIB_H +#define KTTSDLIB_H + +// stl +#include +using namespace std; + +// QT includes +#include +#include +#include + +#include +#include "kdeexportfix.h" + +// KDE includes +#include + +// App specific includes + + +namespace TTS { + enum {AUDIOFILE=1}; +} + +namespace ACTIONS { + enum {PLAY=1, STOP=2, PAUSE=4, FFWD=8, FREV=16}; +} + + +// forward declarations +class kttsdlibtalker2; + +/** +@author Robert Vogl +*/ +class KDE_EXPORT KTTSDLib : public QObject +{ +Q_OBJECT +signals: + /** Emitted when the plugin has been finished speeking. + */ + void signalFinished(); + +public slots: + /** Called from the talker on textFinished(). + * \param job The number of the finished job. + */ + void slotTextFinished(const uint job); + + /** Called from the talker on textStopped(). + * \param job The number of the stopped job. + */ + void slotTextStopped(const uint job); + + /** Called from the talker on textStarted(). + * \param job The number of the stopped job. + */ + void slotTextStarted(const uint job); + +public: + KTTSDLib(QObject *parent=0, const char *name=0, KApplication *Appl=0); + + ~KTTSDLib(); + + /** Reimplementations from the base class. + */ + QString getName() const; + + QString getDescription() const; + + int getActions(); + + const QWidget* getGUI(QFrame *frame); + + void reloadConfiguration(); + + bool saveWasClicked() const; + + void setText(const QString &text); + + void sayText(); + + int getStatus() const; + + void stop(); + + void pause(); + + void resume(); + + void ffwd(); + + void frev(); + +private slots: + void removeAllJobsFromList(); + +private: + KApplication *m_Appl; + kttsdlibtalker2 *m_talker; + uint m_curJobNum; + typedef queue jobListType; + jobListType jobList; + +}; + +#endif -- cgit v1.2.3