summaryrefslogtreecommitdiffstats
path: root/kttsd/libkttsd
diff options
context:
space:
mode:
Diffstat (limited to 'kttsd/libkttsd')
-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
21 files changed, 435 insertions, 435 deletions
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);
};