From 0b54abbdf80cef08e5cb8ef7b8b7af31c54dd9b4 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 24 Jan 2013 13:40:41 -0600 Subject: Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4 --- kttsd/plugins/command/commandproc.cpp | 30 ++++++++-------- kttsd/plugins/command/commandproc.h | 12 +++---- kttsd/plugins/epos/eposproc.cpp | 52 +++++++++++++-------------- kttsd/plugins/epos/eposproc.h | 14 ++++---- kttsd/plugins/festivalint/festivalintconf.cpp | 10 +++--- kttsd/plugins/festivalint/festivalintproc.cpp | 32 ++++++++--------- kttsd/plugins/festivalint/festivalintproc.h | 10 +++--- kttsd/plugins/flite/fliteproc.cpp | 28 +++++++-------- kttsd/plugins/flite/fliteproc.h | 12 +++---- kttsd/plugins/freetts/freettsproc.cpp | 32 ++++++++--------- kttsd/plugins/freetts/freettsproc.h | 12 +++---- kttsd/plugins/hadifix/hadifixconfigui.ui.h | 4 +-- kttsd/plugins/hadifix/hadifixproc.cpp | 30 ++++++++-------- kttsd/plugins/hadifix/hadifixproc.h | 10 +++--- 14 files changed, 144 insertions(+), 144 deletions(-) (limited to 'kttsd/plugins') diff --git a/kttsd/plugins/command/commandproc.cpp b/kttsd/plugins/command/commandproc.cpp index 9ea996e..a5042fa 100644 --- a/kttsd/plugins/command/commandproc.cpp +++ b/kttsd/plugins/command/commandproc.cpp @@ -285,19 +285,19 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile // 3. create a new process kdDebug() << "CommandProc::synth: running command: " << command << endl; - m_commandProc = new KProcess; + m_commandProc = new TDEProcess; m_commandProc->setUseShell(true); m_commandProc->setEnvironment("LANG", language + "." + codec->mimeName()); m_commandProc->setEnvironment("LC_CTYPE", language + "." + codec->mimeName()); *m_commandProc << command; - connect(m_commandProc, TQT_SIGNAL(processExited(KProcess*)), - this, TQT_SLOT(slotProcessExited(KProcess*))); - connect(m_commandProc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), - this, TQT_SLOT(slotReceivedStdout(KProcess*, char*, int))); - connect(m_commandProc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), - this, TQT_SLOT(slotReceivedStderr(KProcess*, char*, int))); - connect(m_commandProc, TQT_SIGNAL(wroteStdin(KProcess*)), - this, TQT_SLOT(slotWroteStdin(KProcess* ))); + connect(m_commandProc, TQT_SIGNAL(processExited(TDEProcess*)), + this, TQT_SLOT(slotProcessExited(TDEProcess*))); + connect(m_commandProc, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), + this, TQT_SLOT(slotReceivedStdout(TDEProcess*, char*, int))); + connect(m_commandProc, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), + this, TQT_SLOT(slotReceivedStderr(TDEProcess*, char*, int))); + connect(m_commandProc, TQT_SIGNAL(wroteStdin(TDEProcess*)), + this, TQT_SLOT(slotWroteStdin(TDEProcess* ))); // 4. start the process @@ -309,14 +309,14 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile m_state = psSynthing; } if (stdIn) { - m_commandProc->start(KProcess::NotifyOnExit, KProcess::All); + m_commandProc->start(TDEProcess::NotifyOnExit, TDEProcess::All); if (encodedText.length() > 0) m_commandProc->writeStdin(encodedText, encodedText.length()); else m_commandProc->closeStdin(); } else - m_commandProc->start(KProcess::NotifyOnExit, KProcess::AllOutput); + m_commandProc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput); } /** @@ -361,7 +361,7 @@ void CommandProc::stopText(){ kdDebug() << "CommandProc::stopText: Command stopped." << endl; } -void CommandProc::slotProcessExited(KProcess*) +void CommandProc::slotProcessExited(TDEProcess*) { kdDebug() << "CommandProc:slotProcessExited: Command process has exited." << endl; pluginState prevState = m_state; @@ -380,19 +380,19 @@ void CommandProc::slotProcessExited(KProcess*) } } -void CommandProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) +void CommandProc::slotReceivedStdout(TDEProcess*, char* buffer, int buflen) { TQString buf = TQString::fromLatin1(buffer, buflen); kdDebug() << "CommandProc::slotReceivedStdout: Received output from Command: " << buf << endl; } -void CommandProc::slotReceivedStderr(KProcess*, char* buffer, int buflen) +void CommandProc::slotReceivedStderr(TDEProcess*, char* buffer, int buflen) { TQString buf = TQString::fromLatin1(buffer, buflen); kdDebug() << "CommandProc::slotReceivedStderr: Received error from Command: " << buf << endl; } -void CommandProc::slotWroteStdin(KProcess*) +void CommandProc::slotWroteStdin(TDEProcess*) { kdDebug() << "CommandProc::slotWroteStdin: closing Stdin" << endl; m_commandProc->closeStdin(); diff --git a/kttsd/plugins/command/commandproc.h b/kttsd/plugins/command/commandproc.h index 26f2494..f206f9b 100644 --- a/kttsd/plugins/command/commandproc.h +++ b/kttsd/plugins/command/commandproc.h @@ -24,7 +24,7 @@ // KTTS includes. #include -class KProcess; +class TDEProcess; class TQTextCodec; class CommandProc : public PlugInProc{ @@ -140,10 +140,10 @@ class CommandProc : public PlugInProc{ TQTextCodec *codec, TQString& language); private slots: - void slotProcessExited(KProcess* proc); - void slotReceivedStdout(KProcess* proc, char* buffer, int buflen); - void slotReceivedStderr(KProcess* proc, char* buffer, int buflen); - void slotWroteStdin(KProcess* proc); + void slotProcessExited(TDEProcess* proc); + void slotReceivedStdout(TDEProcess* proc, char* buffer, int buflen); + void slotReceivedStderr(TDEProcess* proc, char* buffer, int buflen); + void slotWroteStdin(TDEProcess* proc); private: @@ -175,7 +175,7 @@ class CommandProc : public PlugInProc{ /** * Flite process */ - KProcess* m_commandProc; + TDEProcess* m_commandProc; /** * Name of temporary file containing text. diff --git a/kttsd/plugins/epos/eposproc.cpp b/kttsd/plugins/epos/eposproc.cpp index 5ccf568..b13f240 100644 --- a/kttsd/plugins/epos/eposproc.cpp +++ b/kttsd/plugins/epos/eposproc.cpp @@ -85,15 +85,15 @@ bool EposProc::init(KConfig* config, const TQString& configGroup) // Start the Epos server if not already started. if (!m_eposServerProc) { - m_eposServerProc = new KProcess; + m_eposServerProc = new TDEProcess; *m_eposServerProc << m_eposServerExePath; if (!m_eposServerOptions.isEmpty()) *m_eposServerProc << m_eposServerOptions; - 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); + connect(m_eposServerProc, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), + this, TQT_SLOT(slotReceivedStdout(TDEProcess*, char*, int))); + connect(m_eposServerProc, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), + this, TQT_SLOT(slotReceivedStderr(TDEProcess*, char*, int))); + m_eposServerProc->start(TDEProcess::DontCare, TDEProcess::AllOutput); } kdDebug() << "EposProc::init: Initialized with codec: " << codecString << endl; @@ -169,15 +169,15 @@ void EposProc::synth( // Start the Epos server if not already started. if (!m_eposServerProc) { - m_eposServerProc = new KProcess; + m_eposServerProc = new TDEProcess; *m_eposServerProc << eposServerExePath; if (!eposServerOptions.isEmpty()) *m_eposServerProc << eposServerOptions; - 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); + connect(m_eposServerProc, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), + this, TQT_SLOT(slotReceivedStdout(TDEProcess*, char*, int))); + connect(m_eposServerProc, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), + this, TQT_SLOT(slotReceivedStderr(TDEProcess*, char*, int))); + m_eposServerProc->start(TDEProcess::DontCare, TDEProcess::AllOutput); kdDebug() << "EposProc:: Epos server process started" << endl; } @@ -195,7 +195,7 @@ void EposProc::synth( m_encText = text.latin1(); // Should not happen, but just in case. // kdDebug()<< "EposProc::synth: Creating Epos object" << endl; - m_eposProc = new KProcess; + m_eposProc = new TDEProcess; m_eposProc->setUseShell(true); TQString languageCode; if (eposLanguage == "czech") @@ -234,14 +234,14 @@ void EposProc::synth( *m_eposProc << "-"; // Read from StdIn. if (!suggestedFilename.isEmpty()) *m_eposProc << " >" + suggestedFilename; - 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* ))); + connect(m_eposProc, TQT_SIGNAL(processExited(TDEProcess*)), + this, TQT_SLOT(slotProcessExited(TDEProcess*))); + connect(m_eposProc, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), + this, TQT_SLOT(slotReceivedStdout(TDEProcess*, char*, int))); + connect(m_eposProc, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), + this, TQT_SLOT(slotReceivedStderr(TDEProcess*, char*, int))); + connect(m_eposProc, TQT_SIGNAL(wroteStdin(TDEProcess*)), + this, TQT_SLOT(slotWroteStdin(TDEProcess* ))); if (suggestedFilename.isEmpty()) m_state = psSaying; else @@ -250,7 +250,7 @@ void EposProc::synth( // Ok, let's rock. m_synthFilename = suggestedFilename; // kdDebug() << "EposProc::synth: Synthing text: '" << text << "' using Epos plug in" << endl; - if (!m_eposProc->start(KProcess::NotifyOnExit, KProcess::All)) + if (!m_eposProc->start(TDEProcess::NotifyOnExit, TDEProcess::All)) { kdDebug() << "EposProc::synth: Error starting Epos process. Is epos in the PATH?" << endl; m_state = psIdle; @@ -305,7 +305,7 @@ void EposProc::stopText(){ kdDebug() << "EposProc::stopText: Epos stopped." << endl; } -void EposProc::slotProcessExited(KProcess*) +void EposProc::slotProcessExited(TDEProcess*) { // kdDebug() << "EposProc:slotProcessExited: Epos process has exited." << endl; pluginState prevState = m_state; @@ -324,19 +324,19 @@ void EposProc::slotProcessExited(KProcess*) } } -void EposProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) +void EposProc::slotReceivedStdout(TDEProcess*, char* buffer, int buflen) { TQString buf = TQString::fromLatin1(buffer, buflen); kdDebug() << "EposProc::slotReceivedStdout: Received output from Epos: " << buf << endl; } -void EposProc::slotReceivedStderr(KProcess*, char* buffer, int buflen) +void EposProc::slotReceivedStderr(TDEProcess*, char* buffer, int buflen) { TQString buf = TQString::fromLatin1(buffer, buflen); kdDebug() << "EposProc::slotReceivedStderr: Received error from Epos: " << buf << endl; } -void EposProc::slotWroteStdin(KProcess*) +void EposProc::slotWroteStdin(TDEProcess*) { // kdDebug() << "EposProc::slotWroteStdin: closing Stdin" << endl; m_eposProc->closeStdin(); diff --git a/kttsd/plugins/epos/eposproc.h b/kttsd/plugins/epos/eposproc.h index 103481e..b48b932 100644 --- a/kttsd/plugins/epos/eposproc.h +++ b/kttsd/plugins/epos/eposproc.h @@ -32,7 +32,7 @@ // KTTS includes. #include -class KProcess; +class TDEProcess; class TQTextCodec; class EposProc : public PlugInProc{ @@ -167,10 +167,10 @@ class EposProc : public PlugInProc{ int pitch); private slots: - void slotProcessExited(KProcess* proc); - void slotReceivedStdout(KProcess* proc, char* buffer, int buflen); - void slotReceivedStderr(KProcess* proc, char* buffer, int buflen); - void slotWroteStdin(KProcess* proc); + void slotProcessExited(TDEProcess* proc); + void slotReceivedStdout(TDEProcess* proc, char* buffer, int buflen); + void slotReceivedStderr(TDEProcess* proc, char* buffer, int buflen); + void slotWroteStdin(TDEProcess* proc); private: @@ -189,12 +189,12 @@ class EposProc : public PlugInProc{ /** * Epos Server process. */ - KProcess* m_eposServerProc; + TDEProcess* m_eposServerProc; /** * Epos Client process */ - KProcess* m_eposProc; + TDEProcess* m_eposProc; /** * Epos language setting. "czech", "slovak", or Null (use default language). diff --git a/kttsd/plugins/festivalint/festivalintconf.cpp b/kttsd/plugins/festivalint/festivalintconf.cpp index 4e34b1a..c7563a6 100644 --- a/kttsd/plugins/festivalint/festivalintconf.cpp +++ b/kttsd/plugins/festivalint/festivalintconf.cpp @@ -455,15 +455,15 @@ void FestivalIntConf::scanVoices() if (!m_supportedVoiceCodes.isEmpty()) { // User's desktop language setting. - TQString desktopLanguageCode = KGlobal::locale()->language(); + TQString desktopLanguageCode = TDEGlobal::locale()->language(); TQString twoAlpha; TQString countryCode; TQString charSet; - KGlobal::locale()->splitLocale(desktopLanguageCode, twoAlpha, countryCode, charSet); + TDEGlobal::locale()->splitLocale(desktopLanguageCode, twoAlpha, countryCode, charSet); desktopLanguageCode = twoAlpha.lower(); // Festival known voices list. - TQString voicesFilename = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/festivalint/voices"; + TQString voicesFilename = TDEGlobal::dirs()->resourceDirs("data").last() + "/kttsd/festivalint/voices"; TQDomDocument voicesDoc("Festival Voices"); TQFile voicesFile(voicesFilename); if (voicesFile.open(IO_ReadOnly)) voicesDoc.setContent(&voicesFile); @@ -475,8 +475,8 @@ void FestivalIntConf::scanVoices() // Iterate thru list of voice codes returned by Festival, // find matching entry in voices.xml file, and add to list of supported voices. - TQPixmap maleIcon = KGlobal::iconLoader()->loadIcon("male", KIcon::Small); - TQPixmap femaleIcon = KGlobal::iconLoader()->loadIcon("female", KIcon::Small); + TQPixmap maleIcon = TDEGlobal::iconLoader()->loadIcon("male", KIcon::Small); + TQPixmap femaleIcon = TDEGlobal::iconLoader()->loadIcon("female", KIcon::Small); TQStringList::ConstIterator itEnd = m_supportedVoiceCodes.constEnd(); for(TQStringList::ConstIterator it = m_supportedVoiceCodes.begin(); it != itEnd; ++it ) { diff --git a/kttsd/plugins/festivalint/festivalintproc.cpp b/kttsd/plugins/festivalint/festivalintproc.cpp index e11511b..065504f 100644 --- a/kttsd/plugins/festivalint/festivalintproc.cpp +++ b/kttsd/plugins/festivalint/festivalintproc.cpp @@ -178,20 +178,20 @@ void FestivalIntProc::startEngine(const TQString &festivalExePath, const TQStrin if(!m_festProc) { // kdDebug()<< "FestivalIntProc::startEngine: Creating Festival object" << endl; - m_festProc = new KProcess; + m_festProc = new TDEProcess; *m_festProc << festivalExePath; *m_festProc << "--interactive"; m_festProc->setEnvironment("LANG", languageCode + "." + codec->mimeName()); m_festProc->setEnvironment("LC_CTYPE", languageCode + "." + codec->mimeName()); // kdDebug() << "FestivalIntProc::startEngine: setting LANG = LC_CTYPE = " << languageCode << "." << codec->mimeName() << endl; - connect(m_festProc, TQT_SIGNAL(processExited(KProcess*)), - this, TQT_SLOT(slotProcessExited(KProcess*))); - connect(m_festProc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), - this, TQT_SLOT(slotReceivedStdout(KProcess*, char*, int))); - connect(m_festProc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), - this, TQT_SLOT(slotReceivedStderr(KProcess*, char*, int))); - connect(m_festProc, TQT_SIGNAL(wroteStdin(KProcess*)), - this, TQT_SLOT(slotWroteStdin(KProcess*))); + connect(m_festProc, TQT_SIGNAL(processExited(TDEProcess*)), + this, TQT_SLOT(slotProcessExited(TDEProcess*))); + connect(m_festProc, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), + this, TQT_SLOT(slotReceivedStdout(TDEProcess*, char*, int))); + connect(m_festProc, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), + this, TQT_SLOT(slotReceivedStderr(TDEProcess*, char*, int))); + connect(m_festProc, TQT_SIGNAL(wroteStdin(TDEProcess*)), + this, TQT_SLOT(slotWroteStdin(TDEProcess*))); } if (!m_festProc->isRunning()) { @@ -201,7 +201,7 @@ void FestivalIntProc::startEngine(const TQString &festivalExePath, const TQStrin m_runningPitch = 100; m_ready = false; m_outputQueue.clear(); - if (m_festProc->start(KProcess::NotifyOnExit, KProcess::All)) + if (m_festProc->start(TDEProcess::NotifyOnExit, TDEProcess::All)) { // kdDebug()<< "FestivalIntProc:startEngine: Festival initialized" << endl; m_festivalExePath = festivalExePath; @@ -209,7 +209,7 @@ void FestivalIntProc::startEngine(const TQString &festivalExePath, const TQStrin m_codec = codec; // Load the SABLE to Wave module. sendToFestival("(load \"" + - KGlobal::dirs()->resourceDirs("data").last() + "kttsd/festivalint/sabletowave.scm\")"); + TDEGlobal::dirs()->resourceDirs("data").last() + "kttsd/festivalint/sabletowave.scm\")"); } else { @@ -460,7 +460,7 @@ void FestivalIntProc::stopText(){ } else m_state = psIdle; } -void FestivalIntProc::slotProcessExited(KProcess*) +void FestivalIntProc::slotProcessExited(TDEProcess*) { // kdDebug() << "FestivalIntProc:slotProcessExited: Festival process has exited." << endl; m_ready = true; @@ -498,7 +498,7 @@ void FestivalIntProc::slotProcessExited(KProcess*) m_outputQueue.clear(); } -void FestivalIntProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) +void FestivalIntProc::slotReceivedStdout(TDEProcess*, char* buffer, int buflen) { TQString buf = TQString::fromLatin1(buffer, buflen); // kdDebug() << "FestivalIntProc::slotReceivedStdout: Received from Festival: " << buf << endl; @@ -567,13 +567,13 @@ void FestivalIntProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) } } -void FestivalIntProc::slotReceivedStderr(KProcess*, char* buffer, int buflen) +void FestivalIntProc::slotReceivedStderr(TDEProcess*, char* buffer, int buflen) { TQString buf = TQString::fromLatin1(buffer, buflen); kdDebug() << "FestivalIntProc::slotReceivedStderr: Received error from Festival: " << buf << endl; } -void FestivalIntProc::slotWroteStdin(KProcess* /*proc*/) +void FestivalIntProc::slotWroteStdin(TDEProcess* /*proc*/) { // kdDebug() << "FestivalIntProc::slotWroteStdin: Running" << endl; m_writingStdin = false; @@ -655,7 +655,7 @@ bool FestivalIntProc::supportsSynth() { return true; } TQString FestivalIntProc::getSsmlXsltFilename() { if (m_supportsSSML == ssYes) - return KGlobal::dirs()->resourceDirs("data").last() + "kttsd/festivalint/xslt/SSMLtoSable.xsl"; + return TDEGlobal::dirs()->resourceDirs("data").last() + "kttsd/festivalint/xslt/SSMLtoSable.xsl"; else return PlugInProc::getSsmlXsltFilename(); } diff --git a/kttsd/plugins/festivalint/festivalintproc.h b/kttsd/plugins/festivalint/festivalintproc.h index 34af896..f086653 100644 --- a/kttsd/plugins/festivalint/festivalintproc.h +++ b/kttsd/plugins/festivalint/festivalintproc.h @@ -212,10 +212,10 @@ class FestivalIntProc : public PlugInProc{ void queryVoicesFinished(const TQStringList &voiceCodes); private slots: - void slotProcessExited(KProcess* proc); - void slotReceivedStdout(KProcess* proc, char* buffer, int buflen); - void slotReceivedStderr(KProcess* proc, char* buffer, int buflen); - void slotWroteStdin(KProcess* proc); + void slotProcessExited(TDEProcess* proc); + void slotReceivedStdout(TDEProcess* proc, char* buffer, int buflen); + void slotReceivedStderr(TDEProcess* proc, char* buffer, int buflen); + void slotWroteStdin(TDEProcess* proc); private: /** @@ -304,7 +304,7 @@ class FestivalIntProc : public PlugInProc{ /** * Festival process */ - KProcess* m_festProc; + TDEProcess* m_festProc; /** * Synthesis filename. diff --git a/kttsd/plugins/flite/fliteproc.cpp b/kttsd/plugins/flite/fliteproc.cpp index 3f0df60..86b6afa 100644 --- a/kttsd/plugins/flite/fliteproc.cpp +++ b/kttsd/plugins/flite/fliteproc.cpp @@ -111,15 +111,15 @@ void FliteProc::synth( m_fliteProc = 0; } // kdDebug()<< "FliteProc::synth: Creating Flite object" << endl; - m_fliteProc = new KProcess; - connect(m_fliteProc, TQT_SIGNAL(processExited(KProcess*)), - this, TQT_SLOT(slotProcessExited(KProcess*))); - connect(m_fliteProc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), - this, TQT_SLOT(slotReceivedStdout(KProcess*, char*, int))); - connect(m_fliteProc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), - this, TQT_SLOT(slotReceivedStderr(KProcess*, char*, int))); - connect(m_fliteProc, TQT_SIGNAL(wroteStdin(KProcess*)), - this, TQT_SLOT(slotWroteStdin(KProcess* ))); + m_fliteProc = new TDEProcess; + connect(m_fliteProc, TQT_SIGNAL(processExited(TDEProcess*)), + this, TQT_SLOT(slotProcessExited(TDEProcess*))); + connect(m_fliteProc, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), + this, TQT_SLOT(slotReceivedStdout(TDEProcess*, char*, int))); + connect(m_fliteProc, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), + this, TQT_SLOT(slotReceivedStderr(TDEProcess*, char*, int))); + connect(m_fliteProc, TQT_SIGNAL(wroteStdin(TDEProcess*)), + this, TQT_SLOT(slotWroteStdin(TDEProcess* ))); if (synthFilename.isNull()) m_state = psSaying; else @@ -145,7 +145,7 @@ void FliteProc::synth( // Ok, let's rock. m_synthFilename = synthFilename; kdDebug() << "FliteProc::synth: Synthing text: '" << saidText << "' using Flite plug in" << endl; - if (!m_fliteProc->start(KProcess::NotifyOnExit, KProcess::All)) + if (!m_fliteProc->start(TDEProcess::NotifyOnExit, TDEProcess::All)) { kdDebug() << "FliteProc::synth: Error starting Flite process. Is flite in the PATH?" << endl; m_state = psIdle; @@ -197,7 +197,7 @@ void FliteProc::stopText(){ kdDebug() << "FliteProc::stopText: Flite stopped." << endl; } -void FliteProc::slotProcessExited(KProcess*) +void FliteProc::slotProcessExited(TDEProcess*) { kdDebug() << "FliteProc:slotProcessExited: Flite process has exited." << endl; pluginState prevState = m_state; @@ -216,19 +216,19 @@ void FliteProc::slotProcessExited(KProcess*) } } -void FliteProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) +void FliteProc::slotReceivedStdout(TDEProcess*, char* buffer, int buflen) { TQString buf = TQString::fromLatin1(buffer, buflen); kdDebug() << "FliteProc::slotReceivedStdout: Received output from Flite: " << buf << endl; } -void FliteProc::slotReceivedStderr(KProcess*, char* buffer, int buflen) +void FliteProc::slotReceivedStderr(TDEProcess*, char* buffer, int buflen) { TQString buf = TQString::fromLatin1(buffer, buflen); kdDebug() << "FliteProc::slotReceivedStderr: Received error from Flite: " << buf << endl; } -void FliteProc::slotWroteStdin(KProcess*) +void FliteProc::slotWroteStdin(TDEProcess*) { kdDebug() << "FliteProc::slotWroteStdin: closing Stdin" << endl; m_fliteProc->closeStdin(); diff --git a/kttsd/plugins/flite/fliteproc.h b/kttsd/plugins/flite/fliteproc.h index 0a29314..e472067 100644 --- a/kttsd/plugins/flite/fliteproc.h +++ b/kttsd/plugins/flite/fliteproc.h @@ -31,7 +31,7 @@ // KTTS includes. #include -class KProcess; +class TDEProcess; class FliteProc : public PlugInProc{ Q_OBJECT @@ -150,10 +150,10 @@ class FliteProc : public PlugInProc{ const TQString &fliteExePath); private slots: - void slotProcessExited(KProcess* proc); - void slotReceivedStdout(KProcess* proc, char* buffer, int buflen); - void slotReceivedStderr(KProcess* proc, char* buffer, int buflen); - void slotWroteStdin(KProcess* proc); + void slotProcessExited(TDEProcess* proc); + void slotReceivedStdout(TDEProcess* proc, char* buffer, int buflen); + void slotReceivedStderr(TDEProcess* proc, char* buffer, int buflen); + void slotWroteStdin(TDEProcess* proc); private: @@ -165,7 +165,7 @@ class FliteProc : public PlugInProc{ /** * Flite process */ - KProcess* m_fliteProc; + TDEProcess* m_fliteProc; /** * Synthesis filename. diff --git a/kttsd/plugins/freetts/freettsproc.cpp b/kttsd/plugins/freetts/freettsproc.cpp index c7b2200..4d6c177 100644 --- a/kttsd/plugins/freetts/freettsproc.cpp +++ b/kttsd/plugins/freetts/freettsproc.cpp @@ -102,15 +102,15 @@ void FreeTTSProc::synth( } - m_freettsProc = new KProcess; - connect(m_freettsProc, TQT_SIGNAL(processExited(KProcess*)), - this, TQT_SLOT(slotProcessExited(KProcess*))); - connect(m_freettsProc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), - this, TQT_SLOT(slotReceivedStdout(KProcess*, char*, int))); - connect(m_freettsProc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), - this, TQT_SLOT(slotReceivedStderr(KProcess*, char*, int))); - connect(m_freettsProc, TQT_SIGNAL(wroteStdin(KProcess*)), - this, TQT_SLOT(slotWroteStdin(KProcess* ))); + m_freettsProc = new TDEProcess; + connect(m_freettsProc, TQT_SIGNAL(processExited(TDEProcess*)), + this, TQT_SLOT(slotProcessExited(TDEProcess*))); + connect(m_freettsProc, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), + this, TQT_SLOT(slotReceivedStdout(TDEProcess*, char*, int))); + connect(m_freettsProc, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), + this, TQT_SLOT(slotReceivedStderr(TDEProcess*, char*, int))); + connect(m_freettsProc, TQT_SIGNAL(wroteStdin(TDEProcess*)), + this, TQT_SLOT(slotWroteStdin(TDEProcess* ))); if (synthFilename.isNull()) m_state = psSaying; else @@ -122,7 +122,7 @@ void FreeTTSProc::synth( /// As freetts.jar doesn't seem to like being called from an absolute path, /// we need to strip off the path to freetts.jar and pass it to - /// KProcess::setWorkingDirectory() + /// TDEProcess::setWorkingDirectory() /// We could just strip off 11 characters from the end of the path to freetts.jar, but thats /// not exactly very portable... TQString filename = TQFileInfo(freettsJarPath).baseName().append(TQString(".").append(TQFileInfo(freettsJarPath).extension())); @@ -140,10 +140,10 @@ void FreeTTSProc::synth( m_synthFilename = synthFilename; kdDebug() << "FreeTTSProc::synth: Synthing text: '" << saidText << "' using FreeTTS plug in" << endl; - if (!m_freettsProc->start(KProcess::NotifyOnExit, KProcess::All)) { + if (!m_freettsProc->start(TDEProcess::NotifyOnExit, TDEProcess::All)) { kdDebug() << "FreeTTSProc::synth: Error starting FreeTTS process. Is freetts.jar in the PATH?" << endl; m_state = psIdle; - kdDebug() << "KProcess args: " << argsToTQStringList(m_freettsProc->args()) << endl; + kdDebug() << "TDEProcess args: " << argsToTQStringList(m_freettsProc->args()) << endl; return; } kdDebug()<< "FreeTTSProc:synth: FreeTTS initialized" << endl; @@ -188,7 +188,7 @@ void FreeTTSProc::stopText() { kdDebug() << "FreeTTSProc::stopText: FreeTTS stopped." << endl; } -void FreeTTSProc::slotProcessExited(KProcess*) { +void FreeTTSProc::slotProcessExited(TDEProcess*) { kdDebug() << "FreeTTSProc:slotProcessExited: FreeTTS process has exited." << endl; pluginState prevState = m_state; if (m_waitingStop) { @@ -205,17 +205,17 @@ void FreeTTSProc::slotProcessExited(KProcess*) { } } -void FreeTTSProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) { +void FreeTTSProc::slotReceivedStdout(TDEProcess*, char* buffer, int buflen) { TQString buf = TQString::fromLatin1(buffer, buflen); kdDebug() << "FreeTTSProc::slotReceivedStdout: Received output from FreeTTS: " << buf << endl; } -void FreeTTSProc::slotReceivedStderr(KProcess*, char* buffer, int buflen) { +void FreeTTSProc::slotReceivedStderr(TDEProcess*, char* buffer, int buflen) { TQString buf = TQString::fromLatin1(buffer, buflen); kdDebug() << "FreeTTSProc::slotReceivedStderr: Received error from FreeTTS: " << buf << endl; } -void FreeTTSProc::slotWroteStdin(KProcess*) { +void FreeTTSProc::slotWroteStdin(TDEProcess*) { kdDebug() << "FreeTTSProc::slotWroteStdin: closing Stdin" << endl; m_freettsProc->closeStdin(); } diff --git a/kttsd/plugins/freetts/freettsproc.h b/kttsd/plugins/freetts/freettsproc.h index 54a2f0c..8e1e06f 100644 --- a/kttsd/plugins/freetts/freettsproc.h +++ b/kttsd/plugins/freetts/freettsproc.h @@ -24,7 +24,7 @@ #include -class KProcess; +class TDEProcess; class FreeTTSProc : public PlugInProc{ Q_OBJECT @@ -143,10 +143,10 @@ public: const TQString &freettsJarPath); private slots: - void slotProcessExited(KProcess* proc); - void slotReceivedStdout(KProcess* proc, char* buffer, int buflen); - void slotReceivedStderr(KProcess* proc, char* buffer, int buflen); - void slotWroteStdin(KProcess* proc); + void slotProcessExited(TDEProcess* proc); + void slotReceivedStdout(TDEProcess* proc, char* buffer, int buflen); + void slotReceivedStderr(TDEProcess* proc, char* buffer, int buflen); + void slotWroteStdin(TDEProcess* proc); private: @@ -158,7 +158,7 @@ private: /** * FreeTTS process */ - KProcess* m_freettsProc; + TDEProcess* m_freettsProc; /** * Synthesis filename. diff --git a/kttsd/plugins/hadifix/hadifixconfigui.ui.h b/kttsd/plugins/hadifix/hadifixconfigui.ui.h index ff9d381..fbfa16c 100644 --- a/kttsd/plugins/hadifix/hadifixconfigui.ui.h +++ b/kttsd/plugins/hadifix/hadifixconfigui.ui.h @@ -47,8 +47,8 @@ void HadifixConfigUI::frequencySlider_valueChanged (int sliderValue) { } void HadifixConfigUI::init () { - male = KGlobal::iconLoader()->loadIcon("male", KIcon::Small); - female = KGlobal::iconLoader()->loadIcon("female", KIcon::Small); + male = TDEGlobal::iconLoader()->loadIcon("male", KIcon::Small); + female = TDEGlobal::iconLoader()->loadIcon("female", KIcon::Small); } void HadifixConfigUI::addVoice (const TQString &filename, bool isMale) { diff --git a/kttsd/plugins/hadifix/hadifixproc.cpp b/kttsd/plugins/hadifix/hadifixproc.cpp index d7a7514..a217e1e 100644 --- a/kttsd/plugins/hadifix/hadifixproc.cpp +++ b/kttsd/plugins/hadifix/hadifixproc.cpp @@ -197,16 +197,16 @@ void HadifixProc::synth(TQString text, *(d->hadifixProc) << command; // Connect signals from process. - connect(d->hadifixProc, TQT_SIGNAL(processExited(KProcess *)), - this, TQT_SLOT(slotProcessExited(KProcess *))); - connect(d->hadifixProc, TQT_SIGNAL(wroteStdin(KProcess *)), - this, TQT_SLOT(slotWroteStdin(KProcess *))); + connect(d->hadifixProc, TQT_SIGNAL(processExited(TDEProcess *)), + this, TQT_SLOT(slotProcessExited(TDEProcess *))); + connect(d->hadifixProc, TQT_SIGNAL(wroteStdin(TDEProcess *)), + this, TQT_SLOT(slotWroteStdin(TDEProcess *))); // Store off name of wave file to be generated. d->synthFilename = waveFilename; // Set state, busy synthing. d->state = psSynthing; - if (!d->hadifixProc->start(KProcess::NotifyOnExit, KProcess::Stdin)) + if (!d->hadifixProc->start(TDEProcess::NotifyOnExit, TDEProcess::Stdin)) { kdDebug() << "HadifixProc::synth: start process failed." << endl; d->state = psIdle; @@ -316,7 +316,7 @@ bool HadifixProc::supportsAsync() { return true; } bool HadifixProc::supportsSynth() { return true; } -void HadifixProc::slotProcessExited(KProcess*) +void HadifixProc::slotProcessExited(TDEProcess*) { // kdDebug() << "HadifixProc:hadifixProcExited: Hadifix process has exited." << endl; pluginState prevState = d->state; @@ -332,7 +332,7 @@ void HadifixProc::slotProcessExited(KProcess*) } } -void HadifixProc::slotWroteStdin(KProcess*) +void HadifixProc::slotWroteStdin(TDEProcess*) { // kdDebug() << "HadifixProc::slotWroteStdin: closing Stdin" << endl; d->hadifixProc->closeStdin(); @@ -359,14 +359,14 @@ HadifixProc::VoiceGender HadifixProc::determineGender(TQString mbrola, TQString HadifixProc speech; KShellProcess proc; proc << command; - connect(&proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), - &speech, TQT_SLOT(receivedStdout(KProcess *, char *, int))); - connect(&proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), - &speech, TQT_SLOT(receivedStderr(KProcess *, char *, int))); + connect(&proc, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), + &speech, TQT_SLOT(receivedStdout(TDEProcess *, char *, int))); + connect(&proc, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), + &speech, TQT_SLOT(receivedStderr(TDEProcess *, char *, int))); speech.stdOut = TQString(); speech.stdErr = TQString(); - proc.start (KProcess::Block, KProcess::AllOutput); + proc.start (TDEProcess::Block, TDEProcess::AllOutput); VoiceGender result; if (!speech.stdErr.isNull() && !speech.stdErr.isEmpty()) { @@ -388,11 +388,11 @@ HadifixProc::VoiceGender HadifixProc::determineGender(TQString mbrola, TQString return result; } -void HadifixProc::receivedStdout (KProcess *, char *buffer, int buflen) { +void HadifixProc::receivedStdout (TDEProcess *, char *buffer, int buflen) { stdOut += TQString::fromLatin1(buffer, buflen); } -void HadifixProc::receivedStderr (KProcess *, char *buffer, int buflen) { +void HadifixProc::receivedStderr (TDEProcess *, char *buffer, int buflen) { stdErr += TQString::fromLatin1(buffer, buflen); } @@ -407,5 +407,5 @@ void HadifixProc::receivedStderr (KProcess *, char *buffer, int buflen) { */ TQString HadifixProc::getSsmlXsltFilename() { - return KGlobal::dirs()->resourceDirs("data").last() + "kttsd/hadifix/xslt/SSMLtoTxt2pho.xsl"; + return TDEGlobal::dirs()->resourceDirs("data").last() + "kttsd/hadifix/xslt/SSMLtoTxt2pho.xsl"; } diff --git a/kttsd/plugins/hadifix/hadifixproc.h b/kttsd/plugins/hadifix/hadifixproc.h index fb27824..98bdf42 100644 --- a/kttsd/plugins/hadifix/hadifixproc.h +++ b/kttsd/plugins/hadifix/hadifixproc.h @@ -22,7 +22,7 @@ #include -class KProcess; +class TDEProcess; class HadifixProcPrivate; class HadifixProc : public PlugInProc{ @@ -188,11 +188,11 @@ class HadifixProc : public PlugInProc{ virtual TQString getSsmlXsltFilename(); private slots: - void slotProcessExited(KProcess*); - void slotWroteStdin(KProcess*); + void slotProcessExited(TDEProcess*); + void slotWroteStdin(TDEProcess*); - void receivedStdout (KProcess *, char *buffer, int buflen); - void receivedStderr (KProcess *, char *buffer, int buflen); + void receivedStdout (TDEProcess *, char *buffer, int buflen); + void receivedStderr (TDEProcess *, char *buffer, int buflen); private: HadifixProcPrivate *d; -- cgit v1.2.1