diff options
Diffstat (limited to 'kttsd')
126 files changed, 1291 insertions, 1253 deletions
diff --git a/kttsd/app-plugins/kate/katekttsd.cpp b/kttsd/app-plugins/kate/katekttsd.cpp index 47837fb..65017b7 100644 --- a/kttsd/app-plugins/kate/katekttsd.cpp +++ b/kttsd/app-plugins/kate/katekttsd.cpp @@ -17,7 +17,7 @@ * * ***************************************************************************/ -// Qt includes. +// TQt includes. #include <tqmessagebox.h> #include <dcopclient.h> #include <tqtimer.h> @@ -38,8 +38,8 @@ K_EXPORT_COMPONENT_FACTORY( ktexteditor_kttsd, KGenericFactory<KateKttsdPlugin>( "ktexteditor_kttsd" ) ) -KateKttsdPlugin::KateKttsdPlugin( TQObject *parent, const char* name, const TQStringList& ) - : KTextEditor::Plugin ( (KTextEditor::Document*) parent, name ) +KateKttsdPlugin::KateKttsdPlugin( TQObject *tqparent, const char* name, const TQStringList& ) + : KTextEditor::Plugin ( (KTextEditor::Document*) tqparent, name ) { } @@ -80,7 +80,7 @@ KateKttsdPluginView::KateKttsdPluginView( KTextEditor::View *view, const char *n void KateKttsdPluginView::slotReadOut() { - KTextEditor::View *v = (KTextEditor::View*)parent(); + KTextEditor::View *v = (KTextEditor::View*)tqparent(); KTextEditor::SelectionInterface *si = KTextEditor::selectionInterface( v->document() ); TQString text; diff --git a/kttsd/app-plugins/kate/katekttsd.h b/kttsd/app-plugins/kate/katekttsd.h index c30f3cf..cfcc750 100644 --- a/kttsd/app-plugins/kate/katekttsd.h +++ b/kttsd/app-plugins/kate/katekttsd.h @@ -28,9 +28,10 @@ class KateKttsdPlugin : public KTextEditor::Plugin, public KTextEditor::PluginViewInterface { Q_OBJECT + TQ_OBJECT public: - KateKttsdPlugin( TQObject *parent = 0, + KateKttsdPlugin( TQObject *tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList() ); virtual ~KateKttsdPlugin(); @@ -45,6 +46,7 @@ class KateKttsdPlugin : public KTextEditor::Plugin, public KTextEditor::PluginVi class KateKttsdPluginView : public TQObject, public KXMLGUIClient { Q_OBJECT + TQ_OBJECT public: KateKttsdPluginView( KTextEditor::View *view, const char *name=0 ); diff --git a/kttsd/compat/interfaces/kspeech/kspeech.h b/kttsd/compat/interfaces/kspeech/kspeech.h index d321528..39ca74c 100644 --- a/kttsd/compat/interfaces/kspeech/kspeech.h +++ b/kttsd/compat/interfaces/kspeech/kspeech.h @@ -207,8 +207,8 @@ * "kttsd", object "KSpeech". * @verbatim - MyPart::MyPart(TQWidget *parent, const char *name) : - KParts::ReadOnlyPart(parent, name), + MyPart::MyPart(TQWidget *tqparent, const char *name) : + KParts::ReadOnlyPart(tqparent, name), DCOPStub("kttsd", "KSpeech") { @endverbatim * @@ -293,8 +293,8 @@ * receiving object. * @verbatim - MyPart::MyPart(TQWidget *parent, const char *name) : - KParts::ReadOnlyPart(parent, name), + MyPart::MyPart(TQWidget *tqparent, const char *name) : + KParts::ReadOnlyPart(tqparent, name), DCOPObject("mypart_kspeechsink") { @endverbatim * @@ -441,7 +441,7 @@ * a Spanish synthesizer would likely be unintelligible). So the language * attribute is said to have "priority". * If an application does not specify a language attribute, a default one will be assumed. - * The rest of the attributes are said to be "preferred". If %KTTSD cannot find + * The rest of the attributes are said to be "preferred". If %KTTSD cannot tqfind * a talker with the exact preferred attributes requested, the closest matching * talker will likely still be understandable. * @@ -751,11 +751,11 @@ class KSpeech : virtual public DCOPObject { * with a single space, and then replaces the sentence delimiters using * the following statement: @verbatim - TQString::replace(sentenceDelimiter, "\\1\t"); + TQString::tqreplace(sentenceDelimiter, "\\1\t"); @endverbatim * * which replaces all sentence delimiters with a tab, but - * preserving the first capture text (first parenthesis). In other + * preserving the first capture text (first tqparenthesis). In other * words, the sentence punctuation is preserved. * The tab is later used to separate the text into sentences. * diff --git a/kttsd/configure.in.in b/kttsd/configure.in.in index 4adcfb1..b833cfc 100644 --- a/kttsd/configure.in.in +++ b/kttsd/configure.in.in @@ -280,16 +280,7 @@ kdeversion_save_LIBS="$LIBS" LIBS="$LIBS $X_EXTRA_LIBS" CXXFLAGS="$CXXFLAGS $all_includes" -AC_COMPILE_IFELSE([ -#include <kdeversion.h> -#if ! ( KDE_IS_VERSION( 3, 4, 90 ) ) -#error KDE 3.4 -#endif -], - KTTS_ICONS_DIR="" -, - KTTS_ICONS_DIR="icons" -) +KTTS_ICONS_DIR="icons" CXXFLAGS="$kdeversion_save_CXXFLAGS" LIBS="$kdeversion_save_LIBS" diff --git a/kttsd/debian/man/kttsd.1 b/kttsd/debian/man/kttsd.1 index 379d7f0..4b8743b 100644 --- a/kttsd/debian/man/kttsd.1 +++ b/kttsd/debian/man/kttsd.1 @@ -62,8 +62,8 @@ Waits for a WM_NET compatible windowmanager .B --style <style> sets the application GUI style .TP -.B --geometry <geometry> -sets the client geometry of the main widget +.B --tqgeometry <tqgeometry> +sets the client tqgeometry of the main widget .TP .B --nofork Don't run in the background. @@ -131,7 +131,7 @@ set XIM server disable XIM .TP .B --reverse -mirrors the whole layout of widgets +mirrors the whole tqlayout of widgets .SS .SH SEE ALSO diff --git a/kttsd/debian/man/kttsmgr.1 b/kttsd/debian/man/kttsmgr.1 index 547ff14..c01468f 100644 --- a/kttsd/debian/man/kttsmgr.1 +++ b/kttsd/debian/man/kttsmgr.1 @@ -61,8 +61,8 @@ Waits for a WM_NET compatible windowmanager .B --style <style> sets the application GUI style .TP -.B --geometry <geometry> -sets the client geometry of the main widget +.B --tqgeometry <tqgeometry> +sets the client tqgeometry of the main widget .TP .B --nofork Don't run in the background. @@ -130,7 +130,7 @@ set XIM server disable XIM .TP .B --reverse -mirrors the whole layout of widgets +mirrors the whole tqlayout of widgets .SS .SH SEE ALSO diff --git a/kttsd/filters/main.cpp b/kttsd/filters/main.cpp index f33d771..015bed0 100644 --- a/kttsd/filters/main.cpp +++ b/kttsd/filters/main.cpp @@ -123,9 +123,9 @@ int main(int argc, char *argv[]) TalkerCode* talkerCode = new TalkerCode( talker ); text = plugIn->convert( text, talkerCode, appId ); if ( args->isSet("break") ) - text.replace( "\t", "\\t" ); + text.tqreplace( "\t", "\\t" ); else - text.replace( "\t", "" ); + text.tqreplace( "\t", "" ); cout << text.latin1() << endl; delete config; delete plugIn; diff --git a/kttsd/filters/sbd/sbdconf.cpp b/kttsd/filters/sbd/sbdconf.cpp index 5244974..6beaba3 100644 --- a/kttsd/filters/sbd/sbdconf.cpp +++ b/kttsd/filters/sbd/sbdconf.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -// Qt includes. +// TQt includes. #include <tqfile.h> #include <tqfileinfo.h> #include <tqstring.h> @@ -56,17 +56,17 @@ /** * Constructor */ -SbdConf::SbdConf( TQWidget *parent, const char *name, const TQStringList& /*args*/) : - KttsFilterConf(parent, name) +SbdConf::SbdConf( TQWidget *tqparent, const char *name, const TQStringList& /*args*/) : + KttsFilterConf(tqparent, name) { // kdDebug() << "SbdConf::SbdConf: Running" << endl; // Create configuration widget. - TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "SbdConfigWidgetLayout"); - layout->setAlignment (Qt::AlignTop); + tqlayout->tqsetAlignment (TQt::AlignTop); m_widget = new SbdConfWidget(this, "SbdConfigWidget"); - layout->addWidget(m_widget); + tqlayout->addWidget(m_widget); // Determine if kdeutils Regular Expression Editor is installed. m_reEditorInstalled = !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty(); @@ -156,7 +156,7 @@ void SbdConf::save(KConfig* config, const TQString& configGroup){ config->writeEntry("SentenceDelimiterRegExp", m_widget->reLineEdit->text() ); config->writeEntry("SentenceBoundary", m_widget->sbLineEdit->text() ); config->writeEntry("LanguageCodes", m_languageCodeList ); - config->writeEntry("AppID", m_widget->appIdLineEdit->text().replace(" ", "") ); + config->writeEntry("AppID", m_widget->appIdLineEdit->text().tqreplace(" ", "") ); } /** @@ -195,7 +195,7 @@ bool SbdConf::supportsMultiInstance() { return true; } TQString SbdConf::userPlugInName() { if ( m_widget->reLineEdit->text().isEmpty() ) - return TQString::null; + return TQString(); else return m_widget->nameLineEdit->text(); } @@ -257,7 +257,7 @@ void SbdConf::slotLanguageBrowseButton_clicked() if (!countryCode.isEmpty()) language += " (" + KGlobal::locale()->twoAlphaToCountryName(countryCode)+")"; TQListViewItem* item = new KListViewItem(langLView, language, locale); - if (m_languageCodeList.contains(locale)) item->setSelected(true); + if (m_languageCodeList.tqcontains(locale)) item->setSelected(true); } // Sort by language. langLView->setSorting(0); @@ -276,7 +276,7 @@ void SbdConf::slotLanguageBrowseButton_clicked() dlg->setHelp("", "kttsd"); dlg->setInitialSize(TQSize(300, 500), false); int dlgResult = dlg->exec(); - languageCode = TQString::null; + languageCode = TQString(); if (dlgResult == TQDialog::Accepted) { m_languageCodeList.clear(); @@ -288,7 +288,7 @@ void SbdConf::slotLanguageBrowseButton_clicked() } } delete dlg; - // TODO: Also delete KListView and QHBox? + // TODO: Also delete KListView and TQHBox? if (dlgResult != TQDialog::Accepted) return; language = ""; for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx) @@ -331,11 +331,11 @@ void SbdConf::slotSaveButton_clicked() void SbdConf::slotClearButton_clicked() { - m_widget->nameLineEdit->setText( TQString::null ); - m_widget->reLineEdit->setText( TQString::null ); - m_widget->sbLineEdit->setText( TQString::null ); + m_widget->nameLineEdit->setText( TQString() ); + m_widget->reLineEdit->setText( TQString() ); + m_widget->sbLineEdit->setText( TQString() ); m_languageCodeList.clear(); - m_widget->languageLineEdit->setText( TQString::null ); - m_widget->appIdLineEdit->setText( TQString::null ); + m_widget->languageLineEdit->setText( TQString() ); + m_widget->appIdLineEdit->setText( TQString() ); configChanged(); } diff --git a/kttsd/filters/sbd/sbdconf.h b/kttsd/filters/sbd/sbdconf.h index eb1b817..f2610c4 100644 --- a/kttsd/filters/sbd/sbdconf.h +++ b/kttsd/filters/sbd/sbdconf.h @@ -24,7 +24,7 @@ #ifndef _SBDCONF_H_ #define _SBDCONF_H_ -// Qt includes. +// TQt includes. #include <tqwidget.h> // KDE includes. @@ -43,12 +43,13 @@ class EditReplacementWidget; class SbdConf : public KttsFilterConf { Q_OBJECT + TQ_OBJECT public: /** * Constructor */ - SbdConf( TQWidget *parent, const char *name, const TQStringList &args = TQStringList() ); + SbdConf( TQWidget *tqparent, const char *name, const TQStringList &args = TQStringList() ); /** * Destructor diff --git a/kttsd/filters/sbd/sbdconfwidget.ui b/kttsd/filters/sbd/sbdconfwidget.ui index 17cd525..c094a52 100644 --- a/kttsd/filters/sbd/sbdconfwidget.ui +++ b/kttsd/filters/sbd/sbdconfwidget.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>SbdConfWidget</class> <author>Gary Cramblitt <garycramblitt@comcast.net></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>SbdConfWidget</cstring> </property> @@ -25,7 +25,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -33,22 +33,22 @@ <string><b>WARNING: This filter is a key component of the KTTS system. Please read the KTTS Handbook before modifying these settings.</b></string> </property> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>nameLabel</cstring> </property> <property name="text"> <string>&Name:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -72,22 +72,22 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>layout17</cstring> + <cstring>tqlayout17</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>reLabel</cstring> </property> <property name="text"> <string>&Sentence boundary regular expression:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -116,22 +116,22 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="3" column="0"> + <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> - <cstring>layout17_2</cstring> + <cstring>tqlayout17_2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>sbLabel</cstring> </property> <property name="text"> <string>&Replacement sentence boundary:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -152,7 +152,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox" row="4" column="0"> + <widget class="TQGroupBox" row="4" column="0"> <property name="name"> <cstring>applyGroupBox</cstring> </property> @@ -166,22 +166,22 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>languageLabel</cstring> </property> <property name="text"> <string>&Language is:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -192,14 +192,14 @@ <comment>What's this text</comment> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>appIdLabel</cstring> </property> <property name="text"> - <string>Application &ID contains:</string> + <string>Application &ID tqcontains:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -211,17 +211,17 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <hbox> <property name="name"> @@ -263,9 +263,9 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget" row="5" column="0"> + <widget class="TQLayoutWidget" row="5" column="0"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -347,7 +347,7 @@ <tabstop>languageBrowseButton</tabstop> <tabstop>appIdLineEdit</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kttsd/filters/sbd/sbdproc.cpp b/kttsd/filters/sbd/sbdproc.cpp index 6117b11..6b0a1a4 100644 --- a/kttsd/filters/sbd/sbdproc.cpp +++ b/kttsd/filters/sbd/sbdproc.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -// Qt includes. +// TQt includes. #include <tqregexp.h> #include <tqdom.h> #include <tqapplication.h> @@ -41,8 +41,8 @@ /** * Constructor. */ -SbdThread::SbdThread( TQObject *parent, const char *name ) : - TQObject( parent, name ), +SbdThread::SbdThread( TQObject *tqparent, const char *name ) : + TQObject( tqparent, name ), TQThread() { } @@ -175,7 +175,7 @@ void SbdThread::pushSsmlElem( SsmlElemType et, const TQDomElement& elem ) // i.e., name="value". TQString SbdThread::makeAttr( const TQString& name, const TQString& value ) { - if ( value.isEmpty() ) return TQString::null; + if ( value.isEmpty() ) return TQString(); return " " + name + "=\"" + value + "\""; } @@ -277,8 +277,8 @@ TQString SbdThread::makeSentence( const TQString& text ) if ( !e.isEmpty() ) s += e; // Escape ampersands and less thans. TQString newText = text; - newText.replace(TQRegExp("&(?!amp;)"), "&"); - newText.replace(TQRegExp("<(?!lt;)"), "<"); + newText.tqreplace(TQRegExp("&(?!amp;)"), "&"); + newText.tqreplace(TQRegExp("<(?!lt;)"), "<"); s += newText; if ( !e.isEmpty() ) s += "</emphasis>"; if ( !p.isEmpty() ) s += "</prosody>"; @@ -289,7 +289,7 @@ TQString SbdThread::makeSentence( const TQString& text ) // Starts a sentence by returning a speak tag. TQString SbdThread::startSentence() { - if ( m_sentenceStarted ) return TQString::null; + if ( m_sentenceStarted ) return TQString(); TQString s; s += makeSsmlElem( etSpeak ); m_sentenceStarted = true; @@ -299,14 +299,14 @@ TQString SbdThread::startSentence() // Ends a sentence and appends a Tab. TQString SbdThread::endSentence() { - if ( !m_sentenceStarted ) return TQString::null; + if ( !m_sentenceStarted ) return TQString(); TQString s = "</speak>"; s += "\t"; m_sentenceStarted = false; return s; } -// Parses a node of the SSML tree and recursively parses its children. +// Parses a node of the SSML tree and recursively parses its tqchildren. // Returns the filtered text with each sentence a complete ssml tree. TQString SbdThread::parseSsmlNode( TQDomNode& n, const TQString& re ) { @@ -351,7 +351,7 @@ TQString SbdThread::parseSsmlNode( TQDomNode& n, const TQString& re ) case TQDomNode::TextNode: { // = 3 TQString s = parsePlainText( n.toText().data(), re ); // TQString d = s; - // d.replace("\t", "\\t"); + // d.tqreplace("\t", "\\t"); // kdDebug() << "SbdThread::parseSsmlNode: parsedPlainText = [" << d << "]" << endl; TQStringList sentenceList = TQStringList::split( '\t', s, false ); int lastNdx = sentenceList.count() - 1; @@ -441,7 +441,7 @@ TQString SbdThread::parseSsml( const TQString& inputText, const TQString& re ) // This flag is used to close out a previous sentence. m_sentenceStarted = false; - // Get the root element (speak) and recursively process its children. + // Get the root element (speak) and recursively process its tqchildren. TQDomElement docElem = doc.documentElement(); TQDomNode n = docElem.firstChild(); TQString ssml = parseSsmlNode( docElem, re ); @@ -457,13 +457,13 @@ TQString SbdThread::parseCode( const TQString& inputText ) { TQString temp = inputText; // Replace newlines with tabs. - temp.replace("\n","\t"); + temp.tqreplace("\n","\t"); // Remove leading spaces. - temp.replace(TQRegExp("\\t +"), "\t"); + temp.tqreplace(TQRegExp("\\t +"), "\t"); // Remove trailing spaces. - temp.replace(TQRegExp(" +\\t"), "\t"); + temp.tqreplace(TQRegExp(" +\\t"), "\t"); // Remove blank lines. - temp.replace(TQRegExp("\t\t+"),"\t"); + temp.tqreplace(TQRegExp("\t\t+"),"\t"); return temp; } @@ -474,16 +474,16 @@ TQString SbdThread::parsePlainText( const TQString& inputText, const TQString& r TQRegExp sentenceDelimiter = TQRegExp( re ); TQString temp = inputText; // Replace sentence delimiters with tab. - temp.replace(sentenceDelimiter, m_configuredSentenceBoundary); + temp.tqreplace(sentenceDelimiter, m_configuredSentenceBoundary); // Replace remaining newlines with spaces. - temp.replace("\n"," "); - temp.replace("\r"," "); + temp.tqreplace("\n"," "); + temp.tqreplace("\r"," "); // Remove leading spaces. - temp.replace(TQRegExp("\\t +"), "\t"); + temp.tqreplace(TQRegExp("\\t +"), "\t"); // Remove trailing spaces. - temp.replace(TQRegExp(" +\\t"), "\t"); + temp.tqreplace(TQRegExp(" +\\t"), "\t"); // Remove blank lines. - temp.replace(TQRegExp("\t\t+"),"\t"); + temp.tqreplace(TQRegExp("\t\t+"),"\t"); return temp; } @@ -503,7 +503,7 @@ TQString SbdThread::parsePlainText( const TQString& inputText, const TQString& r { // Examine just the first 500 chars to see if it is code. TQString p = m_text.left( 500 ); - if ( p.contains( TQRegExp( "(/\\*)|(if\\b\\()|(^#include\\b)" ) ) ) + if ( p.tqcontains( TQRegExp( "(/\\*)|(if\\b\\()|(^#include\\b)" ) ) ) textType = ttCode; else textType = ttPlain; @@ -515,7 +515,7 @@ TQString SbdThread::parsePlainText( const TQString& inputText, const TQString& r if ( re.isEmpty() ) re = m_configuredRe; // Replace spaces, tabs, and formfeeds with a single space. - m_text.replace(TQRegExp("[ \\t\\f]+"), " "); + m_text.tqreplace(TQRegExp("[ \\t\\f]+"), " "); // Perform the filtering based on type of text. switch ( textType ) @@ -534,7 +534,7 @@ TQString SbdThread::parsePlainText( const TQString& inputText, const TQString& r } // Clear app-specified sentence delimiter. App must call setSbRegExp for each conversion. - m_re = TQString::null; + m_re = TQString(); // kdDebug() << "SbdThread::run: filtered text = " << m_text << endl; @@ -562,11 +562,11 @@ bool SbdThread::event ( TQEvent * e ) /** * Constructor. */ -SbdProc::SbdProc( TQObject *parent, const char *name, const TQStringList& /*args*/) : - KttsFilterProc(parent, name) +SbdProc::SbdProc( TQObject *tqparent, const char *name, const TQStringList& /*args*/) : + KttsFilterProc(tqparent, name) { // kdDebug() << "SbdProc::SbdProc: Running" << endl; - m_sbdThread = new SbdThread( parent, *name + "_thread" ); + m_sbdThread = new SbdThread( tqparent, *name + "_thread" ); connect( m_sbdThread, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotSbdThreadFilteringFinished()) ); } @@ -603,7 +603,7 @@ bool SbdProc::init(KConfig* config, const TQString& configGroup){ m_configuredRe = config->readEntry( "SentenceDelimiterRegExp", "([\\.\\?\\!\\:\\;])(\\s|$|(\\n *\\n))" ); m_sbdThread->setConfiguredSbRegExp( m_configuredRe ); TQString sb = config->readEntry( "SentenceBoundary", "\\1\t" ); - sb.replace( "\\t", "\t" ); + sb.tqreplace( "\\t", "\t" ); m_sbdThread->setConfiguredSentenceBoundary( sb ); m_appIdList = config->readListEntry( "AppID" ); m_languageCodeList = config->readListEntry( "LanguageCodes" ); @@ -672,14 +672,14 @@ bool SbdProc::init(KConfig* config, const TQString& configGroup){ TQString languageCode = talkerCode->languageCode(); // kdDebug() << "StringReplacerProc::convert: converting " << inputText << // " if language code " << languageCode << " matches " << m_languageCodeList << endl; - if ( !m_languageCodeList.contains( languageCode ) ) + if ( !m_languageCodeList.tqcontains( languageCode ) ) { if ( !talkerCode->countryCode().isEmpty() ) { languageCode += '_' + talkerCode->countryCode(); // kdDebug() << "StringReplacerProc::convert: converting " << inputText << // " if language code " << languageCode << " matches " << m_languageCodeList << endl; - if ( !m_languageCodeList.contains( languageCode ) ) return false; + if ( !m_languageCodeList.tqcontains( languageCode ) ) return false; } else return false; } } @@ -692,7 +692,7 @@ bool SbdProc::init(KConfig* config, const TQString& configGroup){ TQString appIdStr = appId; for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx ) { - if ( appIdStr.contains(m_appIdList[ndx]) ) + if ( appIdStr.tqcontains(m_appIdList[ndx]) ) { found = true; break; @@ -737,7 +737,7 @@ bool SbdProc::init(KConfig* config, const TQString& configGroup){ /*virtual*/ void SbdProc::ackFinished() { m_state = fsIdle; - m_sbdThread->setText( TQString::null ); + m_sbdThread->setText( TQString() ); } /** diff --git a/kttsd/filters/sbd/sbdproc.h b/kttsd/filters/sbd/sbdproc.h index 4592c29..49f7b09 100644 --- a/kttsd/filters/sbd/sbdproc.h +++ b/kttsd/filters/sbd/sbdproc.h @@ -45,7 +45,7 @@ #ifndef _SBDPROC_H_ #define _SBDPROC_H_ -// Qt includes. +// TQt includes. #include <tqobject.h> #include <tqstringlist.h> #include <tqthread.h> @@ -60,15 +60,16 @@ class KConfig; class TQDomElement; class TQDomNode; -class SbdThread: public TQObject, public QThread +class SbdThread: public TQObject, public TQThread { Q_OBJECT + TQ_OBJECT public: /** * Constructor. */ - SbdThread( TQObject *parent = 0, const char *name = 0); + SbdThread( TQObject *tqparent = 0, const char *name = 0); /** * Destructor. @@ -203,7 +204,7 @@ class SbdThread: public TQObject, public QThread TQString startSentence(); // Ends a sentence and appends a Tab. TQString endSentence(); - // Parses a node of the SSML tree and recursively parses its children. + // Parses a node of the SSML tree and recursively parses its tqchildren. // Returns the filtered text with each sentence a complete ssml tree. TQString parseSsmlNode( TQDomNode& n, const TQString& re ); @@ -240,12 +241,13 @@ class SbdThread: public TQObject, public QThread class SbdProc : virtual public KttsFilterProc { Q_OBJECT + TQ_OBJECT public: /** * Constructor. */ - SbdProc( TQObject *parent, const char *name, const TQStringList &args = TQStringList() ); + SbdProc( TQObject *tqparent, const char *name, const TQStringList &args = TQStringList() ); /** * Destructor. diff --git a/kttsd/filters/stringreplacer/editreplacementwidget.ui b/kttsd/filters/stringreplacer/editreplacementwidget.ui index 917cdf8..6046580 100644 --- a/kttsd/filters/stringreplacer/editreplacementwidget.ui +++ b/kttsd/filters/stringreplacer/editreplacementwidget.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>EditReplacementWidget</class> <author>Gary Cramblitt <garycramblitt@comcast.net></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>EditReplacementWidget</cstring> </property> @@ -21,7 +21,7 @@ <verstretch>255</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -31,15 +31,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>typeButtonGroup</cstring> </property> @@ -61,15 +61,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>wordRadioButton</cstring> </property> @@ -88,7 +88,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>regexpRadioButton</cstring> </property> @@ -108,7 +108,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>caseCheckBox</cstring> </property> @@ -126,23 +126,23 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>substLabel</cstring> </property> @@ -157,14 +157,14 @@ <property name="text"> <string>&Replace with:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> <cstring>matchLineEdit</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>matchLabel</cstring> </property> @@ -179,7 +179,7 @@ <property name="text"> <string>&Match:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -188,9 +188,9 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <grid> <property name="name"> @@ -254,7 +254,7 @@ <tabstop>matchButton</tabstop> <tabstop>substLineEdit</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kttsd/filters/stringreplacer/stringreplacerconf.cpp b/kttsd/filters/stringreplacer/stringreplacerconf.cpp index 72f50d8..8bce00d 100644 --- a/kttsd/filters/stringreplacer/stringreplacerconf.cpp +++ b/kttsd/filters/stringreplacer/stringreplacerconf.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -// Qt includes. +// TQt includes. #include <tqfile.h> #include <tqfileinfo.h> #include <tqstring.h> @@ -59,19 +59,19 @@ /** * Constructor */ -StringReplacerConf::StringReplacerConf( TQWidget *parent, const char *name, const TQStringList& /*args*/) : - KttsFilterConf(parent, name), +StringReplacerConf::StringReplacerConf( TQWidget *tqparent, const char *name, const TQStringList& /*args*/) : + KttsFilterConf(tqparent, name), m_editDlg(0), m_editWidget(0) { // kdDebug() << "StringReplacerConf::StringReplacerConf: Running" << endl; // Create configuration widget. - TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "StringReplacerConfigWidgetLayout"); - layout->setAlignment (Qt::AlignTop); + tqlayout->tqsetAlignment (TQt::AlignTop); m_widget = new StringReplacerConfWidget(this, "StringReplacerConfigWidget"); - layout->addWidget(m_widget); + tqlayout->addWidget(m_widget); m_widget->substLView->setSortColumn(-1); connect(m_widget->nameLineEdit, TQT_SIGNAL(textChanged(const TQString&)), @@ -244,7 +244,7 @@ TQString StringReplacerConf::loadFromFile( const TQString& filename, bool clear) item = new KListViewItem(m_widget->substLView, item, wordTypeStr, matchCaseStr, match, subst); } - return TQString::null; + return TQString(); } /** @@ -308,7 +308,7 @@ TQString StringReplacerConf::saveToFile(const TQString& filename) } // Application ID - TQString appId = m_widget->appIdLineEdit->text().replace(" ", ""); + TQString appId = m_widget->appIdLineEdit->text().tqreplace(" ", ""); if ( !appId.isEmpty() ) { TQStringList appIdList = TQStringList::split(",", appId); @@ -359,7 +359,7 @@ TQString StringReplacerConf::saveToFile(const TQString& filename) // kdDebug() << "StringReplacerConf::saveToFile: writing out " << doc.toString() << endl; file.close(); - return TQString::null; + return TQString(); } /** @@ -400,7 +400,7 @@ bool StringReplacerConf::supportsMultiInstance() { return true; } */ TQString StringReplacerConf::userPlugInName() { - if ( m_widget->substLView->childCount() == 0 ) return TQString::null; + if ( m_widget->substLView->childCount() == 0 ) return TQString(); TQString instName = m_widget->nameLineEdit->text(); if ( instName.isEmpty() ) { @@ -442,7 +442,7 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked() if (!countryCode.isEmpty()) language += " (" + KGlobal::locale()->twoAlphaToCountryName(countryCode)+")"; item = new KListViewItem(langLView, language, locale); - if (m_languageCodeList.contains(locale)) item->setSelected(true); + if (m_languageCodeList.tqcontains(locale)) item->setSelected(true); } // Sort by language. langLView->setSorting(0); @@ -461,7 +461,7 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked() dlg->setHelp("", "kttsd"); dlg->setInitialSize(TQSize(300, 500), false); int dlgResult = dlg->exec(); - languageCode = TQString::null; + languageCode = TQString(); if (dlgResult == TQDialog::Accepted) { m_languageCodeList.clear(); @@ -473,7 +473,7 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked() } } delete dlg; - // TODO: Also delete KListView and QHBox? + // TODO: Also delete KListView and TQHBox? if (dlgResult != TQDialog::Accepted) return; language = ""; for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx) @@ -488,11 +488,11 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked() if (m_languageCodeList.count() > 1) language = i18n("Multiple Languages"); if ( !s1.isEmpty() ) { - s2.replace( s1, language ); - s2.replace( i18n("Multiple Languages"), language ); + s2.tqreplace( s1, language ); + s2.tqreplace( i18n("Multiple Languages"), language ); } - s2.replace(" ()", ""); - if ( !s2.contains("(") && !language.isEmpty() ) s2 += " (" + language + ")"; + s2.tqreplace(" ()", ""); + if ( !s2.tqcontains("(") && !language.isEmpty() ) s2 += " (" + language + ")"; m_widget->nameLineEdit->setText(s2); configChanged(); } diff --git a/kttsd/filters/stringreplacer/stringreplacerconf.h b/kttsd/filters/stringreplacer/stringreplacerconf.h index 1606390..4de870c 100644 --- a/kttsd/filters/stringreplacer/stringreplacerconf.h +++ b/kttsd/filters/stringreplacer/stringreplacerconf.h @@ -24,7 +24,7 @@ #ifndef _STRINGREPLACERCONF_H_ #define _STRINGREPLACERCONF_H_ -// Qt includes. +// TQt includes. #include <tqwidget.h> // KDE includes. @@ -43,12 +43,13 @@ class EditReplacementWidget; class StringReplacerConf : public KttsFilterConf { Q_OBJECT + TQ_OBJECT public: /** * Constructor */ - StringReplacerConf( TQWidget *parent, const char *name, const TQStringList &args = TQStringList() ); + StringReplacerConf( TQWidget *tqparent, const char *name, const TQStringList &args = TQStringList() ); /** * Destructor diff --git a/kttsd/filters/stringreplacer/stringreplacerconfwidget.ui b/kttsd/filters/stringreplacer/stringreplacerconfwidget.ui index e88307f..c1882a0 100644 --- a/kttsd/filters/stringreplacer/stringreplacerconfwidget.ui +++ b/kttsd/filters/stringreplacer/stringreplacerconfwidget.ui @@ -2,7 +2,7 @@ <class>StringReplacerConfWidget</class> <comment>Widget for configuring String Replacer Filter for KTTSD.</comment> <author>Gary Cramblitt <garycramblitt@comcast.net></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>StringReplacerConfWidget</cstring> </property> @@ -21,22 +21,22 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>nameLabel</cstring> </property> <property name="text"> <string>&Name:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -57,7 +57,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox" row="3" column="0"> + <widget class="TQGroupBox" row="3" column="0"> <property name="name"> <cstring>applyGroupBox</cstring> </property> @@ -71,22 +71,22 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>languageLabel</cstring> </property> <property name="text"> <string>Lan&guage is:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -97,14 +97,14 @@ <comment>What's this text</comment> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>appIdLabel</cstring> </property> <property name="text"> - <string>Application &ID contains:</string> + <string>Application &ID tqcontains:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -116,17 +116,17 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <hbox> <property name="name"> @@ -168,9 +168,9 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -241,9 +241,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout24</cstring> + <cstring>tqlayout24</cstring> </property> <grid> <property name="name"> @@ -301,9 +301,9 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout23</cstring> + <cstring>tqlayout23</cstring> </property> <vbox> <property name="name"> @@ -329,7 +329,7 @@ <comment>What's this text</comment> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>upButton</cstring> </property> @@ -348,7 +348,7 @@ <string>Click to move selected word up in the list. Words higher in the list are applied first.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>downButton</cstring> </property> @@ -427,7 +427,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -457,7 +457,7 @@ <tabstop>languageBrowseButton</tabstop> <tabstop>appIdLineEdit</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kttsd/filters/stringreplacer/stringreplacerproc.cpp b/kttsd/filters/stringreplacer/stringreplacerproc.cpp index 8987d79..4cee1e7 100644 --- a/kttsd/filters/stringreplacer/stringreplacerproc.cpp +++ b/kttsd/filters/stringreplacer/stringreplacerproc.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -// Qt includes. +// TQt includes. #include <tqdom.h> #include <tqfile.h> #include <tqlistview.h> @@ -44,8 +44,8 @@ /** * Constructor. */ -StringReplacerProc::StringReplacerProc( TQObject *parent, const char *name, const TQStringList& ) : - KttsFilterProc(parent, name) +StringReplacerProc::StringReplacerProc( TQObject *tqparent, const char *name, const TQStringList& ) : + KttsFilterProc(tqparent, name) { } @@ -180,14 +180,14 @@ bool StringReplacerProc::init(KConfig* config, const TQString& configGroup){ TQString languageCode = talkerCode->languageCode(); // kdDebug() << "StringReplacerProc::convert: converting " << inputText << // " if language code " << languageCode << " matches " << m_languageCodeList << endl; - if ( !m_languageCodeList.contains( languageCode ) ) + if ( !m_languageCodeList.tqcontains( languageCode ) ) { if ( !talkerCode->countryCode().isEmpty() ) { languageCode += '_' + talkerCode->countryCode(); // kdDebug() << "StringReplacerProc::convert: converting " << inputText << // " if language code " << languageCode << " matches " << m_languageCodeList << endl; - if ( !m_languageCodeList.contains( languageCode ) ) return inputText; + if ( !m_languageCodeList.tqcontains( languageCode ) ) return inputText; } else return inputText; } } @@ -200,7 +200,7 @@ bool StringReplacerProc::init(KConfig* config, const TQString& configGroup){ TQString appIdStr = appId; for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx ) { - if ( appIdStr.contains(m_appIdList[ndx]) ) + if ( appIdStr.tqcontains(m_appIdList[ndx]) ) { found = true; break; @@ -217,7 +217,7 @@ bool StringReplacerProc::init(KConfig* config, const TQString& configGroup){ for ( int index = 0; index < listCount; ++index ) { //kdDebug() << "newtext = " << newText << " matching " << m_matchList[index].pattern() << " replacing with " << m_substList[index] << endl; - newText.replace( m_matchList[index], m_substList[index] ); + newText.tqreplace( m_matchList[index], m_substList[index] ); } m_wasModified = true; return newText; diff --git a/kttsd/filters/stringreplacer/stringreplacerproc.h b/kttsd/filters/stringreplacer/stringreplacerproc.h index b679113..175bda8 100644 --- a/kttsd/filters/stringreplacer/stringreplacerproc.h +++ b/kttsd/filters/stringreplacer/stringreplacerproc.h @@ -25,7 +25,7 @@ #ifndef _STRINGREPLACERPROC_H_ #define _STRINGREPLACERPROC_H_ -// Qt includes. +// TQt includes. #include <tqobject.h> #include <tqtextstream.h> #include <tqvaluelist.h> @@ -38,12 +38,13 @@ class StringReplacerProc : virtual public KttsFilterProc { Q_OBJECT + TQ_OBJECT public: /** * Constructor. */ - StringReplacerProc( TQObject *parent, const char *name, const TQStringList &args = TQStringList() ); + StringReplacerProc( TQObject *tqparent, const char *name, const TQStringList &args = TQStringList() ); /** * Destructor. diff --git a/kttsd/filters/talkerchooser/talkerchooserconf.cpp b/kttsd/filters/talkerchooser/talkerchooserconf.cpp index cc811a3..b351df9 100644 --- a/kttsd/filters/talkerchooser/talkerchooserconf.cpp +++ b/kttsd/filters/talkerchooser/talkerchooserconf.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -// Qt includes. +// TQt includes. #include <tqstring.h> #include <tqhbox.h> #include <tqlayout.h> @@ -49,17 +49,17 @@ /** * Constructor */ -TalkerChooserConf::TalkerChooserConf( TQWidget *parent, const char *name, const TQStringList& /*args*/) : - KttsFilterConf(parent, name) +TalkerChooserConf::TalkerChooserConf( TQWidget *tqparent, const char *name, const TQStringList& /*args*/) : + KttsFilterConf(tqparent, name) { // kdDebug() << "TalkerChooserConf::TalkerChooserConf: Running" << endl; // Create configuration widget. - TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "TalkerChooserConfigWidgetLayout"); - layout->setAlignment (Qt::AlignTop); + tqlayout->tqsetAlignment (TQt::AlignTop); m_widget = new TalkerChooserConfWidget(this, "TalkerChooserConfigWidget"); - layout->addWidget(m_widget); + tqlayout->addWidget(m_widget); // Determine if kdeutils Regular Expression Editor is installed. m_reEditorInstalled = !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty(); @@ -147,7 +147,7 @@ void TalkerChooserConf::save(KConfig* config, const TQString& configGroup){ config->setGroup( configGroup ); config->writeEntry( "UserFilterName", m_widget->nameLineEdit->text() ); config->writeEntry( "MatchRegExp", m_widget->reLineEdit->text() ); - config->writeEntry( "AppIDs", m_widget->appIdLineEdit->text().replace(" ", "") ); + config->writeEntry( "AppIDs", m_widget->appIdLineEdit->text().tqreplace(" ", "") ); config->writeEntry( "TalkerCode", m_talkerCode.getTalkerCode()); } @@ -167,7 +167,7 @@ void TalkerChooserConf::defaults(){ // Default App ID is blank. m_widget->appIdLineEdit->setText( "" ); // Default to using default Talker. - m_talkerCode = TalkerCode( TQString::null, false ); + m_talkerCode = TalkerCode( TQString(), false ); m_widget->talkerLineEdit->setText( m_talkerCode.getTranslatedDescription() ); } @@ -188,11 +188,11 @@ bool TalkerChooserConf::supportsMultiInstance() { return true; } */ TQString TalkerChooserConf::userPlugInName() { - if (m_widget->talkerLineEdit->text().isEmpty()) return TQString::null; + if (m_widget->talkerLineEdit->text().isEmpty()) return TQString(); if (m_widget->appIdLineEdit->text().isEmpty() && - m_widget->reLineEdit->text().isEmpty()) return TQString::null; + m_widget->reLineEdit->text().isEmpty()) return TQString(); TQString instName = m_widget->nameLineEdit->text(); - if (instName.isEmpty()) return TQString::null; + if (instName.isEmpty()) return TQString(); return instName; } @@ -260,10 +260,10 @@ void TalkerChooserConf::slotSaveButton_clicked() void TalkerChooserConf::slotClearButton_clicked() { - m_widget->nameLineEdit->setText( TQString::null ); - m_widget->reLineEdit->setText( TQString::null ); - m_widget->appIdLineEdit->setText( TQString::null ); - m_talkerCode = TalkerCode( TQString::null, false ); + m_widget->nameLineEdit->setText( TQString() ); + m_widget->reLineEdit->setText( TQString() ); + m_widget->appIdLineEdit->setText( TQString() ); + m_talkerCode = TalkerCode( TQString(), false ); m_widget->talkerLineEdit->setText( m_talkerCode.getTranslatedDescription() ); configChanged(); } diff --git a/kttsd/filters/talkerchooser/talkerchooserconf.h b/kttsd/filters/talkerchooser/talkerchooserconf.h index 38a6c49..be501a2 100644 --- a/kttsd/filters/talkerchooser/talkerchooserconf.h +++ b/kttsd/filters/talkerchooser/talkerchooserconf.h @@ -24,7 +24,7 @@ #ifndef _TALKERCHOOSERCONF_H_ #define _TALKERCHOOSERCONF_H_ -// Qt includes. +// TQt includes. #include <tqwidget.h> // KDE includes. @@ -45,12 +45,13 @@ class EditReplacementWidget; class TalkerChooserConf : public KttsFilterConf { Q_OBJECT + TQ_OBJECT public: /** * Constructor */ - TalkerChooserConf( TQWidget *parent, const char *name, const TQStringList &args = TQStringList() ); + TalkerChooserConf( TQWidget *tqparent, const char *name, const TQStringList &args = TQStringList() ); /** * Destructor diff --git a/kttsd/filters/talkerchooser/talkerchooserconfwidget.ui b/kttsd/filters/talkerchooser/talkerchooserconfwidget.ui index 3cdee2e..3ee9947 100644 --- a/kttsd/filters/talkerchooser/talkerchooserconfwidget.ui +++ b/kttsd/filters/talkerchooser/talkerchooserconfwidget.ui @@ -2,7 +2,7 @@ <class>TalkerChooserConfWidget</class> <comment>Widget for configuring Talker Chooser Filter for KTTSD.</comment> <author>Gary Cramblitt <garycramblitt@comcast.net></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>TalkerChooserConfWidget</cstring> </property> @@ -21,22 +21,22 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>nameLabel</cstring> </property> <property name="text"> <string>&Name:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -57,7 +57,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>applyGroupBox</cstring> </property> @@ -71,22 +71,22 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>reLabel</cstring> </property> <property name="text"> - <string>Te&xt contains:</string> + <string>Te&xt tqcontains:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -97,14 +97,14 @@ <comment>What's this text</comment> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>appIdLabel</cstring> </property> <property name="text"> - <string>Application &ID contains:</string> + <string>Application &ID tqcontains:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -116,17 +116,17 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <hbox> <property name="name"> @@ -165,15 +165,15 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>layout19_2</cstring> + <cstring>tqlayout19_2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>talkerLabel</cstring> </property> @@ -226,9 +226,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="3" column="0"> + <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -304,7 +304,7 @@ <tabstop>reEditorButton</tabstop> <tabstop>appIdLineEdit</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kttsd/filters/talkerchooser/talkerchooserproc.cpp b/kttsd/filters/talkerchooser/talkerchooserproc.cpp index 5758df2..8d4aeb0 100644 --- a/kttsd/filters/talkerchooser/talkerchooserproc.cpp +++ b/kttsd/filters/talkerchooser/talkerchooserproc.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -// Qt includes. +// TQt includes. #include <tqregexp.h> // KDE includes. @@ -38,8 +38,8 @@ /** * Constructor. */ -TalkerChooserProc::TalkerChooserProc( TQObject *parent, const char *name, const TQStringList& /*args*/ ) : - KttsFilterProc(parent, name) +TalkerChooserProc::TalkerChooserProc( TQObject *tqparent, const char *name, const TQStringList& /*args*/ ) : + KttsFilterProc(tqparent, name) { // kdDebug() << "TalkerChooserProc::TalkerChooserProc: Running" << endl; } @@ -107,7 +107,7 @@ bool TalkerChooserProc::init(KConfig* config, const TQString& configGroup){ { if ( !m_re.isEmpty() ) { - int pos = inputText.find( TQRegExp(m_re) ); + int pos = inputText.tqfind( TQRegExp(m_re) ); if ( pos < 0 ) return inputText; } // If appId doesn't match, return input unmolested. @@ -119,7 +119,7 @@ bool TalkerChooserProc::init(KConfig* config, const TQString& configGroup){ TQString appIdStr = appId; for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx ) { - if ( appIdStr.contains(m_appIdList[ndx]) ) + if ( appIdStr.tqcontains(m_appIdList[ndx]) ) { found = true; break; diff --git a/kttsd/filters/talkerchooser/talkerchooserproc.h b/kttsd/filters/talkerchooser/talkerchooserproc.h index 8c9ab01..a422000 100644 --- a/kttsd/filters/talkerchooser/talkerchooserproc.h +++ b/kttsd/filters/talkerchooser/talkerchooserproc.h @@ -31,12 +31,13 @@ class TalkerChooserProc : virtual public KttsFilterProc { Q_OBJECT + TQ_OBJECT public: /** * Constructor. */ - TalkerChooserProc( TQObject *parent, const char *name, const TQStringList &args = TQStringList() ); + TalkerChooserProc( TQObject *tqparent, const char *name, const TQStringList &args = TQStringList() ); /** * Destructor. diff --git a/kttsd/filters/xhtml2ssml/Doxyfile b/kttsd/filters/xhtml2ssml/Doxyfile index 0061358..6313df1 100644 --- a/kttsd/filters/xhtml2ssml/Doxyfile +++ b/kttsd/filters/xhtml2ssml/Doxyfile @@ -17,7 +17,7 @@ ABBREVIATE_BRIEF = "The $name class" \ is \ provides \ specifies \ - contains \ + tqcontains \ represents \ a \ an \ @@ -120,7 +120,7 @@ FILE_PATTERNS = *.c \ *.tlh \ *.diff \ *.patch \ - *.moc \ + *.tqmoc \ *.xpm \ *.dox RECURSIVE = yes diff --git a/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp b/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp index 5649cc9..916ec48 100644 --- a/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp +++ b/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp @@ -63,7 +63,7 @@ bool XHTMLToSSMLParser::startElement(const TQString &, const TQString &, const T // append to the output string. TQString toelement = m_xhtml2ssml[fromelement]; if(toelement) - m_output.append(XMLElement::fromQString(toelement).startTag()); + m_output.append(XMLElement::fromTQString(toelement).startTag()); return true; } @@ -71,7 +71,7 @@ bool XHTMLToSSMLParser::endElement(const TQString &, const TQString &, const TQS TQString fromelement = qName; TQString toelement = m_xhtml2ssml[fromelement]; if(toelement) - m_output.append(XMLElement::fromQString(toelement).endTag()); + m_output.append(XMLElement::fromTQString(toelement).endTag()); return true; } @@ -94,10 +94,10 @@ bool XHTMLToSSMLParser::readFileConfigEntry(const TQString &line) { if(line.stripWhiteSpace().startsWith("#")) { return true; } - // break into QStringList + // break into TQStringList // the second parameter to split is the string, with all space simplified and all space around the : removed, i.e // "something : somethingelse" -> "something:somethingelse" - TQStringList keyvalue = TQStringList::split(":", line.simplifyWhiteSpace().replace(" :", ":").replace(": ", ":")); + TQStringList keyvalue = TQStringList::split(":", line.simplifyWhiteSpace().tqreplace(" :", ":").tqreplace(": ", ":")); if(keyvalue.count() != 2) return false; m_xhtml2ssml[keyvalue[0]] = keyvalue[1]; diff --git a/kttsd/filters/xhtml2ssml/xhtml2ssml.h b/kttsd/filters/xhtml2ssml/xhtml2ssml.h index 4668d90..a4eae56 100644 --- a/kttsd/filters/xhtml2ssml/xhtml2ssml.h +++ b/kttsd/filters/xhtml2ssml/xhtml2ssml.h @@ -25,7 +25,7 @@ #include <tqxml.h> #include <tqmap.h> -typedef TQMap<TQString, TQString> QStringMap; +typedef TQMap<TQString, TQString> TQStringMap; class TQString; class XHTMLToSSMLParser : public TQXmlDefaultHandler { @@ -53,7 +53,7 @@ public: private: /// Dict of xhtml tags -> ssml tags - QStringMap m_xhtml2ssml; + TQStringMap m_xhtml2ssml; /// The output of the conversion TQString m_output; }; diff --git a/kttsd/filters/xhtml2ssml/xmlelement.cpp b/kttsd/filters/xhtml2ssml/xmlelement.cpp index 920fd57..45952ae 100644 --- a/kttsd/filters/xhtml2ssml/xmlelement.cpp +++ b/kttsd/filters/xhtml2ssml/xmlelement.cpp @@ -74,12 +74,12 @@ TQString XMLElement::attribute(const TQString &attr) { return m_attrmapper[attr]; } -TQString XMLElement::toQString() { +TQString XMLElement::toTQString() { TQString tag = startTag(); return tag.left(tag.length() - 1).right(tag.length() - 2); } -XMLElement XMLElement::fromQString(const TQString &str) { +XMLElement XMLElement::fromTQString(const TQString &str) { TQStringList sections = TQStringList::split(" ", str); TQString tagname = sections[0]; XMLElement e(tagname.latin1()); @@ -91,7 +91,7 @@ XMLElement XMLElement::fromQString(const TQString &str) { for(int i = 0; i < sectionsCount; ++i) { TQStringList list = TQStringList::split("=", sections[i]); if(list.count() != 2) { - std::cerr << "XMLElement::fromQString: Cannot convert list: " << list.join("|") << ". `" << str << "' is not in valid format.\n"; + std::cerr << "XMLElement::fromTQString: Cannot convert list: " << list.join("|") << ". `" << str << "' is not in valid format.\n"; return XMLElement(" "); } e.setAttribute(list[0], list[1].left(list[1].length() - 1).right(list[1].length() -2)); diff --git a/kttsd/filters/xhtml2ssml/xmlelement.h b/kttsd/filters/xhtml2ssml/xmlelement.h index f92e933..11c7cef 100644 --- a/kttsd/filters/xhtml2ssml/xmlelement.h +++ b/kttsd/filters/xhtml2ssml/xmlelement.h @@ -75,11 +75,11 @@ public: /// Had issues with TQMap and custom classes. For now you can just convert to/from TQString and use /// That as the key/value pair. /// @returns A TQString representation of the XMLAttribute. - TQString toQString(); + TQString toTQString(); /// Create an XMLElement from a TQString. /// @param str The TQString to convert from. Must be of the following syntax- "foo name=\"bar\"" - static XMLElement fromQString(const TQString &str); + static XMLElement fromTQString(const TQString &str); private: /// The name of the tag. diff --git a/kttsd/filters/xmltransformer/xhtml2ssml_simple.xsl b/kttsd/filters/xmltransformer/xhtml2ssml_simple.xsl index 2c1f3be..f289252 100644 --- a/kttsd/filters/xmltransformer/xhtml2ssml_simple.xsl +++ b/kttsd/filters/xmltransformer/xhtml2ssml_simple.xsl @@ -52,22 +52,22 @@ </xsl:template> <!-- H1, H2, H3, H4, H5, H6: ignore tag, speak content as sentence. --> -<xsl:template match="*[contains('h1|h2|h3|h4|h5|h6|H1|H2|H3|H4|H5|H6|',concat(local-name(),'|'))]"> +<xsl:template match="*[tqcontains('h1|h2|h3|h4|h5|h6|H1|H2|H3|H4|H5|H6|',concat(local-name(),'|'))]"> <xsl:apply-templates/> </xsl:template> <!-- DFN, LI, DD, DT: ignore tag, speak content. --> -<xsl:template match="*[contains('dfn|li|dd|dt|DFN|LI|DD|DT|',concat(local-name(),'|'))]"> +<xsl:template match="*[tqcontains('dfn|li|dd|dt|DFN|LI|DD|DT|',concat(local-name(),'|'))]"> <xsl:apply-templates/> </xsl:template> <!-- PRE, CODE, TT; ignore tag, speak content. --> -<xsl:template match="*[contains('pre|code|tt|PRE|CODE|TT|',concat(local-name(),'|'))]"> +<xsl:template match="*[tqcontains('pre|code|tt|PRE|CODE|TT|',concat(local-name(),'|'))]"> <xsl:apply-templates/> </xsl:template> <!-- EM, STRONG, I, B, S, STRIKE, U: speak emphasized. --> -<xsl:template match="*[contains('em|strong|i|b|s|strike|EM|STRONG|I|B|S|STRIKE|',concat(local-name(),'|'))]"> +<xsl:template match="*[tqcontains('em|strong|i|b|s|strike|EM|STRONG|I|B|S|STRIKE|',concat(local-name(),'|'))]"> <emphasis level="strong"> <xsl:apply-templates/> </emphasis> diff --git a/kttsd/filters/xmltransformer/xmltransformerconf.cpp b/kttsd/filters/xmltransformer/xmltransformerconf.cpp index c70c449..dd4bb54 100644 --- a/kttsd/filters/xmltransformer/xmltransformerconf.cpp +++ b/kttsd/filters/xmltransformer/xmltransformerconf.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -// Qt includes. +// TQt includes. #include <tqstring.h> #include <tqlayout.h> @@ -43,17 +43,17 @@ /** * Constructor */ -XmlTransformerConf::XmlTransformerConf( TQWidget *parent, const char *name, const TQStringList& /*args*/) : - KttsFilterConf(parent, name) +XmlTransformerConf::XmlTransformerConf( TQWidget *tqparent, const char *name, const TQStringList& /*args*/) : + KttsFilterConf(tqparent, name) { // kdDebug() << "XmlTransformerConf::XmlTransformerConf: Running" << endl; // Create configuration widget. - TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "XmlTransformerConfWidgetLayout"); - layout->setAlignment (Qt::AlignTop); + tqlayout->tqsetAlignment (TQt::AlignTop); m_widget = new XmlTransformerConfWidget(this, "XmlTransformerConfigWidget"); - layout->addWidget(m_widget); + tqlayout->addWidget(m_widget); // Set up defaults. defaults(); @@ -125,7 +125,7 @@ void XmlTransformerConf::save(KConfig* config, const TQString& configGroup){ config->writeEntry( "XsltprocPath", realFilePath( m_widget->xsltprocPath->url() ) ); config->writeEntry( "RootElement", m_widget->rootElementLineEdit->text() ); config->writeEntry( "DocType", m_widget->doctypeLineEdit->text() ); - config->writeEntry( "AppID", m_widget->appIdLineEdit->text().replace(" ", "") ); + config->writeEntry( "AppID", m_widget->appIdLineEdit->text().tqreplace(" ", "") ); } /** @@ -170,13 +170,13 @@ bool XmlTransformerConf::supportsMultiInstance() { return true; } TQString XmlTransformerConf::userPlugInName() { TQString filePath = realFilePath(m_widget->xsltprocPath->url()); - if (filePath.isEmpty()) return TQString::null; - if (getLocation(filePath).isEmpty()) return TQString::null; + if (filePath.isEmpty()) return TQString(); + if (getLocation(filePath).isEmpty()) return TQString(); filePath = realFilePath(m_widget->xsltPath->url()); - if (filePath.isEmpty()) return TQString::null; - if (getLocation(filePath).isEmpty()) return TQString::null; - if (!TQFileInfo(filePath).isFile()) return TQString::null; + if (filePath.isEmpty()) return TQString(); + if (getLocation(filePath).isEmpty()) return TQString(); + if (!TQFileInfo(filePath).isFile()) return TQString(); return m_widget->nameLineEdit->text(); } diff --git a/kttsd/filters/xmltransformer/xmltransformerconf.h b/kttsd/filters/xmltransformer/xmltransformerconf.h index caec175..c10b90b 100644 --- a/kttsd/filters/xmltransformer/xmltransformerconf.h +++ b/kttsd/filters/xmltransformer/xmltransformerconf.h @@ -24,7 +24,7 @@ #ifndef _XMLTRANSFORMERCONF_H_ #define _XMLTRANSFORMERCONF_H_ -// Qt includes. +// TQt includes. #include <tqwidget.h> // KDE includes. @@ -40,12 +40,13 @@ class XmlTransformerConf : public KttsFilterConf { Q_OBJECT + TQ_OBJECT public: /** * Constructor */ - XmlTransformerConf( TQWidget *parent, const char *name, const TQStringList &args = TQStringList() ); + XmlTransformerConf( TQWidget *tqparent, const char *name, const TQStringList &args = TQStringList() ); /** * Destructor diff --git a/kttsd/filters/xmltransformer/xmltransformerconfwidget.ui b/kttsd/filters/xmltransformer/xmltransformerconfwidget.ui index 4975d9c..cd00de3 100644 --- a/kttsd/filters/xmltransformer/xmltransformerconfwidget.ui +++ b/kttsd/filters/xmltransformer/xmltransformerconfwidget.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>XmlTransformerConfWidget</class> <author>Gary Cramblitt <garycramblitt@comcast.net></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>XmlTransformerConfWidget</cstring> </property> @@ -20,9 +20,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> @@ -57,22 +57,22 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>nameLabel</cstring> </property> <property name="text"> <string>&Name:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -83,14 +83,14 @@ <comment>What's this text</comment> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>xsltLabel</cstring> </property> <property name="text"> <string>&XSLT file:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -100,14 +100,14 @@ <string>Enter the full path to an XML Style Language - Transforms (XSLT) stylesheet file. XSLT files usually end with extension .xsl.</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>xsltprocLabel</cstring> </property> <property name="text"> <string>xsltproc &executable:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -119,7 +119,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>applyGroupBox</cstring> </property> @@ -133,9 +133,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <vbox> <property name="name"> @@ -167,22 +167,22 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>rootElementLabel</cstring> </property> <property name="text"> <string>&Root element is:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -193,14 +193,14 @@ <comment>What's this text</comment> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>doctypeLabel</cstring> </property> <property name="text"> <string>or DOC&TYPE is:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -210,14 +210,14 @@ <string>This filter will be applied only to text having the specified DOCTYPE specification. If blank, applies to all text. You may enter more than one DOCTYPE separated by commas. Example: "xhtml".</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>appIdLabel</cstring> </property> <property name="text"> - <string>and Application &ID contains:</string> + <string>and Application &ID tqcontains:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -233,7 +233,7 @@ </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> <includehint>kurlrequester.h</includehint> diff --git a/kttsd/filters/xmltransformer/xmltransformerproc.cpp b/kttsd/filters/xmltransformer/xmltransformerproc.cpp index b4b9f71..f9fc2e6 100644 --- a/kttsd/filters/xmltransformer/xmltransformerproc.cpp +++ b/kttsd/filters/xmltransformer/xmltransformerproc.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -// Qt includes. +// TQt includes. #include <tqfile.h> #include <tqregexp.h> @@ -44,8 +44,8 @@ /** * Constructor. */ -XmlTransformerProc::XmlTransformerProc( TQObject *parent, const char *name, const TQStringList& ) : - KttsFilterProc(parent, name) +XmlTransformerProc::XmlTransformerProc( TQObject *tqparent, const char *name, const TQStringList& ) : + KttsFilterProc(tqparent, name) { m_xsltProc = 0; } @@ -198,7 +198,7 @@ bool XmlTransformerProc::init(KConfig* config, const TQString& configGroup) found = false; for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx ) { - if ( appIdStr.contains(m_appIdList[ndx]) ) + if ( appIdStr.tqcontains(m_appIdList[ndx]) ) { found = true; break; @@ -227,7 +227,7 @@ bool XmlTransformerProc::init(KConfig* config, const TQString& configGroup) // This will change & inside a CDATA section, which is not good, and also within comments and // processing instructions, which is OK because we don't speak those anyway. TQString text = inputText; - text.replace(TQRegExp("&(?!amp;)"),"&"); + text.tqreplace(TQRegExp("&(?!amp;)"),"&"); *wstream << text; inFile.close(); #if KDE_VERSION >= KDE_MAKE_VERSION (3,3,0) @@ -282,7 +282,7 @@ void XmlTransformerProc::processOutput() if (exitStatus != 0) { - kdDebug() << "XmlTransformerProc::processOutput: xsltproc abnormal exit. Status = " << exitStatus << endl; + kdDebug() << "XmlTransformerProc::processOutput: xsltproc abnormal exit. tqStatus = " << exitStatus << endl; m_state = fsFinished; TQFile::remove(m_outFilename); emit filteringFinished(); @@ -346,7 +346,7 @@ void XmlTransformerProc::processOutput() /*virtual*/ void XmlTransformerProc::ackFinished() { m_state = fsIdle; - m_text = TQString::null; + m_text = TQString(); } /** @@ -373,13 +373,13 @@ void XmlTransformerProc::slotProcessExited(KProcess*) void XmlTransformerProc::slotReceivedStdout(KProcess*, char* /*buffer*/, int /*buflen*/) { - // TQString buf = TQString::fromLatin1(buffer, buflen); + // TQString buf = TQString::tqfromLatin1(buffer, buflen); // kdDebug() << "XmlTransformerProc::slotReceivedStdout: Received from xsltproc: " << buf << endl; } void XmlTransformerProc::slotReceivedStderr(KProcess*, char* buffer, int buflen) { - TQString buf = TQString::fromLatin1(buffer, buflen); + TQString buf = TQString::tqfromLatin1(buffer, buflen); kdDebug() << "XmlTransformerProc::slotReceivedStderr: Received error from xsltproc: " << buf << endl; } diff --git a/kttsd/filters/xmltransformer/xmltransformerproc.h b/kttsd/filters/xmltransformer/xmltransformerproc.h index d50adeb..4f8b82b 100644 --- a/kttsd/filters/xmltransformer/xmltransformerproc.h +++ b/kttsd/filters/xmltransformer/xmltransformerproc.h @@ -24,7 +24,7 @@ #ifndef _XMLTRANSFORMERPROC_H_ #define _XMLTRANSFORMERPROC_H_ -// Qt includes. +// TQt includes. #include <tqobject.h> #include <tqstringlist.h> @@ -36,12 +36,13 @@ class KProcess; class XmlTransformerProc : virtual public KttsFilterProc { Q_OBJECT + TQ_OBJECT public: /** * Constructor. */ - XmlTransformerProc( TQObject *parent, const char *name, const TQStringList &args = TQStringList() ); + XmlTransformerProc( TQObject *tqparent, const char *name, const TQStringList &args = TQStringList() ); /** * Destructor. diff --git a/kttsd/kcmkttsmgr/addtalker.cpp b/kttsd/kcmkttsmgr/addtalker.cpp index 4a94cf3..5732372 100644 --- a/kttsd/kcmkttsmgr/addtalker.cpp +++ b/kttsd/kcmkttsmgr/addtalker.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -// Qt includes. +// TQt includes. #include <tqradiobutton.h> // KDE includes. @@ -34,8 +34,8 @@ // KTTS includes. #include "addtalker.h" -AddTalker::AddTalker(SynthToLangMap synthToLangMap, TQWidget* parent, const char* name, WFlags fl) - : AddTalkerWidget(parent,name,fl) +AddTalker::AddTalker(SynthToLangMap synthToLangMap, TQWidget* tqparent, const char* name, WFlags fl) + : AddTalkerWidget(tqparent,name,fl) { // Build maps. setSynthToLangMap(synthToLangMap); @@ -46,7 +46,7 @@ AddTalker::AddTalker(SynthToLangMap synthToLangMap, TQWidget* parent, const char // Default to user's desktop language. TQString languageCode = KGlobal::locale()->defaultLanguage(); // If there is not a synth that supports the locale, try stripping country code. - if (!m_langToSynthMap.contains(languageCode)) + if (!m_langToSynthMap.tqcontains(languageCode)) { TQString countryCode; TQString charSet; @@ -55,7 +55,7 @@ AddTalker::AddTalker(SynthToLangMap synthToLangMap, TQWidget* parent, const char languageCode = twoAlpha; } // If there is still not a synth that supports the language code, default to "other". - if (!m_langToSynthMap.contains(languageCode)) languageCode = "other"; + if (!m_langToSynthMap.tqcontains(languageCode)) languageCode = "other"; // Select the language in the language combobox. TQString language = languageCodeToLanguage(languageCode); diff --git a/kttsd/kcmkttsmgr/addtalker.h b/kttsd/kcmkttsmgr/addtalker.h index 33b9ba8..0c3f703 100644 --- a/kttsd/kcmkttsmgr/addtalker.h +++ b/kttsd/kcmkttsmgr/addtalker.h @@ -25,7 +25,7 @@ #ifndef ADDTALKER_H #define ADDTALKER_H -// Qt includes. +// TQt includes. #include <tqmap.h> #include "addtalkerwidget.h" @@ -36,15 +36,16 @@ typedef TQMap<TQString,TQStringList> LangToSynthMap; class AddTalker : public AddTalkerWidget { Q_OBJECT + TQ_OBJECT public: /** * Constructor. * @param synthToLangMap TQMap of supported language codes indexed by synthesizer. - * @param parent Inherited KDialog parameter. + * @param tqparent Inherited KDialog parameter. * @param name Inherited KDialog parameter. */ - AddTalker(SynthToLangMap synthToLangMap, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + AddTalker(SynthToLangMap synthToLangMap, TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); /** * Destructor. diff --git a/kttsd/kcmkttsmgr/addtalkerwidget.ui b/kttsd/kcmkttsmgr/addtalkerwidget.ui index f493138..a3cc11d 100644 --- a/kttsd/kcmkttsmgr/addtalkerwidget.ui +++ b/kttsd/kcmkttsmgr/addtalkerwidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>AddTalkerWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>AddTalkerWidget</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroup2</cstring> </property> @@ -80,21 +80,21 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>351</width> <height>21</height> </size> </property> </spacer> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>synthesizerLabel</cstring> </property> <property name="text"> <string>&Synthesizer:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -115,7 +115,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>25</width> <height>20</height> @@ -132,7 +132,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>30</width> <height>20</height> @@ -149,7 +149,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>30</width> <height>20</height> @@ -166,14 +166,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>25</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="2" rowspan="1" colspan="3"> + <widget class="TQLabel" row="0" column="2" rowspan="1" colspan="3"> <property name="name"> <cstring>showAllLabel</cstring> </property> @@ -185,21 +185,21 @@ <property name="text"> <string>Show All</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignLeft</set> </property> <property name="whatsThis" stdset="0"> <string>The radio buttons below determine which box shows all possibilities. The box to the left of the checked button shows all possibilities. The box to the left of the unchecked box only shows those possibilities that match the other box.</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>languageLabel</cstring> </property> <property name="text"> <string>&Language:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -210,7 +210,7 @@ <comment>What's this text</comment> </property> </widget> - <widget class="QRadioButton" row="1" column="3"> + <widget class="TQRadioButton" row="1" column="3"> <property name="name"> <cstring>languageRadioButton</cstring> </property> @@ -227,7 +227,7 @@ <string>Check to list all the possible languages in the Language box at the left. When a language has been chosen, the Synthesizer box will show only those synthesizers that can speak in the chosen language.</string> </property> </widget> - <widget class="QRadioButton" row="2" column="3"> + <widget class="TQRadioButton" row="2" column="3"> <property name="name"> <cstring>synthesizerRadioButton</cstring> </property> @@ -252,7 +252,7 @@ <tabstop>synthesizerSelection</tabstop> <tabstop>languageRadioButton</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>kcombobox.h</includehint> diff --git a/kttsd/kcmkttsmgr/kcmkttsmgr.cpp b/kttsd/kcmkttsmgr/kcmkttsmgr.cpp index b8cf367..50c6f58 100644 --- a/kttsd/kcmkttsmgr/kcmkttsmgr.cpp +++ b/kttsd/kcmkttsmgr/kcmkttsmgr.cpp @@ -23,7 +23,7 @@ // C++ includes. #include <math.h> -// Qt includes. +// TQt includes. #include <tqwidget.h> #include <tqtabwidget.h> #include <tqcheckbox.h> @@ -104,10 +104,10 @@ K_EXPORT_COMPONENT_FACTORY( kcm_kttsd, KCMKttsMgrFactory("kttsd") ) * Makes the list of plug ins. * And the languages acording to the plug ins. */ -KCMKttsMgr::KCMKttsMgr(TQWidget *parent, const char *name, const TQStringList &) : +KCMKttsMgr::KCMKttsMgr(TQWidget *tqparent, const char *name, const TQStringList &) : DCOPStub("kttsd", "KSpeech"), DCOPObject("kcmkttsmgr_kspeechsink"), - KCModule(KCMKttsMgrFactory::instance(), parent, name) + KCModule(KCMKttsMgrFactory::instance(), tqparent, name) { // kdDebug() << "KCMKttsMgr contructor running." << endl; @@ -119,10 +119,10 @@ KCMKttsMgr::KCMKttsMgr(TQWidget *parent, const char *name, const TQStringList &) m_suppressConfigChanged = false; // Add the KTTS Manager widget - TQGridLayout *layout = new TQGridLayout(this, 0, 0); + TQGridLayout *tqlayout = new TQGridLayout(this, 0, 0); m_kttsmgrw = new KCMKttsMgrWidget(this, "kttsmgrw"); // m_kttsmgrw = new KCMKttsMgrWidget(this); - layout->addWidget(m_kttsmgrw, 0, 0); + tqlayout->addWidget(m_kttsmgrw, 0, 0); // Give buttons icons. // Talkers tab. @@ -430,7 +430,7 @@ void KCMKttsMgr::load() loadNotifyEventsFromFile( locateLocal("config", "kttsd_notifyevents.xml"), true ); slotNotifyEnableCheckBox_toggled( m_kttsmgrw->notifyEnableCheckBox->isChecked() ); // Auto-expand and position on the Default item. - TQListViewItem* item = m_kttsmgrw->notifyListView->findItem( "default", nlvcEventSrc ); + TQListViewItem* item = m_kttsmgrw->notifyListView->tqfindItem( "default", nlvcEventSrc ); if ( item ) if ( item->childCount() > 0 ) item = item->firstChild(); if ( item ) m_kttsmgrw->notifyListView->ensureItemVisible( item ); @@ -491,7 +491,7 @@ void KCMKttsMgr::load() TQString fullLanguageCode; talkerCode = TalkerCode::normalizeTalkerCode(talkerCode, fullLanguageCode); TQString language = TalkerCode::languageCodeToLanguage(fullLanguageCode); - TQString desktopEntryName = m_config->readEntry("DesktopEntryName", TQString::null); + TQString desktopEntryName = m_config->readEntry("DesktopEntryName", TQString()); // If a DesktopEntryName is not in the config file, it was configured before // we started using them, when we stored translated plugin names instead. // Try to convert the translated plugin name to a DesktopEntryName. @@ -500,7 +500,7 @@ void KCMKttsMgr::load() TQString synthName; if (desktopEntryName.isEmpty()) { - synthName = m_config->readEntry("PlugIn", TQString::null); + synthName = m_config->readEntry("PlugIn", TQString()); // See if the translated name will untranslate. If not, well, sorry. desktopEntryName = TalkerCode::TalkerNameToDesktopEntryName(synthName); // Record the DesktopEntryName from now on. @@ -542,7 +542,7 @@ void KCMKttsMgr::load() // All plugins support "Other". // TODO: Eventually, this should not be necessary, since all plugins will know // the languages they support and report them in call to getSupportedLanguages(). - if (!languageCodes.contains("other")) languageCodes.append("other"); + if (!languageCodes.tqcontains("other")) languageCodes.append("other"); // Add supported language codes to synthesizer-to-language map. m_synthToLangMap[synthName] = languageCodes; @@ -568,7 +568,7 @@ void KCMKttsMgr::load() TQString filterID = *it; // kdDebug() << "KCMKttsMgr::load: filterID = " << filterID << endl; m_config->setGroup("Filter_" + filterID); - TQString desktopEntryName = m_config->readEntry("DesktopEntryName", TQString::null); + TQString desktopEntryName = m_config->readEntry("DesktopEntryName", TQString()); // If a DesktopEntryName is not in the config file, it was configured before // we started using them, when we stored translated plugin names instead. // Try to convert the translated plugin name to a DesktopEntryName. @@ -577,7 +577,7 @@ void KCMKttsMgr::load() TQString filterPlugInName; if (desktopEntryName.isEmpty()) { - filterPlugInName = m_config->readEntry("PlugInName", TQString::null); + filterPlugInName = m_config->readEntry("PlugInName", TQString()); // See if the translated name will untranslate. If not, well, sorry. desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName); // Record the DesktopEntryName from now on. @@ -822,7 +822,7 @@ void KCMKttsMgr::save() if (groupName.left(7) == "Talker_") { TQString groupTalkerID = groupName.mid(7); - if (!talkerIDsList.contains(groupTalkerID)) m_config->deleteGroup(groupName); + if (!talkerIDsList.tqcontains(groupTalkerID)) m_config->deleteGroup(groupName); } } @@ -862,7 +862,7 @@ void KCMKttsMgr::save() if (groupName.left(7) == "Filter_") { TQString groupFilterID = groupName.mid(7); - if (!filterIDsList.contains(groupFilterID)) m_config->deleteGroup(groupName); + if (!filterIDsList.tqcontains(groupFilterID)) m_config->deleteGroup(groupName); } } @@ -1100,7 +1100,7 @@ PlugInConf* KCMKttsMgr::loadTalkerPlugin(const TQString& name) // Find the plugin. KTrader::OfferList offers = KTrader::self()->query("KTTSD/SynthPlugin", - TQString("DesktopEntryName == '%1'").arg(name)); + TQString("DesktopEntryName == '%1'").tqarg(name)); if (offers.count() == 1) { @@ -1144,7 +1144,7 @@ KttsFilterConf* KCMKttsMgr::loadFilterPlugin(const TQString& plugInName) // Find the plugin. KTrader::OfferList offers = KTrader::self()->query("KTTSD/FilterPlugin", - TQString("DesktopEntryName == '%1'").arg(plugInName)); + TQString("DesktopEntryName == '%1'").tqarg(plugInName)); if (offers.count() == 1) { @@ -1271,10 +1271,10 @@ void KCMKttsMgr::slot_addTalker() dlg->setHelp("select-plugin", "kttsd"); dlg->setInitialSize(TQSize(200, 500), false); dlgResult = dlg->exec(); - languageCode = TQString::null; + languageCode = TQString(); if (langLView->selectedItem()) languageCode = langLView->selectedItem()->text(1); delete dlg; - // TODO: Also delete KListView and QHBox? + // TODO: Also delete KListView and TQHBox? if (dlgResult != TQDialog::Accepted) return; } @@ -1400,7 +1400,7 @@ void KCMKttsMgr::addFilter( bool sbd) { if (item->text(flvcMultiInstance) == "T") { - if (!filterPlugInNames.contains(item->text(flvcPlugInName))) + if (!filterPlugInNames.tqcontains(item->text(flvcPlugInName))) filterPlugInNames.append(item->text(flvcPlugInName)); } item = item->nextSibling(); @@ -1835,7 +1835,7 @@ void KCMKttsMgr::kttsdStarted() if (factory) { // Create the Job Manager part - m_jobMgrPart = (KParts::ReadOnlyPart *)factory->create( m_kttsmgrw->mainTab, "kttsjobmgr", + m_jobMgrPart = (KParts::ReadOnlyPart *)factory->create( TQT_TQOBJECT(m_kttsmgrw->mainTab), "kttsjobmgr", "KParts::ReadOnlyPart" ); if (m_jobMgrPart) { @@ -2063,7 +2063,7 @@ void KCMKttsMgr::configureTalker() } float audioStretchFactor = 1.0/(float(m_kttsmgrw->timeBox->value())/100.0); // kdDebug() << "KCMKttsMgr::configureTalker: playerOption = " << playerOption << " audioStretchFactor = " << audioStretchFactor << " sink name = " << sinkName << endl; - TestPlayer* testPlayer = new TestPlayer(this, "ktts_testplayer", + TestPlayer* testPlayer = new TestPlayer(TQT_TQOBJECT(this), "ktts_testplayer", playerOption, audioStretchFactor, sinkName); m_loadedTalkerPlugIn->setPlayer(testPlayer); // Display the dialog. @@ -2093,7 +2093,7 @@ void KCMKttsMgr::configureFilter() true, true); m_configDlg->setInitialSize(TQSize(600, 450), false); - m_loadedFilterPlugIn->setMinimumSize(m_loadedFilterPlugIn->minimumSizeHint()); + m_loadedFilterPlugIn->setMinimumSize(m_loadedFilterPlugIn->tqminimumSizeHint()); m_loadedFilterPlugIn->show(); m_configDlg->setMainWidget(m_loadedFilterPlugIn); m_configDlg->setHelp("configure-filter", "kttsd"); @@ -2201,15 +2201,15 @@ void KCMKttsMgr::slotFiltersList_stateChanged() * Uses KTrader to convert a translated Filter Plugin Name to DesktopEntryName. * @param name The translated plugin name. From Name= line in .desktop file. * @return DesktopEntryName. The name of the .desktop file (less .desktop). - * TQString::null if not found. + * TQString() if not found. */ TQString KCMKttsMgr::FilterNameToDesktopEntryName(const TQString& name) { - if (name.isEmpty()) return TQString::null; + if (name.isEmpty()) return TQString(); KTrader::OfferList offers = KTrader::self()->query("KTTSD/FilterPlugin"); for (uint ndx = 0; ndx < offers.count(); ++ndx) if (offers[ndx]->name() == name) return offers[ndx]->desktopEntryName(); - return TQString::null; + return TQString(); } /** @@ -2219,14 +2219,14 @@ TQString KCMKttsMgr::FilterNameToDesktopEntryName(const TQString& name) */ TQString KCMKttsMgr::FilterDesktopEntryNameToName(const TQString& desktopEntryName) { - if (desktopEntryName.isEmpty()) return TQString::null; + if (desktopEntryName.isEmpty()) return TQString(); KTrader::OfferList offers = KTrader::self()->query("KTTSD/FilterPlugin", - TQString("DesktopEntryName == '%1'").arg(desktopEntryName)); + TQString("DesktopEntryName == '%1'").tqarg(desktopEntryName)); if (offers.count() == 1) return offers[0]->name(); else - return TQString::null; + return TQString(); } /** @@ -2278,7 +2278,7 @@ TQString KCMKttsMgr::loadNotifyEventsFromFile( const TQString& filename, bool cl addNotifyItem(eventSrc, event, NotifyAction::action( actionName ), message, talkerCode); } - return TQString::null; + return TQString(); } /** @@ -2347,7 +2347,7 @@ TQString KCMKttsMgr::saveNotifyEventsToFile(const TQString& filename) ts << doc.toString(); file.close(); - return TQString::null; + return TQString(); } void KCMKttsMgr::slotNotifyEnableCheckBox_toggled(bool checked) @@ -2396,7 +2396,7 @@ void KCMKttsMgr::slotNotifyListView_selectionChanged() bool defaultItem = ( item->text(nlvcEventSrc) == "default" ); m_kttsmgrw->notifyRemoveButton->setEnabled( !defaultItem ); } else { - bool defaultItem = ( item->parent()->text(nlvcEventSrc) == "default" ); + bool defaultItem = ( item->tqparent()->text(nlvcEventSrc) == "default" ); m_kttsmgrw->notifyPresentComboBox->setEnabled( defaultItem ); if ( defaultItem ) m_kttsmgrw->notifyPresentComboBox->setCurrentItem( NotifyPresent::present( item->text( nlvcEvent ) ) ); @@ -2482,9 +2482,9 @@ void KCMKttsMgr::slotNotifyTestButton_clicked() break; case NotifyAction::SpeakCustom: msg = m_kttsmgrw->notifyMsgLineEdit->text(); - msg.replace("%a", i18n("sample application")); - msg.replace("%e", i18n("sample event")); - msg.replace("%m", i18n("sample notification message")); + msg.tqreplace("%a", i18n("sample application")); + msg.tqreplace("%e", i18n("sample event")); + msg.tqreplace("%m", i18n("sample notification message")); break; } if (!msg.isEmpty()) sayMessage(msg, item->text(nlvcTalker)); @@ -2533,7 +2533,7 @@ TQListViewItem* KCMKttsMgr::addNotifyItem( else { if (event == "default") - eventName = i18n("All other %1 events").arg(eventSrcName); + eventName = i18n("All other %1 events").tqarg(eventSrcName); else eventName = NotifyEvent::getEventName(eventSrc, event); } @@ -2543,23 +2543,23 @@ TQListViewItem* KCMKttsMgr::addNotifyItem( TQString talkerName = talkerCode.getTranslatedDescription(); if (!eventSrcName.isEmpty() && !eventName.isEmpty() && !actionName.isEmpty() && !talkerName.isEmpty()) { - TQListViewItem* parentItem = lv->findItem(eventSrcName, nlvcEventSrcName); - if (!parentItem) + TQListViewItem* tqparentItem = lv->tqfindItem(eventSrcName, nlvcEventSrcName); + if (!tqparentItem) { item = lv->lastItem(); if (!item) - parentItem = new KListViewItem(lv, eventSrcName, TQString::null, TQString::null, + tqparentItem = new KListViewItem(lv, eventSrcName, TQString(), TQString(), eventSrc); else - parentItem = new KListViewItem(lv, item, eventSrcName, TQString::null, TQString::null, + tqparentItem = new KListViewItem(lv, item, eventSrcName, TQString(), TQString(), eventSrc); if ( !iconName.isEmpty() ) - parentItem->setPixmap( nlvcEventSrcName, SmallIcon( iconName ) ); + tqparentItem->setPixmap( nlvcEventSrcName, SmallIcon( iconName ) ); } // No duplicates. - item = lv->findItem( event, nlvcEvent ); - if ( !item || item->parent() != parentItem ) - item = new KListViewItem(parentItem, eventName, actionDisplayName, talkerName, + item = lv->tqfindItem( event, nlvcEvent ); + if ( !item || item->tqparent() != tqparentItem ) + item = new KListViewItem(tqparentItem, eventName, actionDisplayName, talkerName, eventSrc, event, actionName, talkerCode.getTalkerCode()); if ( action == NotifyAction::DoNotSpeak ) item->setPixmap( nlvcActionName, SmallIcon( "nospeak" ) ); @@ -2599,7 +2599,7 @@ void KCMKttsMgr::slotNotifyAddButton_clicked() int action = NotifyAction::DoNotSpeak; TQString msg; TalkerCode talkerCode; - item = lv->findItem( "default", nlvcEventSrc ); + item = lv->tqfindItem( "default", nlvcEventSrc ); if ( item ) { if ( item->childCount() > 0 ) item = item->firstChild(); @@ -2631,7 +2631,7 @@ void KCMKttsMgr::slotNotifyClearButton_clicked() TQString("default"), NotifyPresent::presentName(NotifyPresent::Passive), NotifyAction::SpeakEventName, - TQString::null, + TQString(), talkerCode ); TQListView* lv = m_kttsmgrw->notifyListView; lv->ensureItemVisible( item ); @@ -2644,11 +2644,11 @@ void KCMKttsMgr::slotNotifyRemoveButton_clicked() { TQListViewItem* item = m_kttsmgrw->notifyListView->selectedItem(); if (!item) return; - TQListViewItem* parentItem = item->parent(); + TQListViewItem* tqparentItem = item->tqparent(); delete item; - if (parentItem) + if (tqparentItem) { - if (parentItem->childCount() == 0) delete parentItem; + if (tqparentItem->childCount() == 0) delete tqparentItem; } slotNotifyListView_selectionChanged(); configChanged(); @@ -2688,16 +2688,16 @@ void KCMKttsMgr::slotNotifySaveButton_clicked() // ---------------------------------------------------------------------------- -KttsCheckListItem::KttsCheckListItem( TQListView *parent, TQListViewItem *after, +KttsCheckListItem::KttsCheckListItem( TQListView *tqparent, TQListViewItem *after, const TQString &text, Type tt, KCMKttsMgr* kcmkttsmgr ) : - TQCheckListItem(parent, after, text, tt), + TQCheckListItem(tqparent, after, text, tt), m_kcmkttsmgr(kcmkttsmgr) { } -KttsCheckListItem::KttsCheckListItem( TQListView *parent, +KttsCheckListItem::KttsCheckListItem( TQListView *tqparent, const TQString &text, Type tt, KCMKttsMgr* kcmkttsmgr ) : - TQCheckListItem(parent, text, tt), + TQCheckListItem(tqparent, text, tt), m_kcmkttsmgr(kcmkttsmgr) { } /*virtual*/ void KttsCheckListItem::stateChange(bool) diff --git a/kttsd/kcmkttsmgr/kcmkttsmgr.h b/kttsd/kcmkttsmgr/kcmkttsmgr.h index 0fc4141..5edb02e 100644 --- a/kttsd/kcmkttsmgr/kcmkttsmgr.h +++ b/kttsd/kcmkttsmgr/kcmkttsmgr.h @@ -21,7 +21,7 @@ #include "config.h" -// Qt includes. +// TQt includes. #include <tqmap.h> #include <tqlistview.h> @@ -55,9 +55,10 @@ class KCMKttsMgr : virtual public KSpeechSink { Q_OBJECT + TQ_OBJECT public: - KCMKttsMgr(TQWidget *parent, const char *name, const TQStringList &); + KCMKttsMgr(TQWidget *tqparent, const char *name, const TQStringList &); ~KCMKttsMgr(); @@ -285,7 +286,7 @@ class KCMKttsMgr : * Uses KTrader to convert a translated Filter Plugin Name to DesktopEntryName. * @param name The translated plugin name. From Name= line in .desktop file. * @return DesktopEntryName. The name of the .desktop file (less .desktop). - * TQString::null if not found. + * TQString() if not found. */ TQString FilterNameToDesktopEntryName(const TQString& name); @@ -510,13 +511,13 @@ class KCMKttsMgr : /// This is a small helper class to detect when user checks/unchecks a Filter in Filters tab /// and emit changed() signal. -class KttsCheckListItem : public QCheckListItem +class KttsCheckListItem : public TQCheckListItem { public: - KttsCheckListItem( TQListView *parent, + KttsCheckListItem( TQListView *tqparent, const TQString &text, Type tt = RadioButtonController, KCMKttsMgr* kcmkttsmgr = 0); - KttsCheckListItem( TQListView *parent, TQListViewItem *after, + KttsCheckListItem( TQListView *tqparent, TQListViewItem *after, const TQString &text, Type tt = RadioButtonController, KCMKttsMgr* kcmkttsmgr = 0); diff --git a/kttsd/kcmkttsmgr/kcmkttsmgrwidget.ui b/kttsd/kcmkttsmgr/kcmkttsmgrwidget.ui index 36942a3..ab66ca2 100644 --- a/kttsd/kcmkttsmgr/kcmkttsmgrwidget.ui +++ b/kttsd/kcmkttsmgr/kcmkttsmgrwidget.ui @@ -25,7 +25,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTabWidget" row="0" column="0"> + <widget class="TQTabWidget" row="0" column="0"> <property name="name"> <cstring>mainTab</cstring> </property> @@ -37,7 +37,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -48,7 +48,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>enableKttsdCheckBox</cstring> </property> @@ -59,7 +59,7 @@ <string>Check to start the KTTS Deamon and enable Text-to-Speech.</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>embedInSysTrayCheckBox</cstring> </property> @@ -83,16 +83,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -108,14 +108,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>showMainWindowOnStartupCheckBox</cstring> </property> @@ -131,9 +131,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="5" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="5" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout5_2</cstring> + <cstring>tqlayout5_2</cstring> </property> <hbox> <property name="name"> @@ -149,14 +149,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>autoexitMgrCheckBox</cstring> </property> @@ -172,7 +172,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>autostartMgrCheckBox</cstring> </property> @@ -188,7 +188,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -284,9 +284,9 @@ <string>This is a list of all the configured Talkers. A Talker is a speech synthesizer that has been configured with a language, voice, gender, speaking rate, and volume. Talkers higher in the list have higher priority. The topmost Talker will be used when no talker attributes have been specified by an application.</string> </property> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <vbox> <property name="name"> @@ -315,7 +315,7 @@ <comment>What's this text</comment> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>higherTalkerPriorityButton</cstring> </property> @@ -331,7 +331,7 @@ <string>U&p</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>lowerTalkerPriorityButton</cstring> </property> @@ -407,7 +407,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -418,7 +418,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -429,7 +429,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>notifyGroup</cstring> </property> @@ -493,15 +493,15 @@ <string>This is a list of configured application events and actions to be taken when received. The "default" event governs all events not specifically configured.</string> </property> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>layout21</cstring> + <cstring>tqlayout21</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>notifyPresentLabel</cstring> </property> @@ -523,7 +523,7 @@ <string>Applies only to the default event. Does not affect application-specific events. Only events that display in the manner which you select will be spoken.</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>notifyPresentComboBox</cstring> </property> @@ -533,15 +533,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout28</cstring> + <cstring>tqlayout28</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>notifyAddButton</cstring> </property> @@ -555,7 +555,7 @@ <string>Click to configure notification for a specific application event.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>notifyRemoveButton</cstring> </property> @@ -576,14 +576,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>152</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>notifyClearButton</cstring> </property> @@ -594,7 +594,7 @@ <string>Removes all the application specific events. The default event remains.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>notifyLoadButton</cstring> </property> @@ -605,7 +605,7 @@ <string>Click to read configured notification events from a file.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>notifySaveButton</cstring> </property> @@ -618,7 +618,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="3" column="0"> + <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> <cstring>notifyExceptionActionLayout</cstring> </property> @@ -626,7 +626,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="0" column="2"> + <widget class="TQPushButton" row="0" column="2"> <property name="name"> <cstring>notifyTestButton</cstring> </property> @@ -640,7 +640,7 @@ <string>Click this button to test the notification. A sample message will be spoken. Note: The Text-to-Speech system must be enabled.</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>notifyActionLabel</cstring> </property> @@ -662,7 +662,7 @@ <string><qt>Specifies how KTTS should speak the event when received. If you select "Speak custom text", enter the text in the box. You may use the following substitution strings in the text:<dl><dt>%e</dt><dd>Name of the event</dd><dt>%a</dt><dd>Application that sent the event</dd><dt>%m</dt><dd>The message sent by the application</dd></dl></qt></string> </property> </widget> - <widget class="QLineEdit" row="0" column="3"> + <widget class="TQLineEdit" row="0" column="3"> <property name="name"> <cstring>notifyMsgLineEdit</cstring> </property> @@ -670,7 +670,7 @@ <string><qt>Specifies how KTTS should speak the event when received. If you select "Speak custom text", enter the text in the box. You may use the following substitution strings in the text:<dl><dt>%e</dt><dd>Name of the event</dd><dt>%a</dt><dd>Application that sent the event</dd><dt>%m</dt><dd>The message sent by the application</dd></dl></qt></string> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <property name="name"> <cstring>notifyActionComboBox</cstring> </property> @@ -688,15 +688,15 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget" row="4" column="0"> + <widget class="TQLayoutWidget" row="4" column="0"> <property name="name"> - <cstring>layout19_2</cstring> + <cstring>tqlayout19_2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>notifyTalkerLabel</cstring> </property> @@ -751,15 +751,15 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout17</cstring> + <cstring>tqlayout17</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>notifyEnableCheckBox</cstring> </property> @@ -780,14 +780,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>notifyExcludeEventsWithSoundCheckBox</cstring> </property> @@ -805,7 +805,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -816,9 +816,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <hbox> <property name="name"> @@ -846,9 +846,9 @@ <string>This is a list of all the configured Filters. Filters higher in the list are applied first. Filters modify text before it is spoken. They can be used to substitute for mispronounced words, transform XML from one form to another, or change the default Talker to be used for speech output.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9_2</cstring> + <cstring>tqlayout9_2</cstring> </property> <vbox> <property name="name"> @@ -877,7 +877,7 @@ <comment>What's this text</comment> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>higherFilterPriorityButton</cstring> </property> @@ -896,7 +896,7 @@ <string>Click to move selected filter up in the list. Filters higher in the list are applied first.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>lowerFilterPriorityButton</cstring> </property> @@ -975,7 +975,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -986,9 +986,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout18</cstring> + <cstring>tqlayout18</cstring> </property> <hbox> <property name="name"> @@ -1016,15 +1016,15 @@ <string>This is a list of all the configured Sentence Boundary Detector (SBD) Filters. SBDs break long text jobs up into sentences, which reduces the time before a job begins speaking, and permits you to advance or rewind through a job. SBDs are applied in the order listed (top to bottom) after all the normal filters at the top of this screen have been applied. Filtering stops when the first SBD modifies the text.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>sbdButton</cstring> </property> @@ -1053,7 +1053,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>11</height> @@ -1066,7 +1066,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -1077,9 +1077,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <grid> <property name="name"> @@ -1116,7 +1116,7 @@ <comment>What's this text</comment> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>textPostMsgCheck</cstring> </property> @@ -1130,7 +1130,7 @@ <string>Check the Post-message box and enter a Post-message, which will be spoken when a text job resumes after being interrupted by another message.</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>textPreSndCheck</cstring> </property> @@ -1152,7 +1152,7 @@ <string>Check the Pre-sound box and choose a Pre-sound audio file, which will sound when a text job is interrupted by another message.</string> </property> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>textPreMsgCheck</cstring> </property> @@ -1188,7 +1188,7 @@ <string>Check the Post-sound and choose a Post-sound audio file, which will sound before a text job resumes after being interrupted by another message.</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> <cstring>textPostSndCheck</cstring> </property> @@ -1229,7 +1229,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>180</height> @@ -1238,7 +1238,7 @@ </spacer> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -1249,15 +1249,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>keepAudioCheckBox</cstring> </property> @@ -1289,15 +1289,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>timeLabel</cstring> </property> @@ -1350,7 +1350,7 @@ <string>Sets the speed of speech. Slide the slider to the left to slow speech down; to the right to increase talking speed. Anything less than 75 percent is considered "slow", and anything greater than 125 percent is considered "fast". You cannot change the speed of MultiSyn voices.</string> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>timeSlider</cstring> </property> @@ -1391,7 +1391,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -1408,14 +1408,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>90</width> <height>20</height> </size> </property> </spacer> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>audioButtonGroup</cstring> </property> @@ -1437,15 +1437,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>sinkLabel</cstring> </property> @@ -1480,15 +1480,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="3" column="1"> + <widget class="TQLayoutWidget" row="3" column="1"> <property name="name"> - <cstring>layout8_2_2</cstring> + <cstring>tqlayout8_2_2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>akodeSinkLabel</cstring> </property> @@ -1523,7 +1523,7 @@ </widget> </hbox> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>gstreamerRadioButton</cstring> </property> @@ -1540,7 +1540,7 @@ <string><p>Check to use the GStreamer audio output system. You must also select a <b>Sink</b> plugin.</p></string> </property> </widget> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>artsRadioButton</cstring> </property> @@ -1557,7 +1557,7 @@ <string>Check to use the KDE aRts system for audio output.</string> </property> </widget> - <widget class="QRadioButton" row="3" column="0"> + <widget class="TQRadioButton" row="3" column="0"> <property name="name"> <cstring>akodeRadioButton</cstring> </property> @@ -1580,15 +1580,15 @@ <string><p>Check to use aKode for audio output. You must also select a <b>Sink</b>.</p></string> </property> </widget> - <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout21</cstring> + <cstring>tqlayout21</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>alsaRadioButton</cstring> </property> @@ -1611,15 +1611,15 @@ <string>Check to use Advanced Linux Sound Architecture (ALSA) for audio output.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8_2</cstring> + <cstring>tqlayout8_2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>pcmLabel</cstring> </property> @@ -1654,7 +1654,7 @@ </widget> </hbox> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>pcmCustom</cstring> </property> @@ -1888,13 +1888,13 @@ <include location="global" impldecl="in implementation">klocale.h</include> <include location="global" impldecl="in implementation">kdebug.h</include> </includes> -<signals> +<Q_SIGNALS> <signal>configChanged()</signal> -</signals> -<slots> +</Q_SIGNALS> +<Q_SLOTS> <slot access="private">slotConfigChanged()</slot> -</slots> -<layoutdefaults spacing="6" margin="6"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="6"/> <includehints> <includehint>kcmodule.h</includehint> <includehint>klistview.h</includehint> diff --git a/kttsd/kcmkttsmgr/kcmkttsmgrwidget.ui.h b/kttsd/kcmkttsmgr/kcmkttsmgrwidget.ui.h index 206524a..ff6ebb3 100644 --- a/kttsd/kcmkttsmgr/kcmkttsmgrwidget.ui.h +++ b/kttsd/kcmkttsmgr/kcmkttsmgrwidget.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/kttsd/kcmkttsmgr/selectevent.cpp b/kttsd/kcmkttsmgr/selectevent.cpp index 8a77c38..55a78d7 100644 --- a/kttsd/kcmkttsmgr/selectevent.cpp +++ b/kttsd/kcmkttsmgr/selectevent.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -// Qt includes. +// TQt includes. #include <tqcombobox.h> // KDE includes @@ -36,8 +36,8 @@ #include "utils.h" #include "selectevent.h" -SelectEvent::SelectEvent(TQWidget* parent, const char* name, WFlags fl, const TQString& initEventSrc) - : SelectEventWidget(parent,name,fl) +SelectEvent::SelectEvent(TQWidget* tqparent, const char* name, WFlags fl, const TQString& initEventSrc) + : SelectEventWidget(tqparent,name,fl) { // Load list of event sources (applications). TQStringList fullpaths = @@ -61,13 +61,13 @@ SelectEvent::SelectEvent(TQWidget* parent, const char* name, WFlags fl, const TQ if ( !relativePath.isEmpty() ) { KConfig* config = new KConfig(relativePath, true, false, "data"); - config->setGroup( TQString::fromLatin1("!Global!") ); - TQString icon = config->readEntry(TQString::fromLatin1("IconName"), - TQString::fromLatin1("misc")); - TQString description = config->readEntry( TQString::fromLatin1("Comment"), + config->setGroup( TQString::tqfromLatin1("!Global!") ); + TQString icon = config->readEntry(TQString::tqfromLatin1("IconName"), + TQString::tqfromLatin1("misc")); + TQString description = config->readEntry( TQString::tqfromLatin1("Comment"), i18n("No description available") ); delete config; - int index = relativePath.find( '/' ); + int index = relativePath.tqfind( '/' ); TQString appname; if ( index >= 0 ) appname = relativePath.left( index ); @@ -89,7 +89,7 @@ void SelectEvent::slotEventSrcComboBox_activated(int index) eventsListView->clear(); TQListViewItem* item = 0; TQString eventSrc = m_eventSrcNames[index]; - TQString configFilename = eventSrc + TQString::fromLatin1( "/eventsrc" ); + TQString configFilename = eventSrc + TQString::tqfromLatin1( "/eventsrc" ); KConfig* config = new KConfig( configFilename, true, false, "data" ); TQStringList eventNames = config->groupList(); uint eventNamesCount = eventNames.count(); @@ -99,8 +99,8 @@ void SelectEvent::slotEventSrcComboBox_activated(int index) if ( eventName != "!Global!" ) { config->setGroup( eventName ); - TQString eventDesc = config->readEntry( TQString::fromLatin1( "Comment" ), - config->readEntry( TQString::fromLatin1( "Name" ))); + TQString eventDesc = config->readEntry( TQString::tqfromLatin1( "Comment" ), + config->readEntry( TQString::tqfromLatin1( "Name" ))); if ( !item ) item = new KListViewItem( eventsListView, eventDesc, eventName ); else @@ -110,7 +110,7 @@ void SelectEvent::slotEventSrcComboBox_activated(int index) delete config; eventsListView->sort(); item = eventsListView->lastChild(); - TQString eventDesc = i18n("All other %1 events").arg(eventSrcComboBox->currentText()); + TQString eventDesc = i18n("All other %1 events").tqarg(eventSrcComboBox->currentText()); if ( !item ) item = new KListViewItem( eventsListView, eventDesc, "default" ); else @@ -129,18 +129,18 @@ TQString SelectEvent::getEvent() if ( item ) return item->text(1); else - return TQString::null; + return TQString(); } // returns e.g. "kwin/eventsrc" from a given path // "/opt/kde3/share/apps/kwin/eventsrc" TQString SelectEvent::makeRelative( const TQString& fullPath ) { - int slash = fullPath.findRev( '/' ) - 1; - slash = fullPath.findRev( '/', slash ); + int slash = fullPath.tqfindRev( '/' ) - 1; + slash = fullPath.tqfindRev( '/', slash ); if ( slash < 0 ) - return TQString::null; + return TQString(); return fullPath.mid( slash+1 ); } diff --git a/kttsd/kcmkttsmgr/selectevent.h b/kttsd/kcmkttsmgr/selectevent.h index 95d60f9..f7ce996 100644 --- a/kttsd/kcmkttsmgr/selectevent.h +++ b/kttsd/kcmkttsmgr/selectevent.h @@ -29,16 +29,17 @@ class SelectEvent : public SelectEventWidget { Q_OBJECT + TQ_OBJECT public: /** * Constructor. - * @param parent Inherited KDialog parameter. + * @param tqparent Inherited KDialog parameter. * @param name Inherited KDialog parameter. * @param initEventSrc Event source to start with. */ - SelectEvent(TQWidget* parent = 0, const char* name = 0, WFlags fl = 0, - const TQString& initEventSrc = TQString::null ); + SelectEvent(TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0, + const TQString& initEventSrc = TQString() ); /** * Destructor. diff --git a/kttsd/kcmkttsmgr/selecteventwidget.ui b/kttsd/kcmkttsmgr/selecteventwidget.ui index 13b91f1..ece6a71 100644 --- a/kttsd/kcmkttsmgr/selecteventwidget.ui +++ b/kttsd/kcmkttsmgr/selecteventwidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>SelectEventWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>SelectEventWidget</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>eventSrcLabel</cstring> </property> @@ -27,7 +27,7 @@ <cstring>eventSrcComboBox</cstring> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <property name="name"> <cstring>eventSrcComboBox</cstring> </property> @@ -55,7 +55,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> </includehints> diff --git a/kttsd/kttsd/filtermgr.cpp b/kttsd/kttsd/filtermgr.cpp index 88dc6b0..0889143 100644 --- a/kttsd/kttsd/filtermgr.cpp +++ b/kttsd/kttsd/filtermgr.cpp @@ -37,8 +37,8 @@ /** * Constructor. */ -FilterMgr::FilterMgr( TQObject *parent, const char *name) : - KttsFilterProc(parent, name) +FilterMgr::FilterMgr( TQObject *tqparent, const char *name) : + KttsFilterProc(tqparent, name) { // kdDebug() << "FilterMgr::FilterMgr: Running" << endl; m_state = fsIdle; @@ -101,7 +101,7 @@ bool FilterMgr::init(KConfig *config, const TQString& /*configGroup*/) // and DesktopEntryName won't change. if (desktopEntryName.isEmpty()) { - TQString filterPlugInName = config->readEntry("PlugInName", TQString::null); + TQString filterPlugInName = config->readEntry("PlugInName", TQString()); // See if the translated name will untranslate. If not, well, sorry. desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName); // Record the DesktopEntryName from now on. @@ -116,8 +116,8 @@ bool FilterMgr::init(KConfig *config, const TQString& /*configGroup*/) filterProc->init( config, groupName ); m_filterList.append( filterProc ); } - if (config->readEntry("DocType").contains("html") || - config->readEntry("RootElement").contains("html")) + if (config->readEntry("DocType").tqcontains("html") || + config->readEntry("RootElement").tqcontains("html")) m_supportsHTML = true; } } @@ -310,7 +310,7 @@ TQString FilterMgr::getOutput() void FilterMgr::ackFinished() { m_state = fsIdle; - m_text = TQString::null; + m_text = TQString(); } /** @@ -352,7 +352,7 @@ KttsFilterProc* FilterMgr::loadFilterPlugin(const TQString& desktopEntryName) // Find the plugin. KTrader::OfferList offers = KTrader::self()->query("KTTSD/FilterPlugin", - TQString("DesktopEntryName == '%1'").arg(desktopEntryName)); + TQString("DesktopEntryName == '%1'").tqarg(desktopEntryName)); if (offers.count() == 1) { @@ -392,14 +392,14 @@ KttsFilterProc* FilterMgr::loadFilterPlugin(const TQString& desktopEntryName) * Uses KTrader to convert a translated Filter Plugin Name to DesktopEntryName. * @param name The translated plugin name. From Name= line in .desktop file. * @return DesktopEntryName. The name of the .desktop file (less .desktop). - * TQString::null if not found. + * TQString() if not found. */ TQString FilterMgr::FilterNameToDesktopEntryName(const TQString& name) { - if (name.isEmpty()) return TQString::null; + if (name.isEmpty()) return TQString(); KTrader::OfferList offers = KTrader::self()->query("KTTSD/FilterPlugin"); for (uint ndx = 0; ndx < offers.count(); ++ndx) if (offers[ndx]->name() == name) return offers[ndx]->desktopEntryName(); - return TQString::null; + return TQString(); } diff --git a/kttsd/kttsd/filtermgr.h b/kttsd/kttsd/filtermgr.h index 2a8ea23..539329b 100644 --- a/kttsd/kttsd/filtermgr.h +++ b/kttsd/kttsd/filtermgr.h @@ -26,7 +26,7 @@ #ifndef _FILTERMGR_H_ #define _FILTERMGR_H_ -// Qt includes. +// TQt includes. #include <tqptrlist.h> // KTTS includes. @@ -40,12 +40,13 @@ typedef TQPtrList<KttsFilterProc> FilterList; class FilterMgr : public KttsFilterProc { Q_OBJECT + TQ_OBJECT public: /** * Constructor. */ - FilterMgr(TQObject *parent = 0, const char *name = 0); + FilterMgr(TQObject *tqparent = 0, const char *name = 0); /** * Destructor. @@ -167,7 +168,7 @@ class FilterMgr : public KttsFilterProc // Uses KTrader to convert a translated Filter Plugin Name to DesktopEntryName. // @param name The translated plugin name. From Name= line in .desktop file. // @return DesktopEntryName. The name of the .desktop file (less .desktop). - // TQString::null if not found. + // TQString() if not found. TQString FilterNameToDesktopEntryName(const TQString& name); // List of filters. diff --git a/kttsd/kttsd/kttsd.cpp b/kttsd/kttsd/kttsd.cpp index 5a643a1..c546100 100644 --- a/kttsd/kttsd/kttsd.cpp +++ b/kttsd/kttsd/kttsd.cpp @@ -18,7 +18,7 @@ * * ***************************************************************************/ -// Qt includes. +// TQt includes. #include <tqcstring.h> #include <tqclipboard.h> #include <tqtextstream.h> @@ -49,9 +49,9 @@ * Note that most of the real tts work occurs in Speaker. */ -KTTSD::KTTSD(const TQCString& objId, TQObject *parent, const char *name) : +KTTSD::KTTSD(const TQCString& objId, TQObject *tqparent, const char *name) : DCOPObject(objId), - TQObject(parent, name) + TQObject(tqparent, name) { // kdDebug() << "KTTSD::KTTSD Running" << endl; m_speaker = 0; @@ -479,7 +479,7 @@ uint KTTSD::getTextJobCount() */ TQString KTTSD::getTextJobNumbers() { - if (!m_speaker) return TQString::null; + if (!m_speaker) return TQString(); return m_speechData->getTextJobNumbers(); } @@ -540,7 +540,7 @@ TQByteArray KTTSD::getTextJobInfo(const uint jobNum /*=0*/) */ TQString KTTSD::talkerCodeToTalkerId(const TQString& talkerCode) { - if (!m_talkerMgr) return TQString::null; + if (!m_talkerMgr) return TQString(); return m_talkerMgr->talkerCodeToTalkerId(fixNullString(talkerCode)); } @@ -728,7 +728,7 @@ void KTTSD::changeTextTalker(const TQString &talker, uint jobNum) */ TQString KTTSD::userDefaultTalker() { - if (!m_talkerMgr) return TQString::null; + if (!m_talkerMgr) return TQString(); return m_talkerMgr->userDefaultTalker(); } @@ -790,7 +790,7 @@ uint KTTSD::moveRelTextSentence(const int n, const uint jobNum /*=0*/) void KTTSD::speakClipboard() { // Get the clipboard object. - QClipboard *cb = kapp->clipboard(); + TQClipboard *cb = kapp->tqclipboard(); // Copy text from the clipboard. TQString text = cb->text(); @@ -893,20 +893,20 @@ void KTTSD::notificationSignal( const TQString& event, const TQString& fromApp, TQString msg; TQString talker; // Check for app-specific action. - if ( m_speechData->notifyAppMap.contains( fromApp ) ) + if ( m_speechData->notifyAppMap.tqcontains( fromApp ) ) { NotifyEventMap notifyEventMap = m_speechData->notifyAppMap[ fromApp ]; - if ( notifyEventMap.contains( event ) ) + if ( notifyEventMap.tqcontains( event ) ) { found = true; notifyOptions = notifyEventMap[ event ]; } else { // Check for app-specific default. - if ( notifyEventMap.contains( "default" ) ) + if ( notifyEventMap.tqcontains( "default" ) ) { found = true; notifyOptions = notifyEventMap[ "default" ]; - notifyOptions.eventName = TQString::null; + notifyOptions.eventName = TQString(); } } } @@ -965,14 +965,14 @@ void KTTSD::notificationSignal( const TQString& event, const TQString& fromApp, break; case NotifyAction::SpeakCustom: msg = notifyOptions.customMsg; - msg.replace( "%a", fromApp ); - msg.replace( "%m", text ); - if ( msg.contains( "%e" ) ) + msg.tqreplace( "%a", fromApp ); + msg.tqreplace( "%m", text ); + if ( msg.tqcontains( "%e" ) ) { if ( notifyOptions.eventName.isEmpty() ) - msg.replace( "%e", NotifyEvent::getEventName( fromApp, event ) ); + msg.tqreplace( "%e", NotifyEvent::getEventName( fromApp, event ) ); else - msg.replace( "%e", notifyOptions.eventName ); + msg.tqreplace( "%e", notifyOptions.eventName ); } break; } @@ -1084,21 +1084,21 @@ uint KTTSD::applyDefaultJobNum(const uint jobNum) /* * Fixes a string argument passed in via dcop. -* If NULL or "0" return TQString::null. +* If NULL or "0" return TQString(). */ TQString KTTSD::fixNullString(const TQString &talker) const { - if (!talker) return TQString::null; - if (talker == "0") return TQString::null; + if (!talker) return TQString(); + if (talker == "0") return TQString(); return talker; } // kspeech is obsolete. Applications should use KSpeech instead. // Constructor. -kspeech::kspeech(const TQCString& objId, TQObject *parent, const char *name) : +kspeech::kspeech(const TQCString& objId, TQObject *tqparent, const char *name) : DCOPObject(objId), - TQObject(parent, name), + TQObject(tqparent, name), m_kttsd("KSpeech") { } diff --git a/kttsd/kttsd/kttsd.h b/kttsd/kttsd/kttsd.h index 075383b..c082f1d 100644 --- a/kttsd/kttsd/kttsd.h +++ b/kttsd/kttsd/kttsd.h @@ -39,6 +39,7 @@ class KTTSD : public TQObject, virtual public KSpeech { Q_OBJECT +// TQ_OBJECT K_DCOP public: @@ -48,7 +49,7 @@ class KTTSD : public TQObject, virtual public KSpeech * Create objects, speechData and speaker. * Start thread */ - KTTSD(const TQCString& objId, TQObject *parent=0, const char *name=0); + KTTSD(const TQCString& objId, TQObject *tqparent=0, const char *name=0); /** * Destructor. @@ -608,7 +609,7 @@ class KTTSD : public TQObject, virtual public KSpeech /* * Fixes a talker argument passed in via dcop. - * If NULL or "0" return TQString::null. + * If NULL or "0" return TQString(). */ TQString fixNullString(const TQString &talker) const; @@ -632,11 +633,12 @@ class KTTSD : public TQObject, virtual public KSpeech class kspeech : public TQObject, virtual public KSpeech { Q_OBJECT +// TQ_OBJECT K_DCOP public: // Constructor. - kspeech(const TQCString& objId, TQObject *parent=0, const char *name=0); + kspeech(const TQCString& objId, TQObject *tqparent=0, const char *name=0); // Destructor. ~kspeech(); diff --git a/kttsd/kttsd/speaker.cpp b/kttsd/kttsd/speaker.cpp index 42fa39e..1434ab9 100644 --- a/kttsd/kttsd/speaker.cpp +++ b/kttsd/kttsd/speaker.cpp @@ -19,7 +19,7 @@ * * ******************************************************************************/ -// Qt includes. +// TQt includes. #include <tqfile.h> #include <tqtimer.h> #include <tqdir.h> @@ -77,7 +77,7 @@ * You might have to wait for the plugin to complete before asking it * to perform the next operation, but in the meantime, there might be * other useful work that can be performed. -* - In no case allow the main thread Qt event loop to block. +* - In no case allow the main thread TQt event loop to block. * - Plugins that do not have asynchronous support are wrapped in the * ThreadedPlugin class, which attempts to make them as asynchronous as * it can, but there are limits. @@ -107,8 +107,8 @@ * Loads plugins. */ Speaker::Speaker( SpeechData*speechData, TalkerMgr* talkerMgr, - TQObject *parent, const char *name) : - TQObject(parent, name), + TQObject *tqparent, const char *name) : + TQObject(tqparent, name), m_speechData(speechData), m_talkerMgr(talkerMgr) { @@ -806,7 +806,7 @@ TQString Speaker::uttStateToStr(uttState state) case usPreempted: return "usPreempted"; case usFinished: return "usFinished"; } - return TQString::null; + return TQString(); } /** @@ -829,7 +829,7 @@ TQString Speaker::uttTypeToStr(uttType utType) case utStartOfJob: return "utStartOfJob"; case utEndOfJob: return "utEndOfJob"; } - return TQString::null; + return TQString(); } /** @@ -846,7 +846,7 @@ TQString Speaker::pluginStateToStr(pluginState state) case psSynthing: return "psSynthing"; case psFinished: return "psFinished"; } - return TQString::null; + return TQString(); } /** @@ -864,7 +864,7 @@ TQString Speaker::jobStateToStr(int state) case KSpeech::jsPaused: return "jsPaused"; case KSpeech::jsFinished: return "jsFinished"; } - return TQString::null; + return TQString(); } /** @@ -926,7 +926,7 @@ bool Speaker::isSsml(const TQString &text) } /** - * Determines the initial state of an utterance. If the utterance contains + * Determines the initial state of an utterance. If the utterance tqcontains * SSML, the state is set to usWaitingTransform. Otherwise, if the plugin * supports async synthesis, sets to usWaitingSynth, otherwise usWaitingSay. * If an utterance has already been transformed, usWaitingTransform is @@ -1019,7 +1019,7 @@ bool Speaker::getNextUtterance() utt->state = usNone; utt->audioPlayer = 0; utt->audioStretcher = 0; - utt->audioUrl = TQString::null; + utt->audioUrl = TQString(); utt->plugin = m_talkerMgr->talkerToPlugin(utt->sentence->talker); // Save some time by setting initial state now. setInitialUtteranceState(*utt); @@ -1079,7 +1079,7 @@ bool Speaker::getNextUtterance() { Utt intrUtt; intrUtt.sentence = new mlText; - intrUtt.sentence->text = TQString::null; + intrUtt.sentence->text = TQString(); intrUtt.sentence->talker = utt->sentence->talker; intrUtt.sentence->appId = utt->sentence->appId; intrUtt.sentence->jobNum = utt->sentence->jobNum; @@ -1099,11 +1099,11 @@ bool Speaker::getNextUtterance() intrUtt.sentence = new mlText; intrUtt.sentence->text = m_speechData->textPreMsg; // Interruptions are spoken using default Talker. - intrUtt.sentence->talker = TQString::null; + intrUtt.sentence->talker = TQString(); intrUtt.sentence->appId = utt->sentence->appId; intrUtt.sentence->jobNum = utt->sentence->jobNum; intrUtt.sentence->seq = 0; - intrUtt.audioUrl = TQString::null; + intrUtt.audioUrl = TQString(); intrUtt.audioPlayer = 0; intrUtt.utType = utInterruptMsg; intrUtt.isSSML = isSsml(intrUtt.sentence->text); @@ -1125,7 +1125,7 @@ bool Speaker::getNextUtterance() { Utt resUtt; resUtt.sentence = new mlText; - resUtt.sentence->text = TQString::null; + resUtt.sentence->text = TQString(); resUtt.sentence->talker = utt->sentence->talker; resUtt.sentence->appId = utt->sentence->appId; resUtt.sentence->jobNum = utt->sentence->jobNum; @@ -1144,11 +1144,11 @@ bool Speaker::getNextUtterance() Utt resUtt; resUtt.sentence = new mlText; resUtt.sentence->text = m_speechData->textPostMsg; - resUtt.sentence->talker = TQString::null; + resUtt.sentence->talker = TQString(); resUtt.sentence->appId = utt->sentence->appId; resUtt.sentence->jobNum = utt->sentence->jobNum; resUtt.sentence->seq = 0; - resUtt.audioUrl = TQString::null; + resUtt.audioUrl = TQString(); resUtt.audioPlayer = 0; resUtt.utType = utResumeMsg; resUtt.isSSML = isSsml(resUtt.sentence->text); @@ -1173,12 +1173,12 @@ bool Speaker::getNextUtterance() { Utt jobUtt; jobUtt.sentence = new mlText; - jobUtt.sentence->text = TQString::null; - jobUtt.sentence->talker = TQString::null; + jobUtt.sentence->text = TQString(); + jobUtt.sentence->talker = TQString(); jobUtt.sentence->appId = m_lastAppId; jobUtt.sentence->jobNum = m_lastJobNum; jobUtt.sentence->seq = 0; - jobUtt.audioUrl = TQString::null; + jobUtt.audioUrl = TQString(); jobUtt.utType = utEndOfJob; jobUtt.isSSML = false; jobUtt.plugin = 0; @@ -1194,12 +1194,12 @@ bool Speaker::getNextUtterance() { Utt jobUtt; jobUtt.sentence = new mlText; - jobUtt.sentence->text = TQString::null; - jobUtt.sentence->talker = TQString::null; + jobUtt.sentence->text = TQString(); + jobUtt.sentence->talker = TQString(); jobUtt.sentence->appId = m_lastAppId; jobUtt.sentence->jobNum = m_lastJobNum; jobUtt.sentence->seq = utt->sentence->seq; - jobUtt.audioUrl = TQString::null; + jobUtt.audioUrl = TQString(); jobUtt.utType = utStartOfJob; jobUtt.isSSML = false; jobUtt.plugin = 0; @@ -1220,12 +1220,12 @@ bool Speaker::getNextUtterance() { Utt jobUtt; jobUtt.sentence = new mlText; - jobUtt.sentence->text = TQString::null; - jobUtt.sentence->talker = TQString::null; + jobUtt.sentence->text = TQString(); + jobUtt.sentence->talker = TQString(); jobUtt.sentence->appId = m_lastAppId; jobUtt.sentence->jobNum = m_lastJobNum; jobUtt.sentence->seq = 0; - jobUtt.audioUrl = TQString::null; + jobUtt.audioUrl = TQString(); jobUtt.utType = utEndOfJob; jobUtt.isSSML = false; jobUtt.plugin = 0; @@ -1316,7 +1316,7 @@ uttIterator Speaker::deleteUtterance(uttIterator it) TQCString jobStr; jobStr.sprintf("%08i", it->sentence->jobNum); TQString dest = m_speechData->keepAudioPath + "/kttsd-" + - TQString("%1-%2").arg(jobStr).arg(seqStr) + ".wav"; + TQString("%1-%2").tqarg(jobStr.data()).tqarg(seqStr.data()) + ".wav"; TQFile::remove(dest); TQDir d; d.rename(it->audioUrl, dest); @@ -1418,7 +1418,7 @@ bool Speaker::startPlayingUtterance(uttIterator it) (m_speechData->getTextJobState(it->sentence->jobNum) != KSpeech::jsPaused)) { // kdDebug() << "Speaker::startPlayingUtterance: resuming play" << endl; - it->audioPlayer->startPlay(TQString::null); // resume + it->audioPlayer->startPlay(TQString()); // resume it->state = usPlaying; if (!m_timer->start(timerInterval, FALSE)) kdDebug() << "Speaker::startPlayingUtterance: timer.start failed" << endl; @@ -1431,7 +1431,7 @@ bool Speaker::startPlayingUtterance(uttIterator it) { // Preempted playback automatically resumes. // Note: Must call stop(), even if player not currently playing. Why? - it->audioPlayer->startPlay(TQString::null); // resume + it->audioPlayer->startPlay(TQString()); // resume it->state = usPlaying; if (!m_timer->start(timerInterval, FALSE)) kdDebug() << "Speaker::startPlayingUtterance: timer.start failed" << endl; @@ -1541,7 +1541,7 @@ Player* Speaker::createPlayerObject() } } KTrader::OfferList offers = KTrader::self()->query( - "KTTSD/AudioPlugin", TQString("DesktopEntryName == '%1'").arg(plugInName)); + "KTTSD/AudioPlugin", TQString("DesktopEntryName == '%1'").tqarg(plugInName)); if(offers.count() == 1) { diff --git a/kttsd/kttsd/speaker.h b/kttsd/kttsd/speaker.h index 6c81ada..04e2190 100644 --- a/kttsd/kttsd/speaker.h +++ b/kttsd/kttsd/speaker.h @@ -23,7 +23,7 @@ #ifndef _SPEAKER_H_ #define _SPEAKER_H_ -// Qt includes. +// TQt includes. #include <tqobject.h> #include <tqvaluevector.h> #include <tqevent.h> @@ -109,8 +109,9 @@ const int timerInterval = 500; * This class is in charge of getting the messages, warnings and text from * the queue and call the plug ins function to actually speak the texts. */ -class Speaker : public QObject{ +class Speaker : public TQObject{ Q_OBJECT + TQ_OBJECT public: /** @@ -118,7 +119,7 @@ class Speaker : public QObject{ * Calls load plug ins */ Speaker(SpeechData* speechData, TalkerMgr* talkerMgr, - TQObject *parent = 0, const char *name = 0); + TQObject *tqparent = 0, const char *name = 0); /** * Destructor @@ -429,7 +430,7 @@ class Speaker : public QObject{ bool isSsml(const TQString &text); /** - * Determines the initial state of an utterance. If the utterance contains + * Determines the initial state of an utterance. If the utterance tqcontains * SSML, the state is set to usWaitingTransform. Otherwise, if the plugin * supports async synthesis, sets to usWaitingSynth, otherwise usWaitingSay. * If an utterance has already been transformed, usWaitingTransform is diff --git a/kttsd/kttsd/speechdata.cpp b/kttsd/kttsd/speechdata.cpp index 1c8f90f..e3793a5 100644 --- a/kttsd/kttsd/speechdata.cpp +++ b/kttsd/kttsd/speechdata.cpp @@ -25,7 +25,7 @@ // C++ includes. #include <stdlib.h> -// Qt includes. +// TQt includes. #include <tqregexp.h> #include <tqpair.h> #include <tqvaluelist.h> @@ -156,8 +156,8 @@ void SpeechData::loadNotifyEventsFromFile( const TQString& filename, bool clear) { notifyDefaultPresent = NotifyPresent::Passive; notifyDefaultOptions.action = NotifyAction::SpeakMsg; - notifyDefaultOptions.talker = TQString::null; - notifyDefaultOptions.customMsg = TQString::null; + notifyDefaultOptions.talker = TQString(); + notifyDefaultOptions.customMsg = TQString(); notifyAppMap.clear(); } @@ -195,7 +195,7 @@ void SpeechData::loadNotifyEventsFromFile( const TQString& filename, bool clear) notifyEventMap[ event ] = notifyOptions; notifyAppMap[ eventSrc ] = notifyEventMap; } else { - notifyOptions.eventName = TQString::null; + notifyOptions.eventName = TQString(); notifyDefaultPresent = NotifyPresent::present( event ); notifyDefaultOptions = notifyOptions; } @@ -423,24 +423,24 @@ TQStringList SpeechData::parseText(const TQString &text, const TQCString &appId } // See if app has specified a custom sentence delimiter and use it, otherwise use default. TQRegExp sentenceDelimiter; - if (sentenceDelimiters.find(appId) != sentenceDelimiters.end()) + if (sentenceDelimiters.tqfind(appId) != sentenceDelimiters.end()) sentenceDelimiter = TQRegExp(sentenceDelimiters[appId]); else sentenceDelimiter = TQRegExp("([\\.\\?\\!\\:\\;]\\s)|(\\n *\\n)"); TQString temp = text; // Replace spaces, tabs, and formfeeds with a single space. - temp.replace(TQRegExp("[ \\t\\f]+"), " "); + temp.tqreplace(TQRegExp("[ \\t\\f]+"), " "); // Replace sentence delimiters with tab. - temp.replace(sentenceDelimiter, "\\1\t"); + temp.tqreplace(sentenceDelimiter, "\\1\t"); // Replace remaining newlines with spaces. - temp.replace("\n"," "); - temp.replace("\r"," "); + temp.tqreplace("\n"," "); + temp.tqreplace("\r"," "); // Remove leading spaces. - temp.replace(TQRegExp("\\t +"), "\t"); + temp.tqreplace(TQRegExp("\\t +"), "\t"); // Remove trailing spaces. - temp.replace(TQRegExp(" +\\t"), "\t"); + temp.tqreplace(TQRegExp(" +\\t"), "\t"); // Remove blank lines. - temp.replace(TQRegExp("\t\t+"),"\t"); + temp.tqreplace(TQRegExp("\t\t+"),"\t"); // Split into sentences. TQStringList tempList = TQStringList::split("\t", temp, false); @@ -695,7 +695,7 @@ int SpeechData::getJobPartNumFromSeq(const mlJob& job, const int seq) void SpeechData::deleteExpiredJobs(const uint finishedJobNum) { // Save current pointer. - typedef QPair<TQCString, uint> removedJob; + typedef TQPair<TQCString, uint> removedJob; typedef TQValueList<removedJob> removedJobsList; removedJobsList removedJobs; // Walk through jobs and delete any other finished jobs. @@ -1032,7 +1032,7 @@ void SpeechData::moveTextLater(const uint jobNum) if (job) { // Get index of the job. - uint index = textJobs.findRef(job); + uint index = textJobs.tqfindRef(job); // Move job down one position in the queue. // kdDebug() << "In SpeechData::moveTextLater, moving jobNum " << movedJobNum << endl; if (textJobs.insert(index + 2, job)) textJobs.take(index); @@ -1149,7 +1149,7 @@ void SpeechData::startJobFiltering(mlJob* job, const TQString& text, bool noSBD) // Get TalkerCode structure of closest matching Talker. pooledFilterMgr->talkerCode = m_talkerMgr->talkerToTalkerCode(job->talker); // Pass Sentence Boundary regular expression (if app overrode default); - if (sentenceDelimiters.find(job->appId) != sentenceDelimiters.end()) + if (sentenceDelimiters.tqfind(job->appId) != sentenceDelimiters.end()) pooledFilterMgr->filterMgr->setSbRegExp(sentenceDelimiters[job->appId]); pooledFilterMgr->filterMgr->asyncConvert(text, pooledFilterMgr->talkerCode, job->appId); } diff --git a/kttsd/kttsd/speechdata.h b/kttsd/kttsd/speechdata.h index 5f5b92a..73ee03b 100644 --- a/kttsd/kttsd/speechdata.h +++ b/kttsd/kttsd/speechdata.h @@ -25,7 +25,7 @@ #ifndef _SPEECHDATA_H_ #define _SPEECHDATA_H_ -// Qt includes. +// TQt includes. #include <tqptrqueue.h> #include <tqptrlist.h> #include <tqstring.h> @@ -110,6 +110,7 @@ typedef TQMap<TQString, NotifyEventMap> NotifyAppMap; */ class SpeechData : public TQObject { Q_OBJECT + TQ_OBJECT public: /** diff --git a/kttsd/kttsd/ssmlconvert.cpp b/kttsd/kttsd/ssmlconvert.cpp index d33eaf3..5f37af4 100644 --- a/kttsd/kttsd/ssmlconvert.cpp +++ b/kttsd/kttsd/ssmlconvert.cpp @@ -19,7 +19,7 @@ * * ***************************************************************************/ -// Qt includes. +// TQt includes. #include <tqstring.h> #include <tqstringlist.h> #include <tqdom.h> @@ -66,10 +66,10 @@ void SSMLConvert::setTalkers(const TQStringList &talkers) { TQString SSMLConvert::extractTalker(const TQString &talkercode) { TQString t = talkercode.section("synthesizer=", 1, 1); t = t.section('"', 1, 1); - if(t.contains("flite")) + if(t.tqcontains("flite")) return "flite"; else - return t.left(t.find(" ")).lower(); + return t.left(t.tqfind(" ")).lower(); } /** @@ -101,7 +101,7 @@ TQString SSMLConvert::extractTalker(const TQString &talkercode) { * of the how the talker is chosen, meaning that you don't lose some features of the talker if this * search doesn't encompass them. * -* QDom is the item of choice for the matching. Just walk the tree.. +* TQDom is the item of choice for the matching. Just walk the tree.. */ TQString SSMLConvert::appropriateTalker(const TQString &text) const { TQDomDocument ssml; @@ -113,7 +113,7 @@ TQString SSMLConvert::appropriateTalker(const TQString &text) const { TQDomElement root = ssml.documentElement(); if(root.tagName() != "speak") { // Not SSML. - return TQString::null; + return TQString(); } /** @@ -132,7 +132,7 @@ TQString SSMLConvert::appropriateTalker(const TQString &text) const { TQString lang = root.attribute("xml:lang"); kdDebug() << "SSMLConvert::appropriateTalker: xml:lang found (" << lang << ")" << endl; /// If it is set to en*, then match all english speakers. They all sound the same anyways. - if(lang.contains("en-")) { + if(lang.tqcontains("en-")) { kdDebug() << "SSMLConvert::appropriateTalker: English" << endl; lang = "en"; } @@ -273,7 +273,7 @@ TQString SSMLConvert::getOutput() if(!readfile.open(IO_ReadOnly)) { /// uhh yeah... Issues writing to the SSML file. kdDebug() << "SSMLConvert::slotProcessExited: Could not read file " << m_outFilename << endl; - return TQString::null; + return TQString(); } TQTextStream rstream(&readfile); TQString convertedData = rstream.read(); @@ -283,9 +283,9 @@ TQString SSMLConvert::getOutput() // Clean up. TQFile::remove(m_inFilename); - m_inFilename = TQString::null; + m_inFilename = TQString(); TQFile::remove(m_outFilename); - m_outFilename = TQString::null; + m_outFilename = TQString(); // Ready for another transform. m_state = tsIdle; diff --git a/kttsd/kttsd/ssmlconvert.h b/kttsd/kttsd/ssmlconvert.h index dd48db3..2fd18bd 100644 --- a/kttsd/kttsd/ssmlconvert.h +++ b/kttsd/kttsd/ssmlconvert.h @@ -30,7 +30,7 @@ * by the talker. */ -// Qt includes +// TQt includes #include <tqobject.h> #include <tqstringlist.h> @@ -39,6 +39,7 @@ class TQString; class SSMLConvert : public TQObject { Q_OBJECT + TQ_OBJECT public: /** Constructors */ SSMLConvert(); diff --git a/kttsd/kttsd/talkermgr.cpp b/kttsd/kttsd/talkermgr.cpp index f10281c..b25929c 100644 --- a/kttsd/kttsd/talkermgr.cpp +++ b/kttsd/kttsd/talkermgr.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -// Qt includes. +// TQt includes. // KDE includes. #include <kdebug.h> @@ -37,8 +37,8 @@ /** * Constructor. */ -TalkerMgr::TalkerMgr(TQObject *parent, const char *name) : - TQObject( parent, name ) +TalkerMgr::TalkerMgr(TQObject *tqparent, const char *name) : + TQObject( tqparent, name ) { m_loadedPlugIns.setAutoDelete(true); } @@ -82,7 +82,7 @@ int TalkerMgr::loadPlugIns(KConfig* config) config->setGroup("Talker_" + talkerID); // Get the DesktopEntryName of the plugin we will try to load. - TQString desktopEntryName = config->readEntry("DesktopEntryName", TQString::null); + TQString desktopEntryName = config->readEntry("DesktopEntryName", TQString()); // If a DesktopEntryName is not in the config file, it was configured before // we started using them, when we stored translated plugin names instead. @@ -91,7 +91,7 @@ int TalkerMgr::loadPlugIns(KConfig* config) // and DesktopEntryName won't change. if (desktopEntryName.isEmpty()) { - TQString synthName = config->readEntry("PlugIn", TQString::null); + TQString synthName = config->readEntry("PlugIn", TQString()); // See if the translated name will untranslate. If not, well, sorry. desktopEntryName = TalkerCode::TalkerNameToDesktopEntryName(synthName); // Record the DesktopEntryName from now on. @@ -99,7 +99,7 @@ int TalkerMgr::loadPlugIns(KConfig* config) } // Get the talker code. - TQString talkerCode = config->readEntry("TalkerCode", TQString::null); + TQString talkerCode = config->readEntry("TalkerCode", TQString()); // Normalize the talker code. TQString fullLanguageCode; @@ -107,7 +107,7 @@ int TalkerMgr::loadPlugIns(KConfig* config) // Find the KTTSD SynthPlugin. KTrader::OfferList offers = KTrader::self()->query( - "KTTSD/SynthPlugin", TQString("DesktopEntryName == '%1'").arg(desktopEntryName)); + "KTTSD/SynthPlugin", TQString("DesktopEntryName == '%1'").tqarg(desktopEntryName)); if(offers.count() > 1){ ++bad; @@ -134,7 +134,7 @@ int TalkerMgr::loadPlugIns(KConfig* config) } else { // Synchronous plugins are run in a separate thread. // Init will start the thread and it will immediately go to sleep. - TQString threadedPlugInName = TQString::fromLatin1("threaded") + desktopEntryName; + TQString threadedPlugInName = TQString::tqfromLatin1("threaded") + desktopEntryName; ThreadedPlugIn* speechThread = new ThreadedPlugIn(speech, this, threadedPlugInName.latin1()); speechThread->init(config, "Talker_" + talkerCode); @@ -205,7 +205,7 @@ int TalkerMgr::talkerToPluginIndex(const TQString& talker) const { // kdDebug() << "TalkerMgr::talkerToPluginIndex: matching talker " << talker << " to closest matching plugin." << endl; // If we have a cached match, return that. - if (m_talkerToPlugInCache.contains(talker)) + if (m_talkerToPlugInCache.tqcontains(talker)) return m_talkerToPlugInCache[talker]; else { @@ -223,7 +223,7 @@ int TalkerMgr::talkerToPluginIndex(const TQString& talker) const * If a plugin has not been loaded to match the talker, returns the default * plugin. * - * TODO: When picking a talker, %KTTSD will automatically determine if text contains + * TODO: When picking a talker, %KTTSD will automatically determine if text tqcontains * markup and pick a talker that supports that markup, if available. This * overrides all other attributes, i.e, it is treated as an automatic "top priority" * attribute. @@ -244,7 +244,7 @@ PlugInProc* TalkerMgr::talkerToPlugin(const TQString& talker) const * * The returned TalkerCode is a copy and should be destroyed by caller. * - * TODO: When picking a talker, %KTTSD will automatically determine if text contains + * TODO: When picking a talker, %KTTSD will automatically determine if text tqcontains * markup and pick a talker that supports that markup, if available. This * overrides all other attributes, i.e, it is treated as an automatic "top priority" * attribute. @@ -325,7 +325,7 @@ bool TalkerMgr::autoconfigureTalker(const TQString& langCode, KConfig* config) { // See if this plugin supports the desired language. TQStringList languageCodes = offers[i]->property("X-KDE-Languages").toStringList(); - if (languageCodes.contains(languageCode)) + if (languageCodes.tqcontains(languageCode)) { TQString desktopEntryName = offers[i]->desktopEntryName(); diff --git a/kttsd/kttsd/talkermgr.h b/kttsd/kttsd/talkermgr.h index 52ddc4d..1028990 100644 --- a/kttsd/kttsd/talkermgr.h +++ b/kttsd/kttsd/talkermgr.h @@ -24,7 +24,7 @@ #ifndef _TALKERMGR_H_ #define _TALKERMGR_H_ -// Qt includes. +// TQt includes. #include <tqstring.h> #include <tqstringlist.h> #include <tqmap.h> @@ -34,14 +34,14 @@ #include "talkercode.h" #include "pluginproc.h" -class TalkerMgr: public QObject +class TalkerMgr: public TQObject { public: /** * Constructor. */ - TalkerMgr(TQObject *parent = 0, const char *name = 0); + TalkerMgr(TQObject *tqparent = 0, const char *name = 0); /** * Destructor. @@ -95,7 +95,7 @@ public: * * The returned TalkerCode is a copy and should be destroyed by caller. * - * TODO: When picking a talker, %KTTSD will automatically determine if text contains + * TODO: When picking a talker, %KTTSD will automatically determine if text tqcontains * markup and pick a talker that supports that markup, if available. This * overrides all other attributes, i.e, it is treated as an automatic "top priority" * attribute. diff --git a/kttsd/kttsd/threadedplugin.cpp b/kttsd/kttsd/threadedplugin.cpp index eacd598..6158588 100644 --- a/kttsd/kttsd/threadedplugin.cpp +++ b/kttsd/kttsd/threadedplugin.cpp @@ -33,11 +33,11 @@ * Constructor. */ ThreadedPlugIn::ThreadedPlugIn(PlugInProc* plugin, - TQObject *parent /*= 0*/, const char *name /*= 0*/): - PlugInProc(parent, name), + TQObject *tqparent /*= 0*/, const char *name /*= 0*/): + PlugInProc(tqparent, name), TQThread(), m_plugin(plugin), - m_filename(TQString::null), + m_filename(TQString()), m_requestExit(false), m_supportsSynth(false) { @@ -188,7 +188,7 @@ void ThreadedPlugIn::ackFinished() { // Since plugin should not be running, don't bother with Mutex here. if (m_state == psFinished) m_state = psIdle; - m_filename = TQString::null; + m_filename = TQString(); } /** @@ -265,7 +265,7 @@ void ThreadedPlugIn::run() m_state = psSynthing; m_stateMutex.unlock(); TQString filename = m_filename; - m_filename = TQString::null; + m_filename = TQString(); kdDebug() << "ThreadedPlugIn::run calling synthText" << endl; m_plugin->synthText(m_text, filename); kdDebug() << "ThreadedPlugIn::run back from synthText" << endl; diff --git a/kttsd/kttsd/threadedplugin.h b/kttsd/kttsd/threadedplugin.h index 1a1b13e..c2ee0d6 100644 --- a/kttsd/kttsd/threadedplugin.h +++ b/kttsd/kttsd/threadedplugin.h @@ -45,7 +45,7 @@ class ThreadedPlugIn : public PlugInProc, public TQThread /** * Constructor. */ - ThreadedPlugIn(PlugInProc* plugin, TQObject *parent = 0, const char *name = 0); + ThreadedPlugIn(PlugInProc* plugin, TQObject *tqparent = 0, const char *name = 0); /** * Destructor. diff --git a/kttsd/kttsjobmgr/kttsjobmgr.cpp b/kttsd/kttsjobmgr/kttsjobmgr.cpp index 4d80bb4..097d594 100644 --- a/kttsd/kttsjobmgr/kttsjobmgr.cpp +++ b/kttsd/kttsjobmgr/kttsjobmgr.cpp @@ -65,10 +65,10 @@ KttsJobMgrFactory::~KttsJobMgrFactory() s_instance = 0; } -TQObject *KttsJobMgrFactory::createObject(TQObject *parent, const char *name, const char*, +TQObject *KttsJobMgrFactory::createObject(TQObject *tqparent, const char *name, const char*, const TQStringList& ) { - TQObject *obj = new KttsJobMgrPart((TQWidget*)parent, name); + TQObject *obj = new KttsJobMgrPart((TQWidget*)tqparent, name); emit objectCreated(obj); return obj; } @@ -86,10 +86,10 @@ KAboutData *KttsJobMgrFactory::aboutData() return about; } -KttsJobMgrPart::KttsJobMgrPart(TQWidget *parent, const char *name) : +KttsJobMgrPart::KttsJobMgrPart(TQWidget *tqparent, const char *name) : DCOPStub("kttsd", "KSpeech"), DCOPObject("kttsjobmgr_kspeechsink"), - KParts::ReadOnlyPart(parent, name) + KParts::ReadOnlyPart(TQT_TQOBJECT(tqparent), name) { // Initialize some variables. m_selectOnTextSet = false; @@ -101,12 +101,12 @@ KttsJobMgrPart::KttsJobMgrPart(TQWidget *parent, const char *name) : KGlobal::locale()->insertCatalogue("kttsd"); // Create a TQVBox to host everything. - TQVBox* vBox = new TQVBox(parent); + TQVBox* vBox = new TQVBox(tqparent); vBox->setMargin(6); // Create a splitter to contain the Job List View and the current sentence. TQSplitter* splitter = new TQSplitter(vBox); - splitter->setOrientation(TQSplitter::Vertical); + splitter->setOrientation(Qt::Vertical); // Create Job List View widget. m_jobListView = new KListView(splitter, "joblistview"); @@ -163,7 +163,7 @@ KttsJobMgrPart::KttsJobMgrPart(TQWidget *parent, const char *name) : hbox3->setSpacing(6); // Do not let button box stretch vertically. - m_buttonBox->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); + m_buttonBox->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); // All the buttons with "job_" at start of their names will be enabled/disabled when a job is // selected in the Job List View. @@ -274,7 +274,7 @@ KttsJobMgrPart::KttsJobMgrPart(TQWidget *parent, const char *name) : // Create a label for current sentence. TQLabel* currentSentenceLabel = new TQLabel(sentenceVBox); - currentSentenceLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); + currentSentenceLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); currentSentenceLabel->setText(i18n("Current Sentence")); // Create a box to contain the current sentence. @@ -490,7 +490,7 @@ void KttsJobMgrPart::slot_job_change_talker() { TQString talkerID = item->text(jlvcTalkerID); TQStringList talkerIDs = m_talkerCodesToTalkerIDs.values(); - int ndx = talkerIDs.findIndex(talkerID); + int ndx = talkerIDs.tqfindIndex(talkerID); TQString talkerCode; if (ndx >= 0) talkerCode = m_talkerCodesToTalkerIDs.keys()[ndx]; SelectTalkerDlg dlg(widget(), "selecttalkerdialog", i18n("Select Talker"), talkerCode, true); @@ -506,7 +506,7 @@ void KttsJobMgrPart::slot_job_change_talker() void KttsJobMgrPart::slot_speak_clipboard() { // Get the clipboard object. - QClipboard *cb = kapp->clipboard(); + TQClipboard *cb = kapp->tqclipboard(); // Copy text from the clipboard. @@ -518,7 +518,7 @@ void KttsJobMgrPart::slot_speak_clipboard() { if (supportsMarkup(NULL, KSpeech::mtHtml)) { - TQByteArray d = data->encodedData("text/html"); + TQByteArray d = data->tqencodedData("text/html"); text = TQString(d); } } @@ -526,7 +526,7 @@ void KttsJobMgrPart::slot_speak_clipboard() { if (supportsMarkup(NULL, KSpeech::mtSsml)) { - TQByteArray d = data->encodedData("text/ssml"); + TQByteArray d = data->tqencodedData("text/ssml"); text = TQString(d); } } @@ -632,7 +632,7 @@ int KttsJobMgrPart::getCurrentJobPartCount() */ TQListViewItem* KttsJobMgrPart::findItemByJobNum(const uint jobNum) { - return m_jobListView->findItem(TQString::number(jobNum), jlvcJobNum); + return m_jobListView->tqfindItem(TQString::number(jobNum), jlvcJobNum); } /** @@ -746,7 +746,7 @@ void KttsJobMgrPart::autoSelectInJobListView() TQString KttsJobMgrPart::cachedTalkerCodeToTalkerID(const TQString& talkerCode) { // If in the cache, return that. - if (m_talkerCodesToTalkerIDs.contains(talkerCode)) + if (m_talkerCodesToTalkerIDs.tqcontains(talkerCode)) return m_talkerCodesToTalkerIDs[talkerCode]; else { @@ -952,7 +952,7 @@ ASYNC KttsJobMgrPart::textFinished(const TQCString&, const uint jobNum) // Update sentence pointer, since signal may not be emitted for final CR. refreshJob(jobNum); } - m_currentSentence->setText(TQString::null); + m_currentSentence->setText(TQString()); } /** @@ -1013,8 +1013,8 @@ ASYNC KttsJobMgrPart::textRemoved(const TQCString&, const uint jobNum) autoSelectInJobListView(); } -KttsJobMgrBrowserExtension::KttsJobMgrBrowserExtension(KttsJobMgrPart *parent) - : KParts::BrowserExtension(parent, "KttsJobMgrBrowserExtension") +KttsJobMgrBrowserExtension::KttsJobMgrBrowserExtension(KttsJobMgrPart *tqparent) + : KParts::BrowserExtension(tqparent, "KttsJobMgrBrowserExtension") { } diff --git a/kttsd/kttsjobmgr/kttsjobmgr.h b/kttsd/kttsjobmgr/kttsjobmgr.h index 6274723..216531d 100644 --- a/kttsd/kttsjobmgr/kttsjobmgr.h +++ b/kttsd/kttsjobmgr/kttsjobmgr.h @@ -37,12 +37,13 @@ class KTextEdit; class KttsJobMgrFactory : public KLibFactory { Q_OBJECT + TQ_OBJECT public: KttsJobMgrFactory() {}; virtual ~KttsJobMgrFactory(); - virtual TQObject* createObject(TQObject* parent = 0, const char* name = 0, - const char* classname = "TQObject", + virtual TQObject* createObject(TQObject* tqparent = 0, const char* name = 0, + const char* classname = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList()); static KInstance *instance(); @@ -58,8 +59,9 @@ class KttsJobMgrPart: virtual public KSpeechSink { Q_OBJECT + TQ_OBJECT public: - KttsJobMgrPart(TQWidget *parent, const char *name); + KttsJobMgrPart(TQWidget *tqparent, const char *name); virtual ~KttsJobMgrPart(); protected: @@ -288,9 +290,10 @@ private: class KttsJobMgrBrowserExtension : public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT friend class KttsJobMgrPart; public: - KttsJobMgrBrowserExtension(KttsJobMgrPart *parent); + KttsJobMgrBrowserExtension(KttsJobMgrPart *tqparent); virtual ~KttsJobMgrBrowserExtension(); }; diff --git a/kttsd/kttsmgr/kttsmgr.cpp b/kttsd/kttsmgr/kttsmgr.cpp index 68bd74d..9cfe77a 100644 --- a/kttsd/kttsmgr/kttsmgr.cpp +++ b/kttsd/kttsmgr/kttsmgr.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -// Qt includes. +// TQt includes. #include <tqimage.h> // KDE includes. @@ -135,7 +135,7 @@ int main (int argc, char *argv[]) /* KttsToolTip class */ -KttsToolTip::KttsToolTip ( TQWidget* parent ) : TQToolTip(parent) +KttsToolTip::KttsToolTip ( TQWidget* tqparent ) : TQToolTip(tqparent) { } @@ -143,19 +143,19 @@ KttsToolTip::KttsToolTip ( TQWidget* parent ) : TQToolTip(parent) { Q_UNUSED(p); - if (!parentWidget()->inherits("KttsMgrTray")) + if (!tqparentWidget()->inherits("KttsMgrTray")) return; - KttsMgrTray* kttsMgrTray = dynamic_cast<KttsMgrTray*>(parentWidget()); + KttsMgrTray* kttsMgrTray = dynamic_cast<KttsMgrTray*>(tqparentWidget()); - TQRect r(kttsMgrTray->geometry()); + TQRect r(kttsMgrTray->tqgeometry()); if ( !r.isValid() ) return; TQString status = "<qt><b>KTTSMgr</b> - "; status += i18n("<qt>Text-to-Speech Manager"); status += "<br/><br/>"; - status += kttsMgrTray->getStatus(); + status += kttsMgrTray->gettqStatus(); status += "</qt>"; tip(r, status); @@ -163,10 +163,10 @@ KttsToolTip::KttsToolTip ( TQWidget* parent ) : TQToolTip(parent) /* KttsMgrTray class */ -KttsMgrTray::KttsMgrTray(TQWidget *parent): +KttsMgrTray::KttsMgrTray(TQWidget *tqparent): DCOPStub("kttsd", "KSpeech"), DCOPObject("kkttsmgr_kspeechsink"), - KSystemTray(parent, "kttsmgrsystemtray") + KSystemTray(tqparent, "kttsmgrsystemtray") { TQPixmap icon = KGlobal::iconLoader()->loadIcon("kttsd", KIcon::Small); setPixmap (icon); @@ -200,7 +200,7 @@ KttsMgrTray::KttsMgrTray(TQWidget *parent): "textFinished(TQCString,uint)", false); // Install an event filter so we can check when KTTSMgr becomes inconified to the systray. - parent->installEventFilter(this); + tqparent->installEventFilter(this); } } @@ -224,7 +224,7 @@ void KttsMgrTray::textFinished(const TQCString& /*appId*/, uint /*jobNum*/) void KttsMgrTray::exitWhenFinishedSpeaking() { // kdDebug() << "KttsMgrTray::exitWhenFinishedSpeaking: running" << endl; - if ( parentWidget()->isShown() ) return; + if ( tqparentWidget()->isShown() ) return; TQString jobNums = getTextJobNumbers(); TQStringList jobNumsList = TQStringList::split(jobNums, ","); uint jobNumsListCount = jobNumsList.count(); @@ -257,7 +257,7 @@ TQString KttsMgrTray::stateToStr(int state) } } -TQString KttsMgrTray::getStatus() +TQString KttsMgrTray::gettqStatus() { if (!isKttsdRunning()) return i18n("Text-to-Speech System is not running"); uint jobCount = getTextJobCount(); @@ -268,12 +268,12 @@ TQString KttsMgrTray::getStatus() int jobState = 0; if (job != 0) { - // kdDebug() << "KttsMgrTray::getStatus: job = " << job << endl; + // kdDebug() << "KttsMgrTray::gettqStatus: job = " << job << endl; jobState = getTextJobState(job); int sentenceCount = getTextCount(job); uint seq = moveRelTextSentence(0, job); status += i18n(", current job %1 at sentence %2 of %3 sentences" - ).arg(stateToStr(jobState)).arg(seq).arg(sentenceCount); + ).tqarg(stateToStr(jobState)).tqarg(seq).tqarg(sentenceCount); } } return status; @@ -298,7 +298,7 @@ void KttsMgrTray::aboutSelected() void KttsMgrTray::helpSelected() { - kapp->invokeHelp(TQString::null,"kttsd"); + kapp->invokeHelp(TQString(),"kttsd"); } void KttsMgrTray::quitSelected() diff --git a/kttsd/kttsmgr/kttsmgr.h b/kttsd/kttsmgr/kttsmgr.h index 21f54a7..af7765c 100644 --- a/kttsd/kttsmgr/kttsmgr.h +++ b/kttsd/kttsmgr/kttsmgr.h @@ -25,7 +25,7 @@ #ifndef KTTSMGR_H #define KTTSMGR_H -// Qt includes. +// TQt includes. #include <tqevent.h> #include <tqtooltip.h> @@ -36,10 +36,10 @@ #include "kspeech_stub.h" #include "kspeechsink.h" -class KttsToolTip: public QToolTip +class KttsToolTip: public TQToolTip { public: - KttsToolTip ( TQWidget* parent ); + KttsToolTip ( TQWidget* tqparent ); protected: virtual void maybeTip ( const TQPoint & p ); @@ -48,13 +48,14 @@ class KttsToolTip: public QToolTip class KttsMgrTray: public KSystemTray, public KSpeech_stub, virtual public KSpeechSink { Q_OBJECT + TQ_OBJECT public: - KttsMgrTray(TQWidget *parent=0); + KttsMgrTray(TQWidget *tqparent=0); ~KttsMgrTray(); void setExitWhenFinishedSpeaking(); - TQString getStatus(); + TQString gettqStatus(); protected: // ASYNC textStarted(const TQCString& appId, uint jobNum); diff --git a/kttsd/libkttsd/filterconf.cpp b/kttsd/libkttsd/filterconf.cpp index 4947698..bfeb1f5 100644 --- a/kttsd/libkttsd/filterconf.cpp +++ b/kttsd/libkttsd/filterconf.cpp @@ -26,7 +26,7 @@ #include <stdlib.h> #include <sys/param.h> -// Qt includes. +// TQt includes. #include <tqfile.h> #include <tqfileinfo.h> #include <tqstring.h> @@ -42,7 +42,7 @@ /** * Constructor */ -KttsFilterConf::KttsFilterConf( TQWidget *parent, const char *name) : TQWidget(parent, name){ +KttsFilterConf::KttsFilterConf( TQWidget *tqparent, const char *name) : TQWidget(tqparent, name){ // kdDebug() << "KttsFilterConf::KttsFilterConf: Running" << endl; TQString systemPath(getenv("PATH")); // kdDebug() << "Path is " << systemPath << endl; @@ -114,7 +114,7 @@ bool KttsFilterConf::supportsMultiInstance() { return false; } * return an empty string. * @return Filter instance name. */ -TQString KttsFilterConf::userPlugInName() { return TQString::null; } +TQString KttsFilterConf::userPlugInName() { return TQString(); } /** * Returns True if this filter is a Sentence Boundary Detector. @@ -125,7 +125,7 @@ bool KttsFilterConf::isSBD() { return false; } /** * Return the full path to any program in the $PATH environmental variable * @param name The name of the file to search for. -* @returns The path to the file on success, a blank QString +* @returns The path to the file on success, a blank TQString * if its not found. */ TQString KttsFilterConf::getLocation(const TQString &name) { diff --git a/kttsd/libkttsd/filterconf.h b/kttsd/libkttsd/filterconf.h index 7fdc8e4..c508532 100644 --- a/kttsd/libkttsd/filterconf.h +++ b/kttsd/libkttsd/filterconf.h @@ -25,7 +25,7 @@ #ifndef _FILTERCONF_H_ #define _FILTERCONF_H_ -// Qt includes. +// TQt includes. #include <tqwidget.h> // KDE includes. @@ -34,14 +34,15 @@ #include <kdemacros.h> #include "kdeexportfix.h" -class KDE_EXPORT KttsFilterConf : public QWidget{ +class KDE_EXPORT KttsFilterConf : public TQWidget{ Q_OBJECT + TQ_OBJECT public: /** * Constructor */ - KttsFilterConf( TQWidget *parent = 0, const char *name = 0); + KttsFilterConf( TQWidget *tqparent = 0, const char *name = 0); /** * Destructor @@ -137,7 +138,7 @@ class KDE_EXPORT KttsFilterConf : public QWidget{ * Searches the $PATH variable for any file. If that file exists in the PATH, or * is contained in any directory in the PATH, it returns the full path to it. * @param name The name of the file to search for. - * @returns The path to the file on success, a blank QString + * @returns The path to the file on success, a blank TQString * if its not found. */ TQString getLocation(const TQString &name); diff --git a/kttsd/libkttsd/filterproc.cpp b/kttsd/libkttsd/filterproc.cpp index 8de5c62..9daf281 100644 --- a/kttsd/libkttsd/filterproc.cpp +++ b/kttsd/libkttsd/filterproc.cpp @@ -31,8 +31,8 @@ /** * Constructor. */ -KttsFilterProc::KttsFilterProc( TQObject *parent, const char *name) : - TQObject(parent, name) +KttsFilterProc::KttsFilterProc( TQObject *tqparent, const char *name) : + TQObject(tqparent, name) { // kdDebug() << "KttsFilterProc::KttsFilterProc: Running" << endl; } @@ -123,7 +123,7 @@ bool KttsFilterProc::init(KConfig* /*config*/, const TQString& /*configGroup*/){ /** * Returns the filtered output. */ -/*virtual*/ TQString KttsFilterProc::getOutput() { return TQString::null; } +/*virtual*/ TQString KttsFilterProc::getOutput() { return TQString(); } /** * Acknowledges the finished filtering. diff --git a/kttsd/libkttsd/filterproc.h b/kttsd/libkttsd/filterproc.h index bc11921..3484061 100644 --- a/kttsd/libkttsd/filterproc.h +++ b/kttsd/libkttsd/filterproc.h @@ -25,7 +25,7 @@ #ifndef _FILTERPROC_H_ #define _FILTERPROC_H_ -// Qt includes. +// TQt includes. #include <tqobject.h> #include <tqstringlist.h> @@ -36,9 +36,10 @@ class TalkerCode; class KConfig; -class KDE_EXPORT KttsFilterProc : virtual public QObject +class KDE_EXPORT KttsFilterProc : virtual public TQObject { Q_OBJECT + TQ_OBJECT public: enum FilterState { @@ -51,7 +52,7 @@ public: /** * Constructor. */ - KttsFilterProc( TQObject *parent, const char *name ); + KttsFilterProc( TQObject *tqparent, const char *name ); /** * Destructor. diff --git a/kttsd/libkttsd/notify.cpp b/kttsd/libkttsd/notify.cpp index c633779..f21f813 100644 --- a/kttsd/libkttsd/notify.cpp +++ b/kttsd/libkttsd/notify.cpp @@ -15,9 +15,9 @@ * * ***************************************************************************/ -// Qt includes. +// TQt includes. -// Qt includes. +// TQt includes. #include <tqstring.h> #include <tqstringlist.h> @@ -68,7 +68,7 @@ static void notifyaction_init() /*static*/ int NotifyAction::action( const TQString& actionName ) { notifyaction_init(); - return s_actionNames->findIndex( actionName ); + return s_actionNames->tqfindIndex( actionName ); } /*static*/ TQString NotifyAction::actionDisplayName( const int action ) @@ -126,7 +126,7 @@ static void notifypresent_init() /*static*/ int NotifyPresent::present( const TQString& presentName ) { notifypresent_init(); - return s_presentNames->findIndex( presentName ); + return s_presentNames->tqfindIndex( presentName ); } /*static*/ TQString NotifyPresent::presentDisplayName( const int present ) @@ -148,9 +148,9 @@ static void notifypresent_init() */ /*static*/ TQString NotifyEvent::getEventSrcName(const TQString& eventSrc, TQString& iconName) { - TQString configFilename = eventSrc + TQString::fromLatin1( "/eventsrc" ); + TQString configFilename = eventSrc + TQString::tqfromLatin1( "/eventsrc" ); KConfig* config = new KConfig( configFilename, true, false, "data" ); - config->setGroup( TQString::fromLatin1( "!Global!" ) ); + config->setGroup( TQString::tqfromLatin1( "!Global!" ) ); TQString appDesc = config->readEntry( "Comment", i18n("No description available") ); iconName = config->readEntry( "IconName" ); delete config; @@ -163,13 +163,13 @@ static void notifypresent_init() /*static*/ TQString NotifyEvent::getEventName(const TQString& eventSrc, const TQString& event) { TQString eventName; - TQString configFilename = eventSrc + TQString::fromLatin1( "/eventsrc" ); + TQString configFilename = eventSrc + TQString::tqfromLatin1( "/eventsrc" ); KConfig* config = new KConfig( configFilename, true, false, "data" ); if ( config->hasGroup( event ) ) { config->setGroup( event ); - eventName = config->readEntry( TQString::fromLatin1( "Comment" ), - config->readEntry( TQString::fromLatin1( "Name" ))); + eventName = config->readEntry( TQString::tqfromLatin1( "Comment" ), + config->readEntry( TQString::tqfromLatin1( "Name" ))); } delete config; return eventName; diff --git a/kttsd/libkttsd/player.h b/kttsd/libkttsd/player.h index f83c5b4..a0b8311 100644 --- a/kttsd/libkttsd/player.h +++ b/kttsd/libkttsd/player.h @@ -25,9 +25,10 @@ // #include "filehandle.h" -class KDE_EXPORT Player : virtual public QObject +class KDE_EXPORT Player : virtual public TQObject { Q_OBJECT + TQ_OBJECT public: virtual ~Player() {} @@ -66,8 +67,8 @@ public: virtual void setPeriods(uint periods) {Q_UNUSED(periods); } protected: - Player(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList() ) : - TQObject(parent, name) { + Player(TQObject* tqparent = 0, const char* name = 0, const TQStringList& args=TQStringList() ) : + TQObject(tqparent, name) { Q_UNUSED(args); } diff --git a/kttsd/libkttsd/pluginconf.cpp b/kttsd/libkttsd/pluginconf.cpp index f23eaed..8138547 100644 --- a/kttsd/libkttsd/pluginconf.cpp +++ b/kttsd/libkttsd/pluginconf.cpp @@ -19,7 +19,7 @@ #include <stdlib.h> #include <sys/param.h> -// Qt includes. +// TQt includes. #include <tqfile.h> #include <tqfileinfo.h> #include <tqstring.h> @@ -36,7 +36,7 @@ /** * Constructor */ -PlugInConf::PlugInConf( TQWidget *parent, const char *name) : TQWidget(parent, name){ +PlugInConf::PlugInConf( TQWidget *tqparent, const char *name) : TQWidget(tqparent, name){ kdDebug() << "PlugInConf::PlugInConf: Running" << endl; KGlobal::locale()->insertCatalogue("kttsd"); TQString systemPath(getenv("PATH")); @@ -110,7 +110,7 @@ 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 TQString::null, no specific language has +* If the passed-in code is TQString(), no specific language has * been chosen. * @param lang The desired language code or Null if none. * @@ -122,10 +122,10 @@ 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 TQString::null. +* i.e., cannot yet synthesize, return TQString(). * @return Fully-specified talker code. */ -TQString PlugInConf::getTalkerCode() { return TQString::null; } +TQString PlugInConf::getTalkerCode() { return TQString(); } /** * Return a list of all the languages currently supported by the plugin. @@ -143,7 +143,7 @@ TQStringList PlugInConf::getSupportedLanguages() { return TQStringList(); } /** * Return the full path to any program in the $PATH environmental variable * @param name The name of the file to search for. -* @returns The path to the file on success, a blank QString +* @returns The path to the file on success, a blank TQString * if its not found. */ TQString PlugInConf::getLocation(const TQString &name) { diff --git a/kttsd/libkttsd/pluginconf.h b/kttsd/libkttsd/pluginconf.h index 90d3cec..b76ec21 100644 --- a/kttsd/libkttsd/pluginconf.h +++ b/kttsd/libkttsd/pluginconf.h @@ -18,7 +18,7 @@ #ifndef _PLUGINCONF_H_ #define _PLUGINCONF_H_ -// Qt includes. +// TQt includes. #include <tqwidget.h> // KDE includes. @@ -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 TQString::null. Note that +* plugin is not yet ready and requires user help, return TQString(). 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 TQString::null for the entire +* fully configured, you should return TQString() 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 (_). @@ -207,14 +207,15 @@ * order to synthesize speech. */ -class KDE_EXPORT PlugInConf : public QWidget{ +class KDE_EXPORT PlugInConf : public TQWidget{ Q_OBJECT + TQ_OBJECT public: /** * Constructor */ - PlugInConf( TQWidget *parent = 0, const char *name = 0); + PlugInConf( TQWidget *tqparent = 0, const char *name = 0); /** * Destructor @@ -281,7 +282,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 TQString::null, no specific language has + * If the passed-in code is TQString(), no specific language has * been chosen. * @param lang The desired language code or Null if none. * @@ -299,7 +300,7 @@ class KDE_EXPORT PlugInConf : public QWidget{ * Return fully-specified talker code for the configured plugin. This code * uniquely identifies the configured instance of the plugin and distinquishes * one instance from another. If the plugin has not been fully configured, - * i.e., cannot yet synthesize, return TQString::null. + * i.e., cannot yet synthesize, return TQString(). * @return Fully-specified talker code. */ virtual TQString getTalkerCode(); @@ -356,7 +357,7 @@ class KDE_EXPORT PlugInConf : public QWidget{ * Searches the $PATH variable for any file. If that file exists in the PATH, or * is contained in any directory in the PATH, it returns the full path to it. * @param name The name of the file to search for. - * @returns The path to the file on success, a blank QString + * @returns The path to the file on success, a blank TQString * if its not found. */ TQString getLocation(const TQString &name); diff --git a/kttsd/libkttsd/pluginproc.cpp b/kttsd/libkttsd/pluginproc.cpp index a712687..39c523b 100644 --- a/kttsd/libkttsd/pluginproc.cpp +++ b/kttsd/libkttsd/pluginproc.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -// Qt includes. +// TQt includes. #include <tqstring.h> #include <tqtextcodec.h> @@ -31,7 +31,7 @@ /** * Constructor */ -PlugInProc::PlugInProc( TQObject *parent, const char *name) : TQObject(parent, name){ +PlugInProc::PlugInProc( TQObject *tqparent, const char *name) : TQObject(tqparent, name){ // kdDebug() << "PlugInProc::PlugInProc: Running" << endl; } @@ -79,7 +79,7 @@ void PlugInProc::synthText(const TQString& /*text*/, const TQString& /*suggested * * The plugin must not re-use the filename. */ -TQString PlugInProc::getFilename() { return TQString::null; } +TQString PlugInProc::getFilename() { return TQString(); } /** * Stop current operation (saying or synthesizing text). diff --git a/kttsd/libkttsd/pluginproc.h b/kttsd/libkttsd/pluginproc.h index 8d867bc..ab156b3 100644 --- a/kttsd/libkttsd/pluginproc.h +++ b/kttsd/libkttsd/pluginproc.h @@ -114,8 +114,8 @@ * 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 -* main Qt event loop, which unfortunately, runs only in the main thread. -* This restriction will likely be lifted in Qt 4 and later. +* main TQt event loop, which unfortunately, runs only in the main thread. +* This restriction will likely be lifted in TQt 4 and later. * * Since the KDE library is not available from the @ref sayText and @ref synthText methods, * it is best if the plugin reads configuration settings in the @ref init method. @@ -135,7 +135,7 @@ * running. Keep this in mind when implementing the code. * * If the plugin returns True from @ref supportsAsync, you will of course -* need to deal with similar issues. If you have to use QThreads +* need to deal with similar issues. If you have to use TQThreads * to implement asynchronous support, do not be concerned about emitting * the @ref sayFinished or @ref synthFinished signals from your threads, since * KTTSD will convert the received signals into postEvents and @@ -227,8 +227,9 @@ enum pluginState psFinished = 3 /**< Plugin has finished synthesizing. Audio file is ready. */ }; -class KDE_EXPORT PlugInProc : virtual public QObject{ +class KDE_EXPORT PlugInProc : virtual public TQObject{ Q_OBJECT + TQ_OBJECT public: enum CharacterCodec { @@ -241,7 +242,7 @@ class KDE_EXPORT PlugInProc : virtual public QObject{ /** * Constructor. */ - PlugInProc( TQObject *parent = 0, const char *name = 0); + PlugInProc( TQObject *tqparent = 0, const char *name = 0); /** * Destructor. diff --git a/kttsd/libkttsd/selecttalkerdlg.cpp b/kttsd/libkttsd/selecttalkerdlg.cpp index 9028bf7..99a2b03 100644 --- a/kttsd/libkttsd/selecttalkerdlg.cpp +++ b/kttsd/libkttsd/selecttalkerdlg.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -// Qt includes. +// TQt includes. #include <tqcheckbox.h> #include <tqradiobutton.h> #include <tqhbox.h> @@ -45,14 +45,14 @@ #include "selecttalkerdlg.moc" SelectTalkerDlg::SelectTalkerDlg( - TQWidget* parent, + TQWidget* tqparent, const char* name, const TQString& caption, const TQString& talkerCode, bool runningTalkers) : KDialogBase( - parent, + tqparent, name, true, caption, @@ -69,25 +69,25 @@ SelectTalkerDlg::SelectTalkerDlg( // Fill combo boxes. KComboBox* cb = m_widget->genderComboBox; - cb->insertItem( TQString::null ); + cb->insertItem( TQString() ); cb->insertItem( TalkerCode::translatedGender("male") ); cb->insertItem( TalkerCode::translatedGender("female") ); cb->insertItem( TalkerCode::translatedGender("neutral") ); cb = m_widget->volumeComboBox; - cb->insertItem( TQString::null ); + cb->insertItem( TQString() ); cb->insertItem( TalkerCode::translatedVolume("medium") ); cb->insertItem( TalkerCode::translatedVolume("loud") ); cb->insertItem( TalkerCode::translatedVolume("soft") ); cb = m_widget->rateComboBox; - cb->insertItem( TQString::null ); + cb->insertItem( TQString() ); cb->insertItem( TalkerCode::translatedRate("medium") ); cb->insertItem( TalkerCode::translatedRate("fast") ); cb->insertItem( TalkerCode::translatedRate("slow") ); cb = m_widget->synthComboBox; - cb->insertItem( TQString::null ); + cb->insertItem( TQString() ); KTrader::OfferList offers = KTrader::self()->query("KTTSD/SynthPlugin"); for(unsigned int i=0; i < offers.count() ; ++i) cb->insertItem(offers[i]->name()); @@ -170,7 +170,7 @@ void SelectTalkerDlg::slotLanguageBrowseButton_clicked() TQString locale; TQString language; // Blank line so user can select no language. - // Note: Don't use TQString::null, which gets displayed at bottom of list, rather than top. + // Note: Don't use TQString(), 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(); @@ -200,7 +200,7 @@ void SelectTalkerDlg::slotLanguageBrowseButton_clicked() // TODO: This isn't working. Furthermore, item appears selected but is not. langLView->ensureItemVisible(langLView->selectedItem()); int dlgResult = dlg->exec(); - language = TQString::null; + language = TQString(); if (dlgResult == TQDialog::Accepted) { if (langLView->selectedItem()) @@ -274,7 +274,7 @@ void SelectTalkerDlg::applyTalkerCodeToControls() void SelectTalkerDlg::applyControlsToTalkerCode() { if ( m_widget->useDefaultRadioButton->isChecked() ) - m_talkerCode = TalkerCode(TQString::null, false); + m_talkerCode = TalkerCode(TQString(), false); else if ( m_widget->useClosestMatchRadioButton->isChecked() ) { // Language already stored in talker code. @@ -327,11 +327,11 @@ void SelectTalkerDlg::loadTalkers(bool /*runningTalkers*/) { TQString talkerID = *it; config->setGroup("Talker_" + talkerID); - TQString talkerCode = config->readEntry("TalkerCode", TQString::null); + TQString talkerCode = config->readEntry("TalkerCode", TQString()); // Parse and normalize the talker code. TalkerCode talker = TalkerCode(talkerCode, true); m_talkers.append(talker); - TQString desktopEntryName = config->readEntry("DesktopEntryName", TQString::null); + TQString desktopEntryName = config->readEntry("DesktopEntryName", TQString()); TQString synthName = TalkerCode::TalkerDesktopEntryNameToName(desktopEntryName); // Display in List View using translated strings. item = new KListViewItem(lv, item); diff --git a/kttsd/libkttsd/selecttalkerdlg.h b/kttsd/libkttsd/selecttalkerdlg.h index 799f588..2ac7c30 100644 --- a/kttsd/libkttsd/selecttalkerdlg.h +++ b/kttsd/libkttsd/selecttalkerdlg.h @@ -27,7 +27,7 @@ #ifndef _SELECTTALKERDLG_H_ #define _SELECTTALKERDLG_H_ -// Qt includes. +// TQt includes. #include <tqvaluelist.h> // KDE includes. @@ -42,11 +42,12 @@ class KDE_EXPORT SelectTalkerDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** * Constructor. - * @param parent The parent for this dialog. + * @param tqparent The tqparent for this dialog. * @param name Name for this dialog. * @param caption Displayed title for this dialog. * @param talkerCode A suggested starting Talker Code. @@ -55,10 +56,10 @@ class KDE_EXPORT SelectTalkerDlg : public KDialogBase * (which may not yet have been Applied). */ SelectTalkerDlg( - TQWidget* parent = 0, + TQWidget* tqparent = 0, const char* name = "selecttalkerdialog", const TQString& caption = i18n("Select Talker"), - const TQString& talkerCode = TQString::null, + const TQString& talkerCode = TQString(), bool runningTalkers = false); /** @@ -67,7 +68,7 @@ class KDE_EXPORT SelectTalkerDlg : public KDialogBase ~SelectTalkerDlg(); /** - * Returns the Talker Code user chose. TQString::null if default Talker chosen. + * Returns the Talker Code user chose. TQString() if default Talker chosen. * Note that if user did not choose a specific Talker, this will be a partial Talker Code. */ TQString getSelectedTalkerCode(); diff --git a/kttsd/libkttsd/selecttalkerwidget.ui b/kttsd/libkttsd/selecttalkerwidget.ui index adcc8a9..7e9ad64 100644 --- a/kttsd/libkttsd/selecttalkerwidget.ui +++ b/kttsd/libkttsd/selecttalkerwidget.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>SelectTalkerWidget</class> <author>Gary Cramblitt <garycramblitt@comcast.net></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>SelectTalkerWidget</cstring> </property> @@ -28,7 +28,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup1</cstring> </property> @@ -53,7 +53,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>useDefaultRadioButton</cstring> </property> @@ -64,7 +64,7 @@ <string>When checked, will use the default Talker, which is the topmost Talker listed in the Talkers tab.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>useClosestMatchRadioButton</cstring> </property> @@ -75,9 +75,9 @@ <string>When checked, will use a configured Talker most closely matching the attributes you choose. Attributes with checks next to them will be preferred over unchecked attributes. Language is always preferred.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -93,14 +93,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>30</width> <height>20</height> </size> </property> </spacer> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>closestMatchGroupBox</cstring> </property> @@ -117,7 +117,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="3" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="3" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>preferredLabel</cstring> </property> @@ -125,22 +125,22 @@ <string>Checked items are preferred over unchecked items.</string> </property> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout11_2</cstring> + <cstring>tqlayout11_2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>synthLabel</cstring> </property> <property name="text"> <string>&Synthesizer:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter|AlignLeft</set> </property> <property name="buddy" stdset="0"> @@ -152,7 +152,7 @@ <cstring>synthComboBox</cstring> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>synthCheckBox</cstring> </property> @@ -176,15 +176,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="0" column="2"> + <widget class="TQLayoutWidget" row="0" column="2"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>genderLabel</cstring> </property> @@ -200,7 +200,7 @@ <cstring>genderComboBox</cstring> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>genderCheckBox</cstring> </property> @@ -241,15 +241,15 @@ <enum>Vertical</enum> </property> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>volumeLabel</cstring> </property> @@ -265,7 +265,7 @@ <cstring>volumeComboBox</cstring> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>volumeCheckBox</cstring> </property> @@ -289,15 +289,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="2"> + <widget class="TQLayoutWidget" row="1" column="2"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>rateLabel</cstring> </property> @@ -313,7 +313,7 @@ <cstring>rateComboBox</cstring> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>rateCheckBox</cstring> </property> @@ -337,15 +337,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>languageLabel</cstring> </property> @@ -385,7 +385,7 @@ <string>Click to select one or more languages. This filter will be applied to text jobs of those languages.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>languageCheckBox</cstring> </property> @@ -413,7 +413,7 @@ </widget> </hbox> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>useSpecificTalkerRadioButton</cstring> </property> @@ -424,9 +424,9 @@ <string>When checked, will use the specific Talker (if it is still configured), otherwise the Talker most closely matching.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <hbox> <property name="name"> @@ -442,7 +442,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>30</width> <height>20</height> @@ -559,7 +559,7 @@ <tabstop>useSpecificTalkerRadioButton</tabstop> <tabstop>talkersListView</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="0"/> +<tqlayoutdefaults spacing="6" margin="0"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>kcombobox.h</includehint> diff --git a/kttsd/libkttsd/stretcher.cpp b/kttsd/libkttsd/stretcher.cpp index 91ae8fe..14f0b83 100644 --- a/kttsd/libkttsd/stretcher.cpp +++ b/kttsd/libkttsd/stretcher.cpp @@ -34,8 +34,8 @@ /** * Constructor. */ -Stretcher::Stretcher(TQObject *parent, const char *name) : - TQObject(parent, name) +Stretcher::Stretcher(TQObject *tqparent, const char *name) : + TQObject(tqparent, name) { m_state = 0; m_stretchProc = 0; @@ -61,7 +61,7 @@ bool Stretcher::stretch(const TQString &inFilename, const TQString &outFilename, if (m_stretchProc) return false; m_outFilename = outFilename; m_stretchProc = new KProcess; - TQString stretchStr = TQString("%1").arg(stretchFactor, 0, 'f', 3); + TQString stretchStr = TQString("%1").tqarg(stretchFactor, 0, 'f', 3); *m_stretchProc << "sox" << inFilename << outFilename << "stretch" << stretchStr; connect(m_stretchProc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotProcessExited(KProcess*))); diff --git a/kttsd/libkttsd/stretcher.h b/kttsd/libkttsd/stretcher.h index 676b690..e0c7e72 100644 --- a/kttsd/libkttsd/stretcher.h +++ b/kttsd/libkttsd/stretcher.h @@ -31,14 +31,15 @@ class KProcess; -class KDE_EXPORT Stretcher : public QObject{ +class KDE_EXPORT Stretcher : public TQObject{ Q_OBJECT + TQ_OBJECT public: /** * Constructor. */ - Stretcher(TQObject *parent = 0, const char *name = 0); + Stretcher(TQObject *tqparent = 0, const char *name = 0); /** * Destructor. diff --git a/kttsd/libkttsd/talkercode.cpp b/kttsd/libkttsd/talkercode.cpp index 08c89a1..2b3fbcf 100644 --- a/kttsd/libkttsd/talkercode.cpp +++ b/kttsd/libkttsd/talkercode.cpp @@ -34,7 +34,7 @@ /** * Constructor. */ -TalkerCode::TalkerCode(const TQString &code/*=TQString::null*/, bool normal /*=false*/) +TalkerCode::TalkerCode(const TQString &code/*=TQString()*/, bool normal /*=false*/) { if (!code.isEmpty()) parseTalkerCode(code); @@ -304,7 +304,7 @@ void TalkerCode::normalize() void TalkerCode::parseTalkerCode(const TQString &talkerCode) { TQString fullLanguageCode; - if (talkerCode.contains("\"")) + if (talkerCode.tqcontains("\"")) { fullLanguageCode = talkerCode.section("lang=", 1, 1); fullLanguageCode = fullLanguageCode.section('"', 1, 1); @@ -487,15 +487,15 @@ void TalkerCode::parseTalkerCode(const TQString &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). -* TQString::null if not found. +* TQString() if not found. */ /*static*/ TQString TalkerCode::TalkerNameToDesktopEntryName(const TQString& name) { - if (name.isEmpty()) return TQString::null; + if (name.isEmpty()) return TQString(); 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 TQString::null; + return TQString(); } /** @@ -505,13 +505,13 @@ void TalkerCode::parseTalkerCode(const TQString &talkerCode) */ /*static*/ TQString TalkerCode::TalkerDesktopEntryNameToName(const TQString& desktopEntryName) { - if (desktopEntryName.isEmpty()) return TQString::null; + if (desktopEntryName.isEmpty()) return TQString(); KTrader::OfferList offers = KTrader::self()->query("KTTSD/SynthPlugin", - TQString("DesktopEntryName == '%1'").arg(desktopEntryName)); + TQString("DesktopEntryName == '%1'").tqarg(desktopEntryName)); if (offers.count() == 1) return offers[0]->name(); else - return TQString::null; + return TQString(); } diff --git a/kttsd/libkttsd/talkercode.h b/kttsd/libkttsd/talkercode.h index 70e8ee6..f8cbc16 100644 --- a/kttsd/libkttsd/talkercode.h +++ b/kttsd/libkttsd/talkercode.h @@ -26,7 +26,7 @@ #ifndef _TALKERCODE_H_ #define _TALKERCODE_H_ -// Qt includes. +// TQt includes. #include <tqstring.h> #include <kdemacros.h> #include "kdeexportfix.h" @@ -38,7 +38,7 @@ class KDE_EXPORT TalkerCode /** * Constructor. */ - TalkerCode(const TQString &code=TQString::null, bool normal=false); + TalkerCode(const TQString &code=TQString(), bool normal=false); /** * Copy Constructor. */ @@ -167,7 +167,7 @@ class KDE_EXPORT 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). - * TQString::null if not found. + * TQString() if not found. */ static TQString TalkerNameToDesktopEntryName(const TQString& name); diff --git a/kttsd/libkttsd/testplayer.cpp b/kttsd/libkttsd/testplayer.cpp index 1050ec2..155f2aa 100644 --- a/kttsd/libkttsd/testplayer.cpp +++ b/kttsd/libkttsd/testplayer.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -// Qt includes. +// TQt includes. #include <tqfile.h> // KDE includes. @@ -44,9 +44,9 @@ /** * Constructor. */ -TestPlayer::TestPlayer(TQObject *parent, const char *name, +TestPlayer::TestPlayer(TQObject *tqparent, const char *name, const int playerOption, const float audioStretchFactor, const TQString &sinkName) : - TQObject(parent, name) + TQObject(tqparent, name) { m_playerOption = playerOption; m_audioStretchFactor = audioStretchFactor; @@ -103,7 +103,7 @@ void TestPlayer::play(const TQString &waveFile) m_stretcher = new Stretcher(); if (m_stretcher->stretch(playFile, tmpFile, m_audioStretchFactor)) { - while (m_stretcher->getState() != Stretcher::ssFinished) qApp->processEvents(); + while (m_stretcher->getState() != Stretcher::ssFinished) tqApp->processEvents(); playFile = m_stretcher->getOutFilename(); } delete m_stretcher; @@ -123,7 +123,7 @@ void TestPlayer::play(const TQString &waveFile) // cleaning up the play object. However, because we've been called from DCOP, // this seems to be necessary. The call to processEvents is problematic because // it can cause re-entrancy. - while (m_player->playing()) qApp->processEvents(); + while (m_player->playing()) tqApp->processEvents(); // kdDebug() << "TestPlayer::play: stopping playback." << endl; m_player->stop(); delete m_player; @@ -162,7 +162,7 @@ Player* TestPlayer::createPlayerObject(int playerOption) } } KTrader::OfferList offers = KTrader::self()->query( - "KTTSD/AudioPlugin", TQString("DesktopEntryName == '%1'").arg(plugInName)); + "KTTSD/AudioPlugin", TQString("DesktopEntryName == '%1'").tqarg(plugInName)); if(offers.count() == 1) { diff --git a/kttsd/libkttsd/testplayer.h b/kttsd/libkttsd/testplayer.h index f3e4e4b..c95c369 100644 --- a/kttsd/libkttsd/testplayer.h +++ b/kttsd/libkttsd/testplayer.h @@ -33,16 +33,16 @@ class Stretcher; // TODO: Make this work asynchronously. -class KDE_EXPORT TestPlayer : public QObject{ +class KDE_EXPORT TestPlayer : public TQObject{ public: /** * Constructor. * @param playerOption * @param audioStretchFactor */ - TestPlayer(TQObject *parent = 0, const char *name = 0, + TestPlayer(TQObject *tqparent = 0, const char *name = 0, const int playerOption = 0, const float audioStretchFactor = 1.0, - const TQString &sinkName = TQString::null); + const TQString &sinkName = TQString()); /** * Destructor. diff --git a/kttsd/libkttsd/utils.cpp b/kttsd/libkttsd/utils.cpp index ed9200b..df24e35 100644 --- a/kttsd/libkttsd/utils.cpp +++ b/kttsd/libkttsd/utils.cpp @@ -41,7 +41,7 @@ bool KttsUtils::hasRootElement(const TQString &xmldoc, const TQString &elementNa if(doc.startsWith("<?xml")) { // Look for ?> and strip everything off from there to the start - effectively removing // <?xml...?> - int xmlStatementEnd = doc.find("?>"); + int xmlStatementEnd = doc.tqfind("?>"); if(xmlStatementEnd == -1) { kdDebug() << "KttsUtils::hasRootElement: Bad XML file syntax\n"; return false; @@ -51,7 +51,7 @@ bool KttsUtils::hasRootElement(const TQString &xmldoc, const TQString &elementNa } // Take off leading comments, if they exist. while(doc.startsWith("<!--") || doc.startsWith(" <!--")) { - int commentStatementEnd = doc.find("-->"); + int commentStatementEnd = doc.tqfind("-->"); if(commentStatementEnd == -1) { kdDebug() << "KttsUtils::hasRootElement: Bad XML file syntax\n"; return false; @@ -61,7 +61,7 @@ bool KttsUtils::hasRootElement(const TQString &xmldoc, const TQString &elementNa } // Take off the doctype statement if it exists. while(doc.startsWith("<!DOCTYPE") || doc.startsWith(" <!DOCTYPE")) { - int doctypeStatementEnd = doc.find(">"); + int doctypeStatementEnd = doc.tqfind(">"); if(doctypeStatementEnd == -1) { kdDebug() << "KttsUtils::hasRootElement: Bad XML file syntax\n"; return false; @@ -76,9 +76,9 @@ bool KttsUtils::hasRootElement(const TQString &xmldoc, const TQString &elementNa /** * 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 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. + * @param name The doctype name to check for. Pass TQString() to not check the name. + * @param publicId The public ID to check for. Pass TQString() to not check the ID. + * @param systemId The system ID to check for. Pass TQString() to not check the ID. * @returns True if the parameters match the doctype, false otherwise. */ bool KttsUtils::hasDoctype(const TQString &xmldoc, const TQString &name/*, const TQString &publicId, const TQString &systemId*/) { @@ -88,7 +88,7 @@ bool KttsUtils::hasDoctype(const TQString &xmldoc, const TQString &name/*, const if(doc.startsWith("<?xml")) { // Look for ?> and strip everything off from there to the start - effectively removing // <?xml...?> - int xmlStatementEnd = doc.find("?>"); + int xmlStatementEnd = doc.tqfind("?>"); if(xmlStatementEnd == -1) { kdDebug() << "KttsUtils::hasDoctype: Bad XML file syntax\n"; return false; @@ -99,7 +99,7 @@ bool KttsUtils::hasDoctype(const TQString &xmldoc, const TQString &name/*, const } // Take off leading comments, if they exist. while(doc.startsWith("<!--")) { - int commentStatementEnd = doc.find("-->"); + int commentStatementEnd = doc.tqfind("-->"); if(commentStatementEnd == -1) { kdDebug() << "KttsUtils::hasDoctype: Bad XML file syntax\n"; return false; diff --git a/kttsd/libkttsd/utils.h b/kttsd/libkttsd/utils.h index 62c4fc5..61711db 100644 --- a/kttsd/libkttsd/utils.h +++ b/kttsd/libkttsd/utils.h @@ -43,9 +43,9 @@ public: /** * 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 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. + * @param name The doctype name to check for. Pass TQString() to not check the name. + * @param publicId The public ID to check for. Pass TQString() to not check the ID. + * @param systemId The system ID to check for. Pass TQString() to not check the ID. * @returns true if the parameters match the doctype, false otherwise. */ static bool hasDoctype(const TQString &xmldoc, const TQString &name/*, const TQString &publicId, const TQString &systemId*/); diff --git a/kttsd/players/akodeplayer/akodeplayer.cpp b/kttsd/players/akodeplayer/akodeplayer.cpp index 13f6cf3..a0d38bb 100644 --- a/kttsd/players/akodeplayer/akodeplayer.cpp +++ b/kttsd/players/akodeplayer/akodeplayer.cpp @@ -29,8 +29,8 @@ using namespace aKode; // public methods //////////////////////////////////////////////////////////////////////////////// -aKodePlayer::aKodePlayer(TQObject* parent, const char* name, const TQStringList& args) : - Player(parent, name, args), +aKodePlayer::aKodePlayer(TQObject* tqparent, const char* name, const TQStringList& args) : + Player(tqparent, name, args), m_player(0) {} diff --git a/kttsd/players/akodeplayer/akodeplayer.h b/kttsd/players/akodeplayer/akodeplayer.h index c003d13..13fe8de 100644 --- a/kttsd/players/akodeplayer/akodeplayer.h +++ b/kttsd/players/akodeplayer/akodeplayer.h @@ -31,9 +31,10 @@ namespace aKode { class KDE_EXPORT aKodePlayer : public Player { Q_OBJECT + TQ_OBJECT public: - aKodePlayer(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList()); + aKodePlayer(TQObject* tqparent = 0, const char* name = 0, const TQStringList& args=TQStringList()); virtual ~aKodePlayer(); // virtual void play(const FileHandle &file = FileHandle::null()); diff --git a/kttsd/players/alsaplayer/alsaplayer.cpp b/kttsd/players/alsaplayer/alsaplayer.cpp index 72a242a..5c435d8 100644 --- a/kttsd/players/alsaplayer/alsaplayer.cpp +++ b/kttsd/players/alsaplayer/alsaplayer.cpp @@ -38,7 +38,7 @@ # endif #endif -// Qt includes. +// TQt includes. #include <tqdir.h> #include <tqapplication.h> #include <tqcstring.h> @@ -128,8 +128,8 @@ TQString AlsaPlayer::timestamp() const // public methods //////////////////////////////////////////////////////////////////////////////// -AlsaPlayer::AlsaPlayer(TQObject* parent, const char* name, const TQStringList& args) : - Player(parent, name, args), +AlsaPlayer::AlsaPlayer(TQObject* tqparent, const char* name, const TQStringList& args) : + Player(tqparent, name, args), m_currentVolume(1.0), m_pcmName("default"), m_defPeriodSize(128), @@ -432,10 +432,10 @@ TQStringList AlsaPlayer::getPluginList( const TQCString& /*classname*/ ) infoName += snd_pcm_info_get_name(pcminfo); infoName += ")"; if (0 == devCnt) { - TQString pcmName = TQString("default:%1").arg(card); + TQString pcmName = TQString("default:%1").tqarg(card); result.append(pcmName + infoName); } - TQString pcmName = TQString("plughw:%1,%2").arg(card).arg(device); + TQString pcmName = TQString("plughw:%1,%2").tqarg(card).tqarg(device); result.append(pcmName + infoName); } snd_ctl_close(handle); @@ -1001,7 +1001,7 @@ void AlsaPlayer::xrun() stream == SND_PCM_STREAM_PLAYBACK ? "underrun" : "overrun", diff.tv_sec * 1000 + diff.tv_usec / 1000.0); if (m_debugLevel >= 2) { - DBG("Status:"); + DBG("tqStatus:"); snd_pcm_status_dump(status, log); } if ((res = snd_pcm_prepare(handle))<0) { @@ -1011,7 +1011,7 @@ void AlsaPlayer::xrun() return; /* ok, data should be accepted again */ } if (SND_PCM_STATE_DRAINING == snd_pcm_status_get_state(status)) { if (m_debugLevel >= 2) { - DBG("Status(DRAINING):"); + DBG("tqStatus(DRAINING):"); snd_pcm_status_dump(status, log); } if (stream == SND_PCM_STREAM_CAPTURE) { @@ -1024,7 +1024,7 @@ void AlsaPlayer::xrun() } } if (m_debugLevel >= 2) { - DBG("Status(R/W):"); + DBG("tqStatus(R/W):"); snd_pcm_status_dump(status, log); } ERR("read/write error, state = %s", snd_pcm_state_name(snd_pcm_status_get_state(status))); @@ -1496,7 +1496,7 @@ void AlsaPlayer::header(int /*rtype*/, const char* /*name*/) else if (hwdata.channels == 2) channels = "Stereo"; else - channels = TQString("Channels %1").arg(hwdata.channels); + channels = TQString("Channels %1").tqarg(hwdata.channels); DBG("Format: %s, Rate %d Hz, %s", snd_pcm_format_description(hwdata.format), hwdata.rate, diff --git a/kttsd/players/alsaplayer/alsaplayer.h b/kttsd/players/alsaplayer/alsaplayer.h index d307060..7dedc87 100644 --- a/kttsd/players/alsaplayer/alsaplayer.h +++ b/kttsd/players/alsaplayer/alsaplayer.h @@ -28,7 +28,7 @@ #include <alsa/asoundlib.h> #include <sys/poll.h> -// Qt includes. +// TQt includes. #include <tqstring.h> #include <tqobject.h> #include <tqthread.h> @@ -63,12 +63,13 @@ static snd_pcm_sframes_t (*writei_func)(snd_pcm_t *handle, const void *buffer, s static snd_pcm_sframes_t (*readn_func)(snd_pcm_t *handle, void **bufs, snd_pcm_uframes_t size); static snd_pcm_sframes_t (*writen_func)(snd_pcm_t *handle, void **bufs, snd_pcm_uframes_t size); -class KDE_EXPORT AlsaPlayer : public Player, QThread +class KDE_EXPORT AlsaPlayer : public Player, TQThread { Q_OBJECT + TQ_OBJECT public: - AlsaPlayer(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList()); + AlsaPlayer(TQObject* tqparent = 0, const char* name = 0, const TQStringList& args=TQStringList()); ~AlsaPlayer(); virtual void startPlay(const TQString& file); diff --git a/kttsd/players/artsplayer/artsplayer.cpp b/kttsd/players/artsplayer/artsplayer.cpp index 9e6e771..63652de 100644 --- a/kttsd/players/artsplayer/artsplayer.cpp +++ b/kttsd/players/artsplayer/artsplayer.cpp @@ -40,8 +40,8 @@ // public methods //////////////////////////////////////////////////////////////////////////////// -ArtsPlayer::ArtsPlayer(TQObject* parent, const char* name, const TQStringList& args) : - Player(parent, name, args), +ArtsPlayer::ArtsPlayer(TQObject* tqparent, const char* name, const TQStringList& args) : + Player(tqparent, name, args), m_dispatcher(0), m_server(0), m_factory(0), @@ -234,7 +234,7 @@ void ArtsPlayer::setupArtsObjects() if(m_amanPlay->isNull() || !m_factory) { KMessageBox::error(0, i18n("Connecting/starting aRts soundserver failed. " "Make sure that artsd is configured properly.")); - qApp->exit(1); + tqApp->exit(1); } m_amanPlay->setTitle(i18n("kttsd")); diff --git a/kttsd/players/artsplayer/artsplayer.h b/kttsd/players/artsplayer/artsplayer.h index 879dccc..307999a 100644 --- a/kttsd/players/artsplayer/artsplayer.h +++ b/kttsd/players/artsplayer/artsplayer.h @@ -43,9 +43,10 @@ namespace KDE { class KDE_EXPORT ArtsPlayer : public Player { Q_OBJECT + TQ_OBJECT public: - ArtsPlayer(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList()); + ArtsPlayer(TQObject* tqparent = 0, const char* name = 0, const TQStringList& args=TQStringList()); ~ArtsPlayer(); // virtual void play(const FileHandle &file = FileHandle::null()); diff --git a/kttsd/players/gstplayer/gstreamerplayer.cpp b/kttsd/players/gstplayer/gstreamerplayer.cpp index 4d56556..ae06557 100644 --- a/kttsd/players/gstplayer/gstreamerplayer.cpp +++ b/kttsd/players/gstplayer/gstreamerplayer.cpp @@ -12,7 +12,7 @@ * * ***************************************************************************/ -// Qt includes. +// TQt includes. #include <tqfile.h> // KDE includes. @@ -29,8 +29,8 @@ // public methods //////////////////////////////////////////////////////////////////////////////// -GStreamerPlayer::GStreamerPlayer(TQObject* parent, const char* name, const TQStringList& args) : - Player(parent, name, args), +GStreamerPlayer::GStreamerPlayer(TQObject* tqparent, const char* name, const TQStringList& args) : + Player(tqparent, name, args), m_initialized(false), m_pipeline(0), m_source(0), @@ -94,18 +94,18 @@ bool GStreamerPlayer::paused() const int GStreamerPlayer::totalTime() const { - return time(GST_QUERY_TOTAL) / GST_SECOND; + return time(GST_TQUERY_TOTAL) / GST_SECOND; } int GStreamerPlayer::currentTime() const { - return time(GST_QUERY_POSITION) / GST_SECOND; + return time(GST_TQUERY_POSITION) / GST_SECOND; } int GStreamerPlayer::position() const { - long long total = time(GST_QUERY_TOTAL); - long long current = time(GST_QUERY_POSITION); + long long total = time(GST_TQUERY_TOTAL); + long long current = time(GST_TQUERY_POSITION); return total > 0 ? int((double(current) / double(total)) * double(1000) + 0.5) : 0; } @@ -117,7 +117,7 @@ void GStreamerPlayer::seek(int seekTime) void GStreamerPlayer::seekPosition(int position) { - long long total = time(GST_QUERY_TOTAL); + long long total = time(GST_TQUERY_TOTAL); if(total > 0) seek(int(double(position) / double(1000) * double(totalTime()) + 0.5)); } @@ -189,12 +189,12 @@ bool GStreamerPlayer::requireVersion(uint major, uint minor, uint micro) } gst_version(&gmajor, &gminor, &gmicro); - // kdDebug() << TQString("GStreamerPlayer::requireVersion: You have gstreamer %1.%2.%3 installed.").arg(gmajor).arg(gminor).arg(gmicro) << endl; + // kdDebug() << TQString("GStreamerPlayer::requireVersion: You have gstreamer %1.%2.%3 installed.").tqarg(gmajor).tqarg(gminor).tqarg(gmicro) << endl; if (gmajor > major) return true; if (gminor > minor) return true; if (gmicro >= micro) return true; - kdDebug() << TQString("GStreamerPlayer::requireVersion: You have gstreamer %1.%2.%3 installed.").arg(gmajor).arg(gminor).arg(gmicro) << endl; - kdDebug() << TQString("GStreamerPlayer::requireVersion: This application requires %1.%2.%3 or greater.").arg(major).arg(minor).arg(micro) << endl; + kdDebug() << TQString("GStreamerPlayer::requireVersion: You have gstreamer %1.%2.%3 installed.").tqarg(gmajor).tqarg(gminor).tqarg(gmicro) << endl; + kdDebug() << TQString("GStreamerPlayer::requireVersion: This application requires %1.%2.%3 or greater.").tqarg(major).tqarg(minor).tqarg(micro) << endl; return false; } @@ -207,7 +207,7 @@ void GStreamerPlayer::setSinkName(const TQString &sinkName) { m_sinkName = sinkN void GStreamerPlayer::readConfig() { KConfigGroup config(KGlobal::config(), "GStreamerPlayer"); - m_sinkName = config.readEntry("SinkName", TQString::null); + m_sinkName = config.readEntry("SinkName", TQString()); } void GStreamerPlayer::setupPipeline() diff --git a/kttsd/players/gstplayer/gstreamerplayer.h b/kttsd/players/gstplayer/gstreamerplayer.h index 13701ab..066b493 100644 --- a/kttsd/players/gstplayer/gstreamerplayer.h +++ b/kttsd/players/gstplayer/gstreamerplayer.h @@ -28,9 +28,10 @@ extern "C" { class GStreamerPlayer : public Player { Q_OBJECT + TQ_OBJECT public: - GStreamerPlayer(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList()); + GStreamerPlayer(TQObject* tqparent = 0, const char* name = 0, const TQStringList& args=TQStringList()); virtual ~GStreamerPlayer(); // virtual void play(const FileHandle &file = FileHandle::null()); diff --git a/kttsd/plugins/command/commandconf.cpp b/kttsd/plugins/command/commandconf.cpp index 5d46fe9..5c4605f 100644 --- a/kttsd/plugins/command/commandconf.cpp +++ b/kttsd/plugins/command/commandconf.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -// Qt includes. +// TQt includes. #include <tqlayout.h> #include <tqcheckbox.h> #include <tqfile.h> @@ -41,18 +41,18 @@ #include "commandconf.h" /** Constructor */ -CommandConf::CommandConf( TQWidget* parent, const char* name, const TQStringList& /*args*/) : - PlugInConf(parent, name) +CommandConf::CommandConf( TQWidget* tqparent, const char* name, const TQStringList& /*args*/) : + PlugInConf(tqparent, name) { // kdDebug() << "CommandConf::CommandConf: Running" << endl; m_commandProc = 0; m_progressDlg = 0; - TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "CommandConfigWidgetLayout"); - layout->setAlignment (Qt::AlignTop); + tqlayout->tqsetAlignment (TQt::AlignTop); m_widget = new CommandConfWidget(this, "CommandConfigWidget"); - layout->addWidget(m_widget); + tqlayout->addWidget(m_widget); // Build codec list and fill combobox. m_codecList = PlugInProc::buildCodecList(); @@ -121,21 +121,21 @@ TQString CommandConf::getTalkerCode() { // Must contain either text or file parameter, or StdIn checkbox must be checked, // otherwise, does nothing! - if ((url.contains("%t") > 0) || (url.contains("%f") > 0) || m_widget->stdInButton->isChecked()) + if ((url.tqcontains("%t") > 0) || (url.tqcontains("%f") > 0) || m_widget->stdInButton->isChecked()) { return TQString( "<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />" "<prosody volume=\"%4\" rate=\"%5\" />" "<kttsd synthesizer=\"%6\" />") - .arg(m_languageCode) - .arg("fixed") - .arg("neutral") - .arg("medium") - .arg("medium") - .arg("Command"); + .tqarg(m_languageCode) + .tqarg("fixed") + .tqarg("neutral") + .tqarg("medium") + .tqarg("medium") + .tqarg("Command"); } } - return TQString::null; + return TQString(); } void CommandConf::slotCommandTest_clicked() @@ -203,7 +203,7 @@ void CommandConf::slotSynthFinished() // Player object deletes the wave file when done. if (m_player) m_player->play(m_waveFile); TQFile::remove(m_waveFile); - m_waveFile = TQString::null; + m_waveFile = TQString(); if (m_progressDlg) m_progressDlg->close(); } diff --git a/kttsd/plugins/command/commandconf.h b/kttsd/plugins/command/commandconf.h index b3889b9..4607718 100644 --- a/kttsd/plugins/command/commandconf.h +++ b/kttsd/plugins/command/commandconf.h @@ -18,7 +18,7 @@ #ifndef _COMMANDCONF_H_ #define _COMMANDCONF_H_ -// Qt includes. +// TQt includes. #include <tqstring.h> #include <tqstringlist.h> @@ -35,11 +35,12 @@ class CommandProc; class KProgressDialog; class CommandConf : public PlugInConf { - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: /** Constructor */ - CommandConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + CommandConf( TQWidget* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); /** Destructor */ ~CommandConf(); @@ -71,7 +72,7 @@ class CommandConf : public PlugInConf { * This function informs the plugin of the desired language to be spoken * by the plugin. The plugin should attempt to adapt itself to the * specified language code, choosing sensible defaults if necessary. - * If the passed-in code is TQString::null, no specific language has + * If the passed-in code is TQString(), no specific language has * been chosen. * @param lang The desired language code or Null if none. * @@ -89,7 +90,7 @@ class CommandConf : public PlugInConf { * Return fully-specified talker code for the configured plugin. This code * uniquely identifies the configured instance of the plugin and distinquishes * one instance from another. If the plugin has not been fully configured, - * i.e., cannot yet synthesize, return TQString::null. + * i.e., cannot yet synthesize, return TQString(). * @return Fully-specified talker code. */ TQString getTalkerCode(); diff --git a/kttsd/plugins/command/commandconfwidget.ui b/kttsd/plugins/command/commandconfwidget.ui index b0b749c..7a45b20 100644 --- a/kttsd/plugins/command/commandconfwidget.ui +++ b/kttsd/plugins/command/commandconfwidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>CommandConfWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>CommandConfWidget</cstring> </property> @@ -22,7 +22,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>confiurationBox</cstring> </property> @@ -53,7 +53,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>urlLabel</cstring> </property> @@ -72,15 +72,15 @@ <string>This field specifies both the command used for speaking texts and its parameters. If you want to pass the text as a parameter, write %t at the place where the text should be inserted. To pass a file of the text, write %f. To synthesize only and let KTTSD play the synthesized text, write %w for the generated audio file.</string> </property> </widget> - <widget class="QLayoutWidget" row="5" column="0"> + <widget class="TQLayoutWidget" row="5" column="0"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>stdInButton</cstring> </property> @@ -101,14 +101,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>201</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>commandTestButton</cstring> </property> @@ -118,15 +118,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="4" column="0"> + <widget class="TQLayoutWidget" row="4" column="0"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>characterCodingLabel</cstring> </property> @@ -163,7 +163,7 @@ </widget> </hbox> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>explanationLabel</cstring> </property> @@ -187,7 +187,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>30</height> @@ -214,10 +214,10 @@ <include location="global" impldecl="in implementation">kpushbutton.h</include> <include location="global" impldecl="in implementation">kcombobox.h</include> </includes> -<signals> +<Q_SIGNALS> <signal>configurationChanged()</signal> -</signals> -<layoutdefaults spacing="6" margin="11"/> +</Q_SIGNALS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kttsd/plugins/command/commandproc.cpp b/kttsd/plugins/command/commandproc.cpp index 77d63f3..8f8c500 100644 --- a/kttsd/plugins/command/commandproc.cpp +++ b/kttsd/plugins/command/commandproc.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -// Qt includes. +// TQt includes. #include <tqfile.h> #include <tqstring.h> #include <tqvaluelist.h> @@ -39,8 +39,8 @@ #include "commandproc.moc" /** Constructor */ -CommandProc::CommandProc( TQObject* parent, const char* name, const TQStringList& /*args*/) : - PlugInProc( parent, name ) +CommandProc::CommandProc( TQObject* tqparent, const char* name, const TQStringList& /*args*/) : + PlugInProc( tqparent, name ) { kdDebug() << "CommandProc::CommandProc: Running" << endl; m_commandProc = 0; @@ -72,8 +72,8 @@ bool CommandProc::init(KConfig *config, const TQString &configGroup){ m_stdin = config->readBoolEntry("StdIn", true); m_language = config->readEntry("LanguageCode", "en"); - // Support separate synthesis if the TTS command contains %w macro. - m_supportsSynth = (m_ttsCommand.contains("%w")); + // Support separate synthesis if the TTS command tqcontains %w macro. + m_supportsSynth = (m_ttsCommand.tqcontains("%w")); TQString codecString = config->readEntry("Codec", "Local"); m_codec = codecNameToCodec(codecString); @@ -89,7 +89,7 @@ bool CommandProc::init(KConfig *config, const TQString &configGroup){ */ void CommandProc::sayText(const TQString &text) { - synth(text, TQString::null, + synth(text, TQString(), m_ttsCommand, m_stdin, m_codec, m_language); } @@ -127,9 +127,9 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile if (m_commandProc->isRunning()) m_commandProc->kill(); delete m_commandProc; m_commandProc = 0; - m_synthFilename = TQString::null; + m_synthFilename = TQString(); if (!m_textFilename.isNull()) TQFile::remove(m_textFilename); - m_textFilename = TQString::null; + m_textFilename = TQString(); } TQString command = userCmd; TQString text = inputText.stripWhiteSpace(); @@ -147,7 +147,7 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile TQString escText = KShellProcess::quote(text); // 1.c) create a temporary file for the text, if %f macro is used. - if (command.contains("%f")) + if (command.tqcontains("%f")) { KTempFile tempFile(locateLocal("tmp", "commandplugin-"), ".txt"); TQTextStream* fs = tempFile.textStream(); @@ -156,13 +156,13 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile *fs << endl; m_textFilename = tempFile.file()->name(); tempFile.close(); - } else m_textFilename = TQString::null; + } else m_textFilename = TQString(); // 2. replace variables with values TQValueStack<bool> stack; bool issinglequote=false; bool isdoublequote=false; - int noreplace=0; + int notqreplace=0; TQRegExp re_noquote("(\"|'|\\\\|`|\\$\\(|\\$\\{|\\(|\\{|\\)|\\}|%%|%t|%f|%l|%w)"); TQRegExp re_singlequote("('|%%|%t|%f|%l|%w)"); TQRegExp re_doublequote("(\"|\\\\|`|\\$\\(|\\$\\{|%%|%t|%f|%l|%w)"); @@ -178,18 +178,18 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile { // assert(isdoublequote == false) stack.push(isdoublequote); - if (noreplace > 0) + if (notqreplace > 0) // count nested braces when within ${...} - noreplace++; + notqreplace++; i++; } else if (command[i]=='$') { stack.push(isdoublequote); isdoublequote = false; - if ((noreplace > 0) || (command[i+1]=='{')) + if ((notqreplace > 0) || (command[i+1]=='{')) // count nested braces when within ${...} - noreplace++; + notqreplace++; i+=2; } else if ((command[i]==')') || (command[i]=='}')) @@ -199,9 +199,9 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile isdoublequote = stack.pop(); else qWarning("Parse error."); - if (noreplace > 0) + if (notqreplace > 0) // count nested braces when within ${...} - noreplace--; + notqreplace--; i++; } else if (command[i]=='\'') @@ -219,7 +219,7 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile else if (command[i]=='`') { // Replace all `...` with safer $(...) - command.replace (i, 1, "$("); + command.tqreplace (i, 1, "$("); TQRegExp re_backticks("(`|\\\\`|\\\\\\\\|\\\\\\$)"); for ( int i2=re_backticks.search(command,i+2); i2!=-1; @@ -228,7 +228,7 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile { if (command[i2] == '`') { - command.replace (i2, 1, ")"); + command.tqreplace (i2, 1, ")"); i2=command.length(); // leave loop } else @@ -239,7 +239,7 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile } // Leave i unchanged! We need to process "$(" } - else if (noreplace == 0) // do not replace macros within ${...} + else if (notqreplace == 0) // do not replace macros within ${...} { TQString match, v; @@ -269,7 +269,7 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile else if (issinglequote) v="'"+v+"'"; - command.replace (i, match.length(), v); + command.tqreplace (i, match.length(), v); i+=v.length(); } else @@ -382,13 +382,13 @@ void CommandProc::slotProcessExited(KProcess*) void CommandProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) { - TQString buf = TQString::fromLatin1(buffer, buflen); + TQString buf = TQString::tqfromLatin1(buffer, buflen); kdDebug() << "CommandProc::slotReceivedStdout: Received output from Command: " << buf << endl; } void CommandProc::slotReceivedStderr(KProcess*, char* buffer, int buflen) { - TQString buf = TQString::fromLatin1(buffer, buflen); + TQString buf = TQString::tqfromLatin1(buffer, buflen); kdDebug() << "CommandProc::slotReceivedStderr: Received error from Command: " << buf << endl; } @@ -420,9 +420,9 @@ void CommandProc::ackFinished() if (m_state == psFinished) { m_state = psIdle; - m_synthFilename = TQString::null; + m_synthFilename = TQString(); if (!m_textFilename.isNull()) TQFile::remove(m_textFilename); - m_textFilename = TQString::null; + m_textFilename = TQString(); } } diff --git a/kttsd/plugins/command/commandproc.h b/kttsd/plugins/command/commandproc.h index c1880be..0faf1f4 100644 --- a/kttsd/plugins/command/commandproc.h +++ b/kttsd/plugins/command/commandproc.h @@ -18,7 +18,7 @@ #ifndef _COMMANDPROC_H_ #define _COMMANDPROC_H_ -// Qt includes. +// TQt includes. #include <tqstringlist.h> // KTTS includes. @@ -28,11 +28,12 @@ class KProcess; class TQTextCodec; class CommandProc : public PlugInProc{ - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: /** Constructor */ - CommandProc( TQObject* parent = 0, const char* name = 0, + CommandProc( TQObject* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); /** Destructor */ diff --git a/kttsd/plugins/epos/eposconf.cpp b/kttsd/plugins/epos/eposconf.cpp index 8b5ccf0..b3cd27d 100644 --- a/kttsd/plugins/epos/eposconf.cpp +++ b/kttsd/plugins/epos/eposconf.cpp @@ -24,7 +24,7 @@ // C++ includes. #include <math.h> -// Qt includes. +// TQt includes. #include <tqfile.h> #include <tqapplication.h> #include <tqtextcodec.h> @@ -48,18 +48,18 @@ #include "eposconf.moc" /** Constructor */ -EposConf::EposConf( TQWidget* parent, const char* name, const TQStringList& /*args*/) : - PlugInConf(parent, name) +EposConf::EposConf( TQWidget* tqparent, const char* name, const TQStringList& /*args*/) : + PlugInConf(tqparent, name) { // kdDebug() << "EposConf::EposConf: Running" << endl; m_eposProc = 0; m_progressDlg = 0; - TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "EposConfigWidgetLayout"); - layout->setAlignment (Qt::AlignTop); + tqlayout->tqsetAlignment (TQt::AlignTop); m_widget = new EposConfWidget(this, "EposConfigWidget"); - layout->addWidget(m_widget); + tqlayout->addWidget(m_widget); // Build codec list and fill combobox. m_codecList = PlugInProc::buildCodecList(); @@ -194,15 +194,15 @@ TQString EposConf::getTalkerCode() "<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />" "<prosody volume=\"%4\" rate=\"%5\" />" "<kttsd synthesizer=\"%6\" />") - .arg(m_languageCode) - .arg("fixed") - .arg("neutral") - .arg("medium") - .arg(rate) - .arg("Epos TTS Synthesis System"); + .tqarg(m_languageCode) + .tqarg("fixed") + .tqarg("neutral") + .tqarg("medium") + .tqarg(rate) + .tqarg("Epos TTS Synthesis System"); } } - return TQString::null; + return TQString(); } void EposConf::slotEposTest_clicked() @@ -275,7 +275,7 @@ void EposConf::slotSynthFinished() // Player object deletes the wave file when done. if (m_player) m_player->play(m_waveFile); TQFile::remove(m_waveFile); - m_waveFile = TQString::null; + m_waveFile = TQString(); if (m_progressDlg) m_progressDlg->close(); } diff --git a/kttsd/plugins/epos/eposconf.h b/kttsd/plugins/epos/eposconf.h index 08cb611..667d445 100644 --- a/kttsd/plugins/epos/eposconf.h +++ b/kttsd/plugins/epos/eposconf.h @@ -24,7 +24,7 @@ #ifndef _EPOSCONF_H_ #define _EPOSCONF_H_ -// Qt includes. +// TQt includes. #include <tqstring.h> // KDE includes. @@ -42,11 +42,12 @@ class EposProc; class KProgressDialog; class EposConf : public PlugInConf { - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: /** Constructor */ - EposConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + EposConf( TQWidget* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); /** Destructor */ ~EposConf(); @@ -78,7 +79,7 @@ class EposConf : public PlugInConf { * This function informs the plugin of the desired language to be spoken * by the plugin. The plugin should attempt to adapt itself to the * specified language code, choosing sensible defaults if necessary. - * If the passed-in code is TQString::null, no specific language has + * If the passed-in code is TQString(), no specific language has * been chosen. * @param lang The desired language code or Null if none. * @@ -96,7 +97,7 @@ class EposConf : public PlugInConf { * Return fully-specified talker code for the configured plugin. This code * uniquely identifies the configured instance of the plugin and distinquishes * one instance from another. If the plugin has not been fully configured, - * i.e., cannot yet synthesize, return TQString::null. + * i.e., cannot yet synthesize, return TQString(). * @return Fully-specified talker code. */ TQString getTalkerCode(); diff --git a/kttsd/plugins/epos/eposconfwidget.ui b/kttsd/plugins/epos/eposconfwidget.ui index 23e47da..3cc032e 100644 --- a/kttsd/plugins/epos/eposconfwidget.ui +++ b/kttsd/plugins/epos/eposconfwidget.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>EposConfWidget</class> <author>Gary Cramblitt</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>EposConfWidget</cstring> </property> @@ -31,7 +31,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>eposConfigurationBox</cstring> </property> @@ -65,15 +65,15 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>characterCodingLabel</cstring> </property> @@ -110,23 +110,23 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout17</cstring> + <cstring>tqlayout17</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>timeLabel</cstring> </property> @@ -148,7 +148,7 @@ <string>Sets the speed of speech. Slide the slider to the left to slow speech down; to the right to increase talking speed. Anything less than 75 percent is considered "slow", and anything greater than 125 percent is considered "fast".</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>frequencyLabel</cstring> </property> @@ -172,9 +172,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <vbox> <property name="name"> @@ -244,15 +244,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>timeSlider</cstring> </property> @@ -281,7 +281,7 @@ <string>Sets the speed of speech. Slide the slider to the left to slow speech down; to the right to increase talking speed. Anything less than 75 percent is considered "slow", and anything greater than 125 percent is considered "fast".</string> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>frequencySlider</cstring> </property> @@ -314,23 +314,23 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>eposServerPathLabel</cstring> </property> @@ -345,7 +345,7 @@ <property name="text"> <string>Epos server executable path:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter</set> </property> <property name="buddy" stdset="0"> @@ -355,7 +355,7 @@ <string>If the Epos server program will be found due to your PATH environment variable, simply enter "epos", otherwise enter the full path to the Epos server executable program.</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>eposClientPathLabel</cstring> </property> @@ -370,7 +370,7 @@ <property name="text"> <string>Epos client executable path:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter</set> </property> <property name="buddy" stdset="0"> @@ -382,9 +382,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <vbox> <property name="name"> @@ -432,7 +432,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox" row="3" column="0"> + <widget class="TQGroupBox" row="3" column="0"> <property name="name"> <cstring>advancedGroupBox</cstring> </property> @@ -443,23 +443,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>eposServerOptions</cstring> </property> @@ -467,7 +467,7 @@ <string>Optional. Enter any server command line options here. To see available options, enter "epos -h" in a terminal. Do not use "-o".</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>eposClientOptions</cstring> </property> @@ -477,15 +477,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>eposServerOptionsLabel</cstring> </property> @@ -500,7 +500,7 @@ <property name="text"> <string>Epos server:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignLeft</set> </property> <property name="buddy" stdset="0"> @@ -510,7 +510,7 @@ <string>Optional. Enter any server command line options here. To see available options, enter "epos -h" in a terminal. Do not use "-o".</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>eposClientOptionsLabel</cstring> </property> @@ -525,7 +525,7 @@ <property name="text"> <string>Epos client:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignLeft</set> </property> <property name="buddy" stdset="0"> @@ -541,9 +541,9 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget" row="4" column="0"> + <widget class="TQLayoutWidget" row="4" column="0"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -559,14 +559,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>410</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>eposTest</cstring> </property> @@ -595,7 +595,7 @@ <include location="global" impldecl="in declaration">kurlrequester.h</include> <include location="global" impldecl="in implementation">kurlrequester.h</include> </includes> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>knuminput.h</includehint> diff --git a/kttsd/plugins/epos/eposproc.cpp b/kttsd/plugins/epos/eposproc.cpp index e5fd664..ae7973c 100644 --- a/kttsd/plugins/epos/eposproc.cpp +++ b/kttsd/plugins/epos/eposproc.cpp @@ -25,7 +25,7 @@ // C++ includes. #include <math.h> -// Qt includes. +// TQt includes. #include <tqstring.h> #include <tqstringlist.h> #include <tqtextcodec.h> @@ -43,8 +43,8 @@ #include "eposproc.moc" /** Constructor */ -EposProc::EposProc( TQObject* parent, const char* name, const TQStringList& ) : - PlugInProc( parent, name ){ +EposProc::EposProc( TQObject* tqparent, const char* name, const TQStringList& ) : + PlugInProc( tqparent, name ){ kdDebug() << "EposProc::EposProc: Running" << endl; m_state = psIdle; m_waitingStop = false; @@ -72,11 +72,11 @@ bool EposProc::init(KConfig* config, const TQString& configGroup) config->setGroup(configGroup); m_eposServerExePath = config->readEntry("EposServerExePath", "epos"); m_eposClientExePath = config->readEntry("EposClientExePath", "say"); - m_eposLanguage = config->readEntry("Language", TQString::null); + m_eposLanguage = config->readEntry("Language", TQString()); m_time = config->readNumEntry("time", 100); m_pitch = config->readNumEntry("pitch", 100); - m_eposServerOptions = config->readEntry("EposServerOptions", TQString::null); - m_eposClientOptions = config->readEntry("EposClientOptions", TQString::null); + m_eposServerOptions = config->readEntry("EposServerOptions", TQString()); + m_eposClientOptions = config->readEntry("EposClientOptions", TQString()); kdDebug() << "EposProc::init: path to epos server: " << m_eposServerExePath << endl; kdDebug() << "EposProc::init: path to epos client: " << m_eposClientExePath << endl; @@ -109,7 +109,7 @@ bool EposProc::init(KConfig* config, const TQString& configGroup) */ void EposProc::sayText(const TQString &text) { - synth(text, TQString::null, m_eposServerExePath, m_eposClientExePath, + synth(text, TQString(), m_eposServerExePath, m_eposClientExePath, m_eposServerOptions, m_eposClientOptions, m_codec, m_eposLanguage, m_time, m_pitch); } @@ -210,7 +210,7 @@ void EposProc::synth( *m_eposProc << eposClientExePath; // Language. if (!eposLanguage.isEmpty()) - *m_eposProc << TQString("--language=%1").arg(eposLanguage); + *m_eposProc << TQString("--language=%1").tqarg(eposLanguage); // Rate (speed). // Map 50% to 200% onto 0 to 1000. // slider = alpha * (log(percent)-log(50)) @@ -221,10 +221,10 @@ void EposProc::synth( slider = slider - 500; // Map -500 to 500 onto 45 to -45 then shift to 130 to 40 (85 midpoint). float stretchValue = (-float(slider) * 45.0 / 500.0) + 85.0; - TQString timeMsg = TQString("--init_t=%1").arg(stretchValue, 0, 'f', 3); + TQString timeMsg = TQString("--init_t=%1").tqarg(stretchValue, 0, 'f', 3); *m_eposProc << timeMsg; // Pitch. Map 50% to 200% onto 50 to 200. easy. - TQString pitchMsg = TQString("--init_f=%1").arg(pitch); + TQString pitchMsg = TQString("--init_f=%1").tqarg(pitch); *m_eposProc << pitchMsg; // Output file. if (!suggestedFilename.isEmpty()) @@ -326,13 +326,13 @@ void EposProc::slotProcessExited(KProcess*) void EposProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) { - TQString buf = TQString::fromLatin1(buffer, buflen); + TQString buf = TQString::tqfromLatin1(buffer, buflen); kdDebug() << "EposProc::slotReceivedStdout: Received output from Epos: " << buf << endl; } void EposProc::slotReceivedStderr(KProcess*, char* buffer, int buflen) { - TQString buf = TQString::fromLatin1(buffer, buflen); + TQString buf = TQString::tqfromLatin1(buffer, buflen); kdDebug() << "EposProc::slotReceivedStderr: Received error from Epos: " << buf << endl; } @@ -365,7 +365,7 @@ void EposProc::ackFinished() if (m_state == psFinished) { m_state = psIdle; - m_synthFilename = TQString::null; + m_synthFilename = TQString(); } } diff --git a/kttsd/plugins/epos/eposproc.h b/kttsd/plugins/epos/eposproc.h index b12783a..0689481 100644 --- a/kttsd/plugins/epos/eposproc.h +++ b/kttsd/plugins/epos/eposproc.h @@ -25,7 +25,7 @@ #ifndef _EPOSPROC_H_ #define _EPOSPROC_H_ -// Qt includes. +// TQt includes. #include <tqstringlist.h> #include <tqmutex.h> @@ -36,13 +36,14 @@ class KProcess; class TQTextCodec; class EposProc : public PlugInProc{ - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: /** * Constructor */ - EposProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + EposProc( TQObject* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); /** * Destructor diff --git a/kttsd/plugins/festivalint/festivalintconf.cpp b/kttsd/plugins/festivalint/festivalintconf.cpp index 8464ad7..54542ab 100644 --- a/kttsd/plugins/festivalint/festivalintconf.cpp +++ b/kttsd/plugins/festivalint/festivalintconf.cpp @@ -24,7 +24,7 @@ // C++ includes. #include <math.h> -// Qt includes. +// TQt includes. #include <tqlayout.h> #include <tqlabel.h> #include <tqstring.h> @@ -57,19 +57,19 @@ #include "festivalintconf.moc" /** Constructor */ -FestivalIntConf::FestivalIntConf( TQWidget* parent, const char* name, const TQStringList& /*args*/) : - PlugInConf(parent, name) +FestivalIntConf::FestivalIntConf( TQWidget* tqparent, const char* name, const TQStringList& /*args*/) : + PlugInConf(tqparent, name) { // kdDebug() << "FestivalIntConf::FestivalIntConf: Running" << endl; m_festProc = 0; m_progressDlg = 0; m_supportsSSML = FestivalIntProc::ssUnknown; - TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "FestivalIntConfigWidgetLayout"); - layout->setAlignment (Qt::AlignTop); + tqlayout->tqsetAlignment (TQt::AlignTop); m_widget = new FestivalIntConfWidget(this, "FestivalIntConfigWidget"); - layout->addWidget(m_widget); + tqlayout->addWidget(m_widget); m_widget->festivalPath->setMode(KFile::File | KFile::ExistingOnly); m_widget->festivalPath->setFilter("*"); @@ -210,11 +210,11 @@ void FestivalIntConf::setDesiredLanguage(const TQString &lang) TQString FestivalIntConf::getTalkerCode() { - if (!m_widget->selectVoiceCombo->isEnabled()) return TQString::null; + if (!m_widget->selectVoiceCombo->isEnabled()) return TQString(); TQString exePath = realFilePath(m_widget->festivalPath->url()); - if (exePath.isEmpty()) return TQString::null; - if (getLocation(exePath).isEmpty()) return TQString::null; - if (m_voiceList.count() == 0) return TQString::null; + if (exePath.isEmpty()) return TQString(); + if (getLocation(exePath).isEmpty()) return TQString(); + if (m_voiceList.count() == 0) return TQString(); TQString normalTalkerCode; voiceStruct voiceTemp = m_voiceList[m_widget->selectVoiceCombo->currentItem()]; // Determine volume attribute. soft < 75% <= medium <= 125% < loud. @@ -229,12 +229,12 @@ TQString FestivalIntConf::getTalkerCode() "<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />" "<prosody volume=\"%4\" rate=\"%5\" />" "<kttsd synthesizer=\"%6\" />") - .arg(voiceTemp.languageCode) - .arg(voiceTemp.code) - .arg(voiceTemp.gender) - .arg(volume) - .arg(rate) - .arg("Festival Interactive"); + .tqarg(voiceTemp.languageCode) + .tqarg(voiceTemp.code) + .tqarg(voiceTemp.gender) + .tqarg(volume) + .tqarg(rate) + .tqarg("Festival Interactive"); return normalTalkerCode; } @@ -485,7 +485,7 @@ void FestivalIntConf::scanVoices() for (uint index=0; index < voicesCount; ++index) { TQDomNode voiceNode = voices.item(index); - TQString voiceCode = readXmlString(voiceNode, "code", TQString::null); + TQString voiceCode = readXmlString(voiceNode, "code", TQString()); // kdDebug() << "FestivalIntConf::scanVoices: Comparing code " << code << " to " << voiceCode << endl; if (voiceCode == code) { @@ -621,7 +621,7 @@ void FestivalIntConf::slotSynthFinished() // Player object deletes the wave file when done. if (m_player) m_player->play(m_waveFile); TQFile::remove(m_waveFile); - m_waveFile = TQString::null; + m_waveFile = TQString(); if (m_progressDlg) m_progressDlg->close(); } diff --git a/kttsd/plugins/festivalint/festivalintconf.h b/kttsd/plugins/festivalint/festivalintconf.h index 5282394..3379719 100644 --- a/kttsd/plugins/festivalint/festivalintconf.h +++ b/kttsd/plugins/festivalint/festivalintconf.h @@ -24,7 +24,7 @@ #ifndef _FESTIVALINTCONF_H_ #define _FESTIVALINTCONF_H_ -// Qt includes. +// TQt includes. #include <tqstringlist.h> #include <tqvaluelist.h> @@ -55,11 +55,12 @@ typedef struct voiceStruct{ } voice; class FestivalIntConf : public PlugInConf { - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: /** Constructor */ - FestivalIntConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + FestivalIntConf( TQWidget* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); /** Destructor */ ~FestivalIntConf(); @@ -90,7 +91,7 @@ class FestivalIntConf : public PlugInConf { * This function informs the plugin of the desired language to be spoken * by the plugin. The plugin should attempt to adapt itself to the * specified language code, choosing sensible defaults if necessary. - * If the passed-in code is TQString::null, no specific language has + * If the passed-in code is TQString(), no specific language has * been chosen. * @param lang The desired language code or Null if none. * @@ -108,7 +109,7 @@ class FestivalIntConf : public PlugInConf { * Return fully-specified talker code for the configured plugin. This code * uniquely identifies the configured instance of the plugin and distinquishes * one instance from another. If the plugin has not been fully configured, - * i.e., cannot yet synthesize, return TQString::null. + * i.e., cannot yet synthesize, return TQString(). * @return Fully-specified talker code. */ TQString getTalkerCode(); diff --git a/kttsd/plugins/festivalint/festivalintconfwidget.ui b/kttsd/plugins/festivalint/festivalintconfwidget.ui index f8b33fb..36f65bd 100644 --- a/kttsd/plugins/festivalint/festivalintconfwidget.ui +++ b/kttsd/plugins/festivalint/festivalintconfwidget.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>FestivalIntConfWidget</class> <author>Gary Cramblitt <garycramblitt@comcast.net></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>FestivalIntConfWidget</cstring> </property> @@ -31,7 +31,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>festivalConfigurationBox</cstring> </property> @@ -65,7 +65,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> <cstring>voicesPathBox</cstring> </property> @@ -79,7 +79,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>festivalPathLabel</cstring> </property> @@ -94,7 +94,7 @@ <property name="text"> <string>&Festival executable:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -122,7 +122,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> <cstring>selectVoiceBox</cstring> </property> @@ -136,14 +136,14 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>selectVoiceLabel</cstring> </property> <property name="text"> <string>&Select voice:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -180,23 +180,23 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>volumeLabel</cstring> </property> @@ -218,7 +218,7 @@ <string>Sets the volume (loudness) of speech. Slide the slider to the left to lower the volume; to the right to increase volume. Anything less than 75 percent is considered "soft", and anything greater than 125 percent is considered "loud".</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>timeLabel</cstring> </property> @@ -240,7 +240,7 @@ <string>Sets the speed of speech. Slide the slider to the left to slow speech down; to the right to increase talking speed. Anything less than 75 percent is considered "slow", and anything greater than 125 percent is considered "fast". You cannot change the speed of MultiSyn voices.</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>frequencyLabel</cstring> </property> @@ -264,9 +264,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <vbox> <property name="name"> @@ -367,15 +367,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>volumeSlider</cstring> </property> @@ -407,7 +407,7 @@ <string>Sets the volume (loudness) of speech. Slide the slider to the left to lower the volume; to the right to increase volume. Anything less than 75 percent is considered "soft", and anything greater than 125 percent is considered "loud".</string> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>timeSlider</cstring> </property> @@ -436,7 +436,7 @@ <string>Sets the speed of speech. Slide the slider to the left to slow speech down; to the right to increase talking speed. Anything less than 75 percent is considered "slow", and anything greater than 125 percent is considered "fast". You cannot change the speed of MultiSyn voices.</string> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>frequencySlider</cstring> </property> @@ -469,15 +469,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="4" column="0"> + <widget class="TQLayoutWidget" row="4" column="0"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>preloadCheckBox</cstring> </property> @@ -498,14 +498,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>101</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>testButton</cstring> </property> @@ -518,15 +518,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="3" column="0"> + <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>characterCodingLabel</cstring> </property> @@ -583,7 +583,7 @@ <include location="global" impldecl="in declaration">kurlrequester.h</include> <include location="global" impldecl="in implementation">kurlrequester.h</include> </includes> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kttsd/plugins/festivalint/festivalintproc.cpp b/kttsd/plugins/festivalint/festivalintproc.cpp index e48f2c4..2b4aea3 100644 --- a/kttsd/plugins/festivalint/festivalintproc.cpp +++ b/kttsd/plugins/festivalint/festivalintproc.cpp @@ -24,7 +24,7 @@ // C++ includes. #include <math.h> -// Qt includes. +// TQt includes. #include <tqstring.h> #include <tqstringlist.h> #include <tqthread.h> @@ -43,8 +43,8 @@ #include "festivalintproc.moc" /** Constructor */ -FestivalIntProc::FestivalIntProc( TQObject* parent, const char* name, const TQStringList& ) : - PlugInProc( parent, name ){ +FestivalIntProc::FestivalIntProc( TQObject* tqparent, const char* name, const TQStringList& ) : + PlugInProc( tqparent, name ){ // kdDebug() << "FestivalIntProc::FestivalIntProc: Running" << endl; m_ready = true; m_writingStdin = false; @@ -113,7 +113,7 @@ bool FestivalIntProc::init(KConfig *config, const TQString &configGroup) */ void FestivalIntProc::sayText(const TQString &text) { - synth(m_festivalExePath, text, TQString::null, m_voiceCode, m_time, m_pitch, m_volume, + synth(m_festivalExePath, text, TQString(), m_voiceCode, m_time, m_pitch, m_volume, m_languageCode, m_codec); } @@ -144,7 +144,7 @@ bool FestivalIntProc::queryVoices(const TQString &festivalExePath) // kdDebug() << "FestivalIntProc::queryVoices: Running" << endl; if (m_state != psIdle && m_waitingQueryVoices && m_waitingStop) return false; // Start Festival if not already running. - startEngine(festivalExePath, TQString::null, m_languageCode, m_codec); + startEngine(festivalExePath, TQString(), m_languageCode, m_codec); // Set state, waiting for voice codes list from Festival. m_waitingQueryVoices = true; // Voice rab_diphone is needed in order to support SSML. @@ -196,7 +196,7 @@ void FestivalIntProc::startEngine(const TQString &festivalExePath, const TQStrin if (!m_festProc->isRunning()) { // kdDebug() << "FestivalIntProc::startEngine: Starting Festival process" << endl; - m_runningVoiceCode = TQString::null; + m_runningVoiceCode = TQString(); m_runningTime = 100; m_runningPitch = 100; m_ready = false; @@ -257,7 +257,7 @@ void FestivalIntProc::synth( // If we just started Festival, or rate changed, tell festival. if (m_runningTime != time) { TQString timeMsg; - if (voiceCode.contains("_hts") > 0) + if (voiceCode.tqcontains("_hts") > 0) { // Map 50% to 200% onto 0 to 1000. // slider = alpha * (log(percent)-log(50)) @@ -268,11 +268,11 @@ void FestivalIntProc::synth( slider = slider - 500; // Map -500 to 500 onto 0.15 to -0.15. float stretchValue = -float(slider) * 0.15 / 500.0; - timeMsg = TQString("(set! hts_duration_stretch %1)").arg( + timeMsg = TQString("(set! hts_duration_stretch %1)").tqarg( stretchValue, 0, 'f', 3); } else - timeMsg = TQString("(Parameter.set 'Duration_Stretch %1)").arg( + timeMsg = TQString("(Parameter.set 'Duration_Stretch %1)").tqarg( 1.0/(float(time)/100.0), 0, 'f', 2); sendToFestival(timeMsg); m_runningTime = time; @@ -292,7 +292,7 @@ void FestivalIntProc::synth( } TQString pitchMsg = TQString( "(set! int_lr_params '((target_f0_mean %1) (target_f0_std 14)" - "(model_f0_mean 170) (model_f0_std 34)))").arg(pitchValue, 0, 10); + "(model_f0_mean 170) (model_f0_std 34)))").tqarg(pitchValue, 0, 10); sendToFestival(pitchMsg); m_runningPitch = pitch; } @@ -304,14 +304,14 @@ void FestivalIntProc::synth( int len = saidText.length(); while (len > c_tooLong) { - len = saidText.findRev(", ", len - (c_tooLong * 2 / 3), true); + len = saidText.tqfindRev(", ", len - (c_tooLong * 2 / 3), true); if (len != -1) { TQString c = saidText.mid(len+2, 1); if (c != c.upper()) { - saidText.replace(len, 2, ". "); - saidText.replace(len+2, 1, c.upper()); + saidText.tqreplace(len, 2, ". "); + saidText.tqreplace(len+2, 1, c.upper()); kdDebug() << "FestivalIntProc::synth: Splitting long sentence at " << len << endl; // kdDebug() << saidText << endl; } @@ -319,17 +319,17 @@ void FestivalIntProc::synth( } // Encode quotation characters. - saidText.replace("\\\"", "#!#!"); - saidText.replace("\"", "\\\""); - saidText.replace("#!#!", "\\\""); + saidText.tqreplace("\\\"", "#!#!"); + saidText.tqreplace("\"", "\\\""); + saidText.tqreplace("#!#!", "\\\""); // Remove certain comment characters. - saidText.replace("--", ""); + saidText.tqreplace("--", ""); // Ok, let's rock. if (synthFilename.isNull()) { m_state = psSaying; - m_synthFilename = TQString::null; + m_synthFilename = TQString(); // kdDebug() << "FestivalIntProc::synth: Saying text: '" << saidText << "' using Festival plug in with voice " // << voiceCode << endl; saidText = "(SayText \"" + saidText + "\")"; @@ -500,9 +500,9 @@ void FestivalIntProc::slotProcessExited(KProcess*) void FestivalIntProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) { - TQString buf = TQString::fromLatin1(buffer, buflen); + TQString buf = TQString::tqfromLatin1(buffer, buflen); // kdDebug() << "FestivalIntProc::slotReceivedStdout: Received from Festival: " << buf << endl; - bool promptSeen = (buf.contains("festival>") > 0); + bool promptSeen = (buf.tqcontains("festival>") > 0); bool emitQueryVoicesFinished = false; TQStringList voiceCodesList; if (m_waitingQueryVoices && m_outputQueue.isEmpty()) @@ -515,7 +515,7 @@ void FestivalIntProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) } else { if (buf.left(1) == "(") { - int rightParen = buf.find(')'); + int rightParen = buf.tqfind(')'); if (rightParen > 0) { m_waitingQueryVoices = false; @@ -562,14 +562,14 @@ void FestivalIntProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) if (emitQueryVoicesFinished) { // kdDebug() << "FestivalIntProc::slotReceivedStdout: emitting queryVoicesFinished" << endl; - m_supportsSSML = (voiceCodesList.contains("rab_diphone")) ? ssYes : ssNo; + m_supportsSSML = (voiceCodesList.tqcontains("rab_diphone")) ? ssYes : ssNo; emit queryVoicesFinished(voiceCodesList); } } void FestivalIntProc::slotReceivedStderr(KProcess*, char* buffer, int buflen) { - TQString buf = TQString::fromLatin1(buffer, buflen); + TQString buf = TQString::tqfromLatin1(buffer, buflen); kdDebug() << "FestivalIntProc::slotReceivedStderr: Received error from Festival: " << buf << endl; } @@ -620,7 +620,7 @@ void FestivalIntProc::ackFinished() if (m_state == psFinished) { m_state = psIdle; - m_synthFilename = TQString::null; + m_synthFilename = TQString(); } } diff --git a/kttsd/plugins/festivalint/festivalintproc.h b/kttsd/plugins/festivalint/festivalintproc.h index 4425245..e70127f 100644 --- a/kttsd/plugins/festivalint/festivalintproc.h +++ b/kttsd/plugins/festivalint/festivalintproc.h @@ -34,7 +34,8 @@ class TQTextCodec; class FestivalIntProc : public PlugInProc{ - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: enum SupportsSSML { @@ -46,7 +47,7 @@ class FestivalIntProc : public PlugInProc{ /** * Constructor */ - FestivalIntProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + FestivalIntProc( TQObject* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); /** * Destructor diff --git a/kttsd/plugins/flite/fliteconf.cpp b/kttsd/plugins/flite/fliteconf.cpp index 0dfb6d1..060e45c 100644 --- a/kttsd/plugins/flite/fliteconf.cpp +++ b/kttsd/plugins/flite/fliteconf.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -// Qt includes. +// TQt includes. #include <tqlayout.h> #include <tqfile.h> #include <tqapplication.h> @@ -42,18 +42,18 @@ #include "fliteconf.moc" /** Constructor */ -FliteConf::FliteConf( TQWidget* parent, const char* name, const TQStringList& /*args*/) : - PlugInConf(parent, name) +FliteConf::FliteConf( TQWidget* tqparent, const char* name, const TQStringList& /*args*/) : + PlugInConf(tqparent, name) { // kdDebug() << "FliteConf::FliteConf: Running" << endl; m_fliteProc = 0; m_progressDlg = 0; - TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "FliteConfigWidgetLayout"); - layout->setAlignment (Qt::AlignTop); + tqlayout->tqsetAlignment (TQt::AlignTop); m_widget = new FliteConfWidget(this, "FliteConfigWidget"); - layout->addWidget(m_widget); + tqlayout->addWidget(m_widget); defaults(); @@ -74,7 +74,7 @@ void FliteConf::load(KConfig *config, const TQString &configGroup){ // kdDebug() << "FliteConf::load: Loading configuration for language " << langGroup << " with plug in " << "Festival Lite (flite)" << endl; config->setGroup(configGroup); - TQString fliteExe = config->readEntry("FliteExePath", TQString::null); + TQString fliteExe = config->readEntry("FliteExePath", TQString()); if (fliteExe.isEmpty()) { config->setGroup("Flite"); @@ -115,15 +115,15 @@ TQString FliteConf::getTalkerCode() "<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />" "<prosody volume=\"%4\" rate=\"%5\" />" "<kttsd synthesizer=\"%6\" />") - .arg(m_languageCode) - .arg("fixed") - .arg("neutral") - .arg("medium") - .arg("medium") - .arg("Festival Lite (flite)"); + .tqarg(m_languageCode) + .tqarg("fixed") + .tqarg("neutral") + .tqarg("medium") + .tqarg("medium") + .tqarg("Festival Lite (flite)"); } } - return TQString::null; + return TQString(); } void FliteConf::slotFliteTest_clicked() @@ -187,7 +187,7 @@ void FliteConf::slotSynthFinished() // Player object deletes the wave file when done. if (m_player) m_player->play(m_waveFile); TQFile::remove(m_waveFile); - m_waveFile = TQString::null; + m_waveFile = TQString(); if (m_progressDlg) m_progressDlg->close(); } diff --git a/kttsd/plugins/flite/fliteconf.h b/kttsd/plugins/flite/fliteconf.h index 6d5ff06..75e3b89 100644 --- a/kttsd/plugins/flite/fliteconf.h +++ b/kttsd/plugins/flite/fliteconf.h @@ -24,7 +24,7 @@ #ifndef _FLITECONF_H_ #define _FLITECONF_H_ -// Qt includes. +// TQt includes. #include <tqstring.h> // KDE includes. @@ -41,11 +41,12 @@ class FliteProc; class KProgressDialog; class FliteConf : public PlugInConf { - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: /** Constructor */ - FliteConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + FliteConf( TQWidget* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); /** Destructor */ ~FliteConf(); @@ -77,7 +78,7 @@ class FliteConf : public PlugInConf { * This function informs the plugin of the desired language to be spoken * by the plugin. The plugin should attempt to adapt itself to the * specified language code, choosing sensible defaults if necessary. - * If the passed-in code is TQString::null, no specific language has + * If the passed-in code is TQString(), no specific language has * been chosen. * @param lang The desired language code or Null if none. * @@ -95,7 +96,7 @@ class FliteConf : public PlugInConf { * Return fully-specified talker code for the configured plugin. This code * uniquely identifies the configured instance of the plugin and distinquishes * one instance from another. If the plugin has not been fully configured, - * i.e., cannot yet synthesize, return TQString::null. + * i.e., cannot yet synthesize, return TQString(). * @return Fully-specified talker code. */ TQString getTalkerCode(); diff --git a/kttsd/plugins/flite/fliteconfwidget.ui b/kttsd/plugins/flite/fliteconfwidget.ui index 839970e..1e8e0be 100644 --- a/kttsd/plugins/flite/fliteconfwidget.ui +++ b/kttsd/plugins/flite/fliteconfwidget.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>FliteConfWidget</class> <author>Gary Cramblitt</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>FliteConfWidget</cstring> </property> @@ -41,14 +41,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>100</height> </size> </property> </spacer> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>fliteConfigurationBox</cstring> </property> @@ -82,7 +82,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>flitePathBox</cstring> </property> @@ -96,7 +96,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>flitePathLabel</cstring> </property> @@ -111,7 +111,7 @@ <property name="text"> <string>&Flite executable path:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -142,7 +142,7 @@ </widget> </hbox> </widget> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>fliteTest</cstring> </property> @@ -160,7 +160,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>221</width> <height>20</height> @@ -177,7 +177,7 @@ <include location="global" impldecl="in declaration">kurlrequester.h</include> <include location="global" impldecl="in implementation">kurlrequester.h</include> </includes> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kttsd/plugins/flite/fliteproc.cpp b/kttsd/plugins/flite/fliteproc.cpp index 55cb0fa..b71efef 100644 --- a/kttsd/plugins/flite/fliteproc.cpp +++ b/kttsd/plugins/flite/fliteproc.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -// Qt includes. +// TQt includes. #include <tqstring.h> #include <tqstringlist.h> @@ -36,8 +36,8 @@ #include "fliteproc.moc" /** Constructor */ -FliteProc::FliteProc( TQObject* parent, const char* name, const TQStringList& ) : - PlugInProc( parent, name ){ +FliteProc::FliteProc( TQObject* tqparent, const char* name, const TQStringList& ) : + PlugInProc( tqparent, name ){ kdDebug() << "FliteProc::FliteProc: Running" << endl; m_state = psIdle; m_waitingStop = false; @@ -73,7 +73,7 @@ bool FliteProc::init(KConfig* config, const TQString& configGroup){ */ void FliteProc::sayText(const TQString &text) { - synth(text, TQString::null, m_fliteExePath); + synth(text, TQString(), m_fliteExePath); } /** @@ -129,11 +129,11 @@ void FliteProc::synth( // Encode quotation characters. TQString saidText = text; /* - saidText.replace("\\\"", "#!#!"); - saidText.replace("\"", "\\\""); - saidText.replace("#!#!", "\\\""); + saidText.tqreplace("\\\"", "#!#!"); + saidText.tqreplace("\"", "\\\""); + saidText.tqreplace("#!#!", "\\\""); // Remove certain comment characters. - saidText.replace("--", ""); + saidText.tqreplace("--", ""); saidText = "\"" + saidText + "\""; */ saidText += "\n"; @@ -218,13 +218,13 @@ void FliteProc::slotProcessExited(KProcess*) void FliteProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) { - TQString buf = TQString::fromLatin1(buffer, buflen); + TQString buf = TQString::tqfromLatin1(buffer, buflen); kdDebug() << "FliteProc::slotReceivedStdout: Received output from Flite: " << buf << endl; } void FliteProc::slotReceivedStderr(KProcess*, char* buffer, int buflen) { - TQString buf = TQString::fromLatin1(buffer, buflen); + TQString buf = TQString::tqfromLatin1(buffer, buflen); kdDebug() << "FliteProc::slotReceivedStderr: Received error from Flite: " << buf << endl; } @@ -256,7 +256,7 @@ void FliteProc::ackFinished() if (m_state == psFinished) { m_state = psIdle; - m_synthFilename = TQString::null; + m_synthFilename = TQString(); } } diff --git a/kttsd/plugins/flite/fliteproc.h b/kttsd/plugins/flite/fliteproc.h index a956d5c..6b44e45 100644 --- a/kttsd/plugins/flite/fliteproc.h +++ b/kttsd/plugins/flite/fliteproc.h @@ -24,7 +24,7 @@ #ifndef _FLITEPROC_H_ #define _FLITEPROC_H_ -// Qt includes. +// TQt includes. #include <tqstringlist.h> #include <tqmutex.h> @@ -34,13 +34,14 @@ class KProcess; class FliteProc : public PlugInProc{ - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: /** * Constructor */ - FliteProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + FliteProc( TQObject* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); /** * Destructor diff --git a/kttsd/plugins/freetts/freettsconf.cpp b/kttsd/plugins/freetts/freettsconf.cpp index 05c1fab..1da6f44 100644 --- a/kttsd/plugins/freetts/freettsconf.cpp +++ b/kttsd/plugins/freetts/freettsconf.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -// Qt includes. +// TQt includes. #include <tqlayout.h> #include <tqlabel.h> #include <tqstring.h> @@ -40,18 +40,18 @@ #include "freettsconfigwidget.h" /** Constructor */ -FreeTTSConf::FreeTTSConf( TQWidget* parent, const char* name, const TQStringList&/*args*/) : - PlugInConf( parent, name ) { +FreeTTSConf::FreeTTSConf( TQWidget* tqparent, const char* name, const TQStringList&/*args*/) : + PlugInConf( tqparent, name ) { // kdDebug() << "FreeTTSConf::FreeTTSConf: Running" << endl; m_freettsProc = 0; m_progressDlg = 0; - TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "FreeTTSConfigWidgetLayout"); - layout->setAlignment (Qt::AlignTop); + tqlayout->tqsetAlignment (TQt::AlignTop); m_widget = new FreeTTSConfWidget(this, "FreeTTSConfigWidget"); - layout->addWidget(m_widget); + tqlayout->addWidget(m_widget); defaults(); @@ -72,11 +72,11 @@ void FreeTTSConf::load(KConfig *config, const TQString &configGroup) { // kdDebug() << "FreeTTSConf::load: Running" << endl; config->setGroup(configGroup); - TQString freeTTSJar = config->readEntry("FreeTTSJarPath", TQString::null); + TQString freeTTSJar = config->readEntry("FreeTTSJarPath", TQString()); if (freeTTSJar.isEmpty()) { config->setGroup("FreeTTS"); - freeTTSJar = config->readEntry("FreeTTSJarPath", TQString::null); + freeTTSJar = config->readEntry("FreeTTSJarPath", TQString()); } if (freeTTSJar.isEmpty()) freeTTSJar = getLocation("freetts.jar"); @@ -119,15 +119,15 @@ TQString FreeTTSConf::getTalkerCode() "<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />" "<prosody volume=\"%4\" rate=\"%5\" />" "<kttsd synthesizer=\"%6\" />") - .arg(m_languageCode) - .arg("fixed") - .arg("neutral") - .arg("medium") - .arg("medium") - .arg("FreeTTS"); + .tqarg(m_languageCode) + .tqarg("fixed") + .tqarg("neutral") + .tqarg("medium") + .tqarg("medium") + .tqarg("FreeTTS"); } } - return TQString::null; + return TQString(); } // TQString FreeTTSConf::getLocation(const TQString &name) { @@ -216,7 +216,7 @@ void FreeTTSConf::slotSynthFinished() // Player object deletes the wave file when done. if (m_player) m_player->play(m_waveFile); TQFile::remove(m_waveFile); - m_waveFile = TQString::null; + m_waveFile = TQString(); if (m_progressDlg) m_progressDlg->close(); } diff --git a/kttsd/plugins/freetts/freettsconf.h b/kttsd/plugins/freetts/freettsconf.h index cc39b59..62e2e7a 100644 --- a/kttsd/plugins/freetts/freettsconf.h +++ b/kttsd/plugins/freetts/freettsconf.h @@ -32,11 +32,12 @@ class TQStringList; class KProgressDialog; class FreeTTSConf : public PlugInConf { - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: /** Constructor */ - FreeTTSConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + FreeTTSConf( TQWidget* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); /** Destructor */ ~FreeTTSConf(); @@ -65,7 +66,7 @@ class FreeTTSConf : public PlugInConf { * This function informs the plugin of the desired language to be spoken * by the plugin. The plugin should attempt to adapt itself to the * specified language code, choosing sensible defaults if necessary. - * If the passed-in code is TQString::null, no specific language has + * If the passed-in code is TQString(), no specific language has * been chosen. * @param lang The desired language code or Null if none. * @@ -83,7 +84,7 @@ class FreeTTSConf : public PlugInConf { * Return fully-specified talker code for the configured plugin. This code * uniquely identifies the configured instance of the plugin and distinquishes * one instance from another. If the plugin has not been fully configured, - * i.e., cannot yet synthesize, return TQString::null. + * i.e., cannot yet synthesize, return TQString(). * @return Fully-specified talker code. */ TQString getTalkerCode(); diff --git a/kttsd/plugins/freetts/freettsconfigwidget.ui b/kttsd/plugins/freetts/freettsconfigwidget.ui index 1d95751..7952692 100644 --- a/kttsd/plugins/freetts/freettsconfigwidget.ui +++ b/kttsd/plugins/freetts/freettsconfigwidget.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>FreeTTSConfWidget</class> <author>Gary Cramblitt <garycramblitt@comcast.net></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>FreeTTSConfWidget</cstring> </property> @@ -38,14 +38,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>freettsConfigurationBox</cstring> </property> @@ -76,7 +76,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> <cstring>voicesPathBox</cstring> </property> @@ -90,7 +90,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>freettsPathLabel</cstring> </property> @@ -108,7 +108,7 @@ <property name="textFormat"> <enum>AutoText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -130,7 +130,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> <cstring>selectVoiceBox</cstring> </property> @@ -146,9 +146,9 @@ </property> </hbox> </widget> - <widget class="QLayoutWidget" row="3" column="0"> + <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <hbox> <property name="name"> @@ -164,14 +164,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>410</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>freettsTest</cstring> </property> @@ -191,7 +191,7 @@ <include location="global" impldecl="in declaration">kurlrequester.h</include> <include location="global" impldecl="in implementation">kurlrequester.h</include> </includes> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kttsd/plugins/freetts/freettsproc.cpp b/kttsd/plugins/freetts/freettsproc.cpp index 9c038af..c3de342 100644 --- a/kttsd/plugins/freetts/freettsproc.cpp +++ b/kttsd/plugins/freetts/freettsproc.cpp @@ -27,8 +27,8 @@ #include "freettsproc.h" /** Constructor */ -FreeTTSProc::FreeTTSProc( TQObject* parent, const char* name, const TQStringList& /*args*/) : - PlugInProc( parent, name ) { +FreeTTSProc::FreeTTSProc( TQObject* tqparent, const char* name, const TQStringList& /*args*/) : + PlugInProc( tqparent, name ) { kdDebug() << "Running: FreeTTSProc::FreeTTSProc" << endl; m_state = psIdle; m_waitingStop = false; @@ -61,7 +61,7 @@ bool FreeTTSProc::init(KConfig *config, const TQString &configGroup) { * If the plugin supports asynchronous operation, it should return immediately. */ void FreeTTSProc::sayText(const TQString &text) { - synth(text, TQString::null, m_freettsJarPath); + synth(text, TQString(), m_freettsJarPath); } /** @@ -80,7 +80,7 @@ void FreeTTSProc::synthText(const TQString& text, const TQString& suggestedFilen } // A little helper function because KDE 3.2 kdDebug() does not support TQValueList<TQCString>. -TQStringList argsToQStringList(const TQValueList<TQCString> list) +TQStringList argsToTQStringList(const TQValueList<TQCString> list) { TQStringList newList; TQValueList<TQCString>::ConstIterator it = list.begin(); @@ -143,7 +143,7 @@ void FreeTTSProc::synth( if (!m_freettsProc->start(KProcess::NotifyOnExit, KProcess::All)) { kdDebug() << "FreeTTSProc::synth: Error starting FreeTTS process. Is freetts.jar in the PATH?" << endl; m_state = psIdle; - kdDebug() << "KProcess args: " << argsToQStringList(m_freettsProc->args()) << endl; + kdDebug() << "KProcess args: " << argsToTQStringList(m_freettsProc->args()) << endl; return; } kdDebug()<< "FreeTTSProc:synth: FreeTTS initialized" << endl; @@ -206,12 +206,12 @@ void FreeTTSProc::slotProcessExited(KProcess*) { } void FreeTTSProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) { - TQString buf = TQString::fromLatin1(buffer, buflen); + TQString buf = TQString::tqfromLatin1(buffer, buflen); kdDebug() << "FreeTTSProc::slotReceivedStdout: Received output from FreeTTS: " << buf << endl; } void FreeTTSProc::slotReceivedStderr(KProcess*, char* buffer, int buflen) { - TQString buf = TQString::fromLatin1(buffer, buflen); + TQString buf = TQString::tqfromLatin1(buffer, buflen); kdDebug() << "FreeTTSProc::slotReceivedStderr: Received error from FreeTTS: " << buf << endl; } @@ -242,7 +242,7 @@ pluginState FreeTTSProc::getState() { void FreeTTSProc::ackFinished() { if (m_state == psFinished) { m_state = psIdle; - m_synthFilename = TQString::null; + m_synthFilename = TQString(); } } diff --git a/kttsd/plugins/freetts/freettsproc.h b/kttsd/plugins/freetts/freettsproc.h index 7dbc3b5..15ad5f5 100644 --- a/kttsd/plugins/freetts/freettsproc.h +++ b/kttsd/plugins/freetts/freettsproc.h @@ -27,13 +27,14 @@ class KProcess; class FreeTTSProc : public PlugInProc{ - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: /** * Constructor */ - FreeTTSProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + FreeTTSProc( TQObject* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); /** * Destructor diff --git a/kttsd/plugins/hadifix/SSMLtoTxt2pho.xsl b/kttsd/plugins/hadifix/SSMLtoTxt2pho.xsl index 5a81c8f..afa9b43 100644 --- a/kttsd/plugins/hadifix/SSMLtoTxt2pho.xsl +++ b/kttsd/plugins/hadifix/SSMLtoTxt2pho.xsl @@ -113,7 +113,7 @@ </xsl:variable> <!-- Look for first period and space and extract corresponding substring from original. --> <xsl:choose> - <xsl:when test="contains($tmp, '. ')"> + <xsl:when test="tqcontains($tmp, '. ')"> <xsl:value-of select="substring($paragraph, 1, string-length(substring-before($tmp, '. '))+2)"/> </xsl:when> <xsl:otherwise> diff --git a/kttsd/plugins/hadifix/hadifixconf.cpp b/kttsd/plugins/hadifix/hadifixconf.cpp index 0249aea..1d4a2cc 100644 --- a/kttsd/plugins/hadifix/hadifixconf.cpp +++ b/kttsd/plugins/hadifix/hadifixconf.cpp @@ -14,7 +14,7 @@ * * ***************************************************************************/ -// Qt includes. +// TQt includes. #include <tqlayout.h> #include <tqlabel.h> #include <tqgroupbox.h> @@ -92,15 +92,15 @@ class HadifixConfPrivate { TQString name = TQFileInfo(*it).fileName(); gender = HadifixProc::determineGender(defaultMbrolaExec, *it); if (gender == HadifixProc::MaleGender) - configWidget->addVoice(*it, true, i18n("Male voice \"%1\"").arg(name)); + configWidget->addVoice(*it, true, i18n("Male voice \"%1\"").tqarg(name)); else if (gender == HadifixProc::FemaleGender) - configWidget->addVoice(*it, false, i18n("Female voice \"%1\"").arg(name)); + configWidget->addVoice(*it, false, i18n("Female voice \"%1\"").tqarg(name)); else { if (name == "de1") - configWidget->addVoice(*it, false, i18n("Female voice \"%1\"").arg(name)); + configWidget->addVoice(*it, false, i18n("Female voice \"%1\"").tqarg(name)); else { - configWidget->addVoice(*it, true, i18n("Unknown voice \"%1\"").arg(name)); - configWidget->addVoice(*it, false, i18n("Unknown voice \"%1\"").arg(name)); + configWidget->addVoice(*it, true, i18n("Unknown voice \"%1\"").tqarg(name)); + configWidget->addVoice(*it, false, i18n("Unknown voice \"%1\"").tqarg(name)); } } } @@ -203,11 +203,11 @@ class HadifixConfPrivate { }; /** Constructor */ -HadifixConf::HadifixConf( TQWidget* parent, const char* name, const TQStringList &) : - PlugInConf( parent, name ){ +HadifixConf::HadifixConf( TQWidget* tqparent, const char* name, const TQStringList &) : + PlugInConf( tqparent, name ){ // kdDebug() << "HadifixConf::HadifixConf: Running" << endl; - TQVBoxLayout *layout = new TQVBoxLayout (this, KDialog::marginHint(), KDialog::spacingHint(), "CommandConfigWidgetLayout"); - layout->setAlignment (Qt::AlignTop); + TQVBoxLayout *tqlayout = new TQVBoxLayout (this, KDialog::marginHint(), KDialog::spacingHint(), "CommandConfigWidgetLayout"); + tqlayout->tqsetAlignment (TQt::AlignTop); d = new HadifixConfPrivate(); d->configWidget = new HadifixConfigUI (this, "configWidget"); @@ -224,7 +224,7 @@ HadifixConf::HadifixConf( TQWidget* parent, const char* name, const TQStringList d->initializeCharacterCodes(); d->initializeVoices(); d->setDefaults(); - layout->addWidget (d->configWidget); + tqlayout->addWidget (d->configWidget); } /** Destructor */ @@ -284,15 +284,15 @@ TQString HadifixConf::getTalkerCode() "<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />" "<prosody volume=\"%4\" rate=\"%5\" />" "<kttsd synthesizer=\"%6\" />") - .arg(d->languageCode) - .arg(voiceCode) - .arg(gender) - .arg(volume) - .arg(rate) - .arg("Hadifix"); + .tqarg(d->languageCode) + .tqarg(voiceCode) + .tqarg(gender) + .tqarg(volume) + .tqarg(rate) + .tqarg("Hadifix"); } } - return TQString::null; + return TQString(); } void HadifixConf::voiceButton_clicked () { @@ -393,7 +393,7 @@ void HadifixConf::slotSynthFinished() // Player object deletes the wave file when done. if (m_player) m_player->play(d->waveFile); TQFile::remove(d->waveFile); - d->waveFile = TQString::null; + d->waveFile = TQString(); if (d->progressDlg) d->progressDlg->close(); } diff --git a/kttsd/plugins/hadifix/hadifixconf.h b/kttsd/plugins/hadifix/hadifixconf.h index 4ef96a6..7eb7b30 100644 --- a/kttsd/plugins/hadifix/hadifixconf.h +++ b/kttsd/plugins/hadifix/hadifixconf.h @@ -11,11 +11,12 @@ class HadifixProc; class HadifixConfPrivate; class HadifixConf : public PlugInConf { - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: /** Constructor */ - HadifixConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + HadifixConf( TQWidget* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); /** Destructor */ ~HadifixConf(); @@ -44,7 +45,7 @@ class HadifixConf : public PlugInConf { * This function informs the plugin of the desired language to be spoken * by the plugin. The plugin should attempt to adapt itself to the * specified language code, choosing sensible defaults if necessary. - * If the passed-in code is TQString::null, no specific language has + * If the passed-in code is TQString(), no specific language has * been chosen. * @param lang The desired language code or Null if none. * @@ -62,7 +63,7 @@ class HadifixConf : public PlugInConf { * Return fully-specified talker code for the configured plugin. This code * uniquely identifies the configured instance of the plugin and distinquishes * one instance from another. If the plugin has not been fully configured, - * i.e., cannot yet synthesize, return TQString::null. + * i.e., cannot yet synthesize, return TQString(). * @return Fully-specified talker code. */ TQString getTalkerCode(); diff --git a/kttsd/plugins/hadifix/hadifixconfigui.ui b/kttsd/plugins/hadifix/hadifixconfigui.ui index 302c1de..8a61bff 100644 --- a/kttsd/plugins/hadifix/hadifixconfigui.ui +++ b/kttsd/plugins/hadifix/hadifixconfigui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>HadifixConfigUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>HadifixConfigUI</cstring> </property> @@ -28,7 +28,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>GroupBox4</cstring> </property> @@ -56,7 +56,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QGroupBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>basicOptions</cstring> </property> @@ -81,7 +81,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>voiceLabel</cstring> </property> @@ -135,7 +135,7 @@ <string>&Select...</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>volumeLabel</cstring> </property> @@ -188,7 +188,7 @@ <string>Adjusts the volume of speech. Slide to left for softer speech; to the right for louder.</string> </property> </widget> - <widget class="QSlider" row="1" column="2" rowspan="1" colspan="2"> + <widget class="TQSlider" row="1" column="2" rowspan="1" colspan="2"> <property name="name"> <cstring>volumeSlider</cstring> </property> @@ -223,7 +223,7 @@ <string>Adjusts the volume of speech. Slide to left for softer speech; to the right for louder.</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>timeLabel</cstring> </property> @@ -276,7 +276,7 @@ <string>Adjusts the speed of speech. Slide to left for slower speech; to the right for faster.</string> </property> </widget> - <widget class="QSlider" row="2" column="2" rowspan="1" colspan="2"> + <widget class="TQSlider" row="2" column="2" rowspan="1" colspan="2"> <property name="name"> <cstring>timeSlider</cstring> </property> @@ -305,7 +305,7 @@ <string>Adjusts the speed of speech. Slide to left for slower speech; to the right for faster.</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>frequencyLabel</cstring> </property> @@ -355,7 +355,7 @@ <string>Adjusts the pitch (tone) of speech. Slide to left for lower speech; to the right for higher.</string> </property> </widget> - <widget class="QSlider" row="3" column="2" rowspan="1" colspan="2"> + <widget class="TQSlider" row="3" column="2" rowspan="1" colspan="2"> <property name="name"> <cstring>frequencySlider</cstring> </property> @@ -383,7 +383,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>advancedOptions</cstring> </property> @@ -408,7 +408,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>hadifixBinLabel</cstring> </property> @@ -438,7 +438,7 @@ <string>If the txt2pho program is in your PATH environment variable, simply enter "txt2pho", otherwise specify the full path to the txt2pho executable program.</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>mbrolaBinLabel</cstring> </property> @@ -468,15 +468,15 @@ <string>If the Mbrola program is in your PATH environment variable, simply enter "mbrola", otherwise specify the full path to the Mbrola executable program.</string> </property> </widget> - <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>characterCodingLabel</cstring> </property> @@ -525,7 +525,7 @@ <property name="sizeType"> <enum>Preferred</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>240</width> <height>20</height> @@ -596,84 +596,84 @@ </connection> <connection> <sender>voiceCombo</sender> - <signal>activated(const QString&)</signal> + <signal>activated(const TQString&)</signal> <receiver>HadifixConfigUI</receiver> - <slot>changed(const QString&)</slot> + <slot>changed(const TQString&)</slot> </connection> <connection> <sender>volumeBox</sender> - <signal>valueChanged(const QString&)</signal> + <signal>valueChanged(const TQString&)</signal> <receiver>HadifixConfigUI</receiver> - <slot>changed(const QString&)</slot> + <slot>changed(const TQString&)</slot> </connection> <connection> <sender>timeBox</sender> - <signal>valueChanged(const QString&)</signal> + <signal>valueChanged(const TQString&)</signal> <receiver>HadifixConfigUI</receiver> - <slot>changed(const QString&)</slot> + <slot>changed(const TQString&)</slot> </connection> <connection> <sender>frequencyBox</sender> - <signal>valueChanged(const QString&)</signal> + <signal>valueChanged(const TQString&)</signal> <receiver>HadifixConfigUI</receiver> - <slot>changed(const QString&)</slot> + <slot>changed(const TQString&)</slot> </connection> <connection> <sender>hadifixURL</sender> - <signal>textChanged(const QString&)</signal> + <signal>textChanged(const TQString&)</signal> <receiver>HadifixConfigUI</receiver> - <slot>changed(const QString&)</slot> + <slot>changed(const TQString&)</slot> </connection> <connection> <sender>mbrolaURL</sender> - <signal>textChanged(const QString&)</signal> + <signal>textChanged(const TQString&)</signal> <receiver>HadifixConfigUI</receiver> - <slot>changed(const QString&)</slot> + <slot>changed(const TQString&)</slot> </connection> </connections> <includes> - <include location="global" impldecl="in declaration">qradiobutton.h</include> - <include location="global" impldecl="in declaration">qpixmap.h</include> + <include location="global" impldecl="in declaration">tqradiobutton.h</include> + <include location="global" impldecl="in declaration">tqpixmap.h</include> <include location="global" impldecl="in declaration">kurl.h</include> - <include location="global" impldecl="in declaration">qmap.h</include> + <include location="global" impldecl="in declaration">tqmap.h</include> <include location="global" impldecl="in implementation">kglobal.h</include> - <include location="global" impldecl="in implementation">qstringlist.h</include> + <include location="global" impldecl="in implementation">tqstringlist.h</include> <include location="global" impldecl="in implementation">math.h</include> <include location="global" impldecl="in implementation">kiconloader.h</include> </includes> <forwards> - <forward>class QStringList;</forward> + <forward>class TQStringList;</forward> </forwards> <variables> - <variable>QMap<QString,int> maleVoices;</variable> - <variable>QMap<int,QString> defaultVoices;</variable> + <variable>TQMap<TQString,int> maleVoices;</variable> + <variable>TQMap<int,TQString> defaultVoices;</variable> <variable>QPixmap female;</variable> <variable>QPixmap male;</variable> - <variable>QMap<QString,int> femaleVoices;</variable> + <variable>TQMap<TQString,int> femaleVoices;</variable> </variables> -<signals> +<Q_SIGNALS> <signal>changed(bool)</signal> -</signals> -<slots> +</Q_SIGNALS> +<Q_SLOTS> <slot access="protected" specifier="non virtual">volumeBox_valueChanged( int percentValue )</slot> <slot access="protected" specifier="non virtual">timeBox_valueChanged( int percentValue )</slot> <slot access="protected" specifier="non virtual">frequencyBox_valueChanged( int percentValue )</slot> <slot access="protected" specifier="non virtual">volumeSlider_valueChanged( int sliderValue )</slot> <slot access="protected" specifier="non virtual">timeSlider_valueChanged( int sliderValue )</slot> <slot access="protected" specifier="non virtual">frequencySlider_valueChanged( int sliderValue )</slot> - <slot access="protected">changed( const QString & )</slot> -</slots> + <slot access="protected">changed( const TQString & )</slot> +</Q_SLOTS> <functions> <function access="protected" specifier="non virtual" returnType="int">percentToSlider( int percentValue )</function> <function access="protected" specifier="non virtual" returnType="int">sliderToPercent( int sliderValue )</function> <function access="private" specifier="non virtual">init()</function> - <function specifier="non virtual">addVoice( const QString &filename, bool isMale )</function> - <function specifier="non virtual">addVoice( const QString &filename, bool isMale, const QString &displayname )</function> - <function specifier="non virtual">setVoice( const QString &filename, bool isMale )</function> - <function specifier="non virtual" returnType="QString">getVoiceFilename()</function> + <function specifier="non virtual">addVoice( const TQString &filename, bool isMale )</function> + <function specifier="non virtual">addVoice( const TQString &filename, bool isMale, const TQString &displayname )</function> + <function specifier="non virtual">setVoice( const TQString &filename, bool isMale )</function> + <function specifier="non virtual" returnType="TQString">getVoiceFilename()</function> <function specifier="non virtual" returnType="bool">isMaleVoice()</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kttsd/plugins/hadifix/hadifixconfigui.ui.h b/kttsd/plugins/hadifix/hadifixconfigui.ui.h index 7c21c54..cc6632c 100644 --- a/kttsd/plugins/hadifix/hadifixconfigui.ui.h +++ b/kttsd/plugins/hadifix/hadifixconfigui.ui.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ui.h extension file, included from the uic-generated form implementation. ** -** If you wish to add, delete or rename slots use Qt Designer which will +** If you wish to add, delete or rename slots use TQt Designer which will ** update this file, preserving your code. Create an init() slot in place of ** a constructor, and a destroy() slot in place of a destructor. *****************************************************************************/ @@ -53,14 +53,14 @@ void HadifixConfigUI::init () { void HadifixConfigUI::addVoice (const TQString &filename, bool isMale) { if (isMale) { - if (!maleVoices.contains(filename)) { + if (!maleVoices.tqcontains(filename)) { int id = voiceCombo->count(); maleVoices.insert (filename, id); voiceCombo->insertItem (male, filename, id); } } else { - if (!femaleVoices.contains(filename)) { + if (!femaleVoices.tqcontains(filename)) { int id = voiceCombo->count(); femaleVoices.insert (filename, id); voiceCombo->insertItem (female, filename, id); @@ -93,7 +93,7 @@ TQString HadifixConfigUI::getVoiceFilename() { int curr = voiceCombo->currentItem(); TQString filename = voiceCombo->text(curr); - if (defaultVoices.contains(curr)) + if (defaultVoices.tqcontains(curr)) filename = defaultVoices[curr]; return filename; @@ -103,7 +103,7 @@ bool HadifixConfigUI::isMaleVoice() { int curr = voiceCombo->currentItem(); TQString filename = getVoiceFilename(); - if (maleVoices.contains(filename)) + if (maleVoices.tqcontains(filename)) return maleVoices[filename] == curr; else return false; diff --git a/kttsd/plugins/hadifix/hadifixproc.cpp b/kttsd/plugins/hadifix/hadifixproc.cpp index 598eb21..3e4b4ee 100644 --- a/kttsd/plugins/hadifix/hadifixproc.cpp +++ b/kttsd/plugins/hadifix/hadifixproc.cpp @@ -35,7 +35,7 @@ class HadifixProcPrivate { hadifixProc = 0; waitingStop = false; state = psIdle; - synthFilename = TQString::null; + synthFilename = TQString(); gender = false; volume = 100; time = 100; @@ -49,9 +49,9 @@ class HadifixProcPrivate { void load(KConfig *config, const TQString &configGroup) { config->setGroup(configGroup); - hadifix = config->readEntry ("hadifixExec", TQString::null); - mbrola = config->readEntry ("mbrolaExec", TQString::null); - voice = config->readEntry ("voice", TQString::null); + hadifix = config->readEntry ("hadifixExec", TQString()); + mbrola = config->readEntry ("mbrolaExec", TQString()); + voice = config->readEntry ("voice", TQString()); gender = config->readBoolEntry("gender", false); volume = config->readNumEntry ("volume", 100); time = config->readNumEntry ("time", 100); @@ -75,8 +75,8 @@ class HadifixProcPrivate { }; /** Constructor */ -HadifixProc::HadifixProc( TQObject* parent, const char* name, const TQStringList &) : - PlugInProc( parent, name ){ +HadifixProc::HadifixProc( TQObject* tqparent, const char* name, const TQStringList &) : + PlugInProc( tqparent, name ){ // kdDebug() << "HadifixProc::HadifixProc: Running" << endl; d = 0; } @@ -184,9 +184,9 @@ void HadifixProc::synth(TQString text, TQString mbrolaCommand = d->hadifixProc->quote(mbrola); mbrolaCommand += " -e"; //Ignore fatal errors on unkown diphone - mbrolaCommand += TQString(" -v %1").arg(volume/100.0); // volume ratio - mbrolaCommand += TQString(" -f %1").arg(pitch/100.0); // freqency ratio - mbrolaCommand += TQString(" -t %1").arg(1/(time/100.0)); // time ratio + mbrolaCommand += TQString(" -v %1").tqarg(volume/100.0); // volume ratio + mbrolaCommand += TQString(" -f %1").tqarg(pitch/100.0); // freqency ratio + mbrolaCommand += TQString(" -t %1").tqarg(1/(time/100.0)); // time ratio mbrolaCommand += " " + d->hadifixProc->quote(voice); mbrolaCommand += " - " + d->hadifixProc->quote(waveFilename); @@ -285,7 +285,7 @@ void HadifixProc::ackFinished() if (d->state == psFinished) { d->state = psIdle; - d->synthFilename = TQString::null; + d->synthFilename = TQString(); } } @@ -364,8 +364,8 @@ HadifixProc::VoiceGender HadifixProc::determineGender(TQString mbrola, TQString connect(&proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), &speech, TQT_SLOT(receivedStderr(KProcess *, char *, int))); - speech.stdOut = TQString::null; - speech.stdErr = TQString::null; + speech.stdOut = TQString(); + speech.stdErr = TQString(); proc.start (KProcess::Block, KProcess::AllOutput); VoiceGender result; @@ -377,9 +377,9 @@ HadifixProc::VoiceGender HadifixProc::determineGender(TQString mbrola, TQString else { if (output != 0) *output = speech.stdOut; - if (speech.stdOut.contains("female", false)) + if (speech.stdOut.tqcontains("female", false)) result = FemaleGender; - else if (speech.stdOut.contains("male", false)) + else if (speech.stdOut.tqcontains("male", false)) result = MaleGender; else result = NoGender; @@ -389,11 +389,11 @@ HadifixProc::VoiceGender HadifixProc::determineGender(TQString mbrola, TQString } void HadifixProc::receivedStdout (KProcess *, char *buffer, int buflen) { - stdOut += TQString::fromLatin1(buffer, buflen); + stdOut += TQString::tqfromLatin1(buffer, buflen); } void HadifixProc::receivedStderr (KProcess *, char *buffer, int buflen) { - stdErr += TQString::fromLatin1(buffer, buflen); + stdErr += TQString::tqfromLatin1(buffer, buflen); } /** diff --git a/kttsd/plugins/hadifix/hadifixproc.h b/kttsd/plugins/hadifix/hadifixproc.h index 01b7c5d..4fbf03b 100644 --- a/kttsd/plugins/hadifix/hadifixproc.h +++ b/kttsd/plugins/hadifix/hadifixproc.h @@ -26,7 +26,8 @@ class KProcess; class HadifixProcPrivate; class HadifixProc : public PlugInProc{ - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: enum VoiceGender { @@ -37,7 +38,7 @@ class HadifixProc : public PlugInProc{ }; /** Constructor */ - HadifixProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + HadifixProc( TQObject* tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); /** Destructor */ ~HadifixProc(); diff --git a/kttsd/plugins/hadifix/initialconfig.h b/kttsd/plugins/hadifix/initialconfig.h index 02e920c..62ff659 100644 --- a/kttsd/plugins/hadifix/initialconfig.h +++ b/kttsd/plugins/hadifix/initialconfig.h @@ -71,7 +71,7 @@ TQString findExecutable (const TQStringList &names, const TQString &possiblePath } // Both tries failed, so the user has to locate the executable. - return TQString::null; + return TQString(); } /** Tries to find the voice files by looking onto the hard disk. */ @@ -100,7 +100,7 @@ TQStringList findVoices(TQString mbrolaExec, const TQString &hadifixDataPath) { // 2b) search near the hadifix data path info.setFile(hadifixDataPath + "../../mbrola"); TQString mbrolaPath = info.dirPath (true) + "/mbrola"; - if (!list.contains(mbrolaPath)) + if (!list.tqcontains(mbrolaPath)) list += mbrolaPath; // 2c) broaden the search by adding subdirs (with a depth of 2) @@ -114,7 +114,7 @@ TQStringList findVoices(TQString mbrolaExec, const TQString &hadifixDataPath) { TQStringList result; TQStringList::iterator it; for (it = list.begin(); it != list.end(); ++it) { - TQDir baseDir (*it, TQString::null, + TQDir baseDir (*it, TQString(), TQDir::Name|TQDir::IgnoreCase, TQDir::Files); TQStringList files = baseDir.entryList(); @@ -148,7 +148,7 @@ TQStringList findSubdirs (const TQStringList &baseDirs) { TQStringList::ConstIterator itEnd = baseDirs.constEnd(); for (it = baseDirs.constBegin(); it != itEnd; ++it) { // a) get a list of directory names - TQDir baseDir (*it, TQString::null, + TQDir baseDir (*it, TQString(), TQDir::Name|TQDir::IgnoreCase, TQDir::Dirs); TQStringList list = baseDir.entryList(); diff --git a/kttsd/plugins/hadifix/voicefileui.ui b/kttsd/plugins/hadifix/voicefileui.ui index 6c038f7..3c9a5fa 100644 --- a/kttsd/plugins/hadifix/voicefileui.ui +++ b/kttsd/plugins/hadifix/voicefileui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>VoiceFileWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>VoiceFileWidget</cstring> </property> @@ -25,7 +25,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>voiceFileLabel</cstring> </property> @@ -44,7 +44,7 @@ <enum>Plain</enum> </property> </widget> - <widget class="QButtonGroup" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQButtonGroup" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>genderOption</cstring> </property> @@ -61,7 +61,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>femaleOption</cstring> </property> @@ -69,7 +69,7 @@ <string>Female</string> </property> </widget> - <widget class="QRadioButton" row="0" column="1"> + <widget class="TQRadioButton" row="0" column="1"> <property name="name"> <cstring>maleOption</cstring> </property> @@ -106,10 +106,10 @@ <variables> <variable access="public">QString mbrola;</variable> </variables> -<slots> +<Q_SLOTS> <slot>genderButton_clicked()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kttsd/plugins/hadifix/voicefileui.ui.h b/kttsd/plugins/hadifix/voicefileui.ui.h index 16e65e5..dfd177d 100644 --- a/kttsd/plugins/hadifix/voicefileui.ui.h +++ b/kttsd/plugins/hadifix/voicefileui.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -24,12 +24,12 @@ void VoiceFileWidget::genderButton_clicked() } else if (gender == HadifixProc::NoGender) { KMessageBox::sorry (this, - i18n("The gender of the voice file %1 could not be detected.").arg(voiceFileURL->url()), + i18n("The gender of the voice file %1 could not be detected.").tqarg(voiceFileURL->url()), i18n("Trying to Determine the Gender - Hadifix Plug In")); } else { KMessageBox::detailedSorry (this, - i18n("The file %1 does not seem to be a voice file.").arg(voiceFileURL->url()), + i18n("The file %1 does not seem to be a voice file.").tqarg(voiceFileURL->url()), details, i18n("Trying to Determine the Gender - Hadifix Plug In")); } } |