Fix layout
[kdeaccessibility.git] / ksayit / KTTSD_Lib / kttsdlib.h
blobf15ba0b45d723d49d532ee9607dbe438fa968c87
1 //
2 // C++ Interface: kttsdplugin
3 //
4 // Description:
5 //
6 //
7 // Author: Robert Vogl <voglrobe@lapislazuli>, (C) 2004
8 //
9 // Copyright: See COPYING file that comes with this distribution
12 #ifndef KTTSDLIB_H
13 #define KTTSDLIB_H
15 // stl
16 #include <queue>
17 using namespace std;
19 // QT includes
20 #include <QtCore/QObject>
21 #include <QtGui/QWidget>
22 #include <Qt3Support/Q3Frame>
24 // KDE includes
25 #include <kdemacros.h>
26 #include "kdeexportfix.h"
28 // App specific includes
29 #include "ui_KTTSDlibSetup.h"
31 namespace TTS {
32 enum {AUDIOFILE=1};
35 namespace ACTIONS {
36 enum {PLAY=1, STOP=2, PAUSE=4, FFWD=8, FREV=16};
40 // forward declarations
41 class kttsdlibtalker2;
42 class K3Process;
44 /**
45 @author Robert Vogl
47 class KDE_EXPORT KTTSDLib : public QObject
49 Q_OBJECT
50 signals:
51 /** Emitted when the plugin has been finished speeking.
53 void signalFinished();
55 public slots:
56 /** Called from the talker on textFinished().
57 * \param job The number of the finished job.
59 void slotTextFinished(const uint job);
61 /** Called from the talker on textStopped().
62 * \param job The number of the stopped job.
64 void slotTextStopped(const uint job);
66 /** Called from the talker on textStarted().
67 * \param job The number of the stopped job.
69 void slotTextStarted(const uint job);
71 public:
72 KTTSDLib(QObject *parent=0, const char *name=0, KApplication *Appl=0);
74 ~KTTSDLib();
76 /** Reimplementations from the base class.
78 QString getName() const;
80 QString getDescription() const;
82 int getActions();
84 const QWidget* getGUI(QFrame *frame);
86 void reloadConfiguration();
88 bool saveWasClicked() const;
90 void setText(const QString &text);
92 void sayText();
94 int getStatus() const;
96 void stop();
98 void pause();
100 void resume();
102 void ffwd();
104 void frev();
106 private slots:
107 void removeAllJobsFromList();
108 void slotLaunchControlcenter();
109 void slotKCMProcessExited(K3Process *p);
111 private:
112 KApplication *m_Appl;
113 kttsdlibtalker2 *m_talker;
114 uint m_curJobNum;
115 typedef queue<uint> jobListType;
116 jobListType jobList;
117 Ui::KTTSDlibSetup *m_gui;
120 #endif