diff options
Diffstat (limited to 'kttsd/plugins/freetts')
-rw-r--r-- | kttsd/plugins/freetts/freettsconf.cpp | 32 | ||||
-rw-r--r-- | kttsd/plugins/freetts/freettsconf.h | 9 | ||||
-rw-r--r-- | kttsd/plugins/freetts/freettsconfigwidget.ui | 24 | ||||
-rw-r--r-- | kttsd/plugins/freetts/freettsproc.cpp | 16 | ||||
-rw-r--r-- | kttsd/plugins/freetts/freettsproc.h | 5 |
5 files changed, 44 insertions, 42 deletions
diff --git a/kttsd/plugins/freetts/freettsconf.cpp b/kttsd/plugins/freetts/freettsconf.cpp index 05c1fab..1da6f44 100644 --- a/kttsd/plugins/freetts/freettsconf.cpp +++ b/kttsd/plugins/freetts/freettsconf.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -// Qt includes. +// TQt includes. #include <tqlayout.h> #include <tqlabel.h> #include <tqstring.h> @@ -40,18 +40,18 @@ #include "freettsconfigwidget.h" /** Constructor */ -FreeTTSConf::FreeTTSConf( TQWidget* parent, const char* name, const TQStringList&/*args*/) : - PlugInConf( parent, name ) { +FreeTTSConf::FreeTTSConf( TQWidget* tqparent, const char* name, const TQStringList&/*args*/) : + PlugInConf( tqparent, name ) { // kdDebug() << "FreeTTSConf::FreeTTSConf: Running" << endl; m_freettsProc = 0; m_progressDlg = 0; - TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "FreeTTSConfigWidgetLayout"); - layout->setAlignment (Qt::AlignTop); + tqlayout->tqsetAlignment (TQt::AlignTop); m_widget = new FreeTTSConfWidget(this, "FreeTTSConfigWidget"); - layout->addWidget(m_widget); + tqlayout->addWidget(m_widget); defaults(); @@ -72,11 +72,11 @@ void FreeTTSConf::load(KConfig *config, const TQString &configGroup) { // kdDebug() << "FreeTTSConf::load: Running" << endl; config->setGroup(configGroup); - TQString freeTTSJar = config->readEntry("FreeTTSJarPath", TQString::null); + TQString freeTTSJar = config->readEntry("FreeTTSJarPath", TQString()); if (freeTTSJar.isEmpty()) { config->setGroup("FreeTTS"); - freeTTSJar = config->readEntry("FreeTTSJarPath", TQString::null); + freeTTSJar = config->readEntry("FreeTTSJarPath", TQString()); } if (freeTTSJar.isEmpty()) freeTTSJar = getLocation("freetts.jar"); @@ -119,15 +119,15 @@ TQString FreeTTSConf::getTalkerCode() "<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />" "<prosody volume=\"%4\" rate=\"%5\" />" "<kttsd synthesizer=\"%6\" />") - .arg(m_languageCode) - .arg("fixed") - .arg("neutral") - .arg("medium") - .arg("medium") - .arg("FreeTTS"); + .tqarg(m_languageCode) + .tqarg("fixed") + .tqarg("neutral") + .tqarg("medium") + .tqarg("medium") + .tqarg("FreeTTS"); } } - return TQString::null; + return TQString(); } // TQString FreeTTSConf::getLocation(const TQString &name) { @@ -216,7 +216,7 @@ void FreeTTSConf::slotSynthFinished() // Player object deletes the wave file when done. if (m_player) m_player->play(m_waveFile); TQFile::remove(m_waveFile); - m_waveFile = TQString::null; + m_waveFile = TQString(); if (m_progressDlg) m_progressDlg->close(); } diff --git a/kttsd/plugins/freetts/freettsconf.h b/kttsd/plugins/freetts/freettsconf.h index cc39b59..62e2e7a 100644 --- a/kttsd/plugins/freetts/freettsconf.h +++ b/kttsd/plugins/freetts/freettsconf.h @@ -32,11 +32,12 @@ class TQStringList; class KProgressDialog; class FreeTTSConf : public PlugInConf { - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: /** Constructor */ - FreeTTSConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + FreeTTSConf( TQWidget* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); /** Destructor */ ~FreeTTSConf(); @@ -65,7 +66,7 @@ class FreeTTSConf : 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 TQString::null, no specific language has + * If the passed-in code is TQString(), no specific language has * been chosen. * @param lang The desired language code or Null if none. * @@ -83,7 +84,7 @@ class FreeTTSConf : public PlugInConf { * 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 TQString::null. + * i.e., cannot yet synthesize, return TQString(). * @return Fully-specified talker code. */ TQString getTalkerCode(); diff --git a/kttsd/plugins/freetts/freettsconfigwidget.ui b/kttsd/plugins/freetts/freettsconfigwidget.ui index 1d95751..7952692 100644 --- a/kttsd/plugins/freetts/freettsconfigwidget.ui +++ b/kttsd/plugins/freetts/freettsconfigwidget.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>FreeTTSConfWidget</class> <author>Gary Cramblitt <garycramblitt@comcast.net></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>FreeTTSConfWidget</cstring> </property> @@ -38,14 +38,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>freettsConfigurationBox</cstring> </property> @@ -76,7 +76,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> <cstring>voicesPathBox</cstring> </property> @@ -90,7 +90,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>freettsPathLabel</cstring> </property> @@ -108,7 +108,7 @@ <property name="textFormat"> <enum>AutoText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -130,7 +130,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> <cstring>selectVoiceBox</cstring> </property> @@ -146,9 +146,9 @@ </property> </hbox> </widget> - <widget class="QLayoutWidget" row="3" column="0"> + <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <hbox> <property name="name"> @@ -164,14 +164,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>410</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>freettsTest</cstring> </property> @@ -191,7 +191,7 @@ <include location="global" impldecl="in declaration">kurlrequester.h</include> <include location="global" impldecl="in implementation">kurlrequester.h</include> </includes> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kttsd/plugins/freetts/freettsproc.cpp b/kttsd/plugins/freetts/freettsproc.cpp index 9c038af..c3de342 100644 --- a/kttsd/plugins/freetts/freettsproc.cpp +++ b/kttsd/plugins/freetts/freettsproc.cpp @@ -27,8 +27,8 @@ #include "freettsproc.h" /** Constructor */ -FreeTTSProc::FreeTTSProc( TQObject* parent, const char* name, const TQStringList& /*args*/) : - PlugInProc( parent, name ) { +FreeTTSProc::FreeTTSProc( TQObject* tqparent, const char* name, const TQStringList& /*args*/) : + PlugInProc( tqparent, name ) { kdDebug() << "Running: FreeTTSProc::FreeTTSProc" << endl; m_state = psIdle; m_waitingStop = false; @@ -61,7 +61,7 @@ bool FreeTTSProc::init(KConfig *config, const TQString &configGroup) { * If the plugin supports asynchronous operation, it should return immediately. */ void FreeTTSProc::sayText(const TQString &text) { - synth(text, TQString::null, m_freettsJarPath); + synth(text, TQString(), m_freettsJarPath); } /** @@ -80,7 +80,7 @@ void FreeTTSProc::synthText(const TQString& text, const TQString& suggestedFilen } // A little helper function because KDE 3.2 kdDebug() does not support TQValueList<TQCString>. -TQStringList argsToQStringList(const TQValueList<TQCString> list) +TQStringList argsToTQStringList(const TQValueList<TQCString> list) { TQStringList newList; TQValueList<TQCString>::ConstIterator it = list.begin(); @@ -143,7 +143,7 @@ void FreeTTSProc::synth( if (!m_freettsProc->start(KProcess::NotifyOnExit, KProcess::All)) { kdDebug() << "FreeTTSProc::synth: Error starting FreeTTS process. Is freetts.jar in the PATH?" << endl; m_state = psIdle; - kdDebug() << "KProcess args: " << argsToQStringList(m_freettsProc->args()) << endl; + kdDebug() << "KProcess args: " << argsToTQStringList(m_freettsProc->args()) << endl; return; } kdDebug()<< "FreeTTSProc:synth: FreeTTS initialized" << endl; @@ -206,12 +206,12 @@ void FreeTTSProc::slotProcessExited(KProcess*) { } void FreeTTSProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) { - TQString buf = TQString::fromLatin1(buffer, buflen); + TQString buf = TQString::tqfromLatin1(buffer, buflen); kdDebug() << "FreeTTSProc::slotReceivedStdout: Received output from FreeTTS: " << buf << endl; } void FreeTTSProc::slotReceivedStderr(KProcess*, char* buffer, int buflen) { - TQString buf = TQString::fromLatin1(buffer, buflen); + TQString buf = TQString::tqfromLatin1(buffer, buflen); kdDebug() << "FreeTTSProc::slotReceivedStderr: Received error from FreeTTS: " << buf << endl; } @@ -242,7 +242,7 @@ pluginState FreeTTSProc::getState() { void FreeTTSProc::ackFinished() { if (m_state == psFinished) { m_state = psIdle; - m_synthFilename = TQString::null; + m_synthFilename = TQString(); } } diff --git a/kttsd/plugins/freetts/freettsproc.h b/kttsd/plugins/freetts/freettsproc.h index 7dbc3b5..15ad5f5 100644 --- a/kttsd/plugins/freetts/freettsproc.h +++ b/kttsd/plugins/freetts/freettsproc.h @@ -27,13 +27,14 @@ class KProcess; class FreeTTSProc : public PlugInProc{ - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: /** * Constructor */ - FreeTTSProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + FreeTTSProc( TQObject* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); /** * Destructor |