summaryrefslogtreecommitdiffstats
path: root/kttsd/plugins/epos
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:20:30 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:20:30 +0000
commit28bf3cbba4139c8a0f81dc9d1a2f6c4ed724f22c (patch)
treea2f011f22aa31d0839c6e2118501b7a6d2f2ae96 /kttsd/plugins/epos
parent0285229d858c8f03cde7354c679a752598cf4515 (diff)
downloadtdeaccessibility-28bf3cbba4139c8a0f81dc9d1a2f6c4ed724f22c.tar.gz
tdeaccessibility-28bf3cbba4139c8a0f81dc9d1a2f6c4ed724f22c.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaccessibility@1157633 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kttsd/plugins/epos')
-rw-r--r--kttsd/plugins/epos/eposconf.cpp108
-rw-r--r--kttsd/plugins/epos/eposconf.h24
-rw-r--r--kttsd/plugins/epos/eposproc.cpp98
-rw-r--r--kttsd/plugins/epos/eposproc.h46
4 files changed, 138 insertions, 138 deletions
diff --git a/kttsd/plugins/epos/eposconf.cpp b/kttsd/plugins/epos/eposconf.cpp
index 063c9f9..8b5ccf0 100644
--- a/kttsd/plugins/epos/eposconf.cpp
+++ b/kttsd/plugins/epos/eposconf.cpp
@@ -25,11 +25,11 @@
#include <math.h>
// Qt includes.
-#include <qfile.h>
-#include <qapplication.h>
-#include <qtextcodec.h>
-#include <qlayout.h>
-#include <qslider.h>
+#include <tqfile.h>
+#include <tqapplication.h>
+#include <tqtextcodec.h>
+#include <tqlayout.h>
+#include <tqslider.h>
// KDE includes.
#include <kdialog.h>
@@ -48,14 +48,14 @@
#include "eposconf.moc"
/** Constructor */
-EposConf::EposConf( QWidget* parent, const char* name, const QStringList& /*args*/) :
+EposConf::EposConf( TQWidget* parent, const char* name, const TQStringList& /*args*/) :
PlugInConf(parent, name)
{
// kdDebug() << "EposConf::EposConf: Running" << endl;
m_eposProc = 0;
m_progressDlg = 0;
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "EposConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new EposConfWidget(this, "EposConfigWidget");
@@ -68,41 +68,41 @@ EposConf::EposConf( QWidget* parent, const char* name, const QStringList& /*args
defaults();
- connect(m_widget->eposServerPath, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->eposClientPath, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->timeBox, SIGNAL(valueChanged(int)),
- this, SLOT(timeBox_valueChanged(int)));
- connect(m_widget->frequencyBox, SIGNAL(valueChanged(int)),
- this, SLOT(frequencyBox_valueChanged(int)));
- connect(m_widget->timeSlider, SIGNAL(valueChanged(int)),
- this, SLOT(timeSlider_valueChanged(int)));
- connect(m_widget->frequencySlider, SIGNAL(valueChanged(int)),
- this, SLOT(frequencySlider_valueChanged(int)));
- connect(m_widget->timeBox, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->timeSlider, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->frequencyBox, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->frequencySlider, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->characterCodingBox, SIGNAL(activated(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->eposServerOptions, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->eposClientOptions, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->eposTest, SIGNAL(clicked()),
- this, SLOT(slotEposTest_clicked()));
+ connect(m_widget->eposServerPath, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->eposClientPath, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->timeBox, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(timeBox_valueChanged(int)));
+ connect(m_widget->frequencyBox, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(frequencyBox_valueChanged(int)));
+ connect(m_widget->timeSlider, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(timeSlider_valueChanged(int)));
+ connect(m_widget->frequencySlider, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(frequencySlider_valueChanged(int)));
+ connect(m_widget->timeBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->timeSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->frequencyBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->frequencySlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->characterCodingBox, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->eposServerOptions, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->eposClientOptions, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->eposTest, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotEposTest_clicked()));
}
/** Destructor */
EposConf::~EposConf(){
// kdDebug() << "Running: EposConf::~EposConf()" << endl;
- if (!m_waveFile.isNull()) QFile::remove(m_waveFile);
+ if (!m_waveFile.isNull()) TQFile::remove(m_waveFile);
delete m_eposProc;
delete m_progressDlg;
}
-void EposConf::load(KConfig *config, const QString &configGroup){
+void EposConf::load(KConfig *config, const TQString &configGroup){
// kdDebug() << "EposConf::load: Running " << endl;
config->setGroup(configGroup);
@@ -110,7 +110,7 @@ void EposConf::load(KConfig *config, const QString &configGroup){
m_widget->eposClientPath->setURL(config->readEntry("EposClientExePath", "say-epos"));
m_widget->eposServerOptions->setText(config->readEntry("EposServerOptions", ""));
m_widget->eposClientOptions->setText(config->readEntry("EposClientOptions", ""));
- QString codecString = config->readEntry("Codec", "ISO 8859-2");
+ TQString codecString = config->readEntry("Codec", "ISO 8859-2");
int codec = PlugInProc::codecNameToListIndex(codecString, m_codecList);
m_widget->timeBox->setValue(config->readNumEntry("time", 100));
m_widget->frequencyBox->setValue(config->readNumEntry("pitch", 100));
@@ -120,15 +120,15 @@ void EposConf::load(KConfig *config, const QString &configGroup){
/**
* Converts a language code into the language setting passed to Epos synth.
*/
-QString EposConf::languageCodeToEposLanguage(const QString &languageCode)
+TQString EposConf::languageCodeToEposLanguage(const TQString &languageCode)
{
- QString eposLanguage;
+ TQString eposLanguage;
if (languageCode.left(2) == "cs") eposLanguage = "czech";
if (languageCode.left(2) == "sk") eposLanguage = "slovak";
return eposLanguage;
}
-void EposConf::save(KConfig *config, const QString &configGroup){
+void EposConf::save(KConfig *config, const TQString &configGroup){
// kdDebug() << "EposConf::save: Running" << endl;
config->setGroup("Epos");
@@ -154,7 +154,7 @@ void EposConf::defaults(){
// kdDebug() << "EposConf::defaults: Running" << endl;
// Epos server command changed from epos to eposd. Epos client command changed from
// say to say-epos. These changes appeared around Epos v2.5.35. Try for these automatically.
- QString exeName = "eposd";
+ TQString exeName = "eposd";
if (realFilePath(exeName).isEmpty())
if (!realFilePath("epos").isEmpty())
exeName = "epos";
@@ -174,23 +174,23 @@ void EposConf::defaults(){
m_widget->characterCodingBox->setCurrentItem(codec);
}
-void EposConf::setDesiredLanguage(const QString &lang)
+void EposConf::setDesiredLanguage(const TQString &lang)
{
m_languageCode = lang;
}
-QString EposConf::getTalkerCode()
+TQString EposConf::getTalkerCode()
{
- QString eposServerExe = realFilePath(m_widget->eposServerPath->url());
- QString eposClientExe = realFilePath(m_widget->eposClientPath->url());
+ TQString eposServerExe = realFilePath(m_widget->eposServerPath->url());
+ TQString eposClientExe = realFilePath(m_widget->eposClientPath->url());
if (!eposServerExe.isEmpty() && !eposClientExe.isEmpty())
{
if (!getLocation(eposServerExe).isEmpty() && !getLocation(eposClientExe).isEmpty())
{
- QString rate = "medium";
+ TQString rate = "medium";
if (m_widget->timeBox->value() < 75) rate = "slow";
if (m_widget->timeBox->value() > 125) rate = "fast";
- return QString(
+ return TQString(
"<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />"
"<prosody volume=\"%4\" rate=\"%5\" />"
"<kttsd synthesizer=\"%6\" />")
@@ -202,7 +202,7 @@ QString EposConf::getTalkerCode()
.arg("Epos TTS Synthesis System");
}
}
- return QString::null;
+ return TQString::null;
}
void EposConf::slotEposTest_clicked()
@@ -214,15 +214,15 @@ void EposConf::slotEposTest_clicked()
else
{
m_eposProc = new EposProc();
- connect (m_eposProc, SIGNAL(stopped()), this, SLOT(slotSynthStopped()));
+ connect (m_eposProc, TQT_SIGNAL(stopped()), this, TQT_SLOT(slotSynthStopped()));
}
// Create a temp file name for the wave file.
KTempFile tempFile (locateLocal("tmp", "eposplugin-"), ".wav");
- QString tmpWaveFile = tempFile.file()->name();
+ TQString tmpWaveFile = tempFile.file()->name();
tempFile.close();
// Get test message in the language of the voice.
- QString testMsg = testMessage(m_languageCode);
+ TQString testMsg = testMessage(m_languageCode);
// Tell user to wait.
m_progressDlg = new KProgressDialog(m_widget, "kttsmgr_epos_testdlg",
@@ -234,7 +234,7 @@ void EposConf::slotEposTest_clicked()
// TODO: Whenever server options change, the server must be restarted.
// TODO: Do codec names contain non-ASCII characters?
- connect (m_eposProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ connect (m_eposProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
m_eposProc->synth(
testMsg,
tmpWaveFile,
@@ -251,7 +251,7 @@ void EposConf::slotEposTest_clicked()
// Display progress dialog modally. Processing continues when plugin signals synthFinished,
// or if user clicks Cancel button.
m_progressDlg->exec();
- disconnect (m_eposProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ disconnect (m_eposProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
if (m_progressDlg->wasCancelled()) m_eposProc->stopText();
delete m_progressDlg;
m_progressDlg = 0;
@@ -274,16 +274,16 @@ void EposConf::slotSynthFinished()
// Play the wave file (possibly adjusting its Speed).
// Player object deletes the wave file when done.
if (m_player) m_player->play(m_waveFile);
- QFile::remove(m_waveFile);
- m_waveFile = QString::null;
+ TQFile::remove(m_waveFile);
+ m_waveFile = TQString::null;
if (m_progressDlg) m_progressDlg->close();
}
void EposConf::slotSynthStopped()
{
// Clean up after canceling test.
- QString filename = m_eposProc->getFilename();
- if (!filename.isNull()) QFile::remove(filename);
+ TQString filename = m_eposProc->getFilename();
+ if (!filename.isNull()) TQFile::remove(filename);
}
// Basically the slider values are logarithmic (0,...,1000) whereas percent
diff --git a/kttsd/plugins/epos/eposconf.h b/kttsd/plugins/epos/eposconf.h
index 5c3fbe3..08cb611 100644
--- a/kttsd/plugins/epos/eposconf.h
+++ b/kttsd/plugins/epos/eposconf.h
@@ -25,7 +25,7 @@
#define _EPOSCONF_H_
// Qt includes.
-#include <qstring.h>
+#include <tqstring.h>
// KDE includes.
#include <kconfig.h>
@@ -46,7 +46,7 @@ class EposConf : public PlugInConf {
public:
/** Constructor */
- EposConf( QWidget* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ EposConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/** Destructor */
~EposConf();
@@ -58,14 +58,14 @@ class EposConf : public PlugInConf {
* valid settings. NOTE that this is not called after the modules is loaded,
* so you probably want to call this method in the constructor.
*/
- void load(KConfig *config, const QString &configGroup);
+ void load(KConfig *config, const TQString &configGroup);
/** This function gets called when the user wants to save the settings in
* the user interface, updating the config files or wherever the
* configuration is stored. The method is called when the user clicks "Apply"
* or "Ok".
*/
- void save(KConfig *config, const QString &configGroup);
+ void save(KConfig *config, const TQString &configGroup);
/** This function is called to set the settings in the module to sensible
* default values. It gets called when hitting the "Default" button. The
@@ -78,7 +78,7 @@ class EposConf : public PlugInConf {
* This function informs the plugin of the desired language to be spoken
* by the plugin. The plugin should attempt to adapt itself to the
* specified language code, choosing sensible defaults if necessary.
- * If the passed-in code is QString::null, no specific language has
+ * If the passed-in code is TQString::null, no specific language has
* been chosen.
* @param lang The desired language code or Null if none.
*
@@ -90,16 +90,16 @@ class EposConf : public PlugInConf {
* not the given country, treat it as though the country
* code were not specified, i.e., adapt to the given language.
*/
- void setDesiredLanguage(const QString &lang);
+ void setDesiredLanguage(const TQString &lang);
/**
* Return fully-specified talker code for the configured plugin. This code
* uniquely identifies the configured instance of the plugin and distinquishes
* one instance from another. If the plugin has not been fully configured,
- * i.e., cannot yet synthesize, return QString::null.
+ * i.e., cannot yet synthesize, return TQString::null.
* @return Fully-specified talker code.
*/
- QString getTalkerCode();
+ TQString getTalkerCode();
private slots:
void configChanged(){
@@ -118,13 +118,13 @@ class EposConf : public PlugInConf {
/**
* Converts a language code into the language setting passed to Epos synth.
*/
- QString languageCodeToEposLanguage(const QString &languageCode);
+ TQString languageCodeToEposLanguage(const TQString &languageCode);
int percentToSlider(int percentValue);
int sliderToPercent(int sliderValue);
// Language code.
- QString m_languageCode;
+ TQString m_languageCode;
// Configuration widget.
EposConfWidget* m_widget;
@@ -132,10 +132,10 @@ class EposConf : public PlugInConf {
// Epos synthesizer.
EposProc* m_eposProc;
// Synthesized wave file name.
- QString m_waveFile;
+ TQString m_waveFile;
// Progress dialog.
KProgressDialog* m_progressDlg;
// List of displayed codec names.
- QStringList m_codecList;
+ TQStringList m_codecList;
};
#endif // _EPOSCONF_H_
diff --git a/kttsd/plugins/epos/eposproc.cpp b/kttsd/plugins/epos/eposproc.cpp
index 35bc1d3..e5fd664 100644
--- a/kttsd/plugins/epos/eposproc.cpp
+++ b/kttsd/plugins/epos/eposproc.cpp
@@ -26,10 +26,10 @@
#include <math.h>
// Qt includes.
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextcodec.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextcodec.h>
+#include <tqfile.h>
// KDE includes.
#include <kdebug.h>
@@ -43,7 +43,7 @@
#include "eposproc.moc"
/** Constructor */
-EposProc::EposProc( QObject* parent, const char* name, const QStringList& ) :
+EposProc::EposProc( TQObject* parent, const char* name, const TQStringList& ) :
PlugInProc( parent, name ){
kdDebug() << "EposProc::EposProc: Running" << endl;
m_state = psIdle;
@@ -64,7 +64,7 @@ EposProc::~EposProc(){
}
/** Initialize the speech */
-bool EposProc::init(KConfig* config, const QString& configGroup)
+bool EposProc::init(KConfig* config, const TQString& configGroup)
{
// kdDebug() << "EposProc::init: Running" << endl;
// kdDebug() << "Initializing plug in: Epos" << endl;
@@ -72,15 +72,15 @@ bool EposProc::init(KConfig* config, const QString& configGroup)
config->setGroup(configGroup);
m_eposServerExePath = config->readEntry("EposServerExePath", "epos");
m_eposClientExePath = config->readEntry("EposClientExePath", "say");
- m_eposLanguage = config->readEntry("Language", QString::null);
+ m_eposLanguage = config->readEntry("Language", TQString::null);
m_time = config->readNumEntry("time", 100);
m_pitch = config->readNumEntry("pitch", 100);
- m_eposServerOptions = config->readEntry("EposServerOptions", QString::null);
- m_eposClientOptions = config->readEntry("EposClientOptions", QString::null);
+ m_eposServerOptions = config->readEntry("EposServerOptions", TQString::null);
+ m_eposClientOptions = config->readEntry("EposClientOptions", TQString::null);
kdDebug() << "EposProc::init: path to epos server: " << m_eposServerExePath << endl;
kdDebug() << "EposProc::init: path to epos client: " << m_eposClientExePath << endl;
- QString codecString = config->readEntry("Codec", "Local");
+ TQString codecString = config->readEntry("Codec", "Local");
m_codec = codecNameToCodec(codecString);
// Start the Epos server if not already started.
if (!m_eposServerProc)
@@ -89,10 +89,10 @@ bool EposProc::init(KConfig* config, const QString& configGroup)
*m_eposServerProc << m_eposServerExePath;
if (!m_eposServerOptions.isEmpty())
*m_eposServerProc << m_eposServerOptions;
- connect(m_eposServerProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_eposServerProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
+ connect(m_eposServerProc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStdout(KProcess*, char*, int)));
+ connect(m_eposServerProc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)));
m_eposServerProc->start(KProcess::DontCare, KProcess::AllOutput);
}
@@ -107,9 +107,9 @@ bool EposProc::init(KConfig* config, const QString& configGroup)
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void EposProc::sayText(const QString &text)
+void EposProc::sayText(const TQString &text)
{
- synth(text, QString::null, m_eposServerExePath, m_eposClientExePath,
+ synth(text, TQString::null, m_eposServerExePath, m_eposClientExePath,
m_eposServerOptions, m_eposClientOptions,
m_codec, m_eposLanguage, m_time, m_pitch);
}
@@ -124,7 +124,7 @@ void EposProc::sayText(const QString &text)
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void EposProc::synthText(const QString& text, const QString& suggestedFilename)
+void EposProc::synthText(const TQString& text, const TQString& suggestedFilename)
{
synth(text, suggestedFilename, m_eposServerExePath, m_eposClientExePath,
m_eposServerOptions, m_eposClientOptions,
@@ -147,18 +147,18 @@ void EposProc::synthText(const QString& text, const QString& suggestedFilename)
* @param pitch Pitch persentage. 50 to 200.
*/
void EposProc::synth(
- const QString &text,
- const QString &suggestedFilename,
- const QString& eposServerExePath,
- const QString& eposClientExePath,
- const QString& eposServerOptions,
- const QString& eposClientOptions,
- QTextCodec *codec,
- const QString& eposLanguage,
+ const TQString &text,
+ const TQString &suggestedFilename,
+ const TQString& eposServerExePath,
+ const TQString& eposClientExePath,
+ const TQString& eposServerOptions,
+ const TQString& eposClientOptions,
+ TQTextCodec *codec,
+ const TQString& eposLanguage,
int time,
int pitch)
{
- // kdDebug() << "Running: EposProc::synth(const QString &text)" << endl;
+ // kdDebug() << "Running: EposProc::synth(const TQString &text)" << endl;
if (m_eposProc)
{
@@ -173,18 +173,18 @@ void EposProc::synth(
*m_eposServerProc << eposServerExePath;
if (!eposServerOptions.isEmpty())
*m_eposServerProc << eposServerOptions;
- connect(m_eposServerProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_eposServerProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
+ connect(m_eposServerProc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStdout(KProcess*, char*, int)));
+ connect(m_eposServerProc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)));
m_eposServerProc->start(KProcess::DontCare, KProcess::AllOutput);
kdDebug() << "EposProc:: Epos server process started" << endl;
}
// // Encode the text.
// // 1.a) encode the text
-// m_encText = QCString();
-// QTextStream ts (m_encText, IO_WriteOnly);
+// m_encText = TQCString();
+// TQTextStream ts (m_encText, IO_WriteOnly);
// ts.setCodec(codec);
// ts << text;
// ts << endl; // Some synths need this, eg. flite.
@@ -197,7 +197,7 @@ void EposProc::synth(
// kdDebug()<< "EposProc::synth: Creating Epos object" << endl;
m_eposProc = new KProcess;
m_eposProc->setUseShell(true);
- QString languageCode;
+ TQString languageCode;
if (eposLanguage == "czech")
languageCode == "cz";
else if (eposLanguage == "slovak")
@@ -210,7 +210,7 @@ void EposProc::synth(
*m_eposProc << eposClientExePath;
// Language.
if (!eposLanguage.isEmpty())
- *m_eposProc << QString("--language=%1").arg(eposLanguage);
+ *m_eposProc << TQString("--language=%1").arg(eposLanguage);
// Rate (speed).
// Map 50% to 200% onto 0 to 1000.
// slider = alpha * (log(percent)-log(50))
@@ -221,10 +221,10 @@ void EposProc::synth(
slider = slider - 500;
// Map -500 to 500 onto 45 to -45 then shift to 130 to 40 (85 midpoint).
float stretchValue = (-float(slider) * 45.0 / 500.0) + 85.0;
- QString timeMsg = QString("--init_t=%1").arg(stretchValue, 0, 'f', 3);
+ TQString timeMsg = TQString("--init_t=%1").arg(stretchValue, 0, 'f', 3);
*m_eposProc << timeMsg;
// Pitch. Map 50% to 200% onto 50 to 200. easy.
- QString pitchMsg = QString("--init_f=%1").arg(pitch);
+ TQString pitchMsg = TQString("--init_f=%1").arg(pitch);
*m_eposProc << pitchMsg;
// Output file.
if (!suggestedFilename.isEmpty())
@@ -234,14 +234,14 @@ void EposProc::synth(
*m_eposProc << "-"; // Read from StdIn.
if (!suggestedFilename.isEmpty())
*m_eposProc << " >" + suggestedFilename;
- connect(m_eposProc, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotProcessExited(KProcess*)));
- connect(m_eposProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_eposProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
- connect(m_eposProc, SIGNAL(wroteStdin(KProcess*)),
- this, SLOT(slotWroteStdin(KProcess* )));
+ connect(m_eposProc, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(slotProcessExited(KProcess*)));
+ connect(m_eposProc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStdout(KProcess*, char*, int)));
+ connect(m_eposProc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)));
+ connect(m_eposProc, TQT_SIGNAL(wroteStdin(KProcess*)),
+ this, TQT_SLOT(slotWroteStdin(KProcess* )));
if (suggestedFilename.isEmpty())
m_state = psSaying;
else
@@ -270,7 +270,7 @@ void EposProc::synth(
*
* The plugin must not re-use the filename.
*/
-QString EposProc::getFilename()
+TQString EposProc::getFilename()
{
kdDebug() << "EposProc::getFilename: returning " << m_synthFilename << endl;
return m_synthFilename;
@@ -326,13 +326,13 @@ void EposProc::slotProcessExited(KProcess*)
void EposProc::slotReceivedStdout(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "EposProc::slotReceivedStdout: Received output from Epos: " << buf << endl;
}
void EposProc::slotReceivedStderr(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "EposProc::slotReceivedStderr: Received error from Epos: " << buf << endl;
}
@@ -340,7 +340,7 @@ void EposProc::slotWroteStdin(KProcess*)
{
// kdDebug() << "EposProc::slotWroteStdin: closing Stdin" << endl;
m_eposProc->closeStdin();
- m_encText = QCString();
+ m_encText = TQCString();
}
/**
@@ -365,7 +365,7 @@ void EposProc::ackFinished()
if (m_state == psFinished)
{
m_state = psIdle;
- m_synthFilename = QString::null;
+ m_synthFilename = TQString::null;
}
}
diff --git a/kttsd/plugins/epos/eposproc.h b/kttsd/plugins/epos/eposproc.h
index b2d1d90..d0fe9ba 100644
--- a/kttsd/plugins/epos/eposproc.h
+++ b/kttsd/plugins/epos/eposproc.h
@@ -26,8 +26,8 @@
#define _EPOSPROC_H_
// Qt includes.
-#include <qstringlist.h>
-#include <qmutex.h>
+#include <tqstringlist.h>
+#include <tqmutex.h>
// KTTS includes.
#include <pluginproc.h>
@@ -42,7 +42,7 @@ class EposProc : public PlugInProc{
/**
* Constructor
*/
- EposProc( QObject* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ EposProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/**
* Destructor
@@ -54,13 +54,13 @@ class EposProc : public PlugInProc{
* @param config Settings object.
* @param configGroup Settings group.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Say a text string.
* @param text The text to speak.
*/
- virtual void sayText(const QString &text);
+ virtual void sayText(const TQString &text);
/**
* Synthesize text into an audio file, but do not send to the audio device.
@@ -72,7 +72,7 @@ class EposProc : public PlugInProc{
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
- virtual void synthText(const QString& text, const QString& suggestedFilename);
+ virtual void synthText(const TQString& text, const TQString& suggestedFilename);
/**
* Get the generated audio filename from synthText.
@@ -81,7 +81,7 @@ class EposProc : public PlugInProc{
*
* The plugin must not re-use the filename.
*/
- virtual QString getFilename();
+ virtual TQString getFilename();
/**
* Stop current operation (saying or synthesizing text).
@@ -154,14 +154,14 @@ class EposProc : public PlugInProc{
* @param pitch Pitch persentage. 50 to 200.
*/
void synth(
- const QString &text,
- const QString &suggestedFilename,
- const QString& eposServerExePath,
- const QString& eposClientExePath,
- const QString& eposServerOptions,
- const QString& eposClientOptions,
- QTextCodec *codec,
- const QString& eposLanguage,
+ const TQString &text,
+ const TQString &suggestedFilename,
+ const TQString& eposServerExePath,
+ const TQString& eposClientExePath,
+ const TQString& eposServerOptions,
+ const TQString& eposClientOptions,
+ TQTextCodec *codec,
+ const TQString& eposLanguage,
int time,
int pitch);
@@ -176,14 +176,14 @@ class EposProc : public PlugInProc{
/**
* Path to epos executables (from config).
*/
- QString m_eposServerExePath;
- QString m_eposClientExePath;
+ TQString m_eposServerExePath;
+ TQString m_eposClientExePath;
/**
* User options passed to executables (from config).
*/
- QString m_eposServerOptions;
- QString m_eposClientOptions;
+ TQString m_eposServerOptions;
+ TQString m_eposClientOptions;
/**
* Epos Server process.
@@ -198,7 +198,7 @@ class EposProc : public PlugInProc{
/**
* Epos language setting. "czech", "slovak", or Null (use default language).
*/
- QString m_eposLanguage;
+ TQString m_eposLanguage;
/**
* Rate (speed) from config file.
@@ -213,17 +213,17 @@ class EposProc : public PlugInProc{
/**
* Codec.
*/
- QTextCodec* m_codec;
+ TQTextCodec* m_codec;
/**
* Encoded buffer to be sent to Epos client.
*/
- QCString m_encText;
+ TQCString m_encText;
/**
* Synthesis filename.
*/
- QString m_synthFilename;
+ TQString m_synthFilename;
/**
* Plugin state.