summaryrefslogtreecommitdiffstats
path: root/kttsd/plugins/epos
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-17 22:17:08 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-17 22:17:08 +0000
commitf138d74fe16092003b06f5bde9663841929cde7f (patch)
treee9c497a0e59bc7d34264ac9404740d2ea76f3de4 /kttsd/plugins/epos
parent3a3c4b256baee79bdcfe72c5e01b9ded9b525900 (diff)
downloadtdeaccessibility-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/epos')
-rw-r--r--kttsd/plugins/epos/eposconf.cpp28
-rw-r--r--kttsd/plugins/epos/eposconf.h11
-rw-r--r--kttsd/plugins/epos/eposconfwidget.ui90
-rw-r--r--kttsd/plugins/epos/eposproc.cpp26
-rw-r--r--kttsd/plugins/epos/eposproc.h7
5 files changed, 82 insertions, 80 deletions
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 <math.h>
-// Qt includes.
+// TQt includes.
#include <tqfile.h>
#include <tqapplication.h>
#include <tqtextcodec.h>
@@ -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()
"<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(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 <tqstring.h>
// 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 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>EposConfWidget</class>
<author>Gary Cramblitt</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>EposConfWidget</cstring>
</property>
@@ -31,7 +31,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox" row="0" column="0">
+ <widget class="TQGroupBox" row="0" column="0">
<property name="name">
<cstring>eposConfigurationBox</cstring>
</property>
@@ -65,15 +65,15 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget" row="2" column="0">
+ <widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
- <cstring>layout13</cstring>
+ <cstring>tqlayout13</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>characterCodingLabel</cstring>
</property>
@@ -110,23 +110,23 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout17</cstring>
+ <cstring>tqlayout17</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout14</cstring>
+ <cstring>tqlayout14</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>timeLabel</cstring>
</property>
@@ -148,7 +148,7 @@
<string>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".</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>frequencyLabel</cstring>
</property>
@@ -172,9 +172,9 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout15</cstring>
+ <cstring>tqlayout15</cstring>
</property>
<vbox>
<property name="name">
@@ -244,15 +244,15 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout16</cstring>
+ <cstring>tqlayout16</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QSlider">
+ <widget class="TQSlider">
<property name="name">
<cstring>timeSlider</cstring>
</property>
@@ -281,7 +281,7 @@
<string>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".</string>
</property>
</widget>
- <widget class="QSlider">
+ <widget class="TQSlider">
<property name="name">
<cstring>frequencySlider</cstring>
</property>
@@ -314,23 +314,23 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout13</cstring>
+ <cstring>tqlayout13</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout11</cstring>
+ <cstring>tqlayout11</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>eposServerPathLabel</cstring>
</property>
@@ -345,7 +345,7 @@
<property name="text">
<string>Epos server executable path:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter</set>
</property>
<property name="buddy" stdset="0">
@@ -355,7 +355,7 @@
<string>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.</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>eposClientPathLabel</cstring>
</property>
@@ -370,7 +370,7 @@
<property name="text">
<string>Epos client executable path:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter</set>
</property>
<property name="buddy" stdset="0">
@@ -382,9 +382,9 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout12</cstring>
+ <cstring>tqlayout12</cstring>
</property>
<vbox>
<property name="name">
@@ -432,7 +432,7 @@
</widget>
</hbox>
</widget>
- <widget class="QGroupBox" row="3" column="0">
+ <widget class="TQGroupBox" row="3" column="0">
<property name="name">
<cstring>advancedGroupBox</cstring>
</property>
@@ -443,23 +443,23 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout14</cstring>
+ <cstring>tqlayout14</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
- <cstring>layout13</cstring>
+ <cstring>tqlayout13</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>eposServerOptions</cstring>
</property>
@@ -467,7 +467,7 @@
<string>Optional. Enter any server command line options here. To see available options, enter "epos -h" in a terminal. Do not use "-o".</string>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>eposClientOptions</cstring>
</property>
@@ -477,15 +477,15 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout12</cstring>
+ <cstring>tqlayout12</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>eposServerOptionsLabel</cstring>
</property>
@@ -500,7 +500,7 @@
<property name="text">
<string>Epos server:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignLeft</set>
</property>
<property name="buddy" stdset="0">
@@ -510,7 +510,7 @@
<string>Optional. Enter any server command line options here. To see available options, enter "epos -h" in a terminal. Do not use "-o".</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>eposClientOptionsLabel</cstring>
</property>
@@ -525,7 +525,7 @@
<property name="text">
<string>Epos client:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignLeft</set>
</property>
<property name="buddy" stdset="0">
@@ -541,9 +541,9 @@
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget" row="4" column="0">
+ <widget class="TQLayoutWidget" row="4" column="0">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
@@ -559,14 +559,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>eposTest</cstring>
</property>
@@ -595,7 +595,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>kcombobox.h</includehint>
<includehint>knuminput.h</includehint>
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 <math.h>
-// Qt includes.
+// TQt includes.
#include <tqstring.h>
#include <tqstringlist.h>
#include <tqtextcodec.h>
@@ -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 <tqstringlist.h>
#include <tqmutex.h>
@@ -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