From f138d74fe16092003b06f5bde9663841929cde7f Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 17 Jun 2011 22:17:08 +0000 Subject: TQt4 port kdeaccessibility This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaccessibility@1237325 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- .../stringreplacer/editreplacementwidget.ui | 42 ++++++++--------- .../filters/stringreplacer/stringreplacerconf.cpp | 34 +++++++------- kttsd/filters/stringreplacer/stringreplacerconf.h | 5 +- .../stringreplacer/stringreplacerconfwidget.ui | 54 +++++++++++----------- .../filters/stringreplacer/stringreplacerproc.cpp | 14 +++--- kttsd/filters/stringreplacer/stringreplacerproc.h | 5 +- 6 files changed, 78 insertions(+), 76 deletions(-) (limited to 'kttsd/filters/stringreplacer') 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 @@ EditReplacementWidget Gary Cramblitt <garycramblitt@comcast.net> - + EditReplacementWidget @@ -21,7 +21,7 @@ 255 - + 0 0 @@ -31,15 +31,15 @@ unnamed - + - layout1 + tqlayout1 unnamed - + typeButtonGroup @@ -61,15 +61,15 @@ unnamed - + - layout3 + tqlayout3 unnamed - + wordRadioButton @@ -88,7 +88,7 @@ true - + regexpRadioButton @@ -108,7 +108,7 @@ - + caseCheckBox @@ -126,23 +126,23 @@ - + - layout2 + tqlayout2 unnamed - + - layout6 + tqlayout6 unnamed - + substLabel @@ -157,14 +157,14 @@ &Replace with: - + AlignVCenter|AlignRight matchLineEdit - + matchLabel @@ -179,7 +179,7 @@ &Match: - + AlignVCenter|AlignRight @@ -188,9 +188,9 @@ - + - layout5 + tqlayout5 @@ -254,7 +254,7 @@ matchButton substLineEdit - + klineedit.h kpushbutton.h 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 #include #include @@ -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 // 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 @@ StringReplacerConfWidget Widget for configuring String Replacer Filter for KTTSD. Gary Cramblitt <garycramblitt@comcast.net> - + StringReplacerConfWidget @@ -21,22 +21,22 @@ unnamed - + - layout3 + tqlayout3 unnamed - + nameLabel &Name: - + AlignVCenter|AlignRight @@ -57,7 +57,7 @@ - + applyGroupBox @@ -71,22 +71,22 @@ unnamed - + - layout11 + tqlayout11 unnamed - + languageLabel Lan&guage is: - + AlignVCenter|AlignRight @@ -97,14 +97,14 @@ What's this text - + appIdLabel - Application &ID contains: + Application &ID tqcontains: - + AlignVCenter|AlignRight @@ -116,17 +116,17 @@ - + - layout13 + tqlayout13 unnamed - + - layout12 + tqlayout12 @@ -168,9 +168,9 @@ - + - layout6 + tqlayout6 @@ -241,9 +241,9 @@ - + - layout24 + tqlayout24 @@ -301,9 +301,9 @@ true - + - layout23 + tqlayout23 @@ -329,7 +329,7 @@ What's this text - + upButton @@ -348,7 +348,7 @@ Click to move selected word up in the list. Words higher in the list are applied first. - + downButton @@ -427,7 +427,7 @@ Expanding - + 20 20 @@ -457,7 +457,7 @@ languageBrowseButton appIdLineEdit - + klineedit.h klineedit.h 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 #include #include @@ -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 #include #include @@ -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. -- cgit v1.2.1