summaryrefslogtreecommitdiffstats
path: root/kttsd
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:20:30 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:20:30 +0000
commit28bf3cbba4139c8a0f81dc9d1a2f6c4ed724f22c (patch)
treea2f011f22aa31d0839c6e2118501b7a6d2f2ae96 /kttsd
parent0285229d858c8f03cde7354c679a752598cf4515 (diff)
downloadtdeaccessibility-28bf3cbba4139c8a0f81dc9d1a2f6c4ed724f22c.tar.gz
tdeaccessibility-28bf3cbba4139c8a0f81dc9d1a2f6c4ed724f22c.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaccessibility@1157633 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kttsd')
-rw-r--r--kttsd/app-plugins/kate/katekttsd.cpp36
-rw-r--r--kttsd/app-plugins/kate/katekttsd.h10
-rw-r--r--kttsd/compat/interfaces/kspeech/kspeech.h102
-rw-r--r--kttsd/compat/interfaces/kspeech/kspeechsink.h22
-rw-r--r--kttsd/filters/main.cpp20
-rw-r--r--kttsd/filters/sbd/sbdconf.cpp124
-rw-r--r--kttsd/filters/sbd/sbdconf.h12
-rw-r--r--kttsd/filters/sbd/sbdproc.cpp214
-rw-r--r--kttsd/filters/sbd/sbdproc.h118
-rw-r--r--kttsd/filters/stringreplacer/stringreplacerconf.cpp282
-rw-r--r--kttsd/filters/stringreplacer/stringreplacerconf.h18
-rw-r--r--kttsd/filters/stringreplacer/stringreplacerproc.cpp60
-rw-r--r--kttsd/filters/stringreplacer/stringreplacerproc.h26
-rw-r--r--kttsd/filters/talkerchooser/talkerchooserconf.cpp84
-rw-r--r--kttsd/filters/talkerchooser/talkerchooserconf.h10
-rw-r--r--kttsd/filters/talkerchooser/talkerchooserproc.cpp16
-rw-r--r--kttsd/filters/talkerchooser/talkerchooserproc.h10
-rw-r--r--kttsd/filters/xhtml2ssml/main.cpp16
-rw-r--r--kttsd/filters/xhtml2ssml/xhtml2ssml.cpp34
-rw-r--r--kttsd/filters/xhtml2ssml/xhtml2ssml.h20
-rw-r--r--kttsd/filters/xhtml2ssml/xmlelement.cpp28
-rw-r--r--kttsd/filters/xhtml2ssml/xmlelement.h34
-rw-r--r--kttsd/filters/xmltransformer/xmltransformerconf.cpp50
-rw-r--r--kttsd/filters/xmltransformer/xmltransformerconf.h10
-rw-r--r--kttsd/filters/xmltransformer/xmltransformerproc.cpp58
-rw-r--r--kttsd/filters/xmltransformer/xmltransformerproc.h32
-rw-r--r--kttsd/kcmkttsmgr/addtalker.cpp76
-rw-r--r--kttsd/kcmkttsmgr/addtalker.h26
-rw-r--r--kttsd/kcmkttsmgr/kcmkttsmgr.cpp700
-rw-r--r--kttsd/kcmkttsmgr/kcmkttsmgr.h58
-rw-r--r--kttsd/kcmkttsmgr/selectevent.cpp54
-rw-r--r--kttsd/kcmkttsmgr/selectevent.h12
-rw-r--r--kttsd/kttsd/filtermgr.cpp74
-rw-r--r--kttsd/kttsd/filtermgr.h30
-rw-r--r--kttsd/kttsd/kttsd.cpp224
-rw-r--r--kttsd/kttsd/kttsd.h132
-rw-r--r--kttsd/kttsd/speaker.cpp156
-rw-r--r--kttsd/kttsd/speaker.h52
-rw-r--r--kttsd/kttsd/speechdata.cpp180
-rw-r--r--kttsd/kttsd/speechdata.h128
-rw-r--r--kttsd/kttsd/ssmlconvert.cpp68
-rw-r--r--kttsd/kttsd/ssmlconvert.h30
-rw-r--r--kttsd/kttsd/talkermgr.cpp72
-rw-r--r--kttsd/kttsd/talkermgr.h36
-rw-r--r--kttsd/kttsd/threadedplugin.cpp24
-rw-r--r--kttsd/kttsd/threadedplugin.h28
-rw-r--r--kttsd/kttsjobmgr/kttsjobmgr.cpp382
-rw-r--r--kttsd/kttsjobmgr/kttsjobmgr.h44
-rw-r--r--kttsd/kttsmgr/kttsmgr.cpp56
-rw-r--r--kttsd/kttsmgr/kttsmgr.h20
-rw-r--r--kttsd/libkttsd/filterconf.cpp38
-rw-r--r--kttsd/libkttsd/filterconf.h18
-rw-r--r--kttsd/libkttsd/filterproc.cpp18
-rw-r--r--kttsd/libkttsd/filterproc.h18
-rw-r--r--kttsd/libkttsd/notify.cpp62
-rw-r--r--kttsd/libkttsd/notify.h20
-rw-r--r--kttsd/libkttsd/player.h16
-rw-r--r--kttsd/libkttsd/pluginconf.cpp76
-rw-r--r--kttsd/libkttsd/pluginconf.h36
-rw-r--r--kttsd/libkttsd/pluginproc.cpp72
-rw-r--r--kttsd/libkttsd/pluginproc.h40
-rw-r--r--kttsd/libkttsd/selecttalkerdlg.cpp146
-rw-r--r--kttsd/libkttsd/selecttalkerdlg.h14
-rw-r--r--kttsd/libkttsd/stretcher.cpp14
-rw-r--r--kttsd/libkttsd/stretcher.h8
-rw-r--r--kttsd/libkttsd/talkercode.cpp112
-rw-r--r--kttsd/libkttsd/talkercode.h90
-rw-r--r--kttsd/libkttsd/testplayer.cpp28
-rw-r--r--kttsd/libkttsd/testplayer.h12
-rw-r--r--kttsd/libkttsd/utils.cpp20
-rw-r--r--kttsd/libkttsd/utils.h12
-rw-r--r--kttsd/players/akodeplayer/akodeplayer.cpp16
-rw-r--r--kttsd/players/akodeplayer/akodeplayer.h12
-rw-r--r--kttsd/players/alsaplayer/alsaplayer.cpp74
-rw-r--r--kttsd/players/alsaplayer/alsaplayer.h32
-rw-r--r--kttsd/players/artsplayer/artsplayer.cpp12
-rw-r--r--kttsd/players/artsplayer/artsplayer.h8
-rw-r--r--kttsd/players/gstplayer/gstreamerplayer.cpp22
-rw-r--r--kttsd/players/gstplayer/gstreamerplayer.h12
-rw-r--r--kttsd/plugins/command/commandconf.cpp70
-rw-r--r--kttsd/plugins/command/commandconf.h24
-rw-r--r--kttsd/plugins/command/commandproc.cpp92
-rw-r--r--kttsd/plugins/command/commandproc.h30
-rw-r--r--kttsd/plugins/epos/eposconf.cpp108
-rw-r--r--kttsd/plugins/epos/eposconf.h24
-rw-r--r--kttsd/plugins/epos/eposproc.cpp98
-rw-r--r--kttsd/plugins/epos/eposproc.h46
-rw-r--r--kttsd/plugins/festivalint/festivalintconf.cpp218
-rw-r--r--kttsd/plugins/festivalint/festivalintconf.h48
-rw-r--r--kttsd/plugins/festivalint/festivalintproc.cpp100
-rw-r--r--kttsd/plugins/festivalint/festivalintproc.h50
-rw-r--r--kttsd/plugins/flite/fliteconf.cpp52
-rw-r--r--kttsd/plugins/flite/fliteconf.h20
-rw-r--r--kttsd/plugins/flite/fliteproc.cpp50
-rw-r--r--kttsd/plugins/flite/fliteproc.h24
-rw-r--r--kttsd/plugins/freetts/freettsconf.cpp72
-rw-r--r--kttsd/plugins/freetts/freettsconf.h24
-rw-r--r--kttsd/plugins/freetts/freettsproc.cpp60
-rw-r--r--kttsd/plugins/freetts/freettsproc.h24
-rw-r--r--kttsd/plugins/hadifix/hadifixconf.cpp128
-rw-r--r--kttsd/plugins/hadifix/hadifixconf.h16
-rw-r--r--kttsd/plugins/hadifix/hadifixconfigui.ui.h14
-rw-r--r--kttsd/plugins/hadifix/hadifixproc.cpp94
-rw-r--r--kttsd/plugins/hadifix/hadifixproc.h32
-rw-r--r--kttsd/plugins/hadifix/initialconfig.h86
-rw-r--r--kttsd/plugins/hadifix/voicefileui.ui.h2
106 files changed, 3386 insertions, 3386 deletions
diff --git a/kttsd/app-plugins/kate/katekttsd.cpp b/kttsd/app-plugins/kate/katekttsd.cpp
index a2e64e6..47837fb 100644
--- a/kttsd/app-plugins/kate/katekttsd.cpp
+++ b/kttsd/app-plugins/kate/katekttsd.cpp
@@ -18,9 +18,9 @@
***************************************************************************/
// Qt includes.
-#include <qmessagebox.h>
+#include <tqmessagebox.h>
#include <dcopclient.h>
-#include <qtimer.h>
+#include <tqtimer.h>
// KDE includes.
#include <ktexteditor/editinterface.h>
@@ -38,7 +38,7 @@
K_EXPORT_COMPONENT_FACTORY( ktexteditor_kttsd, KGenericFactory<KateKttsdPlugin>( "ktexteditor_kttsd" ) )
-KateKttsdPlugin::KateKttsdPlugin( QObject *parent, const char* name, const QStringList& )
+KateKttsdPlugin::KateKttsdPlugin( TQObject *parent, const char* name, const TQStringList& )
: KTextEditor::Plugin ( (KTextEditor::Document*) parent, name )
{
}
@@ -68,13 +68,13 @@ void KateKttsdPlugin::removeView(KTextEditor::View *view)
KateKttsdPluginView::KateKttsdPluginView( KTextEditor::View *view, const char *name )
- : QObject( view, name ),
+ : TQObject( view, name ),
KXMLGUIClient( view )
{
view->insertChildClient( this );
setInstance( KGenericFactory<KateKttsdPlugin>::instance() );
KGlobal::locale()->insertCatalogue("kttsd");
- (void) new KAction( i18n("Speak Text"), "kttsd", 0, this, SLOT(slotReadOut()), actionCollection(), "tools_kttsd" );
+ (void) new KAction( i18n("Speak Text"), "kttsd", 0, this, TQT_SLOT(slotReadOut()), actionCollection(), "tools_kttsd" );
setXMLFile( "ktexteditor_kttsdui.rc" );
}
@@ -82,7 +82,7 @@ void KateKttsdPluginView::slotReadOut()
{
KTextEditor::View *v = (KTextEditor::View*)parent();
KTextEditor::SelectionInterface *si = KTextEditor::selectionInterface( v->document() );
- QString text;
+ TQString text;
if ( si->hasSelection() )
text = si->selection();
@@ -95,26 +95,26 @@ void KateKttsdPluginView::slotReadOut()
// If KTTSD not running, start it.
if (!client->isApplicationRegistered("kttsd"))
{
- QString error;
- if (kapp->startServiceByDesktopName("kttsd", QStringList(), &error))
- QMessageBox::warning(0, i18n( "Starting KTTSD Failed"), error );
+ TQString error;
+ if (kapp->startServiceByDesktopName("kttsd", TQStringList(), &error))
+ TQMessageBox::warning(0, i18n( "Starting KTTSD Failed"), error );
}
- QByteArray data;
- QByteArray data2;
- QCString replyType;
- QByteArray replyData;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQByteArray data2;
+ TQCString replyType;
+ TQByteArray replyData;
+ TQDataStream arg(data, IO_WriteOnly);
arg << text << "";
- if ( !client->call("kttsd", "KSpeech", "setText(QString,QString)",
+ if ( !client->call("kttsd", "KSpeech", "setText(TQString,TQString)",
data, replyType, replyData, true) )
- QMessageBox::warning( 0, i18n( "DCOP Call Failed" ),
+ TQMessageBox::warning( 0, i18n( "DCOP Call Failed" ),
i18n( "The DCOP call setText failed." ));
- QDataStream arg2(data2, IO_WriteOnly);
+ TQDataStream arg2(data2, IO_WriteOnly);
arg2 << 0;
if ( !client->call("kttsd", "KSpeech", "startText(uint)",
data2, replyType, replyData, true) )
- QMessageBox::warning( 0, i18n( "DCOP Call Failed" ),
+ TQMessageBox::warning( 0, i18n( "DCOP Call Failed" ),
i18n( "The DCOP call startText failed." ));
}
diff --git a/kttsd/app-plugins/kate/katekttsd.h b/kttsd/app-plugins/kate/katekttsd.h
index cbab720..c30f3cf 100644
--- a/kttsd/app-plugins/kate/katekttsd.h
+++ b/kttsd/app-plugins/kate/katekttsd.h
@@ -23,26 +23,26 @@
#include <ktexteditor/plugin.h>
#include <ktexteditor/view.h>
#include <kxmlguiclient.h>
-#include <qobject.h>
+#include <tqobject.h>
class KateKttsdPlugin : public KTextEditor::Plugin, public KTextEditor::PluginViewInterface
{
Q_OBJECT
public:
- KateKttsdPlugin( QObject *parent = 0,
+ KateKttsdPlugin( TQObject *parent = 0,
const char* name = 0,
- const QStringList &args = QStringList() );
+ const TQStringList &args = TQStringList() );
virtual ~KateKttsdPlugin();
void addView (KTextEditor::View *view);
void removeView (KTextEditor::View *view);
private:
- QPtrList<class KateKttsdPluginView> m_views;
+ TQPtrList<class KateKttsdPluginView> m_views;
};
-class KateKttsdPluginView : public QObject, public KXMLGUIClient
+class KateKttsdPluginView : public TQObject, public KXMLGUIClient
{
Q_OBJECT
diff --git a/kttsd/compat/interfaces/kspeech/kspeech.h b/kttsd/compat/interfaces/kspeech/kspeech.h
index e4a831c..d321528 100644
--- a/kttsd/compat/interfaces/kspeech/kspeech.h
+++ b/kttsd/compat/interfaces/kspeech/kspeech.h
@@ -22,7 +22,7 @@
#define _KSPEECH_H_
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
/**
* @interface KSpeech
@@ -207,7 +207,7 @@
* "kttsd", object "KSpeech".
*
@verbatim
- MyPart::MyPart(QWidget *parent, const char *name) :
+ MyPart::MyPart(TQWidget *parent, const char *name) :
KParts::ReadOnlyPart(parent, name),
DCOPStub("kttsd", "KSpeech") {
@endverbatim
@@ -218,8 +218,8 @@
DCOPClient *client = dcopClient();
client->attach();
if (!client->isApplicationRegistered("kttsd")) {
- QString error;
- if (KApplication::startServiceByDesktopName("kttsd", QStringList(), &error))
+ TQString error;
+ if (KApplication::startServiceByDesktopName("kttsd", TQStringList(), &error))
cout << "Starting KTTSD failed with message " << error << endl;
}
@endverbatim
@@ -271,7 +271,7 @@
virtual public KSpeechSink
{
protected:
- ASYNC sentenceStarted(const QCString& appId, const uint jobNum, const uint seq);
+ ASYNC sentenceStarted(const TQCString& appId, const uint jobNum, const uint seq);
@endverbatim
*
* You can combine sending and receiving in one object.
@@ -284,7 +284,7 @@
virtual public KSpeechSink
{
protected:
- ASYNC sentenceStarted(const QCString& appId, const uint jobNum, const uint seq);
+ ASYNC sentenceStarted(const TQCString& appId, const uint jobNum, const uint seq);
@endverbatim
*
* See below for the signals you can declare.
@@ -293,7 +293,7 @@
* receiving object.
*
@verbatim
- MyPart::MyPart(QWidget *parent, const char *name) :
+ MyPart::MyPart(TQWidget *parent, const char *name) :
KParts::ReadOnlyPart(parent, name),
DCOPObject("mypart_kspeechsink") {
@endverbatim
@@ -314,8 +314,8 @@
}
// Connect KTTSD DCOP signals to our slots.
connectDCOPSignal("kttsd", "KSpeech",
- "sentenceStarted(QCString,uint,uint)",
- "sentenceStarted(QCString,uint,uint)",
+ "sentenceStarted(TQCString,uint,uint)",
+ "sentenceStarted(TQCString,uint,uint)",
false);
@endverbatim
*
@@ -323,13 +323,13 @@
* example
*
@verbatim
- ASYNC sentenceStarted(const QCString& appId, const uint jobNum, const uint seq);
+ ASYNC sentenceStarted(const TQCString& appId, const uint jobNum, const uint seq);
@endverbatim
*
* becomes
*
@verbatim
- "sentenceStarted(QCString,uint,uint)",
+ "sentenceStarted(TQCString,uint,uint)",
@endverbatim
*
* in the connectDCOPSignal call.
@@ -338,7 +338,7 @@
* is intended for your application.
*
@verbatim
- ASYNC MyPart::sentenceStarted(const QCString& appId, const uint jobNum, const uint seq)
+ ASYNC MyPart::sentenceStarted(const TQCString& appId, const uint jobNum, const uint seq)
{
// Check appId to determine if this is our signal.
if (appId != dcopClient()->appId()) return;
@@ -685,7 +685,7 @@ class KSpeech : virtual public DCOPObject {
* talker supports the indicated speech markup language.
* @see kttsdMarkupType
*/
- virtual bool supportsMarkup(const QString &talker, uint markupType = 0) const = 0;
+ virtual bool supportsMarkup(const TQString &talker, uint markupType = 0) const = 0;
/**
* Determine whether the currently-configured speech plugin supports markers in speech markup.
@@ -694,7 +694,7 @@ class KSpeech : virtual public DCOPObject {
* @return True if the plugin currently configured for the indicated
* talker supports markers.
*/
- virtual bool supportsMarkers(const QString &talker) const = 0;
+ virtual bool supportsMarkers(const TQString &talker) const = 0;
/**
* Say a message as soon as possible, interrupting any other speech in progress.
@@ -709,7 +709,7 @@ class KSpeech : virtual public DCOPObject {
* If an existing Screen Reader output is in progress, it is stopped and discarded and
* replaced with this new message.
*/
- virtual ASYNC sayScreenReaderOutput(const QString &msg, const QString &talker) = 0;
+ virtual ASYNC sayScreenReaderOutput(const TQString &msg, const TQString &talker) = 0;
/**
* Say a warning. The warning will be spoken when the current sentence
@@ -722,7 +722,7 @@ class KSpeech : virtual public DCOPObject {
* If no plugin has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
- virtual ASYNC sayWarning(const QString &warning, const QString &talker) = 0;
+ virtual ASYNC sayWarning(const TQString &warning, const TQString &talker) = 0;
/**
* Say a message. The message will be spoken when the current sentence stops speaking
@@ -735,7 +735,7 @@ class KSpeech : virtual public DCOPObject {
* If no talker has been configured for the specified talker code,
* defaults to the closest matching talker.
*/
- virtual ASYNC sayMessage(const QString &message, const QString &talker) = 0;
+ virtual ASYNC sayMessage(const TQString &message, const TQString &talker) = 0;
/**
* Sets the GREP pattern that will be used as the sentence delimiter.
@@ -751,7 +751,7 @@ class KSpeech : virtual public DCOPObject {
* with a single space, and then replaces the sentence delimiters using
* the following statement:
@verbatim
- QString::replace(sentenceDelimiter, "\\1\t");
+ TQString::replace(sentenceDelimiter, "\\1\t");
@endverbatim
*
* which replaces all sentence delimiters with a tab, but
@@ -763,7 +763,7 @@ class KSpeech : virtual public DCOPObject {
*
* @see sentenceparsing
*/
- virtual ASYNC setSentenceDelimiter(const QString &delimiter) = 0;
+ virtual ASYNC setSentenceDelimiter(const TQString &delimiter) = 0;
/**
* Queue a text job. Does not start speaking the text.
@@ -789,7 +789,7 @@ class KSpeech : virtual public DCOPObject {
* @see getTextCount
* @see startText
*/
- virtual uint setText(const QString &text, const QString &talker) = 0;
+ virtual uint setText(const TQString &text, const TQString &talker) = 0;
/**
* Say a plain text job. This is a convenience method that
@@ -819,7 +819,7 @@ class KSpeech : virtual public DCOPObject {
*
* @since KDE 3.5
*/
- virtual uint sayText(const QString &text, const QString &talker) = 0;
+ virtual uint sayText(const TQString &text, const TQString &talker) = 0;
/**
* Adds another part to a text job. Does not start speaking the text.
@@ -836,7 +836,7 @@ class KSpeech : virtual public DCOPObject {
* @see setText.
* @see startText.
*/
- virtual int appendText(const QString &text, uint jobNum=0) = 0;
+ virtual int appendText(const TQString &text, uint jobNum=0) = 0;
/**
* Queue a text job from the contents of a file. Does not start speaking the text.
@@ -863,8 +863,8 @@ class KSpeech : virtual public DCOPObject {
* @see getTextCount
* @see startText
*/
- virtual uint setFile(const QString &filename, const QString &talker,
- const QString& encoding) = 0;
+ virtual uint setFile(const TQString &filename, const TQString &talker,
+ const TQString& encoding) = 0;
/**
* Get the number of sentences in a text job.
@@ -900,7 +900,7 @@ class KSpeech : virtual public DCOPObject {
* Get a comma-separated list of text job numbers in the queue.
* @return Comma-separated list of text job numbers in the queue.
*/
- virtual QString getTextJobNumbers() = 0;
+ virtual TQString getTextJobNumbers() = 0;
/**
* Get the state of a text job.
@@ -918,13 +918,13 @@ class KSpeech : virtual public DCOPObject {
* @param jobNum Job number of the text job.
* If zero, applies to the last job queued by the application,
* but if no such job, applies to the current job (if any).
- * @return A QDataStream containing information about the job.
+ * @return A TQDataStream containing information about the job.
* Blank if no such job.
*
* The stream contains the following elements:
* - int state - Job state.
- * - QCString appId - DCOP senderId of the application that requested the speech job.
- * - QString talker - Talker Code requested by application.
+ * - TQCString appId - DCOP senderId of the application that requested the speech job.
+ * - TQString talker - Talker Code requested by application.
* - int seq - Current sentence being spoken. Sentences are numbered starting at 1.
* - int sentenceCount - Total number of sentences in the job.
* - int partNum - Current part of the job begin spoken. Parts are numbered starting at 1.
@@ -935,11 +935,11 @@ class KSpeech : virtual public DCOPObject {
*
* The following sample code will decode the stream:
@code
- QByteArray jobInfo = getTextJobInfo(jobNum);
- QDataStream stream(jobInfo, IO_ReadOnly);
+ TQByteArray jobInfo = getTextJobInfo(jobNum);
+ TQDataStream stream(jobInfo, IO_ReadOnly);
int state;
- QCString appId;
- QString talker;
+ TQCString appId;
+ TQString talker;
int seq;
int sentenceCount;
int partNum;
@@ -953,7 +953,7 @@ class KSpeech : virtual public DCOPObject {
stream >> partCount;
@endcode
*/
- virtual QByteArray getTextJobInfo(uint jobNum=0) = 0;
+ virtual TQByteArray getTextJobInfo(uint jobNum=0) = 0;
/**
* Given a Talker Code, returns the Talker ID of the talker that would speak
@@ -961,7 +961,7 @@ class KSpeech : virtual public DCOPObject {
* @param talkerCode Talker Code.
* @return Talker ID of the talker that would speak the text job.
*/
- virtual QString talkerCodeToTalkerId(const QString& talkerCode) = 0;
+ virtual TQString talkerCodeToTalkerId(const TQString& talkerCode) = 0;
/**
* Return a sentence of a job.
@@ -972,7 +972,7 @@ class KSpeech : virtual public DCOPObject {
* @return The specified sentence in the specified job. If no such
* job or sentence, returns "".
*/
- virtual QString getTextJobSentence(uint jobNum=0, uint seq=0) = 0;
+ virtual TQString getTextJobSentence(uint jobNum=0, uint seq=0) = 0;
/**
* Determine if kttsd is currently speaking any text jobs.
@@ -1080,12 +1080,12 @@ class KSpeech : virtual public DCOPObject {
/**
* Get a list of the talkers configured in KTTS.
- * @return A QStringList of fully-specified talker codes, one
+ * @return A TQStringList of fully-specified talker codes, one
* for each talker user has configured.
*
* @see talkers
*/
- virtual QStringList getTalkers() = 0;
+ virtual TQStringList getTalkers() = 0;
/**
* Change the talker for a text job.
@@ -1097,7 +1097,7 @@ class KSpeech : virtual public DCOPObject {
* If no plugin has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
- virtual ASYNC changeTextTalker(const QString &talker, uint jobNum=0 ) = 0;
+ virtual ASYNC changeTextTalker(const TQString &talker, uint jobNum=0 ) = 0;
/**
* Get the user's default talker.
@@ -1106,7 +1106,7 @@ class KSpeech : virtual public DCOPObject {
* @see talkers
* @see getTalkers
*/
- virtual QString userDefaultTalker() = 0;
+ virtual TQString userDefaultTalker() = 0;
/**
* Move a text job down in the queue so that it is spoken later.
@@ -1175,7 +1175,7 @@ class KSpeech : virtual public DCOPObject {
* Return the KTTSD deamon version number.
* @since KDE 3.5
*/
- virtual QString version() = 0;
+ virtual TQString version() = 0;
//@}
k_dcop_signals:
@@ -1199,7 +1199,7 @@ class KSpeech : virtual public DCOPObject {
*
* @see markers
*/
- void markerSeen(const QCString& appId, const QString& markerName);
+ void markerSeen(const TQCString& appId, const TQString& markerName);
/**
* This signal is emitted whenever a sentence begins speaking.
* @param appId DCOP application ID of the application that queued the text.
@@ -1208,7 +1208,7 @@ class KSpeech : virtual public DCOPObject {
*
* @see getTextCount
*/
- void sentenceStarted(const QCString& appId, uint jobNum, uint seq);
+ void sentenceStarted(const TQCString& appId, uint jobNum, uint seq);
/**
* This signal is emitted when a sentence has finished speaking.
* @param appId DCOP application ID of the application that queued the text.
@@ -1217,14 +1217,14 @@ class KSpeech : virtual public DCOPObject {
*
* @see getTextCount
*/
- void sentenceFinished(const QCString& appId, uint jobNum, uint seq);
+ void sentenceFinished(const TQCString& appId, uint jobNum, uint seq);
/**
* This signal is emitted whenever a new text job is added to the queue.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textSet(const QCString& appId, uint jobNum);
+ void textSet(const TQCString& appId, uint jobNum);
/**
* This signal is emitted whenever a new part is appended to a text job.
@@ -1233,14 +1233,14 @@ class KSpeech : virtual public DCOPObject {
* @param partNum Part number of the new part. Parts are numbered starting
* at 1.
*/
- void textAppended(const QCString& appId, uint jobNum, int partNum);
+ void textAppended(const TQCString& appId, uint jobNum, int partNum);
/**
* This signal is emitted whenever speaking of a text job begins.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textStarted(const QCString& appId, uint jobNum);
+ void textStarted(const TQCString& appId, uint jobNum);
/**
* This signal is emitted whenever a text job is finished. The job has
* been marked for deletion from the queue and will be deleted when another
@@ -1250,7 +1250,7 @@ class KSpeech : virtual public DCOPObject {
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textFinished(const QCString& appId, uint jobNum);
+ void textFinished(const TQCString& appId, uint jobNum);
/**
* This signal is emitted whenever a speaking text job stops speaking.
* @param appId The DCOP senderId of the application that created the job.
@@ -1259,26 +1259,26 @@ class KSpeech : virtual public DCOPObject {
* The signal is only emitted if stopText() is called and the job is currently
* speaking.
*/
- void textStopped(const QCString& appId, uint jobNum);
+ void textStopped(const TQCString& appId, uint jobNum);
/**
* This signal is emitted whenever a speaking text job is paused.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textPaused(const QCString& appId, uint jobNum);
+ void textPaused(const TQCString& appId, uint jobNum);
/**
* This signal is emitted when a text job, that was previously paused, resumes speaking.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textResumed(const QCString& appId, uint jobNum);
+ void textResumed(const TQCString& appId, uint jobNum);
/**
* This signal is emitted whenever a text job is deleted from the queue.
* The job is no longer in the queue when this signal is emitted.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textRemoved(const QCString& appId, uint jobNum);
+ void textRemoved(const TQCString& appId, uint jobNum);
//@}
};
diff --git a/kttsd/compat/interfaces/kspeech/kspeechsink.h b/kttsd/compat/interfaces/kspeech/kspeechsink.h
index e90a005..51715b9 100644
--- a/kttsd/compat/interfaces/kspeech/kspeechsink.h
+++ b/kttsd/compat/interfaces/kspeech/kspeechsink.h
@@ -84,7 +84,7 @@ class KSpeechSink : virtual public DCOPObject {
* @param markerName The name of the marker seen.
* @see markers
*/
- virtual ASYNC markerSeen(const QCString& appId, const QString& markerName) { Q_UNUSED(appId); Q_UNUSED(markerName); };
+ virtual ASYNC markerSeen(const TQCString& appId, const TQString& markerName) { Q_UNUSED(appId); Q_UNUSED(markerName); };
/**
* This signal is emitted whenever a sentence begins speaking.
* @param appId DCOP application ID of the application that queued the text.
@@ -92,7 +92,7 @@ class KSpeechSink : virtual public DCOPObject {
* @param seq Sequence number of the text.
* @see getTextCount
*/
- virtual ASYNC sentenceStarted(const QCString& appId, uint jobNum, uint seq) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(seq); };
+ virtual ASYNC sentenceStarted(const TQCString& appId, uint jobNum, uint seq) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(seq); };
/**
* This signal is emitted when a sentence has finished speaking.
* @param appId DCOP application ID of the application that queued the text.
@@ -100,14 +100,14 @@ class KSpeechSink : virtual public DCOPObject {
* @param seq Sequence number of the text.
* @see getTextCount
*/
- virtual ASYNC sentenceFinished(const QCString& appId, uint jobNum, uint seq) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(seq); };
+ virtual ASYNC sentenceFinished(const TQCString& appId, uint jobNum, uint seq) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(seq); };
/**
* This signal is emitted whenever a new text job is added to the queue.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textSet(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textSet(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
/**
* This signal is emitted whenever a new part is appended to a text job.
@@ -116,14 +116,14 @@ class KSpeechSink : virtual public DCOPObject {
* @param partNum Part number of the new part. Parts are numbered starting
* at 1.
*/
- virtual ASYNC textAppended(const QCString& appId, uint jobNum, int partNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(partNum); };
+ virtual ASYNC textAppended(const TQCString& appId, uint jobNum, int partNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(partNum); };
/**
* This signal is emitted whenever speaking of a text job begins.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textStarted(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textStarted(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
/**
* This signal is emitted whenever a text job is finished. The job has
* been marked for deletion from the queue and will be deleted when another
@@ -133,32 +133,32 @@ class KSpeechSink : virtual public DCOPObject {
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textFinished(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textFinished(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
/**
* This signal is emitted whenever a speaking text job stops speaking.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textStopped(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textStopped(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
/**
* This signal is emitted whenever a speaking text job is paused.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textPaused(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textPaused(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
/**
* This signal is emitted when a text job, that was previously paused, resumes speaking.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textResumed(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textResumed(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
/**
* This signal is emitted whenever a text job is deleted from the queue.
* The job is no longer in the queue when this signal is emitted.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textRemoved(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textRemoved(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
};
#endif // _KSPEECHSINK_H_
diff --git a/kttsd/filters/main.cpp b/kttsd/filters/main.cpp
index d358da8..f33d771 100644
--- a/kttsd/filters/main.cpp
+++ b/kttsd/filters/main.cpp
@@ -21,11 +21,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
******************************************************************************/
-#include <qstring.h>
+#include <tqstring.h>
#include <iostream>
using namespace std;
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <klocale.h>
@@ -81,17 +81,17 @@ int main(int argc, char *argv[])
const int offersCount = offers.count();
for(int ndx=0; ndx < offersCount ; ++ndx)
{
- QString name = offers[ndx]->name();
+ TQString name = offers[ndx]->name();
cout << name.latin1() << endl;
}
return 0;
}
- QString filterName;
+ TQString filterName;
if (args->count() > 0) filterName = args->arg(0);
- QString talker = args->getOption("talker");
- QCString appId = args->getOption("appid");
- QString groupName = args->getOption("group");
+ TQString talker = args->getOption("talker");
+ TQCString appId = args->getOption("appid");
+ TQString groupName = args->getOption("group");
if (filterName.isEmpty()) kdError(1) << "No filter name given." << endl;
@@ -111,14 +111,14 @@ int main(int argc, char *argv[])
KttsFilterProc *plugIn =
KParts::ComponentFactory::createInstanceFromLibrary<KttsFilterProc>(
offers[ndx]->library().latin1(), NULL, offers[ndx]->library().latin1(),
- QStringList(), &errorNo);
+ TQStringList(), &errorNo);
if(plugIn)
{
KConfig* config = new KConfig("kttsdrc");
config->setGroup( "General" );
plugIn->init( config, groupName );
- QTextStream inp ( stdin, IO_ReadOnly );
- QString text;
+ TQTextStream inp ( stdin, IO_ReadOnly );
+ TQString text;
text = inp.read();
TalkerCode* talkerCode = new TalkerCode( talker );
text = plugIn->convert( text, talkerCode, appId );
diff --git a/kttsd/filters/sbd/sbdconf.cpp b/kttsd/filters/sbd/sbdconf.cpp
index 2d4cf5d..5244974 100644
--- a/kttsd/filters/sbd/sbdconf.cpp
+++ b/kttsd/filters/sbd/sbdconf.cpp
@@ -22,14 +22,14 @@
******************************************************************************/
// Qt includes.
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qradiobutton.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqradiobutton.h>
// KDE includes.
#include <kglobal.h>
@@ -56,13 +56,13 @@
/**
* Constructor
*/
-SbdConf::SbdConf( QWidget *parent, const char *name, const QStringList& /*args*/) :
+SbdConf::SbdConf( TQWidget *parent, const char *name, const TQStringList& /*args*/) :
KttsFilterConf(parent, name)
{
// kdDebug() << "SbdConf::SbdConf: Running" << endl;
// Create configuration widget.
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "SbdConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new SbdConfWidget(this, "SbdConfigWidget");
@@ -73,24 +73,24 @@ SbdConf::SbdConf( QWidget *parent, const char *name, const QStringList& /*args*/
m_widget->reButton->setEnabled( m_reEditorInstalled );
if ( m_reEditorInstalled )
- connect( m_widget->reButton, SIGNAL(clicked()), this, SLOT(slotReButton_clicked()) );
+ connect( m_widget->reButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotReButton_clicked()) );
- connect( m_widget->reLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
- connect( m_widget->sbLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
- connect( m_widget->nameLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
- connect( m_widget->appIdLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
- connect(m_widget->languageBrowseButton, SIGNAL(clicked()),
- this, SLOT(slotLanguageBrowseButton_clicked()));
- connect(m_widget->loadButton, SIGNAL(clicked()),
- this, SLOT(slotLoadButton_clicked()));
- connect(m_widget->saveButton, SIGNAL(clicked()),
- this, SLOT(slotSaveButton_clicked()));
- connect(m_widget->clearButton, SIGNAL(clicked()),
- this, SLOT(slotClearButton_clicked()));
+ connect( m_widget->reLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
+ connect( m_widget->sbLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
+ connect( m_widget->nameLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
+ connect( m_widget->appIdLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
+ connect(m_widget->languageBrowseButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotLanguageBrowseButton_clicked()));
+ connect(m_widget->loadButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotLoadButton_clicked()));
+ connect(m_widget->saveButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSaveButton_clicked()));
+ connect(m_widget->clearButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotClearButton_clicked()));
// Set up defaults.
defaults();
@@ -116,7 +116,7 @@ SbdConf::~SbdConf(){
* @param configGroup Call config->setGroup with this argument before
* loading your configuration.
*/
-void SbdConf::load(KConfig* config, const QString& configGroup){
+void SbdConf::load(KConfig* config, const TQString& configGroup){
// kdDebug() << "SbdConf::load: Running" << endl;
config->setGroup( configGroup );
m_widget->nameLineEdit->setText(
@@ -125,10 +125,10 @@ void SbdConf::load(KConfig* config, const QString& configGroup){
config->readEntry("SentenceDelimiterRegExp", m_widget->reLineEdit->text()) );
m_widget->sbLineEdit->setText(
config->readEntry("SentenceBoundary", m_widget->sbLineEdit->text()) );
- QStringList langCodeList = config->readListEntry("LanguageCodes");
+ TQStringList langCodeList = config->readListEntry("LanguageCodes");
if (!langCodeList.isEmpty())
m_languageCodeList = langCodeList;
- QString language = "";
+ TQString language = "";
for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx)
{
if (!language.isEmpty()) language += ",";
@@ -149,7 +149,7 @@ void SbdConf::load(KConfig* config, const QString& configGroup){
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
-void SbdConf::save(KConfig* config, const QString& configGroup){
+void SbdConf::save(KConfig* config, const TQString& configGroup){
// kdDebug() << "SbdConf::save: Running" << endl;
config->setGroup( configGroup );
config->writeEntry("UserFilterName", m_widget->nameLineEdit->text() );
@@ -192,10 +192,10 @@ bool SbdConf::supportsMultiInstance() { return true; }
* return an empty string.
* @return Filter instance name.
*/
-QString SbdConf::userPlugInName()
+TQString SbdConf::userPlugInName()
{
if ( m_widget->reLineEdit->text().isEmpty() )
- return QString::null;
+ return TQString::null;
else
return m_widget->nameLineEdit->text();
}
@@ -210,8 +210,8 @@ void SbdConf::slotReButton_clicked()
{
// Show Regular Expression Editor dialog if it is installed.
if ( !m_reEditorInstalled ) return;
- QDialog *editorDialog =
- KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor" );
+ TQDialog *editorDialog =
+ KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" );
if ( editorDialog )
{
// kdeutils was installed, so the dialog was found. Fetch the editor interface.
@@ -220,9 +220,9 @@ void SbdConf::slotReButton_clicked()
Q_ASSERT( reEditor ); // This should not fail!// now use the editor.
reEditor->setRegExp( m_widget->reLineEdit->text() );
int dlgResult = editorDialog->exec();
- if ( dlgResult == QDialog::Accepted )
+ if ( dlgResult == TQDialog::Accepted )
{
- QString re = reEditor->regExp();
+ TQString re = reEditor->regExp();
m_widget->reLineEdit->setText( re );
configChanged();
}
@@ -232,21 +232,21 @@ void SbdConf::slotReButton_clicked()
void SbdConf::slotLanguageBrowseButton_clicked()
{
- // Create a QHBox to host KListView.
- QHBox* hBox = new QHBox(m_widget, "SelectLanguage_hbox");
+ // Create a TQHBox to host KListView.
+ TQHBox* hBox = new TQHBox(m_widget, "SelectLanguage_hbox");
// Create a KListView and fill with all known languages.
KListView* langLView = new KListView(hBox, "SelectLanguage_lview");
langLView->addColumn(i18n("Language"));
langLView->addColumn(i18n("Code"));
- langLView->setSelectionMode(QListView::Extended);
- QStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha();
- QString locale;
- QString languageCode;
- QString countryCode;
- QString charSet;
- QString language;
+ langLView->setSelectionMode(TQListView::Extended);
+ TQStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha();
+ TQString locale;
+ TQString languageCode;
+ TQString countryCode;
+ TQString charSet;
+ TQString language;
// Blank line so user can select no language.
- QListViewItem* item = new KListViewItem(langLView, "", "");
+ TQListViewItem* item = new KListViewItem(langLView, "", "");
if (m_languageCodeList.isEmpty()) item->setSelected(true);
const int allLocalesCount = allLocales.count();
for (int ndx=0; ndx < allLocalesCount; ++ndx)
@@ -256,7 +256,7 @@ void SbdConf::slotLanguageBrowseButton_clicked()
language = KGlobal::locale()->twoAlphaToLanguageName(languageCode);
if (!countryCode.isEmpty()) language +=
" (" + KGlobal::locale()->twoAlphaToCountryName(countryCode)+")";
- QListViewItem* item = new KListViewItem(langLView, language, locale);
+ TQListViewItem* item = new KListViewItem(langLView, language, locale);
if (m_languageCodeList.contains(locale)) item->setSelected(true);
}
// Sort by language.
@@ -274,13 +274,13 @@ void SbdConf::slotLanguageBrowseButton_clicked()
true);
dlg->setMainWidget(hBox);
dlg->setHelp("", "kttsd");
- dlg->setInitialSize(QSize(300, 500), false);
+ dlg->setInitialSize(TQSize(300, 500), false);
int dlgResult = dlg->exec();
- languageCode = QString::null;
- if (dlgResult == QDialog::Accepted)
+ languageCode = TQString::null;
+ if (dlgResult == TQDialog::Accepted)
{
m_languageCodeList.clear();
- QListViewItem* item = langLView->firstChild();
+ TQListViewItem* item = langLView->firstChild();
while (item)
{
if (item->isSelected()) m_languageCodeList += item->text(1);
@@ -289,7 +289,7 @@ void SbdConf::slotLanguageBrowseButton_clicked()
}
delete dlg;
// TODO: Also delete KListView and QHBox?
- if (dlgResult != QDialog::Accepted) return;
+ if (dlgResult != TQDialog::Accepted) return;
language = "";
for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx)
{
@@ -302,9 +302,9 @@ void SbdConf::slotLanguageBrowseButton_clicked()
void SbdConf::slotLoadButton_clicked()
{
- // QString dataDir = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/stringreplacer/";
- QString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/sbd/").last();
- QString filename = KFileDialog::getOpenFileName(
+ // TQString dataDir = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/stringreplacer/";
+ TQString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/sbd/").last();
+ TQString filename = KFileDialog::getOpenFileName(
dataDir,
"*rc|SBD Config (*rc)",
m_widget,
@@ -318,7 +318,7 @@ void SbdConf::slotLoadButton_clicked()
void SbdConf::slotSaveButton_clicked()
{
- QString filename = KFileDialog::getSaveFileName(
+ TQString filename = KFileDialog::getSaveFileName(
KGlobal::dirs()->saveLocation( "data" ,"kttsd/sbd/", false ),
"*rc|SBD Config (*rc)",
m_widget,
@@ -331,11 +331,11 @@ void SbdConf::slotSaveButton_clicked()
void SbdConf::slotClearButton_clicked()
{
- m_widget->nameLineEdit->setText( QString::null );
- m_widget->reLineEdit->setText( QString::null );
- m_widget->sbLineEdit->setText( QString::null );
+ m_widget->nameLineEdit->setText( TQString::null );
+ m_widget->reLineEdit->setText( TQString::null );
+ m_widget->sbLineEdit->setText( TQString::null );
m_languageCodeList.clear();
- m_widget->languageLineEdit->setText( QString::null );
- m_widget->appIdLineEdit->setText( QString::null );
+ m_widget->languageLineEdit->setText( TQString::null );
+ m_widget->appIdLineEdit->setText( TQString::null );
configChanged();
}
diff --git a/kttsd/filters/sbd/sbdconf.h b/kttsd/filters/sbd/sbdconf.h
index 131a759..eb1b817 100644
--- a/kttsd/filters/sbd/sbdconf.h
+++ b/kttsd/filters/sbd/sbdconf.h
@@ -25,7 +25,7 @@
#define _SBDCONF_H_
// Qt includes.
-#include <qwidget.h>
+#include <tqwidget.h>
// KDE includes.
#include <kconfig.h>
@@ -48,7 +48,7 @@ class SbdConf : public KttsFilterConf
/**
* Constructor
*/
- SbdConf( QWidget *parent, const char *name, const QStringList &args = QStringList() );
+ SbdConf( TQWidget *parent, const char *name, const TQStringList &args = TQStringList() );
/**
* Destructor
@@ -73,7 +73,7 @@ class SbdConf : public KttsFilterConf
* any instance-specific parameters to load, but it may still wish
* to load parameters that apply to all instances of the plugin.
*/
- virtual void load(KConfig *config, const QString &configGroup);
+ virtual void load(KConfig *config, const TQString &configGroup);
/**
* This function gets called when the user wants to save the settings in
@@ -85,7 +85,7 @@ class SbdConf : public KttsFilterConf
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
- virtual void save(KConfig *config, const QString &configGroup);
+ virtual void save(KConfig *config, const TQString &configGroup);
/**
* This function is called to set the settings in the module to sensible
@@ -111,7 +111,7 @@ class SbdConf : public KttsFilterConf
* return an empty string.
* @return Filter instance name.
*/
- virtual QString userPlugInName();
+ virtual TQString userPlugInName();
/**
* Returns True if this filter is a Sentence Boundary Detector.
@@ -133,7 +133,7 @@ class SbdConf : public KttsFilterConf
// True if kdeutils Regular Expression Editor is installed.
bool m_reEditorInstalled;
// Language Code.
- QStringList m_languageCodeList;
+ TQStringList m_languageCodeList;
};
#endif //_SBDCONF_H_
diff --git a/kttsd/filters/sbd/sbdproc.cpp b/kttsd/filters/sbd/sbdproc.cpp
index cdc80d9..6117b11 100644
--- a/kttsd/filters/sbd/sbdproc.cpp
+++ b/kttsd/filters/sbd/sbdproc.cpp
@@ -22,9 +22,9 @@
******************************************************************************/
// Qt includes.
-#include <qregexp.h>
-#include <qdom.h>
-#include <qapplication.h>
+#include <tqregexp.h>
+#include <tqdom.h>
+#include <tqapplication.h>
// KDE includes.
#include <kdebug.h>
@@ -41,9 +41,9 @@
/**
* Constructor.
*/
-SbdThread::SbdThread( QObject *parent, const char *name ) :
- QObject( parent, name ),
- QThread()
+SbdThread::SbdThread( TQObject *parent, const char *name ) :
+ TQObject( parent, name ),
+ TQThread()
{
}
@@ -57,8 +57,8 @@ SbdThread::SbdThread( QObject *parent, const char *name ) :
/**
* Get/Set text being processed.
*/
-void SbdThread::setText( const QString& text ) { m_text = text; }
-QString SbdThread::text() { return m_text; }
+void SbdThread::setText( const TQString& text ) { m_text = text; }
+TQString SbdThread::text() { return m_text; }
/**
* Set/Get TalkerCode.
@@ -72,14 +72,14 @@ TalkerCode* SbdThread::talkerCode() { return m_talkerCode; }
*
* @param re The sentence delimiter regular expression.
*/
-void SbdThread::setSbRegExp( const QString& re ) { m_re = re; }
+void SbdThread::setSbRegExp( const TQString& re ) { m_re = re; }
/**
* The configured Sentence Boundary Regular Expression.
*
* @param re The sentence delimiter regular expression.
*/
-void SbdThread::setConfiguredSbRegExp( const QString& re ) { m_configuredRe = re; }
+void SbdThread::setConfiguredSbRegExp( const TQString& re ) { m_configuredRe = re; }
/**
* The configured Sentence Boundary that replaces SB regular expression.
@@ -87,7 +87,7 @@ void SbdThread::setConfiguredSbRegExp( const QString& re ) { m_configuredRe = re
* @param sb The sentence boundary replacement.
*
*/
-void SbdThread::setConfiguredSentenceBoundary( const QString& sb ) { m_configuredSentenceBoundary = sb; }
+void SbdThread::setConfiguredSentenceBoundary( const TQString& sb ) { m_configuredSentenceBoundary = sb; }
/**
* Did this filter do anything? If the filter returns the input as output
@@ -97,7 +97,7 @@ void SbdThread::setWasModified(bool wasModified) { m_wasModified = wasModified;
bool SbdThread::wasModified() { return m_wasModified; }
// Given a tag name, returns SsmlElemType.
-SbdThread::SsmlElemType SbdThread::tagToSsmlElemType( const QString tagName )
+SbdThread::SsmlElemType SbdThread::tagToSsmlElemType( const TQString tagName )
{
if ( tagName == "speak" ) return etSpeak;
if ( tagName == "voice" ) return etVoice;
@@ -110,12 +110,12 @@ SbdThread::SsmlElemType SbdThread::tagToSsmlElemType( const QString tagName )
}
// Parses an SSML element, pushing current settings onto the context stack.
-void SbdThread::pushSsmlElem( SsmlElemType et, const QDomElement& elem )
+void SbdThread::pushSsmlElem( SsmlElemType et, const TQDomElement& elem )
{
// TODO: Need to convert relative values into absolute values and also convert
// only to values recognized by SSML2SABLE stylesheet. Either that or enhance all
// the synth stylesheets.
- QDomNamedNodeMap attrList = elem.attributes();
+ TQDomNamedNodeMap attrList = elem.attributes();
int attrCount = attrList.count();
switch ( et )
{
@@ -123,7 +123,7 @@ void SbdThread::pushSsmlElem( SsmlElemType et, const QDomElement& elem )
SpeakElem e = m_speakStack.top();
for ( int ndx=0; ndx < attrCount; ++ndx )
{
- QDomAttr a = attrList.item( ndx ).toAttr();
+ TQDomAttr a = attrList.item( ndx ).toAttr();
if ( a.name() == "lang" ) e.lang = a.value();
}
m_speakStack.push( e );
@@ -139,7 +139,7 @@ void SbdThread::pushSsmlElem( SsmlElemType et, const QDomElement& elem )
ProsodyElem e = m_prosodyStack.top();
for ( int ndx=0; ndx < attrCount; ++ndx )
{
- QDomAttr a = attrList.item( ndx ).toAttr();
+ TQDomAttr a = attrList.item( ndx ).toAttr();
if ( a.name() == "pitch" ) e.pitch = a.value();
if ( a.name() == "contour" ) e.contour = a.value();
if ( a.name() == "range" ) e.range = a.value();
@@ -153,7 +153,7 @@ void SbdThread::pushSsmlElem( SsmlElemType et, const QDomElement& elem )
EmphasisElem e = m_emphasisStack.top();
for ( int ndx=0; ndx < attrCount; ++ndx )
{
- QDomAttr a = attrList.item( ndx ).toAttr();
+ TQDomAttr a = attrList.item( ndx ).toAttr();
if ( a.name() == "level" ) e.level = a.value();
}
m_emphasisStack.push( e );
@@ -162,7 +162,7 @@ void SbdThread::pushSsmlElem( SsmlElemType et, const QDomElement& elem )
PSElem e = m_psStack.top();
for ( int ndx=0; ndx < attrCount; ++ndx )
{
- QDomAttr a = attrList.item( ndx ).toAttr();
+ TQDomAttr a = attrList.item( ndx ).toAttr();
if ( a.name() == "lang" ) e.lang = a.value();
}
m_psStack.push( e );
@@ -173,17 +173,17 @@ void SbdThread::pushSsmlElem( SsmlElemType et, const QDomElement& elem )
// Given an attribute name and value, constructs an XML representation of the attribute,
// i.e., name="value".
-QString SbdThread::makeAttr( const QString& name, const QString& value )
+TQString SbdThread::makeAttr( const TQString& name, const TQString& value )
{
- if ( value.isEmpty() ) return QString::null;
+ if ( value.isEmpty() ) return TQString::null;
return " " + name + "=\"" + value + "\"";
}
// Returns an XML representation of an SSML tag from the top of the context stack.
-QString SbdThread::makeSsmlElem( SsmlElemType et )
+TQString SbdThread::makeSsmlElem( SsmlElemType et )
{
- QString s;
- QString a;
+ TQString s;
+ TQString a;
switch ( et )
{
// Must always output speak tag, otherwise kttsd won't think each sentence is SSML.
@@ -198,7 +198,7 @@ QString SbdThread::makeSsmlElem( SsmlElemType et )
VoiceElem e = m_voiceStack.top();
a += makeAttr( "lang", e.lang );
a += makeAttr( "gender", e.gender );
- a += makeAttr( "age", QString::number(e.age) );
+ a += makeAttr( "age", TQString::number(e.age) );
a += makeAttr( "name", e.name );
a += makeAttr( "variant", e.variant );
if ( !a.isEmpty() ) s = "<voice" + a + ">";
@@ -240,14 +240,14 @@ void SbdThread::popSsmlElem( SsmlElemType et )
}
// Returns an XML representation of a break element.
-QString SbdThread::makeBreakElem( const QDomElement& e )
+TQString SbdThread::makeBreakElem( const TQDomElement& e )
{
- QString s = "<break";
- QDomNamedNodeMap attrList = e.attributes();
+ TQString s = "<break";
+ TQDomNamedNodeMap attrList = e.attributes();
int attrCount = attrList.count();
for ( int ndx=0; ndx < attrCount; ++ndx )
{
- QDomAttr a = attrList.item( ndx ).toAttr();
+ TQDomAttr a = attrList.item( ndx ).toAttr();
s += makeAttr( a.name(), a.value() );
}
s += ">";
@@ -255,9 +255,9 @@ QString SbdThread::makeBreakElem( const QDomElement& e )
}
// Converts a text fragment into a CDATA section.
-QString SbdThread::makeCDATA( const QString& text )
+TQString SbdThread::makeCDATA( const TQString& text )
{
- QString s = "<![CDATA[";
+ TQString s = "<![CDATA[";
s += text;
s += "]]>";
return s;
@@ -265,20 +265,20 @@ QString SbdThread::makeCDATA( const QString& text )
// Returns an XML representation of an utterance node consisting of voice,
// prosody, and emphasis elements.
-QString SbdThread::makeSentence( const QString& text )
+TQString SbdThread::makeSentence( const TQString& text )
{
- QString s;
- QString v = makeSsmlElem( etVoice );
- QString p = makeSsmlElem( etProsody );
- QString e = makeSsmlElem( etEmphasis );
+ TQString s;
+ TQString v = makeSsmlElem( etVoice );
+ TQString p = makeSsmlElem( etProsody );
+ TQString e = makeSsmlElem( etEmphasis );
// TODO: Lang settings from psStack.
if ( !v.isEmpty() ) s += v;
if ( !p.isEmpty() ) s += p;
if ( !e.isEmpty() ) s += e;
// Escape ampersands and less thans.
- QString newText = text;
- newText.replace(QRegExp("&(?!amp;)"), "&amp;");
- newText.replace(QRegExp("<(?!lt;)"), "&lt;");
+ TQString newText = text;
+ newText.replace(TQRegExp("&(?!amp;)"), "&amp;");
+ newText.replace(TQRegExp("<(?!lt;)"), "&lt;");
s += newText;
if ( !e.isEmpty() ) s += "</emphasis>";
if ( !p.isEmpty() ) s += "</prosody>";
@@ -287,20 +287,20 @@ QString SbdThread::makeSentence( const QString& text )
}
// Starts a sentence by returning a speak tag.
-QString SbdThread::startSentence()
+TQString SbdThread::startSentence()
{
- if ( m_sentenceStarted ) return QString::null;
- QString s;
+ if ( m_sentenceStarted ) return TQString::null;
+ TQString s;
s += makeSsmlElem( etSpeak );
m_sentenceStarted = true;
return s;
}
// Ends a sentence and appends a Tab.
-QString SbdThread::endSentence()
+TQString SbdThread::endSentence()
{
- if ( !m_sentenceStarted ) return QString::null;
- QString s = "</speak>";
+ if ( !m_sentenceStarted ) return TQString::null;
+ TQString s = "</speak>";
s += "\t";
m_sentenceStarted = false;
return s;
@@ -308,14 +308,14 @@ QString SbdThread::endSentence()
// Parses a node of the SSML tree and recursively parses its children.
// Returns the filtered text with each sentence a complete ssml tree.
-QString SbdThread::parseSsmlNode( QDomNode& n, const QString& re )
+TQString SbdThread::parseSsmlNode( TQDomNode& n, const TQString& re )
{
- QString result;
+ TQString result;
switch ( n.nodeType() )
{
- case QDomNode::ElementNode: { // = 1
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ case TQDomNode::ElementNode: { // = 1
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
SsmlElemType et = tagToSsmlElemType( tagName );
switch ( et )
{
@@ -326,7 +326,7 @@ QString SbdThread::parseSsmlNode( QDomNode& n, const QString& re )
case etPS:
{
pushSsmlElem( et, e );
- QDomNode t = n.firstChild();
+ TQDomNode t = n.firstChild();
while ( !t.isNull() )
{
result += parseSsmlNode( t, re );
@@ -346,14 +346,14 @@ QString SbdThread::parseSsmlNode( QDomNode& n, const QString& re )
default: break;
}
break; }
- case QDomNode::AttributeNode: { // = 2
+ case TQDomNode::AttributeNode: { // = 2
break; }
- case QDomNode::TextNode: { // = 3
- QString s = parsePlainText( n.toText().data(), re );
- // QString d = s;
+ case TQDomNode::TextNode: { // = 3
+ TQString s = parsePlainText( n.toText().data(), re );
+ // TQString d = s;
// d.replace("\t", "\\t");
// kdDebug() << "SbdThread::parseSsmlNode: parsedPlainText = [" << d << "]" << endl;
- QStringList sentenceList = QStringList::split( '\t', s, false );
+ TQStringList sentenceList = TQStringList::split( '\t', s, false );
int lastNdx = sentenceList.count() - 1;
for ( int ndx=0; ndx < lastNdx; ++ndx )
{
@@ -369,9 +369,9 @@ QString SbdThread::parseSsmlNode( QDomNode& n, const QString& re )
if ( s.endsWith( "\t" ) ) result += endSentence();
}
break; }
- case QDomNode::CDATASectionNode: { // = 4
- QString s = parsePlainText( n.toCDATASection().data(), re );
- QStringList sentenceList = QStringList::split( '\t', s, false );
+ case TQDomNode::CDATASectionNode: { // = 4
+ TQString s = parsePlainText( n.toCDATASection().data(), re );
+ TQStringList sentenceList = TQStringList::split( '\t', s, false );
int lastNdx = sentenceList.count() - 1;
for ( int ndx=0; ndx < lastNdx; ++ndx )
{
@@ -387,37 +387,37 @@ QString SbdThread::parseSsmlNode( QDomNode& n, const QString& re )
if ( s.endsWith( "\t" ) ) result += endSentence();
}
break; }
- case QDomNode::EntityReferenceNode: { // = 5
+ case TQDomNode::EntityReferenceNode: { // = 5
break; }
- case QDomNode::EntityNode: { // = 6
+ case TQDomNode::EntityNode: { // = 6
break; }
- case QDomNode::ProcessingInstructionNode: { // = 7
+ case TQDomNode::ProcessingInstructionNode: { // = 7
break; }
- case QDomNode::CommentNode: { // = 8
+ case TQDomNode::CommentNode: { // = 8
break; }
- case QDomNode::DocumentNode: { // = 9
+ case TQDomNode::DocumentNode: { // = 9
break; }
- case QDomNode::DocumentTypeNode: { // = 10
+ case TQDomNode::DocumentTypeNode: { // = 10
break; }
- case QDomNode::DocumentFragmentNode: { // = 11
+ case TQDomNode::DocumentFragmentNode: { // = 11
break; }
- case QDomNode::NotationNode: { // = 12
+ case TQDomNode::NotationNode: { // = 12
break; }
- case QDomNode::BaseNode: { // = 21
+ case TQDomNode::BaseNode: { // = 21
break; }
- case QDomNode::CharacterDataNode: { // = 22
+ case TQDomNode::CharacterDataNode: { // = 22
break; }
}
return result;
}
// Parses Ssml.
-QString SbdThread::parseSsml( const QString& inputText, const QString& re )
+TQString SbdThread::parseSsml( const TQString& inputText, const TQString& re )
{
- QRegExp sentenceDelimiter = QRegExp( re );
+ TQRegExp sentenceDelimiter = TQRegExp( re );
// Read the text into xml dom tree.
- QDomDocument doc( "" );
+ TQDomDocument doc( "" );
// If an error occurs parsing the SSML, return "invalid S S M L".
if ( !doc.setContent( inputText ) ) return i18n("Invalid S S M L.");
@@ -442,9 +442,9 @@ QString SbdThread::parseSsml( const QString& inputText, const QString& re )
m_sentenceStarted = false;
// Get the root element (speak) and recursively process its children.
- QDomElement docElem = doc.documentElement();
- QDomNode n = docElem.firstChild();
- QString ssml = parseSsmlNode( docElem, re );
+ TQDomElement docElem = doc.documentElement();
+ TQDomNode n = docElem.firstChild();
+ TQString ssml = parseSsmlNode( docElem, re );
// Close out last sentence.
if ( m_sentenceStarted ) ssml += "</speak>";
@@ -453,37 +453,37 @@ QString SbdThread::parseSsml( const QString& inputText, const QString& re )
}
// Parses code. Each newline is converted into a tab character (\t).
-QString SbdThread::parseCode( const QString& inputText )
+TQString SbdThread::parseCode( const TQString& inputText )
{
- QString temp = inputText;
+ TQString temp = inputText;
// Replace newlines with tabs.
temp.replace("\n","\t");
// Remove leading spaces.
- temp.replace(QRegExp("\\t +"), "\t");
+ temp.replace(TQRegExp("\\t +"), "\t");
// Remove trailing spaces.
- temp.replace(QRegExp(" +\\t"), "\t");
+ temp.replace(TQRegExp(" +\\t"), "\t");
// Remove blank lines.
- temp.replace(QRegExp("\t\t+"),"\t");
+ temp.replace(TQRegExp("\t\t+"),"\t");
return temp;
}
// Parses plain text.
-QString SbdThread::parsePlainText( const QString& inputText, const QString& re )
+TQString SbdThread::parsePlainText( const TQString& inputText, const TQString& re )
{
// kdDebug() << "SbdThread::parsePlainText: parsing " << inputText << " with re " << re << endl;
- QRegExp sentenceDelimiter = QRegExp( re );
- QString temp = inputText;
+ TQRegExp sentenceDelimiter = TQRegExp( re );
+ TQString temp = inputText;
// Replace sentence delimiters with tab.
temp.replace(sentenceDelimiter, m_configuredSentenceBoundary);
// Replace remaining newlines with spaces.
temp.replace("\n"," ");
temp.replace("\r"," ");
// Remove leading spaces.
- temp.replace(QRegExp("\\t +"), "\t");
+ temp.replace(TQRegExp("\\t +"), "\t");
// Remove trailing spaces.
- temp.replace(QRegExp(" +\\t"), "\t");
+ temp.replace(TQRegExp(" +\\t"), "\t");
// Remove blank lines.
- temp.replace(QRegExp("\t\t+"),"\t");
+ temp.replace(TQRegExp("\t\t+"),"\t");
return temp;
}
@@ -502,8 +502,8 @@ QString SbdThread::parsePlainText( const QString& inputText, const QString& re )
else
{
// Examine just the first 500 chars to see if it is code.
- QString p = m_text.left( 500 );
- if ( p.contains( QRegExp( "(/\\*)|(if\\b\\()|(^#include\\b)" ) ) )
+ TQString p = m_text.left( 500 );
+ if ( p.contains( TQRegExp( "(/\\*)|(if\\b\\()|(^#include\\b)" ) ) )
textType = ttCode;
else
textType = ttPlain;
@@ -511,11 +511,11 @@ QString SbdThread::parsePlainText( const QString& inputText, const QString& re )
// If application specified a sentence delimiter regular expression, use that,
// otherwise use configured default.
- QString re = m_re;
+ TQString re = m_re;
if ( re.isEmpty() ) re = m_configuredRe;
// Replace spaces, tabs, and formfeeds with a single space.
- m_text.replace(QRegExp("[ \\t\\f]+"), " ");
+ m_text.replace(TQRegExp("[ \\t\\f]+"), " ");
// Perform the filtering based on type of text.
switch ( textType )
@@ -534,7 +534,7 @@ QString SbdThread::parsePlainText( const QString& inputText, const QString& re )
}
// Clear app-specified sentence delimiter. App must call setSbRegExp for each conversion.
- m_re = QString::null;
+ m_re = TQString::null;
// kdDebug() << "SbdThread::run: filtered text = " << m_text << endl;
@@ -542,13 +542,13 @@ QString SbdThread::parsePlainText( const QString& inputText, const QString& re )
// Post an event. We need to emit filterFinished signal, but not from the
// separate thread.
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 301);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 301);
+ TQApplication::postEvent(this, ev);
}
-bool SbdThread::event ( QEvent * e )
+bool SbdThread::event ( TQEvent * e )
{
- if ( e->type() == (QEvent::User + 301) )
+ if ( e->type() == (TQEvent::User + 301) )
{
// kdDebug() << "SbdThread::event: emitting filteringFinished signal." << endl;
emit filteringFinished();
@@ -562,12 +562,12 @@ bool SbdThread::event ( QEvent * e )
/**
* Constructor.
*/
-SbdProc::SbdProc( QObject *parent, const char *name, const QStringList& /*args*/) :
+SbdProc::SbdProc( TQObject *parent, const char *name, const TQStringList& /*args*/) :
KttsFilterProc(parent, name)
{
// kdDebug() << "SbdProc::SbdProc: Running" << endl;
m_sbdThread = new SbdThread( parent, *name + "_thread" );
- connect( m_sbdThread, SIGNAL(filteringFinished()), this, SLOT(slotSbdThreadFilteringFinished()) );
+ connect( m_sbdThread, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotSbdThreadFilteringFinished()) );
}
/**
@@ -596,13 +596,13 @@ SbdProc::~SbdProc()
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
-bool SbdProc::init(KConfig* config, const QString& configGroup){
+bool SbdProc::init(KConfig* config, const TQString& configGroup){
// kdDebug() << "PlugInProc::init: Running" << endl;
config->setGroup( configGroup );
// m_configuredRe = config->readEntry( "SentenceDelimiterRegExp", "([\\.\\?\\!\\:\\;])\\s|(\\n *\\n)" );
m_configuredRe = config->readEntry( "SentenceDelimiterRegExp", "([\\.\\?\\!\\:\\;])(\\s|$|(\\n *\\n))" );
m_sbdThread->setConfiguredSbRegExp( m_configuredRe );
- QString sb = config->readEntry( "SentenceBoundary", "\\1\t" );
+ TQString sb = config->readEntry( "SentenceBoundary", "\\1\t" );
sb.replace( "\\t", "\t" );
m_sbdThread->setConfiguredSentenceBoundary( sb );
m_appIdList = config->readListEntry( "AppID" );
@@ -638,7 +638,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
-/*virtual*/ QString SbdProc::convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId)
+/*virtual*/ TQString SbdProc::convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId)
{
if ( asyncConvert( inputText, talkerCode, appId) )
{
@@ -662,14 +662,14 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){
* program may then call @ref getOutput to retrieve converted text. Calling
* program must call @ref ackFinished to acknowledge the conversion.
*/
-/*virtual*/ bool SbdProc::asyncConvert(const QString& inputText, TalkerCode* talkerCode,
- const QCString& appId)
+/*virtual*/ bool SbdProc::asyncConvert(const TQString& inputText, TalkerCode* talkerCode,
+ const TQCString& appId)
{
m_sbdThread->setWasModified( false );
// If language doesn't match, return input unmolested.
if ( !m_languageCodeList.isEmpty() )
{
- QString languageCode = talkerCode->languageCode();
+ TQString languageCode = talkerCode->languageCode();
// kdDebug() << "StringReplacerProc::convert: converting " << inputText <<
// " if language code " << languageCode << " matches " << m_languageCodeList << endl;
if ( !m_languageCodeList.contains( languageCode ) )
@@ -689,7 +689,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){
// kdDebug() << "SbdProc::convert: converting " << inputText << " if appId "
// << appId << " matches " << m_appIdList << endl;
bool found = false;
- QString appIdStr = appId;
+ TQString appIdStr = appId;
for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx )
{
if ( appIdStr.contains(m_appIdList[ndx]) )
@@ -729,7 +729,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){
/**
* Returns the filtered output.
*/
-/*virtual*/ QString SbdProc::getOutput() { return m_sbdThread->text(); }
+/*virtual*/ TQString SbdProc::getOutput() { return m_sbdThread->text(); }
/**
* Acknowledges the finished filtering.
@@ -737,7 +737,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){
/*virtual*/ void SbdProc::ackFinished()
{
m_state = fsIdle;
- m_sbdThread->setText( QString::null );
+ m_sbdThread->setText( TQString::null );
}
/**
@@ -753,7 +753,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){
delete m_sbdThread;
m_sbdThread = new SbdThread();
m_sbdThread->setConfiguredSbRegExp( m_configuredRe );
- connect( m_sbdThread, SIGNAL(filteringFinished()), this, SLOT(slotSbdThreadFilteringFinished()) );
+ connect( m_sbdThread, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotSbdThreadFilteringFinished()) );
m_state = fsIdle;
emit filteringStopped();
}
@@ -771,7 +771,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){
*
* @param re The sentence delimiter regular expression.
*/
-/*virtual*/ void SbdProc::setSbRegExp(const QString& re) { m_sbdThread->setSbRegExp( re ); }
+/*virtual*/ void SbdProc::setSbRegExp(const TQString& re) { m_sbdThread->setSbRegExp( re ); }
// Received when SBD Thread finishes.
void SbdProc::slotSbdThreadFilteringFinished()
diff --git a/kttsd/filters/sbd/sbdproc.h b/kttsd/filters/sbd/sbdproc.h
index 6c181d5..75e4d59 100644
--- a/kttsd/filters/sbd/sbdproc.h
+++ b/kttsd/filters/sbd/sbdproc.h
@@ -46,11 +46,11 @@
#define _SBDPROC_H_
// Qt includes.
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qthread.h>
-#include <qvaluestack.h>
-#include <qevent.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqthread.h>
+#include <tqvaluestack.h>
+#include <tqevent.h>
// KTTS includes.
#include "filterproc.h"
@@ -60,7 +60,7 @@ class KConfig;
class QDomElement;
class QDomNode;
-class SbdThread: public QObject, public QThread
+class SbdThread: public TQObject, public QThread
{
Q_OBJECT
@@ -68,7 +68,7 @@ class SbdThread: public QObject, public QThread
/**
* Constructor.
*/
- SbdThread( QObject *parent = 0, const char *name = 0);
+ SbdThread( TQObject *parent = 0, const char *name = 0);
/**
* Destructor.
@@ -78,8 +78,8 @@ class SbdThread: public QObject, public QThread
/**
* Get/Set text being processed.
*/
- void setText( const QString& text );
- QString text();
+ void setText( const TQString& text );
+ TQString text();
/**
* Set/Get TalkerCode.
@@ -93,14 +93,14 @@ class SbdThread: public QObject, public QThread
*
* @param re The sentence delimiter regular expression.
*/
- void setSbRegExp( const QString& re );
+ void setSbRegExp( const TQString& re );
/**
* The configured Sentence Boundary Regular Expression.
*
* @param re The sentence delimiter regular expression.
*/
- void setConfiguredSbRegExp( const QString& re );
+ void setConfiguredSbRegExp( const TQString& re );
/**
* The configured Sentence Boundary that replaces SB regular expression.
@@ -108,7 +108,7 @@ class SbdThread: public QObject, public QThread
* @param sb The sentence boundary replacement.
*
*/
- void setConfiguredSentenceBoundary( const QString& sb );
+ void setConfiguredSentenceBoundary( const TQString& sb );
/**
* Did this filter do anything? If the filter returns the input as output
@@ -122,7 +122,7 @@ class SbdThread: public QObject, public QThread
protected:
virtual void run();
- virtual bool event ( QEvent * e );
+ virtual bool event ( TQEvent * e );
private:
enum TextType {
@@ -143,94 +143,94 @@ class SbdThread: public QObject, public QThread
// Speak Element.
struct SpeakElem {
- QString lang; // xml:lang="en".
+ TQString lang; // xml:lang="en".
};
// Voice Element.
struct VoiceElem {
- QString lang; // xml:lang="en".
- QString gender; // "male", "female", or "neutral".
+ TQString lang; // xml:lang="en".
+ TQString gender; // "male", "female", or "neutral".
uint age; // Age in years.
- QString name; // Synth-specific voice name.
- QString variant; // Ignored.
+ TQString name; // Synth-specific voice name.
+ TQString variant; // Ignored.
};
// Prosody Element.
struct ProsodyElem {
- QString pitch; // "x-low", "low", "medium", "high", "x-high", "default".
- QString contour; // Pitch contour (ignored).
- QString range; // "x-low", "low", "medium", "high", "x-high", "default".
- QString rate; // "x-slow", "slow", "medium", "fast", "x-fast", "default".
- QString duration; // Ignored.
- QString volume; // "silent", "x-soft", "soft", "medium", "load", "x-load", "default".
+ TQString pitch; // "x-low", "low", "medium", "high", "x-high", "default".
+ TQString contour; // Pitch contour (ignored).
+ TQString range; // "x-low", "low", "medium", "high", "x-high", "default".
+ TQString rate; // "x-slow", "slow", "medium", "fast", "x-fast", "default".
+ TQString duration; // Ignored.
+ TQString volume; // "silent", "x-soft", "soft", "medium", "load", "x-load", "default".
};
// Emphasis Element.
struct EmphasisElem {
- QString level; // "strong", "moderate", "none" and "reduced"
+ TQString level; // "strong", "moderate", "none" and "reduced"
};
// Break Element.
struct BreakElem {
- QString strength; // "x-weak", "weak", "medium" (default value), "strong",
+ TQString strength; // "x-weak", "weak", "medium" (default value), "strong",
// or "x-strong", "none"
- QString time; // Ignored.
+ TQString time; // Ignored.
};
// Paragraph and Sentence Elements.
struct PSElem {
- QString lang; // xml:lang="en".
+ TQString lang; // xml:lang="en".
};
// Given a tag name, returns SsmlElemType.
- SsmlElemType tagToSsmlElemType(const QString tagName);
+ SsmlElemType tagToSsmlElemType(const TQString tagName);
// Parses an SSML element, pushing current settings onto the context stack.
- void pushSsmlElem( SsmlElemType et, const QDomElement& elem );
+ void pushSsmlElem( SsmlElemType et, const TQDomElement& elem );
// Given an attribute name and value, constructs an XML representation of the attribute,
// i.e., name="value".
- QString makeAttr( const QString& name, const QString& value );
+ TQString makeAttr( const TQString& name, const TQString& value );
// Returns an XML representation of an SSML tag from the top of the context stack.
- QString makeSsmlElem( SsmlElemType et );
+ TQString makeSsmlElem( SsmlElemType et );
// Pops element from the indicated context stack.
void popSsmlElem( SsmlElemType et );
- QString makeBreakElem( const QDomElement& e );
+ TQString makeBreakElem( const TQDomElement& e );
// Converts a text fragment into a CDATA section.
- QString makeCDATA( const QString& text );
+ TQString makeCDATA( const TQString& text );
// Returns an XML representation of an utterance node consisting of voice,
// prosody, and emphasis elements.
- QString makeSentence( const QString& text );
+ TQString makeSentence( const TQString& text );
// Starts a sentence by returning a speak tag.
- QString startSentence();
+ TQString startSentence();
// Ends a sentence and appends a Tab.
- QString endSentence();
+ TQString endSentence();
// Parses a node of the SSML tree and recursively parses its children.
// Returns the filtered text with each sentence a complete ssml tree.
- QString parseSsmlNode( QDomNode& n, const QString& re );
+ TQString parseSsmlNode( TQDomNode& n, const TQString& re );
// Parses Ssml.
- QString parseSsml( const QString& inputText, const QString& re );
+ TQString parseSsml( const TQString& inputText, const TQString& re );
// Parses code. Each newline is converted into a tab character (\t).
- QString parseCode( const QString& inputText );
+ TQString parseCode( const TQString& inputText );
// Parses plain text.
- QString parsePlainText( const QString& inputText, const QString& re );
+ TQString parsePlainText( const TQString& inputText, const TQString& re );
// Context stacks.
- QValueStack<SpeakElem> m_speakStack;
- QValueStack<VoiceElem> m_voiceStack;
- QValueStack<ProsodyElem> m_prosodyStack;
- QValueStack<EmphasisElem> m_emphasisStack;
- QValueStack<PSElem> m_psStack;
+ TQValueStack<SpeakElem> m_speakStack;
+ TQValueStack<VoiceElem> m_voiceStack;
+ TQValueStack<ProsodyElem> m_prosodyStack;
+ TQValueStack<EmphasisElem> m_emphasisStack;
+ TQValueStack<PSElem> m_psStack;
// The text being processed.
- QString m_text;
+ TQString m_text;
// Talker Code.
TalkerCode* m_talkerCode;
// Configured default Sentence Delimiter regular expression.
- QString m_configuredRe;
+ TQString m_configuredRe;
// Configured Sentence Boundary replacement expression.
- QString m_configuredSentenceBoundary;
+ TQString m_configuredSentenceBoundary;
// Application-specified Sentence Delimiter regular expression (if any).
- QString m_re;
+ TQString m_re;
// False if input was not modified.
bool m_wasModified;
// True when a sentence has been started.
@@ -245,7 +245,7 @@ class SbdProc : virtual public KttsFilterProc
/**
* Constructor.
*/
- SbdProc( QObject *parent, const char *name, const QStringList &args = QStringList() );
+ SbdProc( TQObject *parent, const char *name, const TQStringList &args = TQStringList() );
/**
* Destructor.
@@ -261,7 +261,7 @@ class SbdProc : virtual public KttsFilterProc
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
- virtual bool init( KConfig *config, const QString &configGroup );
+ virtual bool init( KConfig *config, const TQString &configGroup );
/**
* Returns True if this filter is a Sentence Boundary Detector.
@@ -291,7 +291,7 @@ class SbdProc : virtual public KttsFilterProc
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
- virtual QString convert( const QString& inputText, TalkerCode* talkerCode, const QCString& appId );
+ virtual TQString convert( const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId );
/**
* Convert input. Runs asynchronously.
@@ -307,7 +307,7 @@ class SbdProc : virtual public KttsFilterProc
* program may then call @ref getOutput to retrieve converted text. Calling
* program must call @ref ackFinished to acknowledge the conversion.
*/
- virtual bool asyncConvert( const QString& inputText, TalkerCode* talkerCode, const QCString& appId );
+ virtual bool asyncConvert( const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId );
/**
* Waits for a previous call to asyncConvert to finish.
@@ -322,7 +322,7 @@ class SbdProc : virtual public KttsFilterProc
/**
* Returns the filtered output.
*/
- virtual QString getOutput();
+ virtual TQString getOutput();
/**
* Acknowledges the finished filtering.
@@ -344,7 +344,7 @@ class SbdProc : virtual public KttsFilterProc
/**
* Set Sentence Boundary Regular Expression.
*/
- virtual void setSbRegExp( const QString& re );
+ virtual void setSbRegExp( const TQString& re );
private slots:
// Received when SBD Thread finishes.
@@ -352,15 +352,15 @@ class SbdProc : virtual public KttsFilterProc
private:
// If not empty, apply filters only to apps using talkers speaking these language codes.
- QStringList m_languageCodeList;
+ TQStringList m_languageCodeList;
// If not empty, apply filter only to apps containing this string.
- QStringList m_appIdList;
+ TQStringList m_appIdList;
// SBD Thread Object.
SbdThread* m_sbdThread;
// State.
int m_state;
// Configured default Sentence Delimiter regular expression.
- QString m_configuredRe;
+ TQString m_configuredRe;
};
#endif // _SBDPROC_H_
diff --git a/kttsd/filters/stringreplacer/stringreplacerconf.cpp b/kttsd/filters/stringreplacer/stringreplacerconf.cpp
index 9afa2d5..72f50d8 100644
--- a/kttsd/filters/stringreplacer/stringreplacerconf.cpp
+++ b/kttsd/filters/stringreplacer/stringreplacerconf.cpp
@@ -22,15 +22,15 @@
******************************************************************************/
// Qt includes.
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qradiobutton.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqradiobutton.h>
// KDE includes.
#include <kglobal.h>
@@ -59,7 +59,7 @@
/**
* Constructor
*/
-StringReplacerConf::StringReplacerConf( QWidget *parent, const char *name, const QStringList& /*args*/) :
+StringReplacerConf::StringReplacerConf( TQWidget *parent, const char *name, const TQStringList& /*args*/) :
KttsFilterConf(parent, name),
m_editDlg(0),
m_editWidget(0)
@@ -67,37 +67,37 @@ StringReplacerConf::StringReplacerConf( QWidget *parent, const char *name, const
// kdDebug() << "StringReplacerConf::StringReplacerConf: Running" << endl;
// Create configuration widget.
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "StringReplacerConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new StringReplacerConfWidget(this, "StringReplacerConfigWidget");
layout->addWidget(m_widget);
m_widget->substLView->setSortColumn(-1);
- connect(m_widget->nameLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->languageBrowseButton, SIGNAL(clicked()),
- this, SLOT(slotLanguageBrowseButton_clicked()));
- connect(m_widget->addButton, SIGNAL(clicked()),
- this, SLOT(slotAddButton_clicked()));
- connect(m_widget->upButton, SIGNAL(clicked()),
- this, SLOT(slotUpButton_clicked()));
- connect(m_widget->downButton, SIGNAL(clicked()),
- this, SLOT(slotDownButton_clicked()));
- connect(m_widget->editButton, SIGNAL(clicked()),
- this, SLOT(slotEditButton_clicked()));
- connect(m_widget->removeButton, SIGNAL(clicked()),
- this, SLOT(slotRemoveButton_clicked()));
- connect(m_widget->loadButton, SIGNAL(clicked()),
- this, SLOT(slotLoadButton_clicked()));
- connect(m_widget->saveButton, SIGNAL(clicked()),
- this, SLOT(slotSaveButton_clicked()));
- connect(m_widget->clearButton, SIGNAL(clicked()),
- this, SLOT(slotClearButton_clicked()));
- connect(m_widget->substLView, SIGNAL(selectionChanged()),
- this, SLOT(enableDisableButtons()));
- connect(m_widget->appIdLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
+ connect(m_widget->nameLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->languageBrowseButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotLanguageBrowseButton_clicked()));
+ connect(m_widget->addButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotAddButton_clicked()));
+ connect(m_widget->upButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotUpButton_clicked()));
+ connect(m_widget->downButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotDownButton_clicked()));
+ connect(m_widget->editButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotEditButton_clicked()));
+ connect(m_widget->removeButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotRemoveButton_clicked()));
+ connect(m_widget->loadButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotLoadButton_clicked()));
+ connect(m_widget->saveButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSaveButton_clicked()));
+ connect(m_widget->clearButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotClearButton_clicked()));
+ connect(m_widget->substLView, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(enableDisableButtons()));
+ connect(m_widget->appIdLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
// Determine if kdeutils Regular Expression Editor is installed.
m_reEditorInstalled = !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty();
@@ -126,14 +126,14 @@ StringReplacerConf::~StringReplacerConf(){
* @param configGroup Call config->setGroup with this argument before
* loading your configuration.
*/
-void StringReplacerConf::load(KConfig* config, const QString& configGroup){
+void StringReplacerConf::load(KConfig* config, const TQString& configGroup){
// kdDebug() << "StringReplacerConf::load: Running" << endl;
// See if this filter previously save its word list.
config->setGroup( configGroup );
- QString wordsFilename = config->readEntry( "WordListFile" );
+ TQString wordsFilename = config->readEntry( "WordListFile" );
if ( !wordsFilename.isEmpty() )
{
- QString errMsg = loadFromFile( wordsFilename, true );
+ TQString errMsg = loadFromFile( wordsFilename, true );
if ( !errMsg.isEmpty() )
kdDebug() << "StringReplacerConf::load: " << errMsg << endl;
enableDisableButtons();
@@ -141,16 +141,16 @@ void StringReplacerConf::load(KConfig* config, const QString& configGroup){
}
// Loads word list and settings from a file. Clearing configuration if clear is True.
-QString StringReplacerConf::loadFromFile( const QString& filename, bool clear)
+TQString StringReplacerConf::loadFromFile( const TQString& filename, bool clear)
{
// Open existing word list.
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_ReadOnly ) )
{
return i18n("Unable to open file.") + filename;
}
- // QDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" );
- QDomDocument doc( "" );
+ // TQDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" );
+ TQDomDocument doc( "" );
if ( !doc.setContent( &file ) ) {
file.close();
return i18n("File not in proper XML format.");
@@ -162,26 +162,26 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear)
if ( clear ) m_widget->substLView->clear();
// Name setting.
- QDomNodeList nameList = doc.elementsByTagName( "name" );
- QDomNode nameNode = nameList.item( 0 );
+ TQDomNodeList nameList = doc.elementsByTagName( "name" );
+ TQDomNode nameNode = nameList.item( 0 );
m_widget->nameLineEdit->setText( nameNode.toElement().text() );
// kdDebug() << "StringReplacerConf::load: name = " << nameNode.toElement().text() << endl;
// Language Codes setting. List may be single element of comma-separated values,
// or multiple elements.
- QString languageCodes;
- QDomNodeList languageList = doc.elementsByTagName( "language-code" );
+ TQString languageCodes;
+ TQDomNodeList languageList = doc.elementsByTagName( "language-code" );
for ( uint ndx=0; ndx < languageList.count(); ++ndx )
{
- QDomNode languageNode = languageList.item( ndx );
+ TQDomNode languageNode = languageList.item( ndx );
if (!languageCodes.isEmpty()) languageCodes += ",";
languageCodes += languageNode.toElement().text();
}
if ( clear )
- m_languageCodeList = QStringList::split(',', languageCodes, false);
+ m_languageCodeList = TQStringList::split(',', languageCodes, false);
else
- m_languageCodeList += QStringList::split(',', languageCodes, false);
- QString language;
+ m_languageCodeList += TQStringList::split(',', languageCodes, false);
+ TQString language;
m_languageCodeList.sort();
// Eliminate dups.
for ( int ndx = m_languageCodeList.count() - 2; ndx >= 0; --ndx )
@@ -199,11 +199,11 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear)
// AppId. Apply this filter only if DCOP appId of application that queued
// the text contains this string. List may be single element of comma-separated values,
// or multiple elements.
- QDomNodeList appIdList = doc.elementsByTagName( "appid" );
- QString appIds;
+ TQDomNodeList appIdList = doc.elementsByTagName( "appid" );
+ TQString appIds;
for ( uint ndx=0; ndx < appIdList.count(); ++ndx )
{
- QDomNode appIdNode = appIdList.item( ndx );
+ TQDomNode appIdNode = appIdList.item( ndx );
if (!appIds.isEmpty()) appIds += ",";
appIds += appIdNode.toElement().text();
}
@@ -211,32 +211,32 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear)
m_widget->appIdLineEdit->setText( appIds );
// Word list.
- QListViewItem* item = 0;
+ TQListViewItem* item = 0;
if ( !clear ) item = m_widget->substLView->lastChild();
- QDomNodeList wordList = doc.elementsByTagName("word");
+ TQDomNodeList wordList = doc.elementsByTagName("word");
const int wordListCount = wordList.count();
for (int wordIndex = 0; wordIndex < wordListCount; ++wordIndex)
{
// kdDebug() << "StringReplacerConf::load: start parsing of word " << wordIndex << endl;
- QDomNode wordNode = wordList.item(wordIndex);
- QDomNodeList propList = wordNode.childNodes();
- QString wordType;
- QString matchCase = "No"; // Default for old (v<=3.5.3) config files with no <case/>.
- QString match;
- QString subst;
+ TQDomNode wordNode = wordList.item(wordIndex);
+ TQDomNodeList propList = wordNode.childNodes();
+ TQString wordType;
+ TQString matchCase = "No"; // Default for old (v<=3.5.3) config files with no <case/>.
+ TQString match;
+ TQString subst;
const int propListCount = propList.count();
for (int propIndex = 0; propIndex < propListCount; ++propIndex)
{
- QDomNode propNode = propList.item(propIndex);
- QDomElement prop = propNode.toElement();
+ TQDomNode propNode = propList.item(propIndex);
+ TQDomElement prop = propNode.toElement();
if (prop.tagName() == "type") wordType = prop.text();
if (prop.tagName() == "case") matchCase = prop.text();
if (prop.tagName() == "match") match = prop.text();
if (prop.tagName() == "subst") subst = prop.text();
}
- QString wordTypeStr =
+ TQString wordTypeStr =
(wordType=="RegExp"?i18n("Abbreviation for 'Regular Expression'", "RegExp"):i18n("Word"));
- QString matchCaseStr =
+ TQString matchCaseStr =
(matchCase=="Yes"?i18n("Yes"):i18n("No"));
if (!item)
item = new KListViewItem(m_widget->substLView, wordTypeStr, matchCaseStr, match, subst);
@@ -244,7 +244,7 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear)
item = new KListViewItem(m_widget->substLView, item, wordTypeStr, matchCaseStr, match, subst);
}
- return QString::null;
+ return TQString::null;
}
/**
@@ -257,9 +257,9 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear)
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
-void StringReplacerConf::save(KConfig* config, const QString& configGroup){
+void StringReplacerConf::save(KConfig* config, const TQString& configGroup){
// kdDebug() << "StringReplacerConf::save: Running" << endl;
- QString wordsFilename =
+ TQString wordsFilename =
KGlobal::dirs()->saveLocation( "data" ,"kttsd/stringreplacer/", true );
if ( wordsFilename.isEmpty() )
{
@@ -267,7 +267,7 @@ void StringReplacerConf::save(KConfig* config, const QString& configGroup){
return;
}
wordsFilename += configGroup;
- QString errMsg = saveToFile( wordsFilename );
+ TQString errMsg = saveToFile( wordsFilename );
if ( errMsg.isEmpty() )
{
config->setGroup( configGroup );
@@ -278,43 +278,43 @@ void StringReplacerConf::save(KConfig* config, const QString& configGroup){
}
// Saves word list and settings to a file.
-QString StringReplacerConf::saveToFile(const QString& filename)
+TQString StringReplacerConf::saveToFile(const TQString& filename)
{
// kdDebug() << "StringReplacerConf::saveToFile: saving to file " << wordsFilename << endl;
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_WriteOnly ) )
return i18n("Unable to open file ") + filename;
- // QDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" );
- QDomDocument doc( "" );
+ // TQDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" );
+ TQDomDocument doc( "" );
- QDomElement root = doc.createElement( "wordlist" );
+ TQDomElement root = doc.createElement( "wordlist" );
doc.appendChild( root );
// Name.
- QDomElement name = doc.createElement( "name" );
+ TQDomElement name = doc.createElement( "name" );
root.appendChild( name );
- QDomText t = doc.createTextNode( m_widget->nameLineEdit->text() );
+ TQDomText t = doc.createTextNode( m_widget->nameLineEdit->text() );
name.appendChild( t );
// Language code.
for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx )
{
- QDomElement languageCode = doc.createElement( "language-code" );
+ TQDomElement languageCode = doc.createElement( "language-code" );
root.appendChild( languageCode );
t = doc.createTextNode( m_languageCodeList[ndx] );
languageCode.appendChild( t );
}
// Application ID
- QString appId = m_widget->appIdLineEdit->text().replace(" ", "");
+ TQString appId = m_widget->appIdLineEdit->text().replace(" ", "");
if ( !appId.isEmpty() )
{
- QStringList appIdList = QStringList::split(",", appId);
+ TQStringList appIdList = TQStringList::split(",", appId);
for ( uint ndx=0; ndx < appIdList.count(); ++ndx )
{
- QDomElement appIdElem = doc.createElement( "appid" );
+ TQDomElement appIdElem = doc.createElement( "appid" );
root.appendChild( appIdElem );
t = doc.createTextNode( appIdList[ndx] );
appIdElem.appendChild( t );
@@ -322,15 +322,15 @@ QString StringReplacerConf::saveToFile(const QString& filename)
}
// Words.
- QListView* lView = m_widget->substLView;
- QListViewItem* item = lView->firstChild();
+ TQListView* lView = m_widget->substLView;
+ TQListViewItem* item = lView->firstChild();
while (item)
{
- QDomElement wordTag = doc.createElement( "word" );
+ TQDomElement wordTag = doc.createElement( "word" );
root.appendChild( wordTag );
- QDomElement propTag = doc.createElement( "type" );
+ TQDomElement propTag = doc.createElement( "type" );
wordTag.appendChild( propTag);
- QDomText t = doc.createTextNode( item->text(0)==i18n("Word")?"Word":"RegExp" );
+ TQDomText t = doc.createTextNode( item->text(0)==i18n("Word")?"Word":"RegExp" );
propTag.appendChild( t );
propTag = doc.createElement( "case" );
@@ -352,14 +352,14 @@ QString StringReplacerConf::saveToFile(const QString& filename)
}
// Write it all out.
- QTextStream ts( &file );
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream ts( &file );
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
ts << doc.toString();
// kdDebug() << "StringReplacerConf::saveToFile: writing out " << doc.toString() << endl;
file.close();
- return QString::null;
+ return TQString::null;
}
/**
@@ -398,13 +398,13 @@ bool StringReplacerConf::supportsMultiInstance() { return true; }
* return an empty string.
* @return Filter instance name.
*/
-QString StringReplacerConf::userPlugInName()
+TQString StringReplacerConf::userPlugInName()
{
- if ( m_widget->substLView->childCount() == 0 ) return QString::null;
- QString instName = m_widget->nameLineEdit->text();
+ if ( m_widget->substLView->childCount() == 0 ) return TQString::null;
+ TQString instName = m_widget->nameLineEdit->text();
if ( instName.isEmpty() )
{
- QString language;
+ TQString language;
if (m_languageCodeList.count() == 1)
language = KGlobal::locale()->twoAlphaToLanguageName(m_languageCodeList[0]);
if (m_languageCodeList.count() > 1)
@@ -417,21 +417,21 @@ QString StringReplacerConf::userPlugInName()
void StringReplacerConf::slotLanguageBrowseButton_clicked()
{
- // Create a QHBox to host KListView.
- QHBox* hBox = new QHBox(m_widget, "SelectLanguage_hbox");
+ // Create a TQHBox to host KListView.
+ TQHBox* hBox = new TQHBox(m_widget, "SelectLanguage_hbox");
// Create a KListView and fill with all known languages.
KListView* langLView = new KListView(hBox, "SelectLanguage_lview");
langLView->addColumn(i18n("Language"));
langLView->addColumn(i18n("Code"));
- langLView->setSelectionMode(QListView::Extended);
- QStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha();
- QString locale;
- QString languageCode;
- QString countryCode;
- QString charSet;
- QString language;
+ langLView->setSelectionMode(TQListView::Extended);
+ TQStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha();
+ TQString locale;
+ TQString languageCode;
+ TQString countryCode;
+ TQString charSet;
+ TQString language;
// Blank line so user can select no language.
- QListViewItem* item = new KListViewItem(langLView, "", "");
+ TQListViewItem* item = new KListViewItem(langLView, "", "");
if (m_languageCodeList.isEmpty()) item->setSelected(true);
const int allLocalesCount = allLocales.count();
for (int ndx=0; ndx < allLocalesCount; ++ndx)
@@ -459,13 +459,13 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked()
true);
dlg->setMainWidget(hBox);
dlg->setHelp("", "kttsd");
- dlg->setInitialSize(QSize(300, 500), false);
+ dlg->setInitialSize(TQSize(300, 500), false);
int dlgResult = dlg->exec();
- languageCode = QString::null;
- if (dlgResult == QDialog::Accepted)
+ languageCode = TQString::null;
+ if (dlgResult == TQDialog::Accepted)
{
m_languageCodeList.clear();
- QListViewItem* item = langLView->firstChild();
+ TQListViewItem* item = langLView->firstChild();
while (item)
{
if (item->isSelected()) m_languageCodeList += item->text(1);
@@ -474,17 +474,17 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked()
}
delete dlg;
// TODO: Also delete KListView and QHBox?
- if (dlgResult != QDialog::Accepted) return;
+ if (dlgResult != TQDialog::Accepted) return;
language = "";
for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx)
{
if (!language.isEmpty()) language += ",";
language += KGlobal::locale()->twoAlphaToLanguageName(m_languageCodeList[ndx]);
}
- QString s1 = m_widget->languageLineEdit->text();
+ TQString s1 = m_widget->languageLineEdit->text();
m_widget->languageLineEdit->setText(language);
// Replace language in the user's filter name.
- QString s2 = m_widget->nameLineEdit->text();
+ TQString s2 = m_widget->nameLineEdit->text();
if (m_languageCodeList.count() > 1) language = i18n("Multiple Languages");
if ( !s1.isEmpty() )
{
@@ -518,9 +518,9 @@ void StringReplacerConf::enableDisableButtons()
void StringReplacerConf::slotUpButton_clicked()
{
- QListViewItem* item = m_widget->substLView->selectedItem();
+ TQListViewItem* item = m_widget->substLView->selectedItem();
if (!item) return;
- QListViewItem* prevItem = item->itemAbove();
+ TQListViewItem* prevItem = item->itemAbove();
if (!prevItem) return;
prevItem->moveItem(item);
m_widget->substLView->setSelected(item, true);
@@ -531,9 +531,9 @@ void StringReplacerConf::slotUpButton_clicked()
void StringReplacerConf::slotDownButton_clicked()
{
- QListViewItem* item = m_widget->substLView->selectedItem();
+ TQListViewItem* item = m_widget->substLView->selectedItem();
if (!item) return;
- QListViewItem* nextItem = item->itemBelow();
+ TQListViewItem* nextItem = item->itemBelow();
if (!nextItem) return;
item->moveItem(nextItem);
m_widget->substLView->setSelected(item, true);
@@ -555,7 +555,7 @@ void StringReplacerConf::slotEditButton_clicked()
// Displays the add/edit string replacement dialog.
void StringReplacerConf::addOrEditSubstitution(bool isAdd)
{
- QListViewItem* item = 0;
+ TQListViewItem* item = 0;
if (isAdd)
item = m_widget->substLView->lastChild();
else
@@ -563,8 +563,8 @@ void StringReplacerConf::addOrEditSubstitution(bool isAdd)
item = m_widget->substLView->selectedItem();
if (!item) return;
}
- // Create a QHBox to host widget.
- QHBox* hBox = new QHBox(m_widget, "AddOrEditSubstitution_hbox" );
+ // Create a TQHBox to host widget.
+ TQHBox* hBox = new TQHBox(m_widget, "AddOrEditSubstitution_hbox" );
// Create widget.
m_editWidget = new EditReplacementWidget( hBox, "AddOrEditSubstitution_widget" );
// Set controls if editing existing.
@@ -581,14 +581,14 @@ void StringReplacerConf::addOrEditSubstitution(bool isAdd)
m_editWidget->substLineEdit->setText( item->text(3) );
}
// The match box may not be blank.
- connect( m_editWidget->matchLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotMatchLineEdit_textChanged(const QString&)) );
- connect( m_editWidget->regexpRadioButton, SIGNAL(clicked()),
- this, SLOT(slotTypeButtonGroup_clicked()) );
- connect( m_editWidget->wordRadioButton, SIGNAL(clicked()),
- this, SLOT(slotTypeButtonGroup_clicked()) );
- connect( m_editWidget->matchButton, SIGNAL(clicked()),
- this, SLOT(slotMatchButton_clicked()) );
+ connect( m_editWidget->matchLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotMatchLineEdit_textChanged(const TQString&)) );
+ connect( m_editWidget->regexpRadioButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotTypeButtonGroup_clicked()) );
+ connect( m_editWidget->wordRadioButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotTypeButtonGroup_clicked()) );
+ connect( m_editWidget->matchButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotMatchButton_clicked()) );
// Display the box in a dialog.
m_editDlg = new KDialogBase(
KDialogBase::Swallow,
@@ -604,17 +604,17 @@ void StringReplacerConf::addOrEditSubstitution(bool isAdd)
m_editDlg->setHelp( "", "kttsd" );
m_editDlg->enableButton( KDialogBase::Ok, !m_editWidget->matchLineEdit->text().isEmpty() );
int dlgResult = m_editDlg->exec();
- QString substType = i18n( "Word" );
+ TQString substType = i18n( "Word" );
if ( m_editWidget->regexpRadioButton->isChecked() )
substType = i18n("Abbreviation for 'Regular Expression'", "RegExp");
- QString matchCase = i18n("No");
+ TQString matchCase = i18n("No");
if ( m_editWidget->caseCheckBox->isChecked() ) matchCase = i18n("Yes");
- QString match = m_editWidget->matchLineEdit->text();
- QString subst = m_editWidget->substLineEdit->text();
+ TQString match = m_editWidget->matchLineEdit->text();
+ TQString subst = m_editWidget->substLineEdit->text();
delete m_editDlg;
m_editDlg = 0;
m_editWidget = 0;
- if (dlgResult != QDialog::Accepted) return;
+ if (dlgResult != TQDialog::Accepted) return;
// TODO: Also delete hBox and w?
if ( match.isEmpty() ) return;
if ( isAdd )
@@ -637,7 +637,7 @@ void StringReplacerConf::addOrEditSubstitution(bool isAdd)
configChanged();
}
-void StringReplacerConf::slotMatchLineEdit_textChanged(const QString& text)
+void StringReplacerConf::slotMatchLineEdit_textChanged(const TQString& text)
{
// Disable OK button if match field blank.
if ( !m_editDlg ) return;
@@ -646,7 +646,7 @@ void StringReplacerConf::slotMatchLineEdit_textChanged(const QString& text)
void StringReplacerConf::slotRemoveButton_clicked()
{
- QListViewItem* item = m_widget->substLView->selectedItem();
+ TQListViewItem* item = m_widget->substLView->selectedItem();
if (!item) return;
delete item;
enableDisableButtons();
@@ -666,8 +666,8 @@ void StringReplacerConf::slotMatchButton_clicked()
if ( !m_editWidget ) return;
if ( !m_editDlg ) return;
if ( !m_reEditorInstalled ) return;
- QDialog *editorDialog =
- KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor" );
+ TQDialog *editorDialog =
+ KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" );
if ( editorDialog )
{
// kdeutils was installed, so the dialog was found. Fetch the editor interface.
@@ -676,9 +676,9 @@ void StringReplacerConf::slotMatchButton_clicked()
Q_ASSERT( reEditor ); // This should not fail!// now use the editor.
reEditor->setRegExp( m_editWidget->matchLineEdit->text() );
int dlgResult = editorDialog->exec();
- if ( dlgResult == QDialog::Accepted )
+ if ( dlgResult == TQDialog::Accepted )
{
- QString re = reEditor->regExp();
+ TQString re = reEditor->regExp();
m_editWidget->matchLineEdit->setText( re );
m_editDlg->enableButton( KDialogBase::Ok, !re.isEmpty() );
}
@@ -688,15 +688,15 @@ void StringReplacerConf::slotMatchButton_clicked()
void StringReplacerConf::slotLoadButton_clicked()
{
- // QString dataDir = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/stringreplacer/";
- QString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/stringreplacer/").last();
- QString filename = KFileDialog::getOpenFileName(
+ // TQString dataDir = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/stringreplacer/";
+ TQString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/stringreplacer/").last();
+ TQString filename = KFileDialog::getOpenFileName(
dataDir,
"*.xml|String Replacer Word List (*.xml)",
m_widget,
"stringreplacer_loadfile");
if ( filename.isEmpty() ) return;
- QString errMsg = loadFromFile( filename, false );
+ TQString errMsg = loadFromFile( filename, false );
enableDisableButtons();
if ( !errMsg.isEmpty() )
KMessageBox::sorry( m_widget, errMsg, i18n("Error Opening File") );
@@ -706,13 +706,13 @@ void StringReplacerConf::slotLoadButton_clicked()
void StringReplacerConf::slotSaveButton_clicked()
{
- QString filename = KFileDialog::getSaveFileName(
+ TQString filename = KFileDialog::getSaveFileName(
KGlobal::dirs()->saveLocation( "data" ,"kttsd/stringreplacer/", false ),
"*.xml|String Replacer Word List (*.xml)",
m_widget,
"stringreplacer_savefile");
if ( filename.isEmpty() ) return;
- QString errMsg = saveToFile( filename );
+ TQString errMsg = saveToFile( filename );
enableDisableButtons();
if ( !errMsg.isEmpty() )
KMessageBox::sorry( m_widget, errMsg, i18n("Error Opening File") );
diff --git a/kttsd/filters/stringreplacer/stringreplacerconf.h b/kttsd/filters/stringreplacer/stringreplacerconf.h
index f0312a6..1606390 100644
--- a/kttsd/filters/stringreplacer/stringreplacerconf.h
+++ b/kttsd/filters/stringreplacer/stringreplacerconf.h
@@ -25,7 +25,7 @@
#define _STRINGREPLACERCONF_H_
// Qt includes.
-#include <qwidget.h>
+#include <tqwidget.h>
// KDE includes.
#include <kconfig.h>
@@ -48,7 +48,7 @@ class StringReplacerConf : public KttsFilterConf
/**
* Constructor
*/
- StringReplacerConf( QWidget *parent, const char *name, const QStringList &args = QStringList() );
+ StringReplacerConf( TQWidget *parent, const char *name, const TQStringList &args = TQStringList() );
/**
* Destructor
@@ -78,7 +78,7 @@ class StringReplacerConf : public KttsFilterConf
* any instance-specific parameters to load, but it may still wish
* to load parameters that apply to all instances of the plugin.
*/
- virtual void load(KConfig *config, const QString &configGroup);
+ virtual void load(KConfig *config, const TQString &configGroup);
/**
* This function gets called when the user wants to save the settings in
@@ -90,7 +90,7 @@ class StringReplacerConf : public KttsFilterConf
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
- virtual void save(KConfig *config, const QString &configGroup);
+ virtual void save(KConfig *config, const TQString &configGroup);
/**
* This function is called to set the settings in the module to sensible
@@ -116,7 +116,7 @@ class StringReplacerConf : public KttsFilterConf
* return an empty string.
* @return Filter instance name.
*/
- virtual QString userPlugInName();
+ virtual TQString userPlugInName();
private slots:
void slotLanguageBrowseButton_clicked();
@@ -125,7 +125,7 @@ class StringReplacerConf : public KttsFilterConf
void slotDownButton_clicked();
void slotEditButton_clicked();
void slotRemoveButton_clicked();
- void slotMatchLineEdit_textChanged(const QString& text);
+ void slotMatchLineEdit_textChanged(const TQString& text);
void slotTypeButtonGroup_clicked();
void slotMatchButton_clicked();
void slotLoadButton_clicked();
@@ -139,9 +139,9 @@ class StringReplacerConf : public KttsFilterConf
// Displays the add/edit string replacement dialog.
void addOrEditSubstitution(bool isAdd);
// Loads word list and settings from a file. Clearing configuration if clear is True.
- QString loadFromFile( const QString& filename, bool clear);
+ TQString loadFromFile( const TQString& filename, bool clear);
// Saves word list and settings to a file.
- QString saveToFile( const QString& filename );
+ TQString saveToFile( const TQString& filename );
// Configuration Widget.
@@ -152,7 +152,7 @@ class StringReplacerConf : public KttsFilterConf
// True if kdeutils Regular Expression Editor is installed.
bool m_reEditorInstalled;
// Language Codes.
- QStringList m_languageCodeList;
+ TQStringList m_languageCodeList;
};
#endif //_STRINGREPLACERCONF_H_
diff --git a/kttsd/filters/stringreplacer/stringreplacerproc.cpp b/kttsd/filters/stringreplacer/stringreplacerproc.cpp
index 1b03810..8987d79 100644
--- a/kttsd/filters/stringreplacer/stringreplacerproc.cpp
+++ b/kttsd/filters/stringreplacer/stringreplacerproc.cpp
@@ -22,9 +22,9 @@
******************************************************************************/
// Qt includes.
-#include <qdom.h>
-#include <qfile.h>
-#include <qlistview.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqlistview.h>
// KDE includes.
#include <kdebug.h>
@@ -44,7 +44,7 @@
/**
* Constructor.
*/
-StringReplacerProc::StringReplacerProc( QObject *parent, const char *name, const QStringList& ) :
+StringReplacerProc::StringReplacerProc( TQObject *parent, const char *name, const TQStringList& ) :
KttsFilterProc(parent, name)
{
}
@@ -68,9 +68,9 @@ StringReplacerProc::StringReplacerProc( QObject *parent, const char *name, const
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
-bool StringReplacerProc::init(KConfig* config, const QString& configGroup){
+bool StringReplacerProc::init(KConfig* config, const TQString& configGroup){
// kdDebug() << "StringReplacerProc::init: Running" << endl;
- QString wordsFilename =
+ TQString wordsFilename =
KGlobal::dirs()->saveLocation( "data" ,"kttsd/stringreplacer/", false );
if ( wordsFilename.isEmpty() ) return false;
wordsFilename += configGroup;
@@ -78,10 +78,10 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){
wordsFilename = config->readEntry( "WordListFile", wordsFilename );
// Open existing word list.
- QFile file( wordsFilename );
+ TQFile file( wordsFilename );
if ( !file.open( IO_ReadOnly ) )
return false;
- QDomDocument doc( "" );
+ TQDomDocument doc( "" );
if ( !doc.setContent( &file ) ) {
file.close();
return false;
@@ -94,54 +94,54 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){
m_substList.clear();
// Name setting.
- // QDomNodeList nameList = doc.elementsByTagName( "name" );
- // QDomNode nameNode = nameList.item( 0 );
+ // TQDomNodeList nameList = doc.elementsByTagName( "name" );
+ // TQDomNode nameNode = nameList.item( 0 );
// m_widget->nameLineEdit->setText( nameNode.toElement().text() );
// Language Codes setting. List may be single element of comma-separated values,
// or multiple elements.
m_languageCodeList.clear();
- QDomNodeList languageList = doc.elementsByTagName( "language-code" );
+ TQDomNodeList languageList = doc.elementsByTagName( "language-code" );
for ( uint ndx=0; ndx < languageList.count(); ++ndx )
{
- QDomNode languageNode = languageList.item( ndx );
- m_languageCodeList += QStringList::split(',', languageNode.toElement().text(), false);
+ TQDomNode languageNode = languageList.item( ndx );
+ m_languageCodeList += TQStringList::split(',', languageNode.toElement().text(), false);
}
// AppId. Apply this filter only if DCOP appId of application that queued
// the text contains this string. List may be single element of comma-separated values,
// or multiple elements.
m_appIdList.clear();
- QDomNodeList appIdList = doc.elementsByTagName( "appid" );
+ TQDomNodeList appIdList = doc.elementsByTagName( "appid" );
for ( uint ndx=0; ndx < appIdList.count(); ++ndx )
{
- QDomNode appIdNode = appIdList.item( ndx );
- m_appIdList += QStringList::split(',', appIdNode.toElement().text(), false);
+ TQDomNode appIdNode = appIdList.item( ndx );
+ m_appIdList += TQStringList::split(',', appIdNode.toElement().text(), false);
}
// Word list.
- QDomNodeList wordList = doc.elementsByTagName("word");
+ TQDomNodeList wordList = doc.elementsByTagName("word");
const int wordListCount = wordList.count();
for (int wordIndex = 0; wordIndex < wordListCount; ++wordIndex)
{
- QDomNode wordNode = wordList.item(wordIndex);
- QDomNodeList propList = wordNode.childNodes();
- QString wordType;
- QString matchCase = "No"; // Default for old (v<=3.5.3) config files with no <case/>.
- QString match;
- QString subst;
+ TQDomNode wordNode = wordList.item(wordIndex);
+ TQDomNodeList propList = wordNode.childNodes();
+ TQString wordType;
+ TQString matchCase = "No"; // Default for old (v<=3.5.3) config files with no <case/>.
+ TQString match;
+ TQString subst;
const int propListCount = propList.count();
for (int propIndex = 0; propIndex < propListCount; ++propIndex)
{
- QDomNode propNode = propList.item(propIndex);
- QDomElement prop = propNode.toElement();
+ TQDomNode propNode = propList.item(propIndex);
+ TQDomElement prop = propNode.toElement();
if (prop.tagName() == "type") wordType = prop.text();
if (prop.tagName() == "case") matchCase = prop.text();
if (prop.tagName() == "match") match = prop.text();
if (prop.tagName() == "subst") subst = prop.text();
}
// Build Regular Expression for each word's match string.
- QRegExp rx;
+ TQRegExp rx;
rx.setCaseSensitive(matchCase == "Yes");
if ( wordType == "Word" )
{
@@ -171,13 +171,13 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
-/*virtual*/ QString StringReplacerProc::convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId)
+/*virtual*/ TQString StringReplacerProc::convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId)
{
m_wasModified = false;
// If language doesn't match, return input unmolested.
if ( !m_languageCodeList.isEmpty() )
{
- QString languageCode = talkerCode->languageCode();
+ TQString languageCode = talkerCode->languageCode();
// kdDebug() << "StringReplacerProc::convert: converting " << inputText <<
// " if language code " << languageCode << " matches " << m_languageCodeList << endl;
if ( !m_languageCodeList.contains( languageCode ) )
@@ -197,7 +197,7 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){
// kdDebug() << "StringReplacerProc::convert: converting " << inputText << " if appId "
// << appId << " matches " << m_appIdList << endl;
bool found = false;
- QString appIdStr = appId;
+ TQString appIdStr = appId;
for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx )
{
if ( appIdStr.contains(m_appIdList[ndx]) )
@@ -212,7 +212,7 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){
return inputText;
}
}
- QString newText = inputText;
+ TQString newText = inputText;
const int listCount = m_matchList.count();
for ( int index = 0; index < listCount; ++index )
{
diff --git a/kttsd/filters/stringreplacer/stringreplacerproc.h b/kttsd/filters/stringreplacer/stringreplacerproc.h
index 114ebaf..b679113 100644
--- a/kttsd/filters/stringreplacer/stringreplacerproc.h
+++ b/kttsd/filters/stringreplacer/stringreplacerproc.h
@@ -26,11 +26,11 @@
#define _STRINGREPLACERPROC_H_
// Qt includes.
-#include <qobject.h>
-#include <qtextstream.h>
-#include <qvaluelist.h>
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqtextstream.h>
+#include <tqvaluelist.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
// KTTS includes.
#include "filterproc.h"
@@ -43,7 +43,7 @@ public:
/**
* Constructor.
*/
- StringReplacerProc( QObject *parent, const char *name, const QStringList &args = QStringList() );
+ StringReplacerProc( TQObject *parent, const char *name, const TQStringList &args = TQStringList() );
/**
* Destructor.
@@ -59,7 +59,7 @@ public:
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Convert input, returning output.
@@ -70,7 +70,7 @@ public:
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
- virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId);
+ virtual TQString convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId);
/**
* Did this filter do anything? If the filter returns the input as output
@@ -80,16 +80,16 @@ public:
private:
// Language codes supported by the filter.
- QStringList m_languageCodeList;
+ TQStringList m_languageCodeList;
// If not empty, apply filter only to apps containing one or more of these strings.
- QStringList m_appIdList;
+ TQStringList m_appIdList;
// List of regular expressions to match.
- QValueList<QRegExp> m_matchList;
+ TQValueList<TQRegExp> m_matchList;
// List of match case flag
- QValueList<QString> m_caseList;
+ TQValueList<TQString> m_caseList;
// List of substitutions to replace matches.
- QValueList<QString> m_substList;
+ TQValueList<TQString> m_substList;
// True if this filter did anything to the text.
bool m_wasModified;
};
diff --git a/kttsd/filters/talkerchooser/talkerchooserconf.cpp b/kttsd/filters/talkerchooser/talkerchooserconf.cpp
index 0dbf53f..cc811a3 100644
--- a/kttsd/filters/talkerchooser/talkerchooserconf.cpp
+++ b/kttsd/filters/talkerchooser/talkerchooserconf.cpp
@@ -22,9 +22,9 @@
******************************************************************************/
// Qt includes.
-#include <qstring.h>
-#include <qhbox.h>
-#include <qlayout.h>
+#include <tqstring.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
// KDE includes.
#include <klocale.h>
@@ -49,13 +49,13 @@
/**
* Constructor
*/
-TalkerChooserConf::TalkerChooserConf( QWidget *parent, const char *name, const QStringList& /*args*/) :
+TalkerChooserConf::TalkerChooserConf( TQWidget *parent, const char *name, const TQStringList& /*args*/) :
KttsFilterConf(parent, name)
{
// kdDebug() << "TalkerChooserConf::TalkerChooserConf: Running" << endl;
// Create configuration widget.
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "TalkerChooserConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new TalkerChooserConfWidget(this, "TalkerChooserConfigWidget");
@@ -65,23 +65,23 @@ TalkerChooserConf::TalkerChooserConf( QWidget *parent, const char *name, const Q
m_reEditorInstalled = !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty();
m_widget->reEditorButton->setEnabled(m_reEditorInstalled);
- connect(m_widget->nameLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->reLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->reEditorButton, SIGNAL(clicked()),
- this, SLOT(slotReEditorButton_clicked()));
- connect(m_widget->appIdLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->talkerButton, SIGNAL(clicked()),
- this, SLOT(slotTalkerButton_clicked()));
+ connect(m_widget->nameLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->reLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->reEditorButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotReEditorButton_clicked()));
+ connect(m_widget->appIdLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->talkerButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotTalkerButton_clicked()));
- connect(m_widget->loadButton, SIGNAL(clicked()),
- this, SLOT(slotLoadButton_clicked()));
- connect(m_widget->saveButton, SIGNAL(clicked()),
- this, SLOT(slotSaveButton_clicked()));
- connect(m_widget->clearButton, SIGNAL(clicked()),
- this, SLOT(slotClearButton_clicked()));
+ connect(m_widget->loadButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotLoadButton_clicked()));
+ connect(m_widget->saveButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSaveButton_clicked()));
+ connect(m_widget->clearButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotClearButton_clicked()));
// Set up defaults.
defaults();
@@ -107,7 +107,7 @@ TalkerChooserConf::~TalkerChooserConf(){
* @param configGroup Call config->setGroup with this argument before
* loading your configuration.
*/
-void TalkerChooserConf::load(KConfig* config, const QString& configGroup){
+void TalkerChooserConf::load(KConfig* config, const TQString& configGroup){
// kdDebug() << "TalkerChooserConf::load: Running" << endl;
config->setGroup( configGroup );
m_widget->nameLineEdit->setText( config->readEntry( "UserFilterName", m_widget->nameLineEdit->text() ) );
@@ -118,7 +118,7 @@ void TalkerChooserConf::load(KConfig* config, const QString& configGroup){
m_talkerCode = TalkerCode(config->readEntry("TalkerCode"), false);
// Legacy settings.
- QString s = config->readEntry( "LanguageCode" );
+ TQString s = config->readEntry( "LanguageCode" );
if (!s.isEmpty()) m_talkerCode.setFullLanguageCode(s);
s = config->readEntry( "SynthInName" );
if (!s.isEmpty()) m_talkerCode.setPlugInName(s);
@@ -142,7 +142,7 @@ void TalkerChooserConf::load(KConfig* config, const QString& configGroup){
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
-void TalkerChooserConf::save(KConfig* config, const QString& configGroup){
+void TalkerChooserConf::save(KConfig* config, const TQString& configGroup){
// kdDebug() << "TalkerChooserConf::save: Running" << endl;
config->setGroup( configGroup );
config->writeEntry( "UserFilterName", m_widget->nameLineEdit->text() );
@@ -167,7 +167,7 @@ void TalkerChooserConf::defaults(){
// Default App ID is blank.
m_widget->appIdLineEdit->setText( "" );
// Default to using default Talker.
- m_talkerCode = TalkerCode( QString::null, false );
+ m_talkerCode = TalkerCode( TQString::null, false );
m_widget->talkerLineEdit->setText( m_talkerCode.getTranslatedDescription() );
}
@@ -186,13 +186,13 @@ bool TalkerChooserConf::supportsMultiInstance() { return true; }
* return an empty string.
* @return Filter instance name.
*/
-QString TalkerChooserConf::userPlugInName()
+TQString TalkerChooserConf::userPlugInName()
{
- if (m_widget->talkerLineEdit->text().isEmpty()) return QString::null;
+ if (m_widget->talkerLineEdit->text().isEmpty()) return TQString::null;
if (m_widget->appIdLineEdit->text().isEmpty() &&
- m_widget->reLineEdit->text().isEmpty()) return QString::null;
- QString instName = m_widget->nameLineEdit->text();
- if (instName.isEmpty()) return QString::null;
+ m_widget->reLineEdit->text().isEmpty()) return TQString::null;
+ TQString instName = m_widget->nameLineEdit->text();
+ if (instName.isEmpty()) return TQString::null;
return instName;
}
@@ -200,8 +200,8 @@ void TalkerChooserConf::slotReEditorButton_clicked()
{
// Show Regular Expression Editor dialog if it is installed.
if ( !m_reEditorInstalled ) return;
- QDialog *editorDialog =
- KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor" );
+ TQDialog *editorDialog =
+ KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" );
if ( editorDialog )
{
// kdeutils was installed, so the dialog was found. Fetch the editor interface.
@@ -210,9 +210,9 @@ void TalkerChooserConf::slotReEditorButton_clicked()
Q_ASSERT( reEditor ); // This should not fail!// now use the editor.
reEditor->setRegExp( m_widget->reLineEdit->text() );
int dlgResult = editorDialog->exec();
- if ( dlgResult == QDialog::Accepted )
+ if ( dlgResult == TQDialog::Accepted )
{
- QString re = reEditor->regExp();
+ TQString re = reEditor->regExp();
m_widget->reLineEdit->setText( re );
}
delete editorDialog;
@@ -221,7 +221,7 @@ void TalkerChooserConf::slotReEditorButton_clicked()
void TalkerChooserConf::slotTalkerButton_clicked()
{
- QString talkerCode = m_talkerCode.getTalkerCode();
+ TQString talkerCode = m_talkerCode.getTalkerCode();
SelectTalkerDlg dlg( m_widget, "selecttalkerdialog", i18n("Select Talker"), talkerCode, true );
int dlgResult = dlg.exec();
if ( dlgResult != KDialogBase::Accepted ) return;
@@ -232,8 +232,8 @@ void TalkerChooserConf::slotTalkerButton_clicked()
void TalkerChooserConf::slotLoadButton_clicked()
{
- QString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/talkerchooser/").last();
- QString filename = KFileDialog::getOpenFileName(
+ TQString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/talkerchooser/").last();
+ TQString filename = KFileDialog::getOpenFileName(
dataDir,
"*rc|Talker Chooser Config (*rc)",
m_widget,
@@ -247,7 +247,7 @@ void TalkerChooserConf::slotLoadButton_clicked()
void TalkerChooserConf::slotSaveButton_clicked()
{
- QString filename = KFileDialog::getSaveFileName(
+ TQString filename = KFileDialog::getSaveFileName(
KGlobal::dirs()->saveLocation( "data" ,"kttsd/talkerchooser/", false ),
"*rc|Talker Chooser Config (*rc)",
m_widget,
@@ -260,10 +260,10 @@ void TalkerChooserConf::slotSaveButton_clicked()
void TalkerChooserConf::slotClearButton_clicked()
{
- m_widget->nameLineEdit->setText( QString::null );
- m_widget->reLineEdit->setText( QString::null );
- m_widget->appIdLineEdit->setText( QString::null );
- m_talkerCode = TalkerCode( QString::null, false );
+ m_widget->nameLineEdit->setText( TQString::null );
+ m_widget->reLineEdit->setText( TQString::null );
+ m_widget->appIdLineEdit->setText( TQString::null );
+ m_talkerCode = TalkerCode( TQString::null, false );
m_widget->talkerLineEdit->setText( m_talkerCode.getTranslatedDescription() );
configChanged();
}
diff --git a/kttsd/filters/talkerchooser/talkerchooserconf.h b/kttsd/filters/talkerchooser/talkerchooserconf.h
index d6b3959..38a6c49 100644
--- a/kttsd/filters/talkerchooser/talkerchooserconf.h
+++ b/kttsd/filters/talkerchooser/talkerchooserconf.h
@@ -25,7 +25,7 @@
#define _TALKERCHOOSERCONF_H_
// Qt includes.
-#include <qwidget.h>
+#include <tqwidget.h>
// KDE includes.
#include <kconfig.h>
@@ -50,7 +50,7 @@ class TalkerChooserConf : public KttsFilterConf
/**
* Constructor
*/
- TalkerChooserConf( QWidget *parent, const char *name, const QStringList &args = QStringList() );
+ TalkerChooserConf( TQWidget *parent, const char *name, const TQStringList &args = TQStringList() );
/**
* Destructor
@@ -75,7 +75,7 @@ class TalkerChooserConf : public KttsFilterConf
* any instance-specific parameters to load, but it may still wish
* to load parameters that apply to all instances of the plugin.
*/
- virtual void load(KConfig *config, const QString &configGroup);
+ virtual void load(KConfig *config, const TQString &configGroup);
/**
* This function gets called when the user wants to save the settings in
@@ -87,7 +87,7 @@ class TalkerChooserConf : public KttsFilterConf
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
- virtual void save(KConfig *config, const QString &configGroup);
+ virtual void save(KConfig *config, const TQString &configGroup);
/**
* This function is called to set the settings in the module to sensible
@@ -113,7 +113,7 @@ class TalkerChooserConf : public KttsFilterConf
* return an empty string.
* @return Filter instance name.
*/
- virtual QString userPlugInName();
+ virtual TQString userPlugInName();
private slots:
void slotReEditorButton_clicked();
diff --git a/kttsd/filters/talkerchooser/talkerchooserproc.cpp b/kttsd/filters/talkerchooser/talkerchooserproc.cpp
index 628b68a..5758df2 100644
--- a/kttsd/filters/talkerchooser/talkerchooserproc.cpp
+++ b/kttsd/filters/talkerchooser/talkerchooserproc.cpp
@@ -22,7 +22,7 @@
******************************************************************************/
// Qt includes.
-#include <qregexp.h>
+#include <tqregexp.h>
// KDE includes.
#include <kdebug.h>
@@ -38,7 +38,7 @@
/**
* Constructor.
*/
-TalkerChooserProc::TalkerChooserProc( QObject *parent, const char *name, const QStringList& /*args*/ ) :
+TalkerChooserProc::TalkerChooserProc( TQObject *parent, const char *name, const TQStringList& /*args*/ ) :
KttsFilterProc(parent, name)
{
// kdDebug() << "TalkerChooserProc::TalkerChooserProc: Running" << endl;
@@ -61,14 +61,14 @@ TalkerChooserProc::~TalkerChooserProc()
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
-bool TalkerChooserProc::init(KConfig* config, const QString& configGroup){
+bool TalkerChooserProc::init(KConfig* config, const TQString& configGroup){
// kdDebug() << "PlugInProc::init: Running" << endl;
config->setGroup( configGroup );
m_re = config->readEntry( "MatchRegExp" );
m_appIdList = config->readListEntry( "AppIDs" );
m_chosenTalkerCode = TalkerCode(config->readEntry("TalkerCode"), false);
// Legacy settings.
- QString s = config->readEntry( "LanguageCode" );
+ TQString s = config->readEntry( "LanguageCode" );
if (!s.isEmpty()) m_chosenTalkerCode.setFullLanguageCode(s);
s = config->readEntry( "SynthInName" );
if (!s.isEmpty()) m_chosenTalkerCode.setPlugInName(s);
@@ -102,12 +102,12 @@ bool TalkerChooserProc::init(KConfig* config, const QString& configGroup){
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
-/*virtual*/ QString TalkerChooserProc::convert(const QString& inputText, TalkerCode* talkerCode,
- const QCString& appId)
+/*virtual*/ TQString TalkerChooserProc::convert(const TQString& inputText, TalkerCode* talkerCode,
+ const TQCString& appId)
{
if ( !m_re.isEmpty() )
{
- int pos = inputText.find( QRegExp(m_re) );
+ int pos = inputText.find( TQRegExp(m_re) );
if ( pos < 0 ) return inputText;
}
// If appId doesn't match, return input unmolested.
@@ -116,7 +116,7 @@ bool TalkerChooserProc::init(KConfig* config, const QString& configGroup){
// kdDebug() << "TalkerChooserProc::convert: converting " << inputText << " if appId "
// << appId << " matches " << m_appIdList << endl;
bool found = false;
- QString appIdStr = appId;
+ TQString appIdStr = appId;
for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx )
{
if ( appIdStr.contains(m_appIdList[ndx]) )
diff --git a/kttsd/filters/talkerchooser/talkerchooserproc.h b/kttsd/filters/talkerchooser/talkerchooserproc.h
index 07cde68..8c9ab01 100644
--- a/kttsd/filters/talkerchooser/talkerchooserproc.h
+++ b/kttsd/filters/talkerchooser/talkerchooserproc.h
@@ -36,7 +36,7 @@ public:
/**
* Constructor.
*/
- TalkerChooserProc( QObject *parent, const char *name, const QStringList &args = QStringList() );
+ TalkerChooserProc( TQObject *parent, const char *name, const TQStringList &args = TQStringList() );
/**
* Destructor.
@@ -52,7 +52,7 @@ public:
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Returns True if the plugin supports asynchronous processing,
@@ -75,12 +75,12 @@ public:
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
- virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId);
+ virtual TQString convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId);
private:
- QString m_re;
- QStringList m_appIdList;
+ TQString m_re;
+ TQStringList m_appIdList;
TalkerCode m_chosenTalkerCode;
};
diff --git a/kttsd/filters/xhtml2ssml/main.cpp b/kttsd/filters/xhtml2ssml/main.cpp
index 822d068..01655ad 100644
--- a/kttsd/filters/xhtml2ssml/main.cpp
+++ b/kttsd/filters/xhtml2ssml/main.cpp
@@ -1,17 +1,17 @@
-#include <qapplication.h>
-#include <qfile.h>
-#include <qxml.h>
-#include <qmap.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqxml.h>
+#include <tqmap.h>
#include <iostream>
#include "xhtml2ssml.h"
#include "xmlelement.h"
int main(int argc, char *argv[]) {
- QApplication a(argc, argv);
- QFile f("demonstration.html");
- QXmlInputSource input(&f);
- QXmlSimpleReader reader;
+ TQApplication a(argc, argv);
+ TQFile f("demonstration.html");
+ TQXmlInputSource input(&f);
+ TQXmlSimpleReader reader;
XHTMLToSSMLParser *parser = new XHTMLToSSMLParser();
reader.setContentHandler(parser);
reader.parse(input);
diff --git a/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp b/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp
index 7c77b9e..5649cc9 100644
--- a/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp
+++ b/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp
@@ -19,10 +19,10 @@
* *
***************************************************************************/
-#include <qstring.h>
-#include <qdict.h>
-#include <qxml.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqdict.h>
+#include <tqxml.h>
+#include <tqfile.h>
#include <iostream>
#include "xmlelement.h"
@@ -32,13 +32,13 @@
/// Document parsing begin. Init stuff here.
bool XHTMLToSSMLParser::startDocument() {
/// Read the file which maps xhtml tags -> ssml tags. Look at the file for more information.
- QFile file("tagmappingrc");
+ TQFile file("tagmappingrc");
if(!file.open(IO_ReadOnly)) {
std::cerr << "Could not read config file 'tagmappingrc'. Please check that it exists and is readable.\n";
// Kill further parsing
return false;
}
- QTextStream stream(&file);
+ TQTextStream stream(&file);
// File parsing.
bool linestatus = true;
while(!stream.atEnd()) {
@@ -51,37 +51,37 @@ bool XHTMLToSSMLParser::startDocument() {
return true;
}
-bool XHTMLToSSMLParser::startElement(const QString &, const QString &, const QString &qName, const QXmlAttributes &atts) {
- QString attributes = "";
+bool XHTMLToSSMLParser::startElement(const TQString &, const TQString &, const TQString &qName, const TQXmlAttributes &atts) {
+ TQString attributes = "";
if(atts.length() > 0) {
const int attsLength = atts.lenght();
for(int i = 0; i < attsLength; ++i)
attributes += " " + atts.qName(i) + "=\"" + atts.value(i) + "\"";
}
- QString fromelement = qName + attributes;
+ TQString fromelement = qName + attributes;
// If this element is one of the keys that was specified in the configuration file, get what it should be converted to and
// append to the output string.
- QString toelement = m_xhtml2ssml[fromelement];
+ TQString toelement = m_xhtml2ssml[fromelement];
if(toelement)
m_output.append(XMLElement::fromQString(toelement).startTag());
return true;
}
-bool XHTMLToSSMLParser::endElement(const QString &, const QString &, const QString &qName) {
- QString fromelement = qName;
- QString toelement = m_xhtml2ssml[fromelement];
+bool XHTMLToSSMLParser::endElement(const TQString &, const TQString &, const TQString &qName) {
+ TQString fromelement = qName;
+ TQString toelement = m_xhtml2ssml[fromelement];
if(toelement)
m_output.append(XMLElement::fromQString(toelement).endTag());
return true;
}
-bool XHTMLToSSMLParser::characters(const QString &characters) {
+bool XHTMLToSSMLParser::characters(const TQString &characters) {
m_output.append(characters);
return true;
}
-QString XHTMLToSSMLParser::convertedText() {
+TQString XHTMLToSSMLParser::convertedText() {
return m_output.simplifyWhiteSpace();
}
@@ -89,7 +89,7 @@ QString XHTMLToSSMLParser::convertedText() {
/// It makes entries in the m_xhtml2ssml map accordingly.
/// @param line A line from a file to parse
/// @returns true if the syntax of the line was okay and the parsing succeeded - false otherwise.
-bool XHTMLToSSMLParser::readFileConfigEntry(const QString &line) {
+bool XHTMLToSSMLParser::readFileConfigEntry(const TQString &line) {
// comments
if(line.stripWhiteSpace().startsWith("#")) {
return true;
@@ -97,7 +97,7 @@ bool XHTMLToSSMLParser::readFileConfigEntry(const QString &line) {
// break into QStringList
// the second parameter to split is the string, with all space simplified and all space around the : removed, i.e
// "something : somethingelse" -> "something:somethingelse"
- QStringList keyvalue = QStringList::split(":", line.simplifyWhiteSpace().replace(" :", ":").replace(": ", ":"));
+ TQStringList keyvalue = TQStringList::split(":", line.simplifyWhiteSpace().replace(" :", ":").replace(": ", ":"));
if(keyvalue.count() != 2)
return false;
m_xhtml2ssml[keyvalue[0]] = keyvalue[1];
diff --git a/kttsd/filters/xhtml2ssml/xhtml2ssml.h b/kttsd/filters/xhtml2ssml/xhtml2ssml.h
index 7271dc0..2e45dee 100644
--- a/kttsd/filters/xhtml2ssml/xhtml2ssml.h
+++ b/kttsd/filters/xhtml2ssml/xhtml2ssml.h
@@ -22,40 +22,40 @@
#ifndef _XHTML2SSML_H_
#define _XHTML2SSML_H_
-#include <qxml.h>
-#include <qmap.h>
+#include <tqxml.h>
+#include <tqmap.h>
-typedef QMap<QString, QString> QStringMap;
+typedef TQMap<TQString, TQString> QStringMap;
class QString;
-class XHTMLToSSMLParser : public QXmlDefaultHandler {
+class XHTMLToSSMLParser : public TQXmlDefaultHandler {
public:
/// No need to reimplement constructor..
/// The document parsing starts
bool startDocument();
/// start of an element encountered (<element foo="bar">)
- bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts);
+ bool startElement(const TQString &namespaceURI, const TQString &localName, const TQString &qName, const TQXmlAttributes &atts);
/// end of an element encountered (</element>)
- bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName);
+ bool endElement(const TQString &namespaceURI, const TQString &localName, const TQString &qName);
/// text encountered (blah bah blah)
- bool characters(const QString &);
+ bool characters(const TQString &);
/// Get the output text that was generated during the parsing.
/// @returns The converted text.
- QString convertedText();
+ TQString convertedText();
/// Parse a line from the configuration file which maps xhtml : ssml equivalent.
/// It makes entries in the m_xhtml2ssml map accordingly.
/// @param line A line from a file to parse
/// @returns true if the syntax of the line was okay and the parsing succeeded - false otherwise.
- bool readFileConfigEntry(const QString &line);
+ bool readFileConfigEntry(const TQString &line);
private:
/// Dict of xhtml tags -> ssml tags
QStringMap m_xhtml2ssml;
/// The output of the conversion
- QString m_output;
+ TQString m_output;
};
#endif
diff --git a/kttsd/filters/xhtml2ssml/xmlelement.cpp b/kttsd/filters/xhtml2ssml/xmlelement.cpp
index 53fa4f6..920fd57 100644
--- a/kttsd/filters/xhtml2ssml/xmlelement.cpp
+++ b/kttsd/filters/xhtml2ssml/xmlelement.cpp
@@ -19,7 +19,7 @@
***************************************************************************/
#include "xmlelement.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <iostream>
/// Constructors
@@ -27,7 +27,7 @@ XMLElement::XMLElement() {
m_name = "";
m_attrmapper = AttributeToValueMap();
}
-XMLElement::XMLElement(const QString &name) {
+XMLElement::XMLElement(const TQString &name) {
m_name = name;
m_attrmapper = AttributeToValueMap();
}
@@ -49,11 +49,11 @@ XMLElement XMLElement::operator=(const XMLElement &element) {
return *this;
}
-QString XMLElement::name() {
+TQString XMLElement::name() {
return m_name;
}
-QString XMLElement::startTag() {
- QString output = "<" + m_name + " ";
+TQString XMLElement::startTag() {
+ TQString output = "<" + m_name + " ";
for(AttributeToValueMap::Iterator it = m_attrmapper.begin(); it != m_attrmapper.end(); ++it) {
output.append(it.key() + "=\"" + it.data() + "\" ");
}
@@ -63,25 +63,25 @@ QString XMLElement::startTag() {
return output;
}
-QString XMLElement::endTag() {
+TQString XMLElement::endTag() {
return "</" + m_name + ">";
}
-void XMLElement::setAttribute(const QString &attr, const QString &value) {
+void XMLElement::setAttribute(const TQString &attr, const TQString &value) {
m_attrmapper[attr] = value;
}
-QString XMLElement::attribute(const QString &attr) {
+TQString XMLElement::attribute(const TQString &attr) {
return m_attrmapper[attr];
}
-QString XMLElement::toQString() {
- QString tag = startTag();
+TQString XMLElement::toQString() {
+ TQString tag = startTag();
return tag.left(tag.length() - 1).right(tag.length() - 2);
}
-XMLElement XMLElement::fromQString(const QString &str) {
- QStringList sections = QStringList::split(" ", str);
- QString tagname = sections[0];
+XMLElement XMLElement::fromQString(const TQString &str) {
+ TQStringList sections = TQStringList::split(" ", str);
+ TQString tagname = sections[0];
XMLElement e(tagname.latin1());
sections.pop_front();
@@ -89,7 +89,7 @@ XMLElement XMLElement::fromQString(const QString &str) {
if(sections.count()) {
const int sectionsCount = sections.count();
for(int i = 0; i < sectionsCount; ++i) {
- QStringList list = QStringList::split("=", sections[i]);
+ TQStringList list = TQStringList::split("=", sections[i]);
if(list.count() != 2) {
std::cerr << "XMLElement::fromQString: Cannot convert list: " << list.join("|") << ". `" << str << "' is not in valid format.\n";
return XMLElement(" ");
diff --git a/kttsd/filters/xhtml2ssml/xmlelement.h b/kttsd/filters/xhtml2ssml/xmlelement.h
index c78cd6f..f3d8789 100644
--- a/kttsd/filters/xhtml2ssml/xmlelement.h
+++ b/kttsd/filters/xhtml2ssml/xmlelement.h
@@ -22,16 +22,16 @@
#ifndef XMLELEMENT_H
#define XMLELEMENT_H
-#include <qmap.h>
+#include <tqmap.h>
class QString;
-typedef QMap<QString, QString> AttributeToValueMap;
+typedef TQMap<TQString, TQString> AttributeToValueMap;
class XMLElement {
public:
XMLElement();
- XMLElement(const QString &name);
+ XMLElement(const TQString &name);
~XMLElement();
/// Copy constructor
@@ -42,11 +42,11 @@ public:
/// Get the name of the tag (the text between the greater than and less than symbols).
/// @returns the name of the tag.
- QString name();
+ TQString name();
/// set the name of the tag.
/// @param name the new name of the tag.
- void setName(const QString &name);
+ void setName(const TQString &name);
/// Get a textual representation of the starting of the tag with all attributes and their values set out.
/// @verbatim
@@ -55,35 +55,35 @@ public:
/// element.startTag(); <- <elem foo="bar">
/// @endverbatim
/// @returns A textual representation of the start of the element.
- QString startTag();
+ TQString startTag();
/// Get a textual representation of the closed tag that XMLElement represents.
/// @returns A textual representation of the closed tag represented by the XMLElement.
- QString endTag();
+ TQString endTag();
/// Create an attribute and set its value.
/// @param attr The attribute.
/// @param value The value of the attribute.
- void setAttribute(const QString &attr, const QString &value);
+ void setAttribute(const TQString &attr, const TQString &value);
/// Get the value of an attribute.
/// @param attr The attribute.
/// @returns The value of @param attr
- QString attribute(const QString &attr);
+ TQString attribute(const TQString &attr);
- /// Convert to a QString.
- /// Had issues with QMap and custom classes. For now you can just convert to/from QString and use
+ /// Convert to a TQString.
+ /// Had issues with TQMap and custom classes. For now you can just convert to/from TQString and use
/// That as the key/value pair.
- /// @returns A QString representation of the XMLAttribute.
- QString toQString();
+ /// @returns A TQString representation of the XMLAttribute.
+ TQString toQString();
- /// Create an XMLElement from a QString.
- /// @param str The QString to convert from. Must be of the following syntax- "foo name=\"bar\""
- static XMLElement fromQString(const QString &str);
+ /// Create an XMLElement from a TQString.
+ /// @param str The TQString to convert from. Must be of the following syntax- "foo name=\"bar\""
+ static XMLElement fromQString(const TQString &str);
private:
/// The name of the tag.
- QString m_name;
+ TQString m_name;
/// Attribute : value mappings.
AttributeToValueMap m_attrmapper;
};
diff --git a/kttsd/filters/xmltransformer/xmltransformerconf.cpp b/kttsd/filters/xmltransformer/xmltransformerconf.cpp
index 76cfd70..c70c449 100644
--- a/kttsd/filters/xmltransformer/xmltransformerconf.cpp
+++ b/kttsd/filters/xmltransformer/xmltransformerconf.cpp
@@ -22,8 +22,8 @@
******************************************************************************/
// Qt includes.
-#include <qstring.h>
-#include <qlayout.h>
+#include <tqstring.h>
+#include <tqlayout.h>
// KDE includes.
#include <klocale.h>
@@ -43,13 +43,13 @@
/**
* Constructor
*/
-XmlTransformerConf::XmlTransformerConf( QWidget *parent, const char *name, const QStringList& /*args*/) :
+XmlTransformerConf::XmlTransformerConf( TQWidget *parent, const char *name, const TQStringList& /*args*/) :
KttsFilterConf(parent, name)
{
// kdDebug() << "XmlTransformerConf::XmlTransformerConf: Running" << endl;
// Create configuration widget.
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "XmlTransformerConfWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new XmlTransformerConfWidget(this, "XmlTransformerConfigWidget");
@@ -59,18 +59,18 @@ XmlTransformerConf::XmlTransformerConf( QWidget *parent, const char *name, const
defaults();
// Connect signals.
- connect( m_widget->nameLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect( m_widget->xsltPath, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
- connect( m_widget->xsltprocPath, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
- connect( m_widget->rootElementLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
- connect( m_widget->doctypeLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
- connect( m_widget->appIdLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
+ connect( m_widget->nameLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect( m_widget->xsltPath, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
+ connect( m_widget->xsltprocPath, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
+ connect( m_widget->rootElementLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
+ connect( m_widget->doctypeLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
+ connect( m_widget->appIdLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
}
/**
@@ -93,7 +93,7 @@ XmlTransformerConf::~XmlTransformerConf(){
* @param configGroup Call config->setGroup with this argument before
* loading your configuration.
*/
-void XmlTransformerConf::load(KConfig* config, const QString& configGroup){
+void XmlTransformerConf::load(KConfig* config, const TQString& configGroup){
// kdDebug() << "XmlTransformerConf::load: Running" << endl;
config->setGroup( configGroup );
m_widget->nameLineEdit->setText( config->readEntry( "UserFilterName", m_widget->nameLineEdit->text() ) );
@@ -117,7 +117,7 @@ void XmlTransformerConf::load(KConfig* config, const QString& configGroup){
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
-void XmlTransformerConf::save(KConfig* config, const QString& configGroup){
+void XmlTransformerConf::save(KConfig* config, const TQString& configGroup){
// kdDebug() << "XmlTransformerConf::save: Running" << endl;
config->setGroup( configGroup );
config->writeEntry( "UserFilterName", m_widget->nameLineEdit->text() );
@@ -167,16 +167,16 @@ bool XmlTransformerConf::supportsMultiInstance() { return true; }
* return an empty string.
* @return Filter instance name.
*/
-QString XmlTransformerConf::userPlugInName()
+TQString XmlTransformerConf::userPlugInName()
{
- QString filePath = realFilePath(m_widget->xsltprocPath->url());
- if (filePath.isEmpty()) return QString::null;
- if (getLocation(filePath).isEmpty()) return QString::null;
+ TQString filePath = realFilePath(m_widget->xsltprocPath->url());
+ if (filePath.isEmpty()) return TQString::null;
+ if (getLocation(filePath).isEmpty()) return TQString::null;
filePath = realFilePath(m_widget->xsltPath->url());
- if (filePath.isEmpty()) return QString::null;
- if (getLocation(filePath).isEmpty()) return QString::null;
- if (!QFileInfo(filePath).isFile()) return QString::null;
+ if (filePath.isEmpty()) return TQString::null;
+ if (getLocation(filePath).isEmpty()) return TQString::null;
+ if (!TQFileInfo(filePath).isFile()) return TQString::null;
return m_widget->nameLineEdit->text();
}
diff --git a/kttsd/filters/xmltransformer/xmltransformerconf.h b/kttsd/filters/xmltransformer/xmltransformerconf.h
index 86df0e2..caec175 100644
--- a/kttsd/filters/xmltransformer/xmltransformerconf.h
+++ b/kttsd/filters/xmltransformer/xmltransformerconf.h
@@ -25,7 +25,7 @@
#define _XMLTRANSFORMERCONF_H_
// Qt includes.
-#include <qwidget.h>
+#include <tqwidget.h>
// KDE includes.
#include <kconfig.h>
@@ -45,7 +45,7 @@ class XmlTransformerConf : public KttsFilterConf
/**
* Constructor
*/
- XmlTransformerConf( QWidget *parent, const char *name, const QStringList &args = QStringList() );
+ XmlTransformerConf( TQWidget *parent, const char *name, const TQStringList &args = TQStringList() );
/**
* Destructor
@@ -70,7 +70,7 @@ class XmlTransformerConf : public KttsFilterConf
* any instance-specific parameters to load, but it may still wish
* to load parameters that apply to all instances of the plugin.
*/
- virtual void load(KConfig *config, const QString &configGroup);
+ virtual void load(KConfig *config, const TQString &configGroup);
/**
* This function gets called when the user wants to save the settings in
@@ -82,7 +82,7 @@ class XmlTransformerConf : public KttsFilterConf
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
- virtual void save(KConfig *config, const QString &configGroup);
+ virtual void save(KConfig *config, const TQString &configGroup);
/**
* This function is called to set the settings in the module to sensible
@@ -108,7 +108,7 @@ class XmlTransformerConf : public KttsFilterConf
* return an empty string.
* @return Filter instance name.
*/
- virtual QString userPlugInName();
+ virtual TQString userPlugInName();
private slots:
diff --git a/kttsd/filters/xmltransformer/xmltransformerproc.cpp b/kttsd/filters/xmltransformer/xmltransformerproc.cpp
index d4aa1c5..b4b9f71 100644
--- a/kttsd/filters/xmltransformer/xmltransformerproc.cpp
+++ b/kttsd/filters/xmltransformer/xmltransformerproc.cpp
@@ -22,8 +22,8 @@
******************************************************************************/
// Qt includes.
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
// KDE includes.
#include <kdeversion.h>
@@ -44,7 +44,7 @@
/**
* Constructor.
*/
-XmlTransformerProc::XmlTransformerProc( QObject *parent, const char *name, const QStringList& ) :
+XmlTransformerProc::XmlTransformerProc( TQObject *parent, const char *name, const TQStringList& ) :
KttsFilterProc(parent, name)
{
m_xsltProc = 0;
@@ -56,8 +56,8 @@ XmlTransformerProc::XmlTransformerProc( QObject *parent, const char *name, const
/*virtual*/ XmlTransformerProc::~XmlTransformerProc()
{
delete m_xsltProc;
- if (!m_inFilename.isEmpty()) QFile::remove(m_inFilename);
- if (!m_outFilename.isEmpty()) QFile::remove(m_outFilename);
+ if (!m_inFilename.isEmpty()) TQFile::remove(m_inFilename);
+ if (!m_outFilename.isEmpty()) TQFile::remove(m_outFilename);
}
/**
@@ -69,7 +69,7 @@ XmlTransformerProc::XmlTransformerProc( QObject *parent, const char *name, const
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
-bool XmlTransformerProc::init(KConfig* config, const QString& configGroup)
+bool XmlTransformerProc::init(KConfig* config, const TQString& configGroup)
{
// kdDebug() << "XmlTransformerProc::init: Running." << endl;
config->setGroup( configGroup );
@@ -105,8 +105,8 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup)
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
-/*virtual*/ QString XmlTransformerProc::convert(const QString& inputText, TalkerCode* talkerCode,
- const QCString& appId)
+/*virtual*/ TQString XmlTransformerProc::convert(const TQString& inputText, TalkerCode* talkerCode,
+ const TQCString& appId)
{
// kdDebug() << "XmlTransformerProc::convert: Running." << endl;
// If not properly configured, do nothing.
@@ -139,8 +139,8 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup)
* program may then call @ref getOutput to retrieve converted text. Calling
* program must call @ref ackFinished to acknowledge the conversion.
*/
-/*virtual*/ bool XmlTransformerProc::asyncConvert(const QString& inputText, TalkerCode* /*talkerCode*/,
- const QCString& appId)
+/*virtual*/ bool XmlTransformerProc::asyncConvert(const TQString& inputText, TalkerCode* /*talkerCode*/,
+ const TQCString& appId)
{
m_wasModified = false;
@@ -192,7 +192,7 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup)
// If appId doesn't match, return input unmolested.
if ( !m_appIdList.isEmpty() )
{
- QString appIdStr = appId;
+ TQString appIdStr = appId;
// kdDebug() << "XmlTransformrProc::convert: converting " << inputText << " if appId "
// << appId << " matches " << m_appIdList << endl;
found = false;
@@ -214,7 +214,7 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup)
/// Write @param text to a temporary file.
KTempFile inFile(locateLocal("tmp", "kttsd-"), ".xml");
m_inFilename = inFile.file()->name();
- QTextStream* wstream = inFile.textStream();
+ TQTextStream* wstream = inFile.textStream();
if (wstream == 0) {
/// wtf...
kdDebug() << "XmlTransformerProc::convert: Can't write to " << m_inFilename << endl;;
@@ -226,8 +226,8 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup)
// FIXME: Temporary Fix until Konqi returns properly formatted xhtml with & coded as &amp;
// This will change & inside a CDATA section, which is not good, and also within comments and
// processing instructions, which is OK because we don't speak those anyway.
- QString text = inputText;
- text.replace(QRegExp("&(?!amp;)"),"&amp;");
+ TQString text = inputText;
+ text.replace(TQRegExp("&(?!amp;)"),"&amp;");
*wstream << text;
inFile.close();
#if KDE_VERSION >= KDE_MAKE_VERSION (3,3,0)
@@ -250,12 +250,12 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup)
// m_xsltProc->args() << endl;
m_state = fsFiltering;
- connect(m_xsltProc, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotProcessExited(KProcess*)));
- connect(m_xsltProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_xsltProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
+ connect(m_xsltProc, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(slotProcessExited(KProcess*)));
+ connect(m_xsltProc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStdout(KProcess*, char*, int)));
+ connect(m_xsltProc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)));
if (!m_xsltProc->start(KProcess::NotifyOnExit,
static_cast<KProcess::Communication>(KProcess::Stdout | KProcess::Stderr)))
{
@@ -269,7 +269,7 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup)
// Process output when xsltproc exits.
void XmlTransformerProc::processOutput()
{
- QFile::remove(m_inFilename);
+ TQFile::remove(m_inFilename);
int exitStatus = 11;
if (m_xsltProc->normalExit())
@@ -284,27 +284,27 @@ void XmlTransformerProc::processOutput()
{
kdDebug() << "XmlTransformerProc::processOutput: xsltproc abnormal exit. Status = " << exitStatus << endl;
m_state = fsFinished;
- QFile::remove(m_outFilename);
+ TQFile::remove(m_outFilename);
emit filteringFinished();
return;
}
/// Read back the data that was written to /tmp/fileName.output.
- QFile readfile(m_outFilename);
+ TQFile readfile(m_outFilename);
if(!readfile.open(IO_ReadOnly)) {
/// uhh yeah... Issues writing to the output file.
kdDebug() << "XmlTransformerProc::processOutput: Could not read file " << m_outFilename << endl;
m_state = fsFinished;
emit filteringFinished();
}
- QTextStream rstream(&readfile);
+ TQTextStream rstream(&readfile);
m_text = rstream.read();
readfile.close();
kdDebug() << "XmlTransformerProc::processOutput: Read file at " + m_inFilename + " and created " + m_outFilename + " based on the stylesheet at " << m_xsltFilePath << endl;
// Clean up.
- QFile::remove(m_outFilename);
+ TQFile::remove(m_outFilename);
m_state = fsFinished;
m_wasModified = true;
@@ -338,7 +338,7 @@ void XmlTransformerProc::processOutput()
/**
* Returns the filtered output.
*/
-/*virtual*/ QString XmlTransformerProc::getOutput() { return m_text; }
+/*virtual*/ TQString XmlTransformerProc::getOutput() { return m_text; }
/**
* Acknowledges the finished filtering.
@@ -346,7 +346,7 @@ void XmlTransformerProc::processOutput()
/*virtual*/ void XmlTransformerProc::ackFinished()
{
m_state = fsIdle;
- m_text = QString::null;
+ m_text = TQString::null;
}
/**
@@ -373,13 +373,13 @@ void XmlTransformerProc::slotProcessExited(KProcess*)
void XmlTransformerProc::slotReceivedStdout(KProcess*, char* /*buffer*/, int /*buflen*/)
{
- // QString buf = QString::fromLatin1(buffer, buflen);
+ // TQString buf = TQString::fromLatin1(buffer, buflen);
// kdDebug() << "XmlTransformerProc::slotReceivedStdout: Received from xsltproc: " << buf << endl;
}
void XmlTransformerProc::slotReceivedStderr(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "XmlTransformerProc::slotReceivedStderr: Received error from xsltproc: " << buf << endl;
}
diff --git a/kttsd/filters/xmltransformer/xmltransformerproc.h b/kttsd/filters/xmltransformer/xmltransformerproc.h
index 7c88dd1..d50adeb 100644
--- a/kttsd/filters/xmltransformer/xmltransformerproc.h
+++ b/kttsd/filters/xmltransformer/xmltransformerproc.h
@@ -25,8 +25,8 @@
#define _XMLTRANSFORMERPROC_H_
// Qt includes.
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
// KTTS includes.
#include "filterproc.h"
@@ -41,7 +41,7 @@ public:
/**
* Constructor.
*/
- XmlTransformerProc( QObject *parent, const char *name, const QStringList &args = QStringList() );
+ XmlTransformerProc( TQObject *parent, const char *name, const TQStringList &args = TQStringList() );
/**
* Destructor.
@@ -57,7 +57,7 @@ public:
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Returns True if the plugin supports asynchronous processing,
@@ -80,7 +80,7 @@ public:
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
- virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId);
+ virtual TQString convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId);
/**
* Convert input. Runs asynchronously.
@@ -96,7 +96,7 @@ public:
* program may then call @ref getOutput to retrieve converted text. Calling
* program must call @ref ackFinished to acknowledge the conversion.
*/
- virtual bool asyncConvert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId);
+ virtual bool asyncConvert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId);
/**
* Waits for a previous call to asyncConvert to finish.
@@ -111,7 +111,7 @@ public:
/**
* Returns the filtered output.
*/
- virtual QString getOutput();
+ virtual TQString getOutput();
/**
* Acknowledges the finished filtering.
@@ -140,26 +140,26 @@ private:
void processOutput();
// If not empty, only apply to text queued by an applications containing one of these strings.
- QStringList m_appIdList;
+ TQStringList m_appIdList;
// If not empty, only apply to XML that has the specified root element.
- QStringList m_rootElementList;
+ TQStringList m_rootElementList;
// If not empty, only apply to XML that has the specified DOCTYPE spec.
- QStringList m_doctypeList;
+ TQStringList m_doctypeList;
// The text that is being filtered.
- QString m_text;
+ TQString m_text;
// Processing state.
int m_state;
// xsltproc process.
KProcess* m_xsltProc;
// Input and Output filenames.
- QString m_inFilename;
- QString m_outFilename;
+ TQString m_inFilename;
+ TQString m_outFilename;
// User's name for the filter.
- QString m_UserFilterName;
+ TQString m_UserFilterName;
// XSLT file.
- QString m_xsltFilePath;
+ TQString m_xsltFilePath;
// Path to xsltproc processor.
- QString m_xsltprocPath;
+ TQString m_xsltprocPath;
// Did this filter modify the text?
bool m_wasModified;
};
diff --git a/kttsd/kcmkttsmgr/addtalker.cpp b/kttsd/kcmkttsmgr/addtalker.cpp
index 2353ada..4a94cf3 100644
--- a/kttsd/kcmkttsmgr/addtalker.cpp
+++ b/kttsd/kcmkttsmgr/addtalker.cpp
@@ -23,7 +23,7 @@
******************************************************************************/
// Qt includes.
-#include <qradiobutton.h>
+#include <tqradiobutton.h>
// KDE includes.
#include <kcombobox.h>
@@ -34,7 +34,7 @@
// KTTS includes.
#include "addtalker.h"
-AddTalker::AddTalker(SynthToLangMap synthToLangMap, QWidget* parent, const char* name, WFlags fl)
+AddTalker::AddTalker(SynthToLangMap synthToLangMap, TQWidget* parent, const char* name, WFlags fl)
: AddTalkerWidget(parent,name,fl)
{
// Build maps.
@@ -44,13 +44,13 @@ AddTalker::AddTalker(SynthToLangMap synthToLangMap, QWidget* parent, const char*
applyFilter();
// Default to user's desktop language.
- QString languageCode = KGlobal::locale()->defaultLanguage();
+ TQString languageCode = KGlobal::locale()->defaultLanguage();
// If there is not a synth that supports the locale, try stripping country code.
if (!m_langToSynthMap.contains(languageCode))
{
- QString countryCode;
- QString charSet;
- QString twoAlpha;
+ TQString countryCode;
+ TQString charSet;
+ TQString twoAlpha;
KGlobal::locale()->splitLocale(languageCode, twoAlpha, countryCode, charSet);
languageCode = twoAlpha;
}
@@ -58,17 +58,17 @@ AddTalker::AddTalker(SynthToLangMap synthToLangMap, QWidget* parent, const char*
if (!m_langToSynthMap.contains(languageCode)) languageCode = "other";
// Select the language in the language combobox.
- QString language = languageCodeToLanguage(languageCode);
+ TQString language = languageCodeToLanguage(languageCode);
languageSelection->setCurrentItem(language, false);
// Filter comboboxes.
applyFilter();
// Connect widgets to slots.
- connect(languageRadioButton, SIGNAL(clicked()), this, SLOT(applyFilter()));
- connect(synthesizerRadioButton, SIGNAL(clicked()), this, SLOT(applyFilter()));
- connect(languageSelection, SIGNAL(activated(int)), this, SLOT(applyFilter()));
- connect(synthesizerSelection, SIGNAL(activated(int)), this, SLOT(applyFilter()));
+ connect(languageRadioButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(applyFilter()));
+ connect(synthesizerRadioButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(applyFilter()));
+ connect(languageSelection, TQT_SIGNAL(activated(int)), this, TQT_SLOT(applyFilter()));
+ connect(synthesizerSelection, TQT_SIGNAL(activated(int)), this, TQT_SLOT(applyFilter()));
}
AddTalker::~AddTalker()
@@ -78,7 +78,7 @@ AddTalker::~AddTalker()
/**
* Returns user's chosen language code.
*/
-QString AddTalker::getLanguageCode()
+TQString AddTalker::getLanguageCode()
{
return m_languageToLanguageCodeMap[languageSelection->currentText()];
}
@@ -86,47 +86,47 @@ QString AddTalker::getLanguageCode()
/**
* Returns user's chosen synthesizer.
*/
-QString AddTalker::getSynthesizer() { return synthesizerSelection->currentText(); }
+TQString AddTalker::getSynthesizer() { return synthesizerSelection->currentText(); }
// Set the synthesizer-to-languages map.
-// @param synthToLang QMap of supported language codes indexed by synthesizer.
+// @param synthToLang TQMap of supported language codes indexed by synthesizer.
void AddTalker::setSynthToLangMap(SynthToLangMap synthToLangMap)
{
m_synthToLangMap = synthToLangMap;
// "Invert" the map, i.e., map language codes to synthesizers.
- QStringList synthList = m_synthToLangMap.keys();
+ TQStringList synthList = m_synthToLangMap.keys();
const int synthListCount = synthList.count();
for (int synthNdx=0; synthNdx < synthListCount; ++synthNdx)
{
- QString synth = synthList[synthNdx];
- QStringList languageCodeList = m_synthToLangMap[synth];
+ TQString synth = synthList[synthNdx];
+ TQStringList languageCodeList = m_synthToLangMap[synth];
const int languageCodeListCount = languageCodeList.count();
for (int langNdx=0; langNdx < languageCodeListCount; ++langNdx)
{
- QString languageCode = languageCodeList[langNdx];
- QStringList synthesizerList = m_langToSynthMap[languageCode];
+ TQString languageCode = languageCodeList[langNdx];
+ TQStringList synthesizerList = m_langToSynthMap[languageCode];
synthesizerList.append(synth);
m_langToSynthMap[languageCode] = synthesizerList;
}
}
// Fill language to language code map.
- QStringList languageCodeList = m_langToSynthMap.keys();
+ TQStringList languageCodeList = m_langToSynthMap.keys();
const int languageCodeListCount = languageCodeList.count();
for (int ndx = 0; ndx < languageCodeListCount; ++ndx)
{
- QString languageCode = languageCodeList[ndx];
- QString language = languageCodeToLanguage(languageCode);
+ TQString languageCode = languageCodeList[ndx];
+ TQString language = languageCodeToLanguage(languageCode);
m_languageToLanguageCodeMap[language] = languageCode;
}
}
// Converts a language code plus optional country code to language description.
-QString AddTalker::languageCodeToLanguage(const QString &languageCode)
+TQString AddTalker::languageCodeToLanguage(const TQString &languageCode)
{
- QString twoAlpha;
- QString countryCode;
- QString charSet;
- QString language;
+ TQString twoAlpha;
+ TQString countryCode;
+ TQString charSet;
+ TQString language;
if (languageCode == "other")
language = i18n("Other");
else
@@ -146,12 +146,12 @@ void AddTalker::applyFilter()
if (languageRadioButton->isChecked())
{
// Get current language.
- QString language = languageSelection->currentText();
+ TQString language = languageSelection->currentText();
// Fill language combobox will all possible languages.
languageSelection->clear();
- QStringList languageCodeList = m_langToSynthMap.keys();
+ TQStringList languageCodeList = m_langToSynthMap.keys();
const int languageCodeListCount = languageCodeList.count();
- QStringList languageList;
+ TQStringList languageList;
for (int ndx=0; ndx < languageCodeListCount; ++ndx)
{
languageList.append(languageCodeToLanguage(languageCodeList[ndx]));
@@ -166,11 +166,11 @@ void AddTalker::applyFilter()
// Get current language selection.
language = languageSelection->currentText();
// Map current language to language code.
- QString languageCode = m_languageToLanguageCodeMap[language];
+ TQString languageCode = m_languageToLanguageCodeMap[language];
// Get list of synths that support this language code.
- QStringList synthList = m_langToSynthMap[languageCode];
+ TQStringList synthList = m_langToSynthMap[languageCode];
// Get current user's synth selection.
- QString synth = synthesizerSelection->currentText();
+ TQString synth = synthesizerSelection->currentText();
// Fill synthesizer combobox.
synthesizerSelection->clear();
synthList.sort();
@@ -185,10 +185,10 @@ void AddTalker::applyFilter()
else
{
// Get current synth selection.
- QString synth = synthesizerSelection->currentText();
+ TQString synth = synthesizerSelection->currentText();
// Fill synthesizer combobox with all possible synths.
synthesizerSelection->clear();
- QStringList synthList = m_synthToLangMap.keys();
+ TQStringList synthList = m_synthToLangMap.keys();
synthList.sort();
const int synthListCount = synthList.count();
for (int ndx=0; ndx < synthListCount; ++ndx)
@@ -200,13 +200,13 @@ void AddTalker::applyFilter()
// Get current synth selection.
synth = synthesizerSelection->currentText();
// Get list of supported language codes.
- QStringList languageCodeList = m_synthToLangMap[synth];
+ TQStringList languageCodeList = m_synthToLangMap[synth];
// Get current user's language selection.
- QString language = languageSelection->currentText();
+ TQString language = languageSelection->currentText();
// Fill language combobox with language descriptions.
languageSelection->clear();
const int languageCodeListCount = languageCodeList.count();
- QStringList languageList;
+ TQStringList languageList;
for (int ndx=0; ndx < languageCodeListCount; ++ndx)
{
languageList.append(languageCodeToLanguage(languageCodeList[ndx]));
diff --git a/kttsd/kcmkttsmgr/addtalker.h b/kttsd/kcmkttsmgr/addtalker.h
index 29bbfb5..33b9ba8 100644
--- a/kttsd/kcmkttsmgr/addtalker.h
+++ b/kttsd/kcmkttsmgr/addtalker.h
@@ -26,12 +26,12 @@
#define ADDTALKER_H
// Qt includes.
-#include <qmap.h>
+#include <tqmap.h>
#include "addtalkerwidget.h"
-typedef QMap<QString,QStringList> SynthToLangMap;
-typedef QMap<QString,QStringList> LangToSynthMap;
+typedef TQMap<TQString,TQStringList> SynthToLangMap;
+typedef TQMap<TQString,TQStringList> LangToSynthMap;
class AddTalker : public AddTalkerWidget
{
@@ -40,11 +40,11 @@ class AddTalker : public AddTalkerWidget
public:
/**
* Constructor.
- * @param synthToLangMap QMap of supported language codes indexed by synthesizer.
+ * @param synthToLangMap TQMap of supported language codes indexed by synthesizer.
* @param parent Inherited KDialog parameter.
* @param name Inherited KDialog parameter.
*/
- AddTalker(SynthToLangMap synthToLangMap, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ AddTalker(SynthToLangMap synthToLangMap, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
/**
* Destructor.
@@ -54,29 +54,29 @@ public:
/**
* Returns user's chosen language code.
*/
- QString getLanguageCode();
+ TQString getLanguageCode();
/**
* Returns user's chosen synthesizer.
*/
- QString getSynthesizer();
+ TQString getSynthesizer();
private:
/**
* Set the synthesizer-to-languages map.
- * @param synthToLang QMap of supported language codes indexed by synthesizer.
+ * @param synthToLang TQMap of supported language codes indexed by synthesizer.
*/
void setSynthToLangMap(SynthToLangMap synthToLangMap);
// Converts a language code plus optional country code to language description.
- QString languageCodeToLanguage(const QString &languageCode);
+ TQString languageCodeToLanguage(const TQString &languageCode);
- // QMap of language descriptions to language codes.
- QMap<QString,QString> m_languageToLanguageCodeMap;
- // QMap of supported languages indexed by synthesizer.
+ // TQMap of language descriptions to language codes.
+ TQMap<TQString,TQString> m_languageToLanguageCodeMap;
+ // TQMap of supported languages indexed by synthesizer.
SynthToLangMap m_synthToLangMap;
- // QMap of synthesizers indexed by language code they support.
+ // TQMap of synthesizers indexed by language code they support.
LangToSynthMap m_langToSynthMap;
private slots:
diff --git a/kttsd/kcmkttsmgr/kcmkttsmgr.cpp b/kttsd/kcmkttsmgr/kcmkttsmgr.cpp
index d890446..b8cf367 100644
--- a/kttsd/kcmkttsmgr/kcmkttsmgr.cpp
+++ b/kttsd/kcmkttsmgr/kcmkttsmgr.cpp
@@ -24,16 +24,16 @@
#include <math.h>
// Qt includes.
-#include <qwidget.h>
-#include <qtabwidget.h>
-#include <qcheckbox.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qslider.h>
-#include <qlabel.h>
-#include <qpopupmenu.h>
-#include <qbuttongroup.h>
+#include <tqwidget.h>
+#include <tqtabwidget.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqslider.h>
+#include <tqlabel.h>
+#include <tqpopupmenu.h>
+#include <tqbuttongroup.h>
// KDE includes.
#include <dcopclient.h>
@@ -80,23 +80,23 @@ const bool notifyEnableCheckBoxValue = false;
const bool notifyExcludeEventsWithSoundCheckBoxValue = true;
const bool textPreMsgCheckValue = true;
-const QString textPreMsgValue = i18n("Text interrupted. Message.");
+const TQString textPreMsgValue = i18n("Text interrupted. Message.");
const bool textPreSndCheckValue = false;
-const QString textPreSndValue = "";
+const TQString textPreSndValue = "";
const bool textPostMsgCheckValue = true;
-const QString textPostMsgValue = i18n("Resuming text.");
+const TQString textPostMsgValue = i18n("Resuming text.");
const bool textPostSndCheckValue = false;
-const QString textPostSndValue = "";
+const TQString textPostSndValue = "";
const int timeBoxValue = 100;
const bool keepAudioCheckBoxValue = false;
// Make this a plug in.
-typedef KGenericFactory<KCMKttsMgr, QWidget> KCMKttsMgrFactory;
+typedef KGenericFactory<KCMKttsMgr, TQWidget> KCMKttsMgrFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kttsd, KCMKttsMgrFactory("kttsd") )
/**
@@ -104,7 +104,7 @@ K_EXPORT_COMPONENT_FACTORY( kcm_kttsd, KCMKttsMgrFactory("kttsd") )
* Makes the list of plug ins.
* And the languages acording to the plug ins.
*/
-KCMKttsMgr::KCMKttsMgr(QWidget *parent, const char *name, const QStringList &) :
+KCMKttsMgr::KCMKttsMgr(TQWidget *parent, const char *name, const TQStringList &) :
DCOPStub("kttsd", "KSpeech"),
DCOPObject("kcmkttsmgr_kspeechsink"),
KCModule(KCMKttsMgrFactory::instance(), parent, name)
@@ -119,7 +119,7 @@ KCMKttsMgr::KCMKttsMgr(QWidget *parent, const char *name, const QStringList &) :
m_suppressConfigChanged = false;
// Add the KTTS Manager widget
- QGridLayout *layout = new QGridLayout(this, 0, 0);
+ TQGridLayout *layout = new TQGridLayout(this, 0, 0);
m_kttsmgrw = new KCMKttsMgrWidget(this, "kttsmgrw");
// m_kttsmgrw = new KCMKttsMgrWidget(this);
layout->addWidget(m_kttsmgrw, 0, 0);
@@ -162,14 +162,14 @@ KCMKttsMgr::KCMKttsMgr(QWidget *parent, const char *name, const QStringList &) :
m_kttsmgrw->pcmComboBox->setEditable(false);
// Construct a popup menu for the Sentence Boundary Detector buttons on Filter tab.
- m_sbdPopmenu = new QPopupMenu( m_kttsmgrw, "SbdPopupMenu" );
- m_sbdPopmenu->insertItem( i18n("&Edit..."), this, SLOT(slot_configureSbdFilter()), 0, sbdBtnEdit );
+ m_sbdPopmenu = new TQPopupMenu( m_kttsmgrw, "SbdPopupMenu" );
+ m_sbdPopmenu->insertItem( i18n("&Edit..."), this, TQT_SLOT(slot_configureSbdFilter()), 0, sbdBtnEdit );
m_sbdPopmenu->insertItem( KGlobal::iconLoader()->loadIconSet("up", KIcon::Small),
- i18n("U&p"), this, SLOT(slot_higherSbdFilterPriority()), 0, sbdBtnUp );
+ i18n("U&p"), this, TQT_SLOT(slot_higherSbdFilterPriority()), 0, sbdBtnUp );
m_sbdPopmenu->insertItem( KGlobal::iconLoader()->loadIconSet("down", KIcon::Small),
- i18n("Do&wn"), this, SLOT(slot_lowerSbdFilterPriority()), 0, sbdBtnDown );
- m_sbdPopmenu->insertItem( i18n("&Add..."), this, SLOT(slot_addSbdFilter()), 0, sbdBtnAdd );
- m_sbdPopmenu->insertItem( i18n("&Remove"), this, SLOT(slot_removeSbdFilter()), 0, sbdBtnRemove );
+ i18n("Do&wn"), this, TQT_SLOT(slot_lowerSbdFilterPriority()), 0, sbdBtnDown );
+ m_sbdPopmenu->insertItem( i18n("&Add..."), this, TQT_SLOT(slot_addSbdFilter()), 0, sbdBtnAdd );
+ m_sbdPopmenu->insertItem( i18n("&Remove"), this, TQT_SLOT(slot_removeSbdFilter()), 0, sbdBtnRemove );
m_kttsmgrw->sbdButton->setPopup( m_sbdPopmenu );
// If aRts is available, enable its radio button.
@@ -192,7 +192,7 @@ KCMKttsMgr::KCMKttsMgr(QWidget *parent, const char *name, const QStringList &) :
m_kttsmgrw->gstreamerRadioButton->setEnabled(true);
m_kttsmgrw->sinkLabel->setEnabled(true);
m_kttsmgrw->sinkComboBox->setEnabled(true);
- QStringList sinkList = player->getPluginList("Sink/Audio");
+ TQStringList sinkList = player->getPluginList("Sink/Audio");
// kdDebug() << "KCMKttsMgr::KCMKttsMgr: GStreamer Sink List = " << sinkList << endl;
m_kttsmgrw->sinkComboBox->clear();
m_kttsmgrw->sinkComboBox->insertStringList(sinkList);
@@ -209,7 +209,7 @@ KCMKttsMgr::KCMKttsMgr(QWidget *parent, const char *name, const QStringList &) :
m_kttsmgrw->alsaRadioButton->setEnabled(true);
m_kttsmgrw->pcmLabel->setEnabled(true);
m_kttsmgrw->pcmComboBox->setEnabled(true);
- QStringList pcmList = player->getPluginList("");
+ TQStringList pcmList = player->getPluginList("");
pcmList.append("custom");
kdDebug() << "KCMKttsMgr::KCMKttsMgr: ALSA pcmList = " << pcmList << endl;
m_kttsmgrw->pcmComboBox->clear();
@@ -227,7 +227,7 @@ KCMKttsMgr::KCMKttsMgr(QWidget *parent, const char *name, const QStringList &) :
m_kttsmgrw->akodeRadioButton->setEnabled(true);
m_kttsmgrw->akodeSinkLabel->setEnabled(true);
m_kttsmgrw->akodeComboBox->setEnabled(true);
- QStringList pcmList = player->getPluginList("");
+ TQStringList pcmList = player->getPluginList("");
kdDebug() << "KCMKttsMgr::KCMKttsMgr: aKode Sink List = " << pcmList << endl;
m_kttsmgrw->akodeComboBox->clear();
m_kttsmgrw->akodeComboBox->insertStringList(pcmList);
@@ -248,94 +248,94 @@ KCMKttsMgr::KCMKttsMgr(QWidget *parent, const char *name, const QStringList &) :
// Connect the signals from the KCMKtssMgrWidget to this class.
// Talker tab.
- connect(m_kttsmgrw->addTalkerButton, SIGNAL(clicked()),
- this, SLOT(slot_addTalker()));
- connect(m_kttsmgrw->higherTalkerPriorityButton, SIGNAL(clicked()),
- this, SLOT(slot_higherTalkerPriority()));
- connect(m_kttsmgrw->lowerTalkerPriorityButton, SIGNAL(clicked()),
- this, SLOT(slot_lowerTalkerPriority()));
- connect(m_kttsmgrw->removeTalkerButton, SIGNAL(clicked()),
- this, SLOT(slot_removeTalker()));
- connect(m_kttsmgrw->configureTalkerButton, SIGNAL(clicked()),
- this, SLOT(slot_configureTalker()));
- connect(m_kttsmgrw->talkersList, SIGNAL(selectionChanged()),
- this, SLOT(updateTalkerButtons()));
+ connect(m_kttsmgrw->addTalkerButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_addTalker()));
+ connect(m_kttsmgrw->higherTalkerPriorityButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_higherTalkerPriority()));
+ connect(m_kttsmgrw->lowerTalkerPriorityButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_lowerTalkerPriority()));
+ connect(m_kttsmgrw->removeTalkerButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_removeTalker()));
+ connect(m_kttsmgrw->configureTalkerButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_configureTalker()));
+ connect(m_kttsmgrw->talkersList, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(updateTalkerButtons()));
// Filter tab.
- connect(m_kttsmgrw->addFilterButton, SIGNAL(clicked()),
- this, SLOT(slot_addNormalFilter()));
- connect(m_kttsmgrw->higherFilterPriorityButton, SIGNAL(clicked()),
- this, SLOT(slot_higherNormalFilterPriority()));
- connect(m_kttsmgrw->lowerFilterPriorityButton, SIGNAL(clicked()),
- this, SLOT(slot_lowerNormalFilterPriority()));
- connect(m_kttsmgrw->removeFilterButton, SIGNAL(clicked()),
- this, SLOT(slot_removeNormalFilter()));
- connect(m_kttsmgrw->configureFilterButton, SIGNAL(clicked()),
- this, SLOT(slot_configureNormalFilter()));
- connect(m_kttsmgrw->filtersList, SIGNAL(selectionChanged()),
- this, SLOT(updateFilterButtons()));
- //connect(m_kttsmgrw->filtersList, SIGNAL(stateChanged()),
- // this, SLOT(configChanged()));
- connect(m_kttsmgrw->sbdsList, SIGNAL(selectionChanged()),
- this, SLOT(updateSbdButtons()));
+ connect(m_kttsmgrw->addFilterButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_addNormalFilter()));
+ connect(m_kttsmgrw->higherFilterPriorityButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_higherNormalFilterPriority()));
+ connect(m_kttsmgrw->lowerFilterPriorityButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_lowerNormalFilterPriority()));
+ connect(m_kttsmgrw->removeFilterButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_removeNormalFilter()));
+ connect(m_kttsmgrw->configureFilterButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_configureNormalFilter()));
+ connect(m_kttsmgrw->filtersList, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(updateFilterButtons()));
+ //connect(m_kttsmgrw->filtersList, TQT_SIGNAL(stateChanged()),
+ // this, TQT_SLOT(configChanged()));
+ connect(m_kttsmgrw->sbdsList, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(updateSbdButtons()));
// Audio tab.
- connect(m_kttsmgrw->gstreamerRadioButton, SIGNAL(toggled(bool)),
- this, SLOT(slotGstreamerRadioButton_toggled(bool)));
- connect(m_kttsmgrw->alsaRadioButton, SIGNAL(toggled(bool)),
- this, SLOT(slotAlsaRadioButton_toggled(bool)));
- connect(m_kttsmgrw->pcmComboBox, SIGNAL(activated(int)),
- this, SLOT(slotPcmComboBox_activated()));
- connect(m_kttsmgrw->akodeRadioButton, SIGNAL(toggled(bool)),
- this, SLOT(slotAkodeRadioButton_toggled(bool)));
- connect(m_kttsmgrw->timeBox, SIGNAL(valueChanged(int)),
- this, SLOT(timeBox_valueChanged(int)));
- connect(m_kttsmgrw->timeSlider, SIGNAL(valueChanged(int)),
- this, SLOT(timeSlider_valueChanged(int)));
- connect(m_kttsmgrw->timeBox, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_kttsmgrw->timeSlider, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_kttsmgrw->keepAudioCheckBox, SIGNAL(toggled(bool)),
- this, SLOT(keepAudioCheckBox_toggled(bool)));
- connect(m_kttsmgrw->keepAudioPath, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
+ connect(m_kttsmgrw->gstreamerRadioButton, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotGstreamerRadioButton_toggled(bool)));
+ connect(m_kttsmgrw->alsaRadioButton, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotAlsaRadioButton_toggled(bool)));
+ connect(m_kttsmgrw->pcmComboBox, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotPcmComboBox_activated()));
+ connect(m_kttsmgrw->akodeRadioButton, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotAkodeRadioButton_toggled(bool)));
+ connect(m_kttsmgrw->timeBox, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(timeBox_valueChanged(int)));
+ connect(m_kttsmgrw->timeSlider, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(timeSlider_valueChanged(int)));
+ connect(m_kttsmgrw->timeBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_kttsmgrw->timeSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_kttsmgrw->keepAudioCheckBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(keepAudioCheckBox_toggled(bool)));
+ connect(m_kttsmgrw->keepAudioPath, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
// General tab.
- connect(m_kttsmgrw->enableKttsdCheckBox, SIGNAL(toggled(bool)),
- SLOT(enableKttsdToggled(bool)));
+ connect(m_kttsmgrw->enableKttsdCheckBox, TQT_SIGNAL(toggled(bool)),
+ TQT_SLOT(enableKttsdToggled(bool)));
// Notify tab.
- connect(m_kttsmgrw->notifyEnableCheckBox, SIGNAL(toggled(bool)),
- this, SLOT(slotNotifyEnableCheckBox_toggled(bool)));
- connect(m_kttsmgrw->notifyExcludeEventsWithSoundCheckBox, SIGNAL(toggled(bool)),
- this, SLOT(configChanged()));
- connect(m_kttsmgrw->notifyAddButton, SIGNAL(clicked()),
- this, SLOT(slotNotifyAddButton_clicked()));
- connect(m_kttsmgrw->notifyRemoveButton, SIGNAL(clicked()),
- this, SLOT(slotNotifyRemoveButton_clicked()));
- connect(m_kttsmgrw->notifyClearButton, SIGNAL(clicked()),
- this, SLOT(slotNotifyClearButton_clicked()));
- connect(m_kttsmgrw->notifyLoadButton, SIGNAL(clicked()),
- this, SLOT(slotNotifyLoadButton_clicked()));
- connect(m_kttsmgrw->notifySaveButton, SIGNAL(clicked()),
- this, SLOT(slotNotifySaveButton_clicked()));
- connect(m_kttsmgrw->notifyListView, SIGNAL(selectionChanged()),
- this, SLOT(slotNotifyListView_selectionChanged()));
- connect(m_kttsmgrw->notifyPresentComboBox, SIGNAL(activated(int)),
- this, SLOT(slotNotifyPresentComboBox_activated(int)));
- connect(m_kttsmgrw->notifyActionComboBox, SIGNAL(activated(int)),
- this, SLOT(slotNotifyActionComboBox_activated(int)));
- connect(m_kttsmgrw->notifyTestButton, SIGNAL(clicked()),
- this, SLOT(slotNotifyTestButton_clicked()));
- connect(m_kttsmgrw->notifyMsgLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotNotifyMsgLineEdit_textChanged(const QString&)));
- connect(m_kttsmgrw->notifyTalkerButton, SIGNAL(clicked()),
- this, SLOT(slotNotifyTalkerButton_clicked()));
+ connect(m_kttsmgrw->notifyEnableCheckBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotNotifyEnableCheckBox_toggled(bool)));
+ connect(m_kttsmgrw->notifyExcludeEventsWithSoundCheckBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_kttsmgrw->notifyAddButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotNotifyAddButton_clicked()));
+ connect(m_kttsmgrw->notifyRemoveButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotNotifyRemoveButton_clicked()));
+ connect(m_kttsmgrw->notifyClearButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotNotifyClearButton_clicked()));
+ connect(m_kttsmgrw->notifyLoadButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotNotifyLoadButton_clicked()));
+ connect(m_kttsmgrw->notifySaveButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotNotifySaveButton_clicked()));
+ connect(m_kttsmgrw->notifyListView, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotNotifyListView_selectionChanged()));
+ connect(m_kttsmgrw->notifyPresentComboBox, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotNotifyPresentComboBox_activated(int)));
+ connect(m_kttsmgrw->notifyActionComboBox, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotNotifyActionComboBox_activated(int)));
+ connect(m_kttsmgrw->notifyTestButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotNotifyTestButton_clicked()));
+ connect(m_kttsmgrw->notifyMsgLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotNotifyMsgLineEdit_textChanged(const TQString&)));
+ connect(m_kttsmgrw->notifyTalkerButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotNotifyTalkerButton_clicked()));
// Others.
- connect(m_kttsmgrw, SIGNAL( configChanged() ),
- this, SLOT( configChanged() ) );
- connect(m_kttsmgrw->mainTab, SIGNAL(currentChanged(QWidget*)),
- this, SLOT(slotTabChanged()));
+ connect(m_kttsmgrw, TQT_SIGNAL( configChanged() ),
+ this, TQT_SLOT( configChanged() ) );
+ connect(m_kttsmgrw->mainTab, TQT_SIGNAL(currentChanged(TQWidget*)),
+ this, TQT_SLOT(slotTabChanged()));
// Connect KTTSD DCOP signals to our slots.
if (!connectDCOPSignal("kttsd", "KSpeech",
@@ -430,7 +430,7 @@ void KCMKttsMgr::load()
loadNotifyEventsFromFile( locateLocal("config", "kttsd_notifyevents.xml"), true );
slotNotifyEnableCheckBox_toggled( m_kttsmgrw->notifyEnableCheckBox->isChecked() );
// Auto-expand and position on the Default item.
- QListViewItem* item = m_kttsmgrw->notifyListView->findItem( "default", nlvcEventSrc );
+ TQListViewItem* item = m_kttsmgrw->notifyListView->findItem( "default", nlvcEventSrc );
if ( item )
if ( item->childCount() > 0 ) item = item->firstChild();
if ( item ) m_kttsmgrw->notifyListView->ensureItemVisible( item );
@@ -477,30 +477,30 @@ void KCMKttsMgr::load()
// Load existing Talkers into the listview.
m_kttsmgrw->talkersList->clear();
m_kttsmgrw->talkersList->setSortColumn(-1);
- QStringList talkerIDsList = m_config->readListEntry("TalkerIDs", ',');
+ TQStringList talkerIDsList = m_config->readListEntry("TalkerIDs", ',');
if (!talkerIDsList.isEmpty())
{
- QListViewItem* talkerItem = 0;
- QStringList::ConstIterator itEnd = talkerIDsList.constEnd();
- for (QStringList::ConstIterator it = talkerIDsList.constBegin(); it != itEnd; ++it)
+ TQListViewItem* talkerItem = 0;
+ TQStringList::ConstIterator itEnd = talkerIDsList.constEnd();
+ for (TQStringList::ConstIterator it = talkerIDsList.constBegin(); it != itEnd; ++it)
{
- QString talkerID = *it;
+ TQString talkerID = *it;
// kdDebug() << "KCMKttsMgr::load: talkerID = " << talkerID << endl;
- m_config->setGroup(QString("Talker_") + talkerID);
- QString talkerCode = m_config->readEntry("TalkerCode");
- QString fullLanguageCode;
+ m_config->setGroup(TQString("Talker_") + talkerID);
+ TQString talkerCode = m_config->readEntry("TalkerCode");
+ TQString fullLanguageCode;
talkerCode = TalkerCode::normalizeTalkerCode(talkerCode, fullLanguageCode);
- QString language = TalkerCode::languageCodeToLanguage(fullLanguageCode);
- QString desktopEntryName = m_config->readEntry("DesktopEntryName", QString::null);
+ TQString language = TalkerCode::languageCodeToLanguage(fullLanguageCode);
+ TQString desktopEntryName = m_config->readEntry("DesktopEntryName", TQString::null);
// If a DesktopEntryName is not in the config file, it was configured before
// we started using them, when we stored translated plugin names instead.
// Try to convert the translated plugin name to a DesktopEntryName.
// DesktopEntryNames are better because user can change their desktop language
// and DesktopEntryName won't change.
- QString synthName;
+ TQString synthName;
if (desktopEntryName.isEmpty())
{
- synthName = m_config->readEntry("PlugIn", QString::null);
+ synthName = m_config->readEntry("PlugIn", TQString::null);
// See if the translated name will untranslate. If not, well, sorry.
desktopEntryName = TalkerCode::TalkerNameToDesktopEntryName(synthName);
// Record the DesktopEntryName from now on.
@@ -529,13 +529,13 @@ void KCMKttsMgr::load()
// Iterate thru the possible plug ins getting their language support codes.
for(unsigned int i=0; i < offers.count() ; ++i)
{
- QString synthName = offers[i]->name();
- QStringList languageCodes = offers[i]->property("X-KDE-Languages").toStringList();
+ TQString synthName = offers[i]->name();
+ TQStringList languageCodes = offers[i]->property("X-KDE-Languages").toStringList();
// Add language codes to the language-to-language code map.
- QStringList::ConstIterator endLanguages(languageCodes.constEnd());
- for( QStringList::ConstIterator it = languageCodes.constBegin(); it != endLanguages; ++it )
+ TQStringList::ConstIterator endLanguages(languageCodes.constEnd());
+ for( TQStringList::ConstIterator it = languageCodes.constBegin(); it != endLanguages; ++it )
{
- QString language = TalkerCode::languageCodeToLanguage(*it);
+ TQString language = TalkerCode::languageCodeToLanguage(*it);
m_languagesToCodes[language] = *it;
}
@@ -552,32 +552,32 @@ void KCMKttsMgr::load()
m_languagesToCodes[i18n("Other")] = "other";
// Load Filters.
- QListViewItem* filterItem = 0;
+ TQListViewItem* filterItem = 0;
m_kttsmgrw->filtersList->clear();
m_kttsmgrw->sbdsList->clear();
m_kttsmgrw->filtersList->setSortColumn(-1);
m_kttsmgrw->sbdsList->setSortColumn(-1);
m_config->setGroup("General");
- QStringList filterIDsList = m_config->readListEntry("FilterIDs", ',');
+ TQStringList filterIDsList = m_config->readListEntry("FilterIDs", ',');
// kdDebug() << "KCMKttsMgr::load: FilterIDs = " << filterIDsList << endl;
if (!filterIDsList.isEmpty())
{
- QStringList::ConstIterator itEnd = filterIDsList.constEnd();
- for (QStringList::ConstIterator it = filterIDsList.constBegin(); it != itEnd; ++it)
+ TQStringList::ConstIterator itEnd = filterIDsList.constEnd();
+ for (TQStringList::ConstIterator it = filterIDsList.constBegin(); it != itEnd; ++it)
{
- QString filterID = *it;
+ TQString filterID = *it;
// kdDebug() << "KCMKttsMgr::load: filterID = " << filterID << endl;
m_config->setGroup("Filter_" + filterID);
- QString desktopEntryName = m_config->readEntry("DesktopEntryName", QString::null);
+ TQString desktopEntryName = m_config->readEntry("DesktopEntryName", TQString::null);
// If a DesktopEntryName is not in the config file, it was configured before
// we started using them, when we stored translated plugin names instead.
// Try to convert the translated plugin name to a DesktopEntryName.
// DesktopEntryNames are better because user can change their desktop language
// and DesktopEntryName won't change.
- QString filterPlugInName;
+ TQString filterPlugInName;
if (desktopEntryName.isEmpty())
{
- filterPlugInName = m_config->readEntry("PlugInName", QString::null);
+ filterPlugInName = m_config->readEntry("PlugInName", TQString::null);
// See if the translated name will untranslate. If not, well, sorry.
desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
// Record the DesktopEntryName from now on.
@@ -586,7 +586,7 @@ void KCMKttsMgr::load()
filterPlugInName = FilterDesktopEntryNameToName(desktopEntryName);
if (!filterPlugInName.isEmpty())
{
- QString userFilterName = m_config->readEntry("UserFilterName", filterPlugInName);
+ TQString userFilterName = m_config->readEntry("UserFilterName", filterPlugInName);
bool multiInstance = m_config->readBoolEntry("MultiInstance", false);
// Determine if this filter is a Sentence Boundary Detector (SBD).
bool isSbd = m_config->readBoolEntry("IsSBD", false);
@@ -604,11 +604,11 @@ void KCMKttsMgr::load()
filterItem = m_kttsmgrw->filtersList->lastChild();
if (!filterItem)
filterItem = new KttsCheckListItem(m_kttsmgrw->filtersList,
- userFilterName, QCheckListItem::CheckBox, this);
+ userFilterName, TQCheckListItem::CheckBox, this);
else
filterItem = new KttsCheckListItem(m_kttsmgrw->filtersList, filterItem,
- userFilterName, QCheckListItem::CheckBox, this);
- dynamic_cast<QCheckListItem*>(filterItem)->setOn(checked);
+ userFilterName, TQCheckListItem::CheckBox, this);
+ dynamic_cast<TQCheckListItem*>(filterItem)->setOn(checked);
}
filterItem->setText(flvcFilterID, filterID);
filterItem->setText(flvcPlugInName, filterPlugInName);
@@ -626,8 +626,8 @@ void KCMKttsMgr::load()
offers = KTrader::self()->query("KTTSD/FilterPlugin");
for (unsigned int i=0; i < offers.count() ; ++i)
{
- QString filterPlugInName = offers[i]->name();
- QString desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
+ TQString filterPlugInName = offers[i]->name();
+ TQString desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
if (!desktopEntryName.isEmpty() && (countFilterPlugins(filterPlugInName) == 0))
{
// Must load plugin to determine if it supports multiple instances
@@ -636,10 +636,10 @@ void KCMKttsMgr::load()
if (filterPlugIn)
{
++m_lastFilterID;
- QString filterID = QString::number(m_lastFilterID);
- QString groupName = "Filter_" + filterID;
+ TQString filterID = TQString::number(m_lastFilterID);
+ TQString groupName = "Filter_" + filterID;
filterPlugIn->load(m_config, groupName);
- QString userFilterName = filterPlugIn->userPlugInName();
+ TQString userFilterName = filterPlugIn->userPlugInName();
if (!userFilterName.isEmpty())
{
kdDebug() << "KCMKttsMgr::load: auto-configuring filter " << userFilterName << endl;
@@ -659,11 +659,11 @@ void KCMKttsMgr::load()
filterItem = m_kttsmgrw->filtersList->lastChild();
if (!filterItem)
filterItem = new KttsCheckListItem(m_kttsmgrw->filtersList,
- userFilterName, QCheckListItem::CheckBox, this);
+ userFilterName, TQCheckListItem::CheckBox, this);
else
filterItem = new KttsCheckListItem(m_kttsmgrw->filtersList, filterItem,
- userFilterName, QCheckListItem::CheckBox, this);
- dynamic_cast<QCheckListItem*>(filterItem)->setOn(false);
+ userFilterName, TQCheckListItem::CheckBox, this);
+ dynamic_cast<TQCheckListItem*>(filterItem)->setOn(false);
}
filterItem->setText(flvcFilterID, filterID);
filterItem->setText(flvcPlugInName, filterPlugInName);
@@ -688,7 +688,7 @@ void KCMKttsMgr::load()
}
}
// Rewrite list of FilterIDs in case we added any.
- QString filterIDs = filterIDsList.join(",");
+ TQString filterIDs = filterIDsList.join(",");
m_config->setGroup("General");
m_config->writeEntry("FilterIDs", filterIDs);
m_config->sync();
@@ -801,67 +801,67 @@ void KCMKttsMgr::save()
m_config->writeEntry("KeepAudioPath", m_kttsmgrw->keepAudioPath->url());
// Get ordered list of all talker IDs.
- QStringList talkerIDsList;
- QListViewItem* talkerItem = m_kttsmgrw->talkersList->firstChild();
+ TQStringList talkerIDsList;
+ TQListViewItem* talkerItem = m_kttsmgrw->talkersList->firstChild();
while (talkerItem)
{
- QListViewItem* nextTalkerItem = talkerItem->itemBelow();
- QString talkerID = talkerItem->text(tlvcTalkerID);
+ TQListViewItem* nextTalkerItem = talkerItem->itemBelow();
+ TQString talkerID = talkerItem->text(tlvcTalkerID);
talkerIDsList.append(talkerID);
talkerItem = nextTalkerItem;
}
- QString talkerIDs = talkerIDsList.join(",");
+ TQString talkerIDs = talkerIDsList.join(",");
m_config->writeEntry("TalkerIDs", talkerIDs);
// Erase obsolete Talker_nn sections.
- QStringList groupList = m_config->groupList();
+ TQStringList groupList = m_config->groupList();
int groupListCount = groupList.count();
for (int groupNdx = 0; groupNdx < groupListCount; ++groupNdx)
{
- QString groupName = groupList[groupNdx];
+ TQString groupName = groupList[groupNdx];
if (groupName.left(7) == "Talker_")
{
- QString groupTalkerID = groupName.mid(7);
+ TQString groupTalkerID = groupName.mid(7);
if (!talkerIDsList.contains(groupTalkerID)) m_config->deleteGroup(groupName);
}
}
// Get ordered list of all filter IDs. Record enabled state of each filter.
- QStringList filterIDsList;
- QListViewItem* filterItem = m_kttsmgrw->filtersList->firstChild();
+ TQStringList filterIDsList;
+ TQListViewItem* filterItem = m_kttsmgrw->filtersList->firstChild();
while (filterItem)
{
- QListViewItem* nextFilterItem = filterItem->itemBelow();
- QString filterID = filterItem->text(flvcFilterID);
+ TQListViewItem* nextFilterItem = filterItem->itemBelow();
+ TQString filterID = filterItem->text(flvcFilterID);
filterIDsList.append(filterID);
- bool checked = dynamic_cast<QCheckListItem*>(filterItem)->isOn();
+ bool checked = dynamic_cast<TQCheckListItem*>(filterItem)->isOn();
m_config->setGroup("Filter_" + filterID);
m_config->writeEntry("Enabled", checked);
m_config->writeEntry("IsSBD", false);
filterItem = nextFilterItem;
}
- QListViewItem* sbdItem = m_kttsmgrw->sbdsList->firstChild();
+ TQListViewItem* sbdItem = m_kttsmgrw->sbdsList->firstChild();
while (sbdItem)
{
- QListViewItem* nextSbdItem = sbdItem->itemBelow();
- QString filterID = sbdItem->text(slvcFilterID);
+ TQListViewItem* nextSbdItem = sbdItem->itemBelow();
+ TQString filterID = sbdItem->text(slvcFilterID);
filterIDsList.append(filterID);
m_config->setGroup("Filter_" + filterID);
m_config->writeEntry("Enabled", true);
m_config->writeEntry("IsSBD", true);
sbdItem = nextSbdItem;
}
- QString filterIDs = filterIDsList.join(",");
+ TQString filterIDs = filterIDsList.join(",");
m_config->setGroup("General");
m_config->writeEntry("FilterIDs", filterIDs);
// Erase obsolete Filter_nn sections.
for (int groupNdx = 0; groupNdx < groupListCount; ++groupNdx)
{
- QString groupName = groupList[groupNdx];
+ TQString groupName = groupList[groupNdx];
if (groupName.left(7) == "Filter_")
{
- QString groupFilterID = groupName.mid(7);
+ TQString groupFilterID = groupName.mid(7);
if (!filterIDsList.contains(groupFilterID)) m_config->deleteGroup(groupName);
}
}
@@ -892,7 +892,7 @@ void KCMKttsMgr::save()
if (kttsdRunning)
{
kdDebug() << "Restarting KTTSD" << endl;
- QByteArray data;
+ TQByteArray data;
client->send("kttsd", "KSpeech", "reinit()", data);
}
}
@@ -1066,7 +1066,7 @@ int KCMKttsMgr::buttons() {
* This function returns the small quickhelp.
* That is displayed in the sidebar in the KControl
*/
-QString KCMKttsMgr::quickHelp() const{
+TQString KCMKttsMgr::quickHelp() const{
// kdDebug() << "KCMKttsMgr::quickHelp: Running"<< endl;
return i18n(
"<h1>Text-to-Speech</h1>"
@@ -1094,13 +1094,13 @@ const KAboutData* KCMKttsMgr::aboutData() const{
* @param name DesktopEntryName of the Synthesizer.
* @return Pointer to the configuration plugin for the Talker.
*/
-PlugInConf* KCMKttsMgr::loadTalkerPlugin(const QString& name)
+PlugInConf* KCMKttsMgr::loadTalkerPlugin(const TQString& name)
{
// kdDebug() << "KCMKttsMgr::loadPlugin: Running"<< endl;
// Find the plugin.
KTrader::OfferList offers = KTrader::self()->query("KTTSD/SynthPlugin",
- QString("DesktopEntryName == '%1'").arg(name));
+ TQString("DesktopEntryName == '%1'").arg(name));
if (offers.count() == 1)
{
@@ -1138,13 +1138,13 @@ PlugInConf* KCMKttsMgr::loadTalkerPlugin(const QString& name)
* @param plugInName DesktopEntryName of the plugin.
* @return Pointer to the configuration plugin for the Filter.
*/
-KttsFilterConf* KCMKttsMgr::loadFilterPlugin(const QString& plugInName)
+KttsFilterConf* KCMKttsMgr::loadFilterPlugin(const TQString& plugInName)
{
// kdDebug() << "KCMKttsMgr::loadPlugin: Running"<< endl;
// Find the plugin.
KTrader::OfferList offers = KTrader::self()->query("KTTSD/FilterPlugin",
- QString("DesktopEntryName == '%1'").arg(plugInName));
+ TQString("DesktopEntryName == '%1'").arg(plugInName));
if (offers.count() == 1)
{
@@ -1158,7 +1158,7 @@ KttsFilterConf* KCMKttsMgr::loadFilterPlugin(const QString& plugInName)
KttsFilterConf *plugIn =
KParts::ComponentFactory::createInstanceFromLibrary<KttsFilterConf>(
offers[0]->library().latin1(), NULL, offers[0]->library().latin1(),
- QStringList(), &errorNo);
+ TQStringList(), &errorNo);
if(plugIn){
// If everything went ok, return the plug in pointer.
return plugIn;
@@ -1180,16 +1180,16 @@ KttsFilterConf* KCMKttsMgr::loadFilterPlugin(const QString& plugInName)
/**
* Given an item in the talker listview and a talker code, sets the columns of the item.
-* @param talkerItem QListViewItem.
+* @param talkerItem TQListViewItem.
* @param talkerCode Talker Code.
*/
-void KCMKttsMgr::updateTalkerItem(QListViewItem* talkerItem, const QString &talkerCode)
+void KCMKttsMgr::updateTalkerItem(TQListViewItem* talkerItem, const TQString &talkerCode)
{
TalkerCode parsedTalkerCode(talkerCode);
- QString fullLanguageCode = parsedTalkerCode.fullLanguageCode();
+ TQString fullLanguageCode = parsedTalkerCode.fullLanguageCode();
if (!fullLanguageCode.isEmpty())
{
- QString language = TalkerCode::languageCodeToLanguage(fullLanguageCode);
+ TQString language = TalkerCode::languageCodeToLanguage(fullLanguageCode);
if (!language.isEmpty())
{
m_languagesToCodes[language] = fullLanguageCode;
@@ -1227,26 +1227,26 @@ void KCMKttsMgr::slot_addTalker()
dlg->setMainWidget(addTalkerWidget);
dlg->setHelp("select-plugin", "kttsd");
int dlgResult = dlg->exec();
- QString languageCode = addTalkerWidget->getLanguageCode();
- QString synthName = addTalkerWidget->getSynthesizer();
+ TQString languageCode = addTalkerWidget->getLanguageCode();
+ TQString synthName = addTalkerWidget->getSynthesizer();
delete dlg;
// TODO: Also delete addTalkerWidget?
- if (dlgResult != QDialog::Accepted) return;
+ if (dlgResult != TQDialog::Accepted) return;
// If user chose "Other", must now get a language from him.
if(languageCode == "other")
{
- // Create a QHBox to host KListView.
- QHBox* hBox = new QHBox(m_kttsmgrw, "SelectLanguage_hbox");
+ // Create a TQHBox to host KListView.
+ TQHBox* hBox = new TQHBox(m_kttsmgrw, "SelectLanguage_hbox");
// Create a KListView and fill with all known languages.
KListView* langLView = new KListView(hBox, "SelectLanguage_lview");
langLView->addColumn(i18n("Language"));
langLView->addColumn(i18n("Code"));
- QStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha();
- QString locale;
- QString countryCode;
- QString charSet;
- QString language;
+ TQStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha();
+ TQString locale;
+ TQString countryCode;
+ TQString charSet;
+ TQString language;
const int allLocalesCount = allLocales.count();
for (int ndx=0; ndx < allLocalesCount; ++ndx)
{
@@ -1269,30 +1269,30 @@ void KCMKttsMgr::slot_addTalker()
true);
dlg->setMainWidget(hBox);
dlg->setHelp("select-plugin", "kttsd");
- dlg->setInitialSize(QSize(200, 500), false);
+ dlg->setInitialSize(TQSize(200, 500), false);
dlgResult = dlg->exec();
- languageCode = QString::null;
+ languageCode = TQString::null;
if (langLView->selectedItem()) languageCode = langLView->selectedItem()->text(1);
delete dlg;
// TODO: Also delete KListView and QHBox?
- if (dlgResult != QDialog::Accepted) return;
+ if (dlgResult != TQDialog::Accepted) return;
}
if (languageCode.isEmpty()) return;
- QString language = TalkerCode::languageCodeToLanguage(languageCode);
+ TQString language = TalkerCode::languageCodeToLanguage(languageCode);
if (language.isEmpty()) return;
m_languagesToCodes[language] = languageCode;
// Assign a new Talker ID for the talker. Wraps around to 1.
- QString talkerID = QString::number(m_lastTalkerID + 1);
+ TQString talkerID = TQString::number(m_lastTalkerID + 1);
// Erase extraneous Talker configuration entries that might be there.
- m_config->deleteGroup(QString("Talker_")+talkerID);
+ m_config->deleteGroup(TQString("Talker_")+talkerID);
m_config->sync();
// Convert translated plugin name to DesktopEntryName.
- QString desktopEntryName = TalkerCode::TalkerNameToDesktopEntryName(synthName);
+ TQString desktopEntryName = TalkerCode::TalkerNameToDesktopEntryName(synthName);
// This shouldn't happen, but just in case.
if (desktopEntryName.isEmpty()) return;
@@ -1302,11 +1302,11 @@ void KCMKttsMgr::slot_addTalker()
// Give plugin the user's language code and permit plugin to autoconfigure itself.
m_loadedTalkerPlugIn->setDesiredLanguage(languageCode);
- m_loadedTalkerPlugIn->load(m_config, QString("Talker_")+talkerID);
+ m_loadedTalkerPlugIn->load(m_config, TQString("Talker_")+talkerID);
// If plugin was able to configure itself, it returns a full talker code.
// If not, display configuration dialog for user to configure the plugin.
- QString talkerCode = m_loadedTalkerPlugIn->getTalkerCode();
+ TQString talkerCode = m_loadedTalkerPlugIn->getTalkerCode();
if (talkerCode.isEmpty())
{
// Display configuration dialog.
@@ -1326,27 +1326,27 @@ void KCMKttsMgr::slot_addTalker()
if (!talkerCode.isEmpty())
{
// Let plugin save its configuration.
- m_config->setGroup(QString("Talker_")+talkerID);
- m_loadedTalkerPlugIn->save(m_config, QString("Talker_"+talkerID));
+ m_config->setGroup(TQString("Talker_")+talkerID);
+ m_loadedTalkerPlugIn->save(m_config, TQString("Talker_"+talkerID));
// Record last Talker ID used for next add.
m_lastTalkerID = talkerID.toInt();
// Record configuration data. Note, might as well do this now.
- m_config->setGroup(QString("Talker_")+talkerID);
+ m_config->setGroup(TQString("Talker_")+talkerID);
m_config->writeEntry("DesktopEntryName", desktopEntryName);
talkerCode = TalkerCode::normalizeTalkerCode(talkerCode, languageCode);
m_config->writeEntry("TalkerCode", talkerCode);
m_config->sync();
// Add listview item.
- QListViewItem* talkerItem = m_kttsmgrw->talkersList->lastChild();
+ TQListViewItem* talkerItem = m_kttsmgrw->talkersList->lastChild();
if (talkerItem)
talkerItem = new KListViewItem(m_kttsmgrw->talkersList, talkerItem,
- QString::number(m_lastTalkerID), language, synthName);
+ TQString::number(m_lastTalkerID), language, synthName);
else
talkerItem = new KListViewItem(m_kttsmgrw->talkersList,
- QString::number(m_lastTalkerID), language, synthName);
+ TQString::number(m_lastTalkerID), language, synthName);
// Set additional columns of the listview item.
updateTalkerItem(talkerItem, talkerCode);
@@ -1394,8 +1394,8 @@ void KCMKttsMgr::addFilter( bool sbd)
KListView* lView = m_kttsmgrw->filtersList;
if (sbd) lView = m_kttsmgrw->sbdsList;
- QStringList filterPlugInNames;
- QListViewItem* item = lView->firstChild();
+ TQStringList filterPlugInNames;
+ TQListViewItem* item = lView->firstChild();
while (item)
{
if (item->text(flvcMultiInstance) == "T")
@@ -1409,10 +1409,10 @@ void KCMKttsMgr::addFilter( bool sbd)
KTrader::OfferList offers = KTrader::self()->query("KTTSD/FilterPlugin");
for (unsigned int i=0; i < offers.count() ; ++i)
{
- QString filterPlugInName = offers[i]->name();
+ TQString filterPlugInName = offers[i]->name();
if (countFilterPlugins(filterPlugInName) == 0)
{
- QString desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
+ TQString desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
KttsFilterConf* filterConf = loadFilterPlugin(desktopEntryName);
if (filterConf)
{
@@ -1429,7 +1429,7 @@ void KCMKttsMgr::addFilter( bool sbd)
// If exactly one choice, skip selection dialog, otherwise display list to user to select from.
bool okChosen = false;
- QString filterPlugInName;
+ TQString filterPlugInName;
if (filterPlugInNames.count() > 1)
{
filterPlugInName = KInputDialog::getItem(
@@ -1446,14 +1446,14 @@ void KCMKttsMgr::addFilter( bool sbd)
filterPlugInName = filterPlugInNames[0];
// Assign a new Filter ID for the filter. Wraps around to 1.
- QString filterID = QString::number(m_lastFilterID + 1);
+ TQString filterID = TQString::number(m_lastFilterID + 1);
// Erase extraneous Filter configuration entries that might be there.
- m_config->deleteGroup(QString("Filter_")+filterID);
+ m_config->deleteGroup(TQString("Filter_")+filterID);
m_config->sync();
// Get DesktopEntryName from the translated name.
- QString desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
+ TQString desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
// This shouldn't happen, but just in case.
if (desktopEntryName.isEmpty()) return;
@@ -1462,7 +1462,7 @@ void KCMKttsMgr::addFilter( bool sbd)
if (!m_loadedFilterPlugIn) return;
// Permit plugin to autoconfigure itself.
- m_loadedFilterPlugIn->load(m_config, QString("Filter_")+filterID);
+ m_loadedFilterPlugIn->load(m_config, TQString("Filter_")+filterID);
// Display configuration dialog for user to configure the plugin.
configureFilter();
@@ -1477,14 +1477,14 @@ void KCMKttsMgr::addFilter( bool sbd)
}
// Get user's name for Filter.
- QString userFilterName = m_loadedFilterPlugIn->userPlugInName();
+ TQString userFilterName = m_loadedFilterPlugIn->userPlugInName();
// If user properly configured the plugin, save its configuration.
if ( !userFilterName.isEmpty() )
{
// Let plugin save its configuration.
- m_config->setGroup(QString("Filter_")+filterID);
- m_loadedFilterPlugIn->save(m_config, QString("Filter_"+filterID));
+ m_config->setGroup(TQString("Filter_")+filterID);
+ m_loadedFilterPlugIn->save(m_config, TQString("Filter_"+filterID));
// Record last Filter ID used for next add.
m_lastFilterID = filterID.toInt();
@@ -1493,7 +1493,7 @@ void KCMKttsMgr::addFilter( bool sbd)
bool multiInstance = m_loadedFilterPlugIn->supportsMultiInstance();
// Record configuration data. Note, might as well do this now.
- m_config->setGroup(QString("Filter_")+filterID);
+ m_config->setGroup(TQString("Filter_")+filterID);
m_config->writeEntry("DesktopEntryName", desktopEntryName);
m_config->writeEntry("UserFilterName", userFilterName);
m_config->writeEntry("MultiInstance", multiInstance);
@@ -1502,7 +1502,7 @@ void KCMKttsMgr::addFilter( bool sbd)
m_config->sync();
// Add listview item.
- QListViewItem* filterItem = lView->lastChild();
+ TQListViewItem* filterItem = lView->lastChild();
if (sbd)
{
if (filterItem)
@@ -1514,13 +1514,13 @@ void KCMKttsMgr::addFilter( bool sbd)
{
if (filterItem)
filterItem = new KttsCheckListItem(lView, filterItem,
- userFilterName, QCheckListItem::CheckBox, this);
+ userFilterName, TQCheckListItem::CheckBox, this);
else
filterItem = new KttsCheckListItem(lView,
- userFilterName, QCheckListItem::CheckBox, this);
- dynamic_cast<QCheckListItem*>(filterItem)->setOn(true);
+ userFilterName, TQCheckListItem::CheckBox, this);
+ dynamic_cast<TQCheckListItem*>(filterItem)->setOn(true);
}
- filterItem->setText(flvcFilterID, QString::number(m_lastFilterID));
+ filterItem->setText(flvcFilterID, TQString::number(m_lastFilterID));
filterItem->setText(flvcPlugInName, filterPlugInName);
if (multiInstance)
filterItem->setText(flvcMultiInstance, "T");
@@ -1558,11 +1558,11 @@ void KCMKttsMgr::slot_removeTalker(){
// kdDebug() << "KCMKttsMgr::removeTalker: Running"<< endl;
// Get the selected talker.
- QListViewItem *itemToRemove = m_kttsmgrw->talkersList->selectedItem();
+ TQListViewItem *itemToRemove = m_kttsmgrw->talkersList->selectedItem();
if (!itemToRemove) return;
// Delete the talker from configuration file.
-// QString talkerID = itemToRemove->text(tlvcTalkerID);
+// TQString talkerID = itemToRemove->text(tlvcTalkerID);
// m_config->deleteGroup("Talker_"+talkerID, true, false);
// Delete the talker from list view.
@@ -1594,11 +1594,11 @@ void KCMKttsMgr::removeFilter( bool sbd )
KListView* lView = m_kttsmgrw->filtersList;
if (sbd) lView = m_kttsmgrw->sbdsList;
// Get the selected filter.
- QListViewItem *itemToRemove = lView->selectedItem();
+ TQListViewItem *itemToRemove = lView->selectedItem();
if (!itemToRemove) return;
// Delete the filter from configuration file.
-// QString filterID = itemToRemove->text(flvcFilterID);
+// TQString filterID = itemToRemove->text(flvcFilterID);
// m_config->deleteGroup("Filter_"+filterID, true, false);
// Delete the filter from list view.
@@ -1636,9 +1636,9 @@ void KCMKttsMgr::slot_higherSbdFilterPriority()
*/
void KCMKttsMgr::higherItemPriority( KListView* lView )
{
- QListViewItem* item = lView->selectedItem();
+ TQListViewItem* item = lView->selectedItem();
if (!item) return;
- QListViewItem* prevItem = item->itemAbove();
+ TQListViewItem* prevItem = item->itemAbove();
if (!prevItem) return;
prevItem->moveItem(item);
lView->setSelected(item, true);
@@ -1669,9 +1669,9 @@ void KCMKttsMgr::slot_lowerSbdFilterPriority()
*/
void KCMKttsMgr::lowerItemPriority( KListView* lView )
{
- QListViewItem* item = lView->selectedItem();
+ TQListViewItem* item = lView->selectedItem();
if (!item) return;
- QListViewItem* nextItem = item->itemBelow();
+ TQListViewItem* nextItem = item->itemBelow();
if (!nextItem) return;
item->moveItem(nextItem);
lView->setSelected(item, true);
@@ -1705,7 +1705,7 @@ void KCMKttsMgr::updateTalkerButtons(){
*/
void KCMKttsMgr::updateFilterButtons(){
// kdDebug() << "KCMKttsMgr::updateFilterButtons: Running"<< endl;
- QListViewItem* item = m_kttsmgrw->filtersList->selectedItem();
+ TQListViewItem* item = m_kttsmgrw->filtersList->selectedItem();
if (item) {
m_kttsmgrw->removeFilterButton->setEnabled(true);
m_kttsmgrw->configureFilterButton->setEnabled(true);
@@ -1727,7 +1727,7 @@ void KCMKttsMgr::updateFilterButtons(){
*/
void KCMKttsMgr::updateSbdButtons(){
// kdDebug() << "KCMKttsMgr::updateSbdButtons: Running"<< endl;
- QListViewItem* item = m_kttsmgrw->sbdsList->selectedItem();
+ TQListViewItem* item = m_kttsmgrw->sbdsList->selectedItem();
if (item) {
m_sbdPopmenu->setItemEnabled( sbdBtnEdit, true );
m_sbdPopmenu->setItemEnabled( sbdBtnUp,
@@ -1763,8 +1763,8 @@ void KCMKttsMgr::enableKttsdToggled(bool)
if (!kttsdRunning)
{
// kdDebug() << "KCMKttsMgr::enableKttsdToggled:: Starting KTTSD" << endl;
- QString error;
- if (KApplication::startServiceByDesktopName("kttsd", QStringList(), &error))
+ TQString error;
+ if (KApplication::startServiceByDesktopName("kttsd", TQStringList(), &error))
{
kdDebug() << "Starting KTTSD failed with message " << error << endl;
m_kttsmgrw->enableKttsdCheckBox->setChecked(false);
@@ -1778,7 +1778,7 @@ void KCMKttsMgr::enableKttsdToggled(bool)
if (kttsdRunning)
{
// kdDebug() << "KCMKttsMgr::enableKttsdToggled:: Stopping KTTSD" << endl;
- QByteArray data;
+ TQByteArray data;
client->send("kttsd", "KSpeech", "kttsdExit()", data);
}
}
@@ -1882,22 +1882,22 @@ void KCMKttsMgr::kttsdExiting()
void KCMKttsMgr::slot_configureTalker()
{
// Get highlighted plugin from Talker ListView and load into memory.
- QListViewItem* talkerItem = m_kttsmgrw->talkersList->selectedItem();
+ TQListViewItem* talkerItem = m_kttsmgrw->talkersList->selectedItem();
if (!talkerItem) return;
- QString talkerID = talkerItem->text(tlvcTalkerID);
- QString synthName = talkerItem->text(tlvcSynthName);
- QString language = talkerItem->text(tlvcLanguage);
- QString languageCode = m_languagesToCodes[language];
- QString desktopEntryName = TalkerCode::TalkerNameToDesktopEntryName(synthName);
+ TQString talkerID = talkerItem->text(tlvcTalkerID);
+ TQString synthName = talkerItem->text(tlvcSynthName);
+ TQString language = talkerItem->text(tlvcLanguage);
+ TQString languageCode = m_languagesToCodes[language];
+ TQString desktopEntryName = TalkerCode::TalkerNameToDesktopEntryName(synthName);
m_loadedTalkerPlugIn = loadTalkerPlugin(desktopEntryName);
if (!m_loadedTalkerPlugIn) return;
// kdDebug() << "KCMKttsMgr::slot_configureTalker: plugin for " << synthName << " loaded successfully." << endl;
// Tell plugin to load its configuration.
- m_config->setGroup(QString("Talker_")+talkerID);
+ m_config->setGroup(TQString("Talker_")+talkerID);
m_loadedTalkerPlugIn->setDesiredLanguage(languageCode);
// kdDebug() << "KCMKttsMgr::slot_configureTalker: about to call plugin load() method with Talker ID = " << talkerID << endl;
- m_loadedTalkerPlugIn->load(m_config, QString("Talker_")+talkerID);
+ m_loadedTalkerPlugIn->load(m_config, TQString("Talker_")+talkerID);
// Display configuration dialog.
configureTalker();
@@ -1912,14 +1912,14 @@ void KCMKttsMgr::slot_configureTalker()
}
// Get Talker Code. Note that plugin may return a code different from before.
- QString talkerCode = m_loadedTalkerPlugIn->getTalkerCode();
+ TQString talkerCode = m_loadedTalkerPlugIn->getTalkerCode();
// If plugin was successfully configured, save its configuration.
if (!talkerCode.isEmpty())
{
- m_config->setGroup(QString("Talker_")+talkerID);
- m_loadedTalkerPlugIn->save(m_config, QString("Talker_")+talkerID);
- m_config->setGroup(QString("Talker_")+talkerID);
+ m_config->setGroup(TQString("Talker_")+talkerID);
+ m_loadedTalkerPlugIn->save(m_config, TQString("Talker_")+talkerID);
+ m_config->setGroup(TQString("Talker_")+talkerID);
talkerCode = TalkerCode::normalizeTalkerCode(talkerCode, languageCode);
m_config->writeEntry("TalkerCode", talkerCode);
m_config->sync();
@@ -1956,20 +1956,20 @@ void KCMKttsMgr::configureFilterItem( bool sbd )
// Get highlighted plugin from Filter ListView and load into memory.
KListView* lView = m_kttsmgrw->filtersList;
if (sbd) lView = m_kttsmgrw->sbdsList;
- QListViewItem* filterItem = lView->selectedItem();
+ TQListViewItem* filterItem = lView->selectedItem();
if (!filterItem) return;
- QString filterID = filterItem->text(flvcFilterID);
- QString filterPlugInName = filterItem->text(flvcPlugInName);
- QString desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
+ TQString filterID = filterItem->text(flvcFilterID);
+ TQString filterPlugInName = filterItem->text(flvcPlugInName);
+ TQString desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
if (desktopEntryName.isEmpty()) return;
m_loadedFilterPlugIn = loadFilterPlugin(desktopEntryName);
if (!m_loadedFilterPlugIn) return;
// kdDebug() << "KCMKttsMgr::slot_configureFilter: plugin for " << filterPlugInName << " loaded successfully." << endl;
// Tell plugin to load its configuration.
- m_config->setGroup(QString("Filter_")+filterID);
+ m_config->setGroup(TQString("Filter_")+filterID);
// kdDebug() << "KCMKttsMgr::slot_configureFilter: about to call plugin load() method with Filter ID = " << filterID << endl;
- m_loadedFilterPlugIn->load(m_config, QString("Filter_")+filterID);
+ m_loadedFilterPlugIn->load(m_config, TQString("Filter_")+filterID);
// Display configuration dialog.
configureFilter();
@@ -1984,15 +1984,15 @@ void KCMKttsMgr::configureFilterItem( bool sbd )
}
// Get user's name for the plugin.
- QString userFilterName = m_loadedFilterPlugIn->userPlugInName();
+ TQString userFilterName = m_loadedFilterPlugIn->userPlugInName();
// If user properly configured the plugin, save the configuration.
if ( !userFilterName.isEmpty() )
{
// Let plugin save its configuration.
- m_config->setGroup(QString("Filter_")+filterID);
- m_loadedFilterPlugIn->save(m_config, QString("Filter_")+filterID);
+ m_config->setGroup(TQString("Filter_")+filterID);
+ m_loadedFilterPlugIn->save(m_config, TQString("Filter_")+filterID);
// Save configuration.
m_config->setGroup("Filter_"+filterID);
@@ -2007,7 +2007,7 @@ void KCMKttsMgr::configureFilterItem( bool sbd )
// Update display.
filterItem->setText(flvcUserName, userFilterName);
if (!sbd)
- dynamic_cast<QCheckListItem*>(filterItem)->setOn(true);
+ dynamic_cast<TQCheckListItem*>(filterItem)->setOn(true);
// Inform Control Center that configuration has changed.
configChanged();
@@ -2036,16 +2036,16 @@ void KCMKttsMgr::configureTalker()
"configureTalker_dlg",
true,
true);
- m_configDlg->setInitialSize(QSize(700, 300), false);
+ m_configDlg->setInitialSize(TQSize(700, 300), false);
m_configDlg->setMainWidget(m_loadedTalkerPlugIn);
m_configDlg->setHelp("configure-plugin", "kttsd");
m_configDlg->enableButtonOK(false);
- connect(m_loadedTalkerPlugIn, SIGNAL( changed(bool) ), this, SLOT( slotConfigTalkerDlg_ConfigChanged() ));
- connect(m_configDlg, SIGNAL( defaultClicked() ), this, SLOT( slotConfigTalkerDlg_DefaultClicked() ));
- connect(m_configDlg, SIGNAL( cancelClicked() ), this, SLOT (slotConfigTalkerDlg_CancelClicked() ));
+ connect(m_loadedTalkerPlugIn, TQT_SIGNAL( changed(bool) ), this, TQT_SLOT( slotConfigTalkerDlg_ConfigChanged() ));
+ connect(m_configDlg, TQT_SIGNAL( defaultClicked() ), this, TQT_SLOT( slotConfigTalkerDlg_DefaultClicked() ));
+ connect(m_configDlg, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT (slotConfigTalkerDlg_CancelClicked() ));
// Create a Player object for the plugin to use for testing.
int playerOption = 0;
- QString sinkName;
+ TQString sinkName;
if (m_kttsmgrw->gstreamerRadioButton->isChecked()) {
playerOption = 1;
sinkName = m_kttsmgrw->sinkComboBox->currentText();
@@ -2092,15 +2092,15 @@ void KCMKttsMgr::configureFilter()
"configureFilter_dlg",
true,
true);
- m_configDlg->setInitialSize(QSize(600, 450), false);
+ m_configDlg->setInitialSize(TQSize(600, 450), false);
m_loadedFilterPlugIn->setMinimumSize(m_loadedFilterPlugIn->minimumSizeHint());
m_loadedFilterPlugIn->show();
m_configDlg->setMainWidget(m_loadedFilterPlugIn);
m_configDlg->setHelp("configure-filter", "kttsd");
m_configDlg->enableButtonOK(false);
- connect(m_loadedFilterPlugIn, SIGNAL( changed(bool) ), this, SLOT( slotConfigFilterDlg_ConfigChanged() ));
- connect(m_configDlg, SIGNAL( defaultClicked() ), this, SLOT( slotConfigFilterDlg_DefaultClicked() ));
- connect(m_configDlg, SIGNAL( cancelClicked() ), this, SLOT (slotConfigFilterDlg_CancelClicked() ));
+ connect(m_loadedFilterPlugIn, TQT_SIGNAL( changed(bool) ), this, TQT_SLOT( slotConfigFilterDlg_ConfigChanged() ));
+ connect(m_configDlg, TQT_SIGNAL( defaultClicked() ), this, TQT_SLOT( slotConfigFilterDlg_DefaultClicked() ));
+ connect(m_configDlg, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT (slotConfigFilterDlg_CancelClicked() ));
// Display the dialog.
m_configDlg->exec();
}
@@ -2108,10 +2108,10 @@ void KCMKttsMgr::configureFilter()
/**
* Count number of configured Filters with the specified plugin name.
*/
-int KCMKttsMgr::countFilterPlugins(const QString& filterPlugInName)
+int KCMKttsMgr::countFilterPlugins(const TQString& filterPlugInName)
{
int cnt = 0;
- QListViewItem* item = m_kttsmgrw->filtersList->firstChild();
+ TQListViewItem* item = m_kttsmgrw->filtersList->firstChild();
while (item)
{
if (item->text(flvcPlugInName) == filterPlugInName) ++cnt;
@@ -2201,15 +2201,15 @@ void KCMKttsMgr::slotFiltersList_stateChanged()
* Uses KTrader to convert a translated Filter Plugin Name to DesktopEntryName.
* @param name The translated plugin name. From Name= line in .desktop file.
* @return DesktopEntryName. The name of the .desktop file (less .desktop).
- * QString::null if not found.
+ * TQString::null if not found.
*/
-QString KCMKttsMgr::FilterNameToDesktopEntryName(const QString& name)
+TQString KCMKttsMgr::FilterNameToDesktopEntryName(const TQString& name)
{
- if (name.isEmpty()) return QString::null;
+ if (name.isEmpty()) return TQString::null;
KTrader::OfferList offers = KTrader::self()->query("KTTSD/FilterPlugin");
for (uint ndx = 0; ndx < offers.count(); ++ndx)
if (offers[ndx]->name() == name) return offers[ndx]->desktopEntryName();
- return QString::null;
+ return TQString::null;
}
/**
@@ -2217,31 +2217,31 @@ QString KCMKttsMgr::FilterNameToDesktopEntryName(const QString& name)
* @param desktopEntryName The DesktopEntryName.
* @return The translated Name of the plugin, from Name= line in .desktop file.
*/
-QString KCMKttsMgr::FilterDesktopEntryNameToName(const QString& desktopEntryName)
+TQString KCMKttsMgr::FilterDesktopEntryNameToName(const TQString& desktopEntryName)
{
- if (desktopEntryName.isEmpty()) return QString::null;
+ if (desktopEntryName.isEmpty()) return TQString::null;
KTrader::OfferList offers = KTrader::self()->query("KTTSD/FilterPlugin",
- QString("DesktopEntryName == '%1'").arg(desktopEntryName));
+ TQString("DesktopEntryName == '%1'").arg(desktopEntryName));
if (offers.count() == 1)
return offers[0]->name();
else
- return QString::null;
+ return TQString::null;
}
/**
* Loads notify events from a file. Clearing listview if clear is True.
*/
-QString KCMKttsMgr::loadNotifyEventsFromFile( const QString& filename, bool clear)
+TQString KCMKttsMgr::loadNotifyEventsFromFile( const TQString& filename, bool clear)
{
// Open existing event list.
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_ReadOnly ) )
{
return i18n("Unable to open file.") + filename;
}
- // QDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" );
- QDomDocument doc( "" );
+ // TQDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" );
+ TQDomDocument doc( "" );
if ( !doc.setContent( &file ) ) {
file.close();
return i18n("File not in proper XML format.");
@@ -2253,22 +2253,22 @@ QString KCMKttsMgr::loadNotifyEventsFromFile( const QString& filename, bool clea
if ( clear ) m_kttsmgrw->notifyListView->clear();
// Event list.
- QDomNodeList eventList = doc.elementsByTagName("notifyEvent");
+ TQDomNodeList eventList = doc.elementsByTagName("notifyEvent");
const int eventListCount = eventList.count();
for (int eventIndex = 0; eventIndex < eventListCount; ++eventIndex)
{
- QDomNode eventNode = eventList.item(eventIndex);
- QDomNodeList propList = eventNode.childNodes();
- QString eventSrc;
- QString event;
- QString actionName;
- QString message;
+ TQDomNode eventNode = eventList.item(eventIndex);
+ TQDomNodeList propList = eventNode.childNodes();
+ TQString eventSrc;
+ TQString event;
+ TQString actionName;
+ TQString message;
TalkerCode talkerCode;
const int propListCount = propList.count();
for (int propIndex = 0; propIndex < propListCount; ++propIndex)
{
- QDomNode propNode = propList.item(propIndex);
- QDomElement prop = propNode.toElement();
+ TQDomNode propNode = propList.item(propIndex);
+ TQDomElement prop = propNode.toElement();
if (prop.tagName() == "eventSrc") eventSrc = prop.text();
if (prop.tagName() == "event") event = prop.text();
if (prop.tagName() == "action") actionName = prop.text();
@@ -2278,37 +2278,37 @@ QString KCMKttsMgr::loadNotifyEventsFromFile( const QString& filename, bool clea
addNotifyItem(eventSrc, event, NotifyAction::action( actionName ), message, talkerCode);
}
- return QString::null;
+ return TQString::null;
}
/**
* Saves notify events to a file.
*/
-QString KCMKttsMgr::saveNotifyEventsToFile(const QString& filename)
+TQString KCMKttsMgr::saveNotifyEventsToFile(const TQString& filename)
{
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_WriteOnly ) )
return i18n("Unable to open file ") + filename;
- QDomDocument doc( "" );
+ TQDomDocument doc( "" );
- QDomElement root = doc.createElement( "notifyEventList" );
+ TQDomElement root = doc.createElement( "notifyEventList" );
doc.appendChild( root );
// Events.
KListView* lv = m_kttsmgrw->notifyListView;
- QListViewItemIterator it(lv);
+ TQListViewItemIterator it(lv);
while ( it.current() )
{
- QListViewItem* item = *it;
+ TQListViewItem* item = *it;
if ( item->depth() > 0 )
{
- QDomElement wordTag = doc.createElement( "notifyEvent" );
+ TQDomElement wordTag = doc.createElement( "notifyEvent" );
root.appendChild( wordTag );
- QDomElement propTag = doc.createElement( "eventSrc" );
+ TQDomElement propTag = doc.createElement( "eventSrc" );
wordTag.appendChild( propTag);
- QDomText t = doc.createTextNode( item->text(nlvcEventSrc) );
+ TQDomText t = doc.createTextNode( item->text(nlvcEventSrc) );
propTag.appendChild( t );
propTag = doc.createElement( "event" );
@@ -2325,7 +2325,7 @@ QString KCMKttsMgr::saveNotifyEventsToFile(const QString& filename)
{
propTag = doc.createElement( "message" );
wordTag.appendChild( propTag);
- QString msg = item->text(nlvcActionName);
+ TQString msg = item->text(nlvcActionName);
int msglen = msg.length();
msg = msg.mid( 1, msglen-2 );
t = doc.createCDATASection( msg );
@@ -2341,13 +2341,13 @@ QString KCMKttsMgr::saveNotifyEventsToFile(const QString& filename)
}
// Write it all out.
- QTextStream ts( &file );
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream ts( &file );
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
ts << doc.toString();
file.close();
- return QString::null;
+ return TQString::null;
}
void KCMKttsMgr::slotNotifyEnableCheckBox_toggled(bool checked)
@@ -2359,7 +2359,7 @@ void KCMKttsMgr::slotNotifyEnableCheckBox_toggled(bool checked)
void KCMKttsMgr::slotNotifyPresentComboBox_activated(int index)
{
- QListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
+ TQListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
if ( !item ) return; // should not happen
item->setText( nlvcEvent, NotifyPresent::presentName( index ) );
item->setText( nlvcEventName, NotifyPresent::presentDisplayName( index ) );
@@ -2380,7 +2380,7 @@ void KCMKttsMgr::slotNotifyPresentComboBox_activated(int index)
void KCMKttsMgr::slotNotifyListView_selectionChanged()
{
- QListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
+ TQListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
if ( item )
{
bool topLevel = ( item->depth() == 0 );
@@ -2409,7 +2409,7 @@ void KCMKttsMgr::slotNotifyListView_selectionChanged()
if ( action == NotifyAction::SpeakCustom )
{
m_kttsmgrw->notifyMsgLineEdit->setEnabled( true );
- QString msg = item->text( nlvcActionName );
+ TQString msg = item->text( nlvcActionName );
int msglen = msg.length();
msg = msg.mid( 1, msglen-2 );
m_kttsmgrw->notifyMsgLineEdit->setText( msg );
@@ -2436,7 +2436,7 @@ void KCMKttsMgr::slotNotifyListView_selectionChanged()
void KCMKttsMgr::slotNotifyActionComboBox_activated(int index)
{
- QListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
+ TQListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
if ( item )
if ( item->depth() == 0 ) item = 0;
if ( !item ) return; // This shouldn't happen.
@@ -2452,9 +2452,9 @@ void KCMKttsMgr::slotNotifyActionComboBox_activated(int index)
configChanged();
}
-void KCMKttsMgr::slotNotifyMsgLineEdit_textChanged(const QString& text)
+void KCMKttsMgr::slotNotifyMsgLineEdit_textChanged(const TQString& text)
{
- QListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
+ TQListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
if ( item )
if ( item->depth() == 0 ) item = 0;
if ( !item ) return; // This shouldn't happen.
@@ -2467,10 +2467,10 @@ void KCMKttsMgr::slotNotifyMsgLineEdit_textChanged(const QString& text)
void KCMKttsMgr::slotNotifyTestButton_clicked()
{
- QListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
+ TQListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
if (item)
{
- QString msg;
+ TQString msg;
int action = NotifyAction::action(item->text(nlvcAction));
switch (action)
{
@@ -2493,16 +2493,16 @@ void KCMKttsMgr::slotNotifyTestButton_clicked()
void KCMKttsMgr::slotNotifyTalkerButton_clicked()
{
- QListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
+ TQListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
if ( item )
if ( item->depth() == 0 ) item = 0;
if ( !item ) return; // This shouldn't happen.
- QString talkerCode = item->text( nlvcTalker );
+ TQString talkerCode = item->text( nlvcTalker );
SelectTalkerDlg dlg( m_kttsmgrw, "selecttalkerdialog", i18n("Select Talker"), talkerCode, true );
int dlgResult = dlg.exec();
if ( dlgResult != KDialogBase::Accepted ) return;
item->setText( nlvcTalker, dlg.getSelectedTalkerCode() );
- QString talkerName = dlg.getSelectedTranslatedDescription();
+ TQString talkerName = dlg.getSelectedTranslatedDescription();
item->setText( nlvcTalkerName, talkerName );
m_kttsmgrw->notifyTalkerLineEdit->setText( talkerName );
configChanged();
@@ -2512,22 +2512,22 @@ void KCMKttsMgr::slotNotifyTalkerButton_clicked()
* Adds an item to the notify listview.
* message is only needed if action = naSpeakCustom.
*/
-QListViewItem* KCMKttsMgr::addNotifyItem(
- const QString& eventSrc,
- const QString& event,
+TQListViewItem* KCMKttsMgr::addNotifyItem(
+ const TQString& eventSrc,
+ const TQString& event,
int action,
- const QString& message,
+ const TQString& message,
TalkerCode& talkerCode)
{
KListView* lv = m_kttsmgrw->notifyListView;
- QListViewItem* item = 0;
- QString iconName;
- QString eventSrcName;
+ TQListViewItem* item = 0;
+ TQString iconName;
+ TQString eventSrcName;
if (eventSrc == "default")
eventSrcName = i18n("Default (all other events)");
else
eventSrcName = NotifyEvent::getEventSrcName(eventSrc, iconName);
- QString eventName;
+ TQString eventName;
if (eventSrc == "default")
eventName = NotifyPresent::presentDisplayName( event );
else
@@ -2537,21 +2537,21 @@ QListViewItem* KCMKttsMgr::addNotifyItem(
else
eventName = NotifyEvent::getEventName(eventSrc, event);
}
- QString actionName = NotifyAction::actionName( action );
- QString actionDisplayName = NotifyAction::actionDisplayName( action );
+ TQString actionName = NotifyAction::actionName( action );
+ TQString actionDisplayName = NotifyAction::actionDisplayName( action );
if (action == NotifyAction::SpeakCustom) actionDisplayName = "\"" + message + "\"";
- QString talkerName = talkerCode.getTranslatedDescription();
+ TQString talkerName = talkerCode.getTranslatedDescription();
if (!eventSrcName.isEmpty() && !eventName.isEmpty() && !actionName.isEmpty() && !talkerName.isEmpty())
{
- QListViewItem* parentItem = lv->findItem(eventSrcName, nlvcEventSrcName);
+ TQListViewItem* parentItem = lv->findItem(eventSrcName, nlvcEventSrcName);
if (!parentItem)
{
item = lv->lastItem();
if (!item)
- parentItem = new KListViewItem(lv, eventSrcName, QString::null, QString::null,
+ parentItem = new KListViewItem(lv, eventSrcName, TQString::null, TQString::null,
eventSrc);
else
- parentItem = new KListViewItem(lv, item, eventSrcName, QString::null, QString::null,
+ parentItem = new KListViewItem(lv, item, eventSrcName, TQString::null, TQString::null,
eventSrc);
if ( !iconName.isEmpty() )
parentItem->setPixmap( nlvcEventSrcName, SmallIcon( iconName ) );
@@ -2571,9 +2571,9 @@ QListViewItem* KCMKttsMgr::addNotifyItem(
void KCMKttsMgr::slotNotifyAddButton_clicked()
{
- QListView* lv = m_kttsmgrw->notifyListView;
- QListViewItem* item = lv->selectedItem();
- QString eventSrc;
+ TQListView* lv = m_kttsmgrw->notifyListView;
+ TQListViewItem* item = lv->selectedItem();
+ TQString eventSrc;
if ( item ) eventSrc = item->text( nlvcEventSrc );
SelectEvent* selectEventWidget = new SelectEvent( this, "SelectEvent_widget", 0, eventSrc );
KDialogBase* dlg = new KDialogBase(
@@ -2586,18 +2586,18 @@ void KCMKttsMgr::slotNotifyAddButton_clicked()
true,
true);
dlg->setMainWidget( selectEventWidget );
- dlg->setInitialSize( QSize(500, 400) );
+ dlg->setInitialSize( TQSize(500, 400) );
// dlg->setHelp("select-plugin", "kttsd");
int dlgResult = dlg->exec();
eventSrc = selectEventWidget->getEventSrc();
- QString event = selectEventWidget->getEvent();
+ TQString event = selectEventWidget->getEvent();
delete dlg;
- if ( dlgResult != QDialog::Accepted ) return;
+ if ( dlgResult != TQDialog::Accepted ) return;
if ( eventSrc.isEmpty() || event.isEmpty() ) return;
// Use Default action, message, and talker.
- QString actionName;
+ TQString actionName;
int action = NotifyAction::DoNotSpeak;
- QString msg;
+ TQString msg;
TalkerCode talkerCode;
item = lv->findItem( "default", nlvcEventSrc );
if ( item )
@@ -2626,14 +2626,14 @@ void KCMKttsMgr::slotNotifyAddButton_clicked()
void KCMKttsMgr::slotNotifyClearButton_clicked()
{
m_kttsmgrw->notifyListView->clear();
- TalkerCode talkerCode( QString::null );
- QListViewItem* item = addNotifyItem(
- QString("default"),
+ TalkerCode talkerCode( TQString::null );
+ TQListViewItem* item = addNotifyItem(
+ TQString("default"),
NotifyPresent::presentName(NotifyPresent::Passive),
NotifyAction::SpeakEventName,
- QString::null,
+ TQString::null,
talkerCode );
- QListView* lv = m_kttsmgrw->notifyListView;
+ TQListView* lv = m_kttsmgrw->notifyListView;
lv->ensureItemVisible( item );
lv->setSelected( item, true );
slotNotifyListView_selectionChanged();
@@ -2642,9 +2642,9 @@ void KCMKttsMgr::slotNotifyClearButton_clicked()
void KCMKttsMgr::slotNotifyRemoveButton_clicked()
{
- QListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
+ TQListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
if (!item) return;
- QListViewItem* parentItem = item->parent();
+ TQListViewItem* parentItem = item->parent();
delete item;
if (parentItem)
{
@@ -2656,15 +2656,15 @@ void KCMKttsMgr::slotNotifyRemoveButton_clicked()
void KCMKttsMgr::slotNotifyLoadButton_clicked()
{
- // QString dataDir = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/stringreplacer/";
- QString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/notify/").last();
- QString filename = KFileDialog::getOpenFileName(
+ // TQString dataDir = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/stringreplacer/";
+ TQString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/notify/").last();
+ TQString filename = KFileDialog::getOpenFileName(
dataDir,
"*.xml|" + i18n("file type", "Notification Event List") + " (*.xml)",
m_kttsmgrw,
"event_loadfile");
if ( filename.isEmpty() ) return;
- QString errMsg = loadNotifyEventsFromFile( filename, true );
+ TQString errMsg = loadNotifyEventsFromFile( filename, true );
slotNotifyListView_selectionChanged();
if ( !errMsg.isEmpty() )
KMessageBox::sorry( m_kttsmgrw, errMsg, i18n("Error Opening File") );
@@ -2674,13 +2674,13 @@ void KCMKttsMgr::slotNotifyLoadButton_clicked()
void KCMKttsMgr::slotNotifySaveButton_clicked()
{
- QString filename = KFileDialog::getSaveFileName(
+ TQString filename = KFileDialog::getSaveFileName(
KGlobal::dirs()->saveLocation( "data" ,"kttsd/notify/", false ),
"*.xml|" + i18n("file type", "Notification Event List") + " (*.xml)",
m_kttsmgrw,
"event_savefile");
if ( filename.isEmpty() ) return;
- QString errMsg = saveNotifyEventsToFile( filename );
+ TQString errMsg = saveNotifyEventsToFile( filename );
slotNotifyListView_selectionChanged();
if ( !errMsg.isEmpty() )
KMessageBox::sorry( m_kttsmgrw, errMsg, i18n("Error Opening File") );
@@ -2688,16 +2688,16 @@ void KCMKttsMgr::slotNotifySaveButton_clicked()
// ----------------------------------------------------------------------------
-KttsCheckListItem::KttsCheckListItem( QListView *parent, QListViewItem *after,
- const QString &text, Type tt,
+KttsCheckListItem::KttsCheckListItem( TQListView *parent, TQListViewItem *after,
+ const TQString &text, Type tt,
KCMKttsMgr* kcmkttsmgr ) :
- QCheckListItem(parent, after, text, tt),
+ TQCheckListItem(parent, after, text, tt),
m_kcmkttsmgr(kcmkttsmgr) { }
-KttsCheckListItem::KttsCheckListItem( QListView *parent,
- const QString &text, Type tt,
+KttsCheckListItem::KttsCheckListItem( TQListView *parent,
+ const TQString &text, Type tt,
KCMKttsMgr* kcmkttsmgr ) :
- QCheckListItem(parent, text, tt),
+ TQCheckListItem(parent, text, tt),
m_kcmkttsmgr(kcmkttsmgr) { }
/*virtual*/ void KttsCheckListItem::stateChange(bool)
@@ -2705,7 +2705,7 @@ KttsCheckListItem::KttsCheckListItem( QListView *parent,
if (m_kcmkttsmgr) m_kcmkttsmgr->slotFiltersList_stateChanged();
}
-/*virtual*/ /*void resizeEvent( QResizeEvent ev )
+/*virtual*/ /*void resizeEvent( TQResizeEvent ev )
{
dynamic_cast<KCModule>(resizeEvent(ev));
updateGeometry();
diff --git a/kttsd/kcmkttsmgr/kcmkttsmgr.h b/kttsd/kcmkttsmgr/kcmkttsmgr.h
index 39481b9..6641fe4 100644
--- a/kttsd/kcmkttsmgr/kcmkttsmgr.h
+++ b/kttsd/kcmkttsmgr/kcmkttsmgr.h
@@ -22,8 +22,8 @@
#include "config.h"
// Qt includes.
-#include <qmap.h>
-#include <qlistview.h>
+#include <tqmap.h>
+#include <tqlistview.h>
// KDE includes.
#include <kcmodule.h>
@@ -57,7 +57,7 @@ class KCMKttsMgr :
Q_OBJECT
public:
- KCMKttsMgr(QWidget *parent, const char *name, const QStringList &);
+ KCMKttsMgr(TQWidget *parent, const char *name, const TQStringList &);
~KCMKttsMgr();
@@ -109,7 +109,7 @@ class KCMKttsMgr :
* This function returns the small quickhelp.
* That is displayed in the sidebar in the KControl
*/
- QString quickHelp() const;
+ TQString quickHelp() const;
/**
* Return the about information for this module
@@ -147,7 +147,7 @@ class KCMKttsMgr :
*/
virtual void kttsdExiting();
- // virtual void resizeEvent( QResizeEvent ev );
+ // virtual void resizeEvent( TQResizeEvent ev );
private:
enum widgetPages
@@ -226,28 +226,28 @@ class KCMKttsMgr :
* <prosody volume="medium" rate="medium"/>
* <kttsd synthesizer="Festival" />
*/
- QString defaultTalkerCode(const QString &languageCode, const QString &plugInName);
+ TQString defaultTalkerCode(const TQString &languageCode, const TQString &plugInName);
/**
* Given an item in the talker listview and a talker code, sets the columns of the item.
- * @param talkerItem QListViewItem.
+ * @param talkerItem TQListViewItem.
* @param talkerCode Talker Code.
*/
- void updateTalkerItem(QListViewItem* talkerItem, const QString &talkerCode);
+ void updateTalkerItem(TQListViewItem* talkerItem, const TQString &talkerCode);
/**
* Loads the configuration plugin for a named Talker plugin.
* @param name DesktopEntryName of the Synthesizer.
* @return Pointer to the configuration plugin for the Talker.
*/
- PlugInConf* loadTalkerPlugin(const QString& name);
+ PlugInConf* loadTalkerPlugin(const TQString& name);
/**
* Loads the configuration plugin for a named Filter plugin.
* @param plugInName DesktopEntryName of the plugin.
* @return Pointer to the configuration plugin for the Filter.
*/
- KttsFilterConf* loadFilterPlugin(const QString& plugInName);
+ KttsFilterConf* loadFilterPlugin(const TQString& plugInName);
/**
* Display the Talker Configuration Dialog.
@@ -279,42 +279,42 @@ class KCMKttsMgr :
/**
* Count number of configured Filters with the specified plugin name.
*/
- int countFilterPlugins(const QString& filterPlugInName);
+ int countFilterPlugins(const TQString& filterPlugInName);
/**
* Uses KTrader to convert a translated Filter Plugin Name to DesktopEntryName.
* @param name The translated plugin name. From Name= line in .desktop file.
* @return DesktopEntryName. The name of the .desktop file (less .desktop).
- * QString::null if not found.
+ * TQString::null if not found.
*/
- QString FilterNameToDesktopEntryName(const QString& name);
+ TQString FilterNameToDesktopEntryName(const TQString& name);
/**
* Uses KTrader to convert a DesktopEntryName into a translated Filter Plugin Name.
* @param desktopEntryName The DesktopEntryName.
* @return The translated Name of the plugin, from Name= line in .desktop file.
*/
- QString FilterDesktopEntryNameToName(const QString& desktopEntryName);
+ TQString FilterDesktopEntryNameToName(const TQString& desktopEntryName);
/**
* Loads notify events from a file. Clearing listview if clear is True.
*/
- QString loadNotifyEventsFromFile( const QString& filename, bool clear);
+ TQString loadNotifyEventsFromFile( const TQString& filename, bool clear);
/**
* Saves notify events to a file.
*/
- QString saveNotifyEventsToFile(const QString& filename);
+ TQString saveNotifyEventsToFile(const TQString& filename);
/**
* Adds an item to the notify listview.
* message is only needed if action = nactSpeakCustom.
*/
- QListViewItem* addNotifyItem(
- const QString& eventSrc,
- const QString& event,
+ TQListViewItem* addNotifyItem(
+ const TQString& eventSrc,
+ const TQString& event,
int action,
- const QString& message,
+ const TQString& message,
TalkerCode& talkerCode);
/**
@@ -340,7 +340,7 @@ class KCMKttsMgr :
/**
* Sentence Boundary Detector button popup menu.
*/
- QPopupMenu* m_sbdPopmenu;
+ TQPopupMenu* m_sbdPopmenu;
/**
* Talker(synth) Plugin currently loaded into configuration dialog.
@@ -381,17 +381,17 @@ class KCMKttsMgr :
/**
* Dictionary mapping language names to codes.
*/
- QMap<QString, QString> m_languagesToCodes;
+ TQMap<TQString, TQString> m_languagesToCodes;
/**
- * A QMap of languages codes indexed by synthesizer that supports them.
+ * A TQMap of languages codes indexed by synthesizer that supports them.
*/
SynthToLangMap m_synthToLangMap;
/**
* Default Talker Code for notifications.
*/
- QString m_defaultNotifyTalkerCode;
+ TQString m_defaultNotifyTalkerCode;
private slots:
/**
@@ -499,7 +499,7 @@ class KCMKttsMgr :
void slotNotifyPresentComboBox_activated(int index);
void slotNotifyActionComboBox_activated(int index);
void slotNotifyTestButton_clicked();
- void slotNotifyMsgLineEdit_textChanged(const QString& text);
+ void slotNotifyMsgLineEdit_textChanged(const TQString& text);
void slotNotifyTalkerButton_clicked();
/**
@@ -513,11 +513,11 @@ class KCMKttsMgr :
class KttsCheckListItem : public QCheckListItem
{
public:
- KttsCheckListItem( QListView *parent,
- const QString &text, Type tt = RadioButtonController,
+ KttsCheckListItem( TQListView *parent,
+ const TQString &text, Type tt = RadioButtonController,
KCMKttsMgr* kcmkttsmgr = 0);
- KttsCheckListItem( QListView *parent, QListViewItem *after,
- const QString &text, Type tt = RadioButtonController,
+ KttsCheckListItem( TQListView *parent, TQListViewItem *after,
+ const TQString &text, Type tt = RadioButtonController,
KCMKttsMgr* kcmkttsmgr = 0);
protected:
diff --git a/kttsd/kcmkttsmgr/selectevent.cpp b/kttsd/kcmkttsmgr/selectevent.cpp
index dc65fa4..8a77c38 100644
--- a/kttsd/kcmkttsmgr/selectevent.cpp
+++ b/kttsd/kcmkttsmgr/selectevent.cpp
@@ -22,7 +22,7 @@
******************************************************************************/
// Qt includes.
-#include <qcombobox.h>
+#include <tqcombobox.h>
// KDE includes
#include <kstandarddirs.h>
@@ -36,17 +36,17 @@
#include "utils.h"
#include "selectevent.h"
-SelectEvent::SelectEvent(QWidget* parent, const char* name, WFlags fl, const QString& initEventSrc)
+SelectEvent::SelectEvent(TQWidget* parent, const char* name, WFlags fl, const TQString& initEventSrc)
: SelectEventWidget(parent,name,fl)
{
// Load list of event sources (applications).
- QStringList fullpaths =
+ TQStringList fullpaths =
KGlobal::dirs()->findAllResources("data", "*/eventsrc", false, true );
- QStringList::ConstIterator it = fullpaths.begin();
- QStringList relativePaths;
+ TQStringList::ConstIterator it = fullpaths.begin();
+ TQStringList relativePaths;
for ( ; it != fullpaths.end(); ++it)
{
- QString relativePath = *it;
+ TQString relativePath = *it;
if ( relativePath.at(0) == '/' && KStandardDirs::exists( relativePath ) )
{
relativePath = makeRelative( relativePath );
@@ -57,18 +57,18 @@ SelectEvent::SelectEvent(QWidget* parent, const char* name, WFlags fl, const QSt
it = relativePaths.begin();
for ( ; it != relativePaths.end(); ++it)
{
- QString relativePath = *it;
+ TQString relativePath = *it;
if ( !relativePath.isEmpty() )
{
KConfig* config = new KConfig(relativePath, true, false, "data");
- config->setGroup( QString::fromLatin1("!Global!") );
- QString icon = config->readEntry(QString::fromLatin1("IconName"),
- QString::fromLatin1("misc"));
- QString description = config->readEntry( QString::fromLatin1("Comment"),
+ config->setGroup( TQString::fromLatin1("!Global!") );
+ TQString icon = config->readEntry(TQString::fromLatin1("IconName"),
+ TQString::fromLatin1("misc"));
+ TQString description = config->readEntry( TQString::fromLatin1("Comment"),
i18n("No description available") );
delete config;
int index = relativePath.find( '/' );
- QString appname;
+ TQString appname;
if ( index >= 0 )
appname = relativePath.left( index );
else
@@ -79,7 +79,7 @@ SelectEvent::SelectEvent(QWidget* parent, const char* name, WFlags fl, const QSt
}
}
slotEventSrcComboBox_activated(eventSrcComboBox->currentItem());
- connect (eventSrcComboBox, SIGNAL(activated(int)), this, SLOT(slotEventSrcComboBox_activated(int)));
+ connect (eventSrcComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotEventSrcComboBox_activated(int)));
}
SelectEvent::~SelectEvent() { }
@@ -87,20 +87,20 @@ SelectEvent::~SelectEvent() { }
void SelectEvent::slotEventSrcComboBox_activated(int index)
{
eventsListView->clear();
- QListViewItem* item = 0;
- QString eventSrc = m_eventSrcNames[index];
- QString configFilename = eventSrc + QString::fromLatin1( "/eventsrc" );
+ TQListViewItem* item = 0;
+ TQString eventSrc = m_eventSrcNames[index];
+ TQString configFilename = eventSrc + TQString::fromLatin1( "/eventsrc" );
KConfig* config = new KConfig( configFilename, true, false, "data" );
- QStringList eventNames = config->groupList();
+ TQStringList eventNames = config->groupList();
uint eventNamesCount = eventNames.count();
for (uint ndx = 0; ndx < eventNamesCount; ++ndx)
{
- QString eventName = eventNames[ndx];
+ TQString eventName = eventNames[ndx];
if ( eventName != "!Global!" )
{
config->setGroup( eventName );
- QString eventDesc = config->readEntry( QString::fromLatin1( "Comment" ),
- config->readEntry( QString::fromLatin1( "Name" )));
+ TQString eventDesc = config->readEntry( TQString::fromLatin1( "Comment" ),
+ config->readEntry( TQString::fromLatin1( "Name" )));
if ( !item )
item = new KListViewItem( eventsListView, eventDesc, eventName );
else
@@ -110,7 +110,7 @@ void SelectEvent::slotEventSrcComboBox_activated(int index)
delete config;
eventsListView->sort();
item = eventsListView->lastChild();
- QString eventDesc = i18n("All other %1 events").arg(eventSrcComboBox->currentText());
+ TQString eventDesc = i18n("All other %1 events").arg(eventSrcComboBox->currentText());
if ( !item )
item = new KListViewItem( eventsListView, eventDesc, "default" );
else
@@ -118,29 +118,29 @@ void SelectEvent::slotEventSrcComboBox_activated(int index)
}
-QString SelectEvent::getEventSrc()
+TQString SelectEvent::getEventSrc()
{
return m_eventSrcNames[eventSrcComboBox->currentItem()];
}
-QString SelectEvent::getEvent()
+TQString SelectEvent::getEvent()
{
- QListViewItem* item = eventsListView->currentItem();
+ TQListViewItem* item = eventsListView->currentItem();
if ( item )
return item->text(1);
else
- return QString::null;
+ return TQString::null;
}
// returns e.g. "kwin/eventsrc" from a given path
// "/opt/kde3/share/apps/kwin/eventsrc"
-QString SelectEvent::makeRelative( const QString& fullPath )
+TQString SelectEvent::makeRelative( const TQString& fullPath )
{
int slash = fullPath.findRev( '/' ) - 1;
slash = fullPath.findRev( '/', slash );
if ( slash < 0 )
- return QString::null;
+ return TQString::null;
return fullPath.mid( slash+1 );
}
diff --git a/kttsd/kcmkttsmgr/selectevent.h b/kttsd/kcmkttsmgr/selectevent.h
index 1ca4e21..95d60f9 100644
--- a/kttsd/kcmkttsmgr/selectevent.h
+++ b/kttsd/kcmkttsmgr/selectevent.h
@@ -37,8 +37,8 @@ public:
* @param name Inherited KDialog parameter.
* @param initEventSrc Event source to start with.
*/
- SelectEvent(QWidget* parent = 0, const char* name = 0, WFlags fl = 0,
- const QString& initEventSrc = QString::null );
+ SelectEvent(TQWidget* parent = 0, const char* name = 0, WFlags fl = 0,
+ const TQString& initEventSrc = TQString::null );
/**
* Destructor.
@@ -48,12 +48,12 @@ public:
/**
* Returns the chosen event source (app name).
*/
- QString getEventSrc();
+ TQString getEventSrc();
/**
* Returns the chosen event.
*/
- QString getEvent();
+ TQString getEvent();
private slots:
void slotEventSrcComboBox_activated(int index);
@@ -61,9 +61,9 @@ private slots:
private:
// returns e.g. "kwin/eventsrc" from a given path
// "/opt/kde3/share/apps/kwin/eventsrc"
- QString makeRelative( const QString& fullPath );
+ TQString makeRelative( const TQString& fullPath );
- QStringList m_eventSrcNames;
+ TQStringList m_eventSrcNames;
};
#endif // _SELECTEVENT_H_
diff --git a/kttsd/kttsd/filtermgr.cpp b/kttsd/kttsd/filtermgr.cpp
index 3b0474b..88dc6b0 100644
--- a/kttsd/kttsd/filtermgr.cpp
+++ b/kttsd/kttsd/filtermgr.cpp
@@ -37,7 +37,7 @@
/**
* Constructor.
*/
-FilterMgr::FilterMgr( QObject *parent, const char *name) :
+FilterMgr::FilterMgr( TQObject *parent, const char *name) :
KttsFilterProc(parent, name)
{
// kdDebug() << "FilterMgr::FilterMgr: Running" << endl;
@@ -64,11 +64,11 @@ FilterMgr::~FilterMgr()
* @param config Settings object.
* @return False if FilterMgr is not ready to filter.
*/
-bool FilterMgr::init(KConfig *config, const QString& /*configGroup*/)
+bool FilterMgr::init(KConfig *config, const TQString& /*configGroup*/)
{
// Load each of the filters and initialize.
config->setGroup("General");
- QStringList filterIDsList = config->readListEntry("FilterIDs", ',');
+ TQStringList filterIDsList = config->readListEntry("FilterIDs", ',');
// kdDebug() << "FilterMgr::init: FilterIDs = " << filterIDsList << endl;
// If no filters have been configured, automatically configure the standard SBD.
if (filterIDsList.isEmpty())
@@ -87,13 +87,13 @@ bool FilterMgr::init(KConfig *config, const QString& /*configGroup*/)
}
if ( !filterIDsList.isEmpty() )
{
- QStringList::ConstIterator itEnd = filterIDsList.constEnd();
- for (QStringList::ConstIterator it = filterIDsList.constBegin(); it != itEnd; ++it)
+ TQStringList::ConstIterator itEnd = filterIDsList.constEnd();
+ for (TQStringList::ConstIterator it = filterIDsList.constBegin(); it != itEnd; ++it)
{
- QString filterID = *it;
- QString groupName = "Filter_" + filterID;
+ TQString filterID = *it;
+ TQString groupName = "Filter_" + filterID;
config->setGroup( groupName );
- QString desktopEntryName = config->readEntry( "DesktopEntryName" );
+ TQString desktopEntryName = config->readEntry( "DesktopEntryName" );
// If a DesktopEntryName is not in the config file, it was configured before
// we started using them, when we stored translated plugin names instead.
// Try to convert the translated plugin name to a DesktopEntryName.
@@ -101,7 +101,7 @@ bool FilterMgr::init(KConfig *config, const QString& /*configGroup*/)
// and DesktopEntryName won't change.
if (desktopEntryName.isEmpty())
{
- QString filterPlugInName = config->readEntry("PlugInName", QString::null);
+ TQString filterPlugInName = config->readEntry("PlugInName", TQString::null);
// See if the translated name will untranslate. If not, well, sorry.
desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
// Record the DesktopEntryName from now on.
@@ -154,7 +154,7 @@ bool FilterMgr::init(KConfig *config, const QString& /*configGroup*/)
* Also useful for hints about how to do the filtering.
* @return Converted text.
*/
-QString FilterMgr::convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId)
+TQString FilterMgr::convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId)
{
m_text = inputText;
m_talkerCode = talkerCode;
@@ -180,7 +180,7 @@ QString FilterMgr::convert(const QString& inputText, TalkerCode* talkerCode, con
* When the input text has been converted, filteringFinished signal will be emitted
* and caller can retrieve using getOutput();
*/
-bool FilterMgr::asyncConvert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId)
+bool FilterMgr::asyncConvert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId)
{
m_text = inputText;
m_talkerCode = talkerCode;
@@ -202,7 +202,7 @@ void FilterMgr::nextFilter()
{
m_text = m_filterProc->getOutput();
m_filterProc->ackFinished();
- disconnect( m_filterProc, SIGNAL(filteringFinished()), this, SLOT(slotFilteringFinished()) );
+ disconnect( m_filterProc, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotFilteringFinished()) );
}
// if ( m_filterProc->wasModified() )
// kdDebug() << "FilterMgr::nextFilter: Filter# " << m_filterIndex << " modified the text." << endl;
@@ -210,8 +210,8 @@ void FilterMgr::nextFilter()
{
m_state = fsFinished;
// Post an event which will be later emitted as a signal.
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 301);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 301);
+ TQApplication::postEvent(this, ev);
return;
}
}
@@ -220,8 +220,8 @@ void FilterMgr::nextFilter()
{
m_state = fsFinished;
// Post an event which will be later emitted as a signal.
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 301);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 301);
+ TQApplication::postEvent(this, ev);
return;
}
m_filterProc = m_filterList.at(m_filterIndex);
@@ -229,8 +229,8 @@ void FilterMgr::nextFilter()
{
m_state = fsFinished;
// Post an event which will be later emitted as a signal.
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 301);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 301);
+ TQApplication::postEvent(this, ev);
return;
}
m_filterProc->setSbRegExp( m_re );
@@ -239,10 +239,10 @@ void FilterMgr::nextFilter()
if ( m_filterProc->supportsAsync() )
{
// kdDebug() << "FilterMgr::nextFilter: calling asyncConvert on filter " << m_filterIndex << endl;
- connect( m_filterProc, SIGNAL(filteringFinished()), this, SLOT(slotFilteringFinished()) );
+ connect( m_filterProc, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotFilteringFinished()) );
if ( !m_filterProc->asyncConvert( m_text, m_talkerCode, m_appId ) )
{
- disconnect( m_filterProc, SIGNAL(filteringFinished()), this, SLOT(slotFilteringFinished()) );
+ disconnect( m_filterProc, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotFilteringFinished()) );
m_filterProc = 0;
nextFilter();
}
@@ -261,15 +261,15 @@ void FilterMgr::slotFilteringFinished()
nextFilter();
}
-bool FilterMgr::event ( QEvent * e )
+bool FilterMgr::event ( TQEvent * e )
{
- if ( e->type() == (QEvent::User + 301) )
+ if ( e->type() == (TQEvent::User + 301) )
{
// kdDebug() << "FilterMgr::event: emitting filteringFinished signal." << endl;
emit filteringFinished();
return true;
}
- if ( e->type() == (QEvent::User + 302) )
+ if ( e->type() == (TQEvent::User + 302) )
{
// kdDebug() << "FilterMgr::event: emitting filteringStopped signal." << endl;
emit filteringStopped();
@@ -284,7 +284,7 @@ bool FilterMgr::event ( QEvent * e )
void FilterMgr::waitForFinished()
{
if ( m_state != fsFiltering ) return;
- disconnect(m_filterProc, SIGNAL(filteringFinished()), this, SLOT(slotFilteringFinished()) );
+ disconnect(m_filterProc, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotFilteringFinished()) );
m_async = false;
m_filterProc->waitForFinished();
while ( m_state == fsFiltering )
@@ -299,7 +299,7 @@ int FilterMgr::getState() { return m_state; }
/**
* Returns the filtered output.
*/
-QString FilterMgr::getOutput()
+TQString FilterMgr::getOutput()
{
return m_text;
}
@@ -310,7 +310,7 @@ QString FilterMgr::getOutput()
void FilterMgr::ackFinished()
{
m_state = fsIdle;
- m_text = QString::null;
+ m_text = TQString::null;
}
/**
@@ -321,11 +321,11 @@ void FilterMgr::stopFiltering()
{
if ( m_state != fsFiltering ) return;
if ( m_async )
- disconnect( m_filterProc, SIGNAL(filteringFinished()), this, SLOT(slotFilteringFinished()) );
+ disconnect( m_filterProc, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotFilteringFinished()) );
m_filterProc->stopFiltering();
m_state = fsIdle;
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 302);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 302);
+ TQApplication::postEvent(this, ev);
}
/**
@@ -334,7 +334,7 @@ void FilterMgr::stopFiltering()
*
* @param re The sentence delimiter regular expression.
*/
-/*virtual*/ void FilterMgr::setSbRegExp(const QString& re)
+/*virtual*/ void FilterMgr::setSbRegExp(const TQString& re)
{
m_re = re;
}
@@ -346,13 +346,13 @@ void FilterMgr::setNoSBD(bool noSBD) { m_noSBD = noSBD; }
bool FilterMgr::noSBD() { return m_noSBD; }
// Loads the processing plug in for a filter plug in given its DesktopEntryName.
-KttsFilterProc* FilterMgr::loadFilterPlugin(const QString& desktopEntryName)
+KttsFilterProc* FilterMgr::loadFilterPlugin(const TQString& desktopEntryName)
{
// kdDebug() << "FilterMgr::loadFilterPlugin: Running"<< endl;
// Find the plugin.
KTrader::OfferList offers = KTrader::self()->query("KTTSD/FilterPlugin",
- QString("DesktopEntryName == '%1'").arg(desktopEntryName));
+ TQString("DesktopEntryName == '%1'").arg(desktopEntryName));
if (offers.count() == 1)
{
@@ -366,7 +366,7 @@ KttsFilterProc* FilterMgr::loadFilterPlugin(const QString& desktopEntryName)
KttsFilterProc *plugIn =
KParts::ComponentFactory::createInstanceFromLibrary<KttsFilterProc>(
offers[0]->library().latin1(), NULL, offers[0]->library().latin1(),
- QStringList(), &errorNo);
+ TQStringList(), &errorNo);
if(plugIn){
// If everything went ok, return the plug in pointer.
return plugIn;
@@ -392,14 +392,14 @@ KttsFilterProc* FilterMgr::loadFilterPlugin(const QString& desktopEntryName)
* Uses KTrader to convert a translated Filter Plugin Name to DesktopEntryName.
* @param name The translated plugin name. From Name= line in .desktop file.
* @return DesktopEntryName. The name of the .desktop file (less .desktop).
- * QString::null if not found.
+ * TQString::null if not found.
*/
-QString FilterMgr::FilterNameToDesktopEntryName(const QString& name)
+TQString FilterMgr::FilterNameToDesktopEntryName(const TQString& name)
{
- if (name.isEmpty()) return QString::null;
+ if (name.isEmpty()) return TQString::null;
KTrader::OfferList offers = KTrader::self()->query("KTTSD/FilterPlugin");
for (uint ndx = 0; ndx < offers.count(); ++ndx)
if (offers[ndx]->name() == name) return offers[ndx]->desktopEntryName();
- return QString::null;
+ return TQString::null;
}
diff --git a/kttsd/kttsd/filtermgr.h b/kttsd/kttsd/filtermgr.h
index d909128..2a8ea23 100644
--- a/kttsd/kttsd/filtermgr.h
+++ b/kttsd/kttsd/filtermgr.h
@@ -27,7 +27,7 @@
#define _FILTERMGR_H_
// Qt includes.
-#include <qptrlist.h>
+#include <tqptrlist.h>
// KTTS includes.
#include "filterproc.h"
@@ -35,7 +35,7 @@
class KConfig;
class TalkerCode;
-typedef QPtrList<KttsFilterProc> FilterList;
+typedef TQPtrList<KttsFilterProc> FilterList;
class FilterMgr : public KttsFilterProc
{
@@ -45,7 +45,7 @@ class FilterMgr : public KttsFilterProc
/**
* Constructor.
*/
- FilterMgr(QObject *parent = 0, const char *name = 0);
+ FilterMgr(TQObject *parent = 0, const char *name = 0);
/**
* Destructor.
@@ -61,7 +61,7 @@ class FilterMgr : public KttsFilterProc
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Returns True if this filter is a Sentence Boundary Detector.
@@ -92,7 +92,7 @@ class FilterMgr : public KttsFilterProc
* Also useful for hints about how to do the filtering.
* @return Converted text.
*/
- virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId);
+ virtual TQString convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId);
/**
* Asynchronously convert input.
@@ -106,7 +106,7 @@ class FilterMgr : public KttsFilterProc
* When the input text has been converted, filteringFinished signal will be emitted
* and caller can retrieve using getOutput();
*/
- virtual bool asyncConvert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId);
+ virtual bool asyncConvert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId);
/**
* Waits for filtering to finish.
@@ -121,7 +121,7 @@ class FilterMgr : public KttsFilterProc
/**
* Returns the filtered output.
*/
- virtual QString getOutput();
+ virtual TQString getOutput();
/**
* Acknowledges the finished filtering.
@@ -140,7 +140,7 @@ class FilterMgr : public KttsFilterProc
*
* @param re The sentence delimiter regular expression.
*/
- virtual void setSbRegExp(const QString& re);
+ virtual void setSbRegExp(const TQString& re);
/**
* Do not call SBD filters.
@@ -154,26 +154,26 @@ class FilterMgr : public KttsFilterProc
bool supportsHTML() { return m_supportsHTML; }
protected:
- bool event ( QEvent * e );
+ bool event ( TQEvent * e );
private slots:
void slotFilteringFinished();
private:
// Loads the processing plug in for a named filter plug in.
- KttsFilterProc* loadFilterPlugin(const QString& plugInName);
+ KttsFilterProc* loadFilterPlugin(const TQString& plugInName);
// Finishes up with current filter (if any) and goes on to the next filter.
void nextFilter();
// Uses KTrader to convert a translated Filter Plugin Name to DesktopEntryName.
// @param name The translated plugin name. From Name= line in .desktop file.
// @return DesktopEntryName. The name of the .desktop file (less .desktop).
- // QString::null if not found.
- QString FilterNameToDesktopEntryName(const QString& name);
+ // TQString::null if not found.
+ TQString FilterNameToDesktopEntryName(const TQString& name);
// List of filters.
FilterList m_filterList;
// Text being filtered.
- QString m_text;
+ TQString m_text;
// Index to list of filters.
int m_filterIndex;
// Current filter.
@@ -183,9 +183,9 @@ class FilterMgr : public KttsFilterProc
// Talker Code.
TalkerCode* m_talkerCode;
// AppId.
- QCString m_appId;
+ TQCString m_appId;
// Sentence Boundary regular expression (if app overrode the default).
- QString m_re;
+ TQString m_re;
// True if any of the filters modified the text.
bool m_wasModified;
// FilterMgr state.
diff --git a/kttsd/kttsd/kttsd.cpp b/kttsd/kttsd/kttsd.cpp
index 9ee841f..5a643a1 100644
--- a/kttsd/kttsd/kttsd.cpp
+++ b/kttsd/kttsd/kttsd.cpp
@@ -19,11 +19,11 @@
***************************************************************************/
// Qt includes.
-#include <qcstring.h>
-#include <qclipboard.h>
-#include <qtextstream.h>
-#include <qtextcodec.h>
-#include <qfile.h>
+#include <tqcstring.h>
+#include <tqclipboard.h>
+#include <tqtextstream.h>
+#include <tqtextcodec.h>
+#include <tqfile.h>
// KDE includes.
#include <kdebug.h>
@@ -49,9 +49,9 @@
* Note that most of the real tts work occurs in Speaker.
*/
-KTTSD::KTTSD(const QCString& objId, QObject *parent, const char *name) :
+KTTSD::KTTSD(const TQCString& objId, TQObject *parent, const char *name) :
DCOPObject(objId),
- QObject(parent, name)
+ TQObject(parent, name)
{
// kdDebug() << "KTTSD::KTTSD Running" << endl;
m_speaker = 0;
@@ -69,17 +69,17 @@ bool KTTSD::initializeSpeechData()
if (!m_speechData)
{
m_speechData = new SpeechData();
- connect (m_speechData, SIGNAL(textSet(const QCString&, const uint)),
- this, SLOT(slotTextSet(const QCString&, const uint)));
- connect (m_speechData, SIGNAL(textAppended(const QCString&, const uint, const int)),
- this, SLOT(slotTextAppended(const QCString&, const uint, const int)));
- connect (m_speechData, SIGNAL(textRemoved(const QCString&, const uint)),
- this, SLOT(slotTextRemoved(const QCString&, const uint)));
+ connect (m_speechData, TQT_SIGNAL(textSet(const TQCString&, const uint)),
+ this, TQT_SLOT(slotTextSet(const TQCString&, const uint)));
+ connect (m_speechData, TQT_SIGNAL(textAppended(const TQCString&, const uint, const int)),
+ this, TQT_SLOT(slotTextAppended(const TQCString&, const uint, const int)));
+ connect (m_speechData, TQT_SIGNAL(textRemoved(const TQCString&, const uint)),
+ this, TQT_SLOT(slotTextRemoved(const TQCString&, const uint)));
// Hook KNotify signal.
if (!connectDCOPSignal(0, 0,
- "notifySignal(QString,QString,QString,QString,QString,int,int,int,int)",
- "notificationSignal(QString,QString,QString,QString,QString,int,int,int,int)",
+ "notifySignal(TQString,TQString,TQString,TQString,TQString,int,int,int,int)",
+ "notificationSignal(TQString,TQString,TQString,TQString,TQString,int,int,int,int)",
false)) kdDebug() << "KTTSD:initializeSpeechData: connectDCOPSignal for knotify failed" << endl;
}
// Load configuration.
@@ -103,7 +103,7 @@ bool KTTSD::initializeTalkerMgr()
// desktop language, but if that fails, fallback to English.
if (load < 0)
{
- QString languageCode = KGlobal::locale()->language();
+ TQString languageCode = KGlobal::locale()->language();
if (m_talkerMgr->autoconfigureTalker(languageCode, m_speechData->config))
load = m_talkerMgr->loadPlugIns(m_speechData->config);
else
@@ -124,7 +124,7 @@ bool KTTSD::initializeTalkerMgr()
m_speechData = 0;
kdDebug() << "KTTSD::initializeTalkerMgr: no Talkers have been configured." << endl;
// Ask if user would like to run configuration dialog, but don't bug user unnecessarily.
- QString dontAskConfigureKTTS = "DontAskConfigureKTTS";
+ TQString dontAskConfigureKTTS = "DontAskConfigureKTTS";
KMessageBox::ButtonCode msgResult;
if (KMessageBox::shouldBeShownYesNo(dontAskConfigureKTTS, msgResult))
{
@@ -156,20 +156,20 @@ bool KTTSD::initializeSpeaker()
// Create speaker object and load plug ins, checking for the return
m_speaker = new Speaker(m_speechData, m_talkerMgr);
- connect (m_speaker, SIGNAL(textStarted(const QCString&, const uint)),
- this, SLOT(slotTextStarted(const QCString&, const uint)));
- connect (m_speaker, SIGNAL(textFinished(const QCString&, const uint)),
- this, SLOT(slotTextFinished(const QCString&, const uint)));
- connect (m_speaker, SIGNAL(textResumed(const QCString&, const uint)),
- this, SLOT(slotTextResumed(const QCString&, const uint)));
- connect (m_speaker, SIGNAL(sentenceStarted(QString, QString, const QCString&, const uint, const uint)),
- this, SLOT(slotSentenceStarted(QString, QString, const QCString&, const uint, const uint)));
- connect (m_speaker, SIGNAL(sentenceFinished(const QCString&, const uint, const uint)), this,
- SLOT(slotSentenceFinished(const QCString&, const uint, const uint)));
- connect (m_speaker, SIGNAL(textStopped(const QCString&, const uint)),
- this, SLOT(slotTextStopped(const QCString&, const uint)));
- connect (m_speaker, SIGNAL(textPaused(const QCString&, const uint)),
- this, SLOT(slotTextPaused(const QCString&, const uint)));
+ connect (m_speaker, TQT_SIGNAL(textStarted(const TQCString&, const uint)),
+ this, TQT_SLOT(slotTextStarted(const TQCString&, const uint)));
+ connect (m_speaker, TQT_SIGNAL(textFinished(const TQCString&, const uint)),
+ this, TQT_SLOT(slotTextFinished(const TQCString&, const uint)));
+ connect (m_speaker, TQT_SIGNAL(textResumed(const TQCString&, const uint)),
+ this, TQT_SLOT(slotTextResumed(const TQCString&, const uint)));
+ connect (m_speaker, TQT_SIGNAL(sentenceStarted(TQString, TQString, const TQCString&, const uint, const uint)),
+ this, TQT_SLOT(slotSentenceStarted(TQString, TQString, const TQCString&, const uint, const uint)));
+ connect (m_speaker, TQT_SIGNAL(sentenceFinished(const TQCString&, const uint, const uint)), this,
+ TQT_SLOT(slotSentenceFinished(const TQCString&, const uint, const uint)));
+ connect (m_speaker, TQT_SIGNAL(textStopped(const TQCString&, const uint)),
+ this, TQT_SLOT(slotTextStopped(const TQCString&, const uint)));
+ connect (m_speaker, TQT_SIGNAL(textPaused(const TQCString&, const uint)),
+ this, TQT_SLOT(slotTextPaused(const TQCString&, const uint)));
return true;
}
@@ -199,7 +199,7 @@ KTTSD::~KTTSD(){
* talker supports the indicated speech markup language.
* @see kttsdMarkupType
*/
-bool KTTSD::supportsMarkup(const QString& talker /*=NULL*/, const uint markupType /*=0*/) const
+bool KTTSD::supportsMarkup(const TQString& talker /*=NULL*/, const uint markupType /*=0*/) const
{
if (markupType == KSpeech::mtHtml)
{
@@ -219,7 +219,7 @@ bool KTTSD::supportsMarkup(const QString& talker /*=NULL*/, const uint markupTyp
* talker supports markers.
* TODO: Waiting on plugin API.
*/
-bool KTTSD::supportsMarkers(const QString& /*talker=NULL*/) const { return false; }
+bool KTTSD::supportsMarkers(const TQString& /*talker=NULL*/) const { return false; }
/**
* Say a message as soon as possible, interrupting any other speech in progress.
@@ -234,7 +234,7 @@ bool KTTSD::supportsMarkers(const QString& /*talker=NULL*/) const { return false
* If an existing Screen Reader output is in progress, it is stopped and discarded and
* replaced with this new message.
*/
-void KTTSD::sayScreenReaderOutput(const QString &msg, const QString &talker /*=NULL*/)
+void KTTSD::sayScreenReaderOutput(const TQString &msg, const TQString &talker /*=NULL*/)
{
if (!m_speaker) return;
m_speechData->setScreenReaderOutput(msg, fixNullString(talker), getAppId());
@@ -252,7 +252,7 @@ void KTTSD::sayScreenReaderOutput(const QString &msg, const QString &talker /*=N
* If no plugin has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
-void KTTSD::sayWarning(const QString &warning, const QString &talker /*=NULL*/){
+void KTTSD::sayWarning(const TQString &warning, const TQString &talker /*=NULL*/){
// kdDebug() << "KTTSD::sayWarning: Running" << endl;
if (!m_speaker) return;
kdDebug() << "KTTSD::sayWarning: Adding '" << warning << "' to warning queue." << endl;
@@ -271,7 +271,7 @@ void KTTSD::sayWarning(const QString &warning, const QString &talker /*=NULL*/){
* If no talker has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
-void KTTSD::sayMessage(const QString &message, const QString &talker /*=NULL*/)
+void KTTSD::sayMessage(const TQString &message, const TQString &talker /*=NULL*/)
{
// kdDebug() << "KTTSD::sayMessage: Running" << endl;
if (!m_speaker) return;
@@ -294,7 +294,7 @@ void KTTSD::sayMessage(const QString &message, const QString &talker /*=NULL*/)
* Changing the sentence delimiter does not affect other applications.
* @see sentenceparsing
*/
-void KTTSD::setSentenceDelimiter(const QString &delimiter)
+void KTTSD::setSentenceDelimiter(const TQString &delimiter)
{
if (!m_speaker) return;
m_speechData->setSentenceDelimiter(fixNullString(delimiter), getAppId());
@@ -322,7 +322,7 @@ void KTTSD::setSentenceDelimiter(const QString &delimiter)
* @see getTextCount
* @see startText
*/
-uint KTTSD::setText(const QString &text, const QString &talker /*=NULL*/)
+uint KTTSD::setText(const TQString &text, const TQString &talker /*=NULL*/)
{
// kdDebug() << "KTTSD::setText: Running" << endl;
if (!m_speaker) return 0;
@@ -359,7 +359,7 @@ uint KTTSD::setText(const QString &text, const QString &talker /*=NULL*/)
*
* @since KDE 3.5
*/
-uint KTTSD::sayText(const QString &text, const QString &talker)
+uint KTTSD::sayText(const TQString &text, const TQString &talker)
{
uint jobNum = setText(text, talker);
if (jobNum) startText(jobNum);
@@ -381,7 +381,7 @@ uint KTTSD::sayText(const QString &text, const QString &talker)
* @see setText.
* @see startText.
*/
-int KTTSD::appendText(const QString &text, const uint jobNum /*=0*/)
+int KTTSD::appendText(const TQString &text, const uint jobNum /*=0*/)
{
if (!m_speaker) return 0;
return m_speechData->appendText(text, applyDefaultJobNum(jobNum), getAppId());
@@ -411,20 +411,20 @@ int KTTSD::appendText(const QString &text, const uint jobNum /*=0*/)
* @see getTextCount
* @see startText
*/
-uint KTTSD::setFile(const QString &filename, const QString &talker /*=NULL*/,
- const QString &encoding /*=NULL*/)
+uint KTTSD::setFile(const TQString &filename, const TQString &talker /*=NULL*/,
+ const TQString &encoding /*=NULL*/)
{
// kdDebug() << "KTTSD::setFile: Running" << endl;
if (!m_speaker) return 0;
- QFile file(filename);
+ TQFile file(filename);
uint jobNum = 0;
if ( file.open(IO_ReadOnly) )
{
- QTextStream stream(&file);
- QString enc = fixNullString(encoding);
+ TQTextStream stream(&file);
+ TQString enc = fixNullString(encoding);
if (!enc.isEmpty())
{
- QTextCodec* codec = QTextCodec::codecForName(enc.latin1());
+ TQTextCodec* codec = TQTextCodec::codecForName(enc.latin1());
if (codec) stream.setCodec(codec);
}
jobNum = m_speechData->setText(stream.read(), fixNullString(talker), getAppId());
@@ -477,9 +477,9 @@ uint KTTSD::getTextJobCount()
* Get a comma-separated list of text job numbers in the queue.
* @return Comma-separated list of text job numbers in the queue.
*/
-QString KTTSD::getTextJobNumbers()
+TQString KTTSD::getTextJobNumbers()
{
- if (!m_speaker) return QString::null;
+ if (!m_speaker) return TQString::null;
return m_speechData->getTextJobNumbers();
}
@@ -501,23 +501,23 @@ int KTTSD::getTextJobState(const uint jobNum /*=0*/)
* Get information about a text job.
* @param jobNum Job number of the text job.
* If zero, applies to the last job queued by the application.
-* @return A QDataStream containing information about the job.
+* @return A TQDataStream containing information about the job.
* Blank if no such job.
*
* The stream contains the following elements:
* - int state Job state.
-* - QCString appId DCOP senderId of the application that requested the speech job.
-* - QString talker Language code in which to speak the text.
+* - TQCString appId DCOP senderId of the application that requested the speech job.
+* - TQString talker Language code in which to speak the text.
* - int seq Current sentence being spoken. Sentences are numbered starting at 1.
* - int sentenceCount Total number of sentences in the job.
*
* The following sample code will decode the stream:
@verbatim
- QByteArray jobInfo = getTextJobInfo(jobNum);
- QDataStream stream(jobInfo, IO_ReadOnly);
+ TQByteArray jobInfo = getTextJobInfo(jobNum);
+ TQDataStream stream(jobInfo, IO_ReadOnly);
int state;
- QCString appId;
- QString talker;
+ TQCString appId;
+ TQString talker;
int seq;
int sentenceCount;
stream >> state;
@@ -527,7 +527,7 @@ int KTTSD::getTextJobState(const uint jobNum /*=0*/)
stream >> sentenceCount;
@endverbatim
*/
-QByteArray KTTSD::getTextJobInfo(const uint jobNum /*=0*/)
+TQByteArray KTTSD::getTextJobInfo(const uint jobNum /*=0*/)
{
return m_speechData->getTextJobInfo(applyDefaultJobNum(jobNum));
}
@@ -538,9 +538,9 @@ QByteArray KTTSD::getTextJobInfo(const uint jobNum /*=0*/)
* @param talkerCode Talker Code.
* @return Talker ID of the talker that would speak the text job.
*/
-QString KTTSD::talkerCodeToTalkerId(const QString& talkerCode)
+TQString KTTSD::talkerCodeToTalkerId(const TQString& talkerCode)
{
- if (!m_talkerMgr) return QString::null;
+ if (!m_talkerMgr) return TQString::null;
return m_talkerMgr->talkerCodeToTalkerId(fixNullString(talkerCode));
}
@@ -552,7 +552,7 @@ QString KTTSD::talkerCodeToTalkerId(const QString& talkerCode)
* @return The specified sentence in the specified job. If no such
* job or sentence, returns "".
*/
-QString KTTSD::getTextJobSentence(const uint jobNum /*=0*/, const uint seq /*=1*/)
+TQString KTTSD::getTextJobSentence(const uint jobNum /*=0*/, const uint seq /*=1*/)
{
return m_speechData->getTextJobSentence(applyDefaultJobNum(jobNum), seq);
}
@@ -616,7 +616,7 @@ void KTTSD::startText(const uint jobNum /*=0*/)
// Do not start KTTSMgr unless at least 5 sentences are queued.
if (getTextCount(jNum) > 4)
{
- QString cmd = "kttsmgr --systray";
+ TQString cmd = "kttsmgr --systray";
if (m_speechData->autoExitManager) cmd.append(" --autoexit");
// Notice this fails if KTTSMgr is already running, which is what we want.
KRun::runCommand(cmd);
@@ -694,14 +694,14 @@ void KTTSD::resumeText(const uint jobNum /*=0*/)
/**
* Get a list of the talkers configured in KTTS.
-* @return A QStringList of fully-specified talker codes, one
+* @return A TQStringList of fully-specified talker codes, one
* for each talker user has configured.
*
* @see talkers
*/
-QStringList KTTSD::getTalkers()
+TQStringList KTTSD::getTalkers()
{
- if (!m_talkerMgr) return QStringList();
+ if (!m_talkerMgr) return TQStringList();
return m_talkerMgr->getTalkers();
}
@@ -714,7 +714,7 @@ QStringList KTTSD::getTalkers()
* If no plugin has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
-void KTTSD::changeTextTalker(const QString &talker, uint jobNum)
+void KTTSD::changeTextTalker(const TQString &talker, uint jobNum)
{
m_speechData->changeTextTalker(fixNullString(talker), applyDefaultJobNum(jobNum));
}
@@ -726,9 +726,9 @@ void KTTSD::changeTextTalker(const QString &talker, uint jobNum)
* @see talkers
* @see getTalkers
*/
-QString KTTSD::userDefaultTalker()
+TQString KTTSD::userDefaultTalker()
{
- if (!m_talkerMgr) return QString::null;
+ if (!m_talkerMgr) return TQString::null;
return m_talkerMgr->userDefaultTalker();
}
@@ -793,7 +793,7 @@ void KTTSD::speakClipboard()
QClipboard *cb = kapp->clipboard();
// Copy text from the clipboard.
- QString text = cb->text();
+ TQString text = cb->text();
// Speak it.
if ( !text.isNull() )
@@ -847,7 +847,7 @@ void KTTSD::reinit()
/**
* Return KTTSD daemon version number.
*/
-QString KTTSD::version() { return kapp->aboutData()->version(); }
+TQString KTTSD::version() { return kapp->aboutData()->version(); }
/*
* Checks if KTTSD is ready to speak and at least one talker is configured.
@@ -877,8 +877,8 @@ void KTTSD::configCommitted() {
* default_presentation contains these ORed events: None=0, Sound=1, Messagebox=2, Logfile=4, Stderr=8,
* PassivePopup=16, Execute=32, Taskbar=64
*/
-void KTTSD::notificationSignal( const QString& event, const QString& fromApp,
- const QString &text, const QString& sound, const QString& /*file*/,
+void KTTSD::notificationSignal( const TQString& event, const TQString& fromApp,
+ const TQString &text, const TQString& sound, const TQString& /*file*/,
const int present, const int /*level*/, const int /*windId*/, const int /*eventId*/)
{
if (!m_speaker) return;
@@ -890,8 +890,8 @@ void KTTSD::notificationSignal( const QString& event, const QString& fromApp,
{
bool found = false;
NotifyOptions notifyOptions;
- QString msg;
- QString talker;
+ TQString msg;
+ TQString talker;
// Check for app-specific action.
if ( m_speechData->notifyAppMap.contains( fromApp ) )
{
@@ -906,7 +906,7 @@ void KTTSD::notificationSignal( const QString& event, const QString& fromApp,
{
found = true;
notifyOptions = notifyEventMap[ "default" ];
- notifyOptions.eventName = QString::null;
+ notifyOptions.eventName = TQString::null;
}
}
}
@@ -980,7 +980,7 @@ void KTTSD::notificationSignal( const QString& event, const QString& fromApp,
// Queue msg if we should speak something.
if ( !msg.isEmpty() )
{
- QString fromApps = fromApp + ",knotify";
+ TQString fromApps = fromApp + ",knotify";
m_speechData->enqueueMessage( msg, talker, fromApps.utf8() );
m_speaker->doUtterances();
}
@@ -988,65 +988,65 @@ void KTTSD::notificationSignal( const QString& event, const QString& fromApp,
}
// Slots for the speaker object
-void KTTSD::slotSentenceStarted(QString, QString, const QCString& appId,
+void KTTSD::slotSentenceStarted(TQString, TQString, const TQCString& appId,
const uint jobNum, const uint seq) {
// Emit DCOP signal.
kdDebug() << "KTTSD::slotSentenceStarted: Emitting DCOP signal sentenceStarted with appId " << appId << " job number " << jobNum << " seq number " << seq << endl;
sentenceStarted(appId, jobNum, seq);
}
-void KTTSD::slotSentenceFinished(const QCString& appId, const uint jobNum, const uint seq){
+void KTTSD::slotSentenceFinished(const TQCString& appId, const uint jobNum, const uint seq){
// Emit DCOP signal.
kdDebug() << "KTTSD::slotSentenceFinished: Emitting DCOP signal sentenceFinished with appId " << appId << " job number " << jobNum << " seq number " << seq << endl;
sentenceFinished(appId, jobNum, seq);
}
// Slots for the speechData and speaker objects.
-void KTTSD::slotTextStarted(const QCString& appId, const uint jobNum){
+void KTTSD::slotTextStarted(const TQCString& appId, const uint jobNum){
// Emit DCOP signal.
kdDebug() << "KTTSD::slotTextStarted: Emitting DCOP signal textStarted with appId " << appId << " job number " << jobNum << endl;
textStarted(appId, jobNum);
}
-void KTTSD::slotTextFinished(const QCString& appId, const uint jobNum){
+void KTTSD::slotTextFinished(const TQCString& appId, const uint jobNum){
// Emit DCOP signal.
kdDebug() << "KTTSD::slotTextFinished: Emitting DCOP signal textFinished with appId " << appId << " job number " << jobNum << endl;
textFinished(appId, jobNum);
}
-void KTTSD::slotTextStopped(const QCString& appId, const uint jobNum){
+void KTTSD::slotTextStopped(const TQCString& appId, const uint jobNum){
// Emit DCOP signal.
kdDebug() << "KTTSD::slotTextStopped: Emitting DCOP signal textStopped with appId " << appId << " job number " << jobNum << endl;
textStopped(appId, jobNum);
}
-void KTTSD::slotTextPaused(const QCString& appId, const uint jobNum){
+void KTTSD::slotTextPaused(const TQCString& appId, const uint jobNum){
// Emit DCOP signal.
kdDebug() << "KTTSD::slotTextPaused: Emitting DCOP signal textPaused with appId " << appId << " job number " << jobNum << endl;
textPaused(appId, jobNum);
}
-void KTTSD::slotTextResumed(const QCString& appId, const uint jobNum){
+void KTTSD::slotTextResumed(const TQCString& appId, const uint jobNum){
// Emit DCOP signal.
kdDebug() << "KTTSD::slotTextResumed: Emitting DCOP signal textResumed with appId " << appId << " job number " << jobNum << endl;
textResumed(appId, jobNum);
}
-//void KTTSD::slotTextSet(const QCString& appId, const uint jobNum){
-void KTTSD::slotTextSet(const QCString& appId, const uint jobNum){
+//void KTTSD::slotTextSet(const TQCString& appId, const uint jobNum){
+void KTTSD::slotTextSet(const TQCString& appId, const uint jobNum){
// Emit DCOP signal.
kdDebug() << "KTTSD::slotTextSet: Emitting DCOP signal textSet with appId " << appId << " job number " << jobNum << endl;
textSet(appId, jobNum);
}
-void KTTSD::slotTextAppended(const QCString& appId, const uint jobNum, const int partNum){
+void KTTSD::slotTextAppended(const TQCString& appId, const uint jobNum, const int partNum){
// Emit DCOP signal.
kdDebug() << "KTTSD::slotTextAppended: Emitting DCOP signal textAppended with appId " <<
appId << " job number " << jobNum << " part number " << partNum << endl;
textAppended(appId, jobNum, partNum);
}
-void KTTSD::slotTextRemoved(const QCString& appId, const uint jobNum){
+void KTTSD::slotTextRemoved(const TQCString& appId, const uint jobNum){
// Emit DCOP signal.
kdDebug() << "KTTSD::slotTextRemoved: Emitting DCOP signal textRemoved with appId " << appId << " job number " << jobNum << endl;
textRemoved(appId, jobNum);
@@ -1056,10 +1056,10 @@ void KTTSD::slotTextRemoved(const QCString& appId, const uint jobNum){
* Returns the senderId (appId) of the DCOP application that called us.
* @return The DCOP sendId of calling application.
*/
-const QCString KTTSD::getAppId()
+const TQCString KTTSD::getAppId()
{
DCOPClient* client = callingDcopClient();
- QCString appId;
+ TQCString appId;
if (client) appId = client->senderId();
return appId;
}
@@ -1084,21 +1084,21 @@ uint KTTSD::applyDefaultJobNum(const uint jobNum)
/*
* Fixes a string argument passed in via dcop.
-* If NULL or "0" return QString::null.
+* If NULL or "0" return TQString::null.
*/
-QString KTTSD::fixNullString(const QString &talker) const
+TQString KTTSD::fixNullString(const TQString &talker) const
{
- if (!talker) return QString::null;
- if (talker == "0") return QString::null;
+ if (!talker) return TQString::null;
+ if (talker == "0") return TQString::null;
return talker;
}
// kspeech is obsolete. Applications should use KSpeech instead.
// Constructor.
-kspeech::kspeech(const QCString& objId, QObject *parent, const char *name) :
+kspeech::kspeech(const TQCString& objId, TQObject *parent, const char *name) :
DCOPObject(objId),
- QObject(parent, name),
+ TQObject(parent, name),
m_kttsd("KSpeech")
{
}
@@ -1107,26 +1107,26 @@ kspeech::kspeech(const QCString& objId, QObject *parent, const char *name) :
kspeech::~kspeech() { }
// Delegate all DCOP methods to KTTSD object.
-/*virtual*/ bool kspeech::supportsMarkup(const QString &talker, uint markupType) const
+/*virtual*/ bool kspeech::supportsMarkup(const TQString &talker, uint markupType) const
{ return m_kttsd.supportsMarkup(talker, markupType); }
-/*virtual*/ bool kspeech::supportsMarkers(const QString &talker) const
+/*virtual*/ bool kspeech::supportsMarkers(const TQString &talker) const
{ return m_kttsd.supportsMarkers(talker); }
-/*virtual*/ ASYNC kspeech::sayScreenReaderOutput(const QString &msg, const QString &talker)
+/*virtual*/ ASYNC kspeech::sayScreenReaderOutput(const TQString &msg, const TQString &talker)
{ m_kttsd.sayScreenReaderOutput(msg, talker); }
-/*virtual*/ ASYNC kspeech::sayWarning(const QString &warning, const QString &talker)
+/*virtual*/ ASYNC kspeech::sayWarning(const TQString &warning, const TQString &talker)
{ m_kttsd.sayWarning(warning, talker); }
-/*virtual*/ ASYNC kspeech::sayMessage(const QString &message, const QString &talker)
+/*virtual*/ ASYNC kspeech::sayMessage(const TQString &message, const TQString &talker)
{ m_kttsd.sayMessage(message, talker); }
-/*virtual*/ ASYNC kspeech::setSentenceDelimiter(const QString &delimiter)
+/*virtual*/ ASYNC kspeech::setSentenceDelimiter(const TQString &delimiter)
{ m_kttsd.setSentenceDelimiter(delimiter); }
-/*virtual*/ uint kspeech::setText(const QString &text, const QString &talker)
+/*virtual*/ uint kspeech::setText(const TQString &text, const TQString &talker)
{ return m_kttsd.setText(text, talker); }
-/*virtual*/ uint kspeech::sayText(const QString &text, const QString &talker)
+/*virtual*/ uint kspeech::sayText(const TQString &text, const TQString &talker)
{ return m_kttsd.sayText(text, talker); }
-/*virtual*/ int kspeech::appendText(const QString &text, uint jobNum)
+/*virtual*/ int kspeech::appendText(const TQString &text, uint jobNum)
{ return m_kttsd.appendText(text, jobNum); }
-/*virtual*/ uint kspeech::setFile(const QString &filename, const QString &talker,
- const QString& encoding)
+/*virtual*/ uint kspeech::setFile(const TQString &filename, const TQString &talker,
+ const TQString& encoding)
{ return m_kttsd.setFile(filename, talker, encoding); }
/*virtual*/ int kspeech::getTextCount(uint jobNum)
{ return m_kttsd.getTextCount(jobNum); }
@@ -1134,15 +1134,15 @@ kspeech::~kspeech() { }
{ return m_kttsd.getCurrentTextJob(); }
/*virtual*/ uint kspeech::getTextJobCount()
{ return m_kttsd.getTextJobCount(); }
-/*virtual*/ QString kspeech::getTextJobNumbers()
+/*virtual*/ TQString kspeech::getTextJobNumbers()
{ return m_kttsd.getTextJobNumbers(); }
/*virtual*/ int kspeech::getTextJobState(uint jobNum)
{ return m_kttsd.getTextJobState(jobNum); }
-/*virtual*/ QByteArray kspeech::getTextJobInfo(uint jobNum)
+/*virtual*/ TQByteArray kspeech::getTextJobInfo(uint jobNum)
{ return m_kttsd.getTextJobInfo(jobNum); }
-/*virtual*/ QString kspeech::talkerCodeToTalkerId(const QString& talkerCode)
+/*virtual*/ TQString kspeech::talkerCodeToTalkerId(const TQString& talkerCode)
{ return m_kttsd.talkerCodeToTalkerId(talkerCode); }
-/*virtual*/ QString kspeech::getTextJobSentence(uint jobNum, uint seq)
+/*virtual*/ TQString kspeech::getTextJobSentence(uint jobNum, uint seq)
{ return m_kttsd.getTextJobSentence(jobNum, seq); }
/*virtual*/ bool kspeech::isSpeakingText() const
{ return m_kttsd.isSpeakingText(); }
@@ -1156,11 +1156,11 @@ kspeech::~kspeech() { }
{ m_kttsd.pauseText(jobNum); }
/*virtual*/ ASYNC kspeech::resumeText(uint jobNum)
{ m_kttsd.resumeText(jobNum); }
-/*virtual*/ QStringList kspeech::getTalkers()
+/*virtual*/ TQStringList kspeech::getTalkers()
{ return m_kttsd.getTalkers(); }
-/*virtual*/ ASYNC kspeech::changeTextTalker(const QString &talker, uint jobNum )
+/*virtual*/ ASYNC kspeech::changeTextTalker(const TQString &talker, uint jobNum )
{ m_kttsd.changeTextTalker(talker, jobNum); }
-/*virtual*/ QString kspeech::userDefaultTalker()
+/*virtual*/ TQString kspeech::userDefaultTalker()
{ return m_kttsd.userDefaultTalker(); }
/*virtual*/ ASYNC kspeech::moveTextLater(uint jobNum)
{ m_kttsd.moveTextLater(jobNum); }
@@ -1176,7 +1176,7 @@ kspeech::~kspeech() { }
{ m_kttsd.kttsdExit(); }
/*virtual*/ void kspeech::reinit()
{ m_kttsd.reinit(); }
-/*virtual*/ QString kspeech::version()
+/*virtual*/ TQString kspeech::version()
{ return m_kttsd.version(); }
#include "kttsd.moc"
diff --git a/kttsd/kttsd/kttsd.h b/kttsd/kttsd/kttsd.h
index bdbd756..075383b 100644
--- a/kttsd/kttsd/kttsd.h
+++ b/kttsd/kttsd/kttsd.h
@@ -36,7 +36,7 @@
* @author Gary Cramblitt <garycramblitt@comcast.net>
*/
-class KTTSD : public QObject, virtual public KSpeech
+class KTTSD : public TQObject, virtual public KSpeech
{
Q_OBJECT
K_DCOP
@@ -48,7 +48,7 @@ class KTTSD : public QObject, virtual public KSpeech
* Create objects, speechData and speaker.
* Start thread
*/
- KTTSD(const QCString& objId, QObject *parent=0, const char *name=0);
+ KTTSD(const TQCString& objId, TQObject *parent=0, const char *name=0);
/**
* Destructor.
@@ -68,7 +68,7 @@ class KTTSD : public QObject, virtual public KSpeech
* talker supports the indicated speech markup language.
* @see kttsdMarkupType
*/
- virtual bool supportsMarkup(const QString &talker=NULL, const uint markupType = 0) const;
+ virtual bool supportsMarkup(const TQString &talker=NULL, const uint markupType = 0) const;
/**
* Determine whether the currently-configured speech plugin supports markers in speech markup.
@@ -77,7 +77,7 @@ class KTTSD : public QObject, virtual public KSpeech
* @return True if the plugin currently configured for the indicated
* talker supports markers.
*/
- virtual bool supportsMarkers(const QString &talker=NULL) const;
+ virtual bool supportsMarkers(const TQString &talker=NULL) const;
/**
* Say a message as soon as possible, interrupting any other speech in progress.
@@ -92,7 +92,7 @@ class KTTSD : public QObject, virtual public KSpeech
* If an existing Screen Reader output is in progress, it is stopped and discarded and
* replaced with this new message.
*/
- virtual ASYNC sayScreenReaderOutput(const QString &msg, const QString &talker=NULL);
+ virtual ASYNC sayScreenReaderOutput(const TQString &msg, const TQString &talker=NULL);
/**
* Say a warning. The warning will be spoken when the current sentence
@@ -105,7 +105,7 @@ class KTTSD : public QObject, virtual public KSpeech
* If no plugin has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
- virtual ASYNC sayWarning(const QString &warning, const QString &talker=NULL);
+ virtual ASYNC sayWarning(const TQString &warning, const TQString &talker=NULL);
/**
* Say a message. The message will be spoken when the current sentence stops speaking
@@ -118,7 +118,7 @@ class KTTSD : public QObject, virtual public KSpeech
* If no talker has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
- virtual ASYNC sayMessage(const QString &message, const QString &talker=NULL);
+ virtual ASYNC sayMessage(const TQString &message, const TQString &talker=NULL);
/**
* Sets the GREP pattern that will be used as the sentence delimiter.
@@ -134,7 +134,7 @@ class KTTSD : public QObject, virtual public KSpeech
* Changing the sentence delimiter does not affect other applications.
* @see sentenceparsing
*/
- virtual ASYNC setSentenceDelimiter(const QString &delimiter);
+ virtual ASYNC setSentenceDelimiter(const TQString &delimiter);
/**
* Queue a text job. Does not start speaking the text.
@@ -158,7 +158,7 @@ class KTTSD : public QObject, virtual public KSpeech
* @see getTextCount
* @see startText
*/
- virtual uint setText(const QString &text, const QString &talker=NULL);
+ virtual uint setText(const TQString &text, const TQString &talker=NULL);
/**
* Say a plain text job. This is a convenience method that
@@ -188,7 +188,7 @@ class KTTSD : public QObject, virtual public KSpeech
*
* @since KDE 3.5
*/
- virtual uint sayText(const QString &text, const QString &talker);
+ virtual uint sayText(const TQString &text, const TQString &talker);
/**
* Adds another part to a text job. Does not start speaking the text.
@@ -205,7 +205,7 @@ class KTTSD : public QObject, virtual public KSpeech
* @see setText.
* @see startText.
*/
- int appendText(const QString &text, const uint jobNum=0);
+ int appendText(const TQString &text, const uint jobNum=0);
/**
* Queue a text job from the contents of a file. Does not start speaking the text.
@@ -231,8 +231,8 @@ class KTTSD : public QObject, virtual public KSpeech
* @see getTextCount
* @see startText
*/
- virtual uint setFile(const QString &filename, const QString &talker=NULL,
- const QString& encoding=NULL);
+ virtual uint setFile(const TQString &filename, const TQString &talker=NULL,
+ const TQString& encoding=NULL);
/**
* Get the number of sentences in a text job.
@@ -267,7 +267,7 @@ class KTTSD : public QObject, virtual public KSpeech
* Get a comma-separated list of text job numbers in the queue.
* @return Comma-separated list of text job numbers in the queue.
*/
- virtual QString getTextJobNumbers();
+ virtual TQString getTextJobNumbers();
/**
* Get the state of a text job.
@@ -285,13 +285,13 @@ class KTTSD : public QObject, virtual public KSpeech
* @param jobNum Job number of the text job.
* If zero, applies to the last job queued by the application,
* but if no such job, applies to the current job (if any).
- * @return A QDataStream containing information about the job.
+ * @return A TQDataStream containing information about the job.
* Blank if no such job.
*
* The stream contains the following elements:
* - int state Job state.
- * - QCString appId DCOP senderId of the application that requested the speech job.
- * - QString talker Language code in which to speak the text.
+ * - TQCString appId DCOP senderId of the application that requested the speech job.
+ * - TQString talker Language code in which to speak the text.
* - int seq Current sentence being spoken. Sentences are numbered starting at 1.
* - int sentenceCount Total number of sentences in the job.
* - int partNum Current part of the job begin spoken. Parts are numbered starting at 1.
@@ -302,11 +302,11 @@ class KTTSD : public QObject, virtual public KSpeech
*
* The following sample code will decode the stream:
@verbatim
- QByteArray jobInfo = getTextJobInfo(jobNum);
- QDataStream stream(jobInfo, IO_ReadOnly);
+ TQByteArray jobInfo = getTextJobInfo(jobNum);
+ TQDataStream stream(jobInfo, IO_ReadOnly);
int state;
- QCString appId;
- QString talker;
+ TQCString appId;
+ TQString talker;
int seq;
int sentenceCount;
int partNum;
@@ -320,7 +320,7 @@ class KTTSD : public QObject, virtual public KSpeech
stream >> partCount;
@endverbatim
*/
- virtual QByteArray getTextJobInfo(const uint jobNum=0);
+ virtual TQByteArray getTextJobInfo(const uint jobNum=0);
/**
* Given a Talker Code, returns the Talker ID of the talker that would speak
@@ -328,7 +328,7 @@ class KTTSD : public QObject, virtual public KSpeech
* @param talkerCode Talker Code.
* @return Talker ID of the talker that would speak the text job.
*/
- virtual QString talkerCodeToTalkerId(const QString& talkerCode);
+ virtual TQString talkerCodeToTalkerId(const TQString& talkerCode);
/**
* Return a sentence of a job.
@@ -339,7 +339,7 @@ class KTTSD : public QObject, virtual public KSpeech
* @return The specified sentence in the specified job. If not such
* job or sentence, returns "".
*/
- virtual QString getTextJobSentence(const uint jobNum=0, const uint seq=1);
+ virtual TQString getTextJobSentence(const uint jobNum=0, const uint seq=1);
/**
* Determine if kttsd is currently speaking any text jobs.
@@ -436,12 +436,12 @@ class KTTSD : public QObject, virtual public KSpeech
/**
* Get a list of the talkers configured in KTTS.
- * @return A QStringList of fully-specified talker codes, one
+ * @return A TQStringList of fully-specified talker codes, one
* for each talker user has configured.
*
* @see talkers
*/
- virtual QStringList getTalkers();
+ virtual TQStringList getTalkers();
/**
* Change the talker for a text job.
@@ -453,7 +453,7 @@ class KTTSD : public QObject, virtual public KSpeech
* If no plugin has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
- virtual ASYNC changeTextTalker(const QString &talker, uint jobNum=0);
+ virtual ASYNC changeTextTalker(const TQString &talker, uint jobNum=0);
/**
* Get the user's default talker.
@@ -462,7 +462,7 @@ class KTTSD : public QObject, virtual public KSpeech
* @see talkers
* @see getTalkers
*/
- virtual QString userDefaultTalker();
+ virtual TQString userDefaultTalker();
/**
* Move a text job down in the queue so that it is spoken later.
@@ -531,7 +531,7 @@ class KTTSD : public QObject, virtual public KSpeech
* Return the KTTSD deamon version number.
* @since KDE 3.5
*/
- virtual QString version();
+ virtual TQString version();
protected:
@@ -539,8 +539,8 @@ class KTTSD : public QObject, virtual public KSpeech
/**
* This signal is emitted by KNotify when a notification event occurs.
*/
- void notificationSignal(const QString &event, const QString &fromApp,
- const QString &text, const QString &sound, const QString &file,
+ void notificationSignal(const TQString &event, const TQString &fromApp,
+ const TQString &text, const TQString &sound, const TQString &file,
const int present, const int level, const int winId, const int eventId );
private slots:
@@ -548,22 +548,22 @@ class KTTSD : public QObject, virtual public KSpeech
* These functions are called whenever
* the status of the speaker object has changed
*/
- void slotSentenceStarted(QString text, QString language,
- const QCString& appId, const uint jobNum, const uint seq);
- void slotSentenceFinished(const QCString& appId, const uint jobNum, const uint seq);
+ void slotSentenceStarted(TQString text, TQString language,
+ const TQCString& appId, const uint jobNum, const uint seq);
+ void slotSentenceFinished(const TQCString& appId, const uint jobNum, const uint seq);
/*
* These functions are called whenever
* the status of the speechData object has changed
*/
- void slotTextSet(const QCString& appId, const uint jobNum);
- void slotTextAppended(const QCString& appId, const uint jobNum, const int partNum);
- void slotTextStarted(const QCString& appId, const uint jobNum);
- void slotTextFinished(const QCString& appId, const uint jobNum);
- void slotTextStopped(const QCString& appId, const uint jobNum);
- void slotTextPaused(const QCString& appId, const uint jobNum);
- void slotTextResumed(const QCString& appId, const uint jobNum);
- void slotTextRemoved(const QCString& appId, const uint jobNum);
+ void slotTextSet(const TQCString& appId, const uint jobNum);
+ void slotTextAppended(const TQCString& appId, const uint jobNum, const int partNum);
+ void slotTextStarted(const TQCString& appId, const uint jobNum);
+ void slotTextFinished(const TQCString& appId, const uint jobNum);
+ void slotTextStopped(const TQCString& appId, const uint jobNum);
+ void slotTextPaused(const TQCString& appId, const uint jobNum);
+ void slotTextResumed(const TQCString& appId, const uint jobNum);
+ void slotTextRemoved(const TQCString& appId, const uint jobNum);
/*
* Fires whenever user clicks Apply or OK buttons in Settings dialog.
@@ -596,7 +596,7 @@ class KTTSD : public QObject, virtual public KSpeech
* Returns the senderId (appId) of the DCOP application that called us.
* @return appId The DCOP sendId of calling application. NULL if called internally by kttsd itself.
*/
- const QCString getAppId();
+ const TQCString getAppId();
/*
* If a job number is 0, returns the default job number for a command.
@@ -608,9 +608,9 @@ class KTTSD : public QObject, virtual public KSpeech
/*
* Fixes a talker argument passed in via dcop.
- * If NULL or "0" return QString::null.
+ * If NULL or "0" return TQString::null.
*/
- QString fixNullString(const QString &talker) const;
+ TQString fixNullString(const TQString &talker) const;
/*
* SpeechData containing all the data and the manipulating methods for all KTTSD
@@ -629,47 +629,47 @@ class KTTSD : public QObject, virtual public KSpeech
};
// kspeech is obsolete. Applications should use KSpeech instead.
-class kspeech : public QObject, virtual public KSpeech
+class kspeech : public TQObject, virtual public KSpeech
{
Q_OBJECT
K_DCOP
public:
// Constructor.
- kspeech(const QCString& objId, QObject *parent=0, const char *name=0);
+ kspeech(const TQCString& objId, TQObject *parent=0, const char *name=0);
// Destructor.
~kspeech();
// Delegate all DCOP methods to KTTSD object.
- virtual bool supportsMarkup(const QString &talker, uint markupType = 0) const;
- virtual bool supportsMarkers(const QString &talker) const;
- virtual ASYNC sayScreenReaderOutput(const QString &msg, const QString &talker);
- virtual ASYNC sayWarning(const QString &warning, const QString &talker);
- virtual ASYNC sayMessage(const QString &message, const QString &talker);
- virtual ASYNC setSentenceDelimiter(const QString &delimiter);
- virtual uint setText(const QString &text, const QString &talker);
- virtual uint sayText(const QString &text, const QString &talker);
- virtual int appendText(const QString &text, uint jobNum=0);
- virtual uint setFile(const QString &filename, const QString &talker,
- const QString& encoding);
+ virtual bool supportsMarkup(const TQString &talker, uint markupType = 0) const;
+ virtual bool supportsMarkers(const TQString &talker) const;
+ virtual ASYNC sayScreenReaderOutput(const TQString &msg, const TQString &talker);
+ virtual ASYNC sayWarning(const TQString &warning, const TQString &talker);
+ virtual ASYNC sayMessage(const TQString &message, const TQString &talker);
+ virtual ASYNC setSentenceDelimiter(const TQString &delimiter);
+ virtual uint setText(const TQString &text, const TQString &talker);
+ virtual uint sayText(const TQString &text, const TQString &talker);
+ virtual int appendText(const TQString &text, uint jobNum=0);
+ virtual uint setFile(const TQString &filename, const TQString &talker,
+ const TQString& encoding);
virtual int getTextCount(uint jobNum=0);
virtual uint getCurrentTextJob();
virtual uint getTextJobCount();
- virtual QString getTextJobNumbers();
+ virtual TQString getTextJobNumbers();
virtual int getTextJobState(uint jobNum=0);
- virtual QByteArray getTextJobInfo(uint jobNum=0);
- virtual QString talkerCodeToTalkerId(const QString& talkerCode);
- virtual QString getTextJobSentence(uint jobNum=0, uint seq=0);
+ virtual TQByteArray getTextJobInfo(uint jobNum=0);
+ virtual TQString talkerCodeToTalkerId(const TQString& talkerCode);
+ virtual TQString getTextJobSentence(uint jobNum=0, uint seq=0);
virtual bool isSpeakingText() const;
virtual ASYNC removeText(uint jobNum=0);
virtual ASYNC startText(uint jobNum=0);
virtual ASYNC stopText(uint jobNum=0);
virtual ASYNC pauseText(uint jobNum=0);
virtual ASYNC resumeText(uint jobNum=0);
- virtual QStringList getTalkers();
- virtual ASYNC changeTextTalker(const QString &talker, uint jobNum=0 );
- virtual QString userDefaultTalker();
+ virtual TQStringList getTalkers();
+ virtual ASYNC changeTextTalker(const TQString &talker, uint jobNum=0 );
+ virtual TQString userDefaultTalker();
virtual ASYNC moveTextLater(uint jobNum=0);
virtual int jumpToTextPart(int partNum, uint jobNum=0);
virtual uint moveRelTextSentence(int n, uint jobNum=0);
@@ -677,7 +677,7 @@ class kspeech : public QObject, virtual public KSpeech
virtual void showDialog();
virtual void kttsdExit();
virtual void reinit();
- virtual QString version();
+ virtual TQString version();
private:
KTTSD m_kttsd;
diff --git a/kttsd/kttsd/speaker.cpp b/kttsd/kttsd/speaker.cpp
index b965a9e..42fa39e 100644
--- a/kttsd/kttsd/speaker.cpp
+++ b/kttsd/kttsd/speaker.cpp
@@ -20,9 +20,9 @@
******************************************************************************/
// Qt includes.
-#include <qfile.h>
-#include <qtimer.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqtimer.h>
+#include <tqdir.h>
// KDE includes.
#include <kdebug.h>
@@ -107,8 +107,8 @@
* Loads plugins.
*/
Speaker::Speaker( SpeechData*speechData, TalkerMgr* talkerMgr,
- QObject *parent, const char *name) :
- QObject(parent, name),
+ TQObject *parent, const char *name) :
+ TQObject(parent, name),
m_speechData(speechData),
m_talkerMgr(talkerMgr)
{
@@ -119,7 +119,7 @@ Speaker::Speaker( SpeechData*speechData, TalkerMgr* talkerMgr,
m_lastAppId = 0;
m_lastJobNum = 0;
m_lastSeq = 0;
- m_timer = new QTimer(this, "kttsdAudioTimer");
+ m_timer = new TQTimer(this, "kttsdAudioTimer");
m_speechData->config->setGroup("General");
m_playerOption = m_speechData->config->readNumEntry("AudioOutputMethod", 0); // default to aRts.
// Map 50% to 100% onto 2.0 to 0.5.
@@ -152,22 +152,22 @@ Speaker::Speaker( SpeechData*speechData, TalkerMgr* talkerMgr,
break;
}
// Connect timer timeout signal.
- connect(m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout()));
+ connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()));
// Connect plugins to slots.
- QPtrList<PlugInProc> plugins = m_talkerMgr->getLoadedPlugIns();
+ TQPtrList<PlugInProc> plugins = m_talkerMgr->getLoadedPlugIns();
const int pluginsCount = plugins.count();
for (int ndx = 0; ndx < pluginsCount; ++ndx)
{
PlugInProc* speech = plugins.at(ndx);
- connect(speech, SIGNAL(synthFinished()),
- this, SLOT(slotSynthFinished()));
- connect(speech, SIGNAL(sayFinished()),
- this, SLOT(slotSayFinished()));
- connect(speech, SIGNAL(stopped()),
- this, SLOT(slotStopped()));
- connect(speech, SIGNAL(error(bool, const QString&)),
- this, SLOT(slotError(bool, const QString&)));
+ connect(speech, TQT_SIGNAL(synthFinished()),
+ this, TQT_SLOT(slotSynthFinished()));
+ connect(speech, TQT_SIGNAL(sayFinished()),
+ this, TQT_SLOT(slotSayFinished()));
+ connect(speech, TQT_SIGNAL(stopped()),
+ this, TQT_SLOT(slotStopped()));
+ connect(speech, TQT_SIGNAL(error(bool, const TQString&)),
+ this, TQT_SLOT(slotError(bool, const TQString&)));
}
}
@@ -228,9 +228,9 @@ void Speaker::doUtterances()
// kdDebug() << "Speaker::doUtterances: queue dump:" << endl;
// for (it = m_uttQueue.begin(); it != m_uttQueue.end(); ++it)
// {
-// QString pluginState = "no plugin";
+// TQString pluginState = "no plugin";
// if (it->plugin) pluginState = pluginStateToStr(it->plugin->getState());
-// QString jobState =
+// TQString jobState =
// jobStateToStr(m_speechData->getTextJobState(it->sentence->jobNum));
// kdDebug() <<
// " State: " << uttStateToStr(it->state) <<
@@ -275,8 +275,8 @@ void Speaker::doUtterances()
{
// Create an XSLT transformer and transform the text.
it->transformer = new SSMLConvert();
- connect(it->transformer, SIGNAL(transformFinished()),
- this, SLOT(slotTransformFinished()));
+ connect(it->transformer, TQT_SIGNAL(transformFinished()),
+ this, TQT_SLOT(slotTransformFinished()));
if (it->transformer->transform(it->sentence->text,
it->plugin->getSsmlXsltFilename()))
{
@@ -345,8 +345,8 @@ void Speaker::doUtterances()
else
{
it->audioStretcher = new Stretcher();
- connect(it->audioStretcher, SIGNAL(stretchFinished()),
- this, SLOT(slotStretchFinished()));
+ connect(it->audioStretcher, TQT_SIGNAL(stretchFinished()),
+ this, TQT_SLOT(slotStretchFinished()));
if (it->audioStretcher->stretch(it->audioUrl, makeSuggestedFilename(),
m_audioStretchFactor))
{
@@ -370,7 +370,7 @@ void Speaker::doUtterances()
// See if Stretcher is finished.
if (it->audioStretcher->getState() == Stretcher::ssFinished)
{
- QFile::remove(it->audioUrl);
+ TQFile::remove(it->audioUrl);
it->audioUrl = it->audioStretcher->getOutFilename();
it->state = usStretched;
delete it->audioStretcher;
@@ -786,7 +786,7 @@ uint Speaker::moveRelTextSentence(const int n, const uint jobNum)
* Converts an utterance state enumerator to a displayable string.
* @param state Utterance state.
*/
-QString Speaker::uttStateToStr(uttState state)
+TQString Speaker::uttStateToStr(uttState state)
{
switch (state)
{
@@ -806,7 +806,7 @@ QString Speaker::uttStateToStr(uttState state)
case usPreempted: return "usPreempted";
case usFinished: return "usFinished";
}
- return QString::null;
+ return TQString::null;
}
/**
@@ -814,7 +814,7 @@ QString Speaker::uttStateToStr(uttState state)
* @param utType Utterance type.
* @return Displayable string for utterance type.
*/
-QString Speaker::uttTypeToStr(uttType utType)
+TQString Speaker::uttTypeToStr(uttType utType)
{
switch (utType)
{
@@ -829,7 +829,7 @@ QString Speaker::uttTypeToStr(uttType utType)
case utStartOfJob: return "utStartOfJob";
case utEndOfJob: return "utEndOfJob";
}
- return QString::null;
+ return TQString::null;
}
/**
@@ -837,7 +837,7 @@ QString Speaker::uttTypeToStr(uttType utType)
* @param state Plugin state.
* @return Displayable string for plugin state.
*/
-QString Speaker::pluginStateToStr(pluginState state)
+TQString Speaker::pluginStateToStr(pluginState state)
{
switch( state )
{
@@ -846,7 +846,7 @@ QString Speaker::pluginStateToStr(pluginState state)
case psSynthing: return "psSynthing";
case psFinished: return "psFinished";
}
- return QString::null;
+ return TQString::null;
}
/**
@@ -854,7 +854,7 @@ QString Speaker::pluginStateToStr(pluginState state)
* @param state Job state.
* @return Displayable string for job state.
*/
-QString Speaker::jobStateToStr(int state)
+TQString Speaker::jobStateToStr(int state)
{
switch ( state )
{
@@ -864,7 +864,7 @@ QString Speaker::jobStateToStr(int state)
case KSpeech::jsPaused: return "jsPaused";
case KSpeech::jsFinished: return "jsFinished";
}
- return QString::null;
+ return TQString::null;
}
/**
@@ -920,7 +920,7 @@ void Speaker::pauseUtteranceByJobNum(const uint jobNum)
/**
* Determines whether the given text is SSML markup.
*/
-bool Speaker::isSsml(const QString &text)
+bool Speaker::isSsml(const TQString &text)
{
return KttsUtils::hasRootElement( text, "speak" );
}
@@ -1019,7 +1019,7 @@ bool Speaker::getNextUtterance()
utt->state = usNone;
utt->audioPlayer = 0;
utt->audioStretcher = 0;
- utt->audioUrl = QString::null;
+ utt->audioUrl = TQString::null;
utt->plugin = m_talkerMgr->talkerToPlugin(utt->sentence->talker);
// Save some time by setting initial state now.
setInitialUtteranceState(*utt);
@@ -1079,7 +1079,7 @@ bool Speaker::getNextUtterance()
{
Utt intrUtt;
intrUtt.sentence = new mlText;
- intrUtt.sentence->text = QString::null;
+ intrUtt.sentence->text = TQString::null;
intrUtt.sentence->talker = utt->sentence->talker;
intrUtt.sentence->appId = utt->sentence->appId;
intrUtt.sentence->jobNum = utt->sentence->jobNum;
@@ -1099,11 +1099,11 @@ bool Speaker::getNextUtterance()
intrUtt.sentence = new mlText;
intrUtt.sentence->text = m_speechData->textPreMsg;
// Interruptions are spoken using default Talker.
- intrUtt.sentence->talker = QString::null;
+ intrUtt.sentence->talker = TQString::null;
intrUtt.sentence->appId = utt->sentence->appId;
intrUtt.sentence->jobNum = utt->sentence->jobNum;
intrUtt.sentence->seq = 0;
- intrUtt.audioUrl = QString::null;
+ intrUtt.audioUrl = TQString::null;
intrUtt.audioPlayer = 0;
intrUtt.utType = utInterruptMsg;
intrUtt.isSSML = isSsml(intrUtt.sentence->text);
@@ -1125,7 +1125,7 @@ bool Speaker::getNextUtterance()
{
Utt resUtt;
resUtt.sentence = new mlText;
- resUtt.sentence->text = QString::null;
+ resUtt.sentence->text = TQString::null;
resUtt.sentence->talker = utt->sentence->talker;
resUtt.sentence->appId = utt->sentence->appId;
resUtt.sentence->jobNum = utt->sentence->jobNum;
@@ -1144,11 +1144,11 @@ bool Speaker::getNextUtterance()
Utt resUtt;
resUtt.sentence = new mlText;
resUtt.sentence->text = m_speechData->textPostMsg;
- resUtt.sentence->talker = QString::null;
+ resUtt.sentence->talker = TQString::null;
resUtt.sentence->appId = utt->sentence->appId;
resUtt.sentence->jobNum = utt->sentence->jobNum;
resUtt.sentence->seq = 0;
- resUtt.audioUrl = QString::null;
+ resUtt.audioUrl = TQString::null;
resUtt.audioPlayer = 0;
resUtt.utType = utResumeMsg;
resUtt.isSSML = isSsml(resUtt.sentence->text);
@@ -1173,12 +1173,12 @@ bool Speaker::getNextUtterance()
{
Utt jobUtt;
jobUtt.sentence = new mlText;
- jobUtt.sentence->text = QString::null;
- jobUtt.sentence->talker = QString::null;
+ jobUtt.sentence->text = TQString::null;
+ jobUtt.sentence->talker = TQString::null;
jobUtt.sentence->appId = m_lastAppId;
jobUtt.sentence->jobNum = m_lastJobNum;
jobUtt.sentence->seq = 0;
- jobUtt.audioUrl = QString::null;
+ jobUtt.audioUrl = TQString::null;
jobUtt.utType = utEndOfJob;
jobUtt.isSSML = false;
jobUtt.plugin = 0;
@@ -1194,12 +1194,12 @@ bool Speaker::getNextUtterance()
{
Utt jobUtt;
jobUtt.sentence = new mlText;
- jobUtt.sentence->text = QString::null;
- jobUtt.sentence->talker = QString::null;
+ jobUtt.sentence->text = TQString::null;
+ jobUtt.sentence->talker = TQString::null;
jobUtt.sentence->appId = m_lastAppId;
jobUtt.sentence->jobNum = m_lastJobNum;
jobUtt.sentence->seq = utt->sentence->seq;
- jobUtt.audioUrl = QString::null;
+ jobUtt.audioUrl = TQString::null;
jobUtt.utType = utStartOfJob;
jobUtt.isSSML = false;
jobUtt.plugin = 0;
@@ -1220,12 +1220,12 @@ bool Speaker::getNextUtterance()
{
Utt jobUtt;
jobUtt.sentence = new mlText;
- jobUtt.sentence->text = QString::null;
- jobUtt.sentence->talker = QString::null;
+ jobUtt.sentence->text = TQString::null;
+ jobUtt.sentence->talker = TQString::null;
jobUtt.sentence->appId = m_lastAppId;
jobUtt.sentence->jobNum = m_lastJobNum;
jobUtt.sentence->seq = 0;
- jobUtt.audioUrl = QString::null;
+ jobUtt.audioUrl = TQString::null;
jobUtt.utType = utEndOfJob;
jobUtt.isSSML = false;
jobUtt.plugin = 0;
@@ -1311,14 +1311,14 @@ uttIterator Speaker::deleteUtterance(uttIterator it)
{
if (m_speechData->keepAudio)
{
- QCString seqStr;
+ TQCString seqStr;
seqStr.sprintf("%08i", it->sentence->seq); // Zero-fill to 8 chars.
- QCString jobStr;
+ TQCString jobStr;
jobStr.sprintf("%08i", it->sentence->jobNum);
- QString dest = m_speechData->keepAudioPath + "/kttsd-" +
- QString("%1-%2").arg(jobStr).arg(seqStr) + ".wav";
- QFile::remove(dest);
- QDir d;
+ TQString dest = m_speechData->keepAudioPath + "/kttsd-" +
+ TQString("%1-%2").arg(jobStr).arg(seqStr) + ".wav";
+ TQFile::remove(dest);
+ TQDir d;
d.rename(it->audioUrl, dest);
// TODO: This is always producing the following. Why and how to fix?
// It moves the files just fine.
@@ -1328,7 +1328,7 @@ uttIterator Speaker::deleteUtterance(uttIterator it)
// KIO::move(it->audioUrl, dest, false);
}
else
- QFile::remove(it->audioUrl);
+ TQFile::remove(it->audioUrl);
}
}
// Delete the utterance from queue.
@@ -1418,7 +1418,7 @@ bool Speaker::startPlayingUtterance(uttIterator it)
(m_speechData->getTextJobState(it->sentence->jobNum) != KSpeech::jsPaused))
{
// kdDebug() << "Speaker::startPlayingUtterance: resuming play" << endl;
- it->audioPlayer->startPlay(QString::null); // resume
+ it->audioPlayer->startPlay(TQString::null); // resume
it->state = usPlaying;
if (!m_timer->start(timerInterval, FALSE))
kdDebug() << "Speaker::startPlayingUtterance: timer.start failed" << endl;
@@ -1431,7 +1431,7 @@ bool Speaker::startPlayingUtterance(uttIterator it)
{
// Preempted playback automatically resumes.
// Note: Must call stop(), even if player not currently playing. Why?
- it->audioPlayer->startPlay(QString::null); // resume
+ it->audioPlayer->startPlay(TQString::null); // resume
it->state = usPlaying;
if (!m_timer->start(timerInterval, FALSE))
kdDebug() << "Speaker::startPlayingUtterance: timer.start failed" << endl;
@@ -1500,12 +1500,12 @@ void Speaker::postPlaySignals(uttIterator it)
* for synthesis to write to.
* @return Full pathname of suggested file.
*/
-QString Speaker::makeSuggestedFilename()
+TQString Speaker::makeSuggestedFilename()
{
KTempFile tempFile (locateLocal("tmp", "kttsd-"), ".wav");
- QString waveFile = tempFile.file()->name();
+ TQString waveFile = tempFile.file()->name();
tempFile.close();
- QFile::remove(waveFile);
+ TQFile::remove(waveFile);
// kdDebug() << "Speaker::makeSuggestedFilename: Suggesting filename: " << waveFile << endl;
return KStandardDirs::realFilePath(waveFile);
}
@@ -1516,7 +1516,7 @@ QString Speaker::makeSuggestedFilename()
Player* Speaker::createPlayerObject()
{
Player* player = 0;
- QString plugInName;
+ TQString plugInName;
switch(m_playerOption)
{
case 1 :
@@ -1541,7 +1541,7 @@ Player* Speaker::createPlayerObject()
}
}
KTrader::OfferList offers = KTrader::self()->query(
- "KTTSD/AudioPlugin", QString("DesktopEntryName == '%1'").arg(plugInName));
+ "KTTSD/AudioPlugin", TQString("DesktopEntryName == '%1'").arg(plugInName));
if(offers.count() == 1)
{
@@ -1595,8 +1595,8 @@ void Speaker::slotSayFinished()
{
// Since this signal handler may be running from a plugin's thread,
// convert to postEvent and return immediately.
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 101);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 101);
+ TQApplication::postEvent(this, ev);
}
/**
@@ -1606,8 +1606,8 @@ void Speaker::slotSynthFinished()
{
// Since this signal handler may be running from a plugin's thread,
// convert to postEvent and return immediately.
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 102);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 102);
+ TQApplication::postEvent(this, ev);
}
/**
@@ -1617,8 +1617,8 @@ void Speaker::slotStopped()
{
// Since this signal handler may be running from a plugin's thread,
// convert to postEvent and return immediately.
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 103);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 103);
+ TQApplication::postEvent(this, ev);
}
/**
@@ -1627,8 +1627,8 @@ void Speaker::slotStopped()
void Speaker::slotStretchFinished()
{
// Convert to postEvent and return immediately.
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 104);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 104);
+ TQApplication::postEvent(this, ev);
}
/**
@@ -1637,8 +1637,8 @@ void Speaker::slotStretchFinished()
void Speaker::slotTransformFinished()
{
// Convert to postEvent and return immediately.
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 105);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 105);
+ TQApplication::postEvent(this, ev);
}
/** Received from PlugIn object when they encounter an error.
@@ -1647,17 +1647,17 @@ void Speaker::slotTransformFinished()
* the speech engine could not be started.
* @param msg Error message.
*/
-void Speaker::slotError(bool /*keepGoing*/, const QString& /*msg*/)
+void Speaker::slotError(bool /*keepGoing*/, const TQString& /*msg*/)
{
// Since this signal handler may be running from a plugin's thread,
// convert to postEvent and return immediately.
// TODO: Do something with error messages.
/*
if (keepGoing)
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 106);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 106);
else
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 107);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 107);
+ TQApplication::postEvent(this, ev);
*/
}
@@ -1686,11 +1686,11 @@ void Speaker::slotTimeout()
* Processes events posted by plugins. When asynchronous plugins emit signals
* they are converted into these events.
*/
-bool Speaker::event ( QEvent * e )
+bool Speaker::event ( TQEvent * e )
{
// TODO: Do something with event numbers 106 (error; keepGoing=True)
// and 107 (error; keepGoing=False).
- if ((e->type() >= (QEvent::User + 101)) && (e->type() <= (QEvent::User + 105)))
+ if ((e->type() >= (TQEvent::User + 101)) && (e->type() <= (TQEvent::User + 105)))
{
// kdDebug() << "Speaker::event: received event." << endl;
doUtterances();
diff --git a/kttsd/kttsd/speaker.h b/kttsd/kttsd/speaker.h
index b72e832..a3dc677 100644
--- a/kttsd/kttsd/speaker.h
+++ b/kttsd/kttsd/speaker.h
@@ -24,9 +24,9 @@
#define _SPEAKER_H_
// Qt includes.
-#include <qobject.h>
-#include <qvaluevector.h>
-#include <qevent.h>
+#include <tqobject.h>
+#include <tqvaluevector.h>
+#include <tqevent.h>
// KTTSD includes.
#include <speechdata.h>
@@ -89,7 +89,7 @@ struct Utt{
SSMLConvert* transformer; /* XSLT transformer. */
PlugInProc* plugin; /* The plugin that synthesizes the utterance. */
Stretcher* audioStretcher; /* Audio stretcher object. Adjusts speed. */
- QString audioUrl; /* Filename containing synthesized audio. Null if
+ TQString audioUrl; /* Filename containing synthesized audio. Null if
plugin has not yet synthesized the utterance, or if
plugin does not support synthesis. */
Player* audioPlayer; /* The audio player audibilizing the utterance. Null
@@ -100,7 +100,7 @@ struct Utt{
/**
* Iterator for queue of utterances.
*/
-typedef QValueVector<Utt>::iterator uttIterator;
+typedef TQValueVector<Utt>::iterator uttIterator;
// Timer interval for checking whether audio playback is finished.
const int timerInterval = 500;
@@ -118,7 +118,7 @@ class Speaker : public QObject{
* Calls load plug ins
*/
Speaker(SpeechData* speechData, TalkerMgr* talkerMgr,
- QObject *parent = 0, const char *name = 0);
+ TQObject *parent = 0, const char *name = 0);
/**
* Destructor
@@ -296,7 +296,7 @@ class Speaker : public QObject{
* @param markerName The name of the marker seen.
* @see markers
*/
- void markerSeen(const QCString& appId, const QString& markerName);
+ void markerSeen(const TQCString& appId, const TQString& markerName);
/**
* This signal is emitted whenever a sentence begins speaking.
@@ -304,7 +304,7 @@ class Speaker : public QObject{
* @param jobNum Job number of the text job.
* @param seq Sequence number of the text.
*/
- void sentenceStarted(QString text, QString language, const QCString& appId,
+ void sentenceStarted(TQString text, TQString language, const TQCString& appId,
const uint jobNum, const uint seq);
/**
@@ -313,14 +313,14 @@ class Speaker : public QObject{
* @param jobNum Job number of the text job.
* @param seq Sequence number of the text.
*/
- void sentenceFinished(const QCString& appId, const uint jobNum, const uint seq);
+ void sentenceFinished(const TQCString& appId, const uint jobNum, const uint seq);
/**
* This signal is emitted whenever speaking of a text job begins.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- void textStarted(const QCString& appId, const uint jobNum);
+ void textStarted(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted whenever a text job is finished. The job has
@@ -331,32 +331,32 @@ class Speaker : public QObject{
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textFinished(const QCString& appId, const uint jobNum);
+ void textFinished(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted whenever a speaking text job stops speaking.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textStopped(const QCString& appId, const uint jobNum);
+ void textStopped(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted whenever a speaking text job is paused.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textPaused(const QCString& appId, const uint jobNum);
+ void textPaused(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted when a text job, that was previously paused, resumes speaking.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textResumed(const QCString& appId, const uint jobNum);
+ void textResumed(const TQCString& appId, const uint jobNum);
protected:
/**
* Processes events posted by ThreadedPlugIns.
*/
- virtual bool event ( QEvent * e );
+ virtual bool event ( TQEvent * e );
private slots:
/**
@@ -386,7 +386,7 @@ class Speaker : public QObject{
* the speech engine could not be started.
* @param msg Error message.
*/
- void slotError(bool keepGoing, const QString &msg);
+ void slotError(bool keepGoing, const TQString &msg);
/**
* Received from Timer when it fires.
* Check audio player to see if it is finished.
@@ -400,33 +400,33 @@ class Speaker : public QObject{
* @param state Utterance state.
* @return Displayable string for utterance state.
*/
- QString uttStateToStr(uttState state);
+ TQString uttStateToStr(uttState state);
/**
* Converts an utterance type enumerator to a displayable string.
* @param utType Utterance type.
* @return Displayable string for utterance type.
*/
- QString uttTypeToStr(uttType utType);
+ TQString uttTypeToStr(uttType utType);
/**
* Converts a plugin state enumerator to a displayable string.
* @param state Plugin state.
* @return Displayable string for plugin state.
*/
- QString pluginStateToStr(pluginState state);
+ TQString pluginStateToStr(pluginState state);
/**
* Converts a job state enumerator to a displayable string.
* @param state Job state.
* @return Displayable string for job state.
*/
- QString jobStateToStr(int state);
+ TQString jobStateToStr(int state);
/**
* Determines whether the given text is SSML markup.
*/
- bool isSsml(const QString &text);
+ bool isSsml(const TQString &text);
/**
* Determines the initial state of an utterance. If the utterance contains
@@ -510,7 +510,7 @@ class Speaker : public QObject{
* for synthesis to write to.
* @return Full pathname of suggested file.
*/
- QString makeSuggestedFilename();
+ TQString makeSuggestedFilename();
/**
* Creates and returns a player object based on user option.
@@ -535,7 +535,7 @@ class Speaker : public QObject{
/**
* Queue of utterances we are currently processing.
*/
- QValueVector<Utt> m_uttQueue;
+ TQValueVector<Utt> m_uttQueue;
/**
* True when text job reading has been interrupted.
@@ -563,12 +563,12 @@ class Speaker : public QObject{
/**
* GStreamer sink name to use, or ALSA PCM device name.
*/
- QString m_sinkName;
+ TQString m_sinkName;
/**
* Timer for monitoring audio player.
*/
- QTimer* m_timer;
+ TQTimer* m_timer;
/**
* Current Text job being processed.
@@ -579,7 +579,7 @@ class Speaker : public QObject{
* Job Number, appId, and sequence number of the last text sentence queued.
*/
uint m_lastJobNum;
- QCString m_lastAppId;
+ TQCString m_lastAppId;
uint m_lastSeq;
/**
diff --git a/kttsd/kttsd/speechdata.cpp b/kttsd/kttsd/speechdata.cpp
index a1bf26e..1c8f90f 100644
--- a/kttsd/kttsd/speechdata.cpp
+++ b/kttsd/kttsd/speechdata.cpp
@@ -26,11 +26,11 @@
#include <stdlib.h>
// Qt includes.
-#include <qregexp.h>
-#include <qpair.h>
-#include <qvaluelist.h>
-#include <qdom.h>
-#include <qfile.h>
+#include <tqregexp.h>
+#include <tqpair.h>
+#include <tqvaluelist.h>
+#include <tqdom.h>
+#include <tqfile.h>
// KDE includes.
#include <kdebug.h>
@@ -105,7 +105,7 @@ bool SpeechData::readConfig(){
autoExitManager = config->readBoolEntry("AutoExitManager", false);
// Clear the pool of filter managers so that filters re-init themselves.
- QPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
+ TQPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
for( ; it.current(); ++it )
{
PooledFilterMgr* pooledFilterMgr = it.current();
@@ -125,8 +125,8 @@ bool SpeechData::readConfig(){
pooledFilterMgr->job = 0;
pooledFilterMgr->partNum = 0;
// Connect signals from FilterMgr.
- connect (filterMgr, SIGNAL(filteringFinished()), this, SLOT(slotFilterMgrFinished()));
- connect (filterMgr, SIGNAL(filteringStopped()), this, SLOT(slotFilterMgrStopped()));
+ connect (filterMgr, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotFilterMgrFinished()));
+ connect (filterMgr, TQT_SIGNAL(filteringStopped()), this, TQT_SLOT(slotFilterMgrStopped()));
m_pooledFilterMgrs.append(pooledFilterMgr);
return true;
@@ -135,16 +135,16 @@ bool SpeechData::readConfig(){
/**
* Loads notify events from a file. Clearing data if clear is True.
*/
-void SpeechData::loadNotifyEventsFromFile( const QString& filename, bool clear)
+void SpeechData::loadNotifyEventsFromFile( const TQString& filename, bool clear)
{
// Open existing event list.
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_ReadOnly ) )
{
kdDebug() << "SpeechData::loadNotifyEventsFromFile: Unable to open file " << filename << endl;
}
- // QDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" );
- QDomDocument doc( "" );
+ // TQDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" );
+ TQDomDocument doc( "" );
if ( !doc.setContent( &file ) ) {
file.close();
kdDebug() << "SpeechData::loadNotifyEventsFromFile: File not in proper XML format. " << filename << endl;
@@ -156,28 +156,28 @@ void SpeechData::loadNotifyEventsFromFile( const QString& filename, bool clear)
{
notifyDefaultPresent = NotifyPresent::Passive;
notifyDefaultOptions.action = NotifyAction::SpeakMsg;
- notifyDefaultOptions.talker = QString::null;
- notifyDefaultOptions.customMsg = QString::null;
+ notifyDefaultOptions.talker = TQString::null;
+ notifyDefaultOptions.customMsg = TQString::null;
notifyAppMap.clear();
}
// Event list.
- QDomNodeList eventList = doc.elementsByTagName("notifyEvent");
+ TQDomNodeList eventList = doc.elementsByTagName("notifyEvent");
const int eventListCount = eventList.count();
for (int eventIndex = 0; eventIndex < eventListCount; ++eventIndex)
{
- QDomNode eventNode = eventList.item(eventIndex);
- QDomNodeList propList = eventNode.childNodes();
- QString eventSrc;
- QString event;
- QString actionName;
- QString message;
+ TQDomNode eventNode = eventList.item(eventIndex);
+ TQDomNodeList propList = eventNode.childNodes();
+ TQString eventSrc;
+ TQString event;
+ TQString actionName;
+ TQString message;
TalkerCode talkerCode;
const int propListCount = propList.count();
for (int propIndex = 0; propIndex < propListCount; ++propIndex)
{
- QDomNode propNode = propList.item(propIndex);
- QDomElement prop = propNode.toElement();
+ TQDomNode propNode = propList.item(propIndex);
+ TQDomElement prop = propNode.toElement();
if (prop.tagName() == "eventSrc") eventSrc = prop.text();
if (prop.tagName() == "event") event = prop.text();
if (prop.tagName() == "action") actionName = prop.text();
@@ -195,7 +195,7 @@ void SpeechData::loadNotifyEventsFromFile( const QString& filename, bool clear)
notifyEventMap[ event ] = notifyOptions;
notifyAppMap[ eventSrc ] = notifyEventMap;
} else {
- notifyOptions.eventName = QString::null;
+ notifyOptions.eventName = TQString::null;
notifyDefaultPresent = NotifyPresent::present( event );
notifyDefaultOptions = notifyOptions;
}
@@ -213,7 +213,7 @@ SpeechData::~SpeechData(){
emit textRemoved(job->appId, job->jobNum);
}
- QPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
+ TQPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
for( ; it.current(); ++it )
{
PooledFilterMgr* pooledFilterMgr = it.current();
@@ -239,7 +239,7 @@ SpeechData::~SpeechData(){
* If an existing Screen Reader output is in progress, it is stopped and discarded and
* replaced with this new message.
*/
-void SpeechData::setScreenReaderOutput(const QString &msg, const QString &talker, const QCString &appId)
+void SpeechData::setScreenReaderOutput(const TQString &msg, const TQString &talker, const TQCString &appId)
{
screenReaderOutput.text = msg;
screenReaderOutput.talker = talker;
@@ -273,8 +273,8 @@ bool SpeechData::screenReaderOutputReady()
/**
* Add a new warning to the queue.
*/
-void SpeechData::enqueueWarning( const QString &warning, const QString &talker, const QCString &appId){
- // kdDebug() << "Running: SpeechData::enqueueWarning( const QString &warning )" << endl;
+void SpeechData::enqueueWarning( const TQString &warning, const TQString &talker, const TQCString &appId){
+ // kdDebug() << "Running: SpeechData::enqueueWarning( const TQString &warning )" << endl;
mlJob* job = new mlJob();
++jobCounter;
if (jobCounter == 0) ++jobCounter; // Overflow is OK, but don't want any 0 jobNums.
@@ -285,7 +285,7 @@ void SpeechData::enqueueWarning( const QString &warning, const QString &talker,
job->seq = 1;
job->partCount = 1;
warnings.enqueue( job );
- job->sentences = QStringList();
+ job->sentences = TQStringList();
// Do not apply Sentence Boundary Detection filters to warnings.
startJobFiltering( job, warning, true );
// uint count = warnings.count();
@@ -331,7 +331,7 @@ bool SpeechData::warningInQueue(){
/**
* Add a new message to the queue.
*/
-void SpeechData::enqueueMessage( const QString &message, const QString &talker, const QCString& appId){
+void SpeechData::enqueueMessage( const TQString &message, const TQString &talker, const TQCString& appId){
// kdDebug() << "Running: SpeechData::enqueueMessage" << endl;
mlJob* job = new mlJob();
++jobCounter;
@@ -343,7 +343,7 @@ void SpeechData::enqueueMessage( const QString &message, const QString &talker,
job->seq = 1;
job->partCount = 1;
messages.enqueue( job );
- job->sentences = QStringList();
+ job->sentences = TQStringList();
// Do not apply Sentence Boundary Detection filters to messages.
startJobFiltering( job, message, true );
// uint count = messages.count();
@@ -390,13 +390,13 @@ bool SpeechData::messageInQueue(){
/**
* Determines whether the given text is SSML markup.
*/
-bool SpeechData::isSsml(const QString &text)
+bool SpeechData::isSsml(const TQString &text)
{
/// This checks to see if the root tag of the text is a <speak> tag.
- QDomDocument ssml;
+ TQDomDocument ssml;
ssml.setContent(text, false); // No namespace processing.
/// Check to see if this is SSML
- QDomElement root = ssml.documentElement();
+ TQDomElement root = ssml.documentElement();
return (root.tagName() == "speak");
}
@@ -412,39 +412,39 @@ bool SpeechData::isSsml(const QString &text)
* We will walk before we run for now and not sentence parse.
*/
-QStringList SpeechData::parseText(const QString &text, const QCString &appId /*=NULL*/)
+TQStringList SpeechData::parseText(const TQString &text, const TQCString &appId /*=NULL*/)
{
// There has to be a better way
// kdDebug() << "I'm getting: " << endl << text << " from application " << appId << endl;
if (isSsml(text))
{
- QString tempList(text);
+ TQString tempList(text);
return tempList;
}
// See if app has specified a custom sentence delimiter and use it, otherwise use default.
- QRegExp sentenceDelimiter;
+ TQRegExp sentenceDelimiter;
if (sentenceDelimiters.find(appId) != sentenceDelimiters.end())
- sentenceDelimiter = QRegExp(sentenceDelimiters[appId]);
+ sentenceDelimiter = TQRegExp(sentenceDelimiters[appId]);
else
- sentenceDelimiter = QRegExp("([\\.\\?\\!\\:\\;]\\s)|(\\n *\\n)");
- QString temp = text;
+ sentenceDelimiter = TQRegExp("([\\.\\?\\!\\:\\;]\\s)|(\\n *\\n)");
+ TQString temp = text;
// Replace spaces, tabs, and formfeeds with a single space.
- temp.replace(QRegExp("[ \\t\\f]+"), " ");
+ temp.replace(TQRegExp("[ \\t\\f]+"), " ");
// Replace sentence delimiters with tab.
temp.replace(sentenceDelimiter, "\\1\t");
// Replace remaining newlines with spaces.
temp.replace("\n"," ");
temp.replace("\r"," ");
// Remove leading spaces.
- temp.replace(QRegExp("\\t +"), "\t");
+ temp.replace(TQRegExp("\\t +"), "\t");
// Remove trailing spaces.
- temp.replace(QRegExp(" +\\t"), "\t");
+ temp.replace(TQRegExp(" +\\t"), "\t");
// Remove blank lines.
- temp.replace(QRegExp("\t\t+"),"\t");
+ temp.replace(TQRegExp("\t\t+"),"\t");
// Split into sentences.
- QStringList tempList = QStringList::split("\t", temp, false);
+ TQStringList tempList = TQStringList::split("\t", temp, false);
-// for ( QStringList::Iterator it = tempList.begin(); it != tempList.end(); ++it ) {
+// for ( TQStringList::Iterator it = tempList.begin(); it != tempList.end(); ++it ) {
// kdDebug() << "'" << *it << "'" << endl;
// }
return tempList;
@@ -453,7 +453,7 @@ QStringList SpeechData::parseText(const QString &text, const QCString &appId /*=
/**
* Queues a text job.
*/
-uint SpeechData::setText( const QString &text, const QString &talker, const QCString &appId)
+uint SpeechData::setText( const TQString &text, const TQString &talker, const TQCString &appId)
{
// kdDebug() << "Running: SpeechData::setText" << endl;
mlJob* job = new mlJob;
@@ -467,14 +467,14 @@ uint SpeechData::setText( const QString &text, const QString &talker, const QCSt
job->seq = 0;
job->partCount = 1;
#if NO_FILTERS
- QStringList tempList = parseText(text, appId);
+ TQStringList tempList = parseText(text, appId);
job->sentences = tempList;
job->partSeqNums.append(tempList.count());
textJobs.append(job);
emit textSet(appId, jobNum);
#else
- job->sentences = QStringList();
- job->partSeqNums = QValueList<int>();
+ job->sentences = TQStringList();
+ job->partSeqNums = TQValueList<int>();
textJobs.append(job);
startJobFiltering(job, text, false);
#endif
@@ -497,7 +497,7 @@ uint SpeechData::setText( const QString &text, const QString &talker, const QCSt
* @see setText.
* @see startText.
*/
-int SpeechData::appendText(const QString &text, const uint jobNum, const QCString& /*appId*/)
+int SpeechData::appendText(const TQString &text, const uint jobNum, const TQCString& /*appId*/)
{
// kdDebug() << "Running: SpeechData::appendText" << endl;
int newPartNum = 0;
@@ -506,7 +506,7 @@ int SpeechData::appendText(const QString &text, const uint jobNum, const QCStrin
{
job->partCount++;
#if NO_FILTERS
- QStringList tempList = parseText(text, appId);
+ TQStringList tempList = parseText(text, appId);
int sentenceCount = job->sentences.count();
job->sentences += tempList;
job->partSeqNums.append(sentenceCount + tempList.count());
@@ -528,13 +528,13 @@ int SpeechData::appendText(const QString &text, const uint jobNum, const QCStrin
* If appId is NULL, returns the last job in the queue.
* Does not change textJobs.current().
*/
-mlJob* SpeechData::findLastJobByAppId(const QCString& appId)
+mlJob* SpeechData::findLastJobByAppId(const TQCString& appId)
{
if (appId == NULL)
return textJobs.getLast();
else
{
- QPtrListIterator<mlJob> it(textJobs);
+ TQPtrListIterator<mlJob> it(textJobs);
for (it.toLast() ; it.current(); --it )
{
if (it.current()->appId == appId)
@@ -555,7 +555,7 @@ mlJob* SpeechData::findLastJobByAppId(const QCString& appId)
* If appId is NULL, returns the last job in the queue.
* Does not change textJobs.current().
*/
-mlJob* SpeechData::findAJobByAppId(const QCString& appId)
+mlJob* SpeechData::findAJobByAppId(const TQCString& appId)
{
mlJob* job = findLastJobByAppId(appId);
// if (!job) job = textJobs.getLast();
@@ -571,7 +571,7 @@ mlJob* SpeechData::findAJobByAppId(const QCString& appId)
* If appId is NULL, returns the Job Number of the last job in the queue.
* Does not change textJobs.current().
*/
-uint SpeechData::findAJobNumByAppId(const QCString& appId)
+uint SpeechData::findAJobNumByAppId(const TQCString& appId)
{
mlJob* job = findAJobByAppId(appId);
if (job)
@@ -588,7 +588,7 @@ uint SpeechData::findAJobNumByAppId(const QCString& appId)
*/
mlJob* SpeechData::findJobByJobNum(const uint jobNum)
{
- QPtrListIterator<mlJob> it(textJobs);
+ TQPtrListIterator<mlJob> it(textJobs);
for ( ; it.current(); ++it )
{
if (it.current()->jobNum == jobNum)
@@ -606,9 +606,9 @@ mlJob* SpeechData::findJobByJobNum(const uint jobNum)
* If no such job, returns "".
* Does not change textJobs.current().
*/
-QCString SpeechData::getAppIdByJobNum(const uint jobNum)
+TQCString SpeechData::getAppIdByJobNum(const uint jobNum)
{
- QCString appId;
+ TQCString appId;
mlJob* job = findJobByJobNum(jobNum);
if (job) appId = job->appId;
return appId;
@@ -630,14 +630,14 @@ void SpeechData::removeText(const uint jobNum)
{
// kdDebug() << "Running: SpeechData::removeText" << endl;
uint removeJobNum = 0;
- QCString removeAppId; // The appId of the removed (and stopped) job.
+ TQCString removeAppId; // The appId of the removed (and stopped) job.
mlJob* removeJob = findJobByJobNum(jobNum);
if (removeJob)
{
removeAppId = removeJob->appId;
removeJobNum = removeJob->jobNum;
// If filtering on the job, cancel it.
- QPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
+ TQPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
for ( ; it.current(); ++it ) {
PooledFilterMgr* pooledFilterMgr = it.current();
if (pooledFilterMgr->job && (pooledFilterMgr->job->jobNum == removeJobNum))
@@ -695,8 +695,8 @@ int SpeechData::getJobPartNumFromSeq(const mlJob& job, const int seq)
void SpeechData::deleteExpiredJobs(const uint finishedJobNum)
{
// Save current pointer.
- typedef QPair<QCString, uint> removedJob;
- typedef QValueList<removedJob> removedJobsList;
+ typedef QPair<TQCString, uint> removedJob;
+ typedef TQValueList<removedJob> removedJobsList;
removedJobsList removedJobs;
// Walk through jobs and delete any other finished jobs.
for (mlJob* job = textJobs.first(); (job); job = textJobs.next())
@@ -712,7 +712,7 @@ void SpeechData::deleteExpiredJobs(const uint finishedJobNum)
removedJobsList::const_iterator endRemovedJobsList(removedJobs.constEnd());
for (it = removedJobs.constBegin(); it != endRemovedJobsList ; ++it)
{
- QCString appId = (*it).first;
+ TQCString appId = (*it).first;
uint jobNum = (*it).second;
textRemoved(appId, jobNum);
}
@@ -841,7 +841,7 @@ uint SpeechData::getJobSequenceNum(const uint jobNum)
* Changing the sentence delimiter does not affect other applications.
* @see sentenceparsing
*/
-void SpeechData::setSentenceDelimiter(const QString &delimiter, const QCString appId)
+void SpeechData::setSentenceDelimiter(const TQString &delimiter, const TQCString appId)
{
sentenceDelimiters[appId] = delimiter;
}
@@ -882,14 +882,14 @@ uint SpeechData::getTextJobCount()
* Get a comma-separated list of text job numbers in the queue.
* @return Comma-separated list of text job numbers in the queue.
*/
-QString SpeechData::getTextJobNumbers()
+TQString SpeechData::getTextJobNumbers()
{
- QString jobs;
- QPtrListIterator<mlJob> it(textJobs);
+ TQString jobs;
+ TQPtrListIterator<mlJob> it(textJobs);
for ( ; it.current(); ++it )
{
if (!jobs.isEmpty()) jobs.append(",");
- jobs.append(QString::number(it.current()->jobNum));
+ jobs.append(TQString::number(it.current()->jobNum));
}
return jobs;
}
@@ -932,13 +932,13 @@ void SpeechData::setTextJobState(const uint jobNum, const KSpeech::kttsdJobState
/**
* Get information about a text job.
* @param jobNum Job number of the text job.
-* @return A QDataStream containing information about the job.
+* @return A TQDataStream containing information about the job.
* Blank if no such job.
*
* The stream contains the following elements:
* - int state Job state.
-* - QCString appId DCOP senderId of the application that requested the speech job.
-* - QString talker Language code in which to speak the text.
+* - TQCString appId DCOP senderId of the application that requested the speech job.
+* - TQString talker Language code in which to speak the text.
* - int seq Current sentence being spoken. Sentences are numbered starting at 1.
* - int sentenceCount Total number of sentences in the job.
* - int partNum Current part of the job begin spoken. Parts are numbered starting at 1.
@@ -949,11 +949,11 @@ void SpeechData::setTextJobState(const uint jobNum, const KSpeech::kttsdJobState
*
* The following sample code will decode the stream:
@verbatim
- QByteArray jobInfo = getTextJobInfo(jobNum);
- QDataStream stream(jobInfo, IO_ReadOnly);
+ TQByteArray jobInfo = getTextJobInfo(jobNum);
+ TQDataStream stream(jobInfo, IO_ReadOnly);
int state;
- QCString appId;
- QString talker;
+ TQCString appId;
+ TQString talker;
int seq;
int sentenceCount;
int partNum;
@@ -967,14 +967,14 @@ void SpeechData::setTextJobState(const uint jobNum, const KSpeech::kttsdJobState
stream >> partCount;
@endverbatim
*/
-QByteArray SpeechData::getTextJobInfo(const uint jobNum)
+TQByteArray SpeechData::getTextJobInfo(const uint jobNum)
{
mlJob* job = findJobByJobNum(jobNum);
- QByteArray temp;
+ TQByteArray temp;
if (job)
{
waitJobFiltering(job);
- QDataStream stream(temp, IO_WriteOnly);
+ TQDataStream stream(temp, IO_WriteOnly);
stream << job->state;
stream << job->appId;
stream << job->talker;
@@ -993,10 +993,10 @@ QByteArray SpeechData::getTextJobInfo(const uint jobNum)
* @return The specified sentence in the specified job. If no such
* job or sentence, returns "".
*/
-QString SpeechData::getTextJobSentence(const uint jobNum, const uint seq /*=1*/)
+TQString SpeechData::getTextJobSentence(const uint jobNum, const uint seq /*=1*/)
{
mlJob* job = findJobByJobNum(jobNum);
- QString temp;
+ TQString temp;
if (job)
{
waitJobFiltering(job);
@@ -1015,7 +1015,7 @@ QString SpeechData::getTextJobSentence(const uint jobNum, const uint seq /*=1*/)
* If no plugin has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
-void SpeechData::changeTextTalker(const QString &talker, uint jobNum)
+void SpeechData::changeTextTalker(const TQString &talker, uint jobNum)
{
mlJob* job = findJobByJobNum(jobNum);
if (job) job->talker = talker;
@@ -1110,7 +1110,7 @@ uint SpeechData::moveRelTextSentence(const int n, const uint jobNum /*=0*/)
/**
* Assigns a FilterMgr to a job and starts filtering on it.
*/
-void SpeechData::startJobFiltering(mlJob* job, const QString& text, bool noSBD)
+void SpeechData::startJobFiltering(mlJob* job, const TQString& text, bool noSBD)
{
uint jobNum = job->jobNum;
int partNum = job->partCount;
@@ -1118,7 +1118,7 @@ void SpeechData::startJobFiltering(mlJob* job, const QString& text, bool noSBD)
// Find an idle FilterMgr, if any.
// If filtering is already in progress for this job and part, do nothing.
PooledFilterMgr* pooledFilterMgr = 0;
- QPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
+ TQPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
for( ; it.current(); ++it )
{
if (it.current()->busy) {
@@ -1136,8 +1136,8 @@ void SpeechData::startJobFiltering(mlJob* job, const QString& text, bool noSBD)
filterMgr->init(config, "General");
pooledFilterMgr->filterMgr = filterMgr;
// Connect signals from FilterMgr.
- connect (filterMgr, SIGNAL(filteringFinished()), this, SLOT(slotFilterMgrFinished()));
- connect (filterMgr, SIGNAL(filteringStopped()), this, SLOT(slotFilterMgrStopped()));
+ connect (filterMgr, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotFilterMgrFinished()));
+ connect (filterMgr, TQT_SIGNAL(filteringStopped()), this, TQT_SLOT(slotFilterMgrStopped()));
m_pooledFilterMgrs.append(pooledFilterMgr);
}
// else kdDebug() << "SpeechData::startJobFiltering: re-using idle pooledFilterMgr for job " << jobNum << " part " << partNum << endl;
@@ -1166,7 +1166,7 @@ void SpeechData::waitJobFiltering(const mlJob* job)
#endif
uint jobNum = job->jobNum;
bool waited = false;
- QPtrListIterator<PooledFilterMgr> it(m_pooledFilterMgrs);
+ TQPtrListIterator<PooledFilterMgr> it(m_pooledFilterMgrs);
for ( ; it.current(); ++it )
{
PooledFilterMgr* pooledFilterMgr = it.current();
@@ -1198,7 +1198,7 @@ void SpeechData::doFiltering()
while (again)
{
again = false;
- QPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
+ TQPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
for( ; it.current(); ++it )
{
PooledFilterMgr* pooledFilterMgr = it.current();
@@ -1216,7 +1216,7 @@ void SpeechData::doFiltering()
{
pooledFilterMgr->busy = false;
// Retrieve text from FilterMgr.
- QString text = filterMgr->getOutput();
+ TQString text = filterMgr->getOutput();
// kdDebug() << "SpeechData::doFiltering: text.left(500) = " << text.left(500) << endl;
filterMgr->ackFinished();
// Convert the TalkerCode back into string.
@@ -1231,7 +1231,7 @@ void SpeechData::doFiltering()
// Split the text into sentences and store in the job.
// The SBD plugin does all the real sentence parsing, inserting tabs at each
// sentence boundary.
- QStringList sentences = QStringList::split("\t", text, false);
+ TQStringList sentences = TQStringList::split("\t", text, false);
int sentenceCount = job->sentences.count();
job->sentences += sentences;
job->partSeqNums.append(sentenceCount + sentences.count());
diff --git a/kttsd/kttsd/speechdata.h b/kttsd/kttsd/speechdata.h
index 40294bf..5f5b92a 100644
--- a/kttsd/kttsd/speechdata.h
+++ b/kttsd/kttsd/speechdata.h
@@ -26,11 +26,11 @@
#define _SPEECHDATA_H_
// Qt includes.
-#include <qptrqueue.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqptrqueue.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
// KDE includes.
#include <kconfig.h>
@@ -48,9 +48,9 @@ class TalkerMgr;
* the ID of the application that requested it be spoken, and a sequence number.
*/
struct mlText{
- QString talker; /* Requested Talker code for the sentence. */
- QString text; /* Text of sentence. */
- QCString appId; /* DCOP senderId of the application that requested the speech. */
+ TQString talker; /* Requested Talker code for the sentence. */
+ TQString text; /* Text of sentence. */
+ TQCString appId; /* DCOP senderId of the application that requested the speech. */
uint jobNum; /* Text jobNum. Only applies to text messages; not warning and messages. */
uint seq; /* Sequence number. */
};
@@ -61,11 +61,11 @@ struct mlText{
struct mlJob {
uint jobNum; /* Job number. */
KSpeech::kttsdJobState state; /* Job state. */
- QCString appId; /* DCOP senderId of the application that requested the speech job. */
- QString talker; /* Requested Talker code in which to speak the text. */
+ TQCString appId; /* DCOP senderId of the application that requested the speech job. */
+ TQString talker; /* Requested Talker code in which to speak the text. */
int seq; /* Current sentence being spoken. */
- QValueList<int> partSeqNums; /* List containing last sequence number for each part of a job. */
- QStringList sentences; /* List of sentences in the job. */
+ TQValueList<int> partSeqNums; /* List containing last sequence number for each part of a job. */
+ TQStringList sentences; /* List of sentences in the job. */
int partCount; /* Number of parts in the job. */
};
@@ -84,21 +84,21 @@ struct PooledFilterMgr {
* Struct used to keep notification options.
*/
struct NotifyOptions {
- QString eventName;
+ TQString eventName;
int action;
- QString talker;
- QString customMsg;
+ TQString talker;
+ TQString customMsg;
};
/**
* A list of notification options for a single app, indexed by event.
*/
-typedef QMap<QString, NotifyOptions> NotifyEventMap;
+typedef TQMap<TQString, NotifyOptions> NotifyEventMap;
/**
* A list of notification event maps for all apps, indexed by app.
*/
-typedef QMap<QString, NotifyEventMap> NotifyAppMap;
+typedef TQMap<TQString, NotifyEventMap> NotifyAppMap;
/**
* SpeechData class which is in charge of maintaining all the data on the memory.
@@ -108,7 +108,7 @@ typedef QMap<QString, NotifyEventMap> NotifyAppMap;
* (dcop service) and the Speaker class (speaker, loads plug ins, call plug in
* functions)
*/
-class SpeechData : public QObject {
+class SpeechData : public TQObject {
Q_OBJECT
public:
@@ -142,8 +142,8 @@ class SpeechData : public QObject {
* If an existing Screen Reader output is in progress, it is stopped and discarded and
* replaced with this new message.
*/
- void setScreenReaderOutput(const QString &msg, const QString &talker,
- const QCString& appId);
+ void setScreenReaderOutput(const TQString &msg, const TQString &talker,
+ const TQCString& appId);
/**
* Given an appId, returns the last (most recently queued) Job Number with that appId,
@@ -154,7 +154,7 @@ class SpeechData : public QObject {
* If appId is NULL, returns the Job Number of the last job in the queue.
* Does not change textJobs.current().
*/
- uint findAJobNumByAppId(const QCString& appId);
+ uint findAJobNumByAppId(const TQCString& appId);
/**
* Retrieves the Screen Reader Output.
@@ -169,8 +169,8 @@ class SpeechData : public QObject {
/**
* Add a new warning to the queue.
*/
- void enqueueWarning( const QString &, const QString &talker,
- const QCString& appId);
+ void enqueueWarning( const TQString &, const TQString &talker,
+ const TQCString& appId);
/**
* Pop (get and erase) a warning from the queue.
@@ -188,8 +188,8 @@ class SpeechData : public QObject {
/**
* Add a new message to the queue.
*/
- void enqueueMessage( const QString &, const QString &talker,
- const QCString&);
+ void enqueueMessage( const TQString &, const TQString &talker,
+ const TQCString&);
/**
* Pop (get and erase) a message from the queue.
@@ -219,7 +219,7 @@ class SpeechData : public QObject {
* Changing the sentence delimiter does not affect other applications.
* @see sentenceparsing
*/
- void setSentenceDelimiter(const QString &delimiter, const QCString appId);
+ void setSentenceDelimiter(const TQString &delimiter, const TQCString appId);
/* The following methods correspond to the methods in KSpeech interface. */
@@ -239,7 +239,7 @@ class SpeechData : public QObject {
* job is the first speakable job in the queue, speaking will begin.
* @see startText.
*/
- uint setText(const QString &text, const QString &talker, const QCString& appId);
+ uint setText(const TQString &text, const TQString &talker, const TQCString& appId);
/**
* Adds another part to a text job. Does not start speaking the text.
@@ -255,7 +255,7 @@ class SpeechData : public QObject {
* @see setText.
* @see startText.
*/
- int appendText(const QString &text, const uint jobNum, const QCString& appId);
+ int appendText(const TQString &text, const uint jobNum, const TQCString& appId);
/**
* Get the number of sentences in a text job.
@@ -279,7 +279,7 @@ class SpeechData : public QObject {
* Get a comma-separated list of text job numbers in the queue.
* @return Comma-separated list of text job numbers in the queue.
*/
- QString getTextJobNumbers();
+ TQString getTextJobNumbers();
/**
* Get the state of a text job.
@@ -300,13 +300,13 @@ class SpeechData : public QObject {
/**
* Get information about a text job.
* @param jobNum Job number of the text job.
- * @return A QDataStream containing information about the job.
+ * @return A TQDataStream containing information about the job.
* Blank if no such job.
*
* The stream contains the following elements:
* - int state Job state.
- * - QCString appId DCOP senderId of the application that requested the speech job.
- * - QString talker Talker code as requested by application.
+ * - TQCString appId DCOP senderId of the application that requested the speech job.
+ * - TQString talker Talker code as requested by application.
* - int seq Current sentence being spoken. Sentences are numbered starting at 1.
* - int sentenceCount Total number of sentences in the job.
* - int partNum Current part of the job begin spoken. Parts are numbered starting at 1.
@@ -317,11 +317,11 @@ class SpeechData : public QObject {
*
* The following sample code will decode the stream:
@verbatim
- QByteArray jobInfo = getTextJobInfo(jobNum);
- QDataStream stream(jobInfo, IO_ReadOnly);
+ TQByteArray jobInfo = getTextJobInfo(jobNum);
+ TQDataStream stream(jobInfo, IO_ReadOnly);
int state;
- QCString appId;
- QString talker;
+ TQCString appId;
+ TQString talker;
int seq;
int sentenceCount;
int partNum;
@@ -335,7 +335,7 @@ class SpeechData : public QObject {
stream >> partCount;
@endverbatim
*/
- QByteArray getTextJobInfo(const uint jobNum);
+ TQByteArray getTextJobInfo(const uint jobNum);
/**
* Return a sentence of a job.
@@ -344,7 +344,7 @@ class SpeechData : public QObject {
* @return The specified sentence in the specified job. If no such
* job or sentence, returns "".
*/
- QString getTextJobSentence(const uint jobNum, const uint seq=1);
+ TQString getTextJobSentence(const uint jobNum, const uint seq=1);
/**
* Remove a text job from the queue.
@@ -363,7 +363,7 @@ class SpeechData : public QObject {
* If no plugin has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
- void changeTextTalker(const QString &talker, uint jobNum);
+ void changeTextTalker(const TQString &talker, uint jobNum);
/**
* Move a text job down in the queue so that it is spoken later.
@@ -451,7 +451,7 @@ class SpeechData : public QObject {
* If no such job, returns "".
* Does not change textJobs.current().
*/
- QCString getAppIdByJobNum(const uint jobNum);
+ TQCString getAppIdByJobNum(const uint jobNum);
/**
* Sets pointer to the TalkerMgr object.
@@ -463,7 +463,7 @@ class SpeechData : public QObject {
/**
* Text pre message
*/
- QString textPreMsg;
+ TQString textPreMsg;
/**
* Text pre message enabled ?
@@ -473,7 +473,7 @@ class SpeechData : public QObject {
/**
* Text pre sound
*/
- QString textPreSnd;
+ TQString textPreSnd;
/**
* Text pre sound enabled ?
@@ -483,7 +483,7 @@ class SpeechData : public QObject {
/**
* Text post message
*/
- QString textPostMsg;
+ TQString textPostMsg;
/**
* Text post message enabled ?
@@ -493,7 +493,7 @@ class SpeechData : public QObject {
/**
* Text post sound
*/
- QString textPostSnd;
+ TQString textPostSnd;
/**
* Text post sound enabled ?
@@ -503,7 +503,7 @@ class SpeechData : public QObject {
/**
* Paragraph pre message
*/
- QString parPreMsg;
+ TQString parPreMsg;
/**
* Paragraph pre message enabled ?
@@ -513,7 +513,7 @@ class SpeechData : public QObject {
/**
* Paragraph pre sound
*/
- QString parPreSnd;
+ TQString parPreSnd;
/**
* Paragraph pre sound enabled ?
@@ -523,7 +523,7 @@ class SpeechData : public QObject {
/**
* Paragraph post message
*/
- QString parPostMsg;
+ TQString parPostMsg;
/**
* Paragraph post message enabled ?
@@ -533,7 +533,7 @@ class SpeechData : public QObject {
/**
* Paragraph post sound
*/
- QString parPostSnd;
+ TQString parPostSnd;
/**
* Paragraph post sound enabled ?
@@ -544,7 +544,7 @@ class SpeechData : public QObject {
* Keep audio files. Do not delete generated tmp wav files.
*/
bool keepAudio;
- QString keepAudioPath;
+ TQString keepAudioPath;
/**
* Notification settings.
@@ -581,7 +581,7 @@ class SpeechData : public QObject {
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textSet(const QCString& appId, const uint jobNum);
+ void textSet(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted whenever a new part is appended to a text job.
@@ -590,7 +590,7 @@ class SpeechData : public QObject {
* @param partNum Part number of the new part. Parts are numbered starting
* at 1.
*/
- void textAppended(const QCString& appId, const uint jobNum, const int partNum);
+ void textAppended(const TQCString& appId, const uint jobNum, const int partNum);
/**
* This signal is emitted whenever a text job is deleted from the queue.
@@ -598,7 +598,7 @@ class SpeechData : public QObject {
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textRemoved(const QCString& appId, const uint jobNum);
+ void textRemoved(const TQCString& appId, const uint jobNum);
private:
/**
@@ -609,17 +609,17 @@ class SpeechData : public QObject {
/**
* Queue of warnings
*/
- QPtrQueue<mlJob> warnings;
+ TQPtrQueue<mlJob> warnings;
/**
* Queue of messages
*/
- QPtrQueue<mlJob> messages;
+ TQPtrQueue<mlJob> messages;
/**
* Queue of text jobs.
*/
- QPtrList<mlJob> textJobs;
+ TQPtrList<mlJob> textJobs;
/**
* TalkerMgr object local pointer.
@@ -629,7 +629,7 @@ class SpeechData : public QObject {
/**
* Pool of FilterMgrs.
*/
- QPtrList<PooledFilterMgr> m_pooledFilterMgrs;
+ TQPtrList<PooledFilterMgr> m_pooledFilterMgrs;
/**
* Job counter. Each new job increments this counter.
@@ -639,17 +639,17 @@ class SpeechData : public QObject {
/**
* Talker of the text
*/
- QString textTalker;
+ TQString textTalker;
/**
* Map of sentence delimiters. One per app. If none specified for an app, uses default.
*/
- QMap<QCString, QString> sentenceDelimiters;
+ TQMap<TQCString, TQString> sentenceDelimiters;
/**
* Determines whether the given text is SSML markup.
*/
- bool isSsml(const QString &text);
+ bool isSsml(const TQString &text);
/**
* Given an appId, returns the last (most recently queued) job with that appId.
@@ -659,7 +659,7 @@ class SpeechData : public QObject {
* If appId is NULL, returns the last job in the queue.
* Does not change textJobs.current().
*/
- mlJob* findLastJobByAppId(const QCString& appId);
+ mlJob* findLastJobByAppId(const TQCString& appId);
/**
* Given an appId, returns the last (most recently queued) job with that appId,
@@ -670,7 +670,7 @@ class SpeechData : public QObject {
* If appId is NULL, returns the last job in the queue.
* Does not change textJobs.current().
*/
- mlJob* findAJobByAppId(const QCString& appId);
+ mlJob* findAJobByAppId(const TQCString& appId);
/**
* Given a job and a sequence number, returns the part that sentence is in.
@@ -690,7 +690,7 @@ class SpeechData : public QObject {
* @return List of parsed sentences.
*/
- QStringList parseText(const QString &text, const QCString &appId);
+ TQStringList parseText(const TQString &text, const TQCString &appId);
/**
* Delete expired jobs. At most, one finished job is kept on the queue.
@@ -703,7 +703,7 @@ class SpeechData : public QObject {
/**
* Assigns a FilterMgr to a job and starts filtering on it.
*/
- void startJobFiltering(mlJob* job, const QString& text, bool noSBD);
+ void startJobFiltering(mlJob* job, const TQString& text, bool noSBD);
/**
* Waits for filtering to be completed on a job.
@@ -721,7 +721,7 @@ class SpeechData : public QObject {
/**
* Loads notify events from a file. Clearing data if clear is True.
*/
- void loadNotifyEventsFromFile( const QString& filename, bool clear);
+ void loadNotifyEventsFromFile( const TQString& filename, bool clear);
private slots:
void slotFilterMgrFinished();
diff --git a/kttsd/kttsd/ssmlconvert.cpp b/kttsd/kttsd/ssmlconvert.cpp
index 521a9a6..d33eaf3 100644
--- a/kttsd/kttsd/ssmlconvert.cpp
+++ b/kttsd/kttsd/ssmlconvert.cpp
@@ -20,11 +20,11 @@
***************************************************************************/
// Qt includes.
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
// KDE includes.
#include <kdeversion.h>
@@ -39,13 +39,13 @@
/// Constructor.
SSMLConvert::SSMLConvert() {
- m_talkers = QStringList();
+ m_talkers = TQStringList();
m_xsltProc = 0;
m_state = tsIdle;
}
/// Constructor. Set the talkers to be used as reference for entered text.
-SSMLConvert::SSMLConvert(const QStringList &talkers) {
+SSMLConvert::SSMLConvert(const TQStringList &talkers) {
m_talkers = talkers;
m_xsltProc = 0;
m_state = tsIdle;
@@ -54,17 +54,17 @@ SSMLConvert::SSMLConvert(const QStringList &talkers) {
/// Destructor.
SSMLConvert::~SSMLConvert() {
delete m_xsltProc;
- if (!m_inFilename.isEmpty()) QFile::remove(m_inFilename);
- if (!m_outFilename.isEmpty()) QFile::remove(m_outFilename);
+ if (!m_inFilename.isEmpty()) TQFile::remove(m_inFilename);
+ if (!m_outFilename.isEmpty()) TQFile::remove(m_outFilename);
}
/// Set the talkers to be used as reference for entered text.
-void SSMLConvert::setTalkers(const QStringList &talkers) {
+void SSMLConvert::setTalkers(const TQStringList &talkers) {
m_talkers = talkers;
}
-QString SSMLConvert::extractTalker(const QString &talkercode) {
- QString t = talkercode.section("synthesizer=", 1, 1);
+TQString SSMLConvert::extractTalker(const TQString &talkercode) {
+ TQString t = talkercode.section("synthesizer=", 1, 1);
t = t.section('"', 1, 1);
if(t.contains("flite"))
return "flite";
@@ -103,17 +103,17 @@ QString SSMLConvert::extractTalker(const QString &talkercode) {
*
* QDom is the item of choice for the matching. Just walk the tree..
*/
-QString SSMLConvert::appropriateTalker(const QString &text) const {
- QDomDocument ssml;
+TQString SSMLConvert::appropriateTalker(const TQString &text) const {
+ TQDomDocument ssml;
ssml.setContent(text, false); // No namespace processing.
/// Matches are stored here. Obviously to begin with every talker matches.
- QStringList matches = m_talkers;
+ TQStringList matches = m_talkers;
/// Check that this is (well formed) SSML and all our searching will not be in vain.
- QDomElement root = ssml.documentElement();
+ TQDomElement root = ssml.documentElement();
if(root.tagName() != "speak") {
// Not SSML.
- return QString::null;
+ return TQString::null;
}
/**
@@ -122,14 +122,14 @@ QString SSMLConvert::appropriateTalker(const QString &text) const {
*
* Storage for talker code components.
*/
- QString talklang, talkvoice, talkgender, talkvolume, talkrate, talkname;
+ TQString talklang, talkvoice, talkgender, talkvolume, talkrate, talkname;
kdDebug() << "SSMLConvert::appropriateTalker: BEFORE LANGUAGE SEARCH: " << matches.join(" ") << endl;;
/**
* Language searching
*/
if(root.hasAttribute("xml:lang")) {
- QString lang = root.attribute("xml:lang");
+ TQString lang = root.attribute("xml:lang");
kdDebug() << "SSMLConvert::appropriateTalker: xml:lang found (" << lang << ")" << endl;
/// If it is set to en*, then match all english speakers. They all sound the same anyways.
if(lang.contains("en-")) {
@@ -153,7 +153,7 @@ QString SSMLConvert::appropriateTalker(const QString &text) const {
* ignore the choice and just use female.
*/
if(root.hasAttribute("gender")) {
- QString gender = root.attribute("gender");
+ TQString gender = root.attribute("gender");
kdDebug() << "SSMLConvert::appropriateTalker: gender found (" << gender << ")" << endl;
/// If the gender found is not 'male' or 'female' then ignore it.
if(!(gender == "male" || gender == "female")) {
@@ -178,7 +178,7 @@ QString SSMLConvert::appropriateTalker(const QString &text) const {
matches.grep("synthesizer=\"Hadifix").count() >= 1) {
kdDebug() << "SSMLConvert::appropriateTalker: Prosody allowed" << endl;
- QStringList tmpmatches = matches.grep("synthesizer=\"Festival Interactive");
+ TQStringList tmpmatches = matches.grep("synthesizer=\"Festival Interactive");
matches = matches.grep("synthesizer=\"Hadifix");
matches = tmpmatches + matches;
}
@@ -203,12 +203,12 @@ QString SSMLConvert::appropriateTalker(const QString &text) const {
* the transformed text.
*/
-bool SSMLConvert::transform(const QString &text, const QString &xsltFilename) {
+bool SSMLConvert::transform(const TQString &text, const TQString &xsltFilename) {
m_xsltFilename = xsltFilename;
/// Write @param text to a temporary file.
KTempFile inFile(locateLocal("tmp", "kttsd-"), ".ssml");
m_inFilename = inFile.file()->name();
- QTextStream* wstream = inFile.textStream();
+ TQTextStream* wstream = inFile.textStream();
if (wstream == 0) {
/// wtf...
kdDebug() << "SSMLConvert::transform: Can't write to " << m_inFilename << endl;;
@@ -239,8 +239,8 @@ bool SSMLConvert::transform(const QString &text, const QString &xsltFilename) {
// kdDebug() << "SSMLConvert::transform: executing command: " <<
// m_xsltProc->args() << endl;
- connect(m_xsltProc, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotProcessExited(KProcess*)));
+ connect(m_xsltProc, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(slotProcessExited(KProcess*)));
if (!m_xsltProc->start(KProcess::NotifyOnExit, KProcess::NoCommunication))
{
kdDebug() << "SSMLConvert::transform: Error starting xsltproc" << endl;
@@ -266,26 +266,26 @@ int SSMLConvert::getState() { return m_state; }
/**
* Returns the output from call to transform.
*/
-QString SSMLConvert::getOutput()
+TQString SSMLConvert::getOutput()
{
/// Read back the data that was written to /tmp/fileName.output.
- QFile readfile(m_outFilename);
+ TQFile readfile(m_outFilename);
if(!readfile.open(IO_ReadOnly)) {
/// uhh yeah... Issues writing to the SSML file.
kdDebug() << "SSMLConvert::slotProcessExited: Could not read file " << m_outFilename << endl;
- return QString::null;
+ return TQString::null;
}
- QTextStream rstream(&readfile);
- QString convertedData = rstream.read();
+ TQTextStream rstream(&readfile);
+ TQString convertedData = rstream.read();
readfile.close();
// kdDebug() << "SSMLConvert::slotProcessExited: Read SSML file at " + m_inFilename + " and created " + m_outFilename + " based on the stylesheet at " << m_xsltFilename << endl;
// Clean up.
- QFile::remove(m_inFilename);
- m_inFilename = QString::null;
- QFile::remove(m_outFilename);
- m_outFilename = QString::null;
+ TQFile::remove(m_inFilename);
+ m_inFilename = TQString::null;
+ TQFile::remove(m_outFilename);
+ m_outFilename = TQString::null;
// Ready for another transform.
m_state = tsIdle;
diff --git a/kttsd/kttsd/ssmlconvert.h b/kttsd/kttsd/ssmlconvert.h
index 1ee332c..b9f57bf 100644
--- a/kttsd/kttsd/ssmlconvert.h
+++ b/kttsd/kttsd/ssmlconvert.h
@@ -24,25 +24,25 @@
/**
* SsmlConvert class:
- * Receives a QStringList of talkers and, based on that information,
+ * Receives a TQStringList of talkers and, based on that information,
* evaluates received SSML to discover which of the given talkers best
* suits it. It can then convert the given SSML into a format understandable
* by the talker.
*/
// Qt includes
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class KProcess;
class QString;
-class SSMLConvert : public QObject {
+class SSMLConvert : public TQObject {
Q_OBJECT
public:
/** Constructors */
SSMLConvert();
- SSMLConvert(const QStringList &talkers);
+ SSMLConvert(const TQStringList &talkers);
/** Destructor */
virtual ~SSMLConvert();
@@ -56,19 +56,19 @@ public:
* Set the talker codes to be used.
* @param talkers talker codes to be used.
*/
- void setTalkers(const QStringList &talkers);
+ void setTalkers(const TQStringList &talkers);
/**
* Extract the synth name from a talker code (i.e festival, flite, freetts).
* @param talkercode the talker code to extract the talker from.
* @returns the talker.
*/
- QString extractTalker(const QString &talkercode);
+ TQString extractTalker(const TQString &talkercode);
/**
* Returns the most appropriate talker for the text to synth's talker code.
* @param text the text that will be parsed.
- * @returns the appropriate talker for the job as a talker code QString.
+ * @returns the appropriate talker for the job as a talker code TQString.
*
* The appropriate talker is the one that has the most features that are required in some
* SSML markup. In the future i'm hoping to make the importance of individual features
@@ -79,7 +79,7 @@ public:
*
* See the implementation file for more detail.
*/
- QString appropriateTalker(const QString &text) const;
+ TQString appropriateTalker(const TQString &text) const;
/**
* Applies the spreadsheet for a talker to the SSML and returns the talker-native output.
@@ -90,7 +90,7 @@ public:
* This converts a piece of SSML into a format the given talker can understand. It applies
* an XSLT spreadsheet to the SSML and returns the output.
*/
- bool transform(const QString &text, const QString &xsltFilename);
+ bool transform(const TQString &text, const TQString &xsltFilename);
/**
* Returns current processing state.
@@ -100,7 +100,7 @@ public:
/**
* Returns the output from call to transform.
*/
- QString getOutput();
+ TQString getOutput();
signals:
/**
@@ -115,15 +115,15 @@ private:
/// The XSLT processor.
KProcess *m_xsltProc;
/// Current talkers.
- QStringList m_talkers;
+ TQStringList m_talkers;
// Current state.
int m_state;
// Name of XSLT file.
- QString m_xsltFilename;
+ TQString m_xsltFilename;
// Name of temporary input file.
- QString m_inFilename;
+ TQString m_inFilename;
// Name of temporary output file.
- QString m_outFilename;
+ TQString m_outFilename;
};
#endif // _SSMLCONVERT_H_
diff --git a/kttsd/kttsd/talkermgr.cpp b/kttsd/kttsd/talkermgr.cpp
index 345f12b..f10281c 100644
--- a/kttsd/kttsd/talkermgr.cpp
+++ b/kttsd/kttsd/talkermgr.cpp
@@ -37,8 +37,8 @@
/**
* Constructor.
*/
-TalkerMgr::TalkerMgr(QObject *parent, const char *name) :
- QObject( parent, name )
+TalkerMgr::TalkerMgr(TQObject *parent, const char *name) :
+ TQObject( parent, name )
{
m_loadedPlugIns.setAutoDelete(true);
}
@@ -66,23 +66,23 @@ int TalkerMgr::loadPlugIns(KConfig* config)
m_loadedTalkerIds.clear();
config->setGroup("General");
- QStringList talkerIDsList = config->readListEntry("TalkerIDs", ',');
+ TQStringList talkerIDsList = config->readListEntry("TalkerIDs", ',');
if (!talkerIDsList.isEmpty())
{
KLibFactory *factory;
- QStringList::ConstIterator itEnd(talkerIDsList.constEnd());
- for( QStringList::ConstIterator it = talkerIDsList.constBegin(); it != itEnd; ++it )
+ TQStringList::ConstIterator itEnd(talkerIDsList.constEnd());
+ for( TQStringList::ConstIterator it = talkerIDsList.constBegin(); it != itEnd; ++it )
{
// kdDebug() << "Loading plugInProc for Talker ID " << *it << endl;
// Talker ID.
- QString talkerID = *it;
+ TQString talkerID = *it;
// Set the group for the language we're loading
config->setGroup("Talker_" + talkerID);
// Get the DesktopEntryName of the plugin we will try to load.
- QString desktopEntryName = config->readEntry("DesktopEntryName", QString::null);
+ TQString desktopEntryName = config->readEntry("DesktopEntryName", TQString::null);
// If a DesktopEntryName is not in the config file, it was configured before
// we started using them, when we stored translated plugin names instead.
@@ -91,7 +91,7 @@ int TalkerMgr::loadPlugIns(KConfig* config)
// and DesktopEntryName won't change.
if (desktopEntryName.isEmpty())
{
- QString synthName = config->readEntry("PlugIn", QString::null);
+ TQString synthName = config->readEntry("PlugIn", TQString::null);
// See if the translated name will untranslate. If not, well, sorry.
desktopEntryName = TalkerCode::TalkerNameToDesktopEntryName(synthName);
// Record the DesktopEntryName from now on.
@@ -99,15 +99,15 @@ int TalkerMgr::loadPlugIns(KConfig* config)
}
// Get the talker code.
- QString talkerCode = config->readEntry("TalkerCode", QString::null);
+ TQString talkerCode = config->readEntry("TalkerCode", TQString::null);
// Normalize the talker code.
- QString fullLanguageCode;
+ TQString fullLanguageCode;
talkerCode = TalkerCode::normalizeTalkerCode(talkerCode, fullLanguageCode);
// Find the KTTSD SynthPlugin.
KTrader::OfferList offers = KTrader::self()->query(
- "KTTSD/SynthPlugin", QString("DesktopEntryName == '%1'").arg(desktopEntryName));
+ "KTTSD/SynthPlugin", TQString("DesktopEntryName == '%1'").arg(desktopEntryName));
if(offers.count() > 1){
++bad;
@@ -134,7 +134,7 @@ int TalkerMgr::loadPlugIns(KConfig* config)
} else {
// Synchronous plugins are run in a separate thread.
// Init will start the thread and it will immediately go to sleep.
- QString threadedPlugInName = QString::fromLatin1("threaded") + desktopEntryName;
+ TQString threadedPlugInName = TQString::fromLatin1("threaded") + desktopEntryName;
ThreadedPlugIn* speechThread = new ThreadedPlugIn(speech,
this, threadedPlugInName.latin1());
speechThread->init(config, "Talker_" + talkerCode);
@@ -172,12 +172,12 @@ int TalkerMgr::loadPlugIns(KConfig* config)
/**
* Get a list of the talkers configured in KTTS.
- * @return A QStringList of fully-specified talker codes, one
+ * @return A TQStringList of fully-specified talker codes, one
* for each talker user has configured.
*/
-QStringList TalkerMgr::getTalkers()
+TQStringList TalkerMgr::getTalkers()
{
- QStringList talkerList;
+ TQStringList talkerList;
for (int ndx = 0; ndx < int(m_loadedPlugIns.count()); ++ndx)
{
talkerList.append(m_loadedTalkerCodes[ndx].getTalkerCode());
@@ -188,7 +188,7 @@ QStringList TalkerMgr::getTalkers()
/**
* Returns a list of all the loaded plugins.
*/
-QPtrList<PlugInProc> TalkerMgr::getLoadedPlugIns()
+TQPtrList<PlugInProc> TalkerMgr::getLoadedPlugIns()
{
return m_loadedPlugIns;
}
@@ -201,7 +201,7 @@ QPtrList<PlugInProc> TalkerMgr::getLoadedPlugIns()
* If a plugin has not been loaded to match the talker, returns the default
* plugin.
*/
-int TalkerMgr::talkerToPluginIndex(const QString& talker) const
+int TalkerMgr::talkerToPluginIndex(const TQString& talker) const
{
// kdDebug() << "TalkerMgr::talkerToPluginIndex: matching talker " << talker << " to closest matching plugin." << endl;
// If we have a cached match, return that.
@@ -228,10 +228,10 @@ int TalkerMgr::talkerToPluginIndex(const QString& talker) const
* overrides all other attributes, i.e, it is treated as an automatic "top priority"
* attribute.
*/
-PlugInProc* TalkerMgr::talkerToPlugin(const QString& talker) const
+PlugInProc* TalkerMgr::talkerToPlugin(const TQString& talker) const
{
int talkerNdx = talkerToPluginIndex(talker);
- return const_cast< QPtrList<PlugInProc>* >(&m_loadedPlugIns)->at(talkerNdx);
+ return const_cast< TQPtrList<PlugInProc>* >(&m_loadedPlugIns)->at(talkerNdx);
}
/**
@@ -249,7 +249,7 @@ PlugInProc* TalkerMgr::talkerToPlugin(const QString& talker) const
* overrides all other attributes, i.e, it is treated as an automatic "top priority"
* attribute.
*/
-TalkerCode* TalkerMgr::talkerToTalkerCode(const QString& talker)
+TalkerCode* TalkerMgr::talkerToTalkerCode(const TQString& talker)
{
int talkerNdx = talkerToPluginIndex(talker);
return new TalkerCode(&m_loadedTalkerCodes[talkerNdx]);
@@ -261,7 +261,7 @@ TalkerCode* TalkerMgr::talkerToTalkerCode(const QString& talker)
* @param talkerCode Talker Code.
* @return Talker ID of the talker that would speak the text job.
*/
-QString TalkerMgr::talkerCodeToTalkerId(const QString& talkerCode)
+TQString TalkerMgr::talkerCodeToTalkerId(const TQString& talkerCode)
{
int talkerNdx = talkerToPluginIndex(talkerCode);
return m_loadedTalkerIds[talkerNdx];
@@ -274,7 +274,7 @@ QString TalkerMgr::talkerCodeToTalkerId(const QString& talkerCode)
* @see talkers
* @see getTalkers
*/
-QString TalkerMgr::userDefaultTalker() const
+TQString TalkerMgr::userDefaultTalker() const
{
return m_loadedTalkerCodes[0].getTalkerCode();
}
@@ -288,25 +288,25 @@ QString TalkerMgr::userDefaultTalker() const
* talker supports the indicated speech markup language.
* @see kttsdMarkupType
*/
-bool TalkerMgr::supportsMarkup(const QString& talker, const uint /*markupType*/) const
+bool TalkerMgr::supportsMarkup(const TQString& talker, const uint /*markupType*/) const
{
kdDebug() << "TalkerMgr::supportsMarkup: Testing talker " << talker << endl;
- QString matchingTalker = talker;
+ TQString matchingTalker = talker;
if (matchingTalker.isEmpty()) matchingTalker = userDefaultTalker();
PlugInProc* plugin = talkerToPlugin(matchingTalker);
return ( plugin->getSsmlXsltFilename() !=
KGlobal::dirs()->resourceDirs("data").last() + "kttsd/xslt/SSMLtoPlainText.xsl");
}
-bool TalkerMgr::autoconfigureTalker(const QString& langCode, KConfig* config)
+bool TalkerMgr::autoconfigureTalker(const TQString& langCode, KConfig* config)
{
// Not yet implemented.
// return false;
- QString languageCode = langCode;
+ TQString languageCode = langCode;
// Get last TalkerID from config.
- QStringList talkerIDsList = config->readListEntry("TalkerIDs", ',');
+ TQStringList talkerIDsList = config->readListEntry("TalkerIDs", ',');
int lastTalkerID = 0;
for (uint talkerIdNdx = 0; talkerIdNdx < talkerIDsList.count(); ++talkerIdNdx)
{
@@ -315,7 +315,7 @@ bool TalkerMgr::autoconfigureTalker(const QString& langCode, KConfig* config)
}
// Assign a new Talker ID for the talker. Wraps around to 1.
- QString talkerID = QString::number(lastTalkerID + 1);
+ TQString talkerID = TQString::number(lastTalkerID + 1);
// Query for all the KTTSD SynthPlugins.
KTrader::OfferList offers = KTrader::self()->query("KTTSD/SynthPlugin");
@@ -324,10 +324,10 @@ bool TalkerMgr::autoconfigureTalker(const QString& langCode, KConfig* config)
for(unsigned int i=0; i < offers.count() ; ++i)
{
// See if this plugin supports the desired language.
- QStringList languageCodes = offers[i]->property("X-KDE-Languages").toStringList();
+ TQStringList languageCodes = offers[i]->property("X-KDE-Languages").toStringList();
if (languageCodes.contains(languageCode))
{
- QString desktopEntryName = offers[i]->desktopEntryName();
+ TQString desktopEntryName = offers[i]->desktopEntryName();
// Load the plugin.
KLibFactory *factory = KLibLoader::self()->factory(offers[0]->library().latin1());
@@ -342,22 +342,22 @@ bool TalkerMgr::autoconfigureTalker(const QString& langCode, KConfig* config)
{
// Give plugin the language code and permit plugin to autoconfigure itself.
loadedTalkerPlugIn->setDesiredLanguage(languageCode);
- loadedTalkerPlugIn->load(config, QString("Talker_")+talkerID);
+ loadedTalkerPlugIn->load(config, TQString("Talker_")+talkerID);
// If plugin was able to configure itself, it returns a full talker code.
- QString talkerCode = loadedTalkerPlugIn->getTalkerCode();
+ TQString talkerCode = loadedTalkerPlugIn->getTalkerCode();
if (!talkerCode.isEmpty())
{
// Erase extraneous Talker configuration entries that might be there.
- config->deleteGroup(QString("Talker_")+talkerID);
+ config->deleteGroup(TQString("Talker_")+talkerID);
// Let plugin save its configuration.
- config->setGroup(QString("Talker_")+talkerID);
- loadedTalkerPlugIn->save(config, QString("Talker_"+talkerID));
+ config->setGroup(TQString("Talker_")+talkerID);
+ loadedTalkerPlugIn->save(config, TQString("Talker_"+talkerID));
// Record configuration data.
- config->setGroup(QString("Talker_")+talkerID);
+ config->setGroup(TQString("Talker_")+talkerID);
config->writeEntry("DesktopEntryName", desktopEntryName);
talkerCode = TalkerCode::normalizeTalkerCode(talkerCode, languageCode);
config->writeEntry("TalkerCode", talkerCode);
diff --git a/kttsd/kttsd/talkermgr.h b/kttsd/kttsd/talkermgr.h
index 5b890ae..52ddc4d 100644
--- a/kttsd/kttsd/talkermgr.h
+++ b/kttsd/kttsd/talkermgr.h
@@ -25,10 +25,10 @@
#define _TALKERMGR_H_
// Qt includes.
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
// KTTS includes.
#include "talkercode.h"
@@ -41,7 +41,7 @@ public:
/**
* Constructor.
*/
- TalkerMgr(QObject *parent = 0, const char *name = 0);
+ TalkerMgr(TQObject *parent = 0, const char *name = 0);
/**
* Destructor.
@@ -55,15 +55,15 @@ public:
/**
* Get a list of the talkers configured in KTTS.
- * @return A QStringList of fully-specified talker codes, one
+ * @return A TQStringList of fully-specified talker codes, one
* for each talker user has configured.
*/
- QStringList getTalkers();
+ TQStringList getTalkers();
/**
* Returns a list of all the loaded plugins.
*/
- QPtrList<PlugInProc> getLoadedPlugIns();
+ TQPtrList<PlugInProc> getLoadedPlugIns();
/**
* Given a talker code, returns pointer to the closest matching plugin.
@@ -73,7 +73,7 @@ public:
* If a plugin has not been loaded to match the talker, returns the default
* plugin.
*/
- int talkerToPluginIndex(const QString& talker) const;
+ int talkerToPluginIndex(const TQString& talker) const;
/**
* Given a talker code, returns pointer to the closest matching plugin.
@@ -83,7 +83,7 @@ public:
* If a plugin has not been loaded to match the talker, returns the default
* plugin.
*/
- PlugInProc* talkerToPlugin(const QString& talker) const;
+ PlugInProc* talkerToPlugin(const TQString& talker) const;
/**
* Given a talker code, returns the parsed TalkerCode of the closest matching Talker.
@@ -100,7 +100,7 @@ public:
* overrides all other attributes, i.e, it is treated as an automatic "top priority"
* attribute.
*/
- TalkerCode* talkerToTalkerCode(const QString& talker);
+ TalkerCode* talkerToTalkerCode(const TQString& talker);
/**
* Given a Talker Code, returns the Talker ID of the talker that would speak
@@ -108,7 +108,7 @@ public:
* @param talkerCode Talker Code.
* @return Talker ID of the talker that would speak the text job.
*/
- QString talkerCodeToTalkerId(const QString& talkerCode);
+ TQString talkerCodeToTalkerId(const TQString& talkerCode);
/**
* Get the user's default talker.
@@ -117,7 +117,7 @@ public:
* @see talkers
* @see getTalkers
*/
- QString userDefaultTalker() const;
+ TQString userDefaultTalker() const;
/**
* Determine whether the currently-configured speech plugin supports a speech markup language.
@@ -128,7 +128,7 @@ public:
* talker supports the indicated speech markup language.
* @see kttsdMarkupType
*/
- bool supportsMarkup(const QString& talker, const uint markupType) const;
+ bool supportsMarkup(const TQString& talker, const uint markupType) const;
/**
* Try to automatically configure a Talker in the specified language.
@@ -138,7 +138,7 @@ public:
*
* If successful, the KConfig rc file is updated but the talker has not been loaded.
*/
- bool autoconfigureTalker(const QString& langCode, KConfig* config);
+ bool autoconfigureTalker(const TQString& langCode, KConfig* config);
private:
@@ -146,14 +146,14 @@ private:
* Array of the loaded plug ins for different Talkers.
* Array of parsed Talker Codes for the plugins.
*/
- QPtrList<PlugInProc> m_loadedPlugIns;
- QStringList m_loadedTalkerIds;
+ TQPtrList<PlugInProc> m_loadedPlugIns;
+ TQStringList m_loadedTalkerIds;
TalkerCode::TalkerCodeList m_loadedTalkerCodes;
/**
* Cache of talker codes and index of closest matching Talker.
*/
- mutable QMap<QString,int> m_talkerToPlugInCache;
+ mutable TQMap<TQString,int> m_talkerToPlugInCache;
};
#endif // _TALKERMGR_H_
diff --git a/kttsd/kttsd/threadedplugin.cpp b/kttsd/kttsd/threadedplugin.cpp
index babc792..eacd598 100644
--- a/kttsd/kttsd/threadedplugin.cpp
+++ b/kttsd/kttsd/threadedplugin.cpp
@@ -21,8 +21,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
******************************************************************************/
-#include <qevent.h>
-#include <qapplication.h>
+#include <tqevent.h>
+#include <tqapplication.h>
#include <kdebug.h>
@@ -33,11 +33,11 @@
* Constructor.
*/
ThreadedPlugIn::ThreadedPlugIn(PlugInProc* plugin,
- QObject *parent /*= 0*/, const char *name /*= 0*/):
+ TQObject *parent /*= 0*/, const char *name /*= 0*/):
PlugInProc(parent, name),
- QThread(),
+ TQThread(),
m_plugin(plugin),
- m_filename(QString::null),
+ m_filename(TQString::null),
m_requestExit(false),
m_supportsSynth(false)
{
@@ -71,7 +71,7 @@ ThreadedPlugIn::~ThreadedPlugIn()
/**
* Initialize the speech plugin.
*/
-bool ThreadedPlugIn::init(KConfig *config, const QString &configGroup)
+bool ThreadedPlugIn::init(KConfig *config, const TQString &configGroup)
{
bool stat = m_plugin->init(config, configGroup);
m_supportsSynth = m_plugin->supportsSynth();
@@ -87,7 +87,7 @@ bool ThreadedPlugIn::init(KConfig *config, const QString &configGroup)
* If the plugin supports asynchronous operation, it should return immediately
* and emit sayFinished signal when synthesis and audibilizing is finished.
*/
-void ThreadedPlugIn::sayText(const QString &text)
+void ThreadedPlugIn::sayText(const TQString &text)
{
kdDebug() << "ThreadedPlugin::sayText running with text " << text << endl;
waitThreadNotBusy();
@@ -108,7 +108,7 @@ void ThreadedPlugIn::sayText(const QString &text)
* If the plugin supports asynchronous operation, it should return immediately
* and emit synthFinished signal when synthesis is completed.
*/
-void ThreadedPlugIn::synthText(const QString &text, const QString &suggestedFilename)
+void ThreadedPlugIn::synthText(const TQString &text, const TQString &suggestedFilename)
{
waitThreadNotBusy();
m_action = paSynthText;
@@ -125,7 +125,7 @@ void ThreadedPlugIn::synthText(const QString &text, const QString &suggestedFile
*
* The plugin must not re-use the filename.
*/
-QString ThreadedPlugIn::getFilename()
+TQString ThreadedPlugIn::getFilename()
{
return m_filename;
}
@@ -188,7 +188,7 @@ void ThreadedPlugIn::ackFinished()
{
// Since plugin should not be running, don't bother with Mutex here.
if (m_state == psFinished) m_state = psIdle;
- m_filename = QString::null;
+ m_filename = TQString::null;
}
/**
@@ -264,8 +264,8 @@ void ThreadedPlugIn::run()
m_stateMutex.lock();
m_state = psSynthing;
m_stateMutex.unlock();
- QString filename = m_filename;
- m_filename = QString::null;
+ TQString filename = m_filename;
+ m_filename = TQString::null;
kdDebug() << "ThreadedPlugIn::run calling synthText" << endl;
m_plugin->synthText(m_text, filename);
kdDebug() << "ThreadedPlugIn::run back from synthText" << endl;
diff --git a/kttsd/kttsd/threadedplugin.h b/kttsd/kttsd/threadedplugin.h
index bc9ed6a..1a1b13e 100644
--- a/kttsd/kttsd/threadedplugin.h
+++ b/kttsd/kttsd/threadedplugin.h
@@ -24,15 +24,15 @@
#ifndef _THREADEDPLUGIN_H_
#define _THREADEDPLUGIN_H_
-#include <qthread.h>
-#include <qmutex.h>
-#include <qwaitcondition.h>
+#include <tqthread.h>
+#include <tqmutex.h>
+#include <tqwaitcondition.h>
#include "pluginproc.h"
class Speaker;
-class ThreadedPlugIn : public PlugInProc, public QThread
+class ThreadedPlugIn : public PlugInProc, public TQThread
{
public:
enum pluginAction
@@ -45,7 +45,7 @@ class ThreadedPlugIn : public PlugInProc, public QThread
/**
* Constructor.
*/
- ThreadedPlugIn(PlugInProc* plugin, QObject *parent = 0, const char *name = 0);
+ ThreadedPlugIn(PlugInProc* plugin, TQObject *parent = 0, const char *name = 0);
/**
* Destructor.
@@ -55,7 +55,7 @@ class ThreadedPlugIn : public PlugInProc, public QThread
/**
* Initializate the speech plugin.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Say a text. Synthesize and audibilize it.
@@ -64,7 +64,7 @@ class ThreadedPlugIn : public PlugInProc, public QThread
* If the plugin supports asynchronous operation, it should return immediately
* and emit sayFinished signal when synthesis and audibilizing is finished.
*/
- virtual void sayText(const QString &text);
+ virtual void sayText(const TQString &text);
/**
* Synthesize text into an audio file, but do not send to the audio device.
@@ -77,7 +77,7 @@ class ThreadedPlugIn : public PlugInProc, public QThread
* If the plugin supports asynchronous operation, it should return immediately
* and emit synthFinished signal when synthesis is completed.
*/
- virtual void synthText(const QString &text, const QString &suggestedFilename);
+ virtual void synthText(const TQString &text, const TQString &suggestedFilename);
/**
* Get the generated audio filename from synthText.
@@ -86,7 +86,7 @@ class ThreadedPlugIn : public PlugInProc, public QThread
*
* The plugin must not re-use the filename.
*/
- virtual QString getFilename();
+ virtual TQString getFilename();
/**
* Stop current operation (saying or synthesizing text).
@@ -154,7 +154,7 @@ class ThreadedPlugIn : public PlugInProc, public QThread
/**
* A text buffer to go with an action (if applicable).
*/
- QString m_text;
+ TQString m_text;
/**
* Current state of the plugin.
@@ -164,7 +164,7 @@ class ThreadedPlugIn : public PlugInProc, public QThread
/**
* Mutext for accessing state variable.
*/
- QMutex m_stateMutex;
+ TQMutex m_stateMutex;
/**
* True when stopText was called but the plugin did not stop.
@@ -174,17 +174,17 @@ class ThreadedPlugIn : public PlugInProc, public QThread
/**
* Locked when thread is running.
*/
- QMutex m_threadRunningMutex;
+ TQMutex m_threadRunningMutex;
/**
* Filename for generated synthesized text.
*/
- QString m_filename;
+ TQString m_filename;
/**
* Thread wait condition.
*/
- QWaitCondition m_waitCondition;
+ TQWaitCondition m_waitCondition;
/**
* Thread exit flag.
diff --git a/kttsd/kttsjobmgr/kttsjobmgr.cpp b/kttsd/kttsjobmgr/kttsjobmgr.cpp
index 2b2e1c5..91a64fd 100644
--- a/kttsd/kttsjobmgr/kttsjobmgr.cpp
+++ b/kttsd/kttsjobmgr/kttsjobmgr.cpp
@@ -16,16 +16,16 @@
***************************************************************************/
// QT includes.
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qsplitter.h>
-#include <qclipboard.h>
-#include <qpushbutton.h>
-#include <qobjectlist.h>
-#include <qwhatsthis.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqsplitter.h>
+#include <tqclipboard.h>
+#include <tqpushbutton.h>
+#include <tqobjectlist.h>
+#include <tqwhatsthis.h>
-#include <qmime.h>
+#include <tqmime.h>
// KDE includes.
#include <kinstance.h>
@@ -65,10 +65,10 @@ KttsJobMgrFactory::~KttsJobMgrFactory()
s_instance = 0;
}
-QObject *KttsJobMgrFactory::createObject(QObject *parent, const char *name, const char*,
- const QStringList& )
+TQObject *KttsJobMgrFactory::createObject(TQObject *parent, const char *name, const char*,
+ const TQStringList& )
{
- QObject *obj = new KttsJobMgrPart((QWidget*)parent, name);
+ TQObject *obj = new KttsJobMgrPart((TQWidget*)parent, name);
emit objectCreated(obj);
return obj;
}
@@ -86,7 +86,7 @@ KAboutData *KttsJobMgrFactory::aboutData()
return about;
}
-KttsJobMgrPart::KttsJobMgrPart(QWidget *parent, const char *name) :
+KttsJobMgrPart::KttsJobMgrPart(TQWidget *parent, const char *name) :
DCOPStub("kttsd", "KSpeech"),
DCOPObject("kttsjobmgr_kspeechsink"),
KParts::ReadOnlyPart(parent, name)
@@ -100,13 +100,13 @@ KttsJobMgrPart::KttsJobMgrPart(QWidget *parent, const char *name) :
// All the ktts components use the same catalogue.
KGlobal::locale()->insertCatalogue("kttsd");
- // Create a QVBox to host everything.
- QVBox* vBox = new QVBox(parent);
+ // Create a TQVBox to host everything.
+ TQVBox* vBox = new TQVBox(parent);
vBox->setMargin(6);
// Create a splitter to contain the Job List View and the current sentence.
- QSplitter* splitter = new QSplitter(vBox);
- splitter->setOrientation(QSplitter::Vertical);
+ TQSplitter* splitter = new TQSplitter(vBox);
+ splitter->setOrientation(TQSplitter::Vertical);
// Create Job List View widget.
m_jobListView = new KListView(splitter, "joblistview");
@@ -123,7 +123,7 @@ KttsJobMgrPart::KttsJobMgrPart(QWidget *parent, const char *name) :
// Do not sort the list.
m_jobListView->setSorting(-1);
- QString jobListViewWT = i18n(
+ TQString jobListViewWT = i18n(
"<p>These are all the text jobs. The <b>State</b> column "
"may be:"
"<ul>"
@@ -143,156 +143,156 @@ KttsJobMgrPart::KttsJobMgrPart(QWidget *parent, const char *name) :
"<em>Note</em>: Messages, Warnings, and Screen Reader Output do not appear in this list. "
"See the Handbook for more information."
"</p>");
- QWhatsThis::add(m_jobListView, jobListViewWT);
+ TQWhatsThis::add(m_jobListView, jobListViewWT);
- // splitter->setResizeMode(m_jobListView, QSplitter::Stretch);
+ // splitter->setResizeMode(m_jobListView, TQSplitter::Stretch);
// Create a VBox to hold buttons and current sentence.
- QVBox* bottomBox = new QVBox(splitter);
+ TQVBox* bottomBox = new TQVBox(splitter);
// Create a box to hold buttons.
- m_buttonBox = new QVBox(bottomBox);
+ m_buttonBox = new TQVBox(bottomBox);
m_buttonBox->setSpacing(6);
// Create 3 HBoxes to host buttons.
- QHBox* hbox1 = new QHBox(m_buttonBox);
+ TQHBox* hbox1 = new TQHBox(m_buttonBox);
hbox1->setSpacing(6);
- QHBox* hbox2 = new QHBox(m_buttonBox);
+ TQHBox* hbox2 = new TQHBox(m_buttonBox);
hbox2->setSpacing(6);
- QHBox* hbox3 = new QHBox(m_buttonBox);
+ TQHBox* hbox3 = new TQHBox(m_buttonBox);
hbox3->setSpacing(6);
// Do not let button box stretch vertically.
- m_buttonBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
+ m_buttonBox->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed));
// All the buttons with "job_" at start of their names will be enabled/disabled when a job is
// selected in the Job List View.
// All the buttons with "part_" at the start of their names will be enabled/disabled when a
// job is selected in the Job List View that has multiple parts.
- QPushButton* btn;
- QString wt;
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("stop", KIcon::Small, 0, true),
+ TQPushButton* btn;
+ TQString wt;
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("stop", KIcon::Small, 0, true),
i18n("Hold"), hbox1, "job_hold");
wt = i18n(
"<p>Changes a job to Paused state. If currently speaking, the job stops speaking. "
"Paused jobs prevent jobs that follow them from speaking, so either click "
"<b>Resume</b> to make the job speakable, or click <b>Later</b> to move it "
"down in the list.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_hold()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("exec", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_hold()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("exec", KIcon::Small, 0, true),
i18n("Resume"), hbox1, "job_resume");
wt = i18n(
"<p>Resumes a paused job or changes a Queued job to Waiting. If the job is the "
"top speakable job in the list, it begins speaking.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_resume()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("redo", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_resume()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("redo", KIcon::Small, 0, true),
i18n("R&estart"), hbox1, "job_restart");
wt = i18n(
"<p>Rewinds a job to the beginning and changes its state to Waiting. If the job "
"is the top speakable job in the list, it begins speaking.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_restart()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("edittrash", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_restart()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("edittrash", KIcon::Small, 0, true),
i18n("Re&move"), hbox1, "job_remove");
wt = i18n(
"<p>Deletes the job. If it is currently speaking, it stops speaking. The next "
"speakable job in the list begins speaking.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_remove()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("down", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_remove()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("down", KIcon::Small, 0, true),
i18n("&Later"), hbox1, "job_later");
wt = i18n(
"<p>Moves a job downward in the list so that it will be spoken later. If the job "
"is currently speaking, its state changes to Paused.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_move()));
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_move()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("2leftarrow", KIcon::Small, 0, true),
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("2leftarrow", KIcon::Small, 0, true),
i18n("Pre&vious Part"), hbox2, "part_prevpart");
wt = i18n(
"<p>Rewinds a multi-part job to the previous part.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_prev_par()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("1leftarrow", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_prev_par()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("1leftarrow", KIcon::Small, 0, true),
i18n("&Previous Sentence"), hbox2, "job_prevsentence");
wt = i18n(
"<p>Rewinds a job to the previous sentence.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_prev_sen()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("1rightarrow", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_prev_sen()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("1rightarrow", KIcon::Small, 0, true),
i18n("&Next Sentence"), hbox2, "job_nextsentence");
wt = i18n(
"<p>Advances a job to the next sentence.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_next_sen()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("2rightarrow", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_next_sen()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("2rightarrow", KIcon::Small, 0, true),
i18n("Ne&xt Part"), hbox2, "part_nextpart");
wt = i18n(
"<p>Advances a multi-part job to the next part.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_next_par()));
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_next_par()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("klipper", KIcon::Small, 0, true),
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("klipper", KIcon::Small, 0, true),
i18n("&Speak Clipboard"), hbox3, "speak_clipboard");
wt = i18n(
"<p>Queues the current contents of the clipboard for speaking and sets its state "
"to Waiting. If the job is the topmost in the list, it begins speaking. "
"The job will be spoken by the topmost Talker in the <b>Talkers</b> tab.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_speak_clipboard()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("fileopen", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_speak_clipboard()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("fileopen", KIcon::Small, 0, true),
i18n("Spea&k File"), hbox3, "speak_file");
wt = i18n(
"<p>Prompts you for a file name and queues the contents of the file for speaking. "
"You must click the <b>Resume</b> button before the job will be speakable. "
"The job will be spoken by the topmost Talker in the <b>Talkers</b> tab.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_speak_file()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("translate", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_speak_file()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("translate", KIcon::Small, 0, true),
i18n("Change Talker"), hbox3, "job_changetalker");
wt = i18n(
"<p>Prompts you with a list of your configured Talkers from the <b>Talkers</b> tab. "
"The job will be spoken using the selected Talker.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_change_talker()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("reload_page", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_change_talker()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("reload_page", KIcon::Small, 0, true),
i18n("&Refresh"), hbox3, "refresh");
wt = i18n(
"<p>Refresh the list of jobs.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_refresh()));
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_refresh()));
// Disable job buttons until a job is selected.
enableJobActions(false);
enableJobPartActions(false);
// Create a VBox for the current sentence and sentence label.
- QVBox* sentenceVBox = new QVBox(bottomBox);
+ TQVBox* sentenceVBox = new TQVBox(bottomBox);
// Create a label for current sentence.
- QLabel* currentSentenceLabel = new QLabel(sentenceVBox);
- currentSentenceLabel->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
+ TQLabel* currentSentenceLabel = new TQLabel(sentenceVBox);
+ currentSentenceLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed));
currentSentenceLabel->setText(i18n("Current Sentence"));
// Create a box to contain the current sentence.
m_currentSentence = new KTextEdit(sentenceVBox);
m_currentSentence->setReadOnly(true);
- m_currentSentence->setWordWrap(QTextEdit::WidgetWidth);
- m_currentSentence->setWrapPolicy(QTextEdit::AtWordOrDocumentBoundary);
- m_currentSentence->setHScrollBarMode(QScrollView::AlwaysOff);
- m_currentSentence->setVScrollBarMode(QScrollView::Auto);
+ m_currentSentence->setWordWrap(TQTextEdit::WidgetWidth);
+ m_currentSentence->setWrapPolicy(TQTextEdit::AtWordOrDocumentBoundary);
+ m_currentSentence->setHScrollBarMode(TQScrollView::AlwaysOff);
+ m_currentSentence->setVScrollBarMode(TQScrollView::Auto);
wt = i18n(
"<p>The text of the sentence currently speaking.</p>");
- QWhatsThis::add(m_currentSentence, wt);
+ TQWhatsThis::add(m_currentSentence, wt);
// Set the main widget for the part.
setWidget(vBox);
- connect(m_jobListView, SIGNAL(selectionChanged(QListViewItem* )),
- this, SLOT(slot_selectionChanged(QListViewItem* )));
+ connect(m_jobListView, TQT_SIGNAL(selectionChanged(TQListViewItem* )),
+ this, TQT_SLOT(slot_selectionChanged(TQListViewItem* )));
// Fill the Job List View.
refreshJobListView();
@@ -305,44 +305,44 @@ KttsJobMgrPart::KttsJobMgrPart(QWidget *parent, const char *name) :
"kttsdStarted()",
false);
connectDCOPSignal("kttsd", "KSpeech",
- "markerSeen(QCString,QString)",
- "markerSeen(QCString,QString)",
+ "markerSeen(TQCString,TQString)",
+ "markerSeen(TQCString,TQString)",
false);
connectDCOPSignal("kttsd", "KSpeech",
- "sentenceStarted(QCString,uint,uint)",
- "sentenceStarted(QCString,uint,uint)",
+ "sentenceStarted(TQCString,uint,uint)",
+ "sentenceStarted(TQCString,uint,uint)",
false);
connectDCOPSignal(0, 0,
- "sentenceFinished(QCString,uint,uint)",
- "sentenceFinished(QCString,uint,uint)",
+ "sentenceFinished(TQCString,uint,uint)",
+ "sentenceFinished(TQCString,uint,uint)",
false);
connectDCOPSignal("kttsd", "KSpeech",
- "textSet(QCString,uint)",
- "textSet(QCString,uint)",
+ "textSet(TQCString,uint)",
+ "textSet(TQCString,uint)",
false);
connectDCOPSignal("kttsd", "KSpeech",
- "textStarted(QCString,uint)",
- "textStarted(QCString,uint)",
+ "textStarted(TQCString,uint)",
+ "textStarted(TQCString,uint)",
false);
connectDCOPSignal("kttsd", "KSpeech",
- "textFinished(QCString,uint)",
- "textFinished(QCString,uint)",
+ "textFinished(TQCString,uint)",
+ "textFinished(TQCString,uint)",
false);
connectDCOPSignal("kttsd", "KSpeech",
- "textStopped(QCString,uint)",
- "textStopped(QCString,uint)",
+ "textStopped(TQCString,uint)",
+ "textStopped(TQCString,uint)",
false);
connectDCOPSignal("kttsd", "KSpeech",
- "textPaused(QCString,uint)",
- "textPaused(QCString,uint)",
+ "textPaused(TQCString,uint)",
+ "textPaused(TQCString,uint)",
false);
connectDCOPSignal("kttsd", "KSpeech",
- "textResumed(QCString,uint)",
- "textResumed(QCString,uint)",
+ "textResumed(TQCString,uint)",
+ "textResumed(TQCString,uint)",
false);
connectDCOPSignal("kttsd", "KSpeech",
- "textRemoved(QCString,uint)",
- "textRemoved(QCString,uint)",
+ "textRemoved(TQCString,uint)",
+ "textRemoved(TQCString,uint)",
false);
m_extension = new KttsJobMgrBrowserExtension(this);
@@ -351,7 +351,7 @@ KttsJobMgrPart::KttsJobMgrPart(QWidget *parent, const char *name) :
// Divide splitter in half. ListView gets half. Buttons and Current Sentence get half.
int halfSplitterSize = splitter->height()/2;
- QValueList<int> splitterSizes;
+ TQValueList<int> splitterSizes;
splitterSizes.append(halfSplitterSize);
splitterSizes.append(halfSplitterSize);
splitter->setSizes(splitterSizes);
@@ -375,7 +375,7 @@ bool KttsJobMgrPart::closeURL()
/**
* This slot is connected to the Job List View selectionChanged signal.
*/
-void KttsJobMgrPart::slot_selectionChanged(QListViewItem*)
+void KttsJobMgrPart::slot_selectionChanged(TQListViewItem*)
{
// Enable job buttons.
enableJobActions(true);
@@ -478,20 +478,20 @@ void KttsJobMgrPart::slot_job_move()
moveTextLater(jobNum);
refreshJobListView();
// Select the job we just moved.
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item) m_jobListView->setSelected(item, true);
}
}
void KttsJobMgrPart::slot_job_change_talker()
{
- QListViewItem* item = m_jobListView->selectedItem();
+ TQListViewItem* item = m_jobListView->selectedItem();
if (item)
{
- QString talkerID = item->text(jlvcTalkerID);
- QStringList talkerIDs = m_talkerCodesToTalkerIDs.values();
+ TQString talkerID = item->text(jlvcTalkerID);
+ TQStringList talkerIDs = m_talkerCodesToTalkerIDs.values();
int ndx = talkerIDs.findIndex(talkerID);
- QString talkerCode;
+ TQString talkerCode;
if (ndx >= 0) talkerCode = m_talkerCodesToTalkerIDs.keys()[ndx];
SelectTalkerDlg dlg(widget(), "selecttalkerdialog", i18n("Select Talker"), talkerCode, true);
int dlgResult = dlg.exec();
@@ -510,24 +510,24 @@ void KttsJobMgrPart::slot_speak_clipboard()
// Copy text from the clipboard.
- QString text;
- QMimeSource* data = cb->data();
+ TQString text;
+ TQMimeSource* data = cb->data();
if (data)
{
if (data->provides("text/html"))
{
if (supportsMarkup(NULL, KSpeech::mtHtml))
{
- QByteArray d = data->encodedData("text/html");
- text = QString(d);
+ TQByteArray d = data->encodedData("text/html");
+ text = TQString(d);
}
}
if (data->provides("text/ssml"))
{
if (supportsMarkup(NULL, KSpeech::mtSsml))
{
- QByteArray d = data->encodedData("text/ssml");
- text = QString(d);
+ TQByteArray d = data->encodedData("text/ssml");
+ text = TQString(d);
}
}
}
@@ -567,7 +567,7 @@ void KttsJobMgrPart::slot_refresh()
// Select the previously-selected job.
if (jobNum)
{
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item) m_jobListView->setSelected(item, true);
}
}
@@ -578,7 +578,7 @@ void KttsJobMgrPart::slot_refresh()
* @param state KTTSD job state
* @return Display string for the state.
*/
-QString KttsJobMgrPart::stateToStr(int state)
+TQString KttsJobMgrPart::stateToStr(int state)
{
switch( state )
{
@@ -599,10 +599,10 @@ QString KttsJobMgrPart::stateToStr(int state)
uint KttsJobMgrPart::getCurrentJobNum()
{
uint jobNum = 0;
- QListViewItem* item = m_jobListView->selectedItem();
+ TQListViewItem* item = m_jobListView->selectedItem();
if (item)
{
- QString jobNumStr = item->text(jlvcJobNum);
+ TQString jobNumStr = item->text(jlvcJobNum);
jobNum = jobNumStr.toUInt(0, 10);
}
return jobNum;
@@ -616,10 +616,10 @@ uint KttsJobMgrPart::getCurrentJobNum()
int KttsJobMgrPart::getCurrentJobPartCount()
{
int partCount = 0;
- QListViewItem* item = m_jobListView->selectedItem();
+ TQListViewItem* item = m_jobListView->selectedItem();
if (item)
{
- QString partCountStr = item->text(jlvcPartCount);
+ TQString partCountStr = item->text(jlvcPartCount);
partCount = partCountStr.toUInt(0, 10);
}
return partCount;
@@ -628,11 +628,11 @@ int KttsJobMgrPart::getCurrentJobPartCount()
/**
* Given a Job Number, returns the Job List View item containing the job.
* @param jobNum Job Number.
-* @return QListViewItem containing the job or 0 if not found.
+* @return TQListViewItem containing the job or 0 if not found.
*/
-QListViewItem* KttsJobMgrPart::findItemByJobNum(const uint jobNum)
+TQListViewItem* KttsJobMgrPart::findItemByJobNum(const uint jobNum)
{
- return m_jobListView->findItem(QString::number(jobNum), jlvcJobNum);
+ return m_jobListView->findItem(TQString::number(jobNum), jlvcJobNum);
}
/**
@@ -641,11 +641,11 @@ QListViewItem* KttsJobMgrPart::findItemByJobNum(const uint jobNum)
*/
void KttsJobMgrPart::refreshJob(uint jobNum)
{
- QByteArray jobInfo = getTextJobInfo(jobNum);
- QDataStream stream(jobInfo, IO_ReadOnly);
+ TQByteArray jobInfo = getTextJobInfo(jobNum);
+ TQDataStream stream(jobInfo, IO_ReadOnly);
int state;
- QCString appId;
- QString talker;
+ TQCString appId;
+ TQString talker;
int seq;
int sentenceCount;
int partNum;
@@ -657,16 +657,16 @@ void KttsJobMgrPart::refreshJob(uint jobNum)
stream >> sentenceCount;
stream >> partNum;
stream >> partCount;
- QString talkerID = cachedTalkerCodeToTalkerID(talker);
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQString talkerID = cachedTalkerCodeToTalkerID(talker);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item)
{
item->setText(jlvcTalkerID, talkerID);
item->setText(jlvcState, stateToStr(state));
- item->setText(jlvcPosition, QString::number(seq));
- item->setText(jlvcSentences, QString::number(sentenceCount));
- item->setText(jlvcPartNum, QString::number(partNum));
- item->setText(jlvcPartCount, QString::number(partCount));
+ item->setText(jlvcPosition, TQString::number(seq));
+ item->setText(jlvcSentences, TQString::number(sentenceCount));
+ item->setText(jlvcPartNum, TQString::number(partNum));
+ item->setText(jlvcPartCount, TQString::number(partCount));
}
}
@@ -679,21 +679,21 @@ void KttsJobMgrPart::refreshJobListView()
m_jobListView->clear();
enableJobActions(false);
enableJobPartActions(false);
- QString jobNumbers = getTextJobNumbers();
+ TQString jobNumbers = getTextJobNumbers();
// kdDebug() << "jobNumbers: " << jobNumbers << endl;
- QStringList jobNums = QStringList::split(",", jobNumbers);
- QListViewItem* lastItem = 0;
- QStringList::ConstIterator endJobNums(jobNums.constEnd());
- for( QStringList::ConstIterator it = jobNums.constBegin(); it != endJobNums; ++it)
+ TQStringList jobNums = TQStringList::split(",", jobNumbers);
+ TQListViewItem* lastItem = 0;
+ TQStringList::ConstIterator endJobNums(jobNums.constEnd());
+ for( TQStringList::ConstIterator it = jobNums.constBegin(); it != endJobNums; ++it)
{
- QString jobNumStr = *it;
+ TQString jobNumStr = *it;
// kdDebug() << "jobNumStr: " << jobNumStr << endl;
uint jobNum = jobNumStr.toUInt(0, 10);
- QByteArray jobInfo = getTextJobInfo(jobNum);
- QDataStream stream(jobInfo, IO_ReadOnly);
+ TQByteArray jobInfo = getTextJobInfo(jobNum);
+ TQDataStream stream(jobInfo, IO_ReadOnly);
int state;
- QCString appId;
- QString talkerCode;
+ TQCString appId;
+ TQString talkerCode;
int seq;
int sentenceCount;
int partNum;
@@ -705,16 +705,16 @@ void KttsJobMgrPart::refreshJobListView()
stream >> sentenceCount;
stream >> partNum;
stream >> partCount;
- QString talkerID = cachedTalkerCodeToTalkerID(talkerCode);
+ TQString talkerID = cachedTalkerCodeToTalkerID(talkerCode);
// Append to list.
if (lastItem)
- lastItem = new QListViewItem(m_jobListView, lastItem, jobNumStr, appId, talkerID,
- stateToStr(state), QString::number(seq), QString::number(sentenceCount),
- QString::number(partNum), QString::number(partCount));
+ lastItem = new TQListViewItem(m_jobListView, lastItem, jobNumStr, appId, talkerID,
+ stateToStr(state), TQString::number(seq), TQString::number(sentenceCount),
+ TQString::number(partNum), TQString::number(partCount));
else
- lastItem = new QListViewItem(m_jobListView, jobNumStr, appId, talkerID,
- stateToStr(state), QString::number(seq), QString::number(sentenceCount),
- QString::number(partNum), QString::number(partCount));
+ lastItem = new TQListViewItem(m_jobListView, jobNumStr, appId, talkerID,
+ stateToStr(state), TQString::number(seq), TQString::number(sentenceCount),
+ TQString::number(partNum), TQString::number(partCount));
}
}
@@ -727,7 +727,7 @@ void KttsJobMgrPart::autoSelectInJobListView()
// If something selected, nothing to do.
if (m_jobListView->selectedItem()) return;
// If empty, disable job buttons.
- QListViewItem* item = m_jobListView->firstChild();
+ TQListViewItem* item = m_jobListView->firstChild();
if (!item)
{
enableJobActions(false);
@@ -743,7 +743,7 @@ void KttsJobMgrPart::autoSelectInJobListView()
* @param talkerCode Talker Code.
* @return Talker ID.
*/
-QString KttsJobMgrPart::cachedTalkerCodeToTalkerID(const QString& talkerCode)
+TQString KttsJobMgrPart::cachedTalkerCodeToTalkerID(const TQString& talkerCode)
{
// If in the cache, return that.
if (m_talkerCodesToTalkerIDs.contains(talkerCode))
@@ -751,7 +751,7 @@ QString KttsJobMgrPart::cachedTalkerCodeToTalkerID(const QString& talkerCode)
else
{
// Otherwise, retrieve Talker ID from KTTSD and cache it.
- QString talkerID = talkerCodeToTalkerId(talkerCode);
+ TQString talkerID = talkerCodeToTalkerId(talkerCode);
m_talkerCodesToTalkerIDs[talkerCode] = talkerID;
return talkerID;
}
@@ -764,30 +764,30 @@ QString KttsJobMgrPart::cachedTalkerCodeToTalkerID(const QString& talkerCode)
void KttsJobMgrPart::enableJobActions(bool enable)
{
if (!m_buttonBox) return;
- QObjectList *l = m_buttonBox->queryList( "QPushButton", "job_*", true, true );
- QObjectListIt it( *l ); // iterate over the buttons
- QObject *obj;
+ TQObjectList *l = m_buttonBox->queryList( "TQPushButton", "job_*", true, true );
+ TQObjectListIt it( *l ); // iterate over the buttons
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
// for each found object...
++it;
- ((QPushButton*)obj)->setEnabled( enable );
+ ((TQPushButton*)obj)->setEnabled( enable );
}
delete l; // delete the list, not the objects
if (enable)
{
// Later button only enables if currently selected list item is not bottom of list.
- QListViewItem* item = m_jobListView->selectedItem();
+ TQListViewItem* item = m_jobListView->selectedItem();
if (item)
{
bool enableLater = item->nextSibling();
- l = m_buttonBox->queryList( "QPushButton", "job_later", false, true );
- it = QObjectListIt( *l ); // iterate over the buttons
+ l = m_buttonBox->queryList( "TQPushButton", "job_later", false, true );
+ it = TQObjectListIt( *l ); // iterate over the buttons
if ( (obj = it.current()) != 0 ) {
// for each found object...
- ((QPushButton*)obj)->setEnabled( enableLater );
+ ((TQPushButton*)obj)->setEnabled( enableLater );
}
delete l; // delete the list, not the objects
}
@@ -801,14 +801,14 @@ void KttsJobMgrPart::enableJobActions(bool enable)
void KttsJobMgrPart::enableJobPartActions(bool enable)
{
if (!m_buttonBox) return;
- QObjectList *l = m_buttonBox->queryList( "QPushButton", "part_*", true, true );
- QObjectListIt it( *l ); // iterate over the buttons
- QObject *obj;
+ TQObjectList *l = m_buttonBox->queryList( "TQPushButton", "part_*", true, true );
+ TQObjectListIt it( *l ); // iterate over the buttons
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
// for each found object...
++it;
- ((QPushButton*)obj)->setEnabled( enable );
+ ((TQPushButton*)obj)->setEnabled( enable );
}
delete l; // delete the list, not the objects
}
@@ -826,7 +826,7 @@ ASYNC KttsJobMgrPart::kttsdStarted() { slot_refresh(); }
* @param markerName The name of the marker seen.
* @see markers
*/
-ASYNC KttsJobMgrPart::markerSeen(const QCString&, const QString&)
+ASYNC KttsJobMgrPart::markerSeen(const TQCString&, const TQString&)
{
}
@@ -837,14 +837,14 @@ ASYNC KttsJobMgrPart::markerSeen(const QCString&, const QString&)
* @param seq Sequence number of the text.
* @see getTextCount
*/
-ASYNC KttsJobMgrPart::sentenceStarted(const QCString&, const uint jobNum, const uint seq)
+ASYNC KttsJobMgrPart::sentenceStarted(const TQCString&, const uint jobNum, const uint seq)
{
// kdDebug() << "KttsJobMgrPart::sentencedStarted: jobNum = " << jobNum << " seq = " << seq << endl;
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item)
{
item->setText(jlvcState, stateToStr(KSpeech::jsSpeaking));
- item->setText(jlvcPosition, QString::number(seq));
+ item->setText(jlvcPosition, TQString::number(seq));
m_currentSentence->setText(getTextJobSentence(jobNum, seq));
}
}
@@ -856,11 +856,11 @@ ASYNC KttsJobMgrPart::sentenceStarted(const QCString&, const uint jobNum, const
* @param seq Sequence number of the text.
* @see getTextCount
*/
-ASYNC KttsJobMgrPart::sentenceFinished(const QCString& /*appId*/, const uint /*jobNum*/, const uint /*seq*/)
+ASYNC KttsJobMgrPart::sentenceFinished(const TQCString& /*appId*/, const uint /*jobNum*/, const uint /*seq*/)
{
// kdDebug() << "KttsJobMgrPart::sentencedFinished: jobNum = " << jobNum << endl;
/*
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item)
{
item->setText(jlvcState, stateToStr(KSpeech::jsSpeaking));
@@ -873,13 +873,13 @@ ASYNC KttsJobMgrPart::sentenceFinished(const QCString& /*appId*/, const uint /*j
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
-ASYNC KttsJobMgrPart::textSet(const QCString&, const uint jobNum)
+ASYNC KttsJobMgrPart::textSet(const TQCString&, const uint jobNum)
{
- QByteArray jobInfo = getTextJobInfo(jobNum);
- QDataStream stream(jobInfo, IO_ReadOnly);
+ TQByteArray jobInfo = getTextJobInfo(jobNum);
+ TQDataStream stream(jobInfo, IO_ReadOnly);
int state;
- QCString appId;
- QString talkerCode;
+ TQCString appId;
+ TQString talkerCode;
int seq;
int sentenceCount;
int partNum;
@@ -891,11 +891,11 @@ ASYNC KttsJobMgrPart::textSet(const QCString&, const uint jobNum)
stream >> sentenceCount;
stream >> partNum;
stream >> partCount;
- QString talkerID = cachedTalkerCodeToTalkerID(talkerCode);
- QListViewItem* item = new QListViewItem(m_jobListView, m_jobListView->lastItem(),
- QString::number(jobNum), appId, talkerID,
- stateToStr(state), QString::number(seq), QString::number(sentenceCount),
- QString::number(partNum), QString::number(partCount));
+ TQString talkerID = cachedTalkerCodeToTalkerID(talkerCode);
+ TQListViewItem* item = new TQListViewItem(m_jobListView, m_jobListView->lastItem(),
+ TQString::number(jobNum), appId, talkerID,
+ stateToStr(state), TQString::number(seq), TQString::number(sentenceCount),
+ TQString::number(partNum), TQString::number(partCount));
// Should we select this job?
if (m_selectOnTextSet)
{
@@ -913,7 +913,7 @@ ASYNC KttsJobMgrPart::textSet(const QCString&, const uint jobNum)
* @param partNum Part number of the new part. Parts are numbered starting
* at 1.
*/
-ASYNC KttsJobMgrPart::textAppended(const QCString& appId, const uint jobNum, const int /*partNum*/)
+ASYNC KttsJobMgrPart::textAppended(const TQCString& appId, const uint jobNum, const int /*partNum*/)
{
textSet(appId, jobNum);
}
@@ -923,9 +923,9 @@ ASYNC KttsJobMgrPart::textAppended(const QCString& appId, const uint jobNum, con
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
-ASYNC KttsJobMgrPart::textStarted(const QCString&, const uint jobNum)
+ASYNC KttsJobMgrPart::textStarted(const TQCString&, const uint jobNum)
{
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item)
{
item->setText(jlvcState, stateToStr(KSpeech::jsSpeaking));
@@ -942,17 +942,17 @@ ASYNC KttsJobMgrPart::textStarted(const QCString&, const uint jobNum)
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
-ASYNC KttsJobMgrPart::textFinished(const QCString&, const uint jobNum)
+ASYNC KttsJobMgrPart::textFinished(const TQCString&, const uint jobNum)
{
// kdDebug() << "KttsJobMgrPart::textFinished: jobNum = " << jobNum << endl;
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item)
{
item->setText(jlvcState, stateToStr(KSpeech::jsFinished));
// Update sentence pointer, since signal may not be emitted for final CR.
refreshJob(jobNum);
}
- m_currentSentence->setText(QString::null);
+ m_currentSentence->setText(TQString::null);
}
/**
@@ -960,10 +960,10 @@ ASYNC KttsJobMgrPart::textFinished(const QCString&, const uint jobNum)
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
-ASYNC KttsJobMgrPart::textStopped(const QCString&, const uint jobNum)
+ASYNC KttsJobMgrPart::textStopped(const TQCString&, const uint jobNum)
{
// kdDebug() << "KttsJobMgrPart::textStopped: jobNum = " << jobNum << endl;
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item)
{
item->setText(jlvcState, stateToStr(KSpeech::jsQueued));
@@ -976,10 +976,10 @@ ASYNC KttsJobMgrPart::textStopped(const QCString&, const uint jobNum)
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
-ASYNC KttsJobMgrPart::textPaused(const QCString&, const uint jobNum)
+ASYNC KttsJobMgrPart::textPaused(const TQCString&, const uint jobNum)
{
// kdDebug() << "KttsJobMgrPart::textPaused: jobNum = " << jobNum << endl;
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item)
{
item->setText(jlvcState, stateToStr(KSpeech::jsPaused));
@@ -991,9 +991,9 @@ ASYNC KttsJobMgrPart::textPaused(const QCString&, const uint jobNum)
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
-ASYNC KttsJobMgrPart::textResumed(const QCString&, const uint jobNum)
+ASYNC KttsJobMgrPart::textResumed(const TQCString&, const uint jobNum)
{
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item)
{
item->setText(jlvcState, stateToStr(KSpeech::jsSpeaking));
@@ -1006,9 +1006,9 @@ ASYNC KttsJobMgrPart::textResumed(const QCString&, const uint jobNum)
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
-ASYNC KttsJobMgrPart::textRemoved(const QCString&, const uint jobNum)
+ASYNC KttsJobMgrPart::textRemoved(const TQCString&, const uint jobNum)
{
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
delete item;
autoSelectInJobListView();
}
diff --git a/kttsd/kttsjobmgr/kttsjobmgr.h b/kttsd/kttsjobmgr/kttsjobmgr.h
index 6bb4898..a49e8f8 100644
--- a/kttsd/kttsjobmgr/kttsjobmgr.h
+++ b/kttsd/kttsjobmgr/kttsjobmgr.h
@@ -41,9 +41,9 @@ public:
KttsJobMgrFactory() {};
virtual ~KttsJobMgrFactory();
- virtual QObject* createObject(QObject* parent = 0, const char* name = 0,
- const char* classname = "QObject",
- const QStringList &args = QStringList());
+ virtual TQObject* createObject(TQObject* parent = 0, const char* name = 0,
+ const char* classname = "TQObject",
+ const TQStringList &args = TQStringList());
static KInstance *instance();
static KAboutData *aboutData();
@@ -59,7 +59,7 @@ class KttsJobMgrPart:
{
Q_OBJECT
public:
- KttsJobMgrPart(QWidget *parent, const char *name);
+ KttsJobMgrPart(TQWidget *parent, const char *name);
virtual ~KttsJobMgrPart();
protected:
@@ -78,7 +78,7 @@ protected:
* @param markerName The name of the marker seen.
* @see markers
*/
- ASYNC markerSeen(const QCString& appId, const QString& markerName);
+ ASYNC markerSeen(const TQCString& appId, const TQString& markerName);
/**
* This signal is emitted whenever a sentence begins speaking.
* @param appId DCOP application ID of the application that queued the text.
@@ -86,7 +86,7 @@ protected:
* @param seq Sequence number of the text.
* @see getTextCount
*/
- ASYNC sentenceStarted(const QCString& appId, const uint jobNum, const uint seq);
+ ASYNC sentenceStarted(const TQCString& appId, const uint jobNum, const uint seq);
/**
* This signal is emitted when a sentence has finished speaking.
* @param appId DCOP application ID of the application that queued the text.
@@ -94,14 +94,14 @@ protected:
* @param seq Sequence number of the text.
* @see getTextCount
*/
- ASYNC sentenceFinished(const QCString& appId, const uint jobNum, const uint seq);
+ ASYNC sentenceFinished(const TQCString& appId, const uint jobNum, const uint seq);
/**
* This signal is emitted whenever a new text job is added to the queue.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- ASYNC textSet(const QCString& appId, const uint jobNum);
+ ASYNC textSet(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted whenever a new part is appended to a text job.
@@ -110,14 +110,14 @@ protected:
* @param partNum Part number of the new part. Parts are numbered starting
* at 1.
*/
- ASYNC textAppended(const QCString& appId, const uint jobNum, const int partNum);
+ ASYNC textAppended(const TQCString& appId, const uint jobNum, const int partNum);
/**
* This signal is emitted whenever speaking of a text job begins.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- ASYNC textStarted(const QCString& appId, const uint jobNum);
+ ASYNC textStarted(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted whenever a text job is finished. The job has
* been marked for deletion from the queue and will be deleted when another
@@ -127,38 +127,38 @@ protected:
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- ASYNC textFinished(const QCString& appId, const uint jobNum);
+ ASYNC textFinished(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted whenever a speaking text job stops speaking.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- ASYNC textStopped(const QCString& appId, const uint jobNum);
+ ASYNC textStopped(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted whenever a speaking text job is paused.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- ASYNC textPaused(const QCString& appId, const uint jobNum);
+ ASYNC textPaused(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted when a text job, that was previously paused, resumes speaking.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- ASYNC textResumed(const QCString& appId, const uint jobNum);
+ ASYNC textResumed(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted whenever a text job is deleted from the queue.
* The job is no longer in the queue when this signal is emitted.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- ASYNC textRemoved(const QCString& appId, const uint jobNum);
+ ASYNC textRemoved(const TQCString& appId, const uint jobNum);
private slots:
/**
* This slot is connected to the Job List View selectionChanged signal.
*/
- void slot_selectionChanged(QListViewItem* item);
+ void slot_selectionChanged(TQListViewItem* item);
/**
* Slots connected to buttons.
*/
@@ -198,7 +198,7 @@ private:
* @param state KTTSD job state
* @return Display string for the state.
*/
- QString stateToStr(int state);
+ TQString stateToStr(int state);
/**
* Get the Job Number of the currently-selected job in the Job List View.
@@ -217,9 +217,9 @@ private:
/**
* Given a Job Number, returns the Job List View item containing the job.
* @param jobNum Job Number.
- * @return QListViewItem containing the job or 0 if not found.
+ * @return TQListViewItem containing the job or 0 if not found.
*/
- QListViewItem* findItemByJobNum(const uint jobNum);
+ TQListViewItem* findItemByJobNum(const uint jobNum);
/**
* Enables or disables all the job-related buttons.
@@ -255,7 +255,7 @@ private:
* @param talkerCode Talker Code.
* @return Talker ID.
*/
- QString cachedTalkerCodeToTalkerID(const QString& talkerCode);
+ TQString cachedTalkerCodeToTalkerID(const TQString& talkerCode);
/**
* Job ListView.
@@ -271,7 +271,7 @@ private:
/**
* Box containing buttons.
*/
- QVBox* m_buttonBox;
+ TQVBox* m_buttonBox;
/**
* This flag is set to True whenever we want to select the next job that
@@ -282,7 +282,7 @@ private:
/**
* Cache mapping Talker Codes to Talker IDs.
*/
- QMap<QString,QString> m_talkerCodesToTalkerIDs;
+ TQMap<TQString,TQString> m_talkerCodesToTalkerIDs;
};
class KttsJobMgrBrowserExtension : public KParts::BrowserExtension
diff --git a/kttsd/kttsmgr/kttsmgr.cpp b/kttsd/kttsmgr/kttsmgr.cpp
index 80b66b9..68bd74d 100644
--- a/kttsd/kttsmgr/kttsmgr.cpp
+++ b/kttsd/kttsmgr/kttsmgr.cpp
@@ -23,7 +23,7 @@
******************************************************************************/
// Qt includes.
-#include <qimage.h>
+#include <tqimage.h>
// KDE includes.
#include <kconfig.h>
@@ -81,7 +81,7 @@ int main (int argc, char *argv[])
KUniqueApplication app;
#if KDE_VERSION >= KDE_MAKE_VERSION (3,3,90)
- QPixmap icon = KGlobal::iconLoader()->loadIcon("kttsd", KIcon::Panel);
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon("kttsd", KIcon::Panel);
aboutdata.setProgramLogo(icon.convertToImage());
#endif
@@ -135,11 +135,11 @@ int main (int argc, char *argv[])
/* KttsToolTip class */
-KttsToolTip::KttsToolTip ( QWidget* parent ) : QToolTip(parent)
+KttsToolTip::KttsToolTip ( TQWidget* parent ) : TQToolTip(parent)
{
}
-/*virtual*/ void KttsToolTip::maybeTip ( const QPoint & p )
+/*virtual*/ void KttsToolTip::maybeTip ( const TQPoint & p )
{
Q_UNUSED(p);
@@ -148,11 +148,11 @@ KttsToolTip::KttsToolTip ( QWidget* parent ) : QToolTip(parent)
KttsMgrTray* kttsMgrTray = dynamic_cast<KttsMgrTray*>(parentWidget());
- QRect r(kttsMgrTray->geometry());
+ TQRect r(kttsMgrTray->geometry());
if ( !r.isValid() )
return;
- QString status = "<qt><b>KTTSMgr</b> - ";
+ TQString status = "<qt><b>KTTSMgr</b> - ";
status += i18n("<qt>Text-to-Speech Manager");
status += "<br/><br/>";
status += kttsMgrTray->getStatus();
@@ -163,15 +163,15 @@ KttsToolTip::KttsToolTip ( QWidget* parent ) : QToolTip(parent)
/* KttsMgrTray class */
-KttsMgrTray::KttsMgrTray(QWidget *parent):
+KttsMgrTray::KttsMgrTray(TQWidget *parent):
DCOPStub("kttsd", "KSpeech"),
DCOPObject("kkttsmgr_kspeechsink"),
KSystemTray(parent, "kttsmgrsystemtray")
{
- QPixmap icon = KGlobal::iconLoader()->loadIcon("kttsd", KIcon::Small);
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon("kttsd", KIcon::Small);
setPixmap (icon);
- // QToolTip::add(this, i18n("Text-to-speech manager"));
+ // TQToolTip::add(this, i18n("Text-to-speech manager"));
m_toolTip = new KttsToolTip(this);
int id;
@@ -179,25 +179,25 @@ KttsMgrTray::KttsMgrTray(QWidget *parent):
if (id != -1) contextMenu()->changeTitle(id, icon, "KTTSMgr");
id = contextMenu()->insertItem (KGlobal::iconLoader()->loadIcon("klipper", KIcon::Small),
- i18n("&Speak Clipboard Contents"), this, SLOT(speakClipboardSelected()));
+ i18n("&Speak Clipboard Contents"), this, TQT_SLOT(speakClipboardSelected()));
id = contextMenu()->insertItem (KGlobal::iconLoader()->loadIcon("stop", KIcon::Small),
- i18n("&Hold"), this, SLOT(holdSelected()));
+ i18n("&Hold"), this, TQT_SLOT(holdSelected()));
id = contextMenu()->insertItem (KGlobal::iconLoader()->loadIcon("exec", KIcon::Small),
- i18n("Resume"), this, SLOT(resumeSelected()));
+ i18n("Resume"), this, TQT_SLOT(resumeSelected()));
id = contextMenu()->insertSeparator();
id = contextMenu()->insertItem (KGlobal::iconLoader()->loadIcon("contents", KIcon::Small),
- i18n("KTTS &Handbook"), this, SLOT(helpSelected()));
+ i18n("KTTS &Handbook"), this, TQT_SLOT(helpSelected()));
id = contextMenu()->insertItem (KGlobal::iconLoader()->loadIcon("kttsd", KIcon::Small),
- i18n("&About KTTSMgr"), this, SLOT(aboutSelected()));
+ i18n("&About KTTSMgr"), this, TQT_SLOT(aboutSelected()));
- connect(this, SIGNAL(quitSelected()), this, SLOT(quitSelected()));
+ connect(this, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(quitSelected()));
// If --autoexit option given, exit when speaking stops.
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
if (args->isSet("autoexit"))
{
connectDCOPSignal("kttsd", "KSpeech",
- "textFinished(QCString,uint)",
- "textFinished(QCString,uint)",
+ "textFinished(TQCString,uint)",
+ "textFinished(TQCString,uint)",
false);
// Install an event filter so we can check when KTTSMgr becomes inconified to the systray.
parent->installEventFilter(this);
@@ -209,15 +209,15 @@ KttsMgrTray::~KttsMgrTray()
delete m_toolTip;
}
-void KttsMgrTray::textFinished(const QCString& /*appId*/, uint /*jobNum*/)
+void KttsMgrTray::textFinished(const TQCString& /*appId*/, uint /*jobNum*/)
{
// kdDebug() << "KttsMgrTray::textFinished: running" << endl;
exitWhenFinishedSpeaking();
}
-/*virtual*/ bool KttsMgrTray::eventFilter( QObject* /*o*/, QEvent* e )
+/*virtual*/ bool KttsMgrTray::eventFilter( TQObject* /*o*/, TQEvent* e )
{
- if ( e->type() == QEvent::Hide ) exitWhenFinishedSpeaking();
+ if ( e->type() == TQEvent::Hide ) exitWhenFinishedSpeaking();
return false;
}
@@ -225,8 +225,8 @@ void KttsMgrTray::exitWhenFinishedSpeaking()
{
// kdDebug() << "KttsMgrTray::exitWhenFinishedSpeaking: running" << endl;
if ( parentWidget()->isShown() ) return;
- QString jobNums = getTextJobNumbers();
- QStringList jobNumsList = QStringList::split(jobNums, ",");
+ TQString jobNums = getTextJobNumbers();
+ TQStringList jobNumsList = TQStringList::split(jobNums, ",");
uint jobNumsListCount = jobNumsList.count();
// Since there can only be 2 Finished jobs at a time, more than 2 jobs means at least
// one job is not Finished.
@@ -244,7 +244,7 @@ void KttsMgrTray::exitWhenFinishedSpeaking()
* @param state KTTSD job state
* @return Display string for the state.
*/
-QString KttsMgrTray::stateToStr(int state)
+TQString KttsMgrTray::stateToStr(int state)
{
switch( state )
{
@@ -257,11 +257,11 @@ QString KttsMgrTray::stateToStr(int state)
}
}
-QString KttsMgrTray::getStatus()
+TQString KttsMgrTray::getStatus()
{
if (!isKttsdRunning()) return i18n("Text-to-Speech System is not running");
uint jobCount = getTextJobCount();
- QString status = i18n("1 job", "%n jobs", jobCount);
+ TQString status = i18n("1 job", "%n jobs", jobCount);
if (jobCount > 0)
{
uint job = getCurrentTextJob();
@@ -283,8 +283,8 @@ void KttsMgrTray::speakClipboardSelected()
{
if (!isKttsdRunning())
{
- QString error;
- if (KApplication::startServiceByDesktopName("kttsd", QStringList(), &error) != 0)
+ TQString error;
+ if (KApplication::startServiceByDesktopName("kttsd", TQStringList(), &error) != 0)
kdError() << "Starting KTTSD failed with message " << error << endl;
}
speakClipboard();
@@ -298,7 +298,7 @@ void KttsMgrTray::aboutSelected()
void KttsMgrTray::helpSelected()
{
- kapp->invokeHelp(QString::null,"kttsd");
+ kapp->invokeHelp(TQString::null,"kttsd");
}
void KttsMgrTray::quitSelected()
diff --git a/kttsd/kttsmgr/kttsmgr.h b/kttsd/kttsmgr/kttsmgr.h
index e13233a..21f54a7 100644
--- a/kttsd/kttsmgr/kttsmgr.h
+++ b/kttsd/kttsmgr/kttsmgr.h
@@ -26,8 +26,8 @@
#define KTTSMGR_H
// Qt includes.
-#include <qevent.h>
-#include <qtooltip.h>
+#include <tqevent.h>
+#include <tqtooltip.h>
// KDE includes.
#include <ksystemtray.h>
@@ -39,10 +39,10 @@
class KttsToolTip: public QToolTip
{
public:
- KttsToolTip ( QWidget* parent );
+ KttsToolTip ( TQWidget* parent );
protected:
- virtual void maybeTip ( const QPoint & p );
+ virtual void maybeTip ( const TQPoint & p );
};
class KttsMgrTray: public KSystemTray, public KSpeech_stub, virtual public KSpeechSink
@@ -50,16 +50,16 @@ class KttsMgrTray: public KSystemTray, public KSpeech_stub, virtual public KSpee
Q_OBJECT
public:
- KttsMgrTray(QWidget *parent=0);
+ KttsMgrTray(TQWidget *parent=0);
~KttsMgrTray();
void setExitWhenFinishedSpeaking();
- QString getStatus();
+ TQString getStatus();
protected:
- // ASYNC textStarted(const QCString& appId, uint jobNum);
- ASYNC textFinished(const QCString& appId, uint jobNum);
- virtual bool eventFilter( QObject* o, QEvent* e );
+ // ASYNC textStarted(const TQCString& appId, uint jobNum);
+ ASYNC textFinished(const TQCString& appId, uint jobNum);
+ virtual bool eventFilter( TQObject* o, TQEvent* e );
private slots:
@@ -76,7 +76,7 @@ class KttsMgrTray: public KSystemTray, public KSpeech_stub, virtual public KSpee
* @param state KTTSD job state
* @return Display string for the state.
*/
- QString stateToStr(int state);
+ TQString stateToStr(int state);
bool isKttsdRunning();
void exitWhenFinishedSpeaking();
diff --git a/kttsd/libkttsd/filterconf.cpp b/kttsd/libkttsd/filterconf.cpp
index 43e62bc..4947698 100644
--- a/kttsd/libkttsd/filterconf.cpp
+++ b/kttsd/libkttsd/filterconf.cpp
@@ -27,9 +27,9 @@
#include <sys/param.h>
// Qt includes.
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
// KDE includes.
#include <kglobal.h>
@@ -42,12 +42,12 @@
/**
* Constructor
*/
-KttsFilterConf::KttsFilterConf( QWidget *parent, const char *name) : QWidget(parent, name){
+KttsFilterConf::KttsFilterConf( TQWidget *parent, const char *name) : TQWidget(parent, name){
// kdDebug() << "KttsFilterConf::KttsFilterConf: Running" << endl;
- QString systemPath(getenv("PATH"));
+ TQString systemPath(getenv("PATH"));
// kdDebug() << "Path is " << systemPath << endl;
KGlobal::locale()->insertCatalogue("kttsd");
- m_path = QStringList::split(":", systemPath);
+ m_path = TQStringList::split(":", systemPath);
}
/**
@@ -70,7 +70,7 @@ KttsFilterConf::~KttsFilterConf(){
* @param configGroup Call config->setGroup with this argument before
* loading your configuration.
*/
-void KttsFilterConf::load(KConfig* /*config*/, const QString& /*configGroup*/){
+void KttsFilterConf::load(KConfig* /*config*/, const TQString& /*configGroup*/){
// kdDebug() << "KttsFilterConf::load: Running" << endl;
}
@@ -84,7 +84,7 @@ void KttsFilterConf::load(KConfig* /*config*/, const QString& /*configGroup*/){
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
-void KttsFilterConf::save(KConfig* /*config*/, const QString& /*configGroup*/){
+void KttsFilterConf::save(KConfig* /*config*/, const TQString& /*configGroup*/){
// kdDebug() << "KttsFilterConf::save: Running" << endl;
}
@@ -114,7 +114,7 @@ bool KttsFilterConf::supportsMultiInstance() { return false; }
* return an empty string.
* @return Filter instance name.
*/
-QString KttsFilterConf::userPlugInName() { return QString::null; }
+TQString KttsFilterConf::userPlugInName() { return TQString::null; }
/**
* Returns True if this filter is a Sentence Boundary Detector.
@@ -128,23 +128,23 @@ bool KttsFilterConf::isSBD() { return false; }
* @returns The path to the file on success, a blank QString
* if its not found.
*/
-QString KttsFilterConf::getLocation(const QString &name) {
+TQString KttsFilterConf::getLocation(const TQString &name) {
// Iterate over the path and see if 'name' exists in it. Return the
- // full path to it if it does. Else return an empty QString.
- if (QFile::exists(name)) return name;
+ // full path to it if it does. Else return an empty TQString.
+ if (TQFile::exists(name)) return name;
// kdDebug() << "KttsFilterConf::getLocation: Searching for " << name << " in the path.." << endl;
// kdDebug() << m_path << endl;
- for(QStringList::iterator it = m_path.begin(); it != m_path.end(); ++it) {
- QString fullName = *it;
+ for(TQStringList::iterator it = m_path.begin(); it != m_path.end(); ++it) {
+ TQString fullName = *it;
fullName += "/";
fullName += name;
// The user either has the directory of the file in the path...
- if(QFile::exists(fullName)) {
+ if(TQFile::exists(fullName)) {
// kdDebug() << "KttsFilterConf:getLocation: " << fullName << endl;
return fullName;
}
// ....Or the file itself
- else if(QFileInfo(*it).baseName().append(QString(".").append(QFileInfo(*it).extension())) == name) {
+ else if(TQFileInfo(*it).baseName().append(TQString(".").append(TQFileInfo(*it).extension())) == name) {
// kdDebug() << "KttsFilterConf:getLocation: " << fullName << endl;
return fullName;
}
@@ -152,15 +152,15 @@ QString KttsFilterConf::getLocation(const QString &name) {
return "";
}
-/*static*/ QString KttsFilterConf::realFilePath(const QString &filename)
+/*static*/ TQString KttsFilterConf::realFilePath(const TQString &filename)
{
char realpath_buffer[MAXPATHLEN + 1];
memset(realpath_buffer, 0, MAXPATHLEN + 1);
/* If the path contains symlinks, get the real name */
- if (realpath( QFile::encodeName(filename).data(), realpath_buffer) != 0) {
+ if (realpath( TQFile::encodeName(filename).data(), realpath_buffer) != 0) {
//succes, use result from realpath
- return QFile::decodeName(realpath_buffer);
+ return TQFile::decodeName(realpath_buffer);
}
return filename;
}
diff --git a/kttsd/libkttsd/filterconf.h b/kttsd/libkttsd/filterconf.h
index 42055d8..7fdc8e4 100644
--- a/kttsd/libkttsd/filterconf.h
+++ b/kttsd/libkttsd/filterconf.h
@@ -26,7 +26,7 @@
#define _FILTERCONF_H_
// Qt includes.
-#include <qwidget.h>
+#include <tqwidget.h>
// KDE includes.
#include <kconfig.h>
@@ -41,7 +41,7 @@ class KDE_EXPORT KttsFilterConf : public QWidget{
/**
* Constructor
*/
- KttsFilterConf( QWidget *parent = 0, const char *name = 0);
+ KttsFilterConf( TQWidget *parent = 0, const char *name = 0);
/**
* Destructor
@@ -66,7 +66,7 @@ class KDE_EXPORT KttsFilterConf : public QWidget{
* any instance-specific parameters to load, but it may still wish
* to load parameters that apply to all instances of the plugin.
*/
- virtual void load(KConfig *config, const QString &configGroup);
+ virtual void load(KConfig *config, const TQString &configGroup);
/**
* This function gets called when the user wants to save the settings in
@@ -78,7 +78,7 @@ class KDE_EXPORT KttsFilterConf : public QWidget{
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
- virtual void save(KConfig *config, const QString &configGroup);
+ virtual void save(KConfig *config, const TQString &configGroup);
/**
* This function is called to set the settings in the module to sensible
@@ -104,7 +104,7 @@ class KDE_EXPORT KttsFilterConf : public QWidget{
* return an empty string.
* @return Filter instance name.
*/
- virtual QString userPlugInName();
+ virtual TQString userPlugInName();
/**
* Returns True if this filter is a Sentence Boundary Detector.
@@ -112,7 +112,7 @@ class KDE_EXPORT KttsFilterConf : public QWidget{
*/
virtual bool isSBD();
- static QString realFilePath(const QString &filename);
+ static TQString realFilePath(const TQString &filename);
public slots:
/**
@@ -140,10 +140,10 @@ class KDE_EXPORT KttsFilterConf : public QWidget{
* @returns The path to the file on success, a blank QString
* if its not found.
*/
- QString getLocation(const QString &name);
+ TQString getLocation(const TQString &name);
- /// The system path in a QStringList.
- QStringList m_path;
+ /// The system path in a TQStringList.
+ TQStringList m_path;
};
#endif //_FILTERCONF_H_
diff --git a/kttsd/libkttsd/filterproc.cpp b/kttsd/libkttsd/filterproc.cpp
index 178dec2..8de5c62 100644
--- a/kttsd/libkttsd/filterproc.cpp
+++ b/kttsd/libkttsd/filterproc.cpp
@@ -31,8 +31,8 @@
/**
* Constructor.
*/
-KttsFilterProc::KttsFilterProc( QObject *parent, const char *name) :
- QObject(parent, name)
+KttsFilterProc::KttsFilterProc( TQObject *parent, const char *name) :
+ TQObject(parent, name)
{
// kdDebug() << "KttsFilterProc::KttsFilterProc: Running" << endl;
}
@@ -54,7 +54,7 @@ KttsFilterProc::~KttsFilterProc()
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
-bool KttsFilterProc::init(KConfig* /*config*/, const QString& /*configGroup*/){
+bool KttsFilterProc::init(KConfig* /*config*/, const TQString& /*configGroup*/){
// kdDebug() << "PlugInProc::init: Running" << endl;
return false;
}
@@ -87,8 +87,8 @@ bool KttsFilterProc::init(KConfig* /*config*/, const QString& /*configGroup*/){
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
-/*virtual*/ QString KttsFilterProc::convert(const QString& inputText, TalkerCode* /*talkerCode*/,
- const QCString& /*appId*/)
+/*virtual*/ TQString KttsFilterProc::convert(const TQString& inputText, TalkerCode* /*talkerCode*/,
+ const TQCString& /*appId*/)
{
return inputText;
}
@@ -107,8 +107,8 @@ bool KttsFilterProc::init(KConfig* /*config*/, const QString& /*configGroup*/){
* program may then call @ref getOutput to retrieve converted text. Calling
* program must call @ref ackFinished to acknowledge the conversion.
*/
-/*virtual*/ bool KttsFilterProc::asyncConvert(const QString& /*inputText*/,
- TalkerCode* /*talkerCode*/, const QCString& /*appId*/) { return false; }
+/*virtual*/ bool KttsFilterProc::asyncConvert(const TQString& /*inputText*/,
+ TalkerCode* /*talkerCode*/, const TQCString& /*appId*/) { return false; }
/**
* Waits for a previous call to asyncConvert to finish.
@@ -123,7 +123,7 @@ bool KttsFilterProc::init(KConfig* /*config*/, const QString& /*configGroup*/){
/**
* Returns the filtered output.
*/
-/*virtual*/ QString KttsFilterProc::getOutput() { return QString::null; }
+/*virtual*/ TQString KttsFilterProc::getOutput() { return TQString::null; }
/**
* Acknowledges the finished filtering.
@@ -148,6 +148,6 @@ bool KttsFilterProc::init(KConfig* /*config*/, const QString& /*configGroup*/){
*
* @param re The sentence delimiter regular expression.
*/
-/*virtual*/ void KttsFilterProc::setSbRegExp(const QString& /*re*/) { }
+/*virtual*/ void KttsFilterProc::setSbRegExp(const TQString& /*re*/) { }
#include "filterproc.moc"
diff --git a/kttsd/libkttsd/filterproc.h b/kttsd/libkttsd/filterproc.h
index ef7972c..bc11921 100644
--- a/kttsd/libkttsd/filterproc.h
+++ b/kttsd/libkttsd/filterproc.h
@@ -26,8 +26,8 @@
#define _FILTERPROC_H_
// Qt includes.
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
// KDE includes.
#include <kdemacros.h>
@@ -51,7 +51,7 @@ public:
/**
* Constructor.
*/
- KttsFilterProc( QObject *parent, const char *name );
+ KttsFilterProc( TQObject *parent, const char *name );
/**
* Destructor.
@@ -67,7 +67,7 @@ public:
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Returns True if this filter is a Sentence Boundary Detector.
@@ -97,7 +97,7 @@ public:
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
- virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId);
+ virtual TQString convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId);
/**
* Convert input. Runs asynchronously.
@@ -113,7 +113,7 @@ public:
* program may then call @ref getOutput to retrieve converted text. Calling
* program must call @ref ackFinished to acknowledge the conversion.
*/
- virtual bool asyncConvert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId);
+ virtual bool asyncConvert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId);
/**
* Waits for a previous call to asyncConvert to finish.
@@ -128,7 +128,7 @@ public:
/**
* Returns the filtered output.
*/
- virtual QString getOutput();
+ virtual TQString getOutput();
/**
* Acknowledges the finished filtering.
@@ -153,7 +153,7 @@ public:
*
* @param re The sentence delimiter regular expression.
*/
- virtual void setSbRegExp(const QString& re);
+ virtual void setSbRegExp(const TQString& re);
signals:
/**
@@ -173,7 +173,7 @@ signals:
* @param keepGoing False if the filter should not be called in the future.
* @param msg Error message.
*/
- void error(bool keepGoing, const QString &msg);
+ void error(bool keepGoing, const TQString &msg);
};
#endif // _FILTERPROC_H_
diff --git a/kttsd/libkttsd/notify.cpp b/kttsd/libkttsd/notify.cpp
index fd28587..c633779 100644
--- a/kttsd/libkttsd/notify.cpp
+++ b/kttsd/libkttsd/notify.cpp
@@ -18,8 +18,8 @@
// Qt includes.
// Qt includes.
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
// KDE includes.
#include <kconfig.h>
@@ -29,23 +29,23 @@
// KTTS includes.
#include "notify.h"
-static QStringList* s_actionNames = 0;
-static KStaticDeleter<QStringList> s_actionNames_sd;
+static TQStringList* s_actionNames = 0;
+static KStaticDeleter<TQStringList> s_actionNames_sd;
-static QStringList* s_actionDisplayNames = 0;
-static KStaticDeleter<QStringList> s_actionDisplayNames_sd;
+static TQStringList* s_actionDisplayNames = 0;
+static KStaticDeleter<TQStringList> s_actionDisplayNames_sd;
static void notifyaction_init()
{
if ( !s_actionNames )
{
- s_actionNames_sd.setObject(s_actionNames, new QStringList);
+ s_actionNames_sd.setObject(s_actionNames, new TQStringList);
s_actionNames->append( "SpeakEventName" );
s_actionNames->append( "SpeakMsg" );
s_actionNames->append( "DoNotSpeak" );
s_actionNames->append( "SpeakCustom" );
- s_actionDisplayNames_sd.setObject(s_actionDisplayNames, new QStringList);
+ s_actionDisplayNames_sd.setObject(s_actionDisplayNames, new TQStringList);
s_actionDisplayNames->append( i18n("Speak event name") );
s_actionDisplayNames->append( i18n("Speak the notification message") );
s_actionDisplayNames->append( i18n("Do not speak the notification") );
@@ -59,25 +59,25 @@ static void notifyaction_init()
return s_actionNames->count();
}
-/*static*/ QString NotifyAction::actionName( const int action )
+/*static*/ TQString NotifyAction::actionName( const int action )
{
notifyaction_init();
return (*s_actionNames)[ action ];
}
-/*static*/ int NotifyAction::action( const QString& actionName )
+/*static*/ int NotifyAction::action( const TQString& actionName )
{
notifyaction_init();
return s_actionNames->findIndex( actionName );
}
-/*static*/ QString NotifyAction::actionDisplayName( const int action )
+/*static*/ TQString NotifyAction::actionDisplayName( const int action )
{
notifyaction_init();
return (*s_actionDisplayNames)[ action ];
}
-/*static*/ QString NotifyAction::actionDisplayName( const QString& actionName )
+/*static*/ TQString NotifyAction::actionDisplayName( const TQString& actionName )
{
notifyaction_init();
return (*s_actionDisplayNames)[ action( actionName ) ];
@@ -85,24 +85,24 @@ static void notifyaction_init()
// --------------------------------------------------------------------
-static QStringList* s_presentNames = 0;
-static KStaticDeleter<QStringList> s_presentNames_sd;
+static TQStringList* s_presentNames = 0;
+static KStaticDeleter<TQStringList> s_presentNames_sd;
-static QStringList* s_presentDisplayNames = 0;
-static KStaticDeleter<QStringList> s_presentDisplayNames_sd;
+static TQStringList* s_presentDisplayNames = 0;
+static KStaticDeleter<TQStringList> s_presentDisplayNames_sd;
static void notifypresent_init()
{
if ( !s_presentNames )
{
- s_presentNames_sd.setObject( s_presentNames, new QStringList );
+ s_presentNames_sd.setObject( s_presentNames, new TQStringList );
s_presentNames->append( "None" );
s_presentNames->append( "Dialog" );
s_presentNames->append( "Passive" );
s_presentNames->append( "DialogAndPassive" );
s_presentNames->append( "All" );
- s_presentDisplayNames_sd.setObject( s_presentDisplayNames, new QStringList );
+ s_presentDisplayNames_sd.setObject( s_presentDisplayNames, new TQStringList );
s_presentDisplayNames->append( i18n("none") );
s_presentDisplayNames->append( i18n("notification dialogs") );
s_presentDisplayNames->append( i18n("passive popups") );
@@ -117,25 +117,25 @@ static void notifypresent_init()
return s_presentNames->count();
}
-/*static*/ QString NotifyPresent::presentName( const int present )
+/*static*/ TQString NotifyPresent::presentName( const int present )
{
notifypresent_init();
return (*s_presentNames)[ present ];
}
-/*static*/ int NotifyPresent::present( const QString& presentName )
+/*static*/ int NotifyPresent::present( const TQString& presentName )
{
notifypresent_init();
return s_presentNames->findIndex( presentName );
}
-/*static*/ QString NotifyPresent::presentDisplayName( const int present )
+/*static*/ TQString NotifyPresent::presentDisplayName( const int present )
{
notifypresent_init();
return (*s_presentDisplayNames)[ present ];
}
-/*static*/ QString NotifyPresent::presentDisplayName( const QString& presentName )
+/*static*/ TQString NotifyPresent::presentDisplayName( const TQString& presentName )
{
notifypresent_init();
return (*s_presentDisplayNames)[ present( presentName ) ];
@@ -146,12 +146,12 @@ static void notifypresent_init()
/**
* Retrieves the displayable name for an event source.
*/
-/*static*/ QString NotifyEvent::getEventSrcName(const QString& eventSrc, QString& iconName)
+/*static*/ TQString NotifyEvent::getEventSrcName(const TQString& eventSrc, TQString& iconName)
{
- QString configFilename = eventSrc + QString::fromLatin1( "/eventsrc" );
+ TQString configFilename = eventSrc + TQString::fromLatin1( "/eventsrc" );
KConfig* config = new KConfig( configFilename, true, false, "data" );
- config->setGroup( QString::fromLatin1( "!Global!" ) );
- QString appDesc = config->readEntry( "Comment", i18n("No description available") );
+ config->setGroup( TQString::fromLatin1( "!Global!" ) );
+ TQString appDesc = config->readEntry( "Comment", i18n("No description available") );
iconName = config->readEntry( "IconName" );
delete config;
return appDesc;
@@ -160,16 +160,16 @@ static void notifypresent_init()
/**
* Retrieves the displayable name for an event from an event source.
*/
-/*static*/ QString NotifyEvent::getEventName(const QString& eventSrc, const QString& event)
+/*static*/ TQString NotifyEvent::getEventName(const TQString& eventSrc, const TQString& event)
{
- QString eventName;
- QString configFilename = eventSrc + QString::fromLatin1( "/eventsrc" );
+ TQString eventName;
+ TQString configFilename = eventSrc + TQString::fromLatin1( "/eventsrc" );
KConfig* config = new KConfig( configFilename, true, false, "data" );
if ( config->hasGroup( event ) )
{
config->setGroup( event );
- eventName = config->readEntry( QString::fromLatin1( "Comment" ),
- config->readEntry( QString::fromLatin1( "Name" )));
+ eventName = config->readEntry( TQString::fromLatin1( "Comment" ),
+ config->readEntry( TQString::fromLatin1( "Name" )));
}
delete config;
return eventName;
diff --git a/kttsd/libkttsd/notify.h b/kttsd/libkttsd/notify.h
index 2a8162d..b1e31bb 100644
--- a/kttsd/libkttsd/notify.h
+++ b/kttsd/libkttsd/notify.h
@@ -36,10 +36,10 @@ public:
};
static int count();
- static QString actionName( const int action );
- static int action( const QString& actionName );
- static QString actionDisplayName( const int action );
- static QString actionDisplayName( const QString& actionName );
+ static TQString actionName( const int action );
+ static int action( const TQString& actionName );
+ static TQString actionDisplayName( const int action );
+ static TQString actionDisplayName( const TQString& actionName );
};
// --------------------------------------------------------------------
@@ -59,10 +59,10 @@ public:
};
static int count();
- static QString presentName( const int present );
- static int present( const QString& presentName );
- static QString presentDisplayName( const int present );
- static QString presentDisplayName( const QString& presentName );
+ static TQString presentName( const int present );
+ static int present( const TQString& presentName );
+ static TQString presentDisplayName( const int present );
+ static TQString presentDisplayName( const TQString& presentName );
};
// --------------------------------------------------------------------
@@ -74,12 +74,12 @@ public:
/**
* Retrieves the displayable name for an event source.
*/
- static QString getEventSrcName(const QString& eventSrc, QString& iconName);
+ static TQString getEventSrcName(const TQString& eventSrc, TQString& iconName);
/**
* Retrieves the displayable name for an event from an event source.
*/
- static QString getEventName(const QString& eventSrc, const QString& event);
+ static TQString getEventName(const TQString& eventSrc, const TQString& event);
};
#endif // _NOTIFYACTION_H
diff --git a/kttsd/libkttsd/player.h b/kttsd/libkttsd/player.h
index ff4d240..f83c5b4 100644
--- a/kttsd/libkttsd/player.h
+++ b/kttsd/libkttsd/player.h
@@ -16,8 +16,8 @@
#ifndef PLAYER_H
#define PLAYER_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include <kdemacros.h>
#include "kdeexportfix.h"
#include "kglobal.h"
@@ -33,7 +33,7 @@ public:
virtual ~Player() {}
// virtual void play(const FileHandle &file = FileHandle::null()) = 0;
- virtual void startPlay(const QString& file) = 0;
+ virtual void startPlay(const TQString& file) = 0;
virtual void pause() = 0;
virtual void stop() = 0;
@@ -50,11 +50,11 @@ public:
virtual void seek(int seekTime) = 0;
virtual void seekPosition(int position) = 0;
- virtual QStringList getPluginList( const QCString& classname ) {
+ virtual TQStringList getPluginList( const TQCString& classname ) {
Q_UNUSED(classname);
- return QStringList();
+ return TQStringList();
}
- virtual void setSinkName(const QString &sinkName) { Q_UNUSED(sinkName); }
+ virtual void setSinkName(const TQString &sinkName) { Q_UNUSED(sinkName); }
virtual bool requireVersion(uint major, uint minor, uint micro) {
Q_UNUSED(major);
Q_UNUSED(minor);
@@ -66,8 +66,8 @@ public:
virtual void setPeriods(uint periods) {Q_UNUSED(periods); }
protected:
- Player(QObject* parent = 0, const char* name = 0, const QStringList& args=QStringList() ) :
- QObject(parent, name) {
+ Player(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList() ) :
+ TQObject(parent, name) {
Q_UNUSED(args);
}
diff --git a/kttsd/libkttsd/pluginconf.cpp b/kttsd/libkttsd/pluginconf.cpp
index d2fb4b6..f23eaed 100644
--- a/kttsd/libkttsd/pluginconf.cpp
+++ b/kttsd/libkttsd/pluginconf.cpp
@@ -20,9 +20,9 @@
#include <sys/param.h>
// Qt includes.
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
// KDE includes.
#include <kglobal.h>
@@ -36,12 +36,12 @@
/**
* Constructor
*/
-PlugInConf::PlugInConf( QWidget *parent, const char *name) : QWidget(parent, name){
+PlugInConf::PlugInConf( TQWidget *parent, const char *name) : TQWidget(parent, name){
kdDebug() << "PlugInConf::PlugInConf: Running" << endl;
KGlobal::locale()->insertCatalogue("kttsd");
- QString systemPath(getenv("PATH"));
+ TQString systemPath(getenv("PATH"));
// kdDebug() << "Path is " << systemPath << endl;
- m_path = QStringList::split(":", systemPath);
+ m_path = TQStringList::split(":", systemPath);
m_player = 0;
}
@@ -66,7 +66,7 @@ PlugInConf::~PlugInConf(){
* @param configGroup Call config->setGroup with this argument before
* loading your configuration.
*/
-void PlugInConf::load(KConfig* /*config*/, const QString& /*configGroup*/){
+void PlugInConf::load(KConfig* /*config*/, const TQString& /*configGroup*/){
kdDebug() << "PlugInConf::load: Running" << endl;
}
@@ -80,7 +80,7 @@ void PlugInConf::load(KConfig* /*config*/, const QString& /*configGroup*/){
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
-void PlugInConf::save(KConfig* /*config*/, const QString& /*configGroup*/){
+void PlugInConf::save(KConfig* /*config*/, const TQString& /*configGroup*/){
kdDebug() << "PlugInConf::save: Running" << endl;
}
@@ -110,22 +110,22 @@ bool PlugInConf::supportsMultiInstance() { return true; }
* 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 QString::null, no specific language has
+* If the passed-in code is TQString::null, no specific language has
* been chosen.
* @param lang The desired language code or Null if none.
*
* If the plugin is unable to support the desired language, that is OK.
*/
-void PlugInConf::setDesiredLanguage(const QString& /*lang*/ ) { }
+void PlugInConf::setDesiredLanguage(const TQString& /*lang*/ ) { }
/**
* 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 QString::null.
+* i.e., cannot yet synthesize, return TQString::null.
* @return Fully-specified talker code.
*/
-QString PlugInConf::getTalkerCode() { return QString::null; }
+TQString PlugInConf::getTalkerCode() { return TQString::null; }
/**
* Return a list of all the languages currently supported by the plugin.
@@ -136,9 +136,9 @@ QString PlugInConf::getTalkerCode() { return QString::null; }
* plugin might support.
* If your plugin cannot yet determine the languages supported, return Null.
* If your plugin can support any language, return Null.
-* @return A QStringList of supported language codes, or Null if unknown.
+* @return A TQStringList of supported language codes, or Null if unknown.
*/
-QStringList PlugInConf::getSupportedLanguages() { return QStringList(); }
+TQStringList PlugInConf::getSupportedLanguages() { return TQStringList(); }
/**
* Return the full path to any program in the $PATH environmental variable
@@ -146,29 +146,29 @@ QStringList PlugInConf::getSupportedLanguages() { return QStringList(); }
* @returns The path to the file on success, a blank QString
* if its not found.
*/
-QString PlugInConf::getLocation(const QString &name) {
+TQString PlugInConf::getLocation(const TQString &name) {
// Iterate over the path and see if 'name' exists in it. Return the
- // full path to it if it does. Else return an empty QString.
+ // full path to it if it does. Else return an empty TQString.
// If it's a file or a symlink pointing to a file, that's cool.
- QFileInfo fileinfo(name);
- if (fileinfo.isFile() || (fileinfo.isSymLink() && QFileInfo(fileinfo.readLink()).isFile()))
+ TQFileInfo fileinfo(name);
+ if (fileinfo.isFile() || (fileinfo.isSymLink() && TQFileInfo(fileinfo.readLink()).isFile()))
return name;
kdDebug() << "PluginConf::getLocation: Searching for " << name << " in the path.." << endl;
kdDebug() << m_path << endl;
- for(QStringList::iterator it = m_path.begin(); it != m_path.end(); ++it) {
- QString fullName = *it;
+ for(TQStringList::iterator it = m_path.begin(); it != m_path.end(); ++it) {
+ TQString fullName = *it;
fullName += "/";
fullName += name;
fileinfo.setFile(fullName);
// The user either has the directory of the file in the path...
- if(fileinfo.isFile() || (fileinfo.isSymLink() && QFileInfo(fileinfo.readLink()).isFile())) {
+ if(fileinfo.isFile() || (fileinfo.isSymLink() && TQFileInfo(fileinfo.readLink()).isFile())) {
return fullName;
// kdDebug() << "PluginConf:getLocation: " << fullName << endl;
}
// ....Or the file itself in the path (slightly freaky but hey.)
- else if(QFileInfo(*it).baseName().append(QString(".").append(QFileInfo(*it).extension())) == name) {
+ else if(TQFileInfo(*it).baseName().append(TQString(".").append(TQFileInfo(*it).extension())) == name) {
return fullName;
// kdDebug() << "PluginConf:getLocation: " << fullName << endl;
}
@@ -182,41 +182,41 @@ QString PlugInConf::getLocation(const QString &name) {
* @return countryCode Just the country code part (if any).
* @return Just the language code part.
*/
-QString PlugInConf::splitLanguageCode(const QString& languageCode, QString& countryCode)
+TQString PlugInConf::splitLanguageCode(const TQString& languageCode, TQString& countryCode)
{
- QString locale = languageCode;
- QString langCode;
- QString charSet;
+ TQString locale = languageCode;
+ TQString langCode;
+ TQString charSet;
KGlobal::locale()->splitLocale(locale, langCode, countryCode, charSet);
return langCode;
}
-/*static*/ QString PlugInConf::realFilePath(const QString &filename)
+/*static*/ TQString PlugInConf::realFilePath(const TQString &filename)
{
char realpath_buffer[MAXPATHLEN + 1];
memset(realpath_buffer, 0, MAXPATHLEN + 1);
/* If the path contains symlinks, get the real name */
- if (realpath( QFile::encodeName(filename).data(), realpath_buffer) != 0) {
+ if (realpath( TQFile::encodeName(filename).data(), realpath_buffer) != 0) {
// succes, use result from realpath
- return QFile::decodeName(realpath_buffer);
+ return TQFile::decodeName(realpath_buffer);
}
return filename;
}
-/*static*/ QString PlugInConf::testMessage(const QString& languageCode)
+/*static*/ TQString PlugInConf::testMessage(const TQString& languageCode)
{
- QString key = "Name[" + languageCode + "]";
- QString result;
- QString def;
- QFile file(locate("data", "kttsd/kcmkttsd_testmessage.desktop"));
+ TQString key = "Name[" + languageCode + "]";
+ TQString result;
+ TQString def;
+ TQFile file(locate("data", "kttsd/kcmkttsd_testmessage.desktop"));
if (file.open(IO_ReadOnly))
{
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
while ( !stream.atEnd() ) {
- QString line = stream.readLine(); // line of text excluding '\n'
- QStringList keyAndValue = QStringList::split("=", line);
+ TQString line = stream.readLine(); // line of text excluding '\n'
+ TQStringList keyAndValue = TQStringList::split("=", line);
if (keyAndValue.count() == 2)
{
if (keyAndValue[0] == key)
diff --git a/kttsd/libkttsd/pluginconf.h b/kttsd/libkttsd/pluginconf.h
index 4c4647c..90d3cec 100644
--- a/kttsd/libkttsd/pluginconf.h
+++ b/kttsd/libkttsd/pluginconf.h
@@ -19,7 +19,7 @@
#define _PLUGINCONF_H_
// Qt includes.
-#include <qwidget.h>
+#include <tqwidget.h>
// KDE includes.
#include <kconfig.h>
@@ -125,7 +125,7 @@
* Next, @ref getTalkerCode
* will be called. If your plugin can automatically configure itself to the desired
* language, it should do so and return a fully-specified talker code. If your
-* plugin is not yet ready and requires user help, return QString::null. Note that
+* plugin is not yet ready and requires user help, return TQString::null. Note that
* @ref setDesiredLanguage may be Null, in which case, you should allow the
* user to configure your plugin to any of your supported languages.
*
@@ -138,7 +138,7 @@
* - @e lang. If user has completed configuring your plugin, i.e., it is
* ready to begin synthesizing, return the ISO 639-1 language code
* for the language it can synthesize. If your plugin is not yet
-* fully configured, you should return QString::null for the entire
+* fully configured, you should return TQString::null for the entire
* talker code. If your plugin supports a specific national version
* of a language, that should also be included using the ISO 3166
* country code separated from the language code by underscore (_).
@@ -214,7 +214,7 @@ class KDE_EXPORT PlugInConf : public QWidget{
/**
* Constructor
*/
- PlugInConf( QWidget *parent = 0, const char *name = 0);
+ PlugInConf( TQWidget *parent = 0, const char *name = 0);
/**
* Destructor
@@ -241,7 +241,7 @@ class KDE_EXPORT PlugInConf : public QWidget{
*
* @see loadandsavemethods
*/
- virtual void load(KConfig *config, const QString &configGroup);
+ virtual void load(KConfig *config, const TQString &configGroup);
/**
* This function gets called when the user wants to save the settings in
@@ -257,7 +257,7 @@ class KDE_EXPORT PlugInConf : public QWidget{
* it is not necessary to save the language code, unless your plugin needs it in
* order to synthesize speech.
*/
- virtual void save(KConfig *config, const QString &configGroup);
+ virtual void save(KConfig *config, const TQString &configGroup);
/**
* This function is called to set the settings in the module to sensible
@@ -281,7 +281,7 @@ class KDE_EXPORT PlugInConf : public QWidget{
* 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 QString::null, no specific language has
+ * If the passed-in code is TQString::null, no specific language has
* been chosen.
* @param lang The desired language code or Null if none.
*
@@ -293,21 +293,21 @@ class KDE_EXPORT PlugInConf : public QWidget{
* not the given country, treat it as though the country
* code were not specified, i.e., adapt to the given language.
*/
- virtual void setDesiredLanguage(const QString &lang);
+ virtual void setDesiredLanguage(const TQString &lang);
/**
* 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 QString::null.
+ * i.e., cannot yet synthesize, return TQString::null.
* @return Fully-specified talker code.
*/
- virtual QString getTalkerCode();
+ virtual TQString getTalkerCode();
/**
* Return a list of all the languages possibly supported by the plugin.
* If your plugin can support any language, return Null.
- * @return A QStringList of supported language and optional country
+ * @return A TQStringList of supported language and optional country
* codes, or Null if any.
*
* The languge codes are given in ISO 639-1. Lowercase should be used.
@@ -321,7 +321,7 @@ class KDE_EXPORT PlugInConf : public QWidget{
* es_CL
* The list you return should be as specific as practicable.
*/
- virtual QStringList getSupportedLanguages();
+ virtual TQStringList getSupportedLanguages();
/**
* Player object that can be used by the plugin for testing playback of synthed files.
@@ -329,9 +329,9 @@ class KDE_EXPORT PlugInConf : public QWidget{
void setPlayer(TestPlayer* player);
TestPlayer* getPlayer();
- static QString realFilePath(const QString &filename);
+ static TQString realFilePath(const TQString &filename);
- static QString testMessage(const QString& languageCode);
+ static TQString testMessage(const TQString& languageCode);
public slots:
/**
@@ -359,7 +359,7 @@ class KDE_EXPORT PlugInConf : public QWidget{
* @returns The path to the file on success, a blank QString
* if its not found.
*/
- QString getLocation(const QString &name);
+ TQString getLocation(const TQString &name);
/**
* Breaks a language code into the language code and country code (if any).
@@ -367,10 +367,10 @@ class KDE_EXPORT PlugInConf : public QWidget{
* @return countryCode Just the country code part (if any).
* @return Just the language code part.
*/
- QString splitLanguageCode(const QString& languageCode, QString& countryCode);
+ TQString splitLanguageCode(const TQString& languageCode, TQString& countryCode);
- /// The system path in a QStringList.
- QStringList m_path;
+ /// The system path in a TQStringList.
+ TQStringList m_path;
TestPlayer* m_player;
};
diff --git a/kttsd/libkttsd/pluginproc.cpp b/kttsd/libkttsd/pluginproc.cpp
index 5c835a6..a712687 100644
--- a/kttsd/libkttsd/pluginproc.cpp
+++ b/kttsd/libkttsd/pluginproc.cpp
@@ -16,8 +16,8 @@
***************************************************************************/
// Qt includes.
-#include <qstring.h>
-#include <qtextcodec.h>
+#include <tqstring.h>
+#include <tqtextcodec.h>
// KDE includes.
#include <kdebug.h>
@@ -31,7 +31,7 @@
/**
* Constructor
*/
-PlugInProc::PlugInProc( QObject *parent, const char *name) : QObject(parent, name){
+PlugInProc::PlugInProc( TQObject *parent, const char *name) : TQObject(parent, name){
// kdDebug() << "PlugInProc::PlugInProc: Running" << endl;
}
@@ -45,7 +45,7 @@ PlugInProc::~PlugInProc(){
/**
* Initializate the speech plugin.
*/
-bool PlugInProc::init(KConfig* /*config*/, const QString& /*configGroup*/){
+bool PlugInProc::init(KConfig* /*config*/, const TQString& /*configGroup*/){
// kdDebug() << "PlugInProc::init: Running" << endl;
return false;
}
@@ -56,7 +56,7 @@ bool PlugInProc::init(KConfig* /*config*/, const QString& /*configGroup*/){
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void PlugInProc::sayText(const QString& /*text*/){
+void PlugInProc::sayText(const TQString& /*text*/){
// kdDebug() << "PlugInProc::sayText: Running" << endl;
}
@@ -70,7 +70,7 @@ void PlugInProc::sayText(const QString& /*text*/){
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void PlugInProc::synthText(const QString& /*text*/, const QString& /*suggestedFilename*/) { }
+void PlugInProc::synthText(const TQString& /*text*/, const TQString& /*suggestedFilename*/) { }
/**
* Get the generated audio filename from synthText.
@@ -79,7 +79,7 @@ void PlugInProc::synthText(const QString& /*text*/, const QString& /*suggestedFi
*
* The plugin must not re-use the filename.
*/
-QString PlugInProc::getFilename() { return QString::null; }
+TQString PlugInProc::getFilename() { return TQString::null; }
/**
* Stop current operation (saying or synthesizing text).
@@ -133,62 +133,62 @@ bool PlugInProc::supportsSynth() { return false; }
* tags and converts the file to plain text.
* @return Name of the XSLT file.
*/
-QString PlugInProc::getSsmlXsltFilename()
+TQString PlugInProc::getSsmlXsltFilename()
{
return KGlobal::dirs()->resourceDirs("data").last() + "kttsd/xslt/SSMLtoPlainText.xsl";
}
/**
-* Given the name of a codec, returns the QTextCodec for the name.
+* Given the name of a codec, returns the TQTextCodec for the name.
* Handles the following "special" codec names:
* Local The user's current Locale codec.
* Latin1 Latin1 (ISO 8859-1)
* Unicode UTF-16
* @param codecName Name of desired codec.
* @return The codec object. Calling program must not delete this object
-* as it is a reference to an existing QTextCodec object.
+* as it is a reference to an existing TQTextCodec object.
*
* Caution: Do not pass translated codec names to this routine.
*/
-/*static*/ QTextCodec* PlugInProc::codecNameToCodec(const QString &codecName)
+/*static*/ TQTextCodec* PlugInProc::codecNameToCodec(const TQString &codecName)
{
- QTextCodec* codec = 0;
+ TQTextCodec* codec = 0;
if (codecName == "Local")
- codec = QTextCodec::codecForLocale();
+ codec = TQTextCodec::codecForLocale();
else if (codecName == "Latin1")
- codec = QTextCodec::codecForName("ISO8859-1");
+ codec = TQTextCodec::codecForName("ISO8859-1");
else if (codecName == "Unicode")
- codec = QTextCodec::codecForName("utf16");
+ codec = TQTextCodec::codecForName("utf16");
else
- codec = QTextCodec::codecForName(codecName.latin1());
+ codec = TQTextCodec::codecForName(codecName.latin1());
if (!codec)
{
kdDebug() << "PluginProc::codecNameToCodec: Invalid codec name " << codecName << endl;
kdDebug() << "PluginProc::codecNameToCodec: Defaulting to ISO 8859-1" << endl;
- codec = QTextCodec::codecForName("ISO8859-1");
+ codec = TQTextCodec::codecForName("ISO8859-1");
}
return codec;
}
/**
-* Builds a list of codec names, suitable for display in a QComboBox.
+* Builds a list of codec names, suitable for display in a TQComboBox.
* The list includes the 3 special codec names (translated) at the top:
* Local The user's current Locale codec.
* Latin1 Latin1 (ISO 8859-1)
* Unicode UTF-16
*/
-/*static*/ QStringList PlugInProc::buildCodecList()
+/*static*/ TQStringList PlugInProc::buildCodecList()
{
// kdDebug() << "PlugInConf::buildCodecList: Running" << endl;
- QStringList codecList;
- QString local = i18n("Local")+" (";
- local += QTextCodec::codecForLocale()->name();
+ TQStringList codecList;
+ TQString local = i18n("Local")+" (";
+ local += TQTextCodec::codecForLocale()->name();
local += ")";
codecList.append(local);
codecList.append(i18n("Latin1"));
codecList.append(i18n("Unicode"));
- for (int i = 0; (QTextCodec::codecForIndex(i)); ++i )
- codecList.append(QTextCodec::codecForIndex(i)->name());
+ for (int i = 0; (TQTextCodec::codecForIndex(i)); ++i )
+ codecList.append(TQTextCodec::codecForIndex(i)->name());
return codecList;
}
@@ -200,11 +200,11 @@ QString PlugInProc::getSsmlXsltFilename()
* Unicode UTF-16
* @param codecName Name of the codec.
* @param codecList List of codec names. The first 3 entries may be translated names.
-* @return QTextCodec object. Caller must not delete this object.
+* @return TQTextCodec object. Caller must not delete this object.
*
* Caution: Do not pass translated codec names to this routine in codecName parameter.
*/
-/*static*/ int PlugInProc::codecNameToListIndex(const QString &codecName, const QStringList &codecList)
+/*static*/ int PlugInProc::codecNameToListIndex(const TQString &codecName, const TQStringList &codecList)
{
int codec;
if (codecName == "Local")
@@ -227,30 +227,30 @@ QString PlugInProc::getSsmlXsltFilename()
* Given index into codec list, returns the codec object.
* @param codecNum Index of the codec.
* @param codecList List of codec names. The first 3 entries may be translated names.
-* @return QTextCodec object. Caller must not delete this object.
+* @return TQTextCodec object. Caller must not delete this object.
*/
-/*static*/ QTextCodec* PlugInProc::codecIndexToCodec(int codecNum, const QStringList &codecList)
+/*static*/ TQTextCodec* PlugInProc::codecIndexToCodec(int codecNum, const TQStringList &codecList)
{
- QTextCodec* codec = 0;
+ TQTextCodec* codec = 0;
switch (codecNum) {
case PlugInProc::Local:
- codec = QTextCodec::codecForLocale();
+ codec = TQTextCodec::codecForLocale();
break;
case PlugInProc::Latin1:
- codec = QTextCodec::codecForName("ISO8859-1");
+ codec = TQTextCodec::codecForName("ISO8859-1");
break;
case PlugInProc::Unicode:
- codec = QTextCodec::codecForName("utf16");
+ codec = TQTextCodec::codecForName("utf16");
break;
default:
- codec = QTextCodec::codecForName(codecList[codecNum].latin1());
+ codec = TQTextCodec::codecForName(codecList[codecNum].latin1());
break;
}
if (!codec)
{
kdDebug() << "PlugInProc::codecIndexToCodec: Invalid codec index " << codecNum << endl;
kdDebug() << "PlugInProc::codecIndexToCodec: Defaulting to ISO 8859-1" << endl;
- codec = QTextCodec::codecForName("ISO8859-1");
+ codec = TQTextCodec::codecForName("ISO8859-1");
}
return codec;
}
@@ -265,9 +265,9 @@ QString PlugInProc::getSsmlXsltFilename()
* @param codecList List of codec names. The first 3 entries may be translated names.
* @return Untranslated name of the codec.
*/
-/*static*/ QString PlugInProc::codecIndexToCodecName(int codecNum, const QStringList &codecList)
+/*static*/ TQString PlugInProc::codecIndexToCodecName(int codecNum, const TQStringList &codecList)
{
- QString codecName;
+ TQString codecName;
switch (codecNum) {
case PlugInProc::Local:
codecName = "Local";
diff --git a/kttsd/libkttsd/pluginproc.h b/kttsd/libkttsd/pluginproc.h
index c271ad3..b47042b 100644
--- a/kttsd/libkttsd/pluginproc.h
+++ b/kttsd/libkttsd/pluginproc.h
@@ -19,8 +19,8 @@
#ifndef _PLUGINPROC_H_
#define _PLUGINPROC_H_
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kdemacros.h>
#include "kdeexportfix.h"
#include <kconfig.h>
@@ -110,7 +110,7 @@
* psFinished.
*
* If @ref supportsAsync returns False, KTTSD will run the plugin in a separate
-* QThread. As a consequence, the plugin must not make use of the KDE Library,
+* TQThread. As a consequence, the plugin must not make use of the KDE Library,
* when @ref sayText or @ref synthText is called,
* with the exception of KProcess and family (KProcIO, KShellProcess).
* This restriction comes about because the KDE Libraries make use of the
@@ -241,7 +241,7 @@ class KDE_EXPORT PlugInProc : virtual public QObject{
/**
* Constructor.
*/
- PlugInProc( QObject *parent = 0, const char *name = 0);
+ PlugInProc( TQObject *parent = 0, const char *name = 0);
/**
* Destructor.
@@ -263,7 +263,7 @@ class KDE_EXPORT PlugInProc : virtual public QObject{
config->setGroup(configGroup);
@endverbatim
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Say a text. Synthesize and audibilize it.
@@ -274,7 +274,7 @@ class KDE_EXPORT PlugInProc : virtual public QObject{
* It must also implement the @ref getState method, which must return
* psFinished, when saying is completed.
*/
- virtual void sayText(const QString &text);
+ virtual void sayText(const TQString &text);
/**
* Synthesize text into an audio file, but do not send to the audio device.
@@ -289,7 +289,7 @@ class KDE_EXPORT PlugInProc : virtual public QObject{
* It must also implement the @ref getState method, which must return
* psFinished, when synthesis is completed.
*/
- virtual void synthText(const QString &text, const QString &suggestedFilename);
+ virtual void synthText(const TQString &text, const TQString &suggestedFilename);
/**
* Get the generated audio filename from call to @ref synthText.
@@ -300,7 +300,7 @@ class KDE_EXPORT PlugInProc : virtual public QObject{
* be locked when this method is called. The file will be deleted when
* KTTSD is finished using it.
*/
- virtual QString getFilename();
+ virtual TQString getFilename();
/**
* Stop current operation (saying or synthesizing text).
@@ -373,30 +373,30 @@ class KDE_EXPORT PlugInProc : virtual public QObject{
* tags and converts the file to plain text.
* @return Name of the XSLT file.
*/
- virtual QString getSsmlXsltFilename();
+ virtual TQString getSsmlXsltFilename();
/**
- * Given the name of a codec, returns the QTextCodec for the name.
+ * Given the name of a codec, returns the TQTextCodec for the name.
* Handles the following "special" codec names:
* Local The user's current Locale codec.
* Latin1 Latin1 (ISO 8859-1)
* Unicode UTF-16
* @param codecName Name of desired codec.
* @return The codec object. Calling program must not delete this object
- * as it is a reference to an existing QTextCodec object.
+ * as it is a reference to an existing TQTextCodec object.
*
* Caution: Do not pass translated codec names to this routine.
*/
- static QTextCodec* codecNameToCodec(const QString &codecName);
+ static TQTextCodec* codecNameToCodec(const TQString &codecName);
/**
- * Builds a list of codec names, suitable for display in a QComboBox.
+ * Builds a list of codec names, suitable for display in a TQComboBox.
* The list includes the 3 special codec names (translated) at the top:
* Local The user's current Locale codec.
* Latin1 Latin1 (ISO 8859-1)
* Unicode UTF-16
*/
- static QStringList buildCodecList();
+ static TQStringList buildCodecList();
/**
* Given the name of a codec, returns index into the codec list.
@@ -406,19 +406,19 @@ class KDE_EXPORT PlugInProc : virtual public QObject{
* Unicode UTF-16
* @param codecName Name of the codec.
* @param codecList List of codec names. The first 3 entries may be translated names.
- * @return QTextCodec object. Caller must not delete this object.
+ * @return TQTextCodec object. Caller must not delete this object.
*
* Caution: Do not pass translated codec names to this routine in codecName parameter.
*/
- static int codecNameToListIndex(const QString &codecName, const QStringList &codecList);
+ static int codecNameToListIndex(const TQString &codecName, const TQStringList &codecList);
/**
* Given index into codec list, returns the codec object.
* @param codecNum Index of the codec.
* @param codecList List of codec names. The first 3 entries may be translated names.
- * @return QTextCodec object. Caller must not delete this object.
+ * @return TQTextCodec object. Caller must not delete this object.
*/
- static QTextCodec* codecIndexToCodec(int codecNum, const QStringList &codecList);
+ static TQTextCodec* codecIndexToCodec(int codecNum, const TQStringList &codecList);
/**
* Given index into codec list, returns the codec Name.
@@ -430,7 +430,7 @@ class KDE_EXPORT PlugInProc : virtual public QObject{
* @param codecList List of codec names. The first 3 entries may be translated names.
* @return Untranslated name of the codec.
*/
- static QString codecIndexToCodecName(int codecNum, const QStringList &codecList);
+ static TQString codecIndexToCodecName(int codecNum, const TQStringList &codecList);
signals:
/**
@@ -460,7 +460,7 @@ class KDE_EXPORT PlugInProc : virtual public QObject{
* @see Error-handling
*
*/
- void error(bool keepGoing, const QString &msg);
+ void error(bool keepGoing, const TQString &msg);
};
#endif // _PLUGINPROC_H_
diff --git a/kttsd/libkttsd/selecttalkerdlg.cpp b/kttsd/libkttsd/selecttalkerdlg.cpp
index d74339e..9028bf7 100644
--- a/kttsd/libkttsd/selecttalkerdlg.cpp
+++ b/kttsd/libkttsd/selecttalkerdlg.cpp
@@ -25,10 +25,10 @@
******************************************************************************/
// Qt includes.
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qhbox.h>
-#include <qgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqhbox.h>
+#include <tqgroupbox.h>
// KDE includes.
#include <kcombobox.h>
@@ -45,10 +45,10 @@
#include "selecttalkerdlg.moc"
SelectTalkerDlg::SelectTalkerDlg(
- QWidget* parent,
+ TQWidget* parent,
const char* name,
- const QString& caption,
- const QString& talkerCode,
+ const TQString& caption,
+ const TQString& talkerCode,
bool runningTalkers) :
KDialogBase(
@@ -61,33 +61,33 @@ SelectTalkerDlg::SelectTalkerDlg(
{
m_widget = new SelectTalkerWidget( this );
// TODO: How do I do this in a general way and still get KDialogBase to properly resize?
- m_widget->setMinimumSize( QSize(700,500) );
- // setInitialSize( QSize(700,600) );
+ m_widget->setMinimumSize( TQSize(700,500) );
+ // setInitialSize( TQSize(700,600) );
setMainWidget( m_widget );
m_runningTalkers = runningTalkers;
m_talkerCode = TalkerCode( talkerCode, false );
// Fill combo boxes.
KComboBox* cb = m_widget->genderComboBox;
- cb->insertItem( QString::null );
+ cb->insertItem( TQString::null );
cb->insertItem( TalkerCode::translatedGender("male") );
cb->insertItem( TalkerCode::translatedGender("female") );
cb->insertItem( TalkerCode::translatedGender("neutral") );
cb = m_widget->volumeComboBox;
- cb->insertItem( QString::null );
+ cb->insertItem( TQString::null );
cb->insertItem( TalkerCode::translatedVolume("medium") );
cb->insertItem( TalkerCode::translatedVolume("loud") );
cb->insertItem( TalkerCode::translatedVolume("soft") );
cb = m_widget->rateComboBox;
- cb->insertItem( QString::null );
+ cb->insertItem( TQString::null );
cb->insertItem( TalkerCode::translatedRate("medium") );
cb->insertItem( TalkerCode::translatedRate("fast") );
cb->insertItem( TalkerCode::translatedRate("slow") );
cb = m_widget->synthComboBox;
- cb->insertItem( QString::null );
+ cb->insertItem( TQString::null );
KTrader::OfferList offers = KTrader::self()->query("KTTSD/SynthPlugin");
for(unsigned int i=0; i < offers.count() ; ++i)
cb->insertItem(offers[i]->name());
@@ -101,7 +101,7 @@ SelectTalkerDlg::SelectTalkerDlg(
m_widget->useDefaultRadioButton->setChecked(true);
else
{
- QString dummy;
+ TQString dummy;
if (talkerCode == TalkerCode::normalizeTalkerCode(talkerCode, dummy))
m_widget->useSpecificTalkerRadioButton->setChecked(true);
else
@@ -111,67 +111,67 @@ SelectTalkerDlg::SelectTalkerDlg(
applyTalkerCodeToControls();
enableDisableControls();
- connect(m_widget->useDefaultRadioButton, SIGNAL(clicked()),
- this, SLOT(configChanged()));
- connect(m_widget->useClosestMatchRadioButton, SIGNAL(clicked()),
- this, SLOT(configChanged()));
- connect(m_widget->useSpecificTalkerRadioButton, SIGNAL(clicked()),
- this, SLOT(configChanged()));
-
- connect(m_widget->languageBrowseButton, SIGNAL(clicked()),
- this, SLOT(slotLanguageBrowseButton_clicked()));
-
- connect(m_widget->synthComboBox, SIGNAL(activated(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->genderComboBox, SIGNAL(activated(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->volumeComboBox, SIGNAL(activated(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->rateComboBox, SIGNAL(activated(const QString&)),
- this, SLOT(configChanged()));
-
- connect(m_widget->synthCheckBox, SIGNAL(toggled(bool)),
- this, SLOT(configChanged()));
- connect(m_widget->genderCheckBox, SIGNAL(toggled(bool)),
- this, SLOT(configChanged()));
- connect(m_widget->volumeCheckBox, SIGNAL(toggled(bool)),
- this, SLOT(configChanged()));
- connect(m_widget->rateCheckBox, SIGNAL(toggled(bool)),
- this, SLOT(configChanged()));
-
- connect(m_widget->talkersListView, SIGNAL(selectionChanged()),
- this, SLOT(slotTalkersListView_selectionChanged()));
+ connect(m_widget->useDefaultRadioButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->useClosestMatchRadioButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->useSpecificTalkerRadioButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(configChanged()));
+
+ connect(m_widget->languageBrowseButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotLanguageBrowseButton_clicked()));
+
+ connect(m_widget->synthComboBox, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->genderComboBox, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->volumeComboBox, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->rateComboBox, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+
+ connect(m_widget->synthCheckBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->genderCheckBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->volumeCheckBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->rateCheckBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(configChanged()));
+
+ connect(m_widget->talkersListView, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotTalkersListView_selectionChanged()));
m_widget->talkersListView->setMinimumHeight( 120 );
}
SelectTalkerDlg::~SelectTalkerDlg() { }
-QString SelectTalkerDlg::getSelectedTalkerCode()
+TQString SelectTalkerDlg::getSelectedTalkerCode()
{
return m_talkerCode.getTalkerCode();
}
-QString SelectTalkerDlg::getSelectedTranslatedDescription()
+TQString SelectTalkerDlg::getSelectedTranslatedDescription()
{
return m_talkerCode.getTranslatedDescription();
}
void SelectTalkerDlg::slotLanguageBrowseButton_clicked()
{
- // Create a QHBox to host KListView.
- QHBox* hBox = new QHBox(m_widget, "SelectLanguage_hbox");
+ // Create a TQHBox to host KListView.
+ TQHBox* hBox = new TQHBox(m_widget, "SelectLanguage_hbox");
// Create a KListView and fill with all known languages.
KListView* langLView = new KListView(hBox, "SelectLanguage_lview");
langLView->addColumn(i18n("Language"));
langLView->addColumn(i18n("Code"));
- langLView->setSelectionMode(QListView::Single);
- QStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha();
- QString locale;
- QString language;
+ langLView->setSelectionMode(TQListView::Single);
+ TQStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha();
+ TQString locale;
+ TQString language;
// Blank line so user can select no language.
- // Note: Don't use QString::null, which gets displayed at bottom of list, rather than top.
- QListViewItem* item = new KListViewItem(langLView, "", "");
+ // Note: Don't use TQString::null, which gets displayed at bottom of list, rather than top.
+ TQListViewItem* item = new KListViewItem(langLView, "", "");
if (m_talkerCode.languageCode().isEmpty()) item->setSelected(true);
int allLocalesCount = allLocales.count();
for (int ndx=0; ndx < allLocalesCount; ++ndx)
@@ -196,12 +196,12 @@ void SelectTalkerDlg::slotLanguageBrowseButton_clicked()
true);
dlg->setMainWidget(hBox);
dlg->setHelp("", "kttsd");
- dlg->setInitialSize(QSize(300, 500), false);
+ dlg->setInitialSize(TQSize(300, 500), false);
// TODO: This isn't working. Furthermore, item appears selected but is not.
langLView->ensureItemVisible(langLView->selectedItem());
int dlgResult = dlg->exec();
- language = QString::null;
- if (dlgResult == QDialog::Accepted)
+ language = TQString::null;
+ if (dlgResult == TQDialog::Accepted)
{
if (langLView->selectedItem())
{
@@ -217,7 +217,7 @@ void SelectTalkerDlg::slotLanguageBrowseButton_clicked()
void SelectTalkerDlg::slotTalkersListView_selectionChanged()
{
- QListViewItem* item = m_widget->talkersListView->selectedItem();
+ TQListViewItem* item = m_widget->talkersListView->selectedItem();
if ( !item ) return;
if (!m_widget->useSpecificTalkerRadioButton->isChecked()) return;
configChanged();
@@ -233,7 +233,7 @@ void SelectTalkerDlg::configChanged()
void SelectTalkerDlg::applyTalkerCodeToControls()
{
bool preferred = false;
- QString code = m_talkerCode.getTalkerCode();
+ TQString code = m_talkerCode.getTalkerCode();
// TODO: Need to display translated Synth names.
KttsUtils::setCbItemFromText(m_widget->synthComboBox,
@@ -259,7 +259,7 @@ void SelectTalkerDlg::applyTalkerCodeToControls()
// Select closest matching specific Talker.
int talkerIndex = TalkerCode::findClosestMatchingTalker(m_talkers, m_talkerCode.getTalkerCode(), false);
KListView* lv = m_widget->talkersListView;
- QListViewItem* item = lv->firstChild();
+ TQListViewItem* item = lv->firstChild();
if ( item )
{
while ( talkerIndex > 0 )
@@ -274,12 +274,12 @@ void SelectTalkerDlg::applyTalkerCodeToControls()
void SelectTalkerDlg::applyControlsToTalkerCode()
{
if ( m_widget->useDefaultRadioButton->isChecked() )
- m_talkerCode = TalkerCode(QString::null, false);
+ m_talkerCode = TalkerCode(TQString::null, false);
else if ( m_widget->useClosestMatchRadioButton->isChecked() )
{
// Language already stored in talker code.
- QString t = m_widget->synthComboBox->currentText();
+ TQString t = m_widget->synthComboBox->currentText();
if ( !t.isEmpty() && m_widget->synthCheckBox->isChecked() ) t.prepend("*");
m_talkerCode.setPlugInName( t );
@@ -297,7 +297,7 @@ void SelectTalkerDlg::applyControlsToTalkerCode()
}
else if (m_widget->useSpecificTalkerRadioButton->isChecked() )
{
- QListViewItem* item = m_widget->talkersListView->selectedItem();
+ TQListViewItem* item = m_widget->talkersListView->selectedItem();
if ( item )
{
int itemIndex = -1;
@@ -316,27 +316,27 @@ void SelectTalkerDlg::loadTalkers(bool /*runningTalkers*/)
m_talkers.clear();
KListView* lv = m_widget->talkersListView;
lv->clear();
- QListViewItem* item;
+ TQListViewItem* item;
KConfig* config = new KConfig("kttsdrc");
config->setGroup("General");
- QStringList talkerIDsList = config->readListEntry("TalkerIDs", ',');
+ TQStringList talkerIDsList = config->readListEntry("TalkerIDs", ',');
if (!talkerIDsList.isEmpty())
{
- QStringList::ConstIterator itEnd(talkerIDsList.constEnd());
- for( QStringList::ConstIterator it = talkerIDsList.constBegin(); it != itEnd; ++it )
+ TQStringList::ConstIterator itEnd(talkerIDsList.constEnd());
+ for( TQStringList::ConstIterator it = talkerIDsList.constBegin(); it != itEnd; ++it )
{
- QString talkerID = *it;
+ TQString talkerID = *it;
config->setGroup("Talker_" + talkerID);
- QString talkerCode = config->readEntry("TalkerCode", QString::null);
+ TQString talkerCode = config->readEntry("TalkerCode", TQString::null);
// Parse and normalize the talker code.
TalkerCode talker = TalkerCode(talkerCode, true);
m_talkers.append(talker);
- QString desktopEntryName = config->readEntry("DesktopEntryName", QString::null);
- QString synthName = TalkerCode::TalkerDesktopEntryNameToName(desktopEntryName);
+ TQString desktopEntryName = config->readEntry("DesktopEntryName", TQString::null);
+ TQString synthName = TalkerCode::TalkerDesktopEntryNameToName(desktopEntryName);
// Display in List View using translated strings.
item = new KListViewItem(lv, item);
- QString fullLanguageCode = talker.fullLanguageCode();
- QString language = TalkerCode::languageCodeToLanguage(fullLanguageCode);
+ TQString fullLanguageCode = talker.fullLanguageCode();
+ TQString language = TalkerCode::languageCodeToLanguage(fullLanguageCode);
item->setText(tlvcLanguage, language);
// Don't update the Synthesizer name with plugInName. The former is a translated
// name; the latter an English name.
diff --git a/kttsd/libkttsd/selecttalkerdlg.h b/kttsd/libkttsd/selecttalkerdlg.h
index bc236e2..799f588 100644
--- a/kttsd/libkttsd/selecttalkerdlg.h
+++ b/kttsd/libkttsd/selecttalkerdlg.h
@@ -28,7 +28,7 @@
#define _SELECTTALKERDLG_H_
// Qt includes.
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
// KDE includes.
#include <kdialogbase.h>
@@ -55,10 +55,10 @@ class KDE_EXPORT SelectTalkerDlg : public KDialogBase
* (which may not yet have been Applied).
*/
SelectTalkerDlg(
- QWidget* parent = 0,
+ TQWidget* parent = 0,
const char* name = "selecttalkerdialog",
- const QString& caption = i18n("Select Talker"),
- const QString& talkerCode = QString::null,
+ const TQString& caption = i18n("Select Talker"),
+ const TQString& talkerCode = TQString::null,
bool runningTalkers = false);
/**
@@ -67,14 +67,14 @@ class KDE_EXPORT SelectTalkerDlg : public KDialogBase
~SelectTalkerDlg();
/**
- * Returns the Talker Code user chose. QString::null if default Talker chosen.
+ * Returns the Talker Code user chose. TQString::null if default Talker chosen.
* Note that if user did not choose a specific Talker, this will be a partial Talker Code.
*/
- QString getSelectedTalkerCode();
+ TQString getSelectedTalkerCode();
/**
* Returns the Talker user chose in a translated displayable format.
*/
- QString getSelectedTranslatedDescription();
+ TQString getSelectedTranslatedDescription();
private slots:
void slotLanguageBrowseButton_clicked();
diff --git a/kttsd/libkttsd/stretcher.cpp b/kttsd/libkttsd/stretcher.cpp
index d3a3984..91ae8fe 100644
--- a/kttsd/libkttsd/stretcher.cpp
+++ b/kttsd/libkttsd/stretcher.cpp
@@ -34,8 +34,8 @@
/**
* Constructor.
*/
-Stretcher::Stretcher(QObject *parent, const char *name) :
- QObject(parent, name)
+Stretcher::Stretcher(TQObject *parent, const char *name) :
+ TQObject(parent, name)
{
m_state = 0;
m_stretchProc = 0;
@@ -56,15 +56,15 @@ Stretcher::~Stretcher()
* @param stretchFactor Amount to stretch. 2.0 is twice as slow. 0.5 is twice as fast.
* @return False if an error occurs.
*/
-bool Stretcher::stretch(const QString &inFilename, const QString &outFilename, float stretchFactor)
+bool Stretcher::stretch(const TQString &inFilename, const TQString &outFilename, float stretchFactor)
{
if (m_stretchProc) return false;
m_outFilename = outFilename;
m_stretchProc = new KProcess;
- QString stretchStr = QString("%1").arg(stretchFactor, 0, 'f', 3);
+ TQString stretchStr = TQString("%1").arg(stretchFactor, 0, 'f', 3);
*m_stretchProc << "sox" << inFilename << outFilename << "stretch" << stretchStr;
- connect(m_stretchProc, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotProcessExited(KProcess*)));
+ connect(m_stretchProc, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(slotProcessExited(KProcess*)));
if (!m_stretchProc->start(KProcess::NotifyOnExit, KProcess::NoCommunication))
{
kdDebug() << "Stretcher::stretch: Error starting audio stretcher process. Is sox installed?" << endl;
@@ -90,7 +90,7 @@ int Stretcher::getState() { return m_state; }
/**
* Returns the output filename (as given in call to stretch).
*/
-QString Stretcher::getOutFilename() { return m_outFilename; }
+TQString Stretcher::getOutFilename() { return m_outFilename; }
/**
* Acknowledges the finished stretching.
diff --git a/kttsd/libkttsd/stretcher.h b/kttsd/libkttsd/stretcher.h
index e4d8686..676b690 100644
--- a/kttsd/libkttsd/stretcher.h
+++ b/kttsd/libkttsd/stretcher.h
@@ -38,7 +38,7 @@ class KDE_EXPORT Stretcher : public QObject{
/**
* Constructor.
*/
- Stretcher(QObject *parent = 0, const char *name = 0);
+ Stretcher(TQObject *parent = 0, const char *name = 0);
/**
* Destructor.
@@ -57,7 +57,7 @@ class KDE_EXPORT Stretcher : public QObject{
* @param outFilename Name of output audio file.
* @param stretchFactor Amount to stretch. 2.0 is twice as slow. 0.5 is twice as fast.
*/
- bool stretch(const QString &inFilename, const QString &outFilename, float stretchFactor);
+ bool stretch(const TQString &inFilename, const TQString &outFilename, float stretchFactor);
/**
* Returns the state of the Stretcher.
@@ -67,7 +67,7 @@ class KDE_EXPORT Stretcher : public QObject{
/**
* Returns the output filename (as given in call to stretch).
*/
- QString getOutFilename();
+ TQString getOutFilename();
/**
* Acknowledges the finished stretching.
@@ -91,7 +91,7 @@ class KDE_EXPORT Stretcher : public QObject{
KProcess* m_stretchProc;
// Output file name.
- QString m_outFilename;
+ TQString m_outFilename;
};
#endif // _STRETCHER_H_
diff --git a/kttsd/libkttsd/talkercode.cpp b/kttsd/libkttsd/talkercode.cpp
index d25cf7f..08c89a1 100644
--- a/kttsd/libkttsd/talkercode.cpp
+++ b/kttsd/libkttsd/talkercode.cpp
@@ -34,7 +34,7 @@
/**
* Constructor.
*/
-TalkerCode::TalkerCode(const QString &code/*=QString::null*/, bool normal /*=false*/)
+TalkerCode::TalkerCode(const TQString &code/*=TQString::null*/, bool normal /*=false*/)
{
if (!code.isEmpty())
parseTalkerCode(code);
@@ -64,26 +64,26 @@ TalkerCode::~TalkerCode() { }
/**
* Properties.
*/
-QString TalkerCode::languageCode() const { return m_languageCode; }
-QString TalkerCode::countryCode() const { return m_countryCode; }
-QString TalkerCode::voice() const { return m_voice; }
-QString TalkerCode::gender() const { return m_gender; }
-QString TalkerCode::volume() const { return m_volume; }
-QString TalkerCode::rate() const { return m_rate; }
-QString TalkerCode::plugInName() const { return m_plugInName; }
+TQString TalkerCode::languageCode() const { return m_languageCode; }
+TQString TalkerCode::countryCode() const { return m_countryCode; }
+TQString TalkerCode::voice() const { return m_voice; }
+TQString TalkerCode::gender() const { return m_gender; }
+TQString TalkerCode::volume() const { return m_volume; }
+TQString TalkerCode::rate() const { return m_rate; }
+TQString TalkerCode::plugInName() const { return m_plugInName; }
-void TalkerCode::setLanguageCode(const QString &languageCode) { m_languageCode = languageCode; }
-void TalkerCode::setCountryCode(const QString &countryCode) { m_countryCode = countryCode; }
-void TalkerCode::setVoice(const QString &voice) { m_voice = voice; }
-void TalkerCode::setGender(const QString &gender) { m_gender = gender; }
-void TalkerCode::setVolume(const QString &volume) { m_volume = volume; }
-void TalkerCode::setRate(const QString &rate) { m_rate = rate; }
-void TalkerCode::setPlugInName(const QString plugInName) { m_plugInName = plugInName; }
+void TalkerCode::setLanguageCode(const TQString &languageCode) { m_languageCode = languageCode; }
+void TalkerCode::setCountryCode(const TQString &countryCode) { m_countryCode = countryCode; }
+void TalkerCode::setVoice(const TQString &voice) { m_voice = voice; }
+void TalkerCode::setGender(const TQString &gender) { m_gender = gender; }
+void TalkerCode::setVolume(const TQString &volume) { m_volume = volume; }
+void TalkerCode::setRate(const TQString &rate) { m_rate = rate; }
+void TalkerCode::setPlugInName(const TQString plugInName) { m_plugInName = plugInName; }
/**
* Sets the language code and country code (if given).
*/
-void TalkerCode::setFullLanguageCode(const QString &fullLanguageCode)
+void TalkerCode::setFullLanguageCode(const TQString &fullLanguageCode)
{
splitFullLanguageCode(fullLanguageCode, m_languageCode, m_countryCode);
}
@@ -91,7 +91,7 @@ void TalkerCode::setFullLanguageCode(const QString &fullLanguageCode)
/**
* Returns the language code plus country code (if any).
*/
-QString TalkerCode::fullLanguageCode() const
+TQString TalkerCode::fullLanguageCode() const
{
if (!m_countryCode.isEmpty())
return m_languageCode + "_" + m_countryCode;
@@ -102,16 +102,16 @@ QString TalkerCode::fullLanguageCode() const
/**
* The Talker Code returned in XML format.
*/
-QString TalkerCode::getTalkerCode() const
+TQString TalkerCode::getTalkerCode() const
{
- QString code;
- QString languageCode = m_languageCode;
+ TQString code;
+ TQString languageCode = m_languageCode;
if (!m_countryCode.isEmpty()) languageCode += "_" + m_countryCode;
if (!languageCode.isEmpty()) code = "lang=\"" + languageCode + "\" ";
if (!m_voice.isEmpty()) code += "name=\"" + m_voice + "\" ";
if (!m_gender.isEmpty()) code += "gender=\"" + m_gender + "\" ";
if (!code.isEmpty()) code = "<voice " + code + "/>";
- QString prosody;
+ TQString prosody;
if (!m_volume.isEmpty()) prosody = "volume=\"" + m_volume + "\" ";
if (!m_rate.isEmpty()) prosody += "rate=\"" + m_rate + "\" ";
if (!prosody.isEmpty()) code += "<prosody " + prosody + "/>";
@@ -122,11 +122,11 @@ QString TalkerCode::getTalkerCode() const
/**
* The Talker Code translated for display.
*/
-QString TalkerCode::getTranslatedDescription() const
+TQString TalkerCode::getTranslatedDescription() const
{
- QString code;
+ TQString code;
bool prefer;
- QString fullLangCode = fullLanguageCode();
+ TQString fullLangCode = fullLanguageCode();
if (!fullLangCode.isEmpty()) code = languageCodeToLanguage( fullLangCode );
// TODO: The PlugInName is always English. Need a way to convert this to a translated
// name (possibly via DesktopEntryNameToName, but to do that, we need the desktopEntryName
@@ -159,7 +159,7 @@ void TalkerCode::normalize()
* @return fullLanguageCode Language code from the talker code (including country code if any).
* @return Normalized talker code.
*/
-/*static*/ QString TalkerCode::normalizeTalkerCode(const QString &talkerCode, QString &fullLanguageCode)
+/*static*/ TQString TalkerCode::normalizeTalkerCode(const TQString &talkerCode, TQString &fullLanguageCode)
{
TalkerCode tmpTalkerCode(talkerCode);
tmpTalkerCode.normalize();
@@ -177,11 +177,11 @@ void TalkerCode::normalize()
* If the input code begins with an asterisk, it is ignored and removed from the returned
* languageCode.
*/
-/*static*/ void TalkerCode::splitFullLanguageCode(const QString &lang, QString &languageCode, QString &countryCode)
+/*static*/ void TalkerCode::splitFullLanguageCode(const TQString &lang, TQString &languageCode, TQString &countryCode)
{
- QString language = lang;
+ TQString language = lang;
if (language.left(1) == "*") language = language.mid(1);
- QString charSet;
+ TQString charSet;
KGlobal::locale()->splitLocale(language, languageCode, countryCode, charSet);
}
@@ -196,7 +196,7 @@ void TalkerCode::normalize()
* <prosody volume="medium" rate="medium"/>
* <kttsd synthesizer="Festival" />
*/
-/*static*/ QString TalkerCode::defaultTalkerCode(const QString &fullLanguageCode, const QString &plugInName)
+/*static*/ TQString TalkerCode::defaultTalkerCode(const TQString &fullLanguageCode, const TQString &plugInName)
{
TalkerCode tmpTalkerCode;
tmpTalkerCode.setFullLanguageCode(fullLanguageCode);
@@ -208,11 +208,11 @@ void TalkerCode::normalize()
/**
* Converts a language code plus optional country code to language description.
*/
-/*static*/ QString TalkerCode::languageCodeToLanguage(const QString &languageCode)
+/*static*/ TQString TalkerCode::languageCodeToLanguage(const TQString &languageCode)
{
- QString twoAlpha;
- QString countryCode;
- QString language;
+ TQString twoAlpha;
+ TQString countryCode;
+ TQString language;
if (languageCode == "other")
language = i18n("Other");
else
@@ -222,7 +222,7 @@ void TalkerCode::normalize()
}
if (!countryCode.isEmpty())
{
- QString countryName = KGlobal::locale()->twoAlphaToCountryName(countryCode);
+ TQString countryName = KGlobal::locale()->twoAlphaToCountryName(countryCode);
// Some abbreviations to save screen space.
if (countryName == i18n("full country name", "United States of America"))
countryName = i18n("abbreviated country name", "USA");
@@ -236,7 +236,7 @@ void TalkerCode::normalize()
/**
* These functions return translated Talker Code attributes.
*/
-/*static*/ QString TalkerCode::translatedGender(const QString &gender)
+/*static*/ TQString TalkerCode::translatedGender(const TQString &gender)
{
if (gender == "male")
return i18n("male");
@@ -246,7 +246,7 @@ void TalkerCode::normalize()
return i18n("neutral gender", "neutral");
else return gender;
}
-/*static*/ QString TalkerCode::untranslatedGender(const QString &gender)
+/*static*/ TQString TalkerCode::untranslatedGender(const TQString &gender)
{
if (gender == i18n("male"))
return "male";
@@ -256,7 +256,7 @@ void TalkerCode::normalize()
return "neutral";
else return gender;
}
-/*static*/ QString TalkerCode::translatedVolume(const QString &volume)
+/*static*/ TQString TalkerCode::translatedVolume(const TQString &volume)
{
if (volume == "medium")
return i18n("medium sound", "medium");
@@ -266,7 +266,7 @@ void TalkerCode::normalize()
return i18n("soft sound", "soft");
else return volume;
}
-/*static*/ QString TalkerCode::untranslatedVolume(const QString &volume)
+/*static*/ TQString TalkerCode::untranslatedVolume(const TQString &volume)
{
if (volume == i18n("medium sound", "medium"))
return "medium";
@@ -276,7 +276,7 @@ void TalkerCode::normalize()
return "soft";
else return volume;
}
-/*static*/ QString TalkerCode::translatedRate(const QString &rate)
+/*static*/ TQString TalkerCode::translatedRate(const TQString &rate)
{
if (rate == "medium")
return i18n("medium speed", "medium");
@@ -286,7 +286,7 @@ void TalkerCode::normalize()
return i18n("slow speed", "slow");
else return rate;
}
-/*static*/ QString TalkerCode::untranslatedRate(const QString &rate)
+/*static*/ TQString TalkerCode::untranslatedRate(const TQString &rate)
{
if (rate == i18n("medium speed", "medium"))
return "medium";
@@ -301,9 +301,9 @@ void TalkerCode::normalize()
* Given a talker code, parses out the attributes.
* @param talkerCode The talker code.
*/
-void TalkerCode::parseTalkerCode(const QString &talkerCode)
+void TalkerCode::parseTalkerCode(const TQString &talkerCode)
{
- QString fullLanguageCode;
+ TQString fullLanguageCode;
if (talkerCode.contains("\""))
{
fullLanguageCode = talkerCode.section("lang=", 1, 1);
@@ -311,8 +311,8 @@ void TalkerCode::parseTalkerCode(const QString &talkerCode)
}
else
fullLanguageCode = talkerCode;
- QString languageCode;
- QString countryCode;
+ TQString languageCode;
+ TQString countryCode;
splitFullLanguageCode(fullLanguageCode, languageCode, countryCode);
m_languageCode = languageCode;
if (fullLanguageCode.left(1) == "*") countryCode = "*" + countryCode;
@@ -340,7 +340,7 @@ void TalkerCode::parseTalkerCode(const QString &talkerCode)
*/
/*static*/ int TalkerCode::findClosestMatchingTalker(
const TalkerCodeList& talkers,
- const QString& talker,
+ const TQString& talker,
bool assumeDefaultLang)
{
// kdDebug() << "TalkerCode::findClosestMatchingTalker: matching on talker code " << talker << endl;
@@ -356,7 +356,7 @@ void TalkerCode::parseTalkerCode(const QString &talkerCode)
}
// The talker that matches on the most priority attributes wins.
int talkersCount = int(talkers.count());
- QMemArray<int> priorityMatch(talkersCount);
+ TQMemArray<int> priorityMatch(talkersCount);
for (int ndx = 0; ndx < talkersCount; ++ndx)
{
priorityMatch[ndx] = 0;
@@ -412,7 +412,7 @@ void TalkerCode::parseTalkerCode(const QString &talkerCode)
// (first configured) will be chosen.
if (winnerCount > 1)
{
- QMemArray<int> preferredMatch(talkersCount);
+ TQMemArray<int> preferredMatch(talkersCount);
for (int ndx = 0; ndx < talkersCount; ++ndx)
{
preferredMatch[ndx] = 0;
@@ -471,7 +471,7 @@ void TalkerCode::parseTalkerCode(const QString &talkerCode)
return winner;
}
-/*static*/ QString TalkerCode::stripPrefer( const QString& code, bool& preferred)
+/*static*/ TQString TalkerCode::stripPrefer( const TQString& code, bool& preferred)
{
if ( code.left(1) == "*" )
{
@@ -487,15 +487,15 @@ void TalkerCode::parseTalkerCode(const QString &talkerCode)
* Uses KTrader to convert a translated Synth Plugin Name to DesktopEntryName.
* @param name The translated plugin name. From Name= line in .desktop file.
* @return DesktopEntryName. The name of the .desktop file (less .desktop).
-* QString::null if not found.
+* TQString::null if not found.
*/
-/*static*/ QString TalkerCode::TalkerNameToDesktopEntryName(const QString& name)
+/*static*/ TQString TalkerCode::TalkerNameToDesktopEntryName(const TQString& name)
{
- if (name.isEmpty()) return QString::null;
+ if (name.isEmpty()) return TQString::null;
KTrader::OfferList offers = KTrader::self()->query("KTTSD/SynthPlugin");
for (uint ndx = 0; ndx < offers.count(); ++ndx)
if (offers[ndx]->name() == name) return offers[ndx]->desktopEntryName();
- return QString::null;
+ return TQString::null;
}
/**
@@ -503,15 +503,15 @@ void TalkerCode::parseTalkerCode(const QString &talkerCode)
* @param desktopEntryName The DesktopEntryName.
* @return The translated Name of the plugin, from Name= line in .desktop file.
*/
-/*static*/ QString TalkerCode::TalkerDesktopEntryNameToName(const QString& desktopEntryName)
+/*static*/ TQString TalkerCode::TalkerDesktopEntryNameToName(const TQString& desktopEntryName)
{
- if (desktopEntryName.isEmpty()) return QString::null;
+ if (desktopEntryName.isEmpty()) return TQString::null;
KTrader::OfferList offers = KTrader::self()->query("KTTSD/SynthPlugin",
- QString("DesktopEntryName == '%1'").arg(desktopEntryName));
+ TQString("DesktopEntryName == '%1'").arg(desktopEntryName));
if (offers.count() == 1)
return offers[0]->name();
else
- return QString::null;
+ return TQString::null;
}
diff --git a/kttsd/libkttsd/talkercode.h b/kttsd/libkttsd/talkercode.h
index 45469af..70e8ee6 100644
--- a/kttsd/libkttsd/talkercode.h
+++ b/kttsd/libkttsd/talkercode.h
@@ -27,10 +27,10 @@
#define _TALKERCODE_H_
// Qt includes.
-#include <qstring.h>
+#include <tqstring.h>
#include <kdemacros.h>
#include "kdeexportfix.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class KDE_EXPORT TalkerCode
{
@@ -38,7 +38,7 @@ class KDE_EXPORT TalkerCode
/**
* Constructor.
*/
- TalkerCode(const QString &code=QString::null, bool normal=false);
+ TalkerCode(const TQString &code=TQString::null, bool normal=false);
/**
* Copy Constructor.
*/
@@ -49,46 +49,46 @@ class KDE_EXPORT TalkerCode
*/
~TalkerCode();
- typedef QValueList<TalkerCode> TalkerCodeList;
+ typedef TQValueList<TalkerCode> TalkerCodeList;
/**
* Properties.
*/
- QString languageCode() const; /* lang="xx" */
- QString countryCode() const; /* lang="yy_xx */
- QString voice() const; /* name="xxx" */
- QString gender() const; /* gender="xxx" */
- QString volume() const; /* volume="xxx" */
- QString rate() const; /* rate="xxx" */
- QString plugInName() const; /* synthesizer="xxx" */
+ TQString languageCode() const; /* lang="xx" */
+ TQString countryCode() const; /* lang="yy_xx */
+ TQString voice() const; /* name="xxx" */
+ TQString gender() const; /* gender="xxx" */
+ TQString volume() const; /* volume="xxx" */
+ TQString rate() const; /* rate="xxx" */
+ TQString plugInName() const; /* synthesizer="xxx" */
/**
* Returns the language code plus country code (if any).
*/
- QString fullLanguageCode() const;
+ TQString fullLanguageCode() const;
- void setLanguageCode(const QString &languageCode);
- void setCountryCode(const QString &countryCode);
- void setVoice(const QString &voice);
- void setGender(const QString &gender);
- void setVolume(const QString &volume);
- void setRate(const QString &rate);
- void setPlugInName(const QString plugInName);
+ void setLanguageCode(const TQString &languageCode);
+ void setCountryCode(const TQString &countryCode);
+ void setVoice(const TQString &voice);
+ void setGender(const TQString &gender);
+ void setVolume(const TQString &volume);
+ void setRate(const TQString &rate);
+ void setPlugInName(const TQString plugInName);
/**
* Sets the language code and country code (if given).
*/
- void setFullLanguageCode(const QString &fullLanguageCode);
+ void setFullLanguageCode(const TQString &fullLanguageCode);
/**
* The Talker Code returned in XML format.
*/
- QString getTalkerCode() const;
+ TQString getTalkerCode() const;
/**
* The Talker Code translated for display.
*/
- QString getTranslatedDescription() const;
+ TQString getTranslatedDescription() const;
/**
* Normalizes the Talker Code by filling in defaults.
@@ -102,7 +102,7 @@ class KDE_EXPORT TalkerCode
* @return fullLanguageCode Language code from the talker code (including country code if any).
* @return Normalized talker code.
*/
- static QString normalizeTalkerCode(const QString &talkerCode, QString &fullLanguageCode);
+ static TQString normalizeTalkerCode(const TQString &talkerCode, TQString &fullLanguageCode);
/**
* Given a language code that might contain a country code, splits the code into
@@ -114,7 +114,7 @@ class KDE_EXPORT TalkerCode
* If the input code begins with an asterisk, it is ignored and removed from the returned
* languageCode.
*/
- static void splitFullLanguageCode(const QString &lang, QString &languageCode, QString &countryCode);
+ static void splitFullLanguageCode(const TQString &lang, TQString &languageCode, TQString &countryCode);
/**
* Given a language code and plugin name, returns a normalized default talker code.
@@ -127,22 +127,22 @@ class KDE_EXPORT TalkerCode
* <prosody volume="medium" rate="medium"/>
* <kttsd synthesizer="Festival" />
*/
- static QString defaultTalkerCode(const QString &fullLanguageCode, const QString &plugInName);
+ static TQString defaultTalkerCode(const TQString &fullLanguageCode, const TQString &plugInName);
/**
* Converts a language code plus optional country code to language description.
*/
- static QString languageCodeToLanguage(const QString &languageCode);
+ static TQString languageCodeToLanguage(const TQString &languageCode);
/**
* These functions return translated Talker Code attributes.
*/
- static QString translatedGender(const QString &gender);
- static QString translatedVolume(const QString &volume);
- static QString translatedRate(const QString &rate);
- static QString untranslatedGender(const QString &gender);
- static QString untranslatedVolume(const QString &volume);
- static QString untranslatedRate(const QString &rate);
+ static TQString translatedGender(const TQString &gender);
+ static TQString translatedVolume(const TQString &volume);
+ static TQString translatedRate(const TQString &rate);
+ static TQString untranslatedGender(const TQString &gender);
+ static TQString untranslatedVolume(const TQString &volume);
+ static TQString untranslatedRate(const TQString &rate);
/**
* Given a list of parsed talker codes and a desired talker code, finds the closest
@@ -155,43 +155,43 @@ class KDE_EXPORT TalkerCode
*/
static int findClosestMatchingTalker(
const TalkerCodeList& talkers,
- const QString& talker,
+ const TQString& talker,
bool assumeDefaultLang = true);
/**
* Strips leading * from a code.
*/
- static QString stripPrefer( const QString& code, bool& preferred);
+ static TQString stripPrefer( const TQString& code, bool& preferred);
/**
* Uses KTrader to convert a translated Synth Plugin Name to DesktopEntryName.
* @param name The translated plugin name. From Name= line in .desktop file.
* @return DesktopEntryName. The name of the .desktop file (less .desktop).
- * QString::null if not found.
+ * TQString::null if not found.
*/
- static QString TalkerNameToDesktopEntryName(const QString& name);
+ static TQString TalkerNameToDesktopEntryName(const TQString& name);
/**
* Uses KTrader to convert a DesktopEntryName into a translated Synth Plugin Name.
* @param desktopEntryName The DesktopEntryName.
* @return The translated Name of the plugin, from Name= line in .desktop file.
*/
- static QString TalkerDesktopEntryNameToName(const QString& desktopEntryName);
+ static TQString TalkerDesktopEntryNameToName(const TQString& desktopEntryName);
private:
/**
* Given a talker code, parses out the attributes.
* @param talkerCode The talker code.
*/
- void parseTalkerCode(const QString &talkerCode);
+ void parseTalkerCode(const TQString &talkerCode);
- QString m_languageCode; /* lang="xx" */
- QString m_countryCode; /* lang="yy_xx */
- QString m_voice; /* name="xxx" */
- QString m_gender; /* gender="xxx" */
- QString m_volume; /* volume="xxx" */
- QString m_rate; /* rate="xxx" */
- QString m_plugInName; /* synthesizer="xxx" */
+ TQString m_languageCode; /* lang="xx" */
+ TQString m_countryCode; /* lang="yy_xx */
+ TQString m_voice; /* name="xxx" */
+ TQString m_gender; /* gender="xxx" */
+ TQString m_volume; /* volume="xxx" */
+ TQString m_rate; /* rate="xxx" */
+ TQString m_plugInName; /* synthesizer="xxx" */
};
#endif // _TALKERCODE_H_
diff --git a/kttsd/libkttsd/testplayer.cpp b/kttsd/libkttsd/testplayer.cpp
index 06d05a7..1050ec2 100644
--- a/kttsd/libkttsd/testplayer.cpp
+++ b/kttsd/libkttsd/testplayer.cpp
@@ -23,7 +23,7 @@
******************************************************************************/
// Qt includes.
-#include <qfile.h>
+#include <tqfile.h>
// KDE includes.
#include <kapplication.h>
@@ -44,9 +44,9 @@
/**
* Constructor.
*/
-TestPlayer::TestPlayer(QObject *parent, const char *name,
- const int playerOption, const float audioStretchFactor, const QString &sinkName) :
- QObject(parent, name)
+TestPlayer::TestPlayer(TQObject *parent, const char *name,
+ const int playerOption, const float audioStretchFactor, const TQString &sinkName) :
+ TQObject(parent, name)
{
m_playerOption = playerOption;
m_audioStretchFactor = audioStretchFactor;
@@ -82,19 +82,19 @@ void TestPlayer::setPlayerOption(const int playerOption) { m_playerOption = play
void TestPlayer::setAudioStretchFactor(const float audioStretchFactor)
{ m_audioStretchFactor = audioStretchFactor; }
-void TestPlayer::setSinkName(const QString &sinkName) { m_sinkName = sinkName; }
+void TestPlayer::setSinkName(const TQString &sinkName) { m_sinkName = sinkName; }
/**
* Plays the specifified audio file and waits for completion.
* The audio file speed is adjusted according to the stretch factor.
* @param waveFile Name of the audio file to play.
*/
-void TestPlayer::play(const QString &waveFile)
+void TestPlayer::play(const TQString &waveFile)
{
// kdDebug() << "TestPlayer::play: running" << endl;
// Create a Stretcher object to adjust the audio Speed.
- QString playFile = waveFile;
- QString tmpFile;
+ TQString playFile = waveFile;
+ TQString tmpFile;
if (m_audioStretchFactor != 1.0)
{
tmpFile = makeSuggestedFilename();
@@ -128,7 +128,7 @@ void TestPlayer::play(const QString &waveFile)
m_player->stop();
delete m_player;
m_player = 0;
- if (!tmpFile.isEmpty()) QFile::remove(tmpFile);
+ if (!tmpFile.isEmpty()) TQFile::remove(tmpFile);
}
/**
@@ -137,7 +137,7 @@ void TestPlayer::play(const QString &waveFile)
Player* TestPlayer::createPlayerObject(int playerOption)
{
Player* player = 0;
- QString plugInName;
+ TQString plugInName;
switch(playerOption)
{
case 1 :
@@ -162,7 +162,7 @@ Player* TestPlayer::createPlayerObject(int playerOption)
}
}
KTrader::OfferList offers = KTrader::self()->query(
- "KTTSD/AudioPlugin", QString("DesktopEntryName == '%1'").arg(plugInName));
+ "KTTSD/AudioPlugin", TQString("DesktopEntryName == '%1'").arg(plugInName));
if(offers.count() == 1)
{
@@ -197,12 +197,12 @@ Player* TestPlayer::createPlayerObject(int playerOption)
* for synthesis to write to.
* @return Full pathname of suggested file.
*/
-QString TestPlayer::makeSuggestedFilename()
+TQString TestPlayer::makeSuggestedFilename()
{
KTempFile tempFile (locateLocal("tmp", "kttsmgr-"), ".wav");
- QString waveFile = tempFile.file()->name();
+ TQString waveFile = tempFile.file()->name();
tempFile.close();
- QFile::remove(waveFile);
+ TQFile::remove(waveFile);
// kdDebug() << "TestPlayer::makeSuggestedFilename: Suggesting filename: " << waveFile << endl;
return PlugInConf::realFilePath(waveFile);
}
diff --git a/kttsd/libkttsd/testplayer.h b/kttsd/libkttsd/testplayer.h
index 2e7339c..f3e4e4b 100644
--- a/kttsd/libkttsd/testplayer.h
+++ b/kttsd/libkttsd/testplayer.h
@@ -40,9 +40,9 @@ class KDE_EXPORT TestPlayer : public QObject{
* @param playerOption
* @param audioStretchFactor
*/
- TestPlayer(QObject *parent = 0, const char *name = 0,
+ TestPlayer(TQObject *parent = 0, const char *name = 0,
const int playerOption = 0, const float audioStretchFactor = 1.0,
- const QString &sinkName = QString::null);
+ const TQString &sinkName = TQString::null);
/**
* Destructor.
@@ -69,12 +69,12 @@ class KDE_EXPORT TestPlayer : public QObject{
* The audio file speed is adjusted according to the stretch factor.
* @param waveFile Name of the audio file to play.
*/
- void play(const QString &waveFile);
+ void play(const TQString &waveFile);
/**
* Sets the GStreamer Sink Name. Examples: "alsasink", "osssink", "nassink".
*/
- void setSinkName(const QString &sinkName);
+ void setSinkName(const TQString &sinkName);
/**
* Creates and returns a player object based on user option.
@@ -88,7 +88,7 @@ class KDE_EXPORT TestPlayer : public QObject{
* for synthesis to write to.
* @return Full pathname of suggested file.
*/
- QString makeSuggestedFilename();
+ TQString makeSuggestedFilename();
/**
* Which audio player to use.
@@ -105,7 +105,7 @@ class KDE_EXPORT TestPlayer : public QObject{
/**
* GStreamer sink name.
*/
- QString m_sinkName;
+ TQString m_sinkName;
/**
* Stretcher object.
diff --git a/kttsd/libkttsd/utils.cpp b/kttsd/libkttsd/utils.cpp
index dd9f98c..ed9200b 100644
--- a/kttsd/libkttsd/utils.cpp
+++ b/kttsd/libkttsd/utils.cpp
@@ -15,9 +15,9 @@
* *
***************************************************************************/
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include "utils.h"
@@ -34,9 +34,9 @@ KttsUtils::~KttsUtils() {
* @param elementName The element to check for in the document.
* @returns True if the root element exists in the document, false otherwise.
*/
-bool KttsUtils::hasRootElement(const QString &xmldoc, const QString &elementName) {
+bool KttsUtils::hasRootElement(const TQString &xmldoc, const TQString &elementName) {
// Strip all whitespace and go from there.
- QString doc = xmldoc.simplifyWhiteSpace();
+ TQString doc = xmldoc.simplifyWhiteSpace();
// Take off the <?xml...?> if it exists
if(doc.startsWith("<?xml")) {
// Look for ?> and strip everything off from there to the start - effectively removing
@@ -76,14 +76,14 @@ bool KttsUtils::hasRootElement(const QString &xmldoc, const QString &elementName
/**
* Check if an XML document has a certain DOCTYPE.
* @param xmldoc The document to check for the doctype.
- * @param name The doctype name to check for. Pass QString::null to not check the name.
- * @param publicId The public ID to check for. Pass QString::null to not check the ID.
- * @param systemId The system ID to check for. Pass QString::null to not check the ID.
+ * @param name The doctype name to check for. Pass TQString::null to not check the name.
+ * @param publicId The public ID to check for. Pass TQString::null to not check the ID.
+ * @param systemId The system ID to check for. Pass TQString::null to not check the ID.
* @returns True if the parameters match the doctype, false otherwise.
*/
-bool KttsUtils::hasDoctype(const QString &xmldoc, const QString &name/*, const QString &publicId, const QString &systemId*/) {
+bool KttsUtils::hasDoctype(const TQString &xmldoc, const TQString &name/*, const TQString &publicId, const TQString &systemId*/) {
// Strip all whitespace and go from there.
- QString doc = xmldoc.stripWhiteSpace();
+ TQString doc = xmldoc.stripWhiteSpace();
// Take off the <?xml...?> if it exists
if(doc.startsWith("<?xml")) {
// Look for ?> and strip everything off from there to the start - effectively removing
@@ -117,7 +117,7 @@ bool KttsUtils::hasDoctype(const QString &xmldoc, const QString &name/*, const Q
* Sets the current item in the given combobox to the item with the given text.
* If item with the text not found, does nothing.
*/
-/*static*/ void KttsUtils::setCbItemFromText(QComboBox* cb, const QString& text)
+/*static*/ void KttsUtils::setCbItemFromText(TQComboBox* cb, const TQString& text)
{
const int itemCount = cb->count();
for (int ndx = 0; ndx < itemCount; ++ndx)
diff --git a/kttsd/libkttsd/utils.h b/kttsd/libkttsd/utils.h
index 63e95bc..a8b922c 100644
--- a/kttsd/libkttsd/utils.h
+++ b/kttsd/libkttsd/utils.h
@@ -38,23 +38,23 @@ public:
* @param elementName The element to check for in the document.
* @returns true if the root element exists in the document, false otherwise.
*/
- static bool hasRootElement(const QString &xmldoc, const QString &elementName);
+ static bool hasRootElement(const TQString &xmldoc, const TQString &elementName);
/**
* Check if an XML document has a certain DOCTYPE.
* @param xmldoc The document to check for the doctype.
- * @param name The doctype name to check for. Pass QString::null to not check the name.
- * @param publicId The public ID to check for. Pass QString::null to not check the ID.
- * @param systemId The system ID to check for. Pass QString::null to not check the ID.
+ * @param name The doctype name to check for. Pass TQString::null to not check the name.
+ * @param publicId The public ID to check for. Pass TQString::null to not check the ID.
+ * @param systemId The system ID to check for. Pass TQString::null to not check the ID.
* @returns true if the parameters match the doctype, false otherwise.
*/
- static bool hasDoctype(const QString &xmldoc, const QString &name/*, const QString &publicId, const QString &systemId*/);
+ static bool hasDoctype(const TQString &xmldoc, const TQString &name/*, const TQString &publicId, const TQString &systemId*/);
/**
* Sets the current item in the given combobox to the item with the given text.
* If item with the text not found, does nothing.
*/
- static void setCbItemFromText(QComboBox* cb, const QString& text);
+ static void setCbItemFromText(TQComboBox* cb, const TQString& text);
};
diff --git a/kttsd/players/akodeplayer/akodeplayer.cpp b/kttsd/players/akodeplayer/akodeplayer.cpp
index de88773..13f6cf3 100644
--- a/kttsd/players/akodeplayer/akodeplayer.cpp
+++ b/kttsd/players/akodeplayer/akodeplayer.cpp
@@ -16,7 +16,7 @@
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "akode/player.h"
#include "akode/decoder.h"
@@ -29,7 +29,7 @@ using namespace aKode;
// public methods
////////////////////////////////////////////////////////////////////////////////
-aKodePlayer::aKodePlayer(QObject* parent, const char* name, const QStringList& args) :
+aKodePlayer::aKodePlayer(TQObject* parent, const char* name, const TQStringList& args) :
Player(parent, name, args),
m_player(0)
{}
@@ -40,7 +40,7 @@ aKodePlayer::~aKodePlayer()
}
//void aKodePlayer::play(const FileHandle &file)
-void aKodePlayer::startPlay(const QString &file)
+void aKodePlayer::startPlay(const TQString &file)
{
kdDebug() << k_funcinfo << endl;
@@ -53,7 +53,7 @@ void aKodePlayer::startPlay(const QString &file)
return;
}
- // QString filename = file.absFilePath();
+ // TQString filename = file.absFilePath();
kdDebug() << "Opening: " << file << endl;
@@ -68,7 +68,7 @@ void aKodePlayer::startPlay(const QString &file)
}
}
- if (m_player->load(QFile::encodeName(file)))
+ if (m_player->load(TQFile::encodeName(file)))
m_player->play();
}
@@ -169,11 +169,11 @@ void aKodePlayer::seekPosition(int position)
m_player->decoder()->seek((position * m_player->decoder()->length())/1000);
}
-QStringList aKodePlayer::getPluginList( const QCString& /*classname*/ )
+TQStringList aKodePlayer::getPluginList( const TQCString& /*classname*/ )
{
- return QStringList::split("|", "auto|polyp|alsa|jack|oss");
+ return TQStringList::split("|", "auto|polyp|alsa|jack|oss");
}
-void aKodePlayer::setSinkName(const QString& sinkName) { m_sinkName = sinkName; }
+void aKodePlayer::setSinkName(const TQString& sinkName) { m_sinkName = sinkName; }
#include "akodeplayer.moc"
diff --git a/kttsd/players/akodeplayer/akodeplayer.h b/kttsd/players/akodeplayer/akodeplayer.h
index bbfb3ea..c003d13 100644
--- a/kttsd/players/akodeplayer/akodeplayer.h
+++ b/kttsd/players/akodeplayer/akodeplayer.h
@@ -19,7 +19,7 @@
#include <config.h>
#include "kdeexportfix.h"
-#include <qstring.h>
+#include <tqstring.h>
#include "player.h"
#include <kdemacros.h>
@@ -33,11 +33,11 @@ class KDE_EXPORT aKodePlayer : public Player
Q_OBJECT
public:
- aKodePlayer(QObject* parent = 0, const char* name = 0, const QStringList& args=QStringList());
+ aKodePlayer(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList());
virtual ~aKodePlayer();
// virtual void play(const FileHandle &file = FileHandle::null());
- virtual void startPlay(const QString &file);
+ virtual void startPlay(const TQString &file);
virtual void setVolume(float volume = 1.0);
virtual float volume() const;
@@ -52,8 +52,8 @@ public:
virtual void seek(int seekTime);
virtual void seekPosition(int position);
- virtual QStringList getPluginList( const QCString& classname );
- virtual void setSinkName(const QString &sinkName);
+ virtual TQStringList getPluginList( const TQCString& classname );
+ virtual void setSinkName(const TQString &sinkName);
public slots:
void pause();
@@ -61,7 +61,7 @@ public slots:
private:
aKode::Player *m_player;
- QString m_sinkName;
+ TQString m_sinkName;
};
#endif
diff --git a/kttsd/players/alsaplayer/alsaplayer.cpp b/kttsd/players/alsaplayer/alsaplayer.cpp
index d3eabe8..72a242a 100644
--- a/kttsd/players/alsaplayer/alsaplayer.cpp
+++ b/kttsd/players/alsaplayer/alsaplayer.cpp
@@ -39,9 +39,9 @@
#endif
// Qt includes.
-#include <qdir.h>
-#include <qapplication.h>
-#include <qcstring.h>
+#include <tqdir.h>
+#include <tqapplication.h>
+#include <tqcstring.h>
// KDE includes.
#include <kdebug.h>
@@ -55,15 +55,15 @@
#if !defined(__GNUC__) || __GNUC__ >= 3
#define ERR(...) do {\
- QString dbgStr;\
- QString s = dbgStr.sprintf( "%s:%d: ERROR ", __FUNCTION__, __LINE__); \
+ TQString dbgStr;\
+ TQString s = dbgStr.sprintf( "%s:%d: ERROR ", __FUNCTION__, __LINE__); \
s += dbgStr.sprintf( __VA_ARGS__); \
kdDebug() << timestamp() << "AlsaPlayer::" << s << endl; \
} while (0)
#else
#define ERR(args...) do {\
- QString dbgStr;\
- QString s = dbgStr.sprintf( "%s:%d: ERROR ", __FUNCTION__, __LINE__); \
+ TQString dbgStr;\
+ TQString s = dbgStr.sprintf( "%s:%d: ERROR ", __FUNCTION__, __LINE__); \
s += dbgStr.sprintf( ##args ); \
kdDebug() << timestamp() << "AlsaPlayer::" << s << endl; \
} while (0)
@@ -72,8 +72,8 @@
#if !defined(__GNUC__) || __GNUC__ >= 3
#define MSG(...) do {\
if (m_debugLevel >= 1) {\
- QString dbgStr; \
- QString s = dbgStr.sprintf( "%s:%d: ", __FUNCTION__, __LINE__); \
+ TQString dbgStr; \
+ TQString s = dbgStr.sprintf( "%s:%d: ", __FUNCTION__, __LINE__); \
s += dbgStr.sprintf( __VA_ARGS__); \
kdDebug() << timestamp() << "AlsaPlayer::" << s << endl; \
}; \
@@ -81,8 +81,8 @@
#else
#define MSG(args...) do {\
if (m_debugLevel >= 1) {\
- QString dbgStr; \
- QString s = dbgStr.sprintf( "%s:%d: ", __FUNCTION__, __LINE__); \
+ TQString dbgStr; \
+ TQString s = dbgStr.sprintf( "%s:%d: ", __FUNCTION__, __LINE__); \
s += dbgStr.sprintf( ##args ); \
kdDebug() << timestamp() << "AlsaPlayer::" << s << endl; \
}; \
@@ -92,8 +92,8 @@
#if !defined(__GNUC__) || __GNUC__ >= 3
#define DBG(...) do {\
if (m_debugLevel >= 2) {\
- QString dbgStr; \
- QString s = dbgStr.sprintf( "%s:%d: ", __FUNCTION__, __LINE__); \
+ TQString dbgStr; \
+ TQString s = dbgStr.sprintf( "%s:%d: ", __FUNCTION__, __LINE__); \
s += dbgStr.sprintf( __VA_ARGS__); \
kdDebug() << timestamp() << "AlsaPlayer::" << s << endl; \
}; \
@@ -101,15 +101,15 @@
#else
#define DBG(args...) do {\
if (m_debugLevel >= 2) {\
- QString dbgStr; \
- QString s = dbgStr.sprintf( "%s:%d: ", __FUNCTION__, __LINE__); \
+ TQString dbgStr; \
+ TQString s = dbgStr.sprintf( "%s:%d: ", __FUNCTION__, __LINE__); \
s += dbgStr.sprintf( ##args ); \
kdDebug() << timestamp() << "AlsaPlayer::" << s << endl; \
}; \
} while (0)
#endif
-QString AlsaPlayer::timestamp() const
+TQString AlsaPlayer::timestamp() const
{
time_t t;
struct timeval tv;
@@ -118,7 +118,7 @@ QString AlsaPlayer::timestamp() const
tstr = strdup(ctime(&t));
tstr[strlen(tstr)-1] = 0;
gettimeofday(&tv,NULL);
- QString ts;
+ TQString ts;
ts.sprintf(" %s [%d] ",tstr, (int) tv.tv_usec);
free(tstr);
return ts;
@@ -128,7 +128,7 @@ QString AlsaPlayer::timestamp() const
// public methods
////////////////////////////////////////////////////////////////////////////////
-AlsaPlayer::AlsaPlayer(QObject* parent, const char* name, const QStringList& args) :
+AlsaPlayer::AlsaPlayer(TQObject* parent, const char* name, const TQStringList& args) :
Player(parent, name, args),
m_currentVolume(1.0),
m_pcmName("default"),
@@ -149,7 +149,7 @@ AlsaPlayer::~AlsaPlayer()
}
//void AlsaPlayer::play(const FileHandle &file)
-void AlsaPlayer::startPlay(const QString &file)
+void AlsaPlayer::startPlay(const TQString &file)
{
if (running()) {
if (paused()) {
@@ -169,7 +169,7 @@ void AlsaPlayer::startPlay(const QString &file)
/*virtual*/ void AlsaPlayer::run()
{
- QString pName = m_pcmName.section(" ", 0, 0);
+ TQString pName = m_pcmName.section(" ", 0, 0);
DBG("pName = %s", pName.ascii());
pcm_name = qstrdup(pName.ascii());
int err;
@@ -395,7 +395,7 @@ void AlsaPlayer::seekPosition(int /*position*/)
* It uses plughw:xx instead of hw:xx for specifiers, because hw:xx are not practical to
* use (e.g. they require a resampler/channel mixer in the application).
*/
-QStringList AlsaPlayer::getPluginList( const QCString& /*classname*/ )
+TQStringList AlsaPlayer::getPluginList( const TQCString& /*classname*/ )
{
int err = 0;
int card = -1, device = -1;
@@ -404,7 +404,7 @@ QStringList AlsaPlayer::getPluginList( const QCString& /*classname*/ )
snd_pcm_info_t *pcminfo;
snd_ctl_card_info_alloca(&info);
snd_pcm_info_alloca(&pcminfo);
- QStringList result;
+ TQStringList result;
result.append("default");
for (;;) {
@@ -426,16 +426,16 @@ QStringList AlsaPlayer::getPluginList( const QCString& /*classname*/ )
snd_pcm_info_set_subdevice(pcminfo, 0);
snd_pcm_info_set_stream(pcminfo, SND_PCM_STREAM_PLAYBACK);
if ((err = snd_ctl_pcm_info(handle, pcminfo)) < 0) continue;
- QString infoName = " ";
+ TQString infoName = " ";
infoName += snd_ctl_card_info_get_name(info);
infoName += " (";
infoName += snd_pcm_info_get_name(pcminfo);
infoName += ")";
if (0 == devCnt) {
- QString pcmName = QString("default:%1").arg(card);
+ TQString pcmName = TQString("default:%1").arg(card);
result.append(pcmName + infoName);
}
- QString pcmName = QString("plughw:%1,%2").arg(card).arg(device);
+ TQString pcmName = TQString("plughw:%1,%2").arg(card).arg(device);
result.append(pcmName + infoName);
}
snd_ctl_close(handle);
@@ -444,9 +444,9 @@ QStringList AlsaPlayer::getPluginList( const QCString& /*classname*/ )
return result;
}
-// QStringList AlsaPlayer::getPluginList( const QCString& /*classname*/ )
+// TQStringList AlsaPlayer::getPluginList( const TQCString& /*classname*/ )
// {
-// QStringList assumed("default");
+// TQStringList assumed("default");
// snd_config_t *conf;
// int err = snd_config_update();
// if (err < 0) {
@@ -454,12 +454,12 @@ QStringList AlsaPlayer::getPluginList( const QCString& /*classname*/ )
// return assumed;
// }
// err = snd_config_search(snd_config, "pcm", &conf);
-// if (err < 0) return QStringList();
+// if (err < 0) return TQStringList();
// snd_config_iterator_t it = snd_config_iterator_first(conf);
// snd_config_iterator_t itEnd = snd_config_iterator_end(conf);
// const char* id;
// snd_config_t *entry;
-// QStringList result;
+// TQStringList result;
// snd_ctl_card_info_t *info;
// snd_ctl_card_info_alloca(&info);
// snd_pcm_info_t *pcminfo;
@@ -468,7 +468,7 @@ QStringList AlsaPlayer::getPluginList( const QCString& /*classname*/ )
// entry = snd_config_iterator_entry(it);
// err = snd_config_get_id(entry, &id);
// if (err >= 0) {
-// if (QString(id) != "default")
+// if (TQString(id) != "default")
// {
// int card = -1;
// while (snd_card_next(&card) >= 0 && card >= 0) {
@@ -485,9 +485,9 @@ QStringList AlsaPlayer::getPluginList( const QCString& /*classname*/ )
// snd_pcm_info_set_subdevice(pcminfo, 0);
// snd_pcm_info_set_stream(pcminfo, stream);
// if ((err = snd_ctl_pcm_info(handle, pcminfo)) >= 0) {
-// QString pluginName = name;
+// TQString pluginName = name;
// pluginName += ",";
-// pluginName += QString::number(dev);
+// pluginName += TQString::number(dev);
// pluginName += " ";
// pluginName += snd_ctl_card_info_get_name(info);
// pluginName += ",";
@@ -509,7 +509,7 @@ QStringList AlsaPlayer::getPluginList( const QCString& /*classname*/ )
// return result;
// }
-void AlsaPlayer::setSinkName(const QString& sinkName) { m_pcmName = sinkName; }
+void AlsaPlayer::setSinkName(const TQString& sinkName) { m_pcmName = sinkName; }
/////////////////////////////////////////////////////////////////////////////////
// private
@@ -1205,7 +1205,7 @@ void AlsaPlayer::voc_write_silence(unsigned x)
unsigned l;
char *buf;
- QByteArray buffer(chunk_bytes);
+ TQByteArray buffer(chunk_bytes);
// buf = (char *) malloc(chunk_bytes);
buf = buffer.data();
if (buf == NULL) {
@@ -1259,7 +1259,7 @@ void AlsaPlayer::voc_play(int fd, int ofs, const char* name)
#define COUNT(x) nextblock -= x; in_buffer -= x; data += x
#define COUNT1(x) in_buffer -= x; data += x
- QByteArray buffer(64 * 1024);
+ TQByteArray buffer(64 * 1024);
// data = buf = (u_char *)malloc(64 * 1024);
data = buf = (u_char*)buffer.data();
buffer_pos = 0;
@@ -1490,13 +1490,13 @@ void AlsaPlayer::header(int /*rtype*/, const char* /*name*/)
// (stream == SND_PCM_STREAM_PLAYBACK) ? "Playing" : "Recording",
// fmt_rec_table[rtype].what,
// name);
- QString channels;
+ TQString channels;
if (hwdata.channels == 1)
channels = "Mono";
else if (hwdata.channels == 2)
channels = "Stereo";
else
- channels = QString("Channels %1").arg(hwdata.channels);
+ channels = TQString("Channels %1").arg(hwdata.channels);
DBG("Format: %s, Rate %d Hz, %s",
snd_pcm_format_description(hwdata.format),
hwdata.rate,
diff --git a/kttsd/players/alsaplayer/alsaplayer.h b/kttsd/players/alsaplayer/alsaplayer.h
index acd465c..d307060 100644
--- a/kttsd/players/alsaplayer/alsaplayer.h
+++ b/kttsd/players/alsaplayer/alsaplayer.h
@@ -29,11 +29,11 @@
#include <sys/poll.h>
// Qt includes.
-#include <qstring.h>
-#include <qobject.h>
-#include <qthread.h>
-#include <qfile.h>
-#include <qmutex.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqthread.h>
+#include <tqfile.h>
+#include <tqmutex.h>
// KDE includes.
#include <config.h>
@@ -68,10 +68,10 @@ class KDE_EXPORT AlsaPlayer : public Player, QThread
Q_OBJECT
public:
- AlsaPlayer(QObject* parent = 0, const char* name = 0, const QStringList& args=QStringList());
+ AlsaPlayer(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList());
~AlsaPlayer();
- virtual void startPlay(const QString& file);
+ virtual void startPlay(const TQString& file);
virtual void pause();
virtual void stop();
@@ -88,8 +88,8 @@ public:
virtual void seek(int seekTime);
virtual void seekPosition(int position);
- virtual QStringList getPluginList( const QCString& classname );
- virtual void setSinkName(const QString &sinkName);
+ virtual TQStringList getPluginList( const TQCString& classname );
+ virtual void setSinkName(const TQString &sinkName);
virtual void setDebugLevel(uint level) { m_debugLevel = level; }
virtual void setPeriodSize(uint periodSize) { m_defPeriodSize = periodSize; }
@@ -106,7 +106,7 @@ private:
void stopAndExit();
int wait_for_poll(int draining);
- QString timestamp() const;
+ TQString timestamp() const;
ssize_t safe_read(int fd, void *buf, size_t count);
int test_vocfile(void *buffer);
@@ -130,12 +130,12 @@ private:
KURL m_currentURL;
float m_currentVolume;
- QString m_pcmName;
+ TQString m_pcmName;
char* pcm_name;
- mutable QMutex m_mutex;
+ mutable TQMutex m_mutex;
- QFile audiofile;
- QString name;
+ TQFile audiofile;
+ TQString name;
bool canPause;
snd_pcm_t *handle;
@@ -151,7 +151,7 @@ private:
snd_pcm_stream_t stream;
int mmap_flag;
int interleaved;
- QByteArray audioBuffer;
+ TQByteArray audioBuffer;
char *audiobuf;
snd_pcm_uframes_t chunk_size;
snd_pcm_uframes_t period_frames;
@@ -174,7 +174,7 @@ private:
int alsa_stop_pipe[2]; /* Pipe for communication about stop requests*/
int alsa_fd_count; /* Counter of descriptors to poll */
- QByteArray alsa_poll_fds_barray;
+ TQByteArray alsa_poll_fds_barray;
struct pollfd *alsa_poll_fds; /* Descriptors to poll */
unsigned int m_defPeriodSize;
unsigned int m_defPeriods;
diff --git a/kttsd/players/artsplayer/artsplayer.cpp b/kttsd/players/artsplayer/artsplayer.cpp
index 512765a..9e6e771 100644
--- a/kttsd/players/artsplayer/artsplayer.cpp
+++ b/kttsd/players/artsplayer/artsplayer.cpp
@@ -22,8 +22,8 @@
#include <kconfig.h>
#include <kstandarddirs.h>
-#include <qdir.h>
-#include <qapplication.h>
+#include <tqdir.h>
+#include <tqapplication.h>
#include <kartsserver.h>
#include <kartsdispatcher.h>
@@ -40,7 +40,7 @@
// public methods
////////////////////////////////////////////////////////////////////////////////
-ArtsPlayer::ArtsPlayer(QObject* parent, const char* name, const QStringList& args) :
+ArtsPlayer::ArtsPlayer(TQObject* parent, const char* name, const TQStringList& args) :
Player(parent, name, args),
m_dispatcher(0),
m_server(0),
@@ -62,7 +62,7 @@ ArtsPlayer::~ArtsPlayer()
}
//void ArtsPlayer::play(const FileHandle &file)
-void ArtsPlayer::startPlay(const QString &file)
+void ArtsPlayer::startPlay(const TQString &file)
{
if (!m_dispatcher)
setupPlayer();
@@ -87,7 +87,7 @@ void ArtsPlayer::startPlay(const QString &file)
m_playobject = m_factory->createPlayObject(m_currentURL, false);
if(m_playobject->object().isNull())
- connect(m_playobject, SIGNAL(playObjectCreated()), SLOT(playObjectCreated()));
+ connect(m_playobject, TQT_SIGNAL(playObjectCreated()), TQT_SLOT(playObjectCreated()));
else
playObjectCreated();
}
@@ -254,7 +254,7 @@ void ArtsPlayer::setupPlayer()
m_dispatcher = new KArtsDispatcher;
m_server = new KArtsServer;
setupArtsObjects();
- connect(m_server, SIGNAL(restartedServer()), SLOT(setupArtsObjects()));
+ connect(m_server, TQT_SIGNAL(restartedServer()), TQT_SLOT(setupArtsObjects()));
}
void ArtsPlayer::setupVolumeControl()
diff --git a/kttsd/players/artsplayer/artsplayer.h b/kttsd/players/artsplayer/artsplayer.h
index 96d62f6..879dccc 100644
--- a/kttsd/players/artsplayer/artsplayer.h
+++ b/kttsd/players/artsplayer/artsplayer.h
@@ -27,8 +27,8 @@
#include <kurl.h>
-#include <qstring.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqobject.h>
#include <artsflow.h>
class KArtsDispatcher;
@@ -45,11 +45,11 @@ class KDE_EXPORT ArtsPlayer : public Player
Q_OBJECT
public:
- ArtsPlayer(QObject* parent = 0, const char* name = 0, const QStringList& args=QStringList());
+ ArtsPlayer(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList());
~ArtsPlayer();
// virtual void play(const FileHandle &file = FileHandle::null());
- virtual void startPlay(const QString& file);
+ virtual void startPlay(const TQString& file);
virtual void pause();
virtual void stop();
diff --git a/kttsd/players/gstplayer/gstreamerplayer.cpp b/kttsd/players/gstplayer/gstreamerplayer.cpp
index 64aa1c4..4d56556 100644
--- a/kttsd/players/gstplayer/gstreamerplayer.cpp
+++ b/kttsd/players/gstplayer/gstreamerplayer.cpp
@@ -13,7 +13,7 @@
***************************************************************************/
// Qt includes.
-#include <qfile.h>
+#include <tqfile.h>
// KDE includes.
#include <kapplication.h>
@@ -29,7 +29,7 @@
// public methods
////////////////////////////////////////////////////////////////////////////////
-GStreamerPlayer::GStreamerPlayer(QObject* parent, const char* name, const QStringList& args) :
+GStreamerPlayer::GStreamerPlayer(TQObject* parent, const char* name, const TQStringList& args) :
Player(parent, name, args),
m_initialized(false),
m_pipeline(0),
@@ -49,7 +49,7 @@ GStreamerPlayer::~GStreamerPlayer()
}
//void GStreamerPlayer::play(const FileHandle &file)
-void GStreamerPlayer::startPlay(const QString &file)
+void GStreamerPlayer::startPlay(const TQString &file)
{
if(!file.isNull()) {
stop();
@@ -127,14 +127,14 @@ void GStreamerPlayer::seekPosition(int position)
* @param classname Desired class. Use "Sink/Audio" for sinks.
* @return List of plugin names.
*/
-QStringList GStreamerPlayer::getPluginList( const QCString& classname )
+TQStringList GStreamerPlayer::getPluginList( const TQCString& classname )
{
GList * pool_registries = NULL;
GList* registries = NULL;
GList* plugins = NULL;
GList* features = NULL;
- QString name;
- QStringList results;
+ TQString name;
+ TQStringList results;
if(!m_initialized) {
int argc = kapp->argc();
@@ -189,16 +189,16 @@ bool GStreamerPlayer::requireVersion(uint major, uint minor, uint micro)
}
gst_version(&gmajor, &gminor, &gmicro);
- // kdDebug() << QString("GStreamerPlayer::requireVersion: You have gstreamer %1.%2.%3 installed.").arg(gmajor).arg(gminor).arg(gmicro) << endl;
+ // kdDebug() << TQString("GStreamerPlayer::requireVersion: You have gstreamer %1.%2.%3 installed.").arg(gmajor).arg(gminor).arg(gmicro) << endl;
if (gmajor > major) return true;
if (gminor > minor) return true;
if (gmicro >= micro) return true;
- kdDebug() << QString("GStreamerPlayer::requireVersion: You have gstreamer %1.%2.%3 installed.").arg(gmajor).arg(gminor).arg(gmicro) << endl;
- kdDebug() << QString("GStreamerPlayer::requireVersion: This application requires %1.%2.%3 or greater.").arg(major).arg(minor).arg(micro) << endl;
+ kdDebug() << TQString("GStreamerPlayer::requireVersion: You have gstreamer %1.%2.%3 installed.").arg(gmajor).arg(gminor).arg(gmicro) << endl;
+ kdDebug() << TQString("GStreamerPlayer::requireVersion: This application requires %1.%2.%3 or greater.").arg(major).arg(minor).arg(micro) << endl;
return false;
}
-void GStreamerPlayer::setSinkName(const QString &sinkName) { m_sinkName = sinkName; }
+void GStreamerPlayer::setSinkName(const TQString &sinkName) { m_sinkName = sinkName; }
////////////////////////////////////////////////////////////////////////////////
// private methods
@@ -207,7 +207,7 @@ void GStreamerPlayer::setSinkName(const QString &sinkName) { m_sinkName = sinkNa
void GStreamerPlayer::readConfig()
{
KConfigGroup config(KGlobal::config(), "GStreamerPlayer");
- m_sinkName = config.readEntry("SinkName", QString::null);
+ m_sinkName = config.readEntry("SinkName", TQString::null);
}
void GStreamerPlayer::setupPipeline()
diff --git a/kttsd/players/gstplayer/gstreamerplayer.h b/kttsd/players/gstplayer/gstreamerplayer.h
index 6a7f1d6..13701ab 100644
--- a/kttsd/players/gstplayer/gstreamerplayer.h
+++ b/kttsd/players/gstplayer/gstreamerplayer.h
@@ -22,7 +22,7 @@ extern "C" {
#include <gst/gstversion.h>
}
#include <gst/gst.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "player.h"
class GStreamerPlayer : public Player
@@ -30,11 +30,11 @@ class GStreamerPlayer : public Player
Q_OBJECT
public:
- GStreamerPlayer(QObject* parent = 0, const char* name = 0, const QStringList& args=QStringList());
+ GStreamerPlayer(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList());
virtual ~GStreamerPlayer();
// virtual void play(const FileHandle &file = FileHandle::null());
- virtual void startPlay(const QString& file);
+ virtual void startPlay(const TQString& file);
virtual void setVolume(float volume = 1.0);
virtual float volume() const;
@@ -49,8 +49,8 @@ public:
virtual void seek(int seekTime);
virtual void seekPosition(int position);
- virtual QStringList getPluginList( const QCString& classname );
- virtual void setSinkName(const QString &sinkName);
+ virtual TQStringList getPluginList( const TQCString& classname );
+ virtual void setSinkName(const TQString &sinkName);
virtual bool requireVersion(uint major, uint minor, uint micro);
@@ -62,7 +62,7 @@ private:
void setupPipeline();
long long time(GstQueryType type) const;
- QString m_sinkName;
+ TQString m_sinkName;
// True once gst_init() has been called.
bool m_initialized;
diff --git a/kttsd/plugins/command/commandconf.cpp b/kttsd/plugins/command/commandconf.cpp
index 9d70ff2..5d46fe9 100644
--- a/kttsd/plugins/command/commandconf.cpp
+++ b/kttsd/plugins/command/commandconf.cpp
@@ -16,11 +16,11 @@
***************************************************************************/
// Qt includes.
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qfile.h>
-#include <qapplication.h>
-#include <qtextcodec.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
+#include <tqapplication.h>
+#include <tqtextcodec.h>
// KDE includes.
#include <kdialog.h>
@@ -41,14 +41,14 @@
#include "commandconf.h"
/** Constructor */
-CommandConf::CommandConf( QWidget* parent, const char* name, const QStringList& /*args*/) :
+CommandConf::CommandConf( TQWidget* parent, const char* name, const TQStringList& /*args*/) :
PlugInConf(parent, name)
{
// kdDebug() << "CommandConf::CommandConf: Running" << endl;
m_commandProc = 0;
m_progressDlg = 0;
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "CommandConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new CommandConfWidget(this, "CommandConfigWidget");
@@ -60,39 +60,39 @@ CommandConf::CommandConf( QWidget* parent, const char* name, const QStringList&
m_widget->characterCodingBox->insertStringList(m_codecList);
defaults();
- connect(m_widget->characterCodingBox, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->characterCodingBox, SIGNAL(activated(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->stdInButton, SIGNAL(toggled(bool)),
- this, SLOT(configChanged()));
- connect(m_widget->urlReq, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->commandTestButton, SIGNAL(clicked()),
- this, SLOT(slotCommandTest_clicked()));
+ connect(m_widget->characterCodingBox, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->characterCodingBox, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->stdInButton, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->urlReq, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->commandTestButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotCommandTest_clicked()));
}
/** Destructor */
CommandConf::~CommandConf()
{
// kdDebug() << "CommandConf::~CommandConf: Running" << endl;
- if (!m_waveFile.isNull()) QFile::remove(m_waveFile);
+ if (!m_waveFile.isNull()) TQFile::remove(m_waveFile);
delete m_commandProc;
delete m_progressDlg;
}
-void CommandConf::load(KConfig *config, const QString &configGroup) {
+void CommandConf::load(KConfig *config, const TQString &configGroup) {
// kdDebug() << "CommandConf::load: Running" << endl;
config->setGroup(configGroup);
m_widget->urlReq->setURL (config->readEntry("Command", "cat -"));
m_widget->stdInButton->setChecked(config->readBoolEntry("StdIn", false));
- QString codecString = config->readEntry("Codec", "Local");
+ TQString codecString = config->readEntry("Codec", "Local");
m_languageCode = config->readEntry("LanguageCode", m_languageCode);
int codec = PlugInProc::codecNameToListIndex(codecString, m_codecList);
m_widget->characterCodingBox->setCurrentItem(codec);
}
-void CommandConf::save(KConfig *config, const QString &configGroup) {
+void CommandConf::save(KConfig *config, const TQString &configGroup) {
// kdDebug() << "CommandConf::save: Running" << endl;
config->setGroup(configGroup);
config->writeEntry("Command", m_widget->urlReq->url());
@@ -109,21 +109,21 @@ void CommandConf::defaults(){
m_widget->characterCodingBox->setCurrentItem(0);
}
-void CommandConf::setDesiredLanguage(const QString &lang)
+void CommandConf::setDesiredLanguage(const TQString &lang)
{
m_languageCode = lang;
}
-QString CommandConf::getTalkerCode()
+TQString CommandConf::getTalkerCode()
{
- QString url = m_widget->urlReq->url();
+ TQString url = m_widget->urlReq->url();
if (!url.isEmpty())
{
// Must contain either text or file parameter, or StdIn checkbox must be checked,
// otherwise, does nothing!
if ((url.contains("%t") > 0) || (url.contains("%f") > 0) || m_widget->stdInButton->isChecked())
{
- return QString(
+ return TQString(
"<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />"
"<prosody volume=\"%4\" rate=\"%5\" />"
"<kttsd synthesizer=\"%6\" />")
@@ -135,7 +135,7 @@ QString CommandConf::getTalkerCode()
.arg("Command");
}
}
- return QString::null;
+ return TQString::null;
}
void CommandConf::slotCommandTest_clicked()
@@ -147,16 +147,16 @@ void CommandConf::slotCommandTest_clicked()
else
{
m_commandProc = new CommandProc();
- connect (m_commandProc, SIGNAL(stopped()), this, SLOT(slotSynthStopped()));
+ connect (m_commandProc, TQT_SIGNAL(stopped()), this, TQT_SLOT(slotSynthStopped()));
}
// Create a temp file name for the wave file.
KTempFile tempFile (locateLocal("tmp", "commandplugin-"), ".wav");
- QString tmpWaveFile = tempFile.file()->name();
+ TQString tmpWaveFile = tempFile.file()->name();
tempFile.close();
// Get test message in the language of the voice.
- QString testMsg = testMessage(m_languageCode);
+ TQString testMsg = testMessage(m_languageCode);
// Tell user to wait.
m_progressDlg = new KProgressDialog(m_widget, "kttsmgr_command_testdlg",
@@ -167,7 +167,7 @@ void CommandConf::slotCommandTest_clicked()
m_progressDlg->setAllowCancel(true);
// TODO: Do codec names contain non-ASCII characters?
- connect (m_commandProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ connect (m_commandProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
m_commandProc->synth(
testMsg,
tmpWaveFile,
@@ -179,7 +179,7 @@ void CommandConf::slotCommandTest_clicked()
// Display progress dialog modally. Processing continues when plugin signals synthFinished,
// or if user clicks Cancel button.
m_progressDlg->exec();
- disconnect (m_commandProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ disconnect (m_commandProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
if (m_progressDlg->wasCancelled()) m_commandProc->stopText();
delete m_progressDlg;
m_progressDlg = 0;
@@ -202,16 +202,16 @@ void CommandConf::slotSynthFinished()
// Play the wave file (possibly adjusting its Speed).
// Player object deletes the wave file when done.
if (m_player) m_player->play(m_waveFile);
- QFile::remove(m_waveFile);
- m_waveFile = QString::null;
+ TQFile::remove(m_waveFile);
+ m_waveFile = TQString::null;
if (m_progressDlg) m_progressDlg->close();
}
void CommandConf::slotSynthStopped()
{
// Clean up after canceling test.
- QString filename = m_commandProc->getFilename();
- if (!filename.isNull()) QFile::remove(filename);
+ TQString filename = m_commandProc->getFilename();
+ if (!filename.isNull()) TQFile::remove(filename);
}
#include "commandconf.moc"
diff --git a/kttsd/plugins/command/commandconf.h b/kttsd/plugins/command/commandconf.h
index 7e9a573..b3889b9 100644
--- a/kttsd/plugins/command/commandconf.h
+++ b/kttsd/plugins/command/commandconf.h
@@ -19,8 +19,8 @@
#define _COMMANDCONF_H_
// Qt includes.
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
// KDE includes.
#include <kconfig.h>
@@ -39,7 +39,7 @@ class CommandConf : public PlugInConf {
public:
/** Constructor */
- CommandConf( QWidget* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ CommandConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/** Destructor */
~CommandConf();
@@ -51,14 +51,14 @@ class CommandConf : public PlugInConf {
* valid settings. NOTE that this is not called after the modules is loaded,
* so you probably want to call this method in the constructor.
*/
- void load(KConfig *config, const QString &configGroup);
+ void load(KConfig *config, const TQString &configGroup);
/** This function gets called when the user wants to save the settings in
* the user interface, updating the config files or wherever the
* configuration is stored. The method is called when the user clicks "Apply"
* or "Ok".
*/
- void save(KConfig *config, const QString &configGroup);
+ void save(KConfig *config, const TQString &configGroup);
/** This function is called to set the settings in the module to sensible
* default values. It gets called when hitting the "Default" button. The
@@ -71,7 +71,7 @@ class CommandConf : 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 QString::null, no specific language has
+ * If the passed-in code is TQString::null, no specific language has
* been chosen.
* @param lang The desired language code or Null if none.
*
@@ -83,16 +83,16 @@ class CommandConf : public PlugInConf {
* not the given country, treat it as though the country
* code were not specified, i.e., adapt to the given language.
*/
- void setDesiredLanguage(const QString &lang);
+ void setDesiredLanguage(const TQString &lang);
/**
* 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 QString::null.
+ * i.e., cannot yet synthesize, return TQString::null.
* @return Fully-specified talker code.
*/
- QString getTalkerCode();
+ TQString getTalkerCode();
private slots:
void configChanged(){
@@ -104,7 +104,7 @@ class CommandConf : public PlugInConf {
void slotSynthStopped();
private:
- QString m_languageCode;
+ TQString m_languageCode;
// Configuration Widget.
CommandConfWidget* m_widget;
@@ -112,10 +112,10 @@ class CommandConf : public PlugInConf {
// Command synthesizer.
CommandProc* m_commandProc;
// Synthesized wave file name.
- QString m_waveFile;
+ TQString m_waveFile;
// Progress dialog.
KProgressDialog* m_progressDlg;
// Codec list.
- QStringList m_codecList;
+ TQStringList m_codecList;
};
#endif // _COMMANDCONF_H_
diff --git a/kttsd/plugins/command/commandproc.cpp b/kttsd/plugins/command/commandproc.cpp
index e8d3e72..77d63f3 100644
--- a/kttsd/plugins/command/commandproc.cpp
+++ b/kttsd/plugins/command/commandproc.cpp
@@ -16,13 +16,13 @@
***************************************************************************/
// Qt includes.
-#include <qfile.h>
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
-#include <qvaluestack.h>
+#include <tqfile.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
+#include <tqvaluestack.h>
// KDE includes.
#include <kdebug.h>
@@ -39,7 +39,7 @@
#include "commandproc.moc"
/** Constructor */
-CommandProc::CommandProc( QObject* parent, const char* name, const QStringList& /*args*/) :
+CommandProc::CommandProc( TQObject* parent, const char* name, const TQStringList& /*args*/) :
PlugInProc( parent, name )
{
kdDebug() << "CommandProc::CommandProc: Running" << endl;
@@ -59,12 +59,12 @@ CommandProc::~CommandProc()
if (m_commandProc->isRunning()) m_commandProc->kill();
delete m_commandProc;
// Don't delete synth file. That is responsibility of caller.
- if (!m_textFilename.isNull()) QFile::remove(m_textFilename);
+ if (!m_textFilename.isNull()) TQFile::remove(m_textFilename);
}
}
/** Initialize */
-bool CommandProc::init(KConfig *config, const QString &configGroup){
+bool CommandProc::init(KConfig *config, const TQString &configGroup){
kdDebug() << "CommandProc::init: Initializing plug in: Command " << endl;
config->setGroup(configGroup);
@@ -75,7 +75,7 @@ bool CommandProc::init(KConfig *config, const QString &configGroup){
// Support separate synthesis if the TTS command contains %w macro.
m_supportsSynth = (m_ttsCommand.contains("%w"));
- QString codecString = config->readEntry("Codec", "Local");
+ TQString codecString = config->readEntry("Codec", "Local");
m_codec = codecNameToCodec(codecString);
kdDebug() << "CommandProc::init: Initialized with command: " << m_ttsCommand << " codec: " << codecString << endl;
return true;
@@ -87,9 +87,9 @@ bool CommandProc::init(KConfig *config, const QString &configGroup){
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void CommandProc::sayText(const QString &text)
+void CommandProc::sayText(const TQString &text)
{
- synth(text, QString::null,
+ synth(text, TQString::null,
m_ttsCommand, m_stdin, m_codec, m_language);
}
@@ -103,7 +103,7 @@ void CommandProc::sayText(const QString &text)
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void CommandProc::synthText(const QString& text, const QString& suggestedFilename)
+void CommandProc::synthText(const TQString& text, const TQString& suggestedFilename)
{
synth(text, suggestedFilename,
m_ttsCommand, m_stdin, m_codec, m_language);
@@ -116,56 +116,56 @@ void CommandProc::synthText(const QString& text, const QString& suggestedFilenam
* synthesize and audibilize the text.
* @param userCmd The program that shall be executed for speaking
* @param stdIn True if the program shall recieve its data via standard input
-* @param codec The QTextCodec if encoding==UseCodec
+* @param codec The TQTextCodec if encoding==UseCodec
* @param language The language code (used for the %l macro)
*/
-void CommandProc::synth(const QString& inputText, const QString& suggestedFilename,
- const QString& userCmd, bool stdIn, QTextCodec *codec, QString& language)
+void CommandProc::synth(const TQString& inputText, const TQString& suggestedFilename,
+ const TQString& userCmd, bool stdIn, TQTextCodec *codec, TQString& language)
{
if (m_commandProc)
{
if (m_commandProc->isRunning()) m_commandProc->kill();
delete m_commandProc;
m_commandProc = 0;
- m_synthFilename = QString::null;
- if (!m_textFilename.isNull()) QFile::remove(m_textFilename);
- m_textFilename = QString::null;
+ m_synthFilename = TQString::null;
+ if (!m_textFilename.isNull()) TQFile::remove(m_textFilename);
+ m_textFilename = TQString::null;
}
- QString command = userCmd;
- QString text = inputText.stripWhiteSpace();
+ TQString command = userCmd;
+ TQString text = inputText.stripWhiteSpace();
if (text.isEmpty()) return;
// 1. prepare the text:
// 1.a) encode the text
text += "\n";
- QCString encodedText;
+ TQCString encodedText;
if (codec)
encodedText = codec->fromUnicode(text);
else
encodedText = text.latin1(); // Should not happen, but just in case.
// 1.b) quote the text as one parameter
- QString escText = KShellProcess::quote(text);
+ TQString escText = KShellProcess::quote(text);
// 1.c) create a temporary file for the text, if %f macro is used.
if (command.contains("%f"))
{
KTempFile tempFile(locateLocal("tmp", "commandplugin-"), ".txt");
- QTextStream* fs = tempFile.textStream();
+ TQTextStream* fs = tempFile.textStream();
fs->setCodec(codec);
*fs << text;
*fs << endl;
m_textFilename = tempFile.file()->name();
tempFile.close();
- } else m_textFilename = QString::null;
+ } else m_textFilename = TQString::null;
// 2. replace variables with values
- QValueStack<bool> stack;
+ TQValueStack<bool> stack;
bool issinglequote=false;
bool isdoublequote=false;
int noreplace=0;
- QRegExp re_noquote("(\"|'|\\\\|`|\\$\\(|\\$\\{|\\(|\\{|\\)|\\}|%%|%t|%f|%l|%w)");
- QRegExp re_singlequote("('|%%|%t|%f|%l|%w)");
- QRegExp re_doublequote("(\"|\\\\|`|\\$\\(|\\$\\{|%%|%t|%f|%l|%w)");
+ TQRegExp re_noquote("(\"|'|\\\\|`|\\$\\(|\\$\\{|\\(|\\{|\\)|\\}|%%|%t|%f|%l|%w)");
+ TQRegExp re_singlequote("('|%%|%t|%f|%l|%w)");
+ TQRegExp re_doublequote("(\"|\\\\|`|\\$\\(|\\$\\{|%%|%t|%f|%l|%w)");
for ( int i = re_noquote.search(command);
i != -1;
@@ -220,7 +220,7 @@ void CommandProc::synth(const QString& inputText, const QString& suggestedFilena
{
// Replace all `...` with safer $(...)
command.replace (i, 1, "$(");
- QRegExp re_backticks("(`|\\\\`|\\\\\\\\|\\\\\\$)");
+ TQRegExp re_backticks("(`|\\\\`|\\\\\\\\|\\\\\\$)");
for ( int i2=re_backticks.search(command,i+2);
i2!=-1;
i2=re_backticks.search(command,i2)
@@ -241,7 +241,7 @@ void CommandProc::synth(const QString& inputText, const QString& suggestedFilena
}
else if (noreplace == 0) // do not replace macros within ${...}
{
- QString match, v;
+ TQString match, v;
// get match
if (issinglequote)
@@ -290,14 +290,14 @@ void CommandProc::synth(const QString& inputText, const QString& suggestedFilena
m_commandProc->setEnvironment("LANG", language + "." + codec->mimeName());
m_commandProc->setEnvironment("LC_CTYPE", language + "." + codec->mimeName());
*m_commandProc << command;
- connect(m_commandProc, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotProcessExited(KProcess*)));
- connect(m_commandProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_commandProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
- connect(m_commandProc, SIGNAL(wroteStdin(KProcess*)),
- this, SLOT(slotWroteStdin(KProcess* )));
+ 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* )));
// 4. start the process
@@ -326,7 +326,7 @@ void CommandProc::synth(const QString& inputText, const QString& suggestedFilena
*
* The plugin must not re-use the filename.
*/
-QString CommandProc::getFilename()
+TQString CommandProc::getFilename()
{
kdDebug() << "CommandProc::getFilename: returning " << m_synthFilename << endl;
return m_synthFilename;
@@ -382,13 +382,13 @@ void CommandProc::slotProcessExited(KProcess*)
void CommandProc::slotReceivedStdout(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "CommandProc::slotReceivedStdout: Received output from Command: " << buf << endl;
}
void CommandProc::slotReceivedStderr(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "CommandProc::slotReceivedStderr: Received error from Command: " << buf << endl;
}
@@ -420,9 +420,9 @@ void CommandProc::ackFinished()
if (m_state == psFinished)
{
m_state = psIdle;
- m_synthFilename = QString::null;
- if (!m_textFilename.isNull()) QFile::remove(m_textFilename);
- m_textFilename = QString::null;
+ m_synthFilename = TQString::null;
+ if (!m_textFilename.isNull()) TQFile::remove(m_textFilename);
+ m_textFilename = TQString::null;
}
}
diff --git a/kttsd/plugins/command/commandproc.h b/kttsd/plugins/command/commandproc.h
index 4b46fe5..d5027c5 100644
--- a/kttsd/plugins/command/commandproc.h
+++ b/kttsd/plugins/command/commandproc.h
@@ -19,7 +19,7 @@
#define _COMMANDPROC_H_
// Qt includes.
-#include <qstringlist.h>
+#include <tqstringlist.h>
// KTTS includes.
#include <pluginproc.h>
@@ -32,20 +32,20 @@ class CommandProc : public PlugInProc{
public:
/** Constructor */
- CommandProc( QObject* parent = 0, const char* name = 0,
- const QStringList &args = QStringList());
+ CommandProc( TQObject* parent = 0, const char* name = 0,
+ const TQStringList &args = TQStringList());
/** Destructor */
~CommandProc();
/** Initializate the speech */
- bool init (KConfig *config, const QString &configGroup);
+ bool init (KConfig *config, const TQString &configGroup);
/**
* Say a text string.
* @param text The text to speak.
*/
- virtual void sayText(const QString &text);
+ virtual void sayText(const TQString &text);
/**
* Synthesize text into an audio file, but do not send to the audio device.
@@ -57,7 +57,7 @@ class CommandProc : public PlugInProc{
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
- virtual void synthText(const QString& text, const QString& suggestedFilename);
+ virtual void synthText(const TQString& text, const TQString& suggestedFilename);
/**
* Get the generated audio filename from synthText.
@@ -66,7 +66,7 @@ class CommandProc : public PlugInProc{
*
* The plugin must not re-use the filename.
*/
- virtual QString getFilename();
+ virtual TQString getFilename();
/**
* Stop current operation (saying or synthesizing text).
@@ -134,9 +134,9 @@ class CommandProc : public PlugInProc{
* @param codec Codec for encoding the text.
* @param language The language code (used for the %l macro)
*/
- void synth(const QString& inputText, const QString& suggestedFilename,
- const QString& userCmd, bool stdIn,
- QTextCodec *codec, QString& language);
+ void synth(const TQString& inputText, const TQString& suggestedFilename,
+ const TQString& userCmd, bool stdIn,
+ TQTextCodec *codec, TQString& language);
private slots:
void slotProcessExited(KProcess* proc);
@@ -154,7 +154,7 @@ class CommandProc : public PlugInProc{
/**
* TTS command
*/
- QString m_ttsCommand;
+ TQString m_ttsCommand;
/**
* True if process should use Stdin.
@@ -164,12 +164,12 @@ class CommandProc : public PlugInProc{
/**
* Language Group.
*/
- QString m_language;
+ TQString m_language;
/**
* Codec.
*/
- QTextCodec* m_codec;
+ TQTextCodec* m_codec;
/**
* Flite process
@@ -179,12 +179,12 @@ class CommandProc : public PlugInProc{
/**
* Name of temporary file containing text.
*/
- QString m_textFilename;
+ TQString m_textFilename;
/**
* Synthesis filename.
*/
- QString m_synthFilename;
+ TQString m_synthFilename;
/**
* Plugin state.
diff --git a/kttsd/plugins/epos/eposconf.cpp b/kttsd/plugins/epos/eposconf.cpp
index 063c9f9..8b5ccf0 100644
--- a/kttsd/plugins/epos/eposconf.cpp
+++ b/kttsd/plugins/epos/eposconf.cpp
@@ -25,11 +25,11 @@
#include <math.h>
// Qt includes.
-#include <qfile.h>
-#include <qapplication.h>
-#include <qtextcodec.h>
-#include <qlayout.h>
-#include <qslider.h>
+#include <tqfile.h>
+#include <tqapplication.h>
+#include <tqtextcodec.h>
+#include <tqlayout.h>
+#include <tqslider.h>
// KDE includes.
#include <kdialog.h>
@@ -48,14 +48,14 @@
#include "eposconf.moc"
/** Constructor */
-EposConf::EposConf( QWidget* parent, const char* name, const QStringList& /*args*/) :
+EposConf::EposConf( TQWidget* parent, const char* name, const TQStringList& /*args*/) :
PlugInConf(parent, name)
{
// kdDebug() << "EposConf::EposConf: Running" << endl;
m_eposProc = 0;
m_progressDlg = 0;
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "EposConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new EposConfWidget(this, "EposConfigWidget");
@@ -68,41 +68,41 @@ EposConf::EposConf( QWidget* parent, const char* name, const QStringList& /*args
defaults();
- connect(m_widget->eposServerPath, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->eposClientPath, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->timeBox, SIGNAL(valueChanged(int)),
- this, SLOT(timeBox_valueChanged(int)));
- connect(m_widget->frequencyBox, SIGNAL(valueChanged(int)),
- this, SLOT(frequencyBox_valueChanged(int)));
- connect(m_widget->timeSlider, SIGNAL(valueChanged(int)),
- this, SLOT(timeSlider_valueChanged(int)));
- connect(m_widget->frequencySlider, SIGNAL(valueChanged(int)),
- this, SLOT(frequencySlider_valueChanged(int)));
- connect(m_widget->timeBox, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->timeSlider, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->frequencyBox, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->frequencySlider, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->characterCodingBox, SIGNAL(activated(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->eposServerOptions, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->eposClientOptions, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->eposTest, SIGNAL(clicked()),
- this, SLOT(slotEposTest_clicked()));
+ connect(m_widget->eposServerPath, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->eposClientPath, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->timeBox, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(timeBox_valueChanged(int)));
+ connect(m_widget->frequencyBox, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(frequencyBox_valueChanged(int)));
+ connect(m_widget->timeSlider, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(timeSlider_valueChanged(int)));
+ connect(m_widget->frequencySlider, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(frequencySlider_valueChanged(int)));
+ connect(m_widget->timeBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->timeSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->frequencyBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->frequencySlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->characterCodingBox, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->eposServerOptions, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->eposClientOptions, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->eposTest, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotEposTest_clicked()));
}
/** Destructor */
EposConf::~EposConf(){
// kdDebug() << "Running: EposConf::~EposConf()" << endl;
- if (!m_waveFile.isNull()) QFile::remove(m_waveFile);
+ if (!m_waveFile.isNull()) TQFile::remove(m_waveFile);
delete m_eposProc;
delete m_progressDlg;
}
-void EposConf::load(KConfig *config, const QString &configGroup){
+void EposConf::load(KConfig *config, const TQString &configGroup){
// kdDebug() << "EposConf::load: Running " << endl;
config->setGroup(configGroup);
@@ -110,7 +110,7 @@ void EposConf::load(KConfig *config, const QString &configGroup){
m_widget->eposClientPath->setURL(config->readEntry("EposClientExePath", "say-epos"));
m_widget->eposServerOptions->setText(config->readEntry("EposServerOptions", ""));
m_widget->eposClientOptions->setText(config->readEntry("EposClientOptions", ""));
- QString codecString = config->readEntry("Codec", "ISO 8859-2");
+ TQString codecString = config->readEntry("Codec", "ISO 8859-2");
int codec = PlugInProc::codecNameToListIndex(codecString, m_codecList);
m_widget->timeBox->setValue(config->readNumEntry("time", 100));
m_widget->frequencyBox->setValue(config->readNumEntry("pitch", 100));
@@ -120,15 +120,15 @@ void EposConf::load(KConfig *config, const QString &configGroup){
/**
* Converts a language code into the language setting passed to Epos synth.
*/
-QString EposConf::languageCodeToEposLanguage(const QString &languageCode)
+TQString EposConf::languageCodeToEposLanguage(const TQString &languageCode)
{
- QString eposLanguage;
+ TQString eposLanguage;
if (languageCode.left(2) == "cs") eposLanguage = "czech";
if (languageCode.left(2) == "sk") eposLanguage = "slovak";
return eposLanguage;
}
-void EposConf::save(KConfig *config, const QString &configGroup){
+void EposConf::save(KConfig *config, const TQString &configGroup){
// kdDebug() << "EposConf::save: Running" << endl;
config->setGroup("Epos");
@@ -154,7 +154,7 @@ void EposConf::defaults(){
// kdDebug() << "EposConf::defaults: Running" << endl;
// Epos server command changed from epos to eposd. Epos client command changed from
// say to say-epos. These changes appeared around Epos v2.5.35. Try for these automatically.
- QString exeName = "eposd";
+ TQString exeName = "eposd";
if (realFilePath(exeName).isEmpty())
if (!realFilePath("epos").isEmpty())
exeName = "epos";
@@ -174,23 +174,23 @@ void EposConf::defaults(){
m_widget->characterCodingBox->setCurrentItem(codec);
}
-void EposConf::setDesiredLanguage(const QString &lang)
+void EposConf::setDesiredLanguage(const TQString &lang)
{
m_languageCode = lang;
}
-QString EposConf::getTalkerCode()
+TQString EposConf::getTalkerCode()
{
- QString eposServerExe = realFilePath(m_widget->eposServerPath->url());
- QString eposClientExe = realFilePath(m_widget->eposClientPath->url());
+ TQString eposServerExe = realFilePath(m_widget->eposServerPath->url());
+ TQString eposClientExe = realFilePath(m_widget->eposClientPath->url());
if (!eposServerExe.isEmpty() && !eposClientExe.isEmpty())
{
if (!getLocation(eposServerExe).isEmpty() && !getLocation(eposClientExe).isEmpty())
{
- QString rate = "medium";
+ TQString rate = "medium";
if (m_widget->timeBox->value() < 75) rate = "slow";
if (m_widget->timeBox->value() > 125) rate = "fast";
- return QString(
+ return TQString(
"<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />"
"<prosody volume=\"%4\" rate=\"%5\" />"
"<kttsd synthesizer=\"%6\" />")
@@ -202,7 +202,7 @@ QString EposConf::getTalkerCode()
.arg("Epos TTS Synthesis System");
}
}
- return QString::null;
+ return TQString::null;
}
void EposConf::slotEposTest_clicked()
@@ -214,15 +214,15 @@ void EposConf::slotEposTest_clicked()
else
{
m_eposProc = new EposProc();
- connect (m_eposProc, SIGNAL(stopped()), this, SLOT(slotSynthStopped()));
+ connect (m_eposProc, TQT_SIGNAL(stopped()), this, TQT_SLOT(slotSynthStopped()));
}
// Create a temp file name for the wave file.
KTempFile tempFile (locateLocal("tmp", "eposplugin-"), ".wav");
- QString tmpWaveFile = tempFile.file()->name();
+ TQString tmpWaveFile = tempFile.file()->name();
tempFile.close();
// Get test message in the language of the voice.
- QString testMsg = testMessage(m_languageCode);
+ TQString testMsg = testMessage(m_languageCode);
// Tell user to wait.
m_progressDlg = new KProgressDialog(m_widget, "kttsmgr_epos_testdlg",
@@ -234,7 +234,7 @@ void EposConf::slotEposTest_clicked()
// TODO: Whenever server options change, the server must be restarted.
// TODO: Do codec names contain non-ASCII characters?
- connect (m_eposProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ connect (m_eposProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
m_eposProc->synth(
testMsg,
tmpWaveFile,
@@ -251,7 +251,7 @@ void EposConf::slotEposTest_clicked()
// Display progress dialog modally. Processing continues when plugin signals synthFinished,
// or if user clicks Cancel button.
m_progressDlg->exec();
- disconnect (m_eposProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ disconnect (m_eposProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
if (m_progressDlg->wasCancelled()) m_eposProc->stopText();
delete m_progressDlg;
m_progressDlg = 0;
@@ -274,16 +274,16 @@ void EposConf::slotSynthFinished()
// Play the wave file (possibly adjusting its Speed).
// Player object deletes the wave file when done.
if (m_player) m_player->play(m_waveFile);
- QFile::remove(m_waveFile);
- m_waveFile = QString::null;
+ TQFile::remove(m_waveFile);
+ m_waveFile = TQString::null;
if (m_progressDlg) m_progressDlg->close();
}
void EposConf::slotSynthStopped()
{
// Clean up after canceling test.
- QString filename = m_eposProc->getFilename();
- if (!filename.isNull()) QFile::remove(filename);
+ TQString filename = m_eposProc->getFilename();
+ if (!filename.isNull()) TQFile::remove(filename);
}
// Basically the slider values are logarithmic (0,...,1000) whereas percent
diff --git a/kttsd/plugins/epos/eposconf.h b/kttsd/plugins/epos/eposconf.h
index 5c3fbe3..08cb611 100644
--- a/kttsd/plugins/epos/eposconf.h
+++ b/kttsd/plugins/epos/eposconf.h
@@ -25,7 +25,7 @@
#define _EPOSCONF_H_
// Qt includes.
-#include <qstring.h>
+#include <tqstring.h>
// KDE includes.
#include <kconfig.h>
@@ -46,7 +46,7 @@ class EposConf : public PlugInConf {
public:
/** Constructor */
- EposConf( QWidget* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ EposConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/** Destructor */
~EposConf();
@@ -58,14 +58,14 @@ class EposConf : public PlugInConf {
* valid settings. NOTE that this is not called after the modules is loaded,
* so you probably want to call this method in the constructor.
*/
- void load(KConfig *config, const QString &configGroup);
+ void load(KConfig *config, const TQString &configGroup);
/** This function gets called when the user wants to save the settings in
* the user interface, updating the config files or wherever the
* configuration is stored. The method is called when the user clicks "Apply"
* or "Ok".
*/
- void save(KConfig *config, const QString &configGroup);
+ void save(KConfig *config, const TQString &configGroup);
/** This function is called to set the settings in the module to sensible
* default values. It gets called when hitting the "Default" button. The
@@ -78,7 +78,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 QString::null, no specific language has
+ * If the passed-in code is TQString::null, no specific language has
* been chosen.
* @param lang The desired language code or Null if none.
*
@@ -90,16 +90,16 @@ class EposConf : public PlugInConf {
* not the given country, treat it as though the country
* code were not specified, i.e., adapt to the given language.
*/
- void setDesiredLanguage(const QString &lang);
+ void setDesiredLanguage(const TQString &lang);
/**
* 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 QString::null.
+ * i.e., cannot yet synthesize, return TQString::null.
* @return Fully-specified talker code.
*/
- QString getTalkerCode();
+ TQString getTalkerCode();
private slots:
void configChanged(){
@@ -118,13 +118,13 @@ class EposConf : public PlugInConf {
/**
* Converts a language code into the language setting passed to Epos synth.
*/
- QString languageCodeToEposLanguage(const QString &languageCode);
+ TQString languageCodeToEposLanguage(const TQString &languageCode);
int percentToSlider(int percentValue);
int sliderToPercent(int sliderValue);
// Language code.
- QString m_languageCode;
+ TQString m_languageCode;
// Configuration widget.
EposConfWidget* m_widget;
@@ -132,10 +132,10 @@ class EposConf : public PlugInConf {
// Epos synthesizer.
EposProc* m_eposProc;
// Synthesized wave file name.
- QString m_waveFile;
+ TQString m_waveFile;
// Progress dialog.
KProgressDialog* m_progressDlg;
// List of displayed codec names.
- QStringList m_codecList;
+ TQStringList m_codecList;
};
#endif // _EPOSCONF_H_
diff --git a/kttsd/plugins/epos/eposproc.cpp b/kttsd/plugins/epos/eposproc.cpp
index 35bc1d3..e5fd664 100644
--- a/kttsd/plugins/epos/eposproc.cpp
+++ b/kttsd/plugins/epos/eposproc.cpp
@@ -26,10 +26,10 @@
#include <math.h>
// Qt includes.
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextcodec.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextcodec.h>
+#include <tqfile.h>
// KDE includes.
#include <kdebug.h>
@@ -43,7 +43,7 @@
#include "eposproc.moc"
/** Constructor */
-EposProc::EposProc( QObject* parent, const char* name, const QStringList& ) :
+EposProc::EposProc( TQObject* parent, const char* name, const TQStringList& ) :
PlugInProc( parent, name ){
kdDebug() << "EposProc::EposProc: Running" << endl;
m_state = psIdle;
@@ -64,7 +64,7 @@ EposProc::~EposProc(){
}
/** Initialize the speech */
-bool EposProc::init(KConfig* config, const QString& configGroup)
+bool EposProc::init(KConfig* config, const TQString& configGroup)
{
// kdDebug() << "EposProc::init: Running" << endl;
// kdDebug() << "Initializing plug in: Epos" << endl;
@@ -72,15 +72,15 @@ bool EposProc::init(KConfig* config, const QString& configGroup)
config->setGroup(configGroup);
m_eposServerExePath = config->readEntry("EposServerExePath", "epos");
m_eposClientExePath = config->readEntry("EposClientExePath", "say");
- m_eposLanguage = config->readEntry("Language", QString::null);
+ m_eposLanguage = config->readEntry("Language", TQString::null);
m_time = config->readNumEntry("time", 100);
m_pitch = config->readNumEntry("pitch", 100);
- m_eposServerOptions = config->readEntry("EposServerOptions", QString::null);
- m_eposClientOptions = config->readEntry("EposClientOptions", QString::null);
+ m_eposServerOptions = config->readEntry("EposServerOptions", TQString::null);
+ m_eposClientOptions = config->readEntry("EposClientOptions", TQString::null);
kdDebug() << "EposProc::init: path to epos server: " << m_eposServerExePath << endl;
kdDebug() << "EposProc::init: path to epos client: " << m_eposClientExePath << endl;
- QString codecString = config->readEntry("Codec", "Local");
+ TQString codecString = config->readEntry("Codec", "Local");
m_codec = codecNameToCodec(codecString);
// Start the Epos server if not already started.
if (!m_eposServerProc)
@@ -89,10 +89,10 @@ bool EposProc::init(KConfig* config, const QString& configGroup)
*m_eposServerProc << m_eposServerExePath;
if (!m_eposServerOptions.isEmpty())
*m_eposServerProc << m_eposServerOptions;
- connect(m_eposServerProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_eposServerProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
+ 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);
}
@@ -107,9 +107,9 @@ bool EposProc::init(KConfig* config, const QString& configGroup)
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void EposProc::sayText(const QString &text)
+void EposProc::sayText(const TQString &text)
{
- synth(text, QString::null, m_eposServerExePath, m_eposClientExePath,
+ synth(text, TQString::null, m_eposServerExePath, m_eposClientExePath,
m_eposServerOptions, m_eposClientOptions,
m_codec, m_eposLanguage, m_time, m_pitch);
}
@@ -124,7 +124,7 @@ void EposProc::sayText(const QString &text)
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void EposProc::synthText(const QString& text, const QString& suggestedFilename)
+void EposProc::synthText(const TQString& text, const TQString& suggestedFilename)
{
synth(text, suggestedFilename, m_eposServerExePath, m_eposClientExePath,
m_eposServerOptions, m_eposClientOptions,
@@ -147,18 +147,18 @@ void EposProc::synthText(const QString& text, const QString& suggestedFilename)
* @param pitch Pitch persentage. 50 to 200.
*/
void EposProc::synth(
- const QString &text,
- const QString &suggestedFilename,
- const QString& eposServerExePath,
- const QString& eposClientExePath,
- const QString& eposServerOptions,
- const QString& eposClientOptions,
- QTextCodec *codec,
- const QString& eposLanguage,
+ const TQString &text,
+ const TQString &suggestedFilename,
+ const TQString& eposServerExePath,
+ const TQString& eposClientExePath,
+ const TQString& eposServerOptions,
+ const TQString& eposClientOptions,
+ TQTextCodec *codec,
+ const TQString& eposLanguage,
int time,
int pitch)
{
- // kdDebug() << "Running: EposProc::synth(const QString &text)" << endl;
+ // kdDebug() << "Running: EposProc::synth(const TQString &text)" << endl;
if (m_eposProc)
{
@@ -173,18 +173,18 @@ void EposProc::synth(
*m_eposServerProc << eposServerExePath;
if (!eposServerOptions.isEmpty())
*m_eposServerProc << eposServerOptions;
- connect(m_eposServerProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_eposServerProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
+ 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);
kdDebug() << "EposProc:: Epos server process started" << endl;
}
// // Encode the text.
// // 1.a) encode the text
-// m_encText = QCString();
-// QTextStream ts (m_encText, IO_WriteOnly);
+// m_encText = TQCString();
+// TQTextStream ts (m_encText, IO_WriteOnly);
// ts.setCodec(codec);
// ts << text;
// ts << endl; // Some synths need this, eg. flite.
@@ -197,7 +197,7 @@ void EposProc::synth(
// kdDebug()<< "EposProc::synth: Creating Epos object" << endl;
m_eposProc = new KProcess;
m_eposProc->setUseShell(true);
- QString languageCode;
+ TQString languageCode;
if (eposLanguage == "czech")
languageCode == "cz";
else if (eposLanguage == "slovak")
@@ -210,7 +210,7 @@ void EposProc::synth(
*m_eposProc << eposClientExePath;
// Language.
if (!eposLanguage.isEmpty())
- *m_eposProc << QString("--language=%1").arg(eposLanguage);
+ *m_eposProc << TQString("--language=%1").arg(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;
- QString timeMsg = QString("--init_t=%1").arg(stretchValue, 0, 'f', 3);
+ TQString timeMsg = TQString("--init_t=%1").arg(stretchValue, 0, 'f', 3);
*m_eposProc << timeMsg;
// Pitch. Map 50% to 200% onto 50 to 200. easy.
- QString pitchMsg = QString("--init_f=%1").arg(pitch);
+ TQString pitchMsg = TQString("--init_f=%1").arg(pitch);
*m_eposProc << pitchMsg;
// Output file.
if (!suggestedFilename.isEmpty())
@@ -234,14 +234,14 @@ void EposProc::synth(
*m_eposProc << "-"; // Read from StdIn.
if (!suggestedFilename.isEmpty())
*m_eposProc << " >" + suggestedFilename;
- connect(m_eposProc, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotProcessExited(KProcess*)));
- connect(m_eposProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_eposProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
- connect(m_eposProc, SIGNAL(wroteStdin(KProcess*)),
- this, SLOT(slotWroteStdin(KProcess* )));
+ 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* )));
if (suggestedFilename.isEmpty())
m_state = psSaying;
else
@@ -270,7 +270,7 @@ void EposProc::synth(
*
* The plugin must not re-use the filename.
*/
-QString EposProc::getFilename()
+TQString EposProc::getFilename()
{
kdDebug() << "EposProc::getFilename: returning " << m_synthFilename << endl;
return m_synthFilename;
@@ -326,13 +326,13 @@ void EposProc::slotProcessExited(KProcess*)
void EposProc::slotReceivedStdout(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "EposProc::slotReceivedStdout: Received output from Epos: " << buf << endl;
}
void EposProc::slotReceivedStderr(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "EposProc::slotReceivedStderr: Received error from Epos: " << buf << endl;
}
@@ -340,7 +340,7 @@ void EposProc::slotWroteStdin(KProcess*)
{
// kdDebug() << "EposProc::slotWroteStdin: closing Stdin" << endl;
m_eposProc->closeStdin();
- m_encText = QCString();
+ m_encText = TQCString();
}
/**
@@ -365,7 +365,7 @@ void EposProc::ackFinished()
if (m_state == psFinished)
{
m_state = psIdle;
- m_synthFilename = QString::null;
+ m_synthFilename = TQString::null;
}
}
diff --git a/kttsd/plugins/epos/eposproc.h b/kttsd/plugins/epos/eposproc.h
index b2d1d90..d0fe9ba 100644
--- a/kttsd/plugins/epos/eposproc.h
+++ b/kttsd/plugins/epos/eposproc.h
@@ -26,8 +26,8 @@
#define _EPOSPROC_H_
// Qt includes.
-#include <qstringlist.h>
-#include <qmutex.h>
+#include <tqstringlist.h>
+#include <tqmutex.h>
// KTTS includes.
#include <pluginproc.h>
@@ -42,7 +42,7 @@ class EposProc : public PlugInProc{
/**
* Constructor
*/
- EposProc( QObject* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ EposProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/**
* Destructor
@@ -54,13 +54,13 @@ class EposProc : public PlugInProc{
* @param config Settings object.
* @param configGroup Settings group.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Say a text string.
* @param text The text to speak.
*/
- virtual void sayText(const QString &text);
+ virtual void sayText(const TQString &text);
/**
* Synthesize text into an audio file, but do not send to the audio device.
@@ -72,7 +72,7 @@ class EposProc : public PlugInProc{
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
- virtual void synthText(const QString& text, const QString& suggestedFilename);
+ virtual void synthText(const TQString& text, const TQString& suggestedFilename);
/**
* Get the generated audio filename from synthText.
@@ -81,7 +81,7 @@ class EposProc : public PlugInProc{
*
* The plugin must not re-use the filename.
*/
- virtual QString getFilename();
+ virtual TQString getFilename();
/**
* Stop current operation (saying or synthesizing text).
@@ -154,14 +154,14 @@ class EposProc : public PlugInProc{
* @param pitch Pitch persentage. 50 to 200.
*/
void synth(
- const QString &text,
- const QString &suggestedFilename,
- const QString& eposServerExePath,
- const QString& eposClientExePath,
- const QString& eposServerOptions,
- const QString& eposClientOptions,
- QTextCodec *codec,
- const QString& eposLanguage,
+ const TQString &text,
+ const TQString &suggestedFilename,
+ const TQString& eposServerExePath,
+ const TQString& eposClientExePath,
+ const TQString& eposServerOptions,
+ const TQString& eposClientOptions,
+ TQTextCodec *codec,
+ const TQString& eposLanguage,
int time,
int pitch);
@@ -176,14 +176,14 @@ class EposProc : public PlugInProc{
/**
* Path to epos executables (from config).
*/
- QString m_eposServerExePath;
- QString m_eposClientExePath;
+ TQString m_eposServerExePath;
+ TQString m_eposClientExePath;
/**
* User options passed to executables (from config).
*/
- QString m_eposServerOptions;
- QString m_eposClientOptions;
+ TQString m_eposServerOptions;
+ TQString m_eposClientOptions;
/**
* Epos Server process.
@@ -198,7 +198,7 @@ class EposProc : public PlugInProc{
/**
* Epos language setting. "czech", "slovak", or Null (use default language).
*/
- QString m_eposLanguage;
+ TQString m_eposLanguage;
/**
* Rate (speed) from config file.
@@ -213,17 +213,17 @@ class EposProc : public PlugInProc{
/**
* Codec.
*/
- QTextCodec* m_codec;
+ TQTextCodec* m_codec;
/**
* Encoded buffer to be sent to Epos client.
*/
- QCString m_encText;
+ TQCString m_encText;
/**
* Synthesis filename.
*/
- QString m_synthFilename;
+ TQString m_synthFilename;
/**
* Plugin state.
diff --git a/kttsd/plugins/festivalint/festivalintconf.cpp b/kttsd/plugins/festivalint/festivalintconf.cpp
index 91cd24f..8464ad7 100644
--- a/kttsd/plugins/festivalint/festivalintconf.cpp
+++ b/kttsd/plugins/festivalint/festivalintconf.cpp
@@ -25,15 +25,15 @@
#include <math.h>
// Qt includes.
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qcheckbox.h>
-#include <qdir.h>
-#include <qslider.h>
-#include <qdom.h>
-#include <qtextcodec.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
+#include <tqslider.h>
+#include <tqdom.h>
+#include <tqtextcodec.h>
// KDE includes.
#include <kdialog.h>
@@ -57,7 +57,7 @@
#include "festivalintconf.moc"
/** Constructor */
-FestivalIntConf::FestivalIntConf( QWidget* parent, const char* name, const QStringList& /*args*/) :
+FestivalIntConf::FestivalIntConf( TQWidget* parent, const char* name, const TQStringList& /*args*/) :
PlugInConf(parent, name)
{
// kdDebug() << "FestivalIntConf::FestivalIntConf: Running" << endl;
@@ -65,7 +65,7 @@ FestivalIntConf::FestivalIntConf( QWidget* parent, const char* name, const QStri
m_progressDlg = 0;
m_supportsSSML = FestivalIntProc::ssUnknown;
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "FestivalIntConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new FestivalIntConfWidget(this, "FestivalIntConfigWidget");
@@ -81,43 +81,43 @@ FestivalIntConf::FestivalIntConf( QWidget* parent, const char* name, const QStri
// defaults();
- connect(m_widget->festivalPath, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotFestivalPath_textChanged()));
- connect(m_widget->selectVoiceCombo, SIGNAL(activated(const QString&)),
- this, SLOT(slotSelectVoiceCombo_activated()));
- connect(m_widget->selectVoiceCombo, SIGNAL(activated(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->testButton, SIGNAL(clicked()), this, SLOT(slotTest_clicked()));
- connect(m_widget->rescan, SIGNAL(clicked()), this, SLOT(scanVoices()));
- connect(m_widget->volumeBox, SIGNAL(valueChanged(int)),
- this, SLOT(volumeBox_valueChanged(int)));
- connect(m_widget->timeBox, SIGNAL(valueChanged(int)),
- this, SLOT(timeBox_valueChanged(int)));
- connect(m_widget->frequencyBox, SIGNAL(valueChanged(int)),
- this, SLOT(frequencyBox_valueChanged(int)));
- connect(m_widget->volumeSlider, SIGNAL(valueChanged(int)),
- this, SLOT(volumeSlider_valueChanged(int)));
- connect(m_widget->timeSlider, SIGNAL(valueChanged(int)),
- this, SLOT(timeSlider_valueChanged(int)));
- connect(m_widget->frequencySlider, SIGNAL(valueChanged(int)),
- this, SLOT(frequencySlider_valueChanged(int)));
- connect(m_widget->volumeBox, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->volumeSlider, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->timeBox, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->timeSlider, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->frequencyBox, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->frequencySlider, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->preloadCheckBox, SIGNAL(clicked()), this, SLOT(configChanged()));
- connect(m_widget->characterCodingBox, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->characterCodingBox, SIGNAL(activated(const QString&)),
- this, SLOT(configChanged()));
+ connect(m_widget->festivalPath, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotFestivalPath_textChanged()));
+ connect(m_widget->selectVoiceCombo, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(slotSelectVoiceCombo_activated()));
+ connect(m_widget->selectVoiceCombo, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->testButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotTest_clicked()));
+ connect(m_widget->rescan, TQT_SIGNAL(clicked()), this, TQT_SLOT(scanVoices()));
+ connect(m_widget->volumeBox, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(volumeBox_valueChanged(int)));
+ connect(m_widget->timeBox, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(timeBox_valueChanged(int)));
+ connect(m_widget->frequencyBox, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(frequencyBox_valueChanged(int)));
+ connect(m_widget->volumeSlider, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(volumeSlider_valueChanged(int)));
+ connect(m_widget->timeSlider, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(timeSlider_valueChanged(int)));
+ connect(m_widget->frequencySlider, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(frequencySlider_valueChanged(int)));
+ connect(m_widget->volumeBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->volumeSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->timeBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->timeSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->frequencyBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->frequencySlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->preloadCheckBox, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()));
+ connect(m_widget->characterCodingBox, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->characterCodingBox, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(configChanged()));
}
/** Destructor */
FestivalIntConf::~FestivalIntConf(){
// kdDebug() << "FestivalIntConf::~FestivalIntConf: Running" << endl;
- if (!m_waveFile.isNull()) QFile::remove(m_waveFile);
+ if (!m_waveFile.isNull()) TQFile::remove(m_waveFile);
delete m_festProc;
delete m_progressDlg;
}
@@ -126,7 +126,7 @@ FestivalIntConf::~FestivalIntConf(){
* Given a voice code, returns index into m_voiceList array (and voiceCombo box).
* -1 if not found.
*/
-int FestivalIntConf::voiceCodeToListIndex(const QString& voiceCode) const
+int FestivalIntConf::voiceCodeToListIndex(const TQString& voiceCode) const
{
const int voiceListCount = m_voiceList.count();
for(int index = 0; index < voiceListCount; ++index){
@@ -137,18 +137,18 @@ int FestivalIntConf::voiceCodeToListIndex(const QString& voiceCode) const
return -1;
}
-void FestivalIntConf::load(KConfig *config, const QString &configGroup){
+void FestivalIntConf::load(KConfig *config, const TQString &configGroup){
//kdDebug() << "FestivalIntConf::load: Running" << endl;
config->setGroup("FestivalInt");
- QString exePath = config->readEntry("FestivalExecutablePath", "festival");
- QString exeLocation = getLocation(exePath);
+ TQString exePath = config->readEntry("FestivalExecutablePath", "festival");
+ TQString exeLocation = getLocation(exePath);
if (!exeLocation.isEmpty()) exePath = exeLocation;
exePath = realFilePath(exePath);
config->setGroup(configGroup);
m_widget->festivalPath->setURL(config->readEntry("FestivalExecutablePath", exePath));
m_widget->preloadCheckBox->setChecked(false);
scanVoices();
- QString voiceSelected(config->readEntry("Voice"));
+ TQString voiceSelected(config->readEntry("Voice"));
int index = voiceCodeToListIndex(voiceSelected);
if (index >= 0)
{
@@ -163,14 +163,14 @@ void FestivalIntConf::load(KConfig *config, const QString &configGroup){
m_languageCode = config->readEntry("LanguageCode", m_languageCode);
m_supportsSSML = static_cast<FestivalIntProc::SupportsSSML>(
config->readNumEntry("SupportsSSML", FestivalIntProc::ssUnknown));
- QString codecName = PlugInProc::codecIndexToCodecName(
+ TQString codecName = PlugInProc::codecIndexToCodecName(
m_widget->characterCodingBox->currentItem(), m_codecList);
codecName = config->readEntry("Codec", codecName);
int codecNdx = PlugInProc::codecNameToListIndex(codecName, m_codecList);
m_widget->characterCodingBox->setCurrentItem(codecNdx);
}
-void FestivalIntConf::save(KConfig *config, const QString &configGroup){
+void FestivalIntConf::save(KConfig *config, const TQString &configGroup){
// kdDebug() << "FestivalIntConf::save: Running" << endl;
config->setGroup("FestivalInt");
config->writeEntry("FestivalExecutablePath", realFilePath(m_widget->festivalPath->url()));
@@ -202,30 +202,30 @@ void FestivalIntConf::defaults(){
scanVoices();
}
-void FestivalIntConf::setDesiredLanguage(const QString &lang)
+void FestivalIntConf::setDesiredLanguage(const TQString &lang)
{
// kdDebug() << "FestivalIntConf::setDesiredLanguage: Running" << endl;
m_languageCode = splitLanguageCode(lang, m_countryCode);
}
-QString FestivalIntConf::getTalkerCode()
+TQString FestivalIntConf::getTalkerCode()
{
- if (!m_widget->selectVoiceCombo->isEnabled()) return QString::null;
- QString exePath = realFilePath(m_widget->festivalPath->url());
- if (exePath.isEmpty()) return QString::null;
- if (getLocation(exePath).isEmpty()) return QString::null;
- if (m_voiceList.count() == 0) return QString::null;
- QString normalTalkerCode;
+ if (!m_widget->selectVoiceCombo->isEnabled()) return TQString::null;
+ TQString exePath = realFilePath(m_widget->festivalPath->url());
+ if (exePath.isEmpty()) return TQString::null;
+ if (getLocation(exePath).isEmpty()) return TQString::null;
+ if (m_voiceList.count() == 0) return TQString::null;
+ TQString normalTalkerCode;
voiceStruct voiceTemp = m_voiceList[m_widget->selectVoiceCombo->currentItem()];
// Determine volume attribute. soft < 75% <= medium <= 125% < loud.
- QString volume = "medium";
+ TQString volume = "medium";
if (m_widget->volumeBox->value() < 75) volume = "soft";
if (m_widget->volumeBox->value() > 125) volume = "loud";
// Determine rate attribute. slow < 75% <= medium <= 125% < fast.
- QString rate = "medium";
+ TQString rate = "medium";
if (m_widget->timeBox->value() < 75) rate = "slow";
if (m_widget->timeBox->value() > 125) rate = "fast";
- normalTalkerCode = QString(
+ normalTalkerCode = TQString(
"<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />"
"<prosody volume=\"%4\" rate=\"%5\" />"
"<kttsd synthesizer=\"%6\" />")
@@ -251,14 +251,14 @@ void FestivalIntConf::setDefaultVoice(int currentVoiceIndex)
{
bool found = false;
// First search for a match on both language code and country code.
- QString languageCode = m_languageCode;
+ TQString languageCode = m_languageCode;
if (!m_countryCode.isNull()) languageCode += "_" + m_countryCode;
// kdDebug() << "FestivalIntConf::setDefaultVoice:: looking for default voice to match language code " << languageCode << endl;
uint index = 0;
// Prefer existing voice if it matches.
if (currentVoiceIndex >= 0)
{
- QString vlCode = m_voiceList[currentVoiceIndex].languageCode.left(languageCode.length());
+ TQString vlCode = m_voiceList[currentVoiceIndex].languageCode.left(languageCode.length());
if (languageCode == vlCode)
{
found = true;
@@ -269,7 +269,7 @@ void FestivalIntConf::setDefaultVoice(int currentVoiceIndex)
{
for(index = 0 ; index < m_voiceList.count(); ++index)
{
- QString vlCode = m_voiceList[index].languageCode.left(languageCode.length());
+ TQString vlCode = m_voiceList[index].languageCode.left(languageCode.length());
// kdDebug() << "FestivalIntConf::setDefaultVoice: testing " << vlCode << endl;
if(languageCode == vlCode)
{
@@ -285,7 +285,7 @@ void FestivalIntConf::setDefaultVoice(int currentVoiceIndex)
// Prefer existing voice if it matches.
if (currentVoiceIndex >= 0)
{
- QString vlCode = m_voiceList[currentVoiceIndex].languageCode.left(languageCode.length());
+ TQString vlCode = m_voiceList[currentVoiceIndex].languageCode.left(languageCode.length());
if (languageCode == vlCode)
{
found = true;
@@ -296,7 +296,7 @@ void FestivalIntConf::setDefaultVoice(int currentVoiceIndex)
{
for(index = 0 ; index < m_voiceList.count(); ++index)
{
- QString vlCode = m_voiceList[index].languageCode.left(languageCode.length());
+ TQString vlCode = m_voiceList[index].languageCode.left(languageCode.length());
// kdDebug() << "FestivalIntConf::setDefaultVoice: testing " << vlCode << endl;
if(languageCode == vlCode)
{
@@ -323,7 +323,7 @@ void FestivalIntConf::setDefaultVoice(int currentVoiceIndex)
// kdDebug() << "FestivalIntConf::setDefaultVoice: auto picking voice code " << m_voiceList[index].code << endl;
m_widget->selectVoiceCombo->setCurrentItem(index);
m_widget->preloadCheckBox->setChecked(m_voiceList[index].preload);
- QString codecName = m_voiceList[index].codecName;
+ TQString codecName = m_voiceList[index].codecName;
int codecNdx = PlugInProc::codecNameToListIndex(codecName, m_codecList);
m_widget->characterCodingBox->setCurrentItem(codecNdx);
if (m_voiceList[index].volumeAdjustable)
@@ -371,9 +371,9 @@ void FestivalIntConf::setDefaultVoice(int currentVoiceIndex)
* Given an XML node and child element name, returns the string value from the child element.
* If no such child element, returns def.
*/
-QString FestivalIntConf::readXmlString(QDomNode &node, const QString &elementName, const QString &def)
+TQString FestivalIntConf::readXmlString(TQDomNode &node, const TQString &elementName, const TQString &def)
{
- QDomNode childNode = node.namedItem(elementName);
+ TQDomNode childNode = node.namedItem(elementName);
if (!childNode.isNull())
return childNode.toElement().text();
else
@@ -384,9 +384,9 @@ QString FestivalIntConf::readXmlString(QDomNode &node, const QString &elementNam
* Given an XML node and child element name, returns the boolean value from the child element.
* If no such child element, returns def.
*/
-bool FestivalIntConf::readXmlBool(QDomNode &node, const QString &elementName, bool def)
+bool FestivalIntConf::readXmlBool(TQDomNode &node, const TQString &elementName, bool def)
{
- QDomNode childNode = node.namedItem(elementName);
+ TQDomNode childNode = node.namedItem(elementName);
if (!childNode.isNull())
return (childNode.toElement().text() == "true");
else
@@ -397,7 +397,7 @@ void FestivalIntConf::scanVoices()
{
// kdDebug() << "FestivalIntConf::scanVoices: Running" << endl;
// Get existing voice code (if any).
- QString currentVoiceCode;
+ TQString currentVoiceCode;
int index = m_widget->selectVoiceCombo->currentItem();
if (index < (int)m_voiceList.count()) currentVoiceCode = m_voiceList[index].code;
@@ -413,7 +413,7 @@ void FestivalIntConf::scanVoices()
// m_supportedVoiceCodes.clear();
m_widget->selectVoiceCombo->clear();
- QString exePath = realFilePath(m_widget->festivalPath->url());
+ TQString exePath = realFilePath(m_widget->festivalPath->url());
if (!getLocation(exePath).isEmpty())
{
// Set up a progress dialog.
@@ -430,10 +430,10 @@ void FestivalIntConf::scanVoices()
else
{
m_festProc = new FestivalIntProc();
- connect (m_festProc, SIGNAL(stopped()), this, SLOT(slotSynthStopped()));
+ connect (m_festProc, TQT_SIGNAL(stopped()), this, TQT_SLOT(slotSynthStopped()));
}
- connect (m_festProc, SIGNAL(queryVoicesFinished(const QStringList&)),
- this, SLOT(slotQueryVoicesFinished(const QStringList&)));
+ connect (m_festProc, TQT_SIGNAL(queryVoicesFinished(const TQStringList&)),
+ this, TQT_SLOT(slotQueryVoicesFinished(const TQStringList&)));
m_festProc->queryVoices(exePath);
// Display progress dialog modally.
@@ -444,8 +444,8 @@ void FestivalIntConf::scanVoices()
// Festival responds with the list. When Festival responds with list,
// the progress dialog is closed.
- disconnect (m_festProc, SIGNAL(queryVoicesFinished(const QStringList&)),
- this, SLOT(slotQueryVoicesFinished(const QStringList&)));
+ disconnect (m_festProc, TQT_SIGNAL(queryVoicesFinished(const TQStringList&)),
+ this, TQT_SLOT(slotQueryVoicesFinished(const TQStringList&)));
if (!m_progressDlg->wasCancelled()) m_festProc->stopText();
delete m_progressDlg;
m_progressDlg = 0;
@@ -455,37 +455,37 @@ void FestivalIntConf::scanVoices()
if (!m_supportedVoiceCodes.isEmpty())
{
// User's desktop language setting.
- QString desktopLanguageCode = KGlobal::locale()->language();
- QString twoAlpha;
- QString countryCode;
- QString charSet;
+ TQString desktopLanguageCode = KGlobal::locale()->language();
+ TQString twoAlpha;
+ TQString countryCode;
+ TQString charSet;
KGlobal::locale()->splitLocale(desktopLanguageCode, twoAlpha, countryCode, charSet);
desktopLanguageCode = twoAlpha.lower();
// Festival known voices list.
- QString voicesFilename = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/festivalint/voices";
- QDomDocument voicesDoc("Festival Voices");
- QFile voicesFile(voicesFilename);
+ TQString voicesFilename = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/festivalint/voices";
+ TQDomDocument voicesDoc("Festival Voices");
+ TQFile voicesFile(voicesFilename);
if (voicesFile.open(IO_ReadOnly)) voicesDoc.setContent(&voicesFile);
voicesFile.close();
- QDomNodeList voices = voicesDoc.elementsByTagName("voice");
+ TQDomNodeList voices = voicesDoc.elementsByTagName("voice");
uint voicesCount = voices.count();
if (voicesCount == 0)
kdDebug() << "FestivalIntConf::scanVoices: Unable to open " << voicesFilename << ". Is KDEDIR defined?" << endl;
// Iterate thru list of voice codes returned by Festival,
// find matching entry in voices.xml file, and add to list of supported voices.
- QPixmap maleIcon = KGlobal::iconLoader()->loadIcon("male", KIcon::Small);
- QPixmap femaleIcon = KGlobal::iconLoader()->loadIcon("female", KIcon::Small);
- QStringList::ConstIterator itEnd = m_supportedVoiceCodes.constEnd();
- for(QStringList::ConstIterator it = m_supportedVoiceCodes.begin(); it != itEnd; ++it )
+ TQPixmap maleIcon = KGlobal::iconLoader()->loadIcon("male", KIcon::Small);
+ TQPixmap femaleIcon = KGlobal::iconLoader()->loadIcon("female", KIcon::Small);
+ TQStringList::ConstIterator itEnd = m_supportedVoiceCodes.constEnd();
+ for(TQStringList::ConstIterator it = m_supportedVoiceCodes.begin(); it != itEnd; ++it )
{
- QString code = *it;
+ TQString code = *it;
bool found = false;
for (uint index=0; index < voicesCount; ++index)
{
- QDomNode voiceNode = voices.item(index);
- QString voiceCode = readXmlString(voiceNode, "code", QString::null);
+ TQDomNode voiceNode = voices.item(index);
+ TQString voiceCode = readXmlString(voiceNode, "code", TQString::null);
// kdDebug() << "FestivalIntConf::scanVoices: Comparing code " << code << " to " << voiceCode << endl;
if (voiceCode == code)
{
@@ -502,7 +502,7 @@ void FestivalIntConf::scanVoices()
voiceTemp.rateAdjustable = readXmlBool(voiceNode, "rate-adjustable", true);
voiceTemp.pitchAdjustable = readXmlBool(voiceNode, "pitch-adjustable", true);
m_voiceList.append(voiceTemp);
- QString voiceDisplayName = voiceTemp.name + " (" + voiceTemp.code + ")";
+ TQString voiceDisplayName = voiceTemp.name + " (" + voiceTemp.code + ")";
if (voiceTemp.gender == "male")
m_widget->selectVoiceCombo->insertItem(maleIcon, voiceDisplayName);
else if (voiceTemp.gender == "female")
@@ -536,7 +536,7 @@ void FestivalIntConf::scanVoices()
if (selectVoiceComboEnabled != m_widget->selectVoiceCombo->isEnabled()) configChanged();
}
-void FestivalIntConf::slotQueryVoicesFinished(const QStringList &voiceCodes)
+void FestivalIntConf::slotQueryVoicesFinished(const TQStringList &voiceCodes)
{
// kdDebug() << "FestivalIntConf::slotQueryVoicesFinished: voiceCodes.count() = " << voiceCodes.count() << endl;
m_supportedVoiceCodes = voiceCodes;
@@ -552,24 +552,24 @@ void FestivalIntConf::slotTest_clicked()
else
{
m_festProc = new FestivalIntProc();
- connect (m_festProc, SIGNAL(stopped()), this, SLOT(slotSynthStopped()));
+ connect (m_festProc, TQT_SIGNAL(stopped()), this, TQT_SLOT(slotSynthStopped()));
}
// Create a temp file name for the wave file.
KTempFile tempFile (locateLocal("tmp", "festivalintplugin-"), ".wav");
- QString tmpWaveFile = tempFile.file()->name();
+ TQString tmpWaveFile = tempFile.file()->name();
tempFile.close();
// Get the code for the selected voice.
- QString voiceCode = m_voiceList[m_widget->selectVoiceCombo->currentItem()].code;
+ TQString voiceCode = m_voiceList[m_widget->selectVoiceCombo->currentItem()].code;
// Get language code for the selected voice.
- QString languageCode = m_voiceList[m_widget->selectVoiceCombo->currentItem()].languageCode;
+ TQString languageCode = m_voiceList[m_widget->selectVoiceCombo->currentItem()].languageCode;
// Get test message in the language of the voice.
- QString testMsg = testMessage(languageCode);
+ TQString testMsg = testMessage(languageCode);
// Get codec.
- QTextCodec* codec = PlugInProc::codecIndexToCodec(
+ TQTextCodec* codec = PlugInProc::codecIndexToCodec(
m_widget->characterCodingBox->currentItem(), m_codecList);
// Tell user to wait.
@@ -581,7 +581,7 @@ void FestivalIntConf::slotTest_clicked()
m_progressDlg->setAllowCancel(true);
// kdDebug() << "FestivalIntConf::slotTest_clicked: calling synth with voiceCode: " << voiceCode << " time percent: " << m_widget->timeBox->value() << endl;
- connect (m_festProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ connect (m_festProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
m_festProc->synth(
realFilePath(m_widget->festivalPath->url()),
testMsg,
@@ -596,7 +596,7 @@ void FestivalIntConf::slotTest_clicked()
// Display progress dialog modally. Processing continues when plugin signals synthFinished,
// or if user clicks Cancel button.
m_progressDlg->exec();
- disconnect (m_festProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ disconnect (m_festProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
if (m_progressDlg->wasCancelled()) m_festProc->stopText();
delete m_progressDlg;
m_progressDlg = 0;
@@ -620,22 +620,22 @@ void FestivalIntConf::slotSynthFinished()
// Play the wave file (possibly adjusting its Speed).
// Player object deletes the wave file when done.
if (m_player) m_player->play(m_waveFile);
- QFile::remove(m_waveFile);
- m_waveFile = QString::null;
+ TQFile::remove(m_waveFile);
+ m_waveFile = TQString::null;
if (m_progressDlg) m_progressDlg->close();
}
void FestivalIntConf::slotSynthStopped()
{
// Clean up after canceling test.
- QString filename = m_festProc->getFilename();
+ TQString filename = m_festProc->getFilename();
// kdDebug() << "FestivalIntConf::slotSynthStopped: filename = " << filename << endl;
- if (!filename.isNull()) QFile::remove(filename);
+ if (!filename.isNull()) TQFile::remove(filename);
}
void FestivalIntConf::slotFestivalPath_textChanged()
{
- QString exePath = realFilePath(m_widget->festivalPath->url());
+ TQString exePath = realFilePath(m_widget->festivalPath->url());
m_widget->selectVoiceCombo->setEnabled(false);
if (!exePath.isEmpty() && !getLocation(exePath).isEmpty())
{
@@ -646,7 +646,7 @@ void FestivalIntConf::slotFestivalPath_textChanged()
void FestivalIntConf::slotSelectVoiceCombo_activated()
{
int index = m_widget->selectVoiceCombo->currentItem();
- QString codecName = m_voiceList[index].codecName;
+ TQString codecName = m_voiceList[index].codecName;
int codecNdx = PlugInProc::codecNameToListIndex(codecName, m_codecList);
m_widget->characterCodingBox->setCurrentItem(codecNdx);
m_widget->preloadCheckBox->setChecked(
diff --git a/kttsd/plugins/festivalint/festivalintconf.h b/kttsd/plugins/festivalint/festivalintconf.h
index a367682..6a33009 100644
--- a/kttsd/plugins/festivalint/festivalintconf.h
+++ b/kttsd/plugins/festivalint/festivalintconf.h
@@ -25,8 +25,8 @@
#define _FESTIVALINTCONF_H_
// Qt includes.
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
// KDE includes.
#include <kconfig.h>
@@ -43,11 +43,11 @@ class KProgressDialog;
class QDomNode;
typedef struct voiceStruct{
- QString code; // Code as sent to Festival
- QString name; // Name as displayed and returned in Talker Code.
- QString languageCode; // Language code (en, es, etc)
- QString codecName; // Character encoding codec name (eg. ISO 8859-1)
- QString gender; // male, female, or neutral
+ TQString code; // Code as sent to Festival
+ TQString name; // Name as displayed and returned in Talker Code.
+ TQString languageCode; // Language code (en, es, etc)
+ TQString codecName; // Character encoding codec name (eg. ISO 8859-1)
+ TQString gender; // male, female, or neutral
bool preload; // Start Festival and load this language when KTTSD is started.
bool volumeAdjustable; // True if the voice supports volume adjustments.
bool rateAdjustable; // True if the voice supports rate adjustments.
@@ -59,7 +59,7 @@ class FestivalIntConf : public PlugInConf {
public:
/** Constructor */
- FestivalIntConf( QWidget* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ FestivalIntConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/** Destructor */
~FestivalIntConf();
@@ -71,14 +71,14 @@ class FestivalIntConf : public PlugInConf {
* valid settings. NOTE that this is not called after the modules is loaded,
* so you probably want to call this method in the constructor.
*/
- void load(KConfig *config, const QString &configGroup);
+ void load(KConfig *config, const TQString &configGroup);
/** This function gets called when the user wants to save the settings in
* the user interface, updating the config files or wherever the
* configuration is stored. The method is called when the user clicks "Apply"
* or "Ok".
*/
- void save(KConfig *config, const QString &configGroup);
+ void save(KConfig *config, const TQString &configGroup);
/** This function is called to set the settings in the module to sensible
* default values. It gets called when hitting the "Default" button. The
@@ -90,7 +90,7 @@ class FestivalIntConf : 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 QString::null, no specific language has
+ * If the passed-in code is TQString::null, no specific language has
* been chosen.
* @param lang The desired language code or Null if none.
*
@@ -102,16 +102,16 @@ class FestivalIntConf : public PlugInConf {
* not the given country, treat it as though the country
* code were not specified, i.e., adapt to the given language.
*/
- void setDesiredLanguage(const QString &lang);
+ void setDesiredLanguage(const TQString &lang);
/**
* 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 QString::null.
+ * i.e., cannot yet synthesize, return TQString::null.
* @return Fully-specified talker code.
*/
- QString getTalkerCode();
+ TQString getTalkerCode();
private slots:
/** Scan for the different voices in festivalPath/lib */
@@ -131,7 +131,7 @@ class FestivalIntConf : public PlugInConf {
void frequencySlider_valueChanged(int sliderValue);
void slotFestivalPath_textChanged();
void slotSelectVoiceCombo_activated();
- void slotQueryVoicesFinished(const QStringList &voiceCodes);
+ void slotQueryVoicesFinished(const TQStringList &voiceCodes);
private:
int percentToSlider(int percentValue);
@@ -141,19 +141,19 @@ class FestivalIntConf : public PlugInConf {
* Given an XML node and child element name, returns the string value from the child element.
* If no such child element, returns def.
*/
- QString readXmlString(QDomNode &node, const QString &elementName, const QString &def);
+ TQString readXmlString(TQDomNode &node, const TQString &elementName, const TQString &def);
/**
* Given an XML node and child element name, returns the boolean value from the child element.
* If no such child element, returns def.
*/
- bool readXmlBool(QDomNode &node, const QString &elementName, bool def);
+ bool readXmlBool(TQDomNode &node, const TQString &elementName, bool def);
/**
* Given a voice code, returns index into m_voiceList array (and voiceCombo box).
* -1 if not found.
*/
- int voiceCodeToListIndex(const QString& voiceCode) const;
+ int voiceCodeToListIndex(const TQString& voiceCode) const;
/**
* Chooses a default voice given scanned list of voices in m_voiceList and current
@@ -166,21 +166,21 @@ class FestivalIntConf : public PlugInConf {
FestivalIntConfWidget* m_widget;
// Language code.
- QString m_languageCode;
+ TQString m_languageCode;
// Language country code (if any).
- QString m_countryCode;
+ TQString m_countryCode;
// List of voices */
- QValueList<voice> m_voiceList;
+ TQValueList<voice> m_voiceList;
// Festival synthesizer.
FestivalIntProc* m_festProc;
// Synthesized wave file name.
- QString m_waveFile;
+ TQString m_waveFile;
// Progress dialog.
KProgressDialog* m_progressDlg;
// List of voice codes supported by Festival.
- QStringList m_supportedVoiceCodes;
+ TQStringList m_supportedVoiceCodes;
// List of displayed codec names.
- QStringList m_codecList;
+ TQStringList m_codecList;
// Whether Festival supports SSML or not.
FestivalIntProc::SupportsSSML m_supportsSSML;
};
diff --git a/kttsd/plugins/festivalint/festivalintproc.cpp b/kttsd/plugins/festivalint/festivalintproc.cpp
index 77822ea..e48f2c4 100644
--- a/kttsd/plugins/festivalint/festivalintproc.cpp
+++ b/kttsd/plugins/festivalint/festivalintproc.cpp
@@ -25,10 +25,10 @@
#include <math.h>
// Qt includes.
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qthread.h>
-#include <qtextcodec.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqthread.h>
+#include <tqtextcodec.h>
// KDE includes.
#include <kdebug.h>
@@ -43,7 +43,7 @@
#include "festivalintproc.moc"
/** Constructor */
-FestivalIntProc::FestivalIntProc( QObject* parent, const char* name, const QStringList& ) :
+FestivalIntProc::FestivalIntProc( TQObject* parent, const char* name, const TQStringList& ) :
PlugInProc( parent, name ){
// kdDebug() << "FestivalIntProc::FestivalIntProc: Running" << endl;
m_ready = true;
@@ -54,7 +54,7 @@ FestivalIntProc::FestivalIntProc( QObject* parent, const char* name, const QStri
m_state = psIdle;
m_supportsSSML = ssUnknown;
m_languageCode = "en";
- m_codec = QTextCodec::codecForName("ISO8859-1");
+ m_codec = TQTextCodec::codecForName("ISO8859-1");
}
/** Destructor */
@@ -84,7 +84,7 @@ FestivalIntProc::~FestivalIntProc(){
}
/** Initialize the speech */
-bool FestivalIntProc::init(KConfig *config, const QString &configGroup)
+bool FestivalIntProc::init(KConfig *config, const TQString &configGroup)
{
// kdDebug() << "FestivalIntProc::init: Initializing plug in: Festival" << endl;
@@ -99,7 +99,7 @@ bool FestivalIntProc::init(KConfig *config, const QString &configGroup)
m_preload = config->readBoolEntry("Preload", false);
m_languageCode = config->readEntry("LanguageCode", "en");
m_supportsSSML = static_cast<SupportsSSML>(config->readNumEntry("SupportsSSML", ssUnknown));
- QString codecName = config->readEntry("Codec", "Latin1");
+ TQString codecName = config->readEntry("Codec", "Latin1");
m_codec = codecNameToCodec(codecName);
if (m_preload) startEngine(m_festivalExePath, m_voiceCode, m_languageCode, m_codec);
return true;
@@ -111,9 +111,9 @@ bool FestivalIntProc::init(KConfig *config, const QString &configGroup)
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void FestivalIntProc::sayText(const QString &text)
+void FestivalIntProc::sayText(const TQString &text)
{
- synth(m_festivalExePath, text, QString::null, m_voiceCode, m_time, m_pitch, m_volume,
+ synth(m_festivalExePath, text, TQString::null, m_voiceCode, m_time, m_pitch, m_volume,
m_languageCode, m_codec);
}
@@ -127,7 +127,7 @@ void FestivalIntProc::sayText(const QString &text)
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void FestivalIntProc::synthText(const QString& text, const QString& suggestedFilename)
+void FestivalIntProc::synthText(const TQString& text, const TQString& suggestedFilename)
{
synth(m_festivalExePath, text, suggestedFilename, m_voiceCode, m_time, m_pitch, m_volume,
m_languageCode, m_codec);
@@ -139,12 +139,12 @@ void FestivalIntProc::synthText(const QString& text, const QString& suggestedFil
* @return False if busy doing something else and therefore cannot
* do the query.
*/
-bool FestivalIntProc::queryVoices(const QString &festivalExePath)
+bool FestivalIntProc::queryVoices(const TQString &festivalExePath)
{
// kdDebug() << "FestivalIntProc::queryVoices: Running" << endl;
if (m_state != psIdle && m_waitingQueryVoices && m_waitingStop) return false;
// Start Festival if not already running.
- startEngine(festivalExePath, QString::null, m_languageCode, m_codec);
+ startEngine(festivalExePath, TQString::null, m_languageCode, m_codec);
// Set state, waiting for voice codes list from Festival.
m_waitingQueryVoices = true;
// Voice rab_diphone is needed in order to support SSML.
@@ -160,8 +160,8 @@ bool FestivalIntProc::queryVoices(const QString &festivalExePath)
* @param voiceCode Voice code in which to speak text.
* @param languageCode Language code, for example, "en".
*/
-void FestivalIntProc::startEngine(const QString &festivalExePath, const QString &voiceCode,
- const QString &languageCode, QTextCodec* codec)
+void FestivalIntProc::startEngine(const TQString &festivalExePath, const TQString &voiceCode,
+ const TQString &languageCode, TQTextCodec* codec)
{
// Initialize Festival only if it's not initialized.
if (m_festProc)
@@ -184,19 +184,19 @@ void FestivalIntProc::startEngine(const QString &festivalExePath, const QString
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, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotProcessExited(KProcess*)));
- connect(m_festProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_festProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
- connect(m_festProc, SIGNAL(wroteStdin(KProcess*)),
- this, SLOT(slotWroteStdin(KProcess*)));
+ 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*)));
}
if (!m_festProc->isRunning())
{
// kdDebug() << "FestivalIntProc::startEngine: Starting Festival process" << endl;
- m_runningVoiceCode = QString::null;
+ m_runningVoiceCode = TQString::null;
m_runningTime = 100;
m_runningPitch = 100;
m_ready = false;
@@ -239,15 +239,15 @@ void FestivalIntProc::startEngine(const QString &festivalExePath, const QString
* @param languageCode Language code, for example, "en".
*/
void FestivalIntProc::synth(
- const QString &festivalExePath,
- const QString &text,
- const QString &synthFilename,
- const QString &voiceCode,
+ const TQString &festivalExePath,
+ const TQString &text,
+ const TQString &synthFilename,
+ const TQString &voiceCode,
int time,
int pitch,
int volume,
- const QString &languageCode,
- QTextCodec* codec)
+ const TQString &languageCode,
+ TQTextCodec* codec)
{
// kdDebug() << "FestivalIntProc::synth: festivalExePath = " << festivalExePath
// << " voiceCode = " << voiceCode << endl;
@@ -256,7 +256,7 @@ void FestivalIntProc::synth(
startEngine(festivalExePath, voiceCode, languageCode, codec);
// If we just started Festival, or rate changed, tell festival.
if (m_runningTime != time) {
- QString timeMsg;
+ TQString timeMsg;
if (voiceCode.contains("_hts") > 0)
{
// Map 50% to 200% onto 0 to 1000.
@@ -268,11 +268,11 @@ void FestivalIntProc::synth(
slider = slider - 500;
// Map -500 to 500 onto 0.15 to -0.15.
float stretchValue = -float(slider) * 0.15 / 500.0;
- timeMsg = QString("(set! hts_duration_stretch %1)").arg(
+ timeMsg = TQString("(set! hts_duration_stretch %1)").arg(
stretchValue, 0, 'f', 3);
}
else
- timeMsg = QString("(Parameter.set 'Duration_Stretch %1)").arg(
+ timeMsg = TQString("(Parameter.set 'Duration_Stretch %1)").arg(
1.0/(float(time)/100.0), 0, 'f', 2);
sendToFestival(timeMsg);
m_runningTime = time;
@@ -290,14 +290,14 @@ void FestivalIntProc::synth(
{
pitchValue = (((pitch - 100) * 395) / 100) + 105;
}
- QString pitchMsg = QString(
+ TQString pitchMsg = TQString(
"(set! int_lr_params '((target_f0_mean %1) (target_f0_std 14)"
"(model_f0_mean 170) (model_f0_std 34)))").arg(pitchValue, 0, 10);
sendToFestival(pitchMsg);
m_runningPitch = pitch;
}
- QString saidText = text;
+ TQString saidText = text;
// Split really long sentences into shorter sentences, by looking for commas and converting
// to periods.
@@ -307,7 +307,7 @@ void FestivalIntProc::synth(
len = saidText.findRev(", ", len - (c_tooLong * 2 / 3), true);
if (len != -1)
{
- QString c = saidText.mid(len+2, 1);
+ TQString c = saidText.mid(len+2, 1);
if (c != c.upper())
{
saidText.replace(len, 2, ". ");
@@ -329,7 +329,7 @@ void FestivalIntProc::synth(
if (synthFilename.isNull())
{
m_state = psSaying;
- m_synthFilename = QString::null;
+ m_synthFilename = TQString::null;
// kdDebug() << "FestivalIntProc::synth: Saying text: '" << saidText << "' using Festival plug in with voice "
// << voiceCode << endl;
saidText = "(SayText \"" + saidText + "\")";
@@ -351,7 +351,7 @@ void FestivalIntProc::synth(
saidText =
"(ktts_sabletowave \"" + saidText + "\" \"" +
synthFilename + "\" " +
- QString::number(volumeValue) + ")";
+ TQString::number(volumeValue) + ")";
}
else
{
@@ -362,7 +362,7 @@ void FestivalIntProc::synth(
// Synth the text and adjust volume.
"(set! utt1 (Utterance Text \"" + saidText +
"\"))(utt.synth utt1)" +
- "(utt.wave.rescale utt1 " + QString::number(volumeValue) + " t)" +
+ "(utt.wave.rescale utt1 " + TQString::number(volumeValue) + " t)" +
"(utt.save.wave utt1 \"" + synthFilename + "\")";
}
sendToFestival(saidText);
@@ -374,7 +374,7 @@ void FestivalIntProc::synth(
* puts it in the queue.
* @param text Text to send or queue.
*/
-void FestivalIntProc::sendToFestival(const QString& text)
+void FestivalIntProc::sendToFestival(const TQString& text)
{
if (text.isNull()) return;
m_outputQueue.append(text);
@@ -395,9 +395,9 @@ bool FestivalIntProc::sendIfReady()
if (m_writingStdin) return true;
if (m_outputQueue.isEmpty()) return false;
if (!m_festProc->isRunning()) return false;
- QString text = m_outputQueue[0];
+ TQString text = m_outputQueue[0];
text += "\n";
- QCString encodedText;
+ TQCString encodedText;
if (m_codec)
encodedText = m_codec->fromUnicode(text);
else
@@ -414,7 +414,7 @@ bool FestivalIntProc::sendIfReady()
* Determine if the text has SABLE tags. If so, we will have to use a different
* synthesis method.
*/
-bool FestivalIntProc::isSable(const QString &text)
+bool FestivalIntProc::isSable(const TQString &text)
{
return KttsUtils::hasRootElement( text, "SABLE" );
}
@@ -426,7 +426,7 @@ bool FestivalIntProc::isSable(const QString &text)
*
* The plugin must not re-use the filename.
*/
-QString FestivalIntProc::getFilename() { return m_synthFilename; }
+TQString FestivalIntProc::getFilename() { return m_synthFilename; }
/**
* Stop text
@@ -500,11 +500,11 @@ void FestivalIntProc::slotProcessExited(KProcess*)
void FestivalIntProc::slotReceivedStdout(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
// kdDebug() << "FestivalIntProc::slotReceivedStdout: Received from Festival: " << buf << endl;
bool promptSeen = (buf.contains("festival>") > 0);
bool emitQueryVoicesFinished = false;
- QStringList voiceCodesList;
+ TQStringList voiceCodesList;
if (m_waitingQueryVoices && m_outputQueue.isEmpty())
{
// Look for opening ( and closing ).
@@ -522,7 +522,7 @@ void FestivalIntProc::slotReceivedStdout(KProcess*, char* buffer, int buflen)
// Extract contents between parens.
buf = buf.mid(1, rightParen - 1);
// Space separated list.
- voiceCodesList = QStringList::split(" ", buf, false);
+ voiceCodesList = TQStringList::split(" ", buf, false);
emitQueryVoicesFinished = true;
}
}
@@ -569,7 +569,7 @@ void FestivalIntProc::slotReceivedStdout(KProcess*, char* buffer, int buflen)
void FestivalIntProc::slotReceivedStderr(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "FestivalIntProc::slotReceivedStderr: Received error from Festival: " << buf << endl;
}
@@ -620,7 +620,7 @@ void FestivalIntProc::ackFinished()
if (m_state == psFinished)
{
m_state = psIdle;
- m_synthFilename = QString::null;
+ m_synthFilename = TQString::null;
}
}
@@ -652,7 +652,7 @@ bool FestivalIntProc::supportsSynth() { return true; }
* tags and converts the file to plain text.
* @return Name of the XSLT file.
*/
-QString FestivalIntProc::getSsmlXsltFilename()
+TQString FestivalIntProc::getSsmlXsltFilename()
{
if (m_supportsSSML == ssYes)
return KGlobal::dirs()->resourceDirs("data").last() + "kttsd/festivalint/xslt/SSMLtoSable.xsl";
diff --git a/kttsd/plugins/festivalint/festivalintproc.h b/kttsd/plugins/festivalint/festivalintproc.h
index a69642c..bae9578 100644
--- a/kttsd/plugins/festivalint/festivalintproc.h
+++ b/kttsd/plugins/festivalint/festivalintproc.h
@@ -24,8 +24,8 @@
#ifndef _FESTIVALINTPROC_H_
#define _FESTIVALINTPROC_H_
-#include <qstringlist.h>
-#include <qmutex.h>
+#include <tqstringlist.h>
+#include <tqmutex.h>
#include <kprocess.h>
@@ -46,7 +46,7 @@ class FestivalIntProc : public PlugInProc{
/**
* Constructor
*/
- FestivalIntProc( QObject* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ FestivalIntProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/**
* Destructor
@@ -58,7 +58,7 @@ class FestivalIntProc : public PlugInProc{
* @param config Settings object.
* @param configGroup Settings group.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Returns true when festival is ready to speak a sentence.
@@ -69,7 +69,7 @@ class FestivalIntProc : public PlugInProc{
* Say a text string.
* @param text The text to speak.
*/
- virtual void sayText(const QString &text);
+ virtual void sayText(const TQString &text);
/**
* Synthesize text into an audio file, but do not send to the audio device.
@@ -84,7 +84,7 @@ class FestivalIntProc : public PlugInProc{
* It must also implement the @ref getState method, which must return
* psFinished, when synthesis is completed.
*/
- virtual void synthText(const QString &text, const QString &suggestedFilename);
+ virtual void synthText(const TQString &text, const TQString &suggestedFilename);
/**
* Get the generated audio filename from call to @ref synthText.
@@ -95,7 +95,7 @@ class FestivalIntProc : public PlugInProc{
* be locked when this method is called. The file will be deleted when
* KTTSD is finished using it.
*/
- virtual QString getFilename();
+ virtual TQString getFilename();
/**
* Stop current operation (saying or synthesizing text).
@@ -171,10 +171,10 @@ class FestivalIntProc : public PlugInProc{
* @param volume Volume percentage. 50 to 200.
* @param languageCode Language code, for example, "en".
*/
- void synth(const QString &festivalExePath, const QString &text,
- const QString &synthFilename, const QString& voiceCode,
- int time, int pitch, int volume, const QString &languageCode,
- QTextCodec* codec);
+ void synth(const TQString &festivalExePath, const TQString &text,
+ const TQString &synthFilename, const TQString& voiceCode,
+ int time, int pitch, int volume, const TQString &languageCode,
+ TQTextCodec* codec);
/**
* Sends commands to Festival to query for a list of supported voice codes.
@@ -182,7 +182,7 @@ class FestivalIntProc : public PlugInProc{
* @return False if busy doing something else and therefore cannot
* do the query.
*/
- bool queryVoices(const QString &festivalExePath);
+ bool queryVoices(const TQString &festivalExePath);
/**
* Returns the name of an XSLT stylesheet that will convert a valid SSML file
@@ -193,7 +193,7 @@ class FestivalIntProc : public PlugInProc{
* tags and converts the file to plain text.
* @return Name of the XSLT file.
*/
- QString getSsmlXsltFilename();
+ TQString getSsmlXsltFilename();
/**
* Whether Festival supports SSML or not.
@@ -208,7 +208,7 @@ class FestivalIntProc : public PlugInProc{
* This signal fires upon completion of a queryVoices operation.
* The list of voice codes do not have "voice_" prefix.
*/
- void queryVoicesFinished(const QStringList &voiceCodes);
+ void queryVoicesFinished(const TQStringList &voiceCodes);
private slots:
void slotProcessExited(KProcess* proc);
@@ -223,15 +223,15 @@ class FestivalIntProc : public PlugInProc{
* @param voiceCode Voice code in which to speak text.
* @param languageCode Language code, for example, "en".
*/
- void startEngine(const QString &festivalExePath, const QString &voiceCode,
- const QString &languageCode, QTextCodec* codec);
+ void startEngine(const TQString &festivalExePath, const TQString &voiceCode,
+ const TQString &languageCode, TQTextCodec* codec);
/**
* If ready for more output, sends the given text to Festival process, otherwise,
* puts it in the queue.
* @param text Text to send or queue.
*/
- void sendToFestival(const QString& text);
+ void sendToFestival(const TQString& text);
/**
* If Festival is ready for more input and there is more output to send, send it.
@@ -247,7 +247,7 @@ class FestivalIntProc : public PlugInProc{
* Determine if the text has SABLE tags. If so, we will have to use a different
* synthesis method.
*/
- bool isSable(const QString &text);
+ bool isSable(const TQString &text);
/**
* We attempt to shorten sentences longer than this by replacing commas with periods.
@@ -257,12 +257,12 @@ class FestivalIntProc : public PlugInProc{
/**
* Path to the Festival executable.
*/
- QString m_festivalExePath;
+ TQString m_festivalExePath;
/**
* Selected voice (from config).
*/
- QString m_voiceCode;
+ TQString m_voiceCode;
/**
* True if the voice is preloaded. Also used as a flag to supress killing
@@ -288,7 +288,7 @@ class FestivalIntProc : public PlugInProc{
/**
* Running voice.
*/
- QString m_runningVoiceCode;
+ TQString m_runningVoiceCode;
/**
* Running time (speed).
@@ -308,7 +308,7 @@ class FestivalIntProc : public PlugInProc{
/**
* Synthesis filename.
*/
- QString m_synthFilename;
+ TQString m_synthFilename;
/**
* True when festival is ready for another input.
@@ -337,19 +337,19 @@ class FestivalIntProc : public PlugInProc{
* sending the next command, this queue allows us to queue up multiple
* commands and send each one when the ReceivedStdOut signal fires.
*/
- QStringList m_outputQueue;
+ TQStringList m_outputQueue;
bool m_writingStdin;
/**
* Language code.
*/
- QString m_languageCode;
+ TQString m_languageCode;
/**
* Codec.
*/
- QTextCodec* m_codec;
+ TQTextCodec* m_codec;
/**
* Flag if SSML is supported. Festival cannot support SABLE (and therefore SSML)
diff --git a/kttsd/plugins/flite/fliteconf.cpp b/kttsd/plugins/flite/fliteconf.cpp
index cbc4b2d..0dfb6d1 100644
--- a/kttsd/plugins/flite/fliteconf.cpp
+++ b/kttsd/plugins/flite/fliteconf.cpp
@@ -22,9 +22,9 @@
******************************************************************************/
// Qt includes.
-#include <qlayout.h>
-#include <qfile.h>
-#include <qapplication.h>
+#include <tqlayout.h>
+#include <tqfile.h>
+#include <tqapplication.h>
// KDE includes.
#include <klocale.h>
@@ -42,14 +42,14 @@
#include "fliteconf.moc"
/** Constructor */
-FliteConf::FliteConf( QWidget* parent, const char* name, const QStringList& /*args*/) :
+FliteConf::FliteConf( TQWidget* parent, const char* name, const TQStringList& /*args*/) :
PlugInConf(parent, name)
{
// kdDebug() << "FliteConf::FliteConf: Running" << endl;
m_fliteProc = 0;
m_progressDlg = 0;
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "FliteConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new FliteConfWidget(this, "FliteConfigWidget");
@@ -57,24 +57,24 @@ FliteConf::FliteConf( QWidget* parent, const char* name, const QStringList& /*ar
defaults();
- connect(m_widget->flitePath, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->fliteTest, SIGNAL(clicked()), this, SLOT(slotFliteTest_clicked()));
+ connect(m_widget->flitePath, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->fliteTest, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFliteTest_clicked()));
}
/** Destructor */
FliteConf::~FliteConf(){
// kdDebug() << "Running: FliteConf::~FliteConf()" << endl;
- if (!m_waveFile.isNull()) QFile::remove(m_waveFile);
+ if (!m_waveFile.isNull()) TQFile::remove(m_waveFile);
delete m_fliteProc;
delete m_progressDlg;
}
-void FliteConf::load(KConfig *config, const QString &configGroup){
+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);
- QString fliteExe = config->readEntry("FliteExePath", QString::null);
+ TQString fliteExe = config->readEntry("FliteExePath", TQString::null);
if (fliteExe.isEmpty())
{
config->setGroup("Flite");
@@ -83,7 +83,7 @@ void FliteConf::load(KConfig *config, const QString &configGroup){
m_widget->flitePath->setURL(fliteExe);
}
-void FliteConf::save(KConfig *config, const QString &configGroup){
+void FliteConf::save(KConfig *config, const TQString &configGroup){
// kdDebug() << "FliteConf::save: Saving configuration for language " << langGroup << " with plug in " << "Festival Lite (flite)" << endl;
config->setGroup("Flite");
@@ -99,19 +99,19 @@ void FliteConf::defaults(){
m_widget->flitePath->setURL("flite");
}
-void FliteConf::setDesiredLanguage(const QString &lang)
+void FliteConf::setDesiredLanguage(const TQString &lang)
{
m_languageCode = lang;
}
-QString FliteConf::getTalkerCode()
+TQString FliteConf::getTalkerCode()
{
- QString fliteExe = realFilePath(m_widget->flitePath->url());
+ TQString fliteExe = realFilePath(m_widget->flitePath->url());
if (!fliteExe.isEmpty())
{
if (!getLocation(fliteExe).isEmpty())
{
- return QString(
+ return TQString(
"<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />"
"<prosody volume=\"%4\" rate=\"%5\" />"
"<kttsd synthesizer=\"%6\" />")
@@ -123,7 +123,7 @@ QString FliteConf::getTalkerCode()
.arg("Festival Lite (flite)");
}
}
- return QString::null;
+ return TQString::null;
}
void FliteConf::slotFliteTest_clicked()
@@ -135,15 +135,15 @@ void FliteConf::slotFliteTest_clicked()
else
{
m_fliteProc = new FliteProc();
- connect (m_fliteProc, SIGNAL(stopped()), this, SLOT(slotSynthStopped()));
+ connect (m_fliteProc, TQT_SIGNAL(stopped()), this, TQT_SLOT(slotSynthStopped()));
}
// Create a temp file name for the wave file.
KTempFile tempFile (locateLocal("tmp", "fliteplugin-"), ".wav");
- QString tmpWaveFile = tempFile.file()->name();
+ TQString tmpWaveFile = tempFile.file()->name();
tempFile.close();
// Get test message in the language of the voice.
- QString testMsg = testMessage(m_languageCode);
+ TQString testMsg = testMessage(m_languageCode);
// Tell user to wait.
m_progressDlg = new KProgressDialog(m_widget, "kttsmgr_flite_testdlg",
@@ -154,7 +154,7 @@ void FliteConf::slotFliteTest_clicked()
m_progressDlg->setAllowCancel(true);
// Play an English test. Flite only supports English.
- connect (m_fliteProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ connect (m_fliteProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
m_fliteProc->synth(
testMsg,
tmpWaveFile,
@@ -163,7 +163,7 @@ void FliteConf::slotFliteTest_clicked()
// Display progress dialog modally. Processing continues when plugin signals synthFinished,
// or if user clicks Cancel button.
m_progressDlg->exec();
- disconnect (m_fliteProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ disconnect (m_fliteProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
if (m_progressDlg->wasCancelled()) m_fliteProc->stopText();
delete m_progressDlg;
m_progressDlg = 0;
@@ -186,14 +186,14 @@ void FliteConf::slotSynthFinished()
// Play the wave file (possibly adjusting its Speed).
// Player object deletes the wave file when done.
if (m_player) m_player->play(m_waveFile);
- QFile::remove(m_waveFile);
- m_waveFile = QString::null;
+ TQFile::remove(m_waveFile);
+ m_waveFile = TQString::null;
if (m_progressDlg) m_progressDlg->close();
}
void FliteConf::slotSynthStopped()
{
// Clean up after canceling test.
- QString filename = m_fliteProc->getFilename();
- if (!filename.isNull()) QFile::remove(filename);
+ TQString filename = m_fliteProc->getFilename();
+ if (!filename.isNull()) TQFile::remove(filename);
}
diff --git a/kttsd/plugins/flite/fliteconf.h b/kttsd/plugins/flite/fliteconf.h
index aa26c7b..6d5ff06 100644
--- a/kttsd/plugins/flite/fliteconf.h
+++ b/kttsd/plugins/flite/fliteconf.h
@@ -25,7 +25,7 @@
#define _FLITECONF_H_
// Qt includes.
-#include <qstring.h>
+#include <tqstring.h>
// KDE includes.
#include <kconfig.h>
@@ -45,7 +45,7 @@ class FliteConf : public PlugInConf {
public:
/** Constructor */
- FliteConf( QWidget* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ FliteConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/** Destructor */
~FliteConf();
@@ -57,14 +57,14 @@ class FliteConf : public PlugInConf {
* valid settings. NOTE that this is not called after the modules is loaded,
* so you probably want to call this method in the constructor.
*/
- void load(KConfig *config, const QString &configGroup);
+ void load(KConfig *config, const TQString &configGroup);
/** This function gets called when the user wants to save the settings in
* the user interface, updating the config files or wherever the
* configuration is stored. The method is called when the user clicks "Apply"
* or "Ok".
*/
- void save(KConfig *config, const QString &configGroup);
+ void save(KConfig *config, const TQString &configGroup);
/** This function is called to set the settings in the module to sensible
* default values. It gets called when hitting the "Default" button. The
@@ -77,7 +77,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 QString::null, no specific language has
+ * If the passed-in code is TQString::null, no specific language has
* been chosen.
* @param lang The desired language code or Null if none.
*
@@ -89,16 +89,16 @@ class FliteConf : public PlugInConf {
* not the given country, treat it as though the country
* code were not specified, i.e., adapt to the given language.
*/
- void setDesiredLanguage(const QString &lang);
+ void setDesiredLanguage(const TQString &lang);
/**
* 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 QString::null.
+ * i.e., cannot yet synthesize, return TQString::null.
* @return Fully-specified talker code.
*/
- QString getTalkerCode();
+ TQString getTalkerCode();
private slots:
void configChanged(){
@@ -111,13 +111,13 @@ class FliteConf : public PlugInConf {
private:
// Language code.
- QString m_languageCode;
+ TQString m_languageCode;
// Configuration Widget.
FliteConfWidget* m_widget;
// Flite synthesizer.
FliteProc* m_fliteProc;
// Synthesized wave file name.
- QString m_waveFile;
+ TQString m_waveFile;
// Progress dialog.
KProgressDialog* m_progressDlg;
};
diff --git a/kttsd/plugins/flite/fliteproc.cpp b/kttsd/plugins/flite/fliteproc.cpp
index 54b15e3..55cb0fa 100644
--- a/kttsd/plugins/flite/fliteproc.cpp
+++ b/kttsd/plugins/flite/fliteproc.cpp
@@ -22,8 +22,8 @@
******************************************************************************/
// Qt includes.
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
// KDE includes.
#include <kdebug.h>
@@ -36,7 +36,7 @@
#include "fliteproc.moc"
/** Constructor */
-FliteProc::FliteProc( QObject* parent, const char* name, const QStringList& ) :
+FliteProc::FliteProc( TQObject* parent, const char* name, const TQStringList& ) :
PlugInProc( parent, name ){
kdDebug() << "FliteProc::FliteProc: Running" << endl;
m_state = psIdle;
@@ -55,8 +55,8 @@ FliteProc::~FliteProc(){
}
/** Initialize the speech */
-bool FliteProc::init(KConfig* config, const QString& configGroup){
- // kdDebug() << "Running: FliteProc::init(const QString &lang)" << endl;
+bool FliteProc::init(KConfig* config, const TQString& configGroup){
+ // kdDebug() << "Running: FliteProc::init(const TQString &lang)" << endl;
// kdDebug() << "Initializing plug in: Flite" << endl;
// Retrieve path to flite executable.
config->setGroup(configGroup);
@@ -71,9 +71,9 @@ bool FliteProc::init(KConfig* config, const QString& configGroup){
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void FliteProc::sayText(const QString &text)
+void FliteProc::sayText(const TQString &text)
{
- synth(text, QString::null, m_fliteExePath);
+ synth(text, TQString::null, m_fliteExePath);
}
/**
@@ -86,7 +86,7 @@ void FliteProc::sayText(const QString &text)
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void FliteProc::synthText(const QString& text, const QString& suggestedFilename)
+void FliteProc::synthText(const TQString& text, const TQString& suggestedFilename)
{
synth(text, suggestedFilename, m_fliteExePath);
}
@@ -98,11 +98,11 @@ void FliteProc::synthText(const QString& text, const QString& suggestedFilename)
* synthesize and audibilize the text.
*/
void FliteProc::synth(
- const QString &text,
- const QString &synthFilename,
- const QString& fliteExePath)
+ const TQString &text,
+ const TQString &synthFilename,
+ const TQString& fliteExePath)
{
- // kdDebug() << "Running: FliteProc::synth(const QString &text)" << endl;
+ // kdDebug() << "Running: FliteProc::synth(const TQString &text)" << endl;
if (m_fliteProc)
{
@@ -112,14 +112,14 @@ void FliteProc::synth(
}
// kdDebug()<< "FliteProc::synth: Creating Flite object" << endl;
m_fliteProc = new KProcess;
- connect(m_fliteProc, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotProcessExited(KProcess*)));
- connect(m_fliteProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_fliteProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
- connect(m_fliteProc, SIGNAL(wroteStdin(KProcess*)),
- this, SLOT(slotWroteStdin(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* )));
if (synthFilename.isNull())
m_state = psSaying;
else
@@ -127,7 +127,7 @@ void FliteProc::synth(
// Encode quotation characters.
- QString saidText = text;
+ TQString saidText = text;
/*
saidText.replace("\\\"", "#!#!");
saidText.replace("\"", "\\\"");
@@ -162,7 +162,7 @@ void FliteProc::synth(
*
* The plugin must not re-use the filename.
*/
-QString FliteProc::getFilename()
+TQString FliteProc::getFilename()
{
kdDebug() << "FliteProc::getFilename: returning " << m_synthFilename << endl;
return m_synthFilename;
@@ -218,13 +218,13 @@ void FliteProc::slotProcessExited(KProcess*)
void FliteProc::slotReceivedStdout(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "FliteProc::slotReceivedStdout: Received output from Flite: " << buf << endl;
}
void FliteProc::slotReceivedStderr(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(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 = QString::null;
+ m_synthFilename = TQString::null;
}
}
diff --git a/kttsd/plugins/flite/fliteproc.h b/kttsd/plugins/flite/fliteproc.h
index 7737b3a..a956d5c 100644
--- a/kttsd/plugins/flite/fliteproc.h
+++ b/kttsd/plugins/flite/fliteproc.h
@@ -25,8 +25,8 @@
#define _FLITEPROC_H_
// Qt includes.
-#include <qstringlist.h>
-#include <qmutex.h>
+#include <tqstringlist.h>
+#include <tqmutex.h>
// KTTS includes.
#include <pluginproc.h>
@@ -40,7 +40,7 @@ class FliteProc : public PlugInProc{
/**
* Constructor
*/
- FliteProc( QObject* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ FliteProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/**
* Destructor
@@ -52,13 +52,13 @@ class FliteProc : public PlugInProc{
* @param config Settings object.
* @param configGroup Settings Group.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Say a text string.
* @param text The text to speak.
*/
- virtual void sayText(const QString &text);
+ virtual void sayText(const TQString &text);
/**
* Synthesize text into an audio file, but do not send to the audio device.
@@ -70,7 +70,7 @@ class FliteProc : public PlugInProc{
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
- virtual void synthText(const QString& text, const QString& suggestedFilename);
+ virtual void synthText(const TQString& text, const TQString& suggestedFilename);
/**
* Get the generated audio filename from synthText.
@@ -79,7 +79,7 @@ class FliteProc : public PlugInProc{
*
* The plugin must not re-use the filename.
*/
- virtual QString getFilename();
+ virtual TQString getFilename();
/**
* Stop current operation (saying or synthesizing text).
@@ -144,9 +144,9 @@ class FliteProc : public PlugInProc{
* @param fliteExePath Path to the flite executable.
*/
void synth(
- const QString &text,
- const QString &synthFilename,
- const QString &fliteExePath);
+ const TQString &text,
+ const TQString &synthFilename,
+ const TQString &fliteExePath);
private slots:
void slotProcessExited(KProcess* proc);
@@ -159,7 +159,7 @@ class FliteProc : public PlugInProc{
/**
* Path to flite executable (from config).
*/
- QString m_fliteExePath;
+ TQString m_fliteExePath;
/**
* Flite process
@@ -169,7 +169,7 @@ class FliteProc : public PlugInProc{
/**
* Synthesis filename.
*/
- QString m_synthFilename;
+ TQString m_synthFilename;
/**
* Plugin state.
diff --git a/kttsd/plugins/freetts/freettsconf.cpp b/kttsd/plugins/freetts/freettsconf.cpp
index 701af5e..05c1fab 100644
--- a/kttsd/plugins/freetts/freettsconf.cpp
+++ b/kttsd/plugins/freetts/freettsconf.cpp
@@ -16,12 +16,12 @@
***************************************************************************/
// Qt includes.
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfile.h>
-#include <qapplication.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
+#include <tqapplication.h>
// KDE includes.
#include <kdialog.h>
@@ -40,14 +40,14 @@
#include "freettsconfigwidget.h"
/** Constructor */
-FreeTTSConf::FreeTTSConf( QWidget* parent, const char* name, const QStringList&/*args*/) :
+FreeTTSConf::FreeTTSConf( TQWidget* parent, const char* name, const TQStringList&/*args*/) :
PlugInConf( parent, name ) {
// kdDebug() << "FreeTTSConf::FreeTTSConf: Running" << endl;
m_freettsProc = 0;
m_progressDlg = 0;
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "FreeTTSConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new FreeTTSConfWidget(this, "FreeTTSConfigWidget");
@@ -55,28 +55,28 @@ FreeTTSConf::FreeTTSConf( QWidget* parent, const char* name, const QStringList&/
defaults();
- connect(m_widget->freettsPath, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->freettsTest, SIGNAL(clicked()), this, SLOT(slotFreeTTSTest_clicked()));
+ connect(m_widget->freettsPath, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->freettsTest, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFreeTTSTest_clicked()));
}
/** Destructor */
FreeTTSConf::~FreeTTSConf() {
// kdDebug() << "Running: FreeTTSConf::~FreeTTSConf()" << endl;
- if (!m_waveFile.isNull()) QFile::remove(m_waveFile);
+ if (!m_waveFile.isNull()) TQFile::remove(m_waveFile);
delete m_freettsProc;
delete m_progressDlg;
}
-void FreeTTSConf::load(KConfig *config, const QString &configGroup) {
+void FreeTTSConf::load(KConfig *config, const TQString &configGroup) {
// kdDebug() << "FreeTTSConf::load: Running" << endl;
config->setGroup(configGroup);
- QString freeTTSJar = config->readEntry("FreeTTSJarPath", QString::null);
+ TQString freeTTSJar = config->readEntry("FreeTTSJarPath", TQString::null);
if (freeTTSJar.isEmpty())
{
config->setGroup("FreeTTS");
- freeTTSJar = config->readEntry("FreeTTSJarPath", QString::null);
+ freeTTSJar = config->readEntry("FreeTTSJarPath", TQString::null);
}
if (freeTTSJar.isEmpty())
freeTTSJar = getLocation("freetts.jar");
@@ -84,7 +84,7 @@ void FreeTTSConf::load(KConfig *config, const QString &configGroup) {
/// If freettsPath is still empty, then we couldn't find the file in the path.
}
-void FreeTTSConf::save(KConfig *config, const QString &configGroup){
+void FreeTTSConf::save(KConfig *config, const TQString &configGroup){
// kdDebug() << "FreeTTSConf::save: Running" << endl;
config->setGroup("FreeTTS");
@@ -103,19 +103,19 @@ void FreeTTSConf::defaults(){
m_widget->freettsPath->setURL("");
}
-void FreeTTSConf::setDesiredLanguage(const QString &lang)
+void FreeTTSConf::setDesiredLanguage(const TQString &lang)
{
m_languageCode = lang;
}
-QString FreeTTSConf::getTalkerCode()
+TQString FreeTTSConf::getTalkerCode()
{
- QString freeTTSJar = realFilePath(m_widget->freettsPath->url());
+ TQString freeTTSJar = realFilePath(m_widget->freettsPath->url());
if (!freeTTSJar.isEmpty())
{
if (!getLocation(freeTTSJar).isEmpty())
{
- return QString(
+ return TQString(
"<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />"
"<prosody volume=\"%4\" rate=\"%5\" />"
"<kttsd synthesizer=\"%6\" />")
@@ -127,25 +127,25 @@ QString FreeTTSConf::getTalkerCode()
.arg("FreeTTS");
}
}
- return QString::null;
+ return TQString::null;
}
-// QString FreeTTSConf::getLocation(const QString &name) {
+// TQString FreeTTSConf::getLocation(const TQString &name) {
// /// Iterate over the path and see if 'name' exists in it. Return the
-// /// full path to it if it does. Else return an empty QString.
+// /// full path to it if it does. Else return an empty TQString.
// kdDebug() << "FreeTTSConf::getLocation: Searching for " << name << " in the path... " << endl;
// kdDebug() << m_path << endl;
-// for(QStringList::iterator it = m_path.begin(); it != m_path.end(); ++it) {
-// QString fullName = *it;
+// for(TQStringList::iterator it = m_path.begin(); it != m_path.end(); ++it) {
+// TQString fullName = *it;
// fullName += "/";
// fullName += name;
// /// The user either has the directory of the file in the path...
-// if(QFile::exists(fullName)) {
+// if(TQFile::exists(fullName)) {
// return fullName;
// kdDebug() << fullName << endl;
// }
// /// ....Or the file itself
-// else if(QFileInfo(*it).baseName().append(QString(".").append(QFileInfo(*it).extension())) == name) {
+// else if(TQFileInfo(*it).baseName().append(TQString(".").append(TQFileInfo(*it).extension())) == name) {
// return fullName;
// kdDebug() << fullName << endl;
// }
@@ -163,15 +163,15 @@ void FreeTTSConf::slotFreeTTSTest_clicked()
else
{
m_freettsProc = new FreeTTSProc();
- connect (m_freettsProc, SIGNAL(stopped()), this, SLOT(slotSynthStopped()));
+ connect (m_freettsProc, TQT_SIGNAL(stopped()), this, TQT_SLOT(slotSynthStopped()));
}
// Create a temp file name for the wave file.
KTempFile tempFile (locateLocal("tmp", "freettsplugin-"), ".wav");
- QString tmpWaveFile = tempFile.file()->name();
+ TQString tmpWaveFile = tempFile.file()->name();
tempFile.close();
// Get test message in the language of the voice.
- QString testMsg = testMessage(m_languageCode);
+ TQString testMsg = testMessage(m_languageCode);
// Tell user to wait.
m_progressDlg = new KProgressDialog(m_widget, "kttsmgr_freetts_testdlg",
@@ -183,7 +183,7 @@ void FreeTTSConf::slotFreeTTSTest_clicked()
// I think FreeTTS only officialy supports English, but if anyone knows of someone
// whos built up a different language lexicon and has it working with FreeTTS gimme an email at ceruleanblaze@gmail.com
- connect (m_freettsProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ connect (m_freettsProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
m_freettsProc->synth(
testMsg,
tmpWaveFile,
@@ -192,7 +192,7 @@ void FreeTTSConf::slotFreeTTSTest_clicked()
// Display progress dialog modally. Processing continues when plugin signals synthFinished,
// or if user clicks Cancel button.
m_progressDlg->exec();
- disconnect (m_freettsProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ disconnect (m_freettsProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
if (m_progressDlg->wasCancelled()) m_freettsProc->stopText();
delete m_progressDlg;
m_progressDlg = 0;
@@ -215,16 +215,16 @@ void FreeTTSConf::slotSynthFinished()
// Play the wave file (possibly adjusting its Speed).
// Player object deletes the wave file when done.
if (m_player) m_player->play(m_waveFile);
- QFile::remove(m_waveFile);
- m_waveFile = QString::null;
+ TQFile::remove(m_waveFile);
+ m_waveFile = TQString::null;
if (m_progressDlg) m_progressDlg->close();
}
void FreeTTSConf::slotSynthStopped()
{
// Clean up after canceling test.
- QString filename = m_freettsProc->getFilename();
- if (!filename.isNull()) QFile::remove(filename);
+ TQString filename = m_freettsProc->getFilename();
+ if (!filename.isNull()) TQFile::remove(filename);
}
#include "freettsconf.moc"
diff --git a/kttsd/plugins/freetts/freettsconf.h b/kttsd/plugins/freetts/freettsconf.h
index 9ab3ae8..b8e252e 100644
--- a/kttsd/plugins/freetts/freettsconf.h
+++ b/kttsd/plugins/freetts/freettsconf.h
@@ -18,7 +18,7 @@
#ifndef _FREETTSCONF_H_
#define _FREETTSCONF_H_
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -36,7 +36,7 @@ class FreeTTSConf : public PlugInConf {
public:
/** Constructor */
- FreeTTSConf( QWidget* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ FreeTTSConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/** Destructor */
~FreeTTSConf();
@@ -47,13 +47,13 @@ class FreeTTSConf : public PlugInConf {
the control center, to undo all of his changes and restore the currently
valid settings. NOTE that this is not called after the modules is loaded,
so you probably want to call this method in the constructor.*/
- void load(KConfig *config, const QString &configGroup);
+ void load(KConfig *config, const TQString &configGroup);
/** This function gets called when the user wants to save the settings in
the user interface, updating the config files or wherever the
configuration is stored. The method is called when the user clicks "Apply"
or "Ok". */
- void save(KConfig *config, const QString &configGroup);
+ void save(KConfig *config, const TQString &configGroup);
/** This function is called to set the settings in the module to sensible
default values. It gets called when hitting the "Default" button. The
@@ -65,7 +65,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 QString::null, no specific language has
+ * If the passed-in code is TQString::null, no specific language has
* been chosen.
* @param lang The desired language code or Null if none.
*
@@ -77,22 +77,22 @@ class FreeTTSConf : public PlugInConf {
* not the given country, treat it as though the country
* code were not specified, i.e., adapt to the given language.
*/
- void setDesiredLanguage(const QString &lang);
+ void setDesiredLanguage(const TQString &lang);
/**
* 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 QString::null.
+ * i.e., cannot yet synthesize, return TQString::null.
* @return Fully-specified talker code.
*/
- QString getTalkerCode();
+ TQString getTalkerCode();
/**
* Function searches the $PATH for a file. If it exists, it returns the full path
- * to that file. If not, then it returns an empty QString.
+ * to that file. If not, then it returns an empty TQString.
* @param name The name of the file to search for.
- * @returns The full path to the file or an empty QString.
+ * @returns The full path to the file or an empty TQString.
*/
private slots:
@@ -105,7 +105,7 @@ class FreeTTSConf : public PlugInConf {
private:
/// Language code.
- QString m_languageCode;
+ TQString m_languageCode;
/// Configuration Widget.
FreeTTSConfWidget *m_widget;
@@ -114,7 +114,7 @@ class FreeTTSConf : public PlugInConf {
FreeTTSProc *m_freettsProc;
/// Synthesized wave file name.
- QString m_waveFile;
+ TQString m_waveFile;
/// Progress dialog.
KProgressDialog* m_progressDlg;
diff --git a/kttsd/plugins/freetts/freettsproc.cpp b/kttsd/plugins/freetts/freettsproc.cpp
index 829fee9..9c038af 100644
--- a/kttsd/plugins/freetts/freettsproc.cpp
+++ b/kttsd/plugins/freetts/freettsproc.cpp
@@ -15,9 +15,9 @@
* *
***************************************************************************/
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfileinfo.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -27,7 +27,7 @@
#include "freettsproc.h"
/** Constructor */
-FreeTTSProc::FreeTTSProc( QObject* parent, const char* name, const QStringList& /*args*/) :
+FreeTTSProc::FreeTTSProc( TQObject* parent, const char* name, const TQStringList& /*args*/) :
PlugInProc( parent, name ) {
kdDebug() << "Running: FreeTTSProc::FreeTTSProc" << endl;
m_state = psIdle;
@@ -45,7 +45,7 @@ FreeTTSProc::~FreeTTSProc() {
}
/** Initializate the speech */
-bool FreeTTSProc::init(KConfig *config, const QString &configGroup) {
+bool FreeTTSProc::init(KConfig *config, const TQString &configGroup) {
kdDebug() << "Running: FreeTTSProc::init()" << endl;
kdDebug() << "Initializing plug in: FreeTTS" << endl;
config->setGroup(configGroup);
@@ -60,8 +60,8 @@ bool FreeTTSProc::init(KConfig *config, const QString &configGroup) {
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void FreeTTSProc::sayText(const QString &text) {
- synth(text, QString::null, m_freettsJarPath);
+void FreeTTSProc::sayText(const TQString &text) {
+ synth(text, TQString::null, m_freettsJarPath);
}
/**
@@ -74,24 +74,24 @@ void FreeTTSProc::sayText(const QString &text) {
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void FreeTTSProc::synthText(const QString& text, const QString& suggestedFilename) {
+void FreeTTSProc::synthText(const TQString& text, const TQString& suggestedFilename) {
kdDebug() << "Running: FreeTTSProc::synthText" << endl;
synth(text, suggestedFilename, m_freettsJarPath);
}
-// A little helper function because KDE 3.2 kdDebug() does not support QValueList<QCString>.
-QStringList argsToQStringList(const QValueList<QCString> list)
+// A little helper function because KDE 3.2 kdDebug() does not support TQValueList<TQCString>.
+TQStringList argsToQStringList(const TQValueList<TQCString> list)
{
- QStringList newList;
- QValueList<QCString>::ConstIterator it = list.begin();
+ TQStringList newList;
+ TQValueList<TQCString>::ConstIterator it = list.begin();
for ( ; it != list.end(); ++it ) newList.append(*it);
return newList;
}
void FreeTTSProc::synth(
- const QString &text,
- const QString &synthFilename,
- const QString& freettsJarPath) {
+ const TQString &text,
+ const TQString &synthFilename,
+ const TQString& freettsJarPath) {
kdDebug() << "Running: FreeTTSProc::synth" << endl;
@@ -103,21 +103,21 @@ void FreeTTSProc::synth(
}
m_freettsProc = new KProcess;
- connect(m_freettsProc, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotProcessExited(KProcess*)));
- connect(m_freettsProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_freettsProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
- connect(m_freettsProc, SIGNAL(wroteStdin(KProcess*)),
- this, SLOT(slotWroteStdin(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* )));
if (synthFilename.isNull())
m_state = psSaying;
else
m_state = psSynthing;
- QString saidText = text;
+ TQString saidText = text;
saidText += "\n";
/// As freetts.jar doesn't seem to like being called from an absolute path,
@@ -125,8 +125,8 @@ void FreeTTSProc::synth(
/// KProcess::setWorkingDirectory()
/// We could just strip off 11 characters from the end of the path to freetts.jar, but thats
/// not exactly very portable...
- QString filename = QFileInfo(freettsJarPath).baseName().append(QString(".").append(QFileInfo(freettsJarPath).extension()));
- QString freettsJarDir = freettsJarPath.left((freettsJarPath.length() - filename.length()) - 1);
+ TQString filename = TQFileInfo(freettsJarPath).baseName().append(TQString(".").append(TQFileInfo(freettsJarPath).extension()));
+ TQString freettsJarDir = freettsJarPath.left((freettsJarPath.length() - filename.length()) - 1);
m_freettsProc->setWorkingDirectory(freettsJarDir);
kdDebug() << "FreeTTSProc::synthText: moved to directory '" << freettsJarDir << "'" << endl;
@@ -154,7 +154,7 @@ void FreeTTSProc::synth(
* Returning the filename of the synth'd text
* @returns The filename of the last synth'd text
*/
-QString FreeTTSProc::getFilename() {
+TQString FreeTTSProc::getFilename() {
kdDebug() << "FreeTTSProc::getFilename: returning " << m_synthFilename << endl;
return m_synthFilename;
}
@@ -206,12 +206,12 @@ void FreeTTSProc::slotProcessExited(KProcess*) {
}
void FreeTTSProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) {
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "FreeTTSProc::slotReceivedStdout: Received output from FreeTTS: " << buf << endl;
}
void FreeTTSProc::slotReceivedStderr(KProcess*, char* buffer, int buflen) {
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(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 = QString::null;
+ m_synthFilename = TQString::null;
}
}
diff --git a/kttsd/plugins/freetts/freettsproc.h b/kttsd/plugins/freetts/freettsproc.h
index b2bb631..7dbc3b5 100644
--- a/kttsd/plugins/freetts/freettsproc.h
+++ b/kttsd/plugins/freetts/freettsproc.h
@@ -19,8 +19,8 @@
#define _FREETTSPROC_H_
-#include <qstringlist.h>
-#include <qmutex.h>
+#include <tqstringlist.h>
+#include <tqmutex.h>
#include <pluginproc.h>
@@ -33,7 +33,7 @@ public:
/**
* Constructor
*/
- FreeTTSProc( QObject* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ FreeTTSProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/**
* Destructor
@@ -45,13 +45,13 @@ public:
* @param config Settings object.
* @param configGroup Settings group.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Say a text string.
* @param text The text to speak.
*/
- virtual void sayText(const QString &text);
+ virtual void sayText(const TQString &text);
/**
* Synthesize text into an audio file, but do not send to the audio device.
@@ -63,7 +63,7 @@ public:
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
- virtual void synthText(const QString& text, const QString& suggestedFilename);
+ virtual void synthText(const TQString& text, const TQString& suggestedFilename);
/**
* Get the generated audio filename from synthText.
@@ -72,7 +72,7 @@ public:
*
* The plugin must not re-use the filename.
*/
- virtual QString getFilename();
+ virtual TQString getFilename();
/**
* Stop current operation (saying or synthesizing text).
@@ -137,9 +137,9 @@ public:
* @param freettsJarPath Path to the freetts jar file.
*/
void synth(
- const QString &text,
- const QString &synthFilename,
- const QString &freettsJarPath);
+ const TQString &text,
+ const TQString &synthFilename,
+ const TQString &freettsJarPath);
private slots:
void slotProcessExited(KProcess* proc);
@@ -152,7 +152,7 @@ private:
/**
* Path to FreeTTS jar file (from config).
*/
- QString m_freettsJarPath;
+ TQString m_freettsJarPath;
/**
* FreeTTS process
@@ -162,7 +162,7 @@ private:
/**
* Synthesis filename.
*/
- QString m_synthFilename;
+ TQString m_synthFilename;
/**
* Plugin state.
diff --git a/kttsd/plugins/hadifix/hadifixconf.cpp b/kttsd/plugins/hadifix/hadifixconf.cpp
index a2c5547..0249aea 100644
--- a/kttsd/plugins/hadifix/hadifixconf.cpp
+++ b/kttsd/plugins/hadifix/hadifixconf.cpp
@@ -15,14 +15,14 @@
***************************************************************************/
// Qt includes.
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qfile.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqfile.h>
// KDE includes.
#include <ktempfile.h>
@@ -63,16 +63,16 @@ class HadifixConfPrivate {
~HadifixConfPrivate() {
if (hadifixProc) hadifixProc->stopText();
delete hadifixProc;
- if (!waveFile.isNull()) QFile::remove(waveFile);
+ if (!waveFile.isNull()) TQFile::remove(waveFile);
delete progressDlg;
};
#include "initialconfig.h"
- void setConfiguration (QString hadifixExec, QString mbrolaExec,
- QString voice, bool male,
+ void setConfiguration (TQString hadifixExec, TQString mbrolaExec,
+ TQString voice, bool male,
int volume, int time, int pitch,
- QString codecName)
+ TQString codecName)
{
configWidget->hadifixURL->setURL (hadifixExec);
configWidget->mbrolaURL->setURL (mbrolaExec);
@@ -86,10 +86,10 @@ class HadifixConfPrivate {
}
void initializeVoices () {
- QStringList::iterator it;
+ TQStringList::iterator it;
for (it = defaultVoices.begin(); it != defaultVoices.end(); ++it) {
HadifixProc::VoiceGender gender;
- QString name = QFileInfo(*it).fileName();
+ TQString name = TQFileInfo(*it).fileName();
gender = HadifixProc::determineGender(defaultMbrolaExec, *it);
if (gender == HadifixProc::MaleGender)
configWidget->addVoice(*it, true, i18n("Male voice \"%1\"").arg(name));
@@ -114,10 +114,10 @@ class HadifixConfPrivate {
}
void setDefaultEncodingFromVoice() {
- QString voiceFile = configWidget->getVoiceFilename();
- QString voiceCode = QFileInfo(voiceFile).baseName(false);
+ TQString voiceFile = configWidget->getVoiceFilename();
+ TQString voiceCode = TQFileInfo(voiceFile).baseName(false);
voiceCode = voiceCode.left(2);
- QString codecName = "Local";
+ TQString codecName = "Local";
if (voiceCode == "de") codecName = "ISO 8859-1";
if (voiceCode == "hu") codecName = "ISO 8859-2";
configWidget->characterCodingBox->setCurrentItem(PlugInProc::codecNameToListIndex(
@@ -125,14 +125,14 @@ class HadifixConfPrivate {
}
void setDefaults () {
- QStringList::iterator it = defaultVoices.begin();
+ TQStringList::iterator it = defaultVoices.begin();
// Find a voice that matches language code, if any.
if (!languageCode.isEmpty())
{
- QString justLang = languageCode.left(2);
+ TQString justLang = languageCode.left(2);
for (;it != defaultVoices.end();++it)
{
- QString voiceCode = QFileInfo(*it).baseName(false).left(2);
+ TQString voiceCode = TQFileInfo(*it).baseName(false).left(2);
if (voiceCode == justLang) break;
}
if (it == defaultVoices.end()) it = defaultVoices.begin();
@@ -145,19 +145,19 @@ class HadifixConfPrivate {
100, 100, 100, "Local");
};
- void load (KConfig *config, const QString &configGroup) {
+ void load (KConfig *config, const TQString &configGroup) {
config->setGroup(configGroup);
- QString voice = config->readEntry("voice", configWidget->getVoiceFilename());
+ TQString voice = config->readEntry("voice", configWidget->getVoiceFilename());
HadifixProc::VoiceGender gender;
gender = HadifixProc::determineGender(defaultMbrolaExec, voice);
bool isMale = (gender == HadifixProc::MaleGender);
- QString defaultCodecName = "Local";
+ TQString defaultCodecName = "Local";
// TODO: Need a better way to determine proper codec for each voice.
// This will do for now.
- QString voiceCode = QFileInfo(voice).baseName(false);
+ TQString voiceCode = TQFileInfo(voice).baseName(false);
if (voiceCode.left(2) == "de") defaultCodecName = "ISO 8859-1";
if (voiceCode.left(2) == "hu") defaultCodecName = "ISO 8859-2";
@@ -173,7 +173,7 @@ class HadifixConfPrivate {
);
};
- void save (KConfig *config, const QString &configGroup) {
+ void save (KConfig *config, const TQString &configGroup) {
config->setGroup(configGroup);
config->writeEntry ("hadifixExec", PlugInConf::realFilePath(configWidget->hadifixURL->url()));
config->writeEntry ("mbrolaExec", PlugInConf::realFilePath(configWidget->mbrolaURL->url()));
@@ -188,14 +188,14 @@ class HadifixConfPrivate {
HadifixConfigUI *configWidget;
- QString languageCode;
- QString defaultHadifixExec;
- QString defaultMbrolaExec;
- QStringList defaultVoices;
- QStringList codecList;
+ TQString languageCode;
+ TQString defaultHadifixExec;
+ TQString defaultMbrolaExec;
+ TQStringList defaultVoices;
+ TQStringList codecList;
// Wave file playing on play object.
- QString waveFile;
+ TQString waveFile;
// Synthesizer.
HadifixProc* hadifixProc;
// Progress Dialog.
@@ -203,24 +203,24 @@ class HadifixConfPrivate {
};
/** Constructor */
-HadifixConf::HadifixConf( QWidget* parent, const char* name, const QStringList &) :
+HadifixConf::HadifixConf( TQWidget* parent, const char* name, const TQStringList &) :
PlugInConf( parent, name ){
// kdDebug() << "HadifixConf::HadifixConf: Running" << endl;
- QVBoxLayout *layout = new QVBoxLayout (this, KDialog::marginHint(), KDialog::spacingHint(), "CommandConfigWidgetLayout");
+ TQVBoxLayout *layout = new TQVBoxLayout (this, KDialog::marginHint(), KDialog::spacingHint(), "CommandConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
d = new HadifixConfPrivate();
d->configWidget = new HadifixConfigUI (this, "configWidget");
- QString file = locate("data", "LICENSES/LGPL_V2");
+ TQString file = locate("data", "LICENSES/LGPL_V2");
i18n("This plugin is distributed under the terms of the GPL v2 or later.");
- connect(d->configWidget->voiceButton, SIGNAL(clicked()), this, SLOT(voiceButton_clicked()));
- connect(d->configWidget->testButton, SIGNAL(clicked()), this, SLOT(testButton_clicked()));
- connect(d->configWidget, SIGNAL(changed(bool)), this, SLOT(configChanged (bool)));
- connect(d->configWidget->characterCodingBox, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(d->configWidget->voiceCombo, SIGNAL(activated(int)), this, SLOT(voiceCombo_activated(int)));
+ connect(d->configWidget->voiceButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(voiceButton_clicked()));
+ connect(d->configWidget->testButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(testButton_clicked()));
+ connect(d->configWidget, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(configChanged (bool)));
+ connect(d->configWidget->characterCodingBox, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(d->configWidget->voiceCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(voiceCombo_activated(int)));
d->initializeCharacterCodes();
d->initializeVoices();
d->setDefaults();
@@ -233,13 +233,13 @@ HadifixConf::~HadifixConf(){
delete d;
}
-void HadifixConf::load(KConfig *config, const QString &configGroup) {
+void HadifixConf::load(KConfig *config, const TQString &configGroup) {
// kdDebug() << "HadifixConf::load: Running" << endl;
d->setDefaults();
d->load (config, configGroup);
}
-void HadifixConf::save(KConfig *config, const QString &configGroup) {
+void HadifixConf::save(KConfig *config, const TQString &configGroup) {
// kdDebug() << "HadifixConf::save: Running" << endl;
d->save (config, configGroup);
}
@@ -249,22 +249,22 @@ void HadifixConf::defaults() {
d->setDefaults();
}
-void HadifixConf::setDesiredLanguage(const QString &lang)
+void HadifixConf::setDesiredLanguage(const TQString &lang)
{
d->languageCode = lang;
}
-QString HadifixConf::getTalkerCode()
+TQString HadifixConf::getTalkerCode()
{
if (!d->configWidget->hadifixURL->url().isEmpty() && !d->configWidget->mbrolaURL->url().isEmpty())
{
- QString voiceFile = d->configWidget->getVoiceFilename();
- if (QFileInfo(voiceFile).exists())
+ TQString voiceFile = d->configWidget->getVoiceFilename();
+ if (TQFileInfo(voiceFile).exists())
{
// mbrola voice file names usually start with two-letter language code,
// but this is by no means guaranteed.
- QString voiceCode = QFileInfo(voiceFile).baseName(false);
- QString voiceLangCode = voiceCode.left(2);
+ TQString voiceCode = TQFileInfo(voiceFile).baseName(false);
+ TQString voiceLangCode = voiceCode.left(2);
if (d->languageCode.left(2) != voiceLangCode)
{
// Verify that first two letters of voice filename are a valid language code.
@@ -272,15 +272,15 @@ QString HadifixConf::getTalkerCode()
if (!TalkerCode::languageCodeToLanguage(voiceLangCode).isEmpty())
d->languageCode = voiceLangCode;
}
- QString gender = "male";
+ TQString gender = "male";
if (!d->configWidget->isMaleVoice()) gender = "female";
- QString volume = "medium";
+ TQString volume = "medium";
if (d->configWidget->volumeBox->value() < 75) volume = "soft";
if (d->configWidget->volumeBox->value() > 125) volume = "loud";
- QString rate = "medium";
+ TQString rate = "medium";
if (d->configWidget->timeBox->value() < 75) rate = "slow";
if (d->configWidget->timeBox->value() > 125) rate = "fast";
- return QString(
+ return TQString(
"<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />"
"<prosody volume=\"%4\" rate=\"%5\" />"
"<kttsd synthesizer=\"%6\" />")
@@ -292,7 +292,7 @@ QString HadifixConf::getTalkerCode()
.arg("Hadifix");
}
}
- return QString::null;
+ return TQString::null;
}
void HadifixConf::voiceButton_clicked () {
@@ -308,7 +308,7 @@ void HadifixConf::voiceButton_clicked () {
widget->voiceFileURL->setURL(d->configWidget->getVoiceFilename());
widget->mbrola = d->defaultMbrolaExec;
- if (dialog->exec() == QDialog::Accepted) {
+ if (dialog->exec() == TQDialog::Accepted) {
d->configWidget->setVoice (widget->voiceFileURL->url(),
widget->maleOption->isChecked());
d->setDefaultEncodingFromVoice();
@@ -330,11 +330,11 @@ void HadifixConf::testButton_clicked () {
else
{
d->hadifixProc = new HadifixProc();
- connect (d->hadifixProc, SIGNAL(stopped()), this, SLOT(slotSynthStopped()));
+ connect (d->hadifixProc, TQT_SIGNAL(stopped()), this, TQT_SLOT(slotSynthStopped()));
}
// Create a temp file name for the wave file.
KTempFile tempFile (locateLocal("tmp", "hadifixplugin-"), ".wav");
- QString tmpWaveFile = tempFile.file()->name();
+ TQString tmpWaveFile = tempFile.file()->name();
tempFile.close();
// Tell user to wait.
@@ -352,9 +352,9 @@ void HadifixConf::testButton_clicked () {
// italian, and a few others, written in perl, but they have many issues.
// Go to the mbrola website and click on "TTS" to learn more.
- // QString testMsg = "K D E ist eine moderne grafische Arbeitsumgebung für UNIX-Computer.";
- QString testMsg = testMessage(d->languageCode);
- connect (d->hadifixProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ // TQString testMsg = "K D E ist eine moderne grafische Arbeitsumgebung für UNIX-Computer.";
+ TQString testMsg = testMessage(d->languageCode);
+ connect (d->hadifixProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
d->hadifixProc->synth (testMsg,
realFilePath(d->configWidget->hadifixURL->url()),
d->configWidget->isMaleVoice(),
@@ -369,7 +369,7 @@ void HadifixConf::testButton_clicked () {
// Display progress dialog modally. Processing continues when plugin signals synthFinished,
// or if user clicks Cancel button.
d->progressDlg->exec();
- disconnect (d->hadifixProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ disconnect (d->hadifixProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
if (d->progressDlg->wasCancelled()) d->hadifixProc->stopText();
delete d->progressDlg;
d->progressDlg = 0;
@@ -392,15 +392,15 @@ void HadifixConf::slotSynthFinished()
// Play the wave file (possibly adjusting its Speed).
// Player object deletes the wave file when done.
if (m_player) m_player->play(d->waveFile);
- QFile::remove(d->waveFile);
- d->waveFile = QString::null;
+ TQFile::remove(d->waveFile);
+ d->waveFile = TQString::null;
if (d->progressDlg) d->progressDlg->close();
}
void HadifixConf::slotSynthStopped()
{
// Clean up after canceling test.
- QString filename = d->hadifixProc->getFilename();
+ TQString filename = d->hadifixProc->getFilename();
// kdDebug() << "HadifixConf::slotSynthStopped: filename = " << filename << endl;
- if (!filename.isNull()) QFile::remove(filename);
+ if (!filename.isNull()) TQFile::remove(filename);
}
diff --git a/kttsd/plugins/hadifix/hadifixconf.h b/kttsd/plugins/hadifix/hadifixconf.h
index a53ecb1..4ef96a6 100644
--- a/kttsd/plugins/hadifix/hadifixconf.h
+++ b/kttsd/plugins/hadifix/hadifixconf.h
@@ -1,7 +1,7 @@
#ifndef _HADIFIXCONF_H_
#define _HADIFIXCONF_H_
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kconfig.h>
@@ -15,7 +15,7 @@ class HadifixConf : public PlugInConf {
public:
/** Constructor */
- HadifixConf( QWidget* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ HadifixConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/** Destructor */
~HadifixConf();
@@ -26,13 +26,13 @@ class HadifixConf : public PlugInConf {
the control center, to undo all of his changes and restore the currently
valid settings. NOTE that this is not called after the modules is loaded,
so you probably want to call this method in the constructor.*/
- void load(KConfig *config, const QString &configGroup);
+ void load(KConfig *config, const TQString &configGroup);
/** This function gets called when the user wants to save the settings in
the user interface, updating the config files or wherever the
configuration is stored. The method is called when the user clicks "Apply"
or "Ok". */
- void save(KConfig *config, const QString &configGroup);
+ void save(KConfig *config, const TQString &configGroup);
/** This function is called to set the settings in the module to sensible
default values. It gets called when hitting the "Default" button. The
@@ -44,7 +44,7 @@ class HadifixConf : 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 QString::null, no specific language has
+ * If the passed-in code is TQString::null, no specific language has
* been chosen.
* @param lang The desired language code or Null if none.
*
@@ -56,16 +56,16 @@ class HadifixConf : public PlugInConf {
* not the given country, treat it as though the country
* code were not specified, i.e., adapt to the given language.
*/
- void setDesiredLanguage(const QString &lang);
+ void setDesiredLanguage(const TQString &lang);
/**
* 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 QString::null.
+ * i.e., cannot yet synthesize, return TQString::null.
* @return Fully-specified talker code.
*/
- QString getTalkerCode();
+ TQString getTalkerCode();
public slots:
void configChanged(bool t = true){emit changed(t);};
diff --git a/kttsd/plugins/hadifix/hadifixconfigui.ui.h b/kttsd/plugins/hadifix/hadifixconfigui.ui.h
index e3a7a04..7c21c54 100644
--- a/kttsd/plugins/hadifix/hadifixconfigui.ui.h
+++ b/kttsd/plugins/hadifix/hadifixconfigui.ui.h
@@ -51,7 +51,7 @@ void HadifixConfigUI::init () {
female = KGlobal::iconLoader()->loadIcon("female", KIcon::Small);
}
-void HadifixConfigUI::addVoice (const QString &filename, bool isMale) {
+void HadifixConfigUI::addVoice (const TQString &filename, bool isMale) {
if (isMale) {
if (!maleVoices.contains(filename)) {
int id = voiceCombo->count();
@@ -68,7 +68,7 @@ void HadifixConfigUI::addVoice (const QString &filename, bool isMale) {
}
}
-void HadifixConfigUI::addVoice (const QString &filename, bool isMale, const QString &displayname) {
+void HadifixConfigUI::addVoice (const TQString &filename, bool isMale, const TQString &displayname) {
addVoice (filename, isMale);
if (isMale) {
@@ -81,7 +81,7 @@ void HadifixConfigUI::addVoice (const QString &filename, bool isMale, const QStr
}
}
-void HadifixConfigUI::setVoice (const QString &filename, bool isMale) {
+void HadifixConfigUI::setVoice (const TQString &filename, bool isMale) {
addVoice (filename, isMale);
if (isMale)
voiceCombo->setCurrentItem (maleVoices[filename]);
@@ -89,10 +89,10 @@ void HadifixConfigUI::setVoice (const QString &filename, bool isMale) {
voiceCombo->setCurrentItem (femaleVoices[filename]);
}
-QString HadifixConfigUI::getVoiceFilename() {
+TQString HadifixConfigUI::getVoiceFilename() {
int curr = voiceCombo->currentItem();
- QString filename = voiceCombo->text(curr);
+ TQString filename = voiceCombo->text(curr);
if (defaultVoices.contains(curr))
filename = defaultVoices[curr];
@@ -101,7 +101,7 @@ QString HadifixConfigUI::getVoiceFilename() {
bool HadifixConfigUI::isMaleVoice() {
int curr = voiceCombo->currentItem();
- QString filename = getVoiceFilename();
+ TQString filename = getVoiceFilename();
if (maleVoices.contains(filename))
return maleVoices[filename] == curr;
@@ -109,6 +109,6 @@ bool HadifixConfigUI::isMaleVoice() {
return false;
}
-void HadifixConfigUI::changed (const QString &) {
+void HadifixConfigUI::changed (const TQString &) {
emit changed (true);
}
diff --git a/kttsd/plugins/hadifix/hadifixproc.cpp b/kttsd/plugins/hadifix/hadifixproc.cpp
index 42730b3..598eb21 100644
--- a/kttsd/plugins/hadifix/hadifixproc.cpp
+++ b/kttsd/plugins/hadifix/hadifixproc.cpp
@@ -16,9 +16,9 @@
* *
***************************************************************************/
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextcodec.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextcodec.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -35,7 +35,7 @@ class HadifixProcPrivate {
hadifixProc = 0;
waitingStop = false;
state = psIdle;
- synthFilename = QString::null;
+ synthFilename = TQString::null;
gender = false;
volume = 100;
time = 100;
@@ -47,11 +47,11 @@ class HadifixProcPrivate {
delete hadifixProc;
};
- void load(KConfig *config, const QString &configGroup) {
+ void load(KConfig *config, const TQString &configGroup) {
config->setGroup(configGroup);
- hadifix = config->readEntry ("hadifixExec", QString::null);
- mbrola = config->readEntry ("mbrolaExec", QString::null);
- voice = config->readEntry ("voice", QString::null);
+ hadifix = config->readEntry ("hadifixExec", TQString::null);
+ mbrola = config->readEntry ("mbrolaExec", TQString::null);
+ voice = config->readEntry ("voice", TQString::null);
gender = config->readBoolEntry("gender", false);
volume = config->readNumEntry ("volume", 100);
time = config->readNumEntry ("time", 100);
@@ -59,9 +59,9 @@ class HadifixProcPrivate {
codec = PlugInProc::codecNameToCodec(config->readEntry ("codec", "Local"));
};
- QString hadifix;
- QString mbrola;
- QString voice;
+ TQString hadifix;
+ TQString mbrola;
+ TQString voice;
bool gender;
int volume;
int time;
@@ -70,12 +70,12 @@ class HadifixProcPrivate {
bool waitingStop;
KShellProcess* hadifixProc;
volatile pluginState state;
- QTextCodec* codec;
- QString synthFilename;
+ TQTextCodec* codec;
+ TQString synthFilename;
};
/** Constructor */
-HadifixProc::HadifixProc( QObject* parent, const char* name, const QStringList &) :
+HadifixProc::HadifixProc( TQObject* parent, const char* name, const TQStringList &) :
PlugInProc( parent, name ){
// kdDebug() << "HadifixProc::HadifixProc: Running" << endl;
d = 0;
@@ -92,7 +92,7 @@ HadifixProc::~HadifixProc(){
}
/** Initializate the speech */
-bool HadifixProc::init(KConfig *config, const QString &configGroup){
+bool HadifixProc::init(KConfig *config, const TQString &configGroup){
// kdDebug() << "HadifixProc::init: Initializing plug in: Hadifix" << endl;
if (d == 0)
@@ -110,7 +110,7 @@ bool HadifixProc::init(KConfig *config, const QString &configGroup){
* It must also implement the @ref getState method, which must return
* psFinished, when saying is completed.
*/
-void HadifixProc::sayText(const QString& /*text*/)
+void HadifixProc::sayText(const TQString& /*text*/)
{
kdDebug() << "HadifixProc::sayText: Warning, sayText not implemented." << endl;
return;
@@ -129,7 +129,7 @@ void HadifixProc::sayText(const QString& /*text*/)
* It must also implement the @ref getState method, which must return
* psFinished, when synthesis is completed.
*/
-void HadifixProc::synthText(const QString &text, const QString &suggestedFilename)
+void HadifixProc::synthText(const TQString &text, const TQString &suggestedFilename)
{
if (d == 0) return; // Caller should have called init.
synth(text, d->hadifix, d->gender, d->mbrola, d->voice, d->volume,
@@ -148,12 +148,12 @@ void HadifixProc::synthText(const QString &text, const QString &suggestedFilenam
* @param pitch Frequency. 100 = normal
* @param waveFilename Name of file to synthesize to.
*/
-void HadifixProc::synth(QString text,
- QString hadifix, bool isMale,
- QString mbrola, QString voice,
+void HadifixProc::synth(TQString text,
+ TQString hadifix, bool isMale,
+ TQString mbrola, TQString voice,
int volume, int time, int pitch,
- QTextCodec *codec,
- const QString waveFilename)
+ TQTextCodec *codec,
+ const TQString waveFilename)
{
// kdDebug() << "HadifixProc::synth: Saying text: '" << text << "' using Hadifix plug in" << endl;
if (d == 0)
@@ -176,31 +176,31 @@ void HadifixProc::synth(QString text,
// Set up txt2pho and mbrola commands.
// kdDebug() << "HadifixProc::synth: setting up commands" << endl;
- QString hadifixCommand = d->hadifixProc->quote(hadifix);
+ TQString hadifixCommand = d->hadifixProc->quote(hadifix);
if (isMale)
hadifixCommand += " -m";
else
hadifixCommand += " -f";
- QString mbrolaCommand = d->hadifixProc->quote(mbrola);
+ TQString mbrolaCommand = d->hadifixProc->quote(mbrola);
mbrolaCommand += " -e"; //Ignore fatal errors on unkown diphone
- mbrolaCommand += QString(" -v %1").arg(volume/100.0); // volume ratio
- mbrolaCommand += QString(" -f %1").arg(pitch/100.0); // freqency ratio
- mbrolaCommand += QString(" -t %1").arg(1/(time/100.0)); // time ratio
+ mbrolaCommand += TQString(" -v %1").arg(volume/100.0); // volume ratio
+ mbrolaCommand += TQString(" -f %1").arg(pitch/100.0); // freqency ratio
+ mbrolaCommand += TQString(" -t %1").arg(1/(time/100.0)); // time ratio
mbrolaCommand += " " + d->hadifixProc->quote(voice);
mbrolaCommand += " - " + d->hadifixProc->quote(waveFilename);
// kdDebug() << "HadifixProc::synth: Hadifix command: " << hadifixCommand << endl;
// kdDebug() << "HadifixProc::synth: Mbrola command: " << mbrolaCommand << endl;
- QString command = hadifixCommand + "|" + mbrolaCommand;
+ TQString command = hadifixCommand + "|" + mbrolaCommand;
*(d->hadifixProc) << command;
// Connect signals from process.
- connect(d->hadifixProc, SIGNAL(processExited(KProcess *)),
- this, SLOT(slotProcessExited(KProcess *)));
- connect(d->hadifixProc, SIGNAL(wroteStdin(KProcess *)),
- this, SLOT(slotWroteStdin(KProcess *)));
+ connect(d->hadifixProc, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(slotProcessExited(KProcess *)));
+ connect(d->hadifixProc, TQT_SIGNAL(wroteStdin(KProcess *)),
+ this, TQT_SLOT(slotWroteStdin(KProcess *)));
// Store off name of wave file to be generated.
d->synthFilename = waveFilename;
@@ -211,7 +211,7 @@ void HadifixProc::synth(QString text,
kdDebug() << "HadifixProc::synth: start process failed." << endl;
d->state = psIdle;
} else {
- QCString encodedText;
+ TQCString encodedText;
if (codec) {
encodedText = codec->fromUnicode(text);
// kdDebug() << "HadifixProc::synth: encoding using " << codec->name() << endl;
@@ -231,7 +231,7 @@ void HadifixProc::synth(QString text,
* be locked when this method is called. The file will be deleted when
* KTTSD is finished using it.
*/
-QString HadifixProc::getFilename() { return d->synthFilename; }
+TQString HadifixProc::getFilename() { return d->synthFilename; }
/**
* Stop current operation (saying or synthesizing text).
@@ -285,7 +285,7 @@ void HadifixProc::ackFinished()
if (d->state == psFinished)
{
d->state = psIdle;
- d->synthFilename = QString::null;
+ d->synthFilename = TQString::null;
}
}
@@ -345,27 +345,27 @@ void HadifixProc::slotWroteStdin(KProcess*)
* Static function to determine whether the voice file is male or female.
* @param mbrola the mbrola executable
* @param voice the voice file
-* @param output the output of mbrola will be written into this QString*
+* @param output the output of mbrola will be written into this TQString*
* @return HadifixSpeech::MaleGender if the voice is male,
* HadifixSpeech::FemaleGender if the voice is female,
* HadifixSpeech::NoGender if the gender cannot be determined,
* HadifixSpeech::NoVoice if there is an error in the voice file
*/
-HadifixProc::VoiceGender HadifixProc::determineGender(QString mbrola, QString voice, QString *output)
+HadifixProc::VoiceGender HadifixProc::determineGender(TQString mbrola, TQString voice, TQString *output)
{
- QString command = mbrola + " -i " + voice + " - -";
+ TQString command = mbrola + " -i " + voice + " - -";
// create a new process
HadifixProc speech;
KShellProcess proc;
proc << command;
- connect(&proc, SIGNAL(receivedStdout(KProcess *, char *, int)),
- &speech, SLOT(receivedStdout(KProcess *, char *, int)));
- connect(&proc, SIGNAL(receivedStderr(KProcess *, char *, int)),
- &speech, SLOT(receivedStderr(KProcess *, char *, int)));
+ 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)));
- speech.stdOut = QString::null;
- speech.stdErr = QString::null;
+ speech.stdOut = TQString::null;
+ speech.stdErr = TQString::null;
proc.start (KProcess::Block, KProcess::AllOutput);
VoiceGender result;
@@ -389,11 +389,11 @@ HadifixProc::VoiceGender HadifixProc::determineGender(QString mbrola, QString vo
}
void HadifixProc::receivedStdout (KProcess *, char *buffer, int buflen) {
- stdOut += QString::fromLatin1(buffer, buflen);
+ stdOut += TQString::fromLatin1(buffer, buflen);
}
void HadifixProc::receivedStderr (KProcess *, char *buffer, int buflen) {
- stdErr += QString::fromLatin1(buffer, buflen);
+ stdErr += TQString::fromLatin1(buffer, buflen);
}
/**
@@ -405,7 +405,7 @@ void HadifixProc::receivedStderr (KProcess *, char *buffer, int buflen) {
* tags and converts the file to plain text.
* @return Name of the XSLT file.
*/
-QString HadifixProc::getSsmlXsltFilename()
+TQString HadifixProc::getSsmlXsltFilename()
{
return KGlobal::dirs()->resourceDirs("data").last() + "kttsd/hadifix/xslt/SSMLtoTxt2pho.xsl";
}
diff --git a/kttsd/plugins/hadifix/hadifixproc.h b/kttsd/plugins/hadifix/hadifixproc.h
index 225c7ed..01b7c5d 100644
--- a/kttsd/plugins/hadifix/hadifixproc.h
+++ b/kttsd/plugins/hadifix/hadifixproc.h
@@ -18,7 +18,7 @@
#ifndef _HADIFIXPROC_H_
#define _HADIFIXPROC_H_
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <pluginproc.h>
@@ -37,13 +37,13 @@ class HadifixProc : public PlugInProc{
};
/** Constructor */
- HadifixProc( QObject* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ HadifixProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/** Destructor */
~HadifixProc();
/** Initializate the speech */
- virtual bool init (KConfig *config, const QString &configGroup);
+ virtual bool init (KConfig *config, const TQString &configGroup);
/**
* Say a text. Synthesize and audibilize it.
@@ -54,7 +54,7 @@ class HadifixProc : public PlugInProc{
* It must also implement the @ref getState method, which must return
* psFinished, when saying is completed.
*/
- virtual void sayText(const QString &text);
+ virtual void sayText(const TQString &text);
/**
* Synthesize text into an audio file, but do not send to the audio device.
@@ -69,7 +69,7 @@ class HadifixProc : public PlugInProc{
* It must also implement the @ref getState method, which must return
* psFinished, when synthesis is completed.
*/
- virtual void synthText(const QString &text, const QString &suggestedFilename);
+ virtual void synthText(const TQString &text, const TQString &suggestedFilename);
/**
* Get the generated audio filename from call to @ref synthText.
@@ -80,7 +80,7 @@ class HadifixProc : public PlugInProc{
* be locked when this method is called. The file will be deleted when
* KTTSD is finished using it.
*/
- virtual QString getFilename();
+ virtual TQString getFilename();
/**
* Stop current operation (saying or synthesizing text).
@@ -156,24 +156,24 @@ class HadifixProc : public PlugInProc{
* @param pitch Frequency. 100 = normal
* @param waveFilename Name of file to synthesize to.
*/
- void synth(QString text,
- QString hadifix, bool isMale,
- QString mbrola, QString voice,
+ void synth(TQString text,
+ TQString hadifix, bool isMale,
+ TQString mbrola, TQString voice,
int volume, int time, int pitch,
- QTextCodec* codec,
- const QString waveFilename);
+ TQTextCodec* codec,
+ const TQString waveFilename);
/**
* Static function to determine whether the voice file is male or female.
* @param mbrola the mbrola executable
* @param voice the voice file
- * @param output the output of mbrola will be written into this QString*
+ * @param output the output of mbrola will be written into this TQString*
* @return HadifixSpeech::MaleGender if the voice is male,
* HadifixSpeech::FemaleGender if the voice is female,
* HadifixSpeech::NoGender if the gender cannot be determined,
* HadifixSpeech::NoVoice if there is an error in the voice file
*/
- static VoiceGender determineGender(QString mbrola, QString voice, QString *output = 0);
+ static VoiceGender determineGender(TQString mbrola, TQString voice, TQString *output = 0);
/**
* Returns the name of an XSLT stylesheet that will convert a valid SSML file
@@ -184,7 +184,7 @@ class HadifixProc : public PlugInProc{
* tags and converts the file to plain text.
* @return Name of the XSLT file.
*/
- virtual QString getSsmlXsltFilename();
+ virtual TQString getSsmlXsltFilename();
private slots:
void slotProcessExited(KProcess*);
@@ -196,8 +196,8 @@ class HadifixProc : public PlugInProc{
private:
HadifixProcPrivate *d;
- QString stdOut;
- QString stdErr;
+ TQString stdOut;
+ TQString stdErr;
};
#endif
diff --git a/kttsd/plugins/hadifix/initialconfig.h b/kttsd/plugins/hadifix/initialconfig.h
index 4fac632..02e920c 100644
--- a/kttsd/plugins/hadifix/initialconfig.h
+++ b/kttsd/plugins/hadifix/initialconfig.h
@@ -5,31 +5,31 @@
* installation directories.
*/
void findInitialConfig() {
- QString hadifixDataPath = findHadifixDataPath();
+ TQString hadifixDataPath = findHadifixDataPath();
defaultHadifixExec = findExecutable("txt2pho", hadifixDataPath+"/../");
- QStringList list; list += "mbrola"; list += "mbrola-linux-i386";
+ TQStringList list; list += "mbrola"; list += "mbrola-linux-i386";
defaultMbrolaExec = findExecutable(list, hadifixDataPath+"/../../mbrola/");
defaultVoices = findVoices (defaultMbrolaExec, hadifixDataPath);
}
/** Tries to find the hadifix data path by looking into a number of files. */
-QString findHadifixDataPath () {
- QStringList files;
+TQString findHadifixDataPath () {
+ TQStringList files;
files += "/etc/txt2pho";
- files += QDir::homeDirPath()+"/.txt2phorc";
+ files += TQDir::homeDirPath()+"/.txt2phorc";
- QStringList::iterator it;
+ TQStringList::iterator it;
for (it = files.begin(); it != files.end(); ++it) {
- QFile file(*it);
+ TQFile file(*it);
if ( file.open(IO_ReadOnly) ) {
- QTextStream stream(&file);
+ TQTextStream stream(&file);
while (!stream.atEnd()) {
- QString s = stream.readLine().stripWhiteSpace();
+ TQString s = stream.readLine().stripWhiteSpace();
// look for a line "DATAPATH=..."
if (s.startsWith("DATAPATH")) {
@@ -39,7 +39,7 @@ QString findHadifixDataPath () {
if (s.startsWith("/"))
return s;
else {
- QFileInfo info (QFileInfo(*it).dirPath() + "/" + s);
+ TQFileInfo info (TQFileInfo(*it).dirPath() + "/" + s);
return info.absFilePath();
}
}
@@ -52,81 +52,81 @@ QString findHadifixDataPath () {
}
/** Tries to find the an executable by looking onto the hard disk. */
-QString findExecutable (const QStringList &names, const QString &possiblePath) {
+TQString findExecutable (const TQStringList &names, const TQString &possiblePath) {
// a) Try to find it directly
- QStringList::ConstIterator it;
- QStringList::ConstIterator itEnd = names.constEnd();
+ TQStringList::ConstIterator it;
+ TQStringList::ConstIterator itEnd = names.constEnd();
for (it = names.constBegin(); it != itEnd; ++it) {
- QString executable = KStandardDirs::findExe (*it);
+ TQString executable = KStandardDirs::findExe (*it);
if (!executable.isNull() && !executable.isEmpty())
return executable;
}
// b) Try to find it in the path specified by the second parameter
for (it = names.constBegin(); it != itEnd; ++it) {
- QFileInfo info (possiblePath+*it);
+ TQFileInfo info (possiblePath+*it);
if (info.exists() && info.isExecutable() && info.isFile()) {
return info.absFilePath();
}
}
// Both tries failed, so the user has to locate the executable.
- return QString::null;
+ return TQString::null;
}
/** Tries to find the voice files by looking onto the hard disk. */
-QStringList findVoices(QString mbrolaExec, const QString &hadifixDataPath) {
+TQStringList findVoices(TQString mbrolaExec, const TQString &hadifixDataPath) {
// First of all:
// dereference links to the mbrola executable (if mbrolaExec is a link).
for (int i = 0; i < 10; ++i) {
// If we have a chain of more than ten links something is surely wrong.
- QFileInfo info (mbrolaExec);
+ TQFileInfo info (mbrolaExec);
if (info.exists() && info.isSymLink())
mbrolaExec = info.readLink();
}
// Second:
// create a list of directories that possibly contain voice files
- QStringList list;
+ TQStringList list;
// 2a) search near the mbrola executable
- QFileInfo info (mbrolaExec);
+ TQFileInfo info (mbrolaExec);
if (info.exists() && info.isFile() && info.isExecutable()) {
- QString mbrolaPath = info.dirPath (true);
+ TQString mbrolaPath = info.dirPath (true);
list += mbrolaPath;
}
// 2b) search near the hadifix data path
info.setFile(hadifixDataPath + "../../mbrola");
- QString mbrolaPath = info.dirPath (true) + "/mbrola";
+ TQString mbrolaPath = info.dirPath (true) + "/mbrola";
if (!list.contains(mbrolaPath))
list += mbrolaPath;
// 2c) broaden the search by adding subdirs (with a depth of 2)
- QStringList subDirs = findSubdirs (list);
- QStringList subSubDirs = findSubdirs (subDirs);
+ TQStringList subDirs = findSubdirs (list);
+ TQStringList subSubDirs = findSubdirs (subDirs);
list += subDirs;
list += subSubDirs;
// Third:
// look into each of these directories and search for voice files.
- QStringList result;
- QStringList::iterator it;
+ TQStringList result;
+ TQStringList::iterator it;
for (it = list.begin(); it != list.end(); ++it) {
- QDir baseDir (*it, QString::null,
- QDir::Name|QDir::IgnoreCase, QDir::Files);
- QStringList files = baseDir.entryList();
+ TQDir baseDir (*it, TQString::null,
+ TQDir::Name|TQDir::IgnoreCase, TQDir::Files);
+ TQStringList files = baseDir.entryList();
- QStringList::iterator iter;
+ TQStringList::iterator iter;
for (iter = files.begin(); iter != files.end(); ++iter) {
// Voice files start with "MBROLA", but are afterwards binary files
- QString filename = *it + "/" + *iter;
- QFile file (filename);
+ TQString filename = *it + "/" + *iter;
+ TQFile file (filename);
if (file.open(IO_ReadOnly)) {
- QTextStream stream(&file);
+ TQTextStream stream(&file);
if (!stream.atEnd()) {
- QString s = stream.readLine();
+ TQString s = stream.readLine();
if (s.startsWith("MBROLA"))
if (HadifixProc::determineGender(mbrolaExec, filename)
!= HadifixProc::NoVoice
@@ -141,20 +141,20 @@ QStringList findVoices(QString mbrolaExec, const QString &hadifixDataPath) {
}
/** Returns a list of subdirs (with absolute paths) */
-QStringList findSubdirs (const QStringList &baseDirs) {
- QStringList result;
+TQStringList findSubdirs (const TQStringList &baseDirs) {
+ TQStringList result;
- QStringList::ConstIterator it;
- QStringList::ConstIterator itEnd = baseDirs.constEnd();
+ TQStringList::ConstIterator it;
+ TQStringList::ConstIterator itEnd = baseDirs.constEnd();
for (it = baseDirs.constBegin(); it != itEnd; ++it) {
// a) get a list of directory names
- QDir baseDir (*it, QString::null,
- QDir::Name|QDir::IgnoreCase, QDir::Dirs);
- QStringList list = baseDir.entryList();
+ TQDir baseDir (*it, TQString::null,
+ TQDir::Name|TQDir::IgnoreCase, TQDir::Dirs);
+ TQStringList list = baseDir.entryList();
// b) produce absolute paths
- QStringList::ConstIterator iter;
- QStringList::ConstIterator iterEnd = list.constEnd();
+ TQStringList::ConstIterator iter;
+ TQStringList::ConstIterator iterEnd = list.constEnd();
for (iter = list.constBegin(); iter != iterEnd; ++iter) {
if ((*iter != ".") && (*iter != ".."))
result += *it + "/" + *iter;
diff --git a/kttsd/plugins/hadifix/voicefileui.ui.h b/kttsd/plugins/hadifix/voicefileui.ui.h
index 9d37375..16e65e5 100644
--- a/kttsd/plugins/hadifix/voicefileui.ui.h
+++ b/kttsd/plugins/hadifix/voicefileui.ui.h
@@ -11,7 +11,7 @@
void VoiceFileWidget::genderButton_clicked()
{
HadifixProc::VoiceGender gender;
- QString details;
+ TQString details;
gender = HadifixProc::determineGender(mbrola, voiceFileURL->url(), &details);
if (gender == HadifixProc::MaleGender) {