2008-01-11 23:59:12 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007 by Dominik Wenger
|
2008-06-30 22:09:45 +00:00
|
|
|
* $Id$
|
2008-01-11 23:59:12 +00:00
|
|
|
*
|
2008-06-28 18:10:04 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2008-01-11 23:59:12 +00:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef VOICEFILE_H
|
|
|
|
#define VOICEFILE_H
|
|
|
|
|
2008-02-10 18:25:49 +00:00
|
|
|
#include <QtCore>
|
2008-01-11 23:59:12 +00:00
|
|
|
#include "progressloggerinterface.h"
|
|
|
|
|
|
|
|
#include "httpget.h"
|
2008-05-22 17:51:35 +00:00
|
|
|
#include "voicefont.h"
|
2009-06-26 20:40:51 +00:00
|
|
|
#include "talkgenerator.h"
|
2008-05-22 17:51:35 +00:00
|
|
|
|
2008-01-11 23:59:12 +00:00
|
|
|
class VoiceFileCreator :public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2009-04-29 21:27:01 +00:00
|
|
|
VoiceFileCreator(QObject* parent);
|
2008-05-22 17:51:35 +00:00
|
|
|
|
2008-01-11 23:59:12 +00:00
|
|
|
//start creation
|
2009-06-26 20:40:51 +00:00
|
|
|
bool createVoiceFile();
|
2008-01-11 23:59:12 +00:00
|
|
|
|
|
|
|
void setMountPoint(QString mountpoint) {m_mountpoint =mountpoint; }
|
|
|
|
void setLang(QString name){m_lang =name;}
|
2008-01-19 18:33:33 +00:00
|
|
|
void setWavtrimThreshold(int th){m_wavtrimThreshold = th;}
|
2009-06-26 20:40:51 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void abort();
|
|
|
|
|
2008-02-09 18:58:14 +00:00
|
|
|
signals:
|
2009-06-26 20:40:51 +00:00
|
|
|
void done(bool);
|
|
|
|
void aborted();
|
|
|
|
void logItem(QString, int); //! set logger item
|
|
|
|
void logProgress(int, int); //! set progress bar.
|
2009-04-05 12:46:41 +00:00
|
|
|
|
2008-01-11 23:59:12 +00:00
|
|
|
private slots:
|
|
|
|
void downloadDone(bool error);
|
2009-04-05 12:46:41 +00:00
|
|
|
|
2008-01-11 23:59:12 +00:00
|
|
|
private:
|
2009-06-26 20:40:51 +00:00
|
|
|
void cleanup();
|
|
|
|
|
2008-01-11 23:59:12 +00:00
|
|
|
HttpGet *getter;
|
|
|
|
QString filename; //the temporary file
|
|
|
|
QString m_mountpoint; //mountpoint of the device
|
|
|
|
QString m_path; //path where the wav and mp3 files are stored to
|
|
|
|
int m_targetid; //the target id
|
|
|
|
QString m_lang; // the language which will be spoken
|
2008-01-19 18:33:33 +00:00
|
|
|
int m_wavtrimThreshold;
|
2009-04-05 12:46:41 +00:00
|
|
|
|
2008-01-11 23:59:12 +00:00
|
|
|
bool m_abort;
|
2009-06-26 20:40:51 +00:00
|
|
|
QList<TalkGenerator::TalkEntry> m_talkList;
|
2008-01-11 23:59:12 +00:00
|
|
|
};
|
2009-04-05 12:46:41 +00:00
|
|
|
|
2008-01-11 23:59:12 +00:00
|
|
|
#endif
|
2009-04-05 12:46:41 +00:00
|
|
|
|