diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-17 22:17:08 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-17 22:17:08 +0000 |
commit | f138d74fe16092003b06f5bde9663841929cde7f (patch) | |
tree | e9c497a0e59bc7d34264ac9404740d2ea76f3de4 /kttsd/plugins/flite | |
parent | 3a3c4b256baee79bdcfe72c5e01b9ded9b525900 (diff) | |
download | tdeaccessibility-f138d74fe16092003b06f5bde9663841929cde7f.tar.gz tdeaccessibility-f138d74fe16092003b06f5bde9663841929cde7f.zip |
TQt4 port kdeaccessibility
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaccessibility@1237325 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kttsd/plugins/flite')
-rw-r--r-- | kttsd/plugins/flite/fliteconf.cpp | 30 | ||||
-rw-r--r-- | kttsd/plugins/flite/fliteconf.h | 11 | ||||
-rw-r--r-- | kttsd/plugins/flite/fliteconfwidget.ui | 18 | ||||
-rw-r--r-- | kttsd/plugins/flite/fliteproc.cpp | 22 | ||||
-rw-r--r-- | kttsd/plugins/flite/fliteproc.h | 7 |
5 files changed, 45 insertions, 43 deletions
diff --git a/kttsd/plugins/flite/fliteconf.cpp b/kttsd/plugins/flite/fliteconf.cpp index 0dfb6d1..060e45c 100644 --- a/kttsd/plugins/flite/fliteconf.cpp +++ b/kttsd/plugins/flite/fliteconf.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -// Qt includes. +// TQt includes. #include <tqlayout.h> #include <tqfile.h> #include <tqapplication.h> @@ -42,18 +42,18 @@ #include "fliteconf.moc" /** Constructor */ -FliteConf::FliteConf( TQWidget* parent, const char* name, const TQStringList& /*args*/) : - PlugInConf(parent, name) +FliteConf::FliteConf( TQWidget* tqparent, const char* name, const TQStringList& /*args*/) : + PlugInConf(tqparent, name) { // kdDebug() << "FliteConf::FliteConf: Running" << endl; m_fliteProc = 0; m_progressDlg = 0; - TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "FliteConfigWidgetLayout"); - layout->setAlignment (Qt::AlignTop); + tqlayout->tqsetAlignment (TQt::AlignTop); m_widget = new FliteConfWidget(this, "FliteConfigWidget"); - layout->addWidget(m_widget); + tqlayout->addWidget(m_widget); defaults(); @@ -74,7 +74,7 @@ void FliteConf::load(KConfig *config, const TQString &configGroup){ // kdDebug() << "FliteConf::load: Loading configuration for language " << langGroup << " with plug in " << "Festival Lite (flite)" << endl; config->setGroup(configGroup); - TQString fliteExe = config->readEntry("FliteExePath", TQString::null); + TQString fliteExe = config->readEntry("FliteExePath", TQString()); if (fliteExe.isEmpty()) { config->setGroup("Flite"); @@ -115,15 +115,15 @@ TQString FliteConf::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("Festival Lite (flite)"); + .tqarg(m_languageCode) + .tqarg("fixed") + .tqarg("neutral") + .tqarg("medium") + .tqarg("medium") + .tqarg("Festival Lite (flite)"); } } - return TQString::null; + return TQString(); } void FliteConf::slotFliteTest_clicked() @@ -187,7 +187,7 @@ void FliteConf::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/flite/fliteconf.h b/kttsd/plugins/flite/fliteconf.h index 6d5ff06..75e3b89 100644 --- a/kttsd/plugins/flite/fliteconf.h +++ b/kttsd/plugins/flite/fliteconf.h @@ -24,7 +24,7 @@ #ifndef _FLITECONF_H_ #define _FLITECONF_H_ -// Qt includes. +// TQt includes. #include <tqstring.h> // KDE includes. @@ -41,11 +41,12 @@ class FliteProc; class KProgressDialog; class FliteConf : public PlugInConf { - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: /** Constructor */ - FliteConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + FliteConf( TQWidget* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); /** Destructor */ ~FliteConf(); @@ -77,7 +78,7 @@ class FliteConf : 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. * @@ -95,7 +96,7 @@ class FliteConf : 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/flite/fliteconfwidget.ui b/kttsd/plugins/flite/fliteconfwidget.ui index 839970e..1e8e0be 100644 --- a/kttsd/plugins/flite/fliteconfwidget.ui +++ b/kttsd/plugins/flite/fliteconfwidget.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>FliteConfWidget</class> <author>Gary Cramblitt</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>FliteConfWidget</cstring> </property> @@ -41,14 +41,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>100</height> </size> </property> </spacer> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>fliteConfigurationBox</cstring> </property> @@ -82,7 +82,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>flitePathBox</cstring> </property> @@ -96,7 +96,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>flitePathLabel</cstring> </property> @@ -111,7 +111,7 @@ <property name="text"> <string>&Flite executable path:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -142,7 +142,7 @@ </widget> </hbox> </widget> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>fliteTest</cstring> </property> @@ -160,7 +160,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>221</width> <height>20</height> @@ -177,7 +177,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/flite/fliteproc.cpp b/kttsd/plugins/flite/fliteproc.cpp index 55cb0fa..b71efef 100644 --- a/kttsd/plugins/flite/fliteproc.cpp +++ b/kttsd/plugins/flite/fliteproc.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -// Qt includes. +// TQt includes. #include <tqstring.h> #include <tqstringlist.h> @@ -36,8 +36,8 @@ #include "fliteproc.moc" /** Constructor */ -FliteProc::FliteProc( TQObject* parent, const char* name, const TQStringList& ) : - PlugInProc( parent, name ){ +FliteProc::FliteProc( TQObject* tqparent, const char* name, const TQStringList& ) : + PlugInProc( tqparent, name ){ kdDebug() << "FliteProc::FliteProc: Running" << endl; m_state = psIdle; m_waitingStop = false; @@ -73,7 +73,7 @@ bool FliteProc::init(KConfig* config, const TQString& configGroup){ */ void FliteProc::sayText(const TQString &text) { - synth(text, TQString::null, m_fliteExePath); + synth(text, TQString(), m_fliteExePath); } /** @@ -129,11 +129,11 @@ void FliteProc::synth( // Encode quotation characters. TQString saidText = text; /* - saidText.replace("\\\"", "#!#!"); - saidText.replace("\"", "\\\""); - saidText.replace("#!#!", "\\\""); + saidText.tqreplace("\\\"", "#!#!"); + saidText.tqreplace("\"", "\\\""); + saidText.tqreplace("#!#!", "\\\""); // Remove certain comment characters. - saidText.replace("--", ""); + saidText.tqreplace("--", ""); saidText = "\"" + saidText + "\""; */ saidText += "\n"; @@ -218,13 +218,13 @@ void FliteProc::slotProcessExited(KProcess*) void FliteProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) { - TQString buf = TQString::fromLatin1(buffer, buflen); + TQString buf = TQString::tqfromLatin1(buffer, buflen); kdDebug() << "FliteProc::slotReceivedStdout: Received output from Flite: " << buf << endl; } void FliteProc::slotReceivedStderr(KProcess*, char* buffer, int buflen) { - TQString buf = TQString::fromLatin1(buffer, buflen); + TQString buf = TQString::tqfromLatin1(buffer, buflen); kdDebug() << "FliteProc::slotReceivedStderr: Received error from Flite: " << buf << endl; } @@ -256,7 +256,7 @@ void FliteProc::ackFinished() if (m_state == psFinished) { m_state = psIdle; - m_synthFilename = TQString::null; + m_synthFilename = TQString(); } } diff --git a/kttsd/plugins/flite/fliteproc.h b/kttsd/plugins/flite/fliteproc.h index a956d5c..6b44e45 100644 --- a/kttsd/plugins/flite/fliteproc.h +++ b/kttsd/plugins/flite/fliteproc.h @@ -24,7 +24,7 @@ #ifndef _FLITEPROC_H_ #define _FLITEPROC_H_ -// Qt includes. +// TQt includes. #include <tqstringlist.h> #include <tqmutex.h> @@ -34,13 +34,14 @@ class KProcess; class FliteProc : public PlugInProc{ - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: /** * Constructor */ - FliteProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + FliteProc( TQObject* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); /** * Destructor |