From f138d74fe16092003b06f5bde9663841929cde7f Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 17 Jun 2011 22:17:08 +0000 Subject: 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 --- kttsd/plugins/epos/eposconf.cpp | 28 +++++------ kttsd/plugins/epos/eposconf.h | 11 +++-- kttsd/plugins/epos/eposconfwidget.ui | 90 ++++++++++++++++++------------------ kttsd/plugins/epos/eposproc.cpp | 26 +++++------ kttsd/plugins/epos/eposproc.h | 7 +-- 5 files changed, 82 insertions(+), 80 deletions(-) (limited to 'kttsd/plugins/epos') diff --git a/kttsd/plugins/epos/eposconf.cpp b/kttsd/plugins/epos/eposconf.cpp index 8b5ccf0..b3cd27d 100644 --- a/kttsd/plugins/epos/eposconf.cpp +++ b/kttsd/plugins/epos/eposconf.cpp @@ -24,7 +24,7 @@ // C++ includes. #include -// Qt includes. +// TQt includes. #include #include #include @@ -48,18 +48,18 @@ #include "eposconf.moc" /** Constructor */ -EposConf::EposConf( TQWidget* parent, const char* name, const TQStringList& /*args*/) : - PlugInConf(parent, name) +EposConf::EposConf( TQWidget* tqparent, const char* name, const TQStringList& /*args*/) : + PlugInConf(tqparent, name) { // kdDebug() << "EposConf::EposConf: Running" << endl; m_eposProc = 0; m_progressDlg = 0; - TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "EposConfigWidgetLayout"); - layout->setAlignment (Qt::AlignTop); + tqlayout->tqsetAlignment (TQt::AlignTop); m_widget = new EposConfWidget(this, "EposConfigWidget"); - layout->addWidget(m_widget); + tqlayout->addWidget(m_widget); // Build codec list and fill combobox. m_codecList = PlugInProc::buildCodecList(); @@ -194,15 +194,15 @@ TQString EposConf::getTalkerCode() "" "" "") - .arg(m_languageCode) - .arg("fixed") - .arg("neutral") - .arg("medium") - .arg(rate) - .arg("Epos TTS Synthesis System"); + .tqarg(m_languageCode) + .tqarg("fixed") + .tqarg("neutral") + .tqarg("medium") + .tqarg(rate) + .tqarg("Epos TTS Synthesis System"); } } - return TQString::null; + return TQString(); } void EposConf::slotEposTest_clicked() @@ -275,7 +275,7 @@ void EposConf::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/epos/eposconf.h b/kttsd/plugins/epos/eposconf.h index 08cb611..667d445 100644 --- a/kttsd/plugins/epos/eposconf.h +++ b/kttsd/plugins/epos/eposconf.h @@ -24,7 +24,7 @@ #ifndef _EPOSCONF_H_ #define _EPOSCONF_H_ -// Qt includes. +// TQt includes. #include // KDE includes. @@ -42,11 +42,12 @@ class EposProc; class KProgressDialog; class EposConf : public PlugInConf { - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: /** Constructor */ - EposConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + EposConf( TQWidget* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); /** Destructor */ ~EposConf(); @@ -78,7 +79,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 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. * @@ -96,7 +97,7 @@ class EposConf : 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/epos/eposconfwidget.ui b/kttsd/plugins/epos/eposconfwidget.ui index 23e47da..3cc032e 100644 --- a/kttsd/plugins/epos/eposconfwidget.ui +++ b/kttsd/plugins/epos/eposconfwidget.ui @@ -1,7 +1,7 @@ EposConfWidget Gary Cramblitt - + EposConfWidget @@ -31,7 +31,7 @@ unnamed - + eposConfigurationBox @@ -65,15 +65,15 @@ 6 - + - layout13 + tqlayout13 unnamed - + characterCodingLabel @@ -110,23 +110,23 @@ - + - layout17 + tqlayout17 unnamed - + - layout14 + tqlayout14 unnamed - + timeLabel @@ -148,7 +148,7 @@ Sets the speed of speech. Slide the slider to the left to slow speech down; to the right to increase talking speed. Anything less than 75 percent is considered "slow", and anything greater than 125 percent is considered "fast". - + frequencyLabel @@ -172,9 +172,9 @@ - + - layout15 + tqlayout15 @@ -244,15 +244,15 @@ - + - layout16 + tqlayout16 unnamed - + timeSlider @@ -281,7 +281,7 @@ Sets the speed of speech. Slide the slider to the left to slow speech down; to the right to increase talking speed. Anything less than 75 percent is considered "slow", and anything greater than 125 percent is considered "fast". - + frequencySlider @@ -314,23 +314,23 @@ - + - layout13 + tqlayout13 unnamed - + - layout11 + tqlayout11 unnamed - + eposServerPathLabel @@ -345,7 +345,7 @@ Epos server executable path: - + AlignVCenter @@ -355,7 +355,7 @@ If the Epos server program will be found due to your PATH environment variable, simply enter "epos", otherwise enter the full path to the Epos server executable program. - + eposClientPathLabel @@ -370,7 +370,7 @@ Epos client executable path: - + AlignVCenter @@ -382,9 +382,9 @@ - + - layout12 + tqlayout12 @@ -432,7 +432,7 @@ - + advancedGroupBox @@ -443,23 +443,23 @@ unnamed - + - layout14 + tqlayout14 unnamed - + - layout13 + tqlayout13 unnamed - + eposServerOptions @@ -467,7 +467,7 @@ Optional. Enter any server command line options here. To see available options, enter "epos -h" in a terminal. Do not use "-o". - + eposClientOptions @@ -477,15 +477,15 @@ - + - layout12 + tqlayout12 unnamed - + eposServerOptionsLabel @@ -500,7 +500,7 @@ Epos server: - + AlignVCenter|AlignLeft @@ -510,7 +510,7 @@ Optional. Enter any server command line options here. To see available options, enter "epos -h" in a terminal. Do not use "-o". - + eposClientOptionsLabel @@ -525,7 +525,7 @@ Epos client: - + AlignVCenter|AlignLeft @@ -541,9 +541,9 @@ - + - layout5 + tqlayout5 @@ -559,14 +559,14 @@ Expanding - + 410 20 - + eposTest @@ -595,7 +595,7 @@ kurlrequester.h kurlrequester.h - + kcombobox.h knuminput.h diff --git a/kttsd/plugins/epos/eposproc.cpp b/kttsd/plugins/epos/eposproc.cpp index e5fd664..ae7973c 100644 --- a/kttsd/plugins/epos/eposproc.cpp +++ b/kttsd/plugins/epos/eposproc.cpp @@ -25,7 +25,7 @@ // C++ includes. #include -// Qt includes. +// TQt includes. #include #include #include @@ -43,8 +43,8 @@ #include "eposproc.moc" /** Constructor */ -EposProc::EposProc( TQObject* parent, const char* name, const TQStringList& ) : - PlugInProc( parent, name ){ +EposProc::EposProc( TQObject* tqparent, const char* name, const TQStringList& ) : + PlugInProc( tqparent, name ){ kdDebug() << "EposProc::EposProc: Running" << endl; m_state = psIdle; m_waitingStop = false; @@ -72,11 +72,11 @@ bool EposProc::init(KConfig* config, const TQString& configGroup) config->setGroup(configGroup); m_eposServerExePath = config->readEntry("EposServerExePath", "epos"); m_eposClientExePath = config->readEntry("EposClientExePath", "say"); - m_eposLanguage = config->readEntry("Language", TQString::null); + m_eposLanguage = config->readEntry("Language", TQString()); m_time = config->readNumEntry("time", 100); m_pitch = config->readNumEntry("pitch", 100); - m_eposServerOptions = config->readEntry("EposServerOptions", TQString::null); - m_eposClientOptions = config->readEntry("EposClientOptions", TQString::null); + m_eposServerOptions = config->readEntry("EposServerOptions", TQString()); + m_eposClientOptions = config->readEntry("EposClientOptions", TQString()); kdDebug() << "EposProc::init: path to epos server: " << m_eposServerExePath << endl; kdDebug() << "EposProc::init: path to epos client: " << m_eposClientExePath << endl; @@ -109,7 +109,7 @@ bool EposProc::init(KConfig* config, const TQString& configGroup) */ void EposProc::sayText(const TQString &text) { - synth(text, TQString::null, m_eposServerExePath, m_eposClientExePath, + synth(text, TQString(), m_eposServerExePath, m_eposClientExePath, m_eposServerOptions, m_eposClientOptions, m_codec, m_eposLanguage, m_time, m_pitch); } @@ -210,7 +210,7 @@ void EposProc::synth( *m_eposProc << eposClientExePath; // Language. if (!eposLanguage.isEmpty()) - *m_eposProc << TQString("--language=%1").arg(eposLanguage); + *m_eposProc << TQString("--language=%1").tqarg(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; - TQString timeMsg = TQString("--init_t=%1").arg(stretchValue, 0, 'f', 3); + TQString timeMsg = TQString("--init_t=%1").tqarg(stretchValue, 0, 'f', 3); *m_eposProc << timeMsg; // Pitch. Map 50% to 200% onto 50 to 200. easy. - TQString pitchMsg = TQString("--init_f=%1").arg(pitch); + TQString pitchMsg = TQString("--init_f=%1").tqarg(pitch); *m_eposProc << pitchMsg; // Output file. if (!suggestedFilename.isEmpty()) @@ -326,13 +326,13 @@ void EposProc::slotProcessExited(KProcess*) void EposProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) { - TQString buf = TQString::fromLatin1(buffer, buflen); + TQString buf = TQString::tqfromLatin1(buffer, buflen); kdDebug() << "EposProc::slotReceivedStdout: Received output from Epos: " << buf << endl; } void EposProc::slotReceivedStderr(KProcess*, char* buffer, int buflen) { - TQString buf = TQString::fromLatin1(buffer, buflen); + TQString buf = TQString::tqfromLatin1(buffer, buflen); kdDebug() << "EposProc::slotReceivedStderr: Received error from Epos: " << buf << endl; } @@ -365,7 +365,7 @@ void EposProc::ackFinished() if (m_state == psFinished) { m_state = psIdle; - m_synthFilename = TQString::null; + m_synthFilename = TQString(); } } diff --git a/kttsd/plugins/epos/eposproc.h b/kttsd/plugins/epos/eposproc.h index b12783a..0689481 100644 --- a/kttsd/plugins/epos/eposproc.h +++ b/kttsd/plugins/epos/eposproc.h @@ -25,7 +25,7 @@ #ifndef _EPOSPROC_H_ #define _EPOSPROC_H_ -// Qt includes. +// TQt includes. #include #include @@ -36,13 +36,14 @@ class KProcess; class TQTextCodec; class EposProc : public PlugInProc{ - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: /** * Constructor */ - EposProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + EposProc( TQObject* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); /** * Destructor -- cgit v1.2.1