From 28bf3cbba4139c8a0f81dc9d1a2f6c4ed724f22c Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:20:30 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaccessibility@1157633 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kttsd/filters/main.cpp | 20 +- kttsd/filters/sbd/sbdconf.cpp | 124 ++++----- kttsd/filters/sbd/sbdconf.h | 12 +- kttsd/filters/sbd/sbdproc.cpp | 214 ++++++++-------- kttsd/filters/sbd/sbdproc.h | 118 ++++----- .../filters/stringreplacer/stringreplacerconf.cpp | 282 ++++++++++----------- kttsd/filters/stringreplacer/stringreplacerconf.h | 18 +- .../filters/stringreplacer/stringreplacerproc.cpp | 60 ++--- kttsd/filters/stringreplacer/stringreplacerproc.h | 26 +- kttsd/filters/talkerchooser/talkerchooserconf.cpp | 84 +++--- kttsd/filters/talkerchooser/talkerchooserconf.h | 10 +- kttsd/filters/talkerchooser/talkerchooserproc.cpp | 16 +- kttsd/filters/talkerchooser/talkerchooserproc.h | 10 +- kttsd/filters/xhtml2ssml/main.cpp | 16 +- kttsd/filters/xhtml2ssml/xhtml2ssml.cpp | 34 +-- kttsd/filters/xhtml2ssml/xhtml2ssml.h | 20 +- kttsd/filters/xhtml2ssml/xmlelement.cpp | 28 +- kttsd/filters/xhtml2ssml/xmlelement.h | 34 +-- .../filters/xmltransformer/xmltransformerconf.cpp | 50 ++-- kttsd/filters/xmltransformer/xmltransformerconf.h | 10 +- .../filters/xmltransformer/xmltransformerproc.cpp | 58 ++--- kttsd/filters/xmltransformer/xmltransformerproc.h | 32 +-- 22 files changed, 638 insertions(+), 638 deletions(-) (limited to 'kttsd/filters') diff --git a/kttsd/filters/main.cpp b/kttsd/filters/main.cpp index d358da8..f33d771 100644 --- a/kttsd/filters/main.cpp +++ b/kttsd/filters/main.cpp @@ -21,11 +21,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -#include +#include #include using namespace std; -#include +#include #include #include @@ -81,17 +81,17 @@ int main(int argc, char *argv[]) const int offersCount = offers.count(); for(int ndx=0; ndx < offersCount ; ++ndx) { - QString name = offers[ndx]->name(); + TQString name = offers[ndx]->name(); cout << name.latin1() << endl; } return 0; } - QString filterName; + TQString filterName; if (args->count() > 0) filterName = args->arg(0); - QString talker = args->getOption("talker"); - QCString appId = args->getOption("appid"); - QString groupName = args->getOption("group"); + TQString talker = args->getOption("talker"); + TQCString appId = args->getOption("appid"); + TQString groupName = args->getOption("group"); if (filterName.isEmpty()) kdError(1) << "No filter name given." << endl; @@ -111,14 +111,14 @@ int main(int argc, char *argv[]) KttsFilterProc *plugIn = KParts::ComponentFactory::createInstanceFromLibrary( offers[ndx]->library().latin1(), NULL, offers[ndx]->library().latin1(), - QStringList(), &errorNo); + TQStringList(), &errorNo); if(plugIn) { KConfig* config = new KConfig("kttsdrc"); config->setGroup( "General" ); plugIn->init( config, groupName ); - QTextStream inp ( stdin, IO_ReadOnly ); - QString text; + TQTextStream inp ( stdin, IO_ReadOnly ); + TQString text; text = inp.read(); TalkerCode* talkerCode = new TalkerCode( talker ); text = plugIn->convert( text, talkerCode, appId ); diff --git a/kttsd/filters/sbd/sbdconf.cpp b/kttsd/filters/sbd/sbdconf.cpp index 2d4cf5d..5244974 100644 --- a/kttsd/filters/sbd/sbdconf.cpp +++ b/kttsd/filters/sbd/sbdconf.cpp @@ -22,14 +22,14 @@ ******************************************************************************/ // Qt includes. -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE includes. #include @@ -56,13 +56,13 @@ /** * Constructor */ -SbdConf::SbdConf( QWidget *parent, const char *name, const QStringList& /*args*/) : +SbdConf::SbdConf( TQWidget *parent, const char *name, const TQStringList& /*args*/) : KttsFilterConf(parent, name) { // kdDebug() << "SbdConf::SbdConf: Running" << endl; // Create configuration widget. - QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "SbdConfigWidgetLayout"); layout->setAlignment (Qt::AlignTop); m_widget = new SbdConfWidget(this, "SbdConfigWidget"); @@ -73,24 +73,24 @@ SbdConf::SbdConf( QWidget *parent, const char *name, const QStringList& /*args*/ m_widget->reButton->setEnabled( m_reEditorInstalled ); if ( m_reEditorInstalled ) - connect( m_widget->reButton, SIGNAL(clicked()), this, SLOT(slotReButton_clicked()) ); + connect( m_widget->reButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotReButton_clicked()) ); - connect( m_widget->reLineEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(configChanged()) ); - connect( m_widget->sbLineEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(configChanged()) ); - connect( m_widget->nameLineEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(configChanged()) ); - connect( m_widget->appIdLineEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(configChanged()) ); - connect(m_widget->languageBrowseButton, SIGNAL(clicked()), - this, SLOT(slotLanguageBrowseButton_clicked())); - connect(m_widget->loadButton, SIGNAL(clicked()), - this, SLOT(slotLoadButton_clicked())); - connect(m_widget->saveButton, SIGNAL(clicked()), - this, SLOT(slotSaveButton_clicked())); - connect(m_widget->clearButton, SIGNAL(clicked()), - this, SLOT(slotClearButton_clicked())); + connect( m_widget->reLineEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(configChanged()) ); + connect( m_widget->sbLineEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(configChanged()) ); + connect( m_widget->nameLineEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(configChanged()) ); + connect( m_widget->appIdLineEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(configChanged()) ); + connect(m_widget->languageBrowseButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotLanguageBrowseButton_clicked())); + connect(m_widget->loadButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotLoadButton_clicked())); + connect(m_widget->saveButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSaveButton_clicked())); + connect(m_widget->clearButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotClearButton_clicked())); // Set up defaults. defaults(); @@ -116,7 +116,7 @@ SbdConf::~SbdConf(){ * @param configGroup Call config->setGroup with this argument before * loading your configuration. */ -void SbdConf::load(KConfig* config, const QString& configGroup){ +void SbdConf::load(KConfig* config, const TQString& configGroup){ // kdDebug() << "SbdConf::load: Running" << endl; config->setGroup( configGroup ); m_widget->nameLineEdit->setText( @@ -125,10 +125,10 @@ void SbdConf::load(KConfig* config, const QString& configGroup){ config->readEntry("SentenceDelimiterRegExp", m_widget->reLineEdit->text()) ); m_widget->sbLineEdit->setText( config->readEntry("SentenceBoundary", m_widget->sbLineEdit->text()) ); - QStringList langCodeList = config->readListEntry("LanguageCodes"); + TQStringList langCodeList = config->readListEntry("LanguageCodes"); if (!langCodeList.isEmpty()) m_languageCodeList = langCodeList; - QString language = ""; + TQString language = ""; for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx) { if (!language.isEmpty()) language += ","; @@ -149,7 +149,7 @@ void SbdConf::load(KConfig* config, const QString& configGroup){ * @param configGroup Call config->setGroup with this argument before * saving your configuration. */ -void SbdConf::save(KConfig* config, const QString& configGroup){ +void SbdConf::save(KConfig* config, const TQString& configGroup){ // kdDebug() << "SbdConf::save: Running" << endl; config->setGroup( configGroup ); config->writeEntry("UserFilterName", m_widget->nameLineEdit->text() ); @@ -192,10 +192,10 @@ bool SbdConf::supportsMultiInstance() { return true; } * return an empty string. * @return Filter instance name. */ -QString SbdConf::userPlugInName() +TQString SbdConf::userPlugInName() { if ( m_widget->reLineEdit->text().isEmpty() ) - return QString::null; + return TQString::null; else return m_widget->nameLineEdit->text(); } @@ -210,8 +210,8 @@ void SbdConf::slotReButton_clicked() { // Show Regular Expression Editor dialog if it is installed. if ( !m_reEditorInstalled ) return; - QDialog *editorDialog = - KParts::ComponentFactory::createInstanceFromQuery( "KRegExpEditor/KRegExpEditor" ); + TQDialog *editorDialog = + KParts::ComponentFactory::createInstanceFromQuery( "KRegExpEditor/KRegExpEditor" ); if ( editorDialog ) { // kdeutils was installed, so the dialog was found. Fetch the editor interface. @@ -220,9 +220,9 @@ void SbdConf::slotReButton_clicked() Q_ASSERT( reEditor ); // This should not fail!// now use the editor. reEditor->setRegExp( m_widget->reLineEdit->text() ); int dlgResult = editorDialog->exec(); - if ( dlgResult == QDialog::Accepted ) + if ( dlgResult == TQDialog::Accepted ) { - QString re = reEditor->regExp(); + TQString re = reEditor->regExp(); m_widget->reLineEdit->setText( re ); configChanged(); } @@ -232,21 +232,21 @@ void SbdConf::slotReButton_clicked() void SbdConf::slotLanguageBrowseButton_clicked() { - // Create a QHBox to host KListView. - QHBox* hBox = new QHBox(m_widget, "SelectLanguage_hbox"); + // Create a TQHBox to host KListView. + TQHBox* hBox = new TQHBox(m_widget, "SelectLanguage_hbox"); // Create a KListView and fill with all known languages. KListView* langLView = new KListView(hBox, "SelectLanguage_lview"); langLView->addColumn(i18n("Language")); langLView->addColumn(i18n("Code")); - langLView->setSelectionMode(QListView::Extended); - QStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha(); - QString locale; - QString languageCode; - QString countryCode; - QString charSet; - QString language; + langLView->setSelectionMode(TQListView::Extended); + TQStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha(); + TQString locale; + TQString languageCode; + TQString countryCode; + TQString charSet; + TQString language; // Blank line so user can select no language. - QListViewItem* item = new KListViewItem(langLView, "", ""); + TQListViewItem* item = new KListViewItem(langLView, "", ""); if (m_languageCodeList.isEmpty()) item->setSelected(true); const int allLocalesCount = allLocales.count(); for (int ndx=0; ndx < allLocalesCount; ++ndx) @@ -256,7 +256,7 @@ void SbdConf::slotLanguageBrowseButton_clicked() language = KGlobal::locale()->twoAlphaToLanguageName(languageCode); if (!countryCode.isEmpty()) language += " (" + KGlobal::locale()->twoAlphaToCountryName(countryCode)+")"; - QListViewItem* item = new KListViewItem(langLView, language, locale); + TQListViewItem* item = new KListViewItem(langLView, language, locale); if (m_languageCodeList.contains(locale)) item->setSelected(true); } // Sort by language. @@ -274,13 +274,13 @@ void SbdConf::slotLanguageBrowseButton_clicked() true); dlg->setMainWidget(hBox); dlg->setHelp("", "kttsd"); - dlg->setInitialSize(QSize(300, 500), false); + dlg->setInitialSize(TQSize(300, 500), false); int dlgResult = dlg->exec(); - languageCode = QString::null; - if (dlgResult == QDialog::Accepted) + languageCode = TQString::null; + if (dlgResult == TQDialog::Accepted) { m_languageCodeList.clear(); - QListViewItem* item = langLView->firstChild(); + TQListViewItem* item = langLView->firstChild(); while (item) { if (item->isSelected()) m_languageCodeList += item->text(1); @@ -289,7 +289,7 @@ void SbdConf::slotLanguageBrowseButton_clicked() } delete dlg; // TODO: Also delete KListView and QHBox? - if (dlgResult != QDialog::Accepted) return; + if (dlgResult != TQDialog::Accepted) return; language = ""; for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx) { @@ -302,9 +302,9 @@ void SbdConf::slotLanguageBrowseButton_clicked() void SbdConf::slotLoadButton_clicked() { - // QString dataDir = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/stringreplacer/"; - QString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/sbd/").last(); - QString filename = KFileDialog::getOpenFileName( + // TQString dataDir = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/stringreplacer/"; + TQString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/sbd/").last(); + TQString filename = KFileDialog::getOpenFileName( dataDir, "*rc|SBD Config (*rc)", m_widget, @@ -318,7 +318,7 @@ void SbdConf::slotLoadButton_clicked() void SbdConf::slotSaveButton_clicked() { - QString filename = KFileDialog::getSaveFileName( + TQString filename = KFileDialog::getSaveFileName( KGlobal::dirs()->saveLocation( "data" ,"kttsd/sbd/", false ), "*rc|SBD Config (*rc)", m_widget, @@ -331,11 +331,11 @@ void SbdConf::slotSaveButton_clicked() void SbdConf::slotClearButton_clicked() { - m_widget->nameLineEdit->setText( QString::null ); - m_widget->reLineEdit->setText( QString::null ); - m_widget->sbLineEdit->setText( QString::null ); + m_widget->nameLineEdit->setText( TQString::null ); + m_widget->reLineEdit->setText( TQString::null ); + m_widget->sbLineEdit->setText( TQString::null ); m_languageCodeList.clear(); - m_widget->languageLineEdit->setText( QString::null ); - m_widget->appIdLineEdit->setText( QString::null ); + m_widget->languageLineEdit->setText( TQString::null ); + m_widget->appIdLineEdit->setText( TQString::null ); configChanged(); } diff --git a/kttsd/filters/sbd/sbdconf.h b/kttsd/filters/sbd/sbdconf.h index 131a759..eb1b817 100644 --- a/kttsd/filters/sbd/sbdconf.h +++ b/kttsd/filters/sbd/sbdconf.h @@ -25,7 +25,7 @@ #define _SBDCONF_H_ // Qt includes. -#include +#include // KDE includes. #include @@ -48,7 +48,7 @@ class SbdConf : public KttsFilterConf /** * Constructor */ - SbdConf( QWidget *parent, const char *name, const QStringList &args = QStringList() ); + SbdConf( TQWidget *parent, const char *name, const TQStringList &args = TQStringList() ); /** * Destructor @@ -73,7 +73,7 @@ class SbdConf : public KttsFilterConf * any instance-specific parameters to load, but it may still wish * to load parameters that apply to all instances of the plugin. */ - virtual void load(KConfig *config, const QString &configGroup); + virtual void load(KConfig *config, const TQString &configGroup); /** * This function gets called when the user wants to save the settings in @@ -85,7 +85,7 @@ class SbdConf : public KttsFilterConf * @param configGroup Call config->setGroup with this argument before * saving your configuration. */ - virtual void save(KConfig *config, const QString &configGroup); + virtual void save(KConfig *config, const TQString &configGroup); /** * This function is called to set the settings in the module to sensible @@ -111,7 +111,7 @@ class SbdConf : public KttsFilterConf * return an empty string. * @return Filter instance name. */ - virtual QString userPlugInName(); + virtual TQString userPlugInName(); /** * Returns True if this filter is a Sentence Boundary Detector. @@ -133,7 +133,7 @@ class SbdConf : public KttsFilterConf // True if kdeutils Regular Expression Editor is installed. bool m_reEditorInstalled; // Language Code. - QStringList m_languageCodeList; + TQStringList m_languageCodeList; }; #endif //_SBDCONF_H_ diff --git a/kttsd/filters/sbd/sbdproc.cpp b/kttsd/filters/sbd/sbdproc.cpp index cdc80d9..6117b11 100644 --- a/kttsd/filters/sbd/sbdproc.cpp +++ b/kttsd/filters/sbd/sbdproc.cpp @@ -22,9 +22,9 @@ ******************************************************************************/ // Qt includes. -#include -#include -#include +#include +#include +#include // KDE includes. #include @@ -41,9 +41,9 @@ /** * Constructor. */ -SbdThread::SbdThread( QObject *parent, const char *name ) : - QObject( parent, name ), - QThread() +SbdThread::SbdThread( TQObject *parent, const char *name ) : + TQObject( parent, name ), + TQThread() { } @@ -57,8 +57,8 @@ SbdThread::SbdThread( QObject *parent, const char *name ) : /** * Get/Set text being processed. */ -void SbdThread::setText( const QString& text ) { m_text = text; } -QString SbdThread::text() { return m_text; } +void SbdThread::setText( const TQString& text ) { m_text = text; } +TQString SbdThread::text() { return m_text; } /** * Set/Get TalkerCode. @@ -72,14 +72,14 @@ TalkerCode* SbdThread::talkerCode() { return m_talkerCode; } * * @param re The sentence delimiter regular expression. */ -void SbdThread::setSbRegExp( const QString& re ) { m_re = re; } +void SbdThread::setSbRegExp( const TQString& re ) { m_re = re; } /** * The configured Sentence Boundary Regular Expression. * * @param re The sentence delimiter regular expression. */ -void SbdThread::setConfiguredSbRegExp( const QString& re ) { m_configuredRe = re; } +void SbdThread::setConfiguredSbRegExp( const TQString& re ) { m_configuredRe = re; } /** * The configured Sentence Boundary that replaces SB regular expression. @@ -87,7 +87,7 @@ void SbdThread::setConfiguredSbRegExp( const QString& re ) { m_configuredRe = re * @param sb The sentence boundary replacement. * */ -void SbdThread::setConfiguredSentenceBoundary( const QString& sb ) { m_configuredSentenceBoundary = sb; } +void SbdThread::setConfiguredSentenceBoundary( const TQString& sb ) { m_configuredSentenceBoundary = sb; } /** * Did this filter do anything? If the filter returns the input as output @@ -97,7 +97,7 @@ void SbdThread::setWasModified(bool wasModified) { m_wasModified = wasModified; bool SbdThread::wasModified() { return m_wasModified; } // Given a tag name, returns SsmlElemType. -SbdThread::SsmlElemType SbdThread::tagToSsmlElemType( const QString tagName ) +SbdThread::SsmlElemType SbdThread::tagToSsmlElemType( const TQString tagName ) { if ( tagName == "speak" ) return etSpeak; if ( tagName == "voice" ) return etVoice; @@ -110,12 +110,12 @@ SbdThread::SsmlElemType SbdThread::tagToSsmlElemType( const QString tagName ) } // Parses an SSML element, pushing current settings onto the context stack. -void SbdThread::pushSsmlElem( SsmlElemType et, const QDomElement& elem ) +void SbdThread::pushSsmlElem( SsmlElemType et, const TQDomElement& elem ) { // TODO: Need to convert relative values into absolute values and also convert // only to values recognized by SSML2SABLE stylesheet. Either that or enhance all // the synth stylesheets. - QDomNamedNodeMap attrList = elem.attributes(); + TQDomNamedNodeMap attrList = elem.attributes(); int attrCount = attrList.count(); switch ( et ) { @@ -123,7 +123,7 @@ void SbdThread::pushSsmlElem( SsmlElemType et, const QDomElement& elem ) SpeakElem e = m_speakStack.top(); for ( int ndx=0; ndx < attrCount; ++ndx ) { - QDomAttr a = attrList.item( ndx ).toAttr(); + TQDomAttr a = attrList.item( ndx ).toAttr(); if ( a.name() == "lang" ) e.lang = a.value(); } m_speakStack.push( e ); @@ -139,7 +139,7 @@ void SbdThread::pushSsmlElem( SsmlElemType et, const QDomElement& elem ) ProsodyElem e = m_prosodyStack.top(); for ( int ndx=0; ndx < attrCount; ++ndx ) { - QDomAttr a = attrList.item( ndx ).toAttr(); + TQDomAttr a = attrList.item( ndx ).toAttr(); if ( a.name() == "pitch" ) e.pitch = a.value(); if ( a.name() == "contour" ) e.contour = a.value(); if ( a.name() == "range" ) e.range = a.value(); @@ -153,7 +153,7 @@ void SbdThread::pushSsmlElem( SsmlElemType et, const QDomElement& elem ) EmphasisElem e = m_emphasisStack.top(); for ( int ndx=0; ndx < attrCount; ++ndx ) { - QDomAttr a = attrList.item( ndx ).toAttr(); + TQDomAttr a = attrList.item( ndx ).toAttr(); if ( a.name() == "level" ) e.level = a.value(); } m_emphasisStack.push( e ); @@ -162,7 +162,7 @@ void SbdThread::pushSsmlElem( SsmlElemType et, const QDomElement& elem ) PSElem e = m_psStack.top(); for ( int ndx=0; ndx < attrCount; ++ndx ) { - QDomAttr a = attrList.item( ndx ).toAttr(); + TQDomAttr a = attrList.item( ndx ).toAttr(); if ( a.name() == "lang" ) e.lang = a.value(); } m_psStack.push( e ); @@ -173,17 +173,17 @@ void SbdThread::pushSsmlElem( SsmlElemType et, const QDomElement& elem ) // Given an attribute name and value, constructs an XML representation of the attribute, // i.e., name="value". -QString SbdThread::makeAttr( const QString& name, const QString& value ) +TQString SbdThread::makeAttr( const TQString& name, const TQString& value ) { - if ( value.isEmpty() ) return QString::null; + if ( value.isEmpty() ) return TQString::null; return " " + name + "=\"" + value + "\""; } // Returns an XML representation of an SSML tag from the top of the context stack. -QString SbdThread::makeSsmlElem( SsmlElemType et ) +TQString SbdThread::makeSsmlElem( SsmlElemType et ) { - QString s; - QString a; + TQString s; + TQString a; switch ( et ) { // Must always output speak tag, otherwise kttsd won't think each sentence is SSML. @@ -198,7 +198,7 @@ QString SbdThread::makeSsmlElem( SsmlElemType et ) VoiceElem e = m_voiceStack.top(); a += makeAttr( "lang", e.lang ); a += makeAttr( "gender", e.gender ); - a += makeAttr( "age", QString::number(e.age) ); + a += makeAttr( "age", TQString::number(e.age) ); a += makeAttr( "name", e.name ); a += makeAttr( "variant", e.variant ); if ( !a.isEmpty() ) s = ""; @@ -240,14 +240,14 @@ void SbdThread::popSsmlElem( SsmlElemType et ) } // Returns an XML representation of a break element. -QString SbdThread::makeBreakElem( const QDomElement& e ) +TQString SbdThread::makeBreakElem( const TQDomElement& e ) { - QString s = "setGroup( configGroup ); // m_configuredRe = config->readEntry( "SentenceDelimiterRegExp", "([\\.\\?\\!\\:\\;])\\s|(\\n *\\n)" ); m_configuredRe = config->readEntry( "SentenceDelimiterRegExp", "([\\.\\?\\!\\:\\;])(\\s|$|(\\n *\\n))" ); m_sbdThread->setConfiguredSbRegExp( m_configuredRe ); - QString sb = config->readEntry( "SentenceBoundary", "\\1\t" ); + TQString sb = config->readEntry( "SentenceBoundary", "\\1\t" ); sb.replace( "\\t", "\t" ); m_sbdThread->setConfiguredSentenceBoundary( sb ); m_appIdList = config->readListEntry( "AppID" ); @@ -638,7 +638,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){ * @param appId The DCOP appId of the application that queued the text. * Also useful for hints about how to do the filtering. */ -/*virtual*/ QString SbdProc::convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId) +/*virtual*/ TQString SbdProc::convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId) { if ( asyncConvert( inputText, talkerCode, appId) ) { @@ -662,14 +662,14 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){ * program may then call @ref getOutput to retrieve converted text. Calling * program must call @ref ackFinished to acknowledge the conversion. */ -/*virtual*/ bool SbdProc::asyncConvert(const QString& inputText, TalkerCode* talkerCode, - const QCString& appId) +/*virtual*/ bool SbdProc::asyncConvert(const TQString& inputText, TalkerCode* talkerCode, + const TQCString& appId) { m_sbdThread->setWasModified( false ); // If language doesn't match, return input unmolested. if ( !m_languageCodeList.isEmpty() ) { - QString languageCode = talkerCode->languageCode(); + TQString languageCode = talkerCode->languageCode(); // kdDebug() << "StringReplacerProc::convert: converting " << inputText << // " if language code " << languageCode << " matches " << m_languageCodeList << endl; if ( !m_languageCodeList.contains( languageCode ) ) @@ -689,7 +689,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){ // kdDebug() << "SbdProc::convert: converting " << inputText << " if appId " // << appId << " matches " << m_appIdList << endl; bool found = false; - QString appIdStr = appId; + TQString appIdStr = appId; for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx ) { if ( appIdStr.contains(m_appIdList[ndx]) ) @@ -729,7 +729,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){ /** * Returns the filtered output. */ -/*virtual*/ QString SbdProc::getOutput() { return m_sbdThread->text(); } +/*virtual*/ TQString SbdProc::getOutput() { return m_sbdThread->text(); } /** * Acknowledges the finished filtering. @@ -737,7 +737,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){ /*virtual*/ void SbdProc::ackFinished() { m_state = fsIdle; - m_sbdThread->setText( QString::null ); + m_sbdThread->setText( TQString::null ); } /** @@ -753,7 +753,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){ delete m_sbdThread; m_sbdThread = new SbdThread(); m_sbdThread->setConfiguredSbRegExp( m_configuredRe ); - connect( m_sbdThread, SIGNAL(filteringFinished()), this, SLOT(slotSbdThreadFilteringFinished()) ); + connect( m_sbdThread, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotSbdThreadFilteringFinished()) ); m_state = fsIdle; emit filteringStopped(); } @@ -771,7 +771,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){ * * @param re The sentence delimiter regular expression. */ -/*virtual*/ void SbdProc::setSbRegExp(const QString& re) { m_sbdThread->setSbRegExp( re ); } +/*virtual*/ void SbdProc::setSbRegExp(const TQString& re) { m_sbdThread->setSbRegExp( re ); } // Received when SBD Thread finishes. void SbdProc::slotSbdThreadFilteringFinished() diff --git a/kttsd/filters/sbd/sbdproc.h b/kttsd/filters/sbd/sbdproc.h index 6c181d5..75e4d59 100644 --- a/kttsd/filters/sbd/sbdproc.h +++ b/kttsd/filters/sbd/sbdproc.h @@ -46,11 +46,11 @@ #define _SBDPROC_H_ // Qt includes. -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // KTTS includes. #include "filterproc.h" @@ -60,7 +60,7 @@ class KConfig; class QDomElement; class QDomNode; -class SbdThread: public QObject, public QThread +class SbdThread: public TQObject, public QThread { Q_OBJECT @@ -68,7 +68,7 @@ class SbdThread: public QObject, public QThread /** * Constructor. */ - SbdThread( QObject *parent = 0, const char *name = 0); + SbdThread( TQObject *parent = 0, const char *name = 0); /** * Destructor. @@ -78,8 +78,8 @@ class SbdThread: public QObject, public QThread /** * Get/Set text being processed. */ - void setText( const QString& text ); - QString text(); + void setText( const TQString& text ); + TQString text(); /** * Set/Get TalkerCode. @@ -93,14 +93,14 @@ class SbdThread: public QObject, public QThread * * @param re The sentence delimiter regular expression. */ - void setSbRegExp( const QString& re ); + void setSbRegExp( const TQString& re ); /** * The configured Sentence Boundary Regular Expression. * * @param re The sentence delimiter regular expression. */ - void setConfiguredSbRegExp( const QString& re ); + void setConfiguredSbRegExp( const TQString& re ); /** * The configured Sentence Boundary that replaces SB regular expression. @@ -108,7 +108,7 @@ class SbdThread: public QObject, public QThread * @param sb The sentence boundary replacement. * */ - void setConfiguredSentenceBoundary( const QString& sb ); + void setConfiguredSentenceBoundary( const TQString& sb ); /** * Did this filter do anything? If the filter returns the input as output @@ -122,7 +122,7 @@ class SbdThread: public QObject, public QThread protected: virtual void run(); - virtual bool event ( QEvent * e ); + virtual bool event ( TQEvent * e ); private: enum TextType { @@ -143,94 +143,94 @@ class SbdThread: public QObject, public QThread // Speak Element. struct SpeakElem { - QString lang; // xml:lang="en". + TQString lang; // xml:lang="en". }; // Voice Element. struct VoiceElem { - QString lang; // xml:lang="en". - QString gender; // "male", "female", or "neutral". + TQString lang; // xml:lang="en". + TQString gender; // "male", "female", or "neutral". uint age; // Age in years. - QString name; // Synth-specific voice name. - QString variant; // Ignored. + TQString name; // Synth-specific voice name. + TQString variant; // Ignored. }; // Prosody Element. struct ProsodyElem { - QString pitch; // "x-low", "low", "medium", "high", "x-high", "default". - QString contour; // Pitch contour (ignored). - QString range; // "x-low", "low", "medium", "high", "x-high", "default". - QString rate; // "x-slow", "slow", "medium", "fast", "x-fast", "default". - QString duration; // Ignored. - QString volume; // "silent", "x-soft", "soft", "medium", "load", "x-load", "default". + TQString pitch; // "x-low", "low", "medium", "high", "x-high", "default". + TQString contour; // Pitch contour (ignored). + TQString range; // "x-low", "low", "medium", "high", "x-high", "default". + TQString rate; // "x-slow", "slow", "medium", "fast", "x-fast", "default". + TQString duration; // Ignored. + TQString volume; // "silent", "x-soft", "soft", "medium", "load", "x-load", "default". }; // Emphasis Element. struct EmphasisElem { - QString level; // "strong", "moderate", "none" and "reduced" + TQString level; // "strong", "moderate", "none" and "reduced" }; // Break Element. struct BreakElem { - QString strength; // "x-weak", "weak", "medium" (default value), "strong", + TQString strength; // "x-weak", "weak", "medium" (default value), "strong", // or "x-strong", "none" - QString time; // Ignored. + TQString time; // Ignored. }; // Paragraph and Sentence Elements. struct PSElem { - QString lang; // xml:lang="en". + TQString lang; // xml:lang="en". }; // Given a tag name, returns SsmlElemType. - SsmlElemType tagToSsmlElemType(const QString tagName); + SsmlElemType tagToSsmlElemType(const TQString tagName); // Parses an SSML element, pushing current settings onto the context stack. - void pushSsmlElem( SsmlElemType et, const QDomElement& elem ); + void pushSsmlElem( SsmlElemType et, const TQDomElement& elem ); // Given an attribute name and value, constructs an XML representation of the attribute, // i.e., name="value". - QString makeAttr( const QString& name, const QString& value ); + TQString makeAttr( const TQString& name, const TQString& value ); // Returns an XML representation of an SSML tag from the top of the context stack. - QString makeSsmlElem( SsmlElemType et ); + TQString makeSsmlElem( SsmlElemType et ); // Pops element from the indicated context stack. void popSsmlElem( SsmlElemType et ); - QString makeBreakElem( const QDomElement& e ); + TQString makeBreakElem( const TQDomElement& e ); // Converts a text fragment into a CDATA section. - QString makeCDATA( const QString& text ); + TQString makeCDATA( const TQString& text ); // Returns an XML representation of an utterance node consisting of voice, // prosody, and emphasis elements. - QString makeSentence( const QString& text ); + TQString makeSentence( const TQString& text ); // Starts a sentence by returning a speak tag. - QString startSentence(); + TQString startSentence(); // Ends a sentence and appends a Tab. - QString endSentence(); + TQString endSentence(); // Parses a node of the SSML tree and recursively parses its children. // Returns the filtered text with each sentence a complete ssml tree. - QString parseSsmlNode( QDomNode& n, const QString& re ); + TQString parseSsmlNode( TQDomNode& n, const TQString& re ); // Parses Ssml. - QString parseSsml( const QString& inputText, const QString& re ); + TQString parseSsml( const TQString& inputText, const TQString& re ); // Parses code. Each newline is converted into a tab character (\t). - QString parseCode( const QString& inputText ); + TQString parseCode( const TQString& inputText ); // Parses plain text. - QString parsePlainText( const QString& inputText, const QString& re ); + TQString parsePlainText( const TQString& inputText, const TQString& re ); // Context stacks. - QValueStack m_speakStack; - QValueStack m_voiceStack; - QValueStack m_prosodyStack; - QValueStack m_emphasisStack; - QValueStack m_psStack; + TQValueStack m_speakStack; + TQValueStack m_voiceStack; + TQValueStack m_prosodyStack; + TQValueStack m_emphasisStack; + TQValueStack m_psStack; // The text being processed. - QString m_text; + TQString m_text; // Talker Code. TalkerCode* m_talkerCode; // Configured default Sentence Delimiter regular expression. - QString m_configuredRe; + TQString m_configuredRe; // Configured Sentence Boundary replacement expression. - QString m_configuredSentenceBoundary; + TQString m_configuredSentenceBoundary; // Application-specified Sentence Delimiter regular expression (if any). - QString m_re; + TQString m_re; // False if input was not modified. bool m_wasModified; // True when a sentence has been started. @@ -245,7 +245,7 @@ class SbdProc : virtual public KttsFilterProc /** * Constructor. */ - SbdProc( QObject *parent, const char *name, const QStringList &args = QStringList() ); + SbdProc( TQObject *parent, const char *name, const TQStringList &args = TQStringList() ); /** * Destructor. @@ -261,7 +261,7 @@ class SbdProc : virtual public KttsFilterProc * Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain * separate configuration files of their own. */ - virtual bool init( KConfig *config, const QString &configGroup ); + virtual bool init( KConfig *config, const TQString &configGroup ); /** * Returns True if this filter is a Sentence Boundary Detector. @@ -291,7 +291,7 @@ class SbdProc : virtual public KttsFilterProc * @param appId The DCOP appId of the application that queued the text. * Also useful for hints about how to do the filtering. */ - virtual QString convert( const QString& inputText, TalkerCode* talkerCode, const QCString& appId ); + virtual TQString convert( const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId ); /** * Convert input. Runs asynchronously. @@ -307,7 +307,7 @@ class SbdProc : virtual public KttsFilterProc * program may then call @ref getOutput to retrieve converted text. Calling * program must call @ref ackFinished to acknowledge the conversion. */ - virtual bool asyncConvert( const QString& inputText, TalkerCode* talkerCode, const QCString& appId ); + virtual bool asyncConvert( const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId ); /** * Waits for a previous call to asyncConvert to finish. @@ -322,7 +322,7 @@ class SbdProc : virtual public KttsFilterProc /** * Returns the filtered output. */ - virtual QString getOutput(); + virtual TQString getOutput(); /** * Acknowledges the finished filtering. @@ -344,7 +344,7 @@ class SbdProc : virtual public KttsFilterProc /** * Set Sentence Boundary Regular Expression. */ - virtual void setSbRegExp( const QString& re ); + virtual void setSbRegExp( const TQString& re ); private slots: // Received when SBD Thread finishes. @@ -352,15 +352,15 @@ class SbdProc : virtual public KttsFilterProc private: // If not empty, apply filters only to apps using talkers speaking these language codes. - QStringList m_languageCodeList; + TQStringList m_languageCodeList; // If not empty, apply filter only to apps containing this string. - QStringList m_appIdList; + TQStringList m_appIdList; // SBD Thread Object. SbdThread* m_sbdThread; // State. int m_state; // Configured default Sentence Delimiter regular expression. - QString m_configuredRe; + TQString m_configuredRe; }; #endif // _SBDPROC_H_ diff --git a/kttsd/filters/stringreplacer/stringreplacerconf.cpp b/kttsd/filters/stringreplacer/stringreplacerconf.cpp index 9afa2d5..72f50d8 100644 --- a/kttsd/filters/stringreplacer/stringreplacerconf.cpp +++ b/kttsd/filters/stringreplacer/stringreplacerconf.cpp @@ -22,15 +22,15 @@ ******************************************************************************/ // Qt includes. -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE includes. #include @@ -59,7 +59,7 @@ /** * Constructor */ -StringReplacerConf::StringReplacerConf( QWidget *parent, const char *name, const QStringList& /*args*/) : +StringReplacerConf::StringReplacerConf( TQWidget *parent, const char *name, const TQStringList& /*args*/) : KttsFilterConf(parent, name), m_editDlg(0), m_editWidget(0) @@ -67,37 +67,37 @@ StringReplacerConf::StringReplacerConf( QWidget *parent, const char *name, const // kdDebug() << "StringReplacerConf::StringReplacerConf: Running" << endl; // Create configuration widget. - QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "StringReplacerConfigWidgetLayout"); layout->setAlignment (Qt::AlignTop); m_widget = new StringReplacerConfWidget(this, "StringReplacerConfigWidget"); layout->addWidget(m_widget); m_widget->substLView->setSortColumn(-1); - connect(m_widget->nameLineEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(configChanged())); - connect(m_widget->languageBrowseButton, SIGNAL(clicked()), - this, SLOT(slotLanguageBrowseButton_clicked())); - connect(m_widget->addButton, SIGNAL(clicked()), - this, SLOT(slotAddButton_clicked())); - connect(m_widget->upButton, SIGNAL(clicked()), - this, SLOT(slotUpButton_clicked())); - connect(m_widget->downButton, SIGNAL(clicked()), - this, SLOT(slotDownButton_clicked())); - connect(m_widget->editButton, SIGNAL(clicked()), - this, SLOT(slotEditButton_clicked())); - connect(m_widget->removeButton, SIGNAL(clicked()), - this, SLOT(slotRemoveButton_clicked())); - connect(m_widget->loadButton, SIGNAL(clicked()), - this, SLOT(slotLoadButton_clicked())); - connect(m_widget->saveButton, SIGNAL(clicked()), - this, SLOT(slotSaveButton_clicked())); - connect(m_widget->clearButton, SIGNAL(clicked()), - this, SLOT(slotClearButton_clicked())); - connect(m_widget->substLView, SIGNAL(selectionChanged()), - this, SLOT(enableDisableButtons())); - connect(m_widget->appIdLineEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(configChanged())); + connect(m_widget->nameLineEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(configChanged())); + connect(m_widget->languageBrowseButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotLanguageBrowseButton_clicked())); + connect(m_widget->addButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddButton_clicked())); + connect(m_widget->upButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotUpButton_clicked())); + connect(m_widget->downButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDownButton_clicked())); + connect(m_widget->editButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotEditButton_clicked())); + connect(m_widget->removeButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveButton_clicked())); + connect(m_widget->loadButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotLoadButton_clicked())); + connect(m_widget->saveButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSaveButton_clicked())); + connect(m_widget->clearButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotClearButton_clicked())); + connect(m_widget->substLView, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(enableDisableButtons())); + connect(m_widget->appIdLineEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(configChanged())); // Determine if kdeutils Regular Expression Editor is installed. m_reEditorInstalled = !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty(); @@ -126,14 +126,14 @@ StringReplacerConf::~StringReplacerConf(){ * @param configGroup Call config->setGroup with this argument before * loading your configuration. */ -void StringReplacerConf::load(KConfig* config, const QString& configGroup){ +void StringReplacerConf::load(KConfig* config, const TQString& configGroup){ // kdDebug() << "StringReplacerConf::load: Running" << endl; // See if this filter previously save its word list. config->setGroup( configGroup ); - QString wordsFilename = config->readEntry( "WordListFile" ); + TQString wordsFilename = config->readEntry( "WordListFile" ); if ( !wordsFilename.isEmpty() ) { - QString errMsg = loadFromFile( wordsFilename, true ); + TQString errMsg = loadFromFile( wordsFilename, true ); if ( !errMsg.isEmpty() ) kdDebug() << "StringReplacerConf::load: " << errMsg << endl; enableDisableButtons(); @@ -141,16 +141,16 @@ void StringReplacerConf::load(KConfig* config, const QString& configGroup){ } // Loads word list and settings from a file. Clearing configuration if clear is True. -QString StringReplacerConf::loadFromFile( const QString& filename, bool clear) +TQString StringReplacerConf::loadFromFile( const TQString& filename, bool clear) { // Open existing word list. - QFile file( filename ); + TQFile file( filename ); if ( !file.open( IO_ReadOnly ) ) { return i18n("Unable to open file.") + filename; } - // QDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" ); - QDomDocument doc( "" ); + // TQDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" ); + TQDomDocument doc( "" ); if ( !doc.setContent( &file ) ) { file.close(); return i18n("File not in proper XML format."); @@ -162,26 +162,26 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear) if ( clear ) m_widget->substLView->clear(); // Name setting. - QDomNodeList nameList = doc.elementsByTagName( "name" ); - QDomNode nameNode = nameList.item( 0 ); + TQDomNodeList nameList = doc.elementsByTagName( "name" ); + TQDomNode nameNode = nameList.item( 0 ); m_widget->nameLineEdit->setText( nameNode.toElement().text() ); // kdDebug() << "StringReplacerConf::load: name = " << nameNode.toElement().text() << endl; // Language Codes setting. List may be single element of comma-separated values, // or multiple elements. - QString languageCodes; - QDomNodeList languageList = doc.elementsByTagName( "language-code" ); + TQString languageCodes; + TQDomNodeList languageList = doc.elementsByTagName( "language-code" ); for ( uint ndx=0; ndx < languageList.count(); ++ndx ) { - QDomNode languageNode = languageList.item( ndx ); + TQDomNode languageNode = languageList.item( ndx ); if (!languageCodes.isEmpty()) languageCodes += ","; languageCodes += languageNode.toElement().text(); } if ( clear ) - m_languageCodeList = QStringList::split(',', languageCodes, false); + m_languageCodeList = TQStringList::split(',', languageCodes, false); else - m_languageCodeList += QStringList::split(',', languageCodes, false); - QString language; + m_languageCodeList += TQStringList::split(',', languageCodes, false); + TQString language; m_languageCodeList.sort(); // Eliminate dups. for ( int ndx = m_languageCodeList.count() - 2; ndx >= 0; --ndx ) @@ -199,11 +199,11 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear) // AppId. Apply this filter only if DCOP appId of application that queued // the text contains this string. List may be single element of comma-separated values, // or multiple elements. - QDomNodeList appIdList = doc.elementsByTagName( "appid" ); - QString appIds; + TQDomNodeList appIdList = doc.elementsByTagName( "appid" ); + TQString appIds; for ( uint ndx=0; ndx < appIdList.count(); ++ndx ) { - QDomNode appIdNode = appIdList.item( ndx ); + TQDomNode appIdNode = appIdList.item( ndx ); if (!appIds.isEmpty()) appIds += ","; appIds += appIdNode.toElement().text(); } @@ -211,32 +211,32 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear) m_widget->appIdLineEdit->setText( appIds ); // Word list. - QListViewItem* item = 0; + TQListViewItem* item = 0; if ( !clear ) item = m_widget->substLView->lastChild(); - QDomNodeList wordList = doc.elementsByTagName("word"); + TQDomNodeList wordList = doc.elementsByTagName("word"); const int wordListCount = wordList.count(); for (int wordIndex = 0; wordIndex < wordListCount; ++wordIndex) { // kdDebug() << "StringReplacerConf::load: start parsing of word " << wordIndex << endl; - QDomNode wordNode = wordList.item(wordIndex); - QDomNodeList propList = wordNode.childNodes(); - QString wordType; - QString matchCase = "No"; // Default for old (v<=3.5.3) config files with no . - QString match; - QString subst; + TQDomNode wordNode = wordList.item(wordIndex); + TQDomNodeList propList = wordNode.childNodes(); + TQString wordType; + TQString matchCase = "No"; // Default for old (v<=3.5.3) config files with no . + TQString match; + TQString subst; const int propListCount = propList.count(); for (int propIndex = 0; propIndex < propListCount; ++propIndex) { - QDomNode propNode = propList.item(propIndex); - QDomElement prop = propNode.toElement(); + TQDomNode propNode = propList.item(propIndex); + TQDomElement prop = propNode.toElement(); if (prop.tagName() == "type") wordType = prop.text(); if (prop.tagName() == "case") matchCase = prop.text(); if (prop.tagName() == "match") match = prop.text(); if (prop.tagName() == "subst") subst = prop.text(); } - QString wordTypeStr = + TQString wordTypeStr = (wordType=="RegExp"?i18n("Abbreviation for 'Regular Expression'", "RegExp"):i18n("Word")); - QString matchCaseStr = + TQString matchCaseStr = (matchCase=="Yes"?i18n("Yes"):i18n("No")); if (!item) item = new KListViewItem(m_widget->substLView, wordTypeStr, matchCaseStr, match, subst); @@ -244,7 +244,7 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear) item = new KListViewItem(m_widget->substLView, item, wordTypeStr, matchCaseStr, match, subst); } - return QString::null; + return TQString::null; } /** @@ -257,9 +257,9 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear) * @param configGroup Call config->setGroup with this argument before * saving your configuration. */ -void StringReplacerConf::save(KConfig* config, const QString& configGroup){ +void StringReplacerConf::save(KConfig* config, const TQString& configGroup){ // kdDebug() << "StringReplacerConf::save: Running" << endl; - QString wordsFilename = + TQString wordsFilename = KGlobal::dirs()->saveLocation( "data" ,"kttsd/stringreplacer/", true ); if ( wordsFilename.isEmpty() ) { @@ -267,7 +267,7 @@ void StringReplacerConf::save(KConfig* config, const QString& configGroup){ return; } wordsFilename += configGroup; - QString errMsg = saveToFile( wordsFilename ); + TQString errMsg = saveToFile( wordsFilename ); if ( errMsg.isEmpty() ) { config->setGroup( configGroup ); @@ -278,43 +278,43 @@ void StringReplacerConf::save(KConfig* config, const QString& configGroup){ } // Saves word list and settings to a file. -QString StringReplacerConf::saveToFile(const QString& filename) +TQString StringReplacerConf::saveToFile(const TQString& filename) { // kdDebug() << "StringReplacerConf::saveToFile: saving to file " << wordsFilename << endl; - QFile file( filename ); + TQFile file( filename ); if ( !file.open( IO_WriteOnly ) ) return i18n("Unable to open file ") + filename; - // QDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" ); - QDomDocument doc( "" ); + // TQDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" ); + TQDomDocument doc( "" ); - QDomElement root = doc.createElement( "wordlist" ); + TQDomElement root = doc.createElement( "wordlist" ); doc.appendChild( root ); // Name. - QDomElement name = doc.createElement( "name" ); + TQDomElement name = doc.createElement( "name" ); root.appendChild( name ); - QDomText t = doc.createTextNode( m_widget->nameLineEdit->text() ); + TQDomText t = doc.createTextNode( m_widget->nameLineEdit->text() ); name.appendChild( t ); // Language code. for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx ) { - QDomElement languageCode = doc.createElement( "language-code" ); + TQDomElement languageCode = doc.createElement( "language-code" ); root.appendChild( languageCode ); t = doc.createTextNode( m_languageCodeList[ndx] ); languageCode.appendChild( t ); } // Application ID - QString appId = m_widget->appIdLineEdit->text().replace(" ", ""); + TQString appId = m_widget->appIdLineEdit->text().replace(" ", ""); if ( !appId.isEmpty() ) { - QStringList appIdList = QStringList::split(",", appId); + TQStringList appIdList = TQStringList::split(",", appId); for ( uint ndx=0; ndx < appIdList.count(); ++ndx ) { - QDomElement appIdElem = doc.createElement( "appid" ); + TQDomElement appIdElem = doc.createElement( "appid" ); root.appendChild( appIdElem ); t = doc.createTextNode( appIdList[ndx] ); appIdElem.appendChild( t ); @@ -322,15 +322,15 @@ QString StringReplacerConf::saveToFile(const QString& filename) } // Words. - QListView* lView = m_widget->substLView; - QListViewItem* item = lView->firstChild(); + TQListView* lView = m_widget->substLView; + TQListViewItem* item = lView->firstChild(); while (item) { - QDomElement wordTag = doc.createElement( "word" ); + TQDomElement wordTag = doc.createElement( "word" ); root.appendChild( wordTag ); - QDomElement propTag = doc.createElement( "type" ); + TQDomElement propTag = doc.createElement( "type" ); wordTag.appendChild( propTag); - QDomText t = doc.createTextNode( item->text(0)==i18n("Word")?"Word":"RegExp" ); + TQDomText t = doc.createTextNode( item->text(0)==i18n("Word")?"Word":"RegExp" ); propTag.appendChild( t ); propTag = doc.createElement( "case" ); @@ -352,14 +352,14 @@ QString StringReplacerConf::saveToFile(const QString& filename) } // Write it all out. - QTextStream ts( &file ); - ts.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream ts( &file ); + ts.setEncoding( TQTextStream::UnicodeUTF8 ); ts << "\n"; ts << doc.toString(); // kdDebug() << "StringReplacerConf::saveToFile: writing out " << doc.toString() << endl; file.close(); - return QString::null; + return TQString::null; } /** @@ -398,13 +398,13 @@ bool StringReplacerConf::supportsMultiInstance() { return true; } * return an empty string. * @return Filter instance name. */ -QString StringReplacerConf::userPlugInName() +TQString StringReplacerConf::userPlugInName() { - if ( m_widget->substLView->childCount() == 0 ) return QString::null; - QString instName = m_widget->nameLineEdit->text(); + if ( m_widget->substLView->childCount() == 0 ) return TQString::null; + TQString instName = m_widget->nameLineEdit->text(); if ( instName.isEmpty() ) { - QString language; + TQString language; if (m_languageCodeList.count() == 1) language = KGlobal::locale()->twoAlphaToLanguageName(m_languageCodeList[0]); if (m_languageCodeList.count() > 1) @@ -417,21 +417,21 @@ QString StringReplacerConf::userPlugInName() void StringReplacerConf::slotLanguageBrowseButton_clicked() { - // Create a QHBox to host KListView. - QHBox* hBox = new QHBox(m_widget, "SelectLanguage_hbox"); + // Create a TQHBox to host KListView. + TQHBox* hBox = new TQHBox(m_widget, "SelectLanguage_hbox"); // Create a KListView and fill with all known languages. KListView* langLView = new KListView(hBox, "SelectLanguage_lview"); langLView->addColumn(i18n("Language")); langLView->addColumn(i18n("Code")); - langLView->setSelectionMode(QListView::Extended); - QStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha(); - QString locale; - QString languageCode; - QString countryCode; - QString charSet; - QString language; + langLView->setSelectionMode(TQListView::Extended); + TQStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha(); + TQString locale; + TQString languageCode; + TQString countryCode; + TQString charSet; + TQString language; // Blank line so user can select no language. - QListViewItem* item = new KListViewItem(langLView, "", ""); + TQListViewItem* item = new KListViewItem(langLView, "", ""); if (m_languageCodeList.isEmpty()) item->setSelected(true); const int allLocalesCount = allLocales.count(); for (int ndx=0; ndx < allLocalesCount; ++ndx) @@ -459,13 +459,13 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked() true); dlg->setMainWidget(hBox); dlg->setHelp("", "kttsd"); - dlg->setInitialSize(QSize(300, 500), false); + dlg->setInitialSize(TQSize(300, 500), false); int dlgResult = dlg->exec(); - languageCode = QString::null; - if (dlgResult == QDialog::Accepted) + languageCode = TQString::null; + if (dlgResult == TQDialog::Accepted) { m_languageCodeList.clear(); - QListViewItem* item = langLView->firstChild(); + TQListViewItem* item = langLView->firstChild(); while (item) { if (item->isSelected()) m_languageCodeList += item->text(1); @@ -474,17 +474,17 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked() } delete dlg; // TODO: Also delete KListView and QHBox? - if (dlgResult != QDialog::Accepted) return; + if (dlgResult != TQDialog::Accepted) return; language = ""; for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx) { if (!language.isEmpty()) language += ","; language += KGlobal::locale()->twoAlphaToLanguageName(m_languageCodeList[ndx]); } - QString s1 = m_widget->languageLineEdit->text(); + TQString s1 = m_widget->languageLineEdit->text(); m_widget->languageLineEdit->setText(language); // Replace language in the user's filter name. - QString s2 = m_widget->nameLineEdit->text(); + TQString s2 = m_widget->nameLineEdit->text(); if (m_languageCodeList.count() > 1) language = i18n("Multiple Languages"); if ( !s1.isEmpty() ) { @@ -518,9 +518,9 @@ void StringReplacerConf::enableDisableButtons() void StringReplacerConf::slotUpButton_clicked() { - QListViewItem* item = m_widget->substLView->selectedItem(); + TQListViewItem* item = m_widget->substLView->selectedItem(); if (!item) return; - QListViewItem* prevItem = item->itemAbove(); + TQListViewItem* prevItem = item->itemAbove(); if (!prevItem) return; prevItem->moveItem(item); m_widget->substLView->setSelected(item, true); @@ -531,9 +531,9 @@ void StringReplacerConf::slotUpButton_clicked() void StringReplacerConf::slotDownButton_clicked() { - QListViewItem* item = m_widget->substLView->selectedItem(); + TQListViewItem* item = m_widget->substLView->selectedItem(); if (!item) return; - QListViewItem* nextItem = item->itemBelow(); + TQListViewItem* nextItem = item->itemBelow(); if (!nextItem) return; item->moveItem(nextItem); m_widget->substLView->setSelected(item, true); @@ -555,7 +555,7 @@ void StringReplacerConf::slotEditButton_clicked() // Displays the add/edit string replacement dialog. void StringReplacerConf::addOrEditSubstitution(bool isAdd) { - QListViewItem* item = 0; + TQListViewItem* item = 0; if (isAdd) item = m_widget->substLView->lastChild(); else @@ -563,8 +563,8 @@ void StringReplacerConf::addOrEditSubstitution(bool isAdd) item = m_widget->substLView->selectedItem(); if (!item) return; } - // Create a QHBox to host widget. - QHBox* hBox = new QHBox(m_widget, "AddOrEditSubstitution_hbox" ); + // Create a TQHBox to host widget. + TQHBox* hBox = new TQHBox(m_widget, "AddOrEditSubstitution_hbox" ); // Create widget. m_editWidget = new EditReplacementWidget( hBox, "AddOrEditSubstitution_widget" ); // Set controls if editing existing. @@ -581,14 +581,14 @@ void StringReplacerConf::addOrEditSubstitution(bool isAdd) m_editWidget->substLineEdit->setText( item->text(3) ); } // The match box may not be blank. - connect( m_editWidget->matchLineEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(slotMatchLineEdit_textChanged(const QString&)) ); - connect( m_editWidget->regexpRadioButton, SIGNAL(clicked()), - this, SLOT(slotTypeButtonGroup_clicked()) ); - connect( m_editWidget->wordRadioButton, SIGNAL(clicked()), - this, SLOT(slotTypeButtonGroup_clicked()) ); - connect( m_editWidget->matchButton, SIGNAL(clicked()), - this, SLOT(slotMatchButton_clicked()) ); + connect( m_editWidget->matchLineEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotMatchLineEdit_textChanged(const TQString&)) ); + connect( m_editWidget->regexpRadioButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotTypeButtonGroup_clicked()) ); + connect( m_editWidget->wordRadioButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotTypeButtonGroup_clicked()) ); + connect( m_editWidget->matchButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotMatchButton_clicked()) ); // Display the box in a dialog. m_editDlg = new KDialogBase( KDialogBase::Swallow, @@ -604,17 +604,17 @@ void StringReplacerConf::addOrEditSubstitution(bool isAdd) m_editDlg->setHelp( "", "kttsd" ); m_editDlg->enableButton( KDialogBase::Ok, !m_editWidget->matchLineEdit->text().isEmpty() ); int dlgResult = m_editDlg->exec(); - QString substType = i18n( "Word" ); + TQString substType = i18n( "Word" ); if ( m_editWidget->regexpRadioButton->isChecked() ) substType = i18n("Abbreviation for 'Regular Expression'", "RegExp"); - QString matchCase = i18n("No"); + TQString matchCase = i18n("No"); if ( m_editWidget->caseCheckBox->isChecked() ) matchCase = i18n("Yes"); - QString match = m_editWidget->matchLineEdit->text(); - QString subst = m_editWidget->substLineEdit->text(); + TQString match = m_editWidget->matchLineEdit->text(); + TQString subst = m_editWidget->substLineEdit->text(); delete m_editDlg; m_editDlg = 0; m_editWidget = 0; - if (dlgResult != QDialog::Accepted) return; + if (dlgResult != TQDialog::Accepted) return; // TODO: Also delete hBox and w? if ( match.isEmpty() ) return; if ( isAdd ) @@ -637,7 +637,7 @@ void StringReplacerConf::addOrEditSubstitution(bool isAdd) configChanged(); } -void StringReplacerConf::slotMatchLineEdit_textChanged(const QString& text) +void StringReplacerConf::slotMatchLineEdit_textChanged(const TQString& text) { // Disable OK button if match field blank. if ( !m_editDlg ) return; @@ -646,7 +646,7 @@ void StringReplacerConf::slotMatchLineEdit_textChanged(const QString& text) void StringReplacerConf::slotRemoveButton_clicked() { - QListViewItem* item = m_widget->substLView->selectedItem(); + TQListViewItem* item = m_widget->substLView->selectedItem(); if (!item) return; delete item; enableDisableButtons(); @@ -666,8 +666,8 @@ void StringReplacerConf::slotMatchButton_clicked() if ( !m_editWidget ) return; if ( !m_editDlg ) return; if ( !m_reEditorInstalled ) return; - QDialog *editorDialog = - KParts::ComponentFactory::createInstanceFromQuery( "KRegExpEditor/KRegExpEditor" ); + TQDialog *editorDialog = + KParts::ComponentFactory::createInstanceFromQuery( "KRegExpEditor/KRegExpEditor" ); if ( editorDialog ) { // kdeutils was installed, so the dialog was found. Fetch the editor interface. @@ -676,9 +676,9 @@ void StringReplacerConf::slotMatchButton_clicked() Q_ASSERT( reEditor ); // This should not fail!// now use the editor. reEditor->setRegExp( m_editWidget->matchLineEdit->text() ); int dlgResult = editorDialog->exec(); - if ( dlgResult == QDialog::Accepted ) + if ( dlgResult == TQDialog::Accepted ) { - QString re = reEditor->regExp(); + TQString re = reEditor->regExp(); m_editWidget->matchLineEdit->setText( re ); m_editDlg->enableButton( KDialogBase::Ok, !re.isEmpty() ); } @@ -688,15 +688,15 @@ void StringReplacerConf::slotMatchButton_clicked() void StringReplacerConf::slotLoadButton_clicked() { - // QString dataDir = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/stringreplacer/"; - QString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/stringreplacer/").last(); - QString filename = KFileDialog::getOpenFileName( + // TQString dataDir = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/stringreplacer/"; + TQString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/stringreplacer/").last(); + TQString filename = KFileDialog::getOpenFileName( dataDir, "*.xml|String Replacer Word List (*.xml)", m_widget, "stringreplacer_loadfile"); if ( filename.isEmpty() ) return; - QString errMsg = loadFromFile( filename, false ); + TQString errMsg = loadFromFile( filename, false ); enableDisableButtons(); if ( !errMsg.isEmpty() ) KMessageBox::sorry( m_widget, errMsg, i18n("Error Opening File") ); @@ -706,13 +706,13 @@ void StringReplacerConf::slotLoadButton_clicked() void StringReplacerConf::slotSaveButton_clicked() { - QString filename = KFileDialog::getSaveFileName( + TQString filename = KFileDialog::getSaveFileName( KGlobal::dirs()->saveLocation( "data" ,"kttsd/stringreplacer/", false ), "*.xml|String Replacer Word List (*.xml)", m_widget, "stringreplacer_savefile"); if ( filename.isEmpty() ) return; - QString errMsg = saveToFile( filename ); + TQString errMsg = saveToFile( filename ); enableDisableButtons(); if ( !errMsg.isEmpty() ) KMessageBox::sorry( m_widget, errMsg, i18n("Error Opening File") ); diff --git a/kttsd/filters/stringreplacer/stringreplacerconf.h b/kttsd/filters/stringreplacer/stringreplacerconf.h index f0312a6..1606390 100644 --- a/kttsd/filters/stringreplacer/stringreplacerconf.h +++ b/kttsd/filters/stringreplacer/stringreplacerconf.h @@ -25,7 +25,7 @@ #define _STRINGREPLACERCONF_H_ // Qt includes. -#include +#include // KDE includes. #include @@ -48,7 +48,7 @@ class StringReplacerConf : public KttsFilterConf /** * Constructor */ - StringReplacerConf( QWidget *parent, const char *name, const QStringList &args = QStringList() ); + StringReplacerConf( TQWidget *parent, const char *name, const TQStringList &args = TQStringList() ); /** * Destructor @@ -78,7 +78,7 @@ class StringReplacerConf : public KttsFilterConf * any instance-specific parameters to load, but it may still wish * to load parameters that apply to all instances of the plugin. */ - virtual void load(KConfig *config, const QString &configGroup); + virtual void load(KConfig *config, const TQString &configGroup); /** * This function gets called when the user wants to save the settings in @@ -90,7 +90,7 @@ class StringReplacerConf : public KttsFilterConf * @param configGroup Call config->setGroup with this argument before * saving your configuration. */ - virtual void save(KConfig *config, const QString &configGroup); + virtual void save(KConfig *config, const TQString &configGroup); /** * This function is called to set the settings in the module to sensible @@ -116,7 +116,7 @@ class StringReplacerConf : public KttsFilterConf * return an empty string. * @return Filter instance name. */ - virtual QString userPlugInName(); + virtual TQString userPlugInName(); private slots: void slotLanguageBrowseButton_clicked(); @@ -125,7 +125,7 @@ class StringReplacerConf : public KttsFilterConf void slotDownButton_clicked(); void slotEditButton_clicked(); void slotRemoveButton_clicked(); - void slotMatchLineEdit_textChanged(const QString& text); + void slotMatchLineEdit_textChanged(const TQString& text); void slotTypeButtonGroup_clicked(); void slotMatchButton_clicked(); void slotLoadButton_clicked(); @@ -139,9 +139,9 @@ class StringReplacerConf : public KttsFilterConf // Displays the add/edit string replacement dialog. void addOrEditSubstitution(bool isAdd); // Loads word list and settings from a file. Clearing configuration if clear is True. - QString loadFromFile( const QString& filename, bool clear); + TQString loadFromFile( const TQString& filename, bool clear); // Saves word list and settings to a file. - QString saveToFile( const QString& filename ); + TQString saveToFile( const TQString& filename ); // Configuration Widget. @@ -152,7 +152,7 @@ class StringReplacerConf : public KttsFilterConf // True if kdeutils Regular Expression Editor is installed. bool m_reEditorInstalled; // Language Codes. - QStringList m_languageCodeList; + TQStringList m_languageCodeList; }; #endif //_STRINGREPLACERCONF_H_ diff --git a/kttsd/filters/stringreplacer/stringreplacerproc.cpp b/kttsd/filters/stringreplacer/stringreplacerproc.cpp index 1b03810..8987d79 100644 --- a/kttsd/filters/stringreplacer/stringreplacerproc.cpp +++ b/kttsd/filters/stringreplacer/stringreplacerproc.cpp @@ -22,9 +22,9 @@ ******************************************************************************/ // Qt includes. -#include -#include -#include +#include +#include +#include // KDE includes. #include @@ -44,7 +44,7 @@ /** * Constructor. */ -StringReplacerProc::StringReplacerProc( QObject *parent, const char *name, const QStringList& ) : +StringReplacerProc::StringReplacerProc( TQObject *parent, const char *name, const TQStringList& ) : KttsFilterProc(parent, name) { } @@ -68,9 +68,9 @@ StringReplacerProc::StringReplacerProc( QObject *parent, const char *name, const * Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain * separate configuration files of their own. */ -bool StringReplacerProc::init(KConfig* config, const QString& configGroup){ +bool StringReplacerProc::init(KConfig* config, const TQString& configGroup){ // kdDebug() << "StringReplacerProc::init: Running" << endl; - QString wordsFilename = + TQString wordsFilename = KGlobal::dirs()->saveLocation( "data" ,"kttsd/stringreplacer/", false ); if ( wordsFilename.isEmpty() ) return false; wordsFilename += configGroup; @@ -78,10 +78,10 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){ wordsFilename = config->readEntry( "WordListFile", wordsFilename ); // Open existing word list. - QFile file( wordsFilename ); + TQFile file( wordsFilename ); if ( !file.open( IO_ReadOnly ) ) return false; - QDomDocument doc( "" ); + TQDomDocument doc( "" ); if ( !doc.setContent( &file ) ) { file.close(); return false; @@ -94,54 +94,54 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){ m_substList.clear(); // Name setting. - // QDomNodeList nameList = doc.elementsByTagName( "name" ); - // QDomNode nameNode = nameList.item( 0 ); + // TQDomNodeList nameList = doc.elementsByTagName( "name" ); + // TQDomNode nameNode = nameList.item( 0 ); // m_widget->nameLineEdit->setText( nameNode.toElement().text() ); // Language Codes setting. List may be single element of comma-separated values, // or multiple elements. m_languageCodeList.clear(); - QDomNodeList languageList = doc.elementsByTagName( "language-code" ); + TQDomNodeList languageList = doc.elementsByTagName( "language-code" ); for ( uint ndx=0; ndx < languageList.count(); ++ndx ) { - QDomNode languageNode = languageList.item( ndx ); - m_languageCodeList += QStringList::split(',', languageNode.toElement().text(), false); + TQDomNode languageNode = languageList.item( ndx ); + m_languageCodeList += TQStringList::split(',', languageNode.toElement().text(), false); } // AppId. Apply this filter only if DCOP appId of application that queued // the text contains this string. List may be single element of comma-separated values, // or multiple elements. m_appIdList.clear(); - QDomNodeList appIdList = doc.elementsByTagName( "appid" ); + TQDomNodeList appIdList = doc.elementsByTagName( "appid" ); for ( uint ndx=0; ndx < appIdList.count(); ++ndx ) { - QDomNode appIdNode = appIdList.item( ndx ); - m_appIdList += QStringList::split(',', appIdNode.toElement().text(), false); + TQDomNode appIdNode = appIdList.item( ndx ); + m_appIdList += TQStringList::split(',', appIdNode.toElement().text(), false); } // Word list. - QDomNodeList wordList = doc.elementsByTagName("word"); + TQDomNodeList wordList = doc.elementsByTagName("word"); const int wordListCount = wordList.count(); for (int wordIndex = 0; wordIndex < wordListCount; ++wordIndex) { - QDomNode wordNode = wordList.item(wordIndex); - QDomNodeList propList = wordNode.childNodes(); - QString wordType; - QString matchCase = "No"; // Default for old (v<=3.5.3) config files with no . - QString match; - QString subst; + TQDomNode wordNode = wordList.item(wordIndex); + TQDomNodeList propList = wordNode.childNodes(); + TQString wordType; + TQString matchCase = "No"; // Default for old (v<=3.5.3) config files with no . + TQString match; + TQString subst; const int propListCount = propList.count(); for (int propIndex = 0; propIndex < propListCount; ++propIndex) { - QDomNode propNode = propList.item(propIndex); - QDomElement prop = propNode.toElement(); + TQDomNode propNode = propList.item(propIndex); + TQDomElement prop = propNode.toElement(); if (prop.tagName() == "type") wordType = prop.text(); if (prop.tagName() == "case") matchCase = prop.text(); if (prop.tagName() == "match") match = prop.text(); if (prop.tagName() == "subst") subst = prop.text(); } // Build Regular Expression for each word's match string. - QRegExp rx; + TQRegExp rx; rx.setCaseSensitive(matchCase == "Yes"); if ( wordType == "Word" ) { @@ -171,13 +171,13 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){ * @param appId The DCOP appId of the application that queued the text. * Also useful for hints about how to do the filtering. */ -/*virtual*/ QString StringReplacerProc::convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId) +/*virtual*/ TQString StringReplacerProc::convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId) { m_wasModified = false; // If language doesn't match, return input unmolested. if ( !m_languageCodeList.isEmpty() ) { - QString languageCode = talkerCode->languageCode(); + TQString languageCode = talkerCode->languageCode(); // kdDebug() << "StringReplacerProc::convert: converting " << inputText << // " if language code " << languageCode << " matches " << m_languageCodeList << endl; if ( !m_languageCodeList.contains( languageCode ) ) @@ -197,7 +197,7 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){ // kdDebug() << "StringReplacerProc::convert: converting " << inputText << " if appId " // << appId << " matches " << m_appIdList << endl; bool found = false; - QString appIdStr = appId; + TQString appIdStr = appId; for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx ) { if ( appIdStr.contains(m_appIdList[ndx]) ) @@ -212,7 +212,7 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){ return inputText; } } - QString newText = inputText; + TQString newText = inputText; const int listCount = m_matchList.count(); for ( int index = 0; index < listCount; ++index ) { diff --git a/kttsd/filters/stringreplacer/stringreplacerproc.h b/kttsd/filters/stringreplacer/stringreplacerproc.h index 114ebaf..b679113 100644 --- a/kttsd/filters/stringreplacer/stringreplacerproc.h +++ b/kttsd/filters/stringreplacer/stringreplacerproc.h @@ -26,11 +26,11 @@ #define _STRINGREPLACERPROC_H_ // Qt includes. -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // KTTS includes. #include "filterproc.h" @@ -43,7 +43,7 @@ public: /** * Constructor. */ - StringReplacerProc( QObject *parent, const char *name, const QStringList &args = QStringList() ); + StringReplacerProc( TQObject *parent, const char *name, const TQStringList &args = TQStringList() ); /** * Destructor. @@ -59,7 +59,7 @@ public: * Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain * separate configuration files of their own. */ - virtual bool init(KConfig *config, const QString &configGroup); + virtual bool init(KConfig *config, const TQString &configGroup); /** * Convert input, returning output. @@ -70,7 +70,7 @@ public: * @param appId The DCOP appId of the application that queued the text. * Also useful for hints about how to do the filtering. */ - virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId); + virtual TQString convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId); /** * Did this filter do anything? If the filter returns the input as output @@ -80,16 +80,16 @@ public: private: // Language codes supported by the filter. - QStringList m_languageCodeList; + TQStringList m_languageCodeList; // If not empty, apply filter only to apps containing one or more of these strings. - QStringList m_appIdList; + TQStringList m_appIdList; // List of regular expressions to match. - QValueList m_matchList; + TQValueList m_matchList; // List of match case flag - QValueList m_caseList; + TQValueList m_caseList; // List of substitutions to replace matches. - QValueList m_substList; + TQValueList m_substList; // True if this filter did anything to the text. bool m_wasModified; }; diff --git a/kttsd/filters/talkerchooser/talkerchooserconf.cpp b/kttsd/filters/talkerchooser/talkerchooserconf.cpp index 0dbf53f..cc811a3 100644 --- a/kttsd/filters/talkerchooser/talkerchooserconf.cpp +++ b/kttsd/filters/talkerchooser/talkerchooserconf.cpp @@ -22,9 +22,9 @@ ******************************************************************************/ // Qt includes. -#include -#include -#include +#include +#include +#include // KDE includes. #include @@ -49,13 +49,13 @@ /** * Constructor */ -TalkerChooserConf::TalkerChooserConf( QWidget *parent, const char *name, const QStringList& /*args*/) : +TalkerChooserConf::TalkerChooserConf( TQWidget *parent, const char *name, const TQStringList& /*args*/) : KttsFilterConf(parent, name) { // kdDebug() << "TalkerChooserConf::TalkerChooserConf: Running" << endl; // Create configuration widget. - QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "TalkerChooserConfigWidgetLayout"); layout->setAlignment (Qt::AlignTop); m_widget = new TalkerChooserConfWidget(this, "TalkerChooserConfigWidget"); @@ -65,23 +65,23 @@ TalkerChooserConf::TalkerChooserConf( QWidget *parent, const char *name, const Q m_reEditorInstalled = !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty(); m_widget->reEditorButton->setEnabled(m_reEditorInstalled); - connect(m_widget->nameLineEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(configChanged())); - connect(m_widget->reLineEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(configChanged())); - connect(m_widget->reEditorButton, SIGNAL(clicked()), - this, SLOT(slotReEditorButton_clicked())); - connect(m_widget->appIdLineEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(configChanged())); - connect(m_widget->talkerButton, SIGNAL(clicked()), - this, SLOT(slotTalkerButton_clicked())); + connect(m_widget->nameLineEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(configChanged())); + connect(m_widget->reLineEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(configChanged())); + connect(m_widget->reEditorButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotReEditorButton_clicked())); + connect(m_widget->appIdLineEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(configChanged())); + connect(m_widget->talkerButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotTalkerButton_clicked())); - connect(m_widget->loadButton, SIGNAL(clicked()), - this, SLOT(slotLoadButton_clicked())); - connect(m_widget->saveButton, SIGNAL(clicked()), - this, SLOT(slotSaveButton_clicked())); - connect(m_widget->clearButton, SIGNAL(clicked()), - this, SLOT(slotClearButton_clicked())); + connect(m_widget->loadButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotLoadButton_clicked())); + connect(m_widget->saveButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSaveButton_clicked())); + connect(m_widget->clearButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotClearButton_clicked())); // Set up defaults. defaults(); @@ -107,7 +107,7 @@ TalkerChooserConf::~TalkerChooserConf(){ * @param configGroup Call config->setGroup with this argument before * loading your configuration. */ -void TalkerChooserConf::load(KConfig* config, const QString& configGroup){ +void TalkerChooserConf::load(KConfig* config, const TQString& configGroup){ // kdDebug() << "TalkerChooserConf::load: Running" << endl; config->setGroup( configGroup ); m_widget->nameLineEdit->setText( config->readEntry( "UserFilterName", m_widget->nameLineEdit->text() ) ); @@ -118,7 +118,7 @@ void TalkerChooserConf::load(KConfig* config, const QString& configGroup){ m_talkerCode = TalkerCode(config->readEntry("TalkerCode"), false); // Legacy settings. - QString s = config->readEntry( "LanguageCode" ); + TQString s = config->readEntry( "LanguageCode" ); if (!s.isEmpty()) m_talkerCode.setFullLanguageCode(s); s = config->readEntry( "SynthInName" ); if (!s.isEmpty()) m_talkerCode.setPlugInName(s); @@ -142,7 +142,7 @@ void TalkerChooserConf::load(KConfig* config, const QString& configGroup){ * @param configGroup Call config->setGroup with this argument before * saving your configuration. */ -void TalkerChooserConf::save(KConfig* config, const QString& configGroup){ +void TalkerChooserConf::save(KConfig* config, const TQString& configGroup){ // kdDebug() << "TalkerChooserConf::save: Running" << endl; config->setGroup( configGroup ); config->writeEntry( "UserFilterName", m_widget->nameLineEdit->text() ); @@ -167,7 +167,7 @@ void TalkerChooserConf::defaults(){ // Default App ID is blank. m_widget->appIdLineEdit->setText( "" ); // Default to using default Talker. - m_talkerCode = TalkerCode( QString::null, false ); + m_talkerCode = TalkerCode( TQString::null, false ); m_widget->talkerLineEdit->setText( m_talkerCode.getTranslatedDescription() ); } @@ -186,13 +186,13 @@ bool TalkerChooserConf::supportsMultiInstance() { return true; } * return an empty string. * @return Filter instance name. */ -QString TalkerChooserConf::userPlugInName() +TQString TalkerChooserConf::userPlugInName() { - if (m_widget->talkerLineEdit->text().isEmpty()) return QString::null; + if (m_widget->talkerLineEdit->text().isEmpty()) return TQString::null; if (m_widget->appIdLineEdit->text().isEmpty() && - m_widget->reLineEdit->text().isEmpty()) return QString::null; - QString instName = m_widget->nameLineEdit->text(); - if (instName.isEmpty()) return QString::null; + m_widget->reLineEdit->text().isEmpty()) return TQString::null; + TQString instName = m_widget->nameLineEdit->text(); + if (instName.isEmpty()) return TQString::null; return instName; } @@ -200,8 +200,8 @@ void TalkerChooserConf::slotReEditorButton_clicked() { // Show Regular Expression Editor dialog if it is installed. if ( !m_reEditorInstalled ) return; - QDialog *editorDialog = - KParts::ComponentFactory::createInstanceFromQuery( "KRegExpEditor/KRegExpEditor" ); + TQDialog *editorDialog = + KParts::ComponentFactory::createInstanceFromQuery( "KRegExpEditor/KRegExpEditor" ); if ( editorDialog ) { // kdeutils was installed, so the dialog was found. Fetch the editor interface. @@ -210,9 +210,9 @@ void TalkerChooserConf::slotReEditorButton_clicked() Q_ASSERT( reEditor ); // This should not fail!// now use the editor. reEditor->setRegExp( m_widget->reLineEdit->text() ); int dlgResult = editorDialog->exec(); - if ( dlgResult == QDialog::Accepted ) + if ( dlgResult == TQDialog::Accepted ) { - QString re = reEditor->regExp(); + TQString re = reEditor->regExp(); m_widget->reLineEdit->setText( re ); } delete editorDialog; @@ -221,7 +221,7 @@ void TalkerChooserConf::slotReEditorButton_clicked() void TalkerChooserConf::slotTalkerButton_clicked() { - QString talkerCode = m_talkerCode.getTalkerCode(); + TQString talkerCode = m_talkerCode.getTalkerCode(); SelectTalkerDlg dlg( m_widget, "selecttalkerdialog", i18n("Select Talker"), talkerCode, true ); int dlgResult = dlg.exec(); if ( dlgResult != KDialogBase::Accepted ) return; @@ -232,8 +232,8 @@ void TalkerChooserConf::slotTalkerButton_clicked() void TalkerChooserConf::slotLoadButton_clicked() { - QString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/talkerchooser/").last(); - QString filename = KFileDialog::getOpenFileName( + TQString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/talkerchooser/").last(); + TQString filename = KFileDialog::getOpenFileName( dataDir, "*rc|Talker Chooser Config (*rc)", m_widget, @@ -247,7 +247,7 @@ void TalkerChooserConf::slotLoadButton_clicked() void TalkerChooserConf::slotSaveButton_clicked() { - QString filename = KFileDialog::getSaveFileName( + TQString filename = KFileDialog::getSaveFileName( KGlobal::dirs()->saveLocation( "data" ,"kttsd/talkerchooser/", false ), "*rc|Talker Chooser Config (*rc)", m_widget, @@ -260,10 +260,10 @@ void TalkerChooserConf::slotSaveButton_clicked() void TalkerChooserConf::slotClearButton_clicked() { - m_widget->nameLineEdit->setText( QString::null ); - m_widget->reLineEdit->setText( QString::null ); - m_widget->appIdLineEdit->setText( QString::null ); - m_talkerCode = TalkerCode( QString::null, false ); + m_widget->nameLineEdit->setText( TQString::null ); + m_widget->reLineEdit->setText( TQString::null ); + m_widget->appIdLineEdit->setText( TQString::null ); + m_talkerCode = TalkerCode( TQString::null, false ); m_widget->talkerLineEdit->setText( m_talkerCode.getTranslatedDescription() ); configChanged(); } diff --git a/kttsd/filters/talkerchooser/talkerchooserconf.h b/kttsd/filters/talkerchooser/talkerchooserconf.h index d6b3959..38a6c49 100644 --- a/kttsd/filters/talkerchooser/talkerchooserconf.h +++ b/kttsd/filters/talkerchooser/talkerchooserconf.h @@ -25,7 +25,7 @@ #define _TALKERCHOOSERCONF_H_ // Qt includes. -#include +#include // KDE includes. #include @@ -50,7 +50,7 @@ class TalkerChooserConf : public KttsFilterConf /** * Constructor */ - TalkerChooserConf( QWidget *parent, const char *name, const QStringList &args = QStringList() ); + TalkerChooserConf( TQWidget *parent, const char *name, const TQStringList &args = TQStringList() ); /** * Destructor @@ -75,7 +75,7 @@ class TalkerChooserConf : public KttsFilterConf * any instance-specific parameters to load, but it may still wish * to load parameters that apply to all instances of the plugin. */ - virtual void load(KConfig *config, const QString &configGroup); + virtual void load(KConfig *config, const TQString &configGroup); /** * This function gets called when the user wants to save the settings in @@ -87,7 +87,7 @@ class TalkerChooserConf : public KttsFilterConf * @param configGroup Call config->setGroup with this argument before * saving your configuration. */ - virtual void save(KConfig *config, const QString &configGroup); + virtual void save(KConfig *config, const TQString &configGroup); /** * This function is called to set the settings in the module to sensible @@ -113,7 +113,7 @@ class TalkerChooserConf : public KttsFilterConf * return an empty string. * @return Filter instance name. */ - virtual QString userPlugInName(); + virtual TQString userPlugInName(); private slots: void slotReEditorButton_clicked(); diff --git a/kttsd/filters/talkerchooser/talkerchooserproc.cpp b/kttsd/filters/talkerchooser/talkerchooserproc.cpp index 628b68a..5758df2 100644 --- a/kttsd/filters/talkerchooser/talkerchooserproc.cpp +++ b/kttsd/filters/talkerchooser/talkerchooserproc.cpp @@ -22,7 +22,7 @@ ******************************************************************************/ // Qt includes. -#include +#include // KDE includes. #include @@ -38,7 +38,7 @@ /** * Constructor. */ -TalkerChooserProc::TalkerChooserProc( QObject *parent, const char *name, const QStringList& /*args*/ ) : +TalkerChooserProc::TalkerChooserProc( TQObject *parent, const char *name, const TQStringList& /*args*/ ) : KttsFilterProc(parent, name) { // kdDebug() << "TalkerChooserProc::TalkerChooserProc: Running" << endl; @@ -61,14 +61,14 @@ TalkerChooserProc::~TalkerChooserProc() * Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain * separate configuration files of their own. */ -bool TalkerChooserProc::init(KConfig* config, const QString& configGroup){ +bool TalkerChooserProc::init(KConfig* config, const TQString& configGroup){ // kdDebug() << "PlugInProc::init: Running" << endl; config->setGroup( configGroup ); m_re = config->readEntry( "MatchRegExp" ); m_appIdList = config->readListEntry( "AppIDs" ); m_chosenTalkerCode = TalkerCode(config->readEntry("TalkerCode"), false); // Legacy settings. - QString s = config->readEntry( "LanguageCode" ); + TQString s = config->readEntry( "LanguageCode" ); if (!s.isEmpty()) m_chosenTalkerCode.setFullLanguageCode(s); s = config->readEntry( "SynthInName" ); if (!s.isEmpty()) m_chosenTalkerCode.setPlugInName(s); @@ -102,12 +102,12 @@ bool TalkerChooserProc::init(KConfig* config, const QString& configGroup){ * @param appId The DCOP appId of the application that queued the text. * Also useful for hints about how to do the filtering. */ -/*virtual*/ QString TalkerChooserProc::convert(const QString& inputText, TalkerCode* talkerCode, - const QCString& appId) +/*virtual*/ TQString TalkerChooserProc::convert(const TQString& inputText, TalkerCode* talkerCode, + const TQCString& appId) { if ( !m_re.isEmpty() ) { - int pos = inputText.find( QRegExp(m_re) ); + int pos = inputText.find( TQRegExp(m_re) ); if ( pos < 0 ) return inputText; } // If appId doesn't match, return input unmolested. @@ -116,7 +116,7 @@ bool TalkerChooserProc::init(KConfig* config, const QString& configGroup){ // kdDebug() << "TalkerChooserProc::convert: converting " << inputText << " if appId " // << appId << " matches " << m_appIdList << endl; bool found = false; - QString appIdStr = appId; + TQString appIdStr = appId; for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx ) { if ( appIdStr.contains(m_appIdList[ndx]) ) diff --git a/kttsd/filters/talkerchooser/talkerchooserproc.h b/kttsd/filters/talkerchooser/talkerchooserproc.h index 07cde68..8c9ab01 100644 --- a/kttsd/filters/talkerchooser/talkerchooserproc.h +++ b/kttsd/filters/talkerchooser/talkerchooserproc.h @@ -36,7 +36,7 @@ public: /** * Constructor. */ - TalkerChooserProc( QObject *parent, const char *name, const QStringList &args = QStringList() ); + TalkerChooserProc( TQObject *parent, const char *name, const TQStringList &args = TQStringList() ); /** * Destructor. @@ -52,7 +52,7 @@ public: * Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain * separate configuration files of their own. */ - virtual bool init(KConfig *config, const QString &configGroup); + virtual bool init(KConfig *config, const TQString &configGroup); /** * Returns True if the plugin supports asynchronous processing, @@ -75,12 +75,12 @@ public: * @param appId The DCOP appId of the application that queued the text. * Also useful for hints about how to do the filtering. */ - virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId); + virtual TQString convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId); private: - QString m_re; - QStringList m_appIdList; + TQString m_re; + TQStringList m_appIdList; TalkerCode m_chosenTalkerCode; }; diff --git a/kttsd/filters/xhtml2ssml/main.cpp b/kttsd/filters/xhtml2ssml/main.cpp index 822d068..01655ad 100644 --- a/kttsd/filters/xhtml2ssml/main.cpp +++ b/kttsd/filters/xhtml2ssml/main.cpp @@ -1,17 +1,17 @@ -#include -#include -#include -#include +#include +#include +#include +#include #include #include "xhtml2ssml.h" #include "xmlelement.h" int main(int argc, char *argv[]) { - QApplication a(argc, argv); - QFile f("demonstration.html"); - QXmlInputSource input(&f); - QXmlSimpleReader reader; + TQApplication a(argc, argv); + TQFile f("demonstration.html"); + TQXmlInputSource input(&f); + TQXmlSimpleReader reader; XHTMLToSSMLParser *parser = new XHTMLToSSMLParser(); reader.setContentHandler(parser); reader.parse(input); diff --git a/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp b/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp index 7c77b9e..5649cc9 100644 --- a/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp +++ b/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp @@ -19,10 +19,10 @@ * * ***************************************************************************/ -#include -#include -#include -#include +#include +#include +#include +#include #include #include "xmlelement.h" @@ -32,13 +32,13 @@ /// Document parsing begin. Init stuff here. bool XHTMLToSSMLParser::startDocument() { /// Read the file which maps xhtml tags -> ssml tags. Look at the file for more information. - QFile file("tagmappingrc"); + TQFile file("tagmappingrc"); if(!file.open(IO_ReadOnly)) { std::cerr << "Could not read config file 'tagmappingrc'. Please check that it exists and is readable.\n"; // Kill further parsing return false; } - QTextStream stream(&file); + TQTextStream stream(&file); // File parsing. bool linestatus = true; while(!stream.atEnd()) { @@ -51,37 +51,37 @@ bool XHTMLToSSMLParser::startDocument() { return true; } -bool XHTMLToSSMLParser::startElement(const QString &, const QString &, const QString &qName, const QXmlAttributes &atts) { - QString attributes = ""; +bool XHTMLToSSMLParser::startElement(const TQString &, const TQString &, const TQString &qName, const TQXmlAttributes &atts) { + TQString attributes = ""; if(atts.length() > 0) { const int attsLength = atts.lenght(); for(int i = 0; i < attsLength; ++i) attributes += " " + atts.qName(i) + "=\"" + atts.value(i) + "\""; } - QString fromelement = qName + attributes; + TQString fromelement = qName + attributes; // If this element is one of the keys that was specified in the configuration file, get what it should be converted to and // append to the output string. - QString toelement = m_xhtml2ssml[fromelement]; + TQString toelement = m_xhtml2ssml[fromelement]; if(toelement) m_output.append(XMLElement::fromQString(toelement).startTag()); return true; } -bool XHTMLToSSMLParser::endElement(const QString &, const QString &, const QString &qName) { - QString fromelement = qName; - QString toelement = m_xhtml2ssml[fromelement]; +bool XHTMLToSSMLParser::endElement(const TQString &, const TQString &, const TQString &qName) { + TQString fromelement = qName; + TQString toelement = m_xhtml2ssml[fromelement]; if(toelement) m_output.append(XMLElement::fromQString(toelement).endTag()); return true; } -bool XHTMLToSSMLParser::characters(const QString &characters) { +bool XHTMLToSSMLParser::characters(const TQString &characters) { m_output.append(characters); return true; } -QString XHTMLToSSMLParser::convertedText() { +TQString XHTMLToSSMLParser::convertedText() { return m_output.simplifyWhiteSpace(); } @@ -89,7 +89,7 @@ QString XHTMLToSSMLParser::convertedText() { /// It makes entries in the m_xhtml2ssml map accordingly. /// @param line A line from a file to parse /// @returns true if the syntax of the line was okay and the parsing succeeded - false otherwise. -bool XHTMLToSSMLParser::readFileConfigEntry(const QString &line) { +bool XHTMLToSSMLParser::readFileConfigEntry(const TQString &line) { // comments if(line.stripWhiteSpace().startsWith("#")) { return true; @@ -97,7 +97,7 @@ bool XHTMLToSSMLParser::readFileConfigEntry(const QString &line) { // break into QStringList // the second parameter to split is the string, with all space simplified and all space around the : removed, i.e // "something : somethingelse" -> "something:somethingelse" - QStringList keyvalue = QStringList::split(":", line.simplifyWhiteSpace().replace(" :", ":").replace(": ", ":")); + TQStringList keyvalue = TQStringList::split(":", line.simplifyWhiteSpace().replace(" :", ":").replace(": ", ":")); if(keyvalue.count() != 2) return false; m_xhtml2ssml[keyvalue[0]] = keyvalue[1]; diff --git a/kttsd/filters/xhtml2ssml/xhtml2ssml.h b/kttsd/filters/xhtml2ssml/xhtml2ssml.h index 7271dc0..2e45dee 100644 --- a/kttsd/filters/xhtml2ssml/xhtml2ssml.h +++ b/kttsd/filters/xhtml2ssml/xhtml2ssml.h @@ -22,40 +22,40 @@ #ifndef _XHTML2SSML_H_ #define _XHTML2SSML_H_ -#include -#include +#include +#include -typedef QMap QStringMap; +typedef TQMap QStringMap; class QString; -class XHTMLToSSMLParser : public QXmlDefaultHandler { +class XHTMLToSSMLParser : public TQXmlDefaultHandler { public: /// No need to reimplement constructor.. /// The document parsing starts bool startDocument(); /// start of an element encountered () - bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts); + bool startElement(const TQString &namespaceURI, const TQString &localName, const TQString &qName, const TQXmlAttributes &atts); /// end of an element encountered () - bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName); + bool endElement(const TQString &namespaceURI, const TQString &localName, const TQString &qName); /// text encountered (blah bah blah) - bool characters(const QString &); + bool characters(const TQString &); /// Get the output text that was generated during the parsing. /// @returns The converted text. - QString convertedText(); + TQString convertedText(); /// Parse a line from the configuration file which maps xhtml : ssml equivalent. /// It makes entries in the m_xhtml2ssml map accordingly. /// @param line A line from a file to parse /// @returns true if the syntax of the line was okay and the parsing succeeded - false otherwise. - bool readFileConfigEntry(const QString &line); + bool readFileConfigEntry(const TQString &line); private: /// Dict of xhtml tags -> ssml tags QStringMap m_xhtml2ssml; /// The output of the conversion - QString m_output; + TQString m_output; }; #endif diff --git a/kttsd/filters/xhtml2ssml/xmlelement.cpp b/kttsd/filters/xhtml2ssml/xmlelement.cpp index 53fa4f6..920fd57 100644 --- a/kttsd/filters/xhtml2ssml/xmlelement.cpp +++ b/kttsd/filters/xhtml2ssml/xmlelement.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ #include "xmlelement.h" -#include +#include #include /// Constructors @@ -27,7 +27,7 @@ XMLElement::XMLElement() { m_name = ""; m_attrmapper = AttributeToValueMap(); } -XMLElement::XMLElement(const QString &name) { +XMLElement::XMLElement(const TQString &name) { m_name = name; m_attrmapper = AttributeToValueMap(); } @@ -49,11 +49,11 @@ XMLElement XMLElement::operator=(const XMLElement &element) { return *this; } -QString XMLElement::name() { +TQString XMLElement::name() { return m_name; } -QString XMLElement::startTag() { - QString output = "<" + m_name + " "; +TQString XMLElement::startTag() { + TQString output = "<" + m_name + " "; for(AttributeToValueMap::Iterator it = m_attrmapper.begin(); it != m_attrmapper.end(); ++it) { output.append(it.key() + "=\"" + it.data() + "\" "); } @@ -63,25 +63,25 @@ QString XMLElement::startTag() { return output; } -QString XMLElement::endTag() { +TQString XMLElement::endTag() { return ""; } -void XMLElement::setAttribute(const QString &attr, const QString &value) { +void XMLElement::setAttribute(const TQString &attr, const TQString &value) { m_attrmapper[attr] = value; } -QString XMLElement::attribute(const QString &attr) { +TQString XMLElement::attribute(const TQString &attr) { return m_attrmapper[attr]; } -QString XMLElement::toQString() { - QString tag = startTag(); +TQString XMLElement::toQString() { + TQString tag = startTag(); return tag.left(tag.length() - 1).right(tag.length() - 2); } -XMLElement XMLElement::fromQString(const QString &str) { - QStringList sections = QStringList::split(" ", str); - QString tagname = sections[0]; +XMLElement XMLElement::fromQString(const TQString &str) { + TQStringList sections = TQStringList::split(" ", str); + TQString tagname = sections[0]; XMLElement e(tagname.latin1()); sections.pop_front(); @@ -89,7 +89,7 @@ XMLElement XMLElement::fromQString(const QString &str) { if(sections.count()) { const int sectionsCount = sections.count(); for(int i = 0; i < sectionsCount; ++i) { - QStringList list = QStringList::split("=", sections[i]); + TQStringList list = TQStringList::split("=", sections[i]); if(list.count() != 2) { std::cerr << "XMLElement::fromQString: Cannot convert list: " << list.join("|") << ". `" << str << "' is not in valid format.\n"; return XMLElement(" "); diff --git a/kttsd/filters/xhtml2ssml/xmlelement.h b/kttsd/filters/xhtml2ssml/xmlelement.h index c78cd6f..f3d8789 100644 --- a/kttsd/filters/xhtml2ssml/xmlelement.h +++ b/kttsd/filters/xhtml2ssml/xmlelement.h @@ -22,16 +22,16 @@ #ifndef XMLELEMENT_H #define XMLELEMENT_H -#include +#include class QString; -typedef QMap AttributeToValueMap; +typedef TQMap AttributeToValueMap; class XMLElement { public: XMLElement(); - XMLElement(const QString &name); + XMLElement(const TQString &name); ~XMLElement(); /// Copy constructor @@ -42,11 +42,11 @@ public: /// Get the name of the tag (the text between the greater than and less than symbols). /// @returns the name of the tag. - QString name(); + TQString name(); /// set the name of the tag. /// @param name the new name of the tag. - void setName(const QString &name); + void setName(const TQString &name); /// Get a textual representation of the starting of the tag with all attributes and their values set out. /// @verbatim @@ -55,35 +55,35 @@ public: /// element.startTag(); <- /// @endverbatim /// @returns A textual representation of the start of the element. - QString startTag(); + TQString startTag(); /// Get a textual representation of the closed tag that XMLElement represents. /// @returns A textual representation of the closed tag represented by the XMLElement. - QString endTag(); + TQString endTag(); /// Create an attribute and set its value. /// @param attr The attribute. /// @param value The value of the attribute. - void setAttribute(const QString &attr, const QString &value); + void setAttribute(const TQString &attr, const TQString &value); /// Get the value of an attribute. /// @param attr The attribute. /// @returns The value of @param attr - QString attribute(const QString &attr); + TQString attribute(const TQString &attr); - /// Convert to a QString. - /// Had issues with QMap and custom classes. For now you can just convert to/from QString and use + /// Convert to a TQString. + /// Had issues with TQMap and custom classes. For now you can just convert to/from TQString and use /// That as the key/value pair. - /// @returns A QString representation of the XMLAttribute. - QString toQString(); + /// @returns A TQString representation of the XMLAttribute. + TQString toQString(); - /// Create an XMLElement from a QString. - /// @param str The QString to convert from. Must be of the following syntax- "foo name=\"bar\"" - static XMLElement fromQString(const QString &str); + /// Create an XMLElement from a TQString. + /// @param str The TQString to convert from. Must be of the following syntax- "foo name=\"bar\"" + static XMLElement fromQString(const TQString &str); private: /// The name of the tag. - QString m_name; + TQString m_name; /// Attribute : value mappings. AttributeToValueMap m_attrmapper; }; diff --git a/kttsd/filters/xmltransformer/xmltransformerconf.cpp b/kttsd/filters/xmltransformer/xmltransformerconf.cpp index 76cfd70..c70c449 100644 --- a/kttsd/filters/xmltransformer/xmltransformerconf.cpp +++ b/kttsd/filters/xmltransformer/xmltransformerconf.cpp @@ -22,8 +22,8 @@ ******************************************************************************/ // Qt includes. -#include -#include +#include +#include // KDE includes. #include @@ -43,13 +43,13 @@ /** * Constructor */ -XmlTransformerConf::XmlTransformerConf( QWidget *parent, const char *name, const QStringList& /*args*/) : +XmlTransformerConf::XmlTransformerConf( TQWidget *parent, const char *name, const TQStringList& /*args*/) : KttsFilterConf(parent, name) { // kdDebug() << "XmlTransformerConf::XmlTransformerConf: Running" << endl; // Create configuration widget. - QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "XmlTransformerConfWidgetLayout"); layout->setAlignment (Qt::AlignTop); m_widget = new XmlTransformerConfWidget(this, "XmlTransformerConfigWidget"); @@ -59,18 +59,18 @@ XmlTransformerConf::XmlTransformerConf( QWidget *parent, const char *name, const defaults(); // Connect signals. - connect( m_widget->nameLineEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(configChanged())); - connect( m_widget->xsltPath, SIGNAL(textChanged(const QString&)), - this, SLOT(configChanged()) ); - connect( m_widget->xsltprocPath, SIGNAL(textChanged(const QString&)), - this, SLOT(configChanged()) ); - connect( m_widget->rootElementLineEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(configChanged()) ); - connect( m_widget->doctypeLineEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(configChanged()) ); - connect( m_widget->appIdLineEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(configChanged()) ); + connect( m_widget->nameLineEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(configChanged())); + connect( m_widget->xsltPath, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(configChanged()) ); + connect( m_widget->xsltprocPath, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(configChanged()) ); + connect( m_widget->rootElementLineEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(configChanged()) ); + connect( m_widget->doctypeLineEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(configChanged()) ); + connect( m_widget->appIdLineEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(configChanged()) ); } /** @@ -93,7 +93,7 @@ XmlTransformerConf::~XmlTransformerConf(){ * @param configGroup Call config->setGroup with this argument before * loading your configuration. */ -void XmlTransformerConf::load(KConfig* config, const QString& configGroup){ +void XmlTransformerConf::load(KConfig* config, const TQString& configGroup){ // kdDebug() << "XmlTransformerConf::load: Running" << endl; config->setGroup( configGroup ); m_widget->nameLineEdit->setText( config->readEntry( "UserFilterName", m_widget->nameLineEdit->text() ) ); @@ -117,7 +117,7 @@ void XmlTransformerConf::load(KConfig* config, const QString& configGroup){ * @param configGroup Call config->setGroup with this argument before * saving your configuration. */ -void XmlTransformerConf::save(KConfig* config, const QString& configGroup){ +void XmlTransformerConf::save(KConfig* config, const TQString& configGroup){ // kdDebug() << "XmlTransformerConf::save: Running" << endl; config->setGroup( configGroup ); config->writeEntry( "UserFilterName", m_widget->nameLineEdit->text() ); @@ -167,16 +167,16 @@ bool XmlTransformerConf::supportsMultiInstance() { return true; } * return an empty string. * @return Filter instance name. */ -QString XmlTransformerConf::userPlugInName() +TQString XmlTransformerConf::userPlugInName() { - QString filePath = realFilePath(m_widget->xsltprocPath->url()); - if (filePath.isEmpty()) return QString::null; - if (getLocation(filePath).isEmpty()) return QString::null; + TQString filePath = realFilePath(m_widget->xsltprocPath->url()); + if (filePath.isEmpty()) return TQString::null; + if (getLocation(filePath).isEmpty()) return TQString::null; filePath = realFilePath(m_widget->xsltPath->url()); - if (filePath.isEmpty()) return QString::null; - if (getLocation(filePath).isEmpty()) return QString::null; - if (!QFileInfo(filePath).isFile()) return QString::null; + if (filePath.isEmpty()) return TQString::null; + if (getLocation(filePath).isEmpty()) return TQString::null; + if (!TQFileInfo(filePath).isFile()) return TQString::null; return m_widget->nameLineEdit->text(); } diff --git a/kttsd/filters/xmltransformer/xmltransformerconf.h b/kttsd/filters/xmltransformer/xmltransformerconf.h index 86df0e2..caec175 100644 --- a/kttsd/filters/xmltransformer/xmltransformerconf.h +++ b/kttsd/filters/xmltransformer/xmltransformerconf.h @@ -25,7 +25,7 @@ #define _XMLTRANSFORMERCONF_H_ // Qt includes. -#include +#include // KDE includes. #include @@ -45,7 +45,7 @@ class XmlTransformerConf : public KttsFilterConf /** * Constructor */ - XmlTransformerConf( QWidget *parent, const char *name, const QStringList &args = QStringList() ); + XmlTransformerConf( TQWidget *parent, const char *name, const TQStringList &args = TQStringList() ); /** * Destructor @@ -70,7 +70,7 @@ class XmlTransformerConf : public KttsFilterConf * any instance-specific parameters to load, but it may still wish * to load parameters that apply to all instances of the plugin. */ - virtual void load(KConfig *config, const QString &configGroup); + virtual void load(KConfig *config, const TQString &configGroup); /** * This function gets called when the user wants to save the settings in @@ -82,7 +82,7 @@ class XmlTransformerConf : public KttsFilterConf * @param configGroup Call config->setGroup with this argument before * saving your configuration. */ - virtual void save(KConfig *config, const QString &configGroup); + virtual void save(KConfig *config, const TQString &configGroup); /** * This function is called to set the settings in the module to sensible @@ -108,7 +108,7 @@ class XmlTransformerConf : public KttsFilterConf * return an empty string. * @return Filter instance name. */ - virtual QString userPlugInName(); + virtual TQString userPlugInName(); private slots: diff --git a/kttsd/filters/xmltransformer/xmltransformerproc.cpp b/kttsd/filters/xmltransformer/xmltransformerproc.cpp index d4aa1c5..b4b9f71 100644 --- a/kttsd/filters/xmltransformer/xmltransformerproc.cpp +++ b/kttsd/filters/xmltransformer/xmltransformerproc.cpp @@ -22,8 +22,8 @@ ******************************************************************************/ // Qt includes. -#include -#include +#include +#include // KDE includes. #include @@ -44,7 +44,7 @@ /** * Constructor. */ -XmlTransformerProc::XmlTransformerProc( QObject *parent, const char *name, const QStringList& ) : +XmlTransformerProc::XmlTransformerProc( TQObject *parent, const char *name, const TQStringList& ) : KttsFilterProc(parent, name) { m_xsltProc = 0; @@ -56,8 +56,8 @@ XmlTransformerProc::XmlTransformerProc( QObject *parent, const char *name, const /*virtual*/ XmlTransformerProc::~XmlTransformerProc() { delete m_xsltProc; - if (!m_inFilename.isEmpty()) QFile::remove(m_inFilename); - if (!m_outFilename.isEmpty()) QFile::remove(m_outFilename); + if (!m_inFilename.isEmpty()) TQFile::remove(m_inFilename); + if (!m_outFilename.isEmpty()) TQFile::remove(m_outFilename); } /** @@ -69,7 +69,7 @@ XmlTransformerProc::XmlTransformerProc( QObject *parent, const char *name, const * Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain * separate configuration files of their own. */ -bool XmlTransformerProc::init(KConfig* config, const QString& configGroup) +bool XmlTransformerProc::init(KConfig* config, const TQString& configGroup) { // kdDebug() << "XmlTransformerProc::init: Running." << endl; config->setGroup( configGroup ); @@ -105,8 +105,8 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup) * @param appId The DCOP appId of the application that queued the text. * Also useful for hints about how to do the filtering. */ -/*virtual*/ QString XmlTransformerProc::convert(const QString& inputText, TalkerCode* talkerCode, - const QCString& appId) +/*virtual*/ TQString XmlTransformerProc::convert(const TQString& inputText, TalkerCode* talkerCode, + const TQCString& appId) { // kdDebug() << "XmlTransformerProc::convert: Running." << endl; // If not properly configured, do nothing. @@ -139,8 +139,8 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup) * program may then call @ref getOutput to retrieve converted text. Calling * program must call @ref ackFinished to acknowledge the conversion. */ -/*virtual*/ bool XmlTransformerProc::asyncConvert(const QString& inputText, TalkerCode* /*talkerCode*/, - const QCString& appId) +/*virtual*/ bool XmlTransformerProc::asyncConvert(const TQString& inputText, TalkerCode* /*talkerCode*/, + const TQCString& appId) { m_wasModified = false; @@ -192,7 +192,7 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup) // If appId doesn't match, return input unmolested. if ( !m_appIdList.isEmpty() ) { - QString appIdStr = appId; + TQString appIdStr = appId; // kdDebug() << "XmlTransformrProc::convert: converting " << inputText << " if appId " // << appId << " matches " << m_appIdList << endl; found = false; @@ -214,7 +214,7 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup) /// Write @param text to a temporary file. KTempFile inFile(locateLocal("tmp", "kttsd-"), ".xml"); m_inFilename = inFile.file()->name(); - QTextStream* wstream = inFile.textStream(); + TQTextStream* wstream = inFile.textStream(); if (wstream == 0) { /// wtf... kdDebug() << "XmlTransformerProc::convert: Can't write to " << m_inFilename << endl;; @@ -226,8 +226,8 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup) // FIXME: Temporary Fix until Konqi returns properly formatted xhtml with & coded as & // This will change & inside a CDATA section, which is not good, and also within comments and // processing instructions, which is OK because we don't speak those anyway. - QString text = inputText; - text.replace(QRegExp("&(?!amp;)"),"&"); + TQString text = inputText; + text.replace(TQRegExp("&(?!amp;)"),"&"); *wstream << text; inFile.close(); #if KDE_VERSION >= KDE_MAKE_VERSION (3,3,0) @@ -250,12 +250,12 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup) // m_xsltProc->args() << endl; m_state = fsFiltering; - connect(m_xsltProc, SIGNAL(processExited(KProcess*)), - this, SLOT(slotProcessExited(KProcess*))); - connect(m_xsltProc, SIGNAL(receivedStdout(KProcess*, char*, int)), - this, SLOT(slotReceivedStdout(KProcess*, char*, int))); - connect(m_xsltProc, SIGNAL(receivedStderr(KProcess*, char*, int)), - this, SLOT(slotReceivedStderr(KProcess*, char*, int))); + connect(m_xsltProc, TQT_SIGNAL(processExited(KProcess*)), + this, TQT_SLOT(slotProcessExited(KProcess*))); + connect(m_xsltProc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), + this, TQT_SLOT(slotReceivedStdout(KProcess*, char*, int))); + connect(m_xsltProc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), + this, TQT_SLOT(slotReceivedStderr(KProcess*, char*, int))); if (!m_xsltProc->start(KProcess::NotifyOnExit, static_cast(KProcess::Stdout | KProcess::Stderr))) { @@ -269,7 +269,7 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup) // Process output when xsltproc exits. void XmlTransformerProc::processOutput() { - QFile::remove(m_inFilename); + TQFile::remove(m_inFilename); int exitStatus = 11; if (m_xsltProc->normalExit()) @@ -284,27 +284,27 @@ void XmlTransformerProc::processOutput() { kdDebug() << "XmlTransformerProc::processOutput: xsltproc abnormal exit. Status = " << exitStatus << endl; m_state = fsFinished; - QFile::remove(m_outFilename); + TQFile::remove(m_outFilename); emit filteringFinished(); return; } /// Read back the data that was written to /tmp/fileName.output. - QFile readfile(m_outFilename); + TQFile readfile(m_outFilename); if(!readfile.open(IO_ReadOnly)) { /// uhh yeah... Issues writing to the output file. kdDebug() << "XmlTransformerProc::processOutput: Could not read file " << m_outFilename << endl; m_state = fsFinished; emit filteringFinished(); } - QTextStream rstream(&readfile); + TQTextStream rstream(&readfile); m_text = rstream.read(); readfile.close(); kdDebug() << "XmlTransformerProc::processOutput: Read file at " + m_inFilename + " and created " + m_outFilename + " based on the stylesheet at " << m_xsltFilePath << endl; // Clean up. - QFile::remove(m_outFilename); + TQFile::remove(m_outFilename); m_state = fsFinished; m_wasModified = true; @@ -338,7 +338,7 @@ void XmlTransformerProc::processOutput() /** * Returns the filtered output. */ -/*virtual*/ QString XmlTransformerProc::getOutput() { return m_text; } +/*virtual*/ TQString XmlTransformerProc::getOutput() { return m_text; } /** * Acknowledges the finished filtering. @@ -346,7 +346,7 @@ void XmlTransformerProc::processOutput() /*virtual*/ void XmlTransformerProc::ackFinished() { m_state = fsIdle; - m_text = QString::null; + m_text = TQString::null; } /** @@ -373,13 +373,13 @@ void XmlTransformerProc::slotProcessExited(KProcess*) void XmlTransformerProc::slotReceivedStdout(KProcess*, char* /*buffer*/, int /*buflen*/) { - // QString buf = QString::fromLatin1(buffer, buflen); + // TQString buf = TQString::fromLatin1(buffer, buflen); // kdDebug() << "XmlTransformerProc::slotReceivedStdout: Received from xsltproc: " << buf << endl; } void XmlTransformerProc::slotReceivedStderr(KProcess*, char* buffer, int buflen) { - QString buf = QString::fromLatin1(buffer, buflen); + TQString buf = TQString::fromLatin1(buffer, buflen); kdDebug() << "XmlTransformerProc::slotReceivedStderr: Received error from xsltproc: " << buf << endl; } diff --git a/kttsd/filters/xmltransformer/xmltransformerproc.h b/kttsd/filters/xmltransformer/xmltransformerproc.h index 7c88dd1..d50adeb 100644 --- a/kttsd/filters/xmltransformer/xmltransformerproc.h +++ b/kttsd/filters/xmltransformer/xmltransformerproc.h @@ -25,8 +25,8 @@ #define _XMLTRANSFORMERPROC_H_ // Qt includes. -#include -#include +#include +#include // KTTS includes. #include "filterproc.h" @@ -41,7 +41,7 @@ public: /** * Constructor. */ - XmlTransformerProc( QObject *parent, const char *name, const QStringList &args = QStringList() ); + XmlTransformerProc( TQObject *parent, const char *name, const TQStringList &args = TQStringList() ); /** * Destructor. @@ -57,7 +57,7 @@ public: * Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain * separate configuration files of their own. */ - virtual bool init(KConfig *config, const QString &configGroup); + virtual bool init(KConfig *config, const TQString &configGroup); /** * Returns True if the plugin supports asynchronous processing, @@ -80,7 +80,7 @@ public: * @param appId The DCOP appId of the application that queued the text. * Also useful for hints about how to do the filtering. */ - virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId); + virtual TQString convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId); /** * Convert input. Runs asynchronously. @@ -96,7 +96,7 @@ public: * program may then call @ref getOutput to retrieve converted text. Calling * program must call @ref ackFinished to acknowledge the conversion. */ - virtual bool asyncConvert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId); + virtual bool asyncConvert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId); /** * Waits for a previous call to asyncConvert to finish. @@ -111,7 +111,7 @@ public: /** * Returns the filtered output. */ - virtual QString getOutput(); + virtual TQString getOutput(); /** * Acknowledges the finished filtering. @@ -140,26 +140,26 @@ private: void processOutput(); // If not empty, only apply to text queued by an applications containing one of these strings. - QStringList m_appIdList; + TQStringList m_appIdList; // If not empty, only apply to XML that has the specified root element. - QStringList m_rootElementList; + TQStringList m_rootElementList; // If not empty, only apply to XML that has the specified DOCTYPE spec. - QStringList m_doctypeList; + TQStringList m_doctypeList; // The text that is being filtered. - QString m_text; + TQString m_text; // Processing state. int m_state; // xsltproc process. KProcess* m_xsltProc; // Input and Output filenames. - QString m_inFilename; - QString m_outFilename; + TQString m_inFilename; + TQString m_outFilename; // User's name for the filter. - QString m_UserFilterName; + TQString m_UserFilterName; // XSLT file. - QString m_xsltFilePath; + TQString m_xsltFilePath; // Path to xsltproc processor. - QString m_xsltprocPath; + TQString m_xsltprocPath; // Did this filter modify the text? bool m_wasModified; }; -- cgit v1.2.3