summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/voicefile.h
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/voicefile.h')
-rw-r--r--rbutil/rbutilqt/voicefile.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/voicefile.h b/rbutil/rbutilqt/voicefile.h
new file mode 100644
index 0000000000..b82f0373c7
--- /dev/null
+++ b/rbutil/rbutilqt/voicefile.h
@@ -0,0 +1,84 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2007 by Dominik Wenger
10 * $Id: voicefile.h 15932 2007-12-15 13:13:57Z domonoky $
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20
21#ifndef VOICEFILE_H
22#define VOICEFILE_H
23
24#include <QtGui>
25#include "progressloggerinterface.h"
26
27#include "encoders.h"
28#include "tts.h"
29#include "httpget.h"
30
31extern "C"
32{
33 #include "wavtrim.h"
34 #include "voicefont.h"
35}
36
37class VoiceFileCreator :public QObject
38{
39 Q_OBJECT
40public:
41 VoiceFileCreator(QObject* parent=0);
42
43 //start creation
44 bool createVoiceFile(ProgressloggerInterface* logger);
45
46 // set infos
47 void setUserSettings(QSettings* setting) { userSettings = setting;}
48 void setDeviceSettings(QSettings* setting) { deviceSettings = setting;}
49
50 void setMountPoint(QString mountpoint) {m_mountpoint =mountpoint; }
51 void setTargetId(int id){m_targetid = id;}
52 void setLang(QString name){m_lang =name;}
53 void setProxy(QUrl proxy){m_proxy = proxy;}
54
55private slots:
56 void abort();
57 void downloadRequestFinished(int id, bool error);
58 void downloadDone(bool error);
59 void updateDataReadProgress(int read, int total);
60
61private:
62
63 // ptr to encoder, tts and settings
64 TTSBase* m_tts;
65 EncBase* m_enc;
66 QSettings *userSettings;
67 QSettings *deviceSettings;
68
69 HttpGet *getter;
70
71 QUrl m_proxy; //proxy
72 QString filename; //the temporary file
73
74 QString m_mountpoint; //mountpoint of the device
75 QString m_path; //path where the wav and mp3 files are stored to
76 int m_targetid; //the target id
77 QString m_lang; // the language which will be spoken
78
79 ProgressloggerInterface* m_logger;
80
81 bool m_abort;
82};
83
84#endif