blob: d0e902b6c539507494807218e7ed451d75a1fbee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
//
// C++ Interface: kttsdplugin
//
// Description:
//
//
// Author: Robert Vogl <voglrobe@lapislazuli>, (C) 2004
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef KTTSDLIB_H
#define KTTSDLIB_H
// stl
#include <queue>
using namespace std;
// QT includes
#include <tqobject.h>
#include <tqwidget.h>
#include <tqframe.h>
#include <kdemacros.h>
#include "kdeexportfix.h"
// KDE includes
#include <kapplication.h>
// 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 TQObject
{
Q_OBJECT
TQ_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(TQObject *parent=0, const char *name=0, KApplication *Appl=0);
~KTTSDLib();
/** Reimplementations from the base class.
*/
TQString getName() const;
TQString getDescription() const;
int getActions();
const TQWidget* getGUI(TQFrame *frame);
void reloadConfiguration();
bool saveWasClicked() const;
void setText(const TQString &text);
void sayText();
int gettqStatus() 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<uint> jobListType;
jobListType jobList;
};
#endif
|