summaryrefslogtreecommitdiffstats
path: root/kttsd/plugins/command/commandconf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kttsd/plugins/command/commandconf.cpp')
-rw-r--r--kttsd/plugins/command/commandconf.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/kttsd/plugins/command/commandconf.cpp b/kttsd/plugins/command/commandconf.cpp
index 9d70ff2..5d46fe9 100644
--- a/kttsd/plugins/command/commandconf.cpp
+++ b/kttsd/plugins/command/commandconf.cpp
@@ -16,11 +16,11 @@
***************************************************************************/
// Qt includes.
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qfile.h>
-#include <qapplication.h>
-#include <qtextcodec.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
+#include <tqapplication.h>
+#include <tqtextcodec.h>
// KDE includes.
#include <kdialog.h>
@@ -41,14 +41,14 @@
#include "commandconf.h"
/** Constructor */
-CommandConf::CommandConf( QWidget* parent, const char* name, const QStringList& /*args*/) :
+CommandConf::CommandConf( TQWidget* parent, const char* name, const TQStringList& /*args*/) :
PlugInConf(parent, name)
{
// kdDebug() << "CommandConf::CommandConf: Running" << endl;
m_commandProc = 0;
m_progressDlg = 0;
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "CommandConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new CommandConfWidget(this, "CommandConfigWidget");
@@ -60,39 +60,39 @@ CommandConf::CommandConf( QWidget* parent, const char* name, const QStringList&
m_widget->characterCodingBox->insertStringList(m_codecList);
defaults();
- connect(m_widget->characterCodingBox, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->characterCodingBox, SIGNAL(activated(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->stdInButton, SIGNAL(toggled(bool)),
- this, SLOT(configChanged()));
- connect(m_widget->urlReq, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->commandTestButton, SIGNAL(clicked()),
- this, SLOT(slotCommandTest_clicked()));
+ connect(m_widget->characterCodingBox, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->characterCodingBox, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->stdInButton, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->urlReq, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->commandTestButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotCommandTest_clicked()));
}
/** Destructor */
CommandConf::~CommandConf()
{
// kdDebug() << "CommandConf::~CommandConf: Running" << endl;
- if (!m_waveFile.isNull()) QFile::remove(m_waveFile);
+ if (!m_waveFile.isNull()) TQFile::remove(m_waveFile);
delete m_commandProc;
delete m_progressDlg;
}
-void CommandConf::load(KConfig *config, const QString &configGroup) {
+void CommandConf::load(KConfig *config, const TQString &configGroup) {
// kdDebug() << "CommandConf::load: Running" << endl;
config->setGroup(configGroup);
m_widget->urlReq->setURL (config->readEntry("Command", "cat -"));
m_widget->stdInButton->setChecked(config->readBoolEntry("StdIn", false));
- QString codecString = config->readEntry("Codec", "Local");
+ TQString codecString = config->readEntry("Codec", "Local");
m_languageCode = config->readEntry("LanguageCode", m_languageCode);
int codec = PlugInProc::codecNameToListIndex(codecString, m_codecList);
m_widget->characterCodingBox->setCurrentItem(codec);
}
-void CommandConf::save(KConfig *config, const QString &configGroup) {
+void CommandConf::save(KConfig *config, const TQString &configGroup) {
// kdDebug() << "CommandConf::save: Running" << endl;
config->setGroup(configGroup);
config->writeEntry("Command", m_widget->urlReq->url());
@@ -109,21 +109,21 @@ void CommandConf::defaults(){
m_widget->characterCodingBox->setCurrentItem(0);
}
-void CommandConf::setDesiredLanguage(const QString &lang)
+void CommandConf::setDesiredLanguage(const TQString &lang)
{
m_languageCode = lang;
}
-QString CommandConf::getTalkerCode()
+TQString CommandConf::getTalkerCode()
{
- QString url = m_widget->urlReq->url();
+ TQString url = m_widget->urlReq->url();
if (!url.isEmpty())
{
// Must contain either text or file parameter, or StdIn checkbox must be checked,
// otherwise, does nothing!
if ((url.contains("%t") > 0) || (url.contains("%f") > 0) || m_widget->stdInButton->isChecked())
{
- return QString(
+ return TQString(
"<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />"
"<prosody volume=\"%4\" rate=\"%5\" />"
"<kttsd synthesizer=\"%6\" />")
@@ -135,7 +135,7 @@ QString CommandConf::getTalkerCode()
.arg("Command");
}
}
- return QString::null;
+ return TQString::null;
}
void CommandConf::slotCommandTest_clicked()
@@ -147,16 +147,16 @@ void CommandConf::slotCommandTest_clicked()
else
{
m_commandProc = new CommandProc();
- connect (m_commandProc, SIGNAL(stopped()), this, SLOT(slotSynthStopped()));
+ connect (m_commandProc, TQT_SIGNAL(stopped()), this, TQT_SLOT(slotSynthStopped()));
}
// Create a temp file name for the wave file.
KTempFile tempFile (locateLocal("tmp", "commandplugin-"), ".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_command_testdlg",
@@ -167,7 +167,7 @@ void CommandConf::slotCommandTest_clicked()
m_progressDlg->setAllowCancel(true);
// TODO: Do codec names contain non-ASCII characters?
- connect (m_commandProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ connect (m_commandProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
m_commandProc->synth(
testMsg,
tmpWaveFile,
@@ -179,7 +179,7 @@ void CommandConf::slotCommandTest_clicked()
// Display progress dialog modally. Processing continues when plugin signals synthFinished,
// or if user clicks Cancel button.
m_progressDlg->exec();
- disconnect (m_commandProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ disconnect (m_commandProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
if (m_progressDlg->wasCancelled()) m_commandProc->stopText();
delete m_progressDlg;
m_progressDlg = 0;
@@ -202,16 +202,16 @@ void CommandConf::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 CommandConf::slotSynthStopped()
{
// Clean up after canceling test.
- QString filename = m_commandProc->getFilename();
- if (!filename.isNull()) QFile::remove(filename);
+ TQString filename = m_commandProc->getFilename();
+ if (!filename.isNull()) TQFile::remove(filename);
}
#include "commandconf.moc"