summaryrefslogtreecommitdiffstats
path: root/kttsd/filters/stringreplacer
diff options
context:
space:
mode:
Diffstat (limited to 'kttsd/filters/stringreplacer')
-rw-r--r--kttsd/filters/stringreplacer/editreplacementwidget.ui42
-rw-r--r--kttsd/filters/stringreplacer/stringreplacerconf.cpp34
-rw-r--r--kttsd/filters/stringreplacer/stringreplacerconf.h5
-rw-r--r--kttsd/filters/stringreplacer/stringreplacerconfwidget.ui54
-rw-r--r--kttsd/filters/stringreplacer/stringreplacerproc.cpp14
-rw-r--r--kttsd/filters/stringreplacer/stringreplacerproc.h5
6 files changed, 78 insertions, 76 deletions
diff --git a/kttsd/filters/stringreplacer/editreplacementwidget.ui b/kttsd/filters/stringreplacer/editreplacementwidget.ui
index 917cdf8..6046580 100644
--- a/kttsd/filters/stringreplacer/editreplacementwidget.ui
+++ b/kttsd/filters/stringreplacer/editreplacementwidget.ui
@@ -1,7 +1,7 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>EditReplacementWidget</class>
<author>Gary Cramblitt &lt;[email protected]&gt;</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>EditReplacementWidget</cstring>
</property>
@@ -21,7 +21,7 @@
<verstretch>255</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -31,15 +31,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>typeButtonGroup</cstring>
</property>
@@ -61,15 +61,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>wordRadioButton</cstring>
</property>
@@ -88,7 +88,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>regexpRadioButton</cstring>
</property>
@@ -108,7 +108,7 @@
</widget>
</grid>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>caseCheckBox</cstring>
</property>
@@ -126,23 +126,23 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>substLabel</cstring>
</property>
@@ -157,14 +157,14 @@
<property name="text">
<string>&amp;Replace with:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
<property name="buddy" stdset="0">
<cstring>matchLineEdit</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>matchLabel</cstring>
</property>
@@ -179,7 +179,7 @@
<property name="text">
<string>&amp;Match:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
<property name="buddy" stdset="0">
@@ -188,9 +188,9 @@
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<grid>
<property name="name">
@@ -254,7 +254,7 @@
<tabstop>matchButton</tabstop>
<tabstop>substLineEdit</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klineedit.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/kttsd/filters/stringreplacer/stringreplacerconf.cpp b/kttsd/filters/stringreplacer/stringreplacerconf.cpp
index 72f50d8..8bce00d 100644
--- a/kttsd/filters/stringreplacer/stringreplacerconf.cpp
+++ b/kttsd/filters/stringreplacer/stringreplacerconf.cpp
@@ -21,7 +21,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
******************************************************************************/
-// Qt includes.
+// TQt includes.
#include <tqfile.h>
#include <tqfileinfo.h>
#include <tqstring.h>
@@ -59,19 +59,19 @@
/**
* Constructor
*/
-StringReplacerConf::StringReplacerConf( TQWidget *parent, const char *name, const TQStringList& /*args*/) :
- KttsFilterConf(parent, name),
+StringReplacerConf::StringReplacerConf( TQWidget *tqparent, const char *name, const TQStringList& /*args*/) :
+ KttsFilterConf(tqparent, name),
m_editDlg(0),
m_editWidget(0)
{
// kdDebug() << "StringReplacerConf::StringReplacerConf: Running" << endl;
// Create configuration widget.
- TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "StringReplacerConfigWidgetLayout");
- layout->setAlignment (Qt::AlignTop);
+ tqlayout->tqsetAlignment (TQt::AlignTop);
m_widget = new StringReplacerConfWidget(this, "StringReplacerConfigWidget");
- layout->addWidget(m_widget);
+ tqlayout->addWidget(m_widget);
m_widget->substLView->setSortColumn(-1);
connect(m_widget->nameLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
@@ -244,7 +244,7 @@ TQString StringReplacerConf::loadFromFile( const TQString& filename, bool clear)
item = new KListViewItem(m_widget->substLView, item, wordTypeStr, matchCaseStr, match, subst);
}
- return TQString::null;
+ return TQString();
}
/**
@@ -308,7 +308,7 @@ TQString StringReplacerConf::saveToFile(const TQString& filename)
}
// Application ID
- TQString appId = m_widget->appIdLineEdit->text().replace(" ", "");
+ TQString appId = m_widget->appIdLineEdit->text().tqreplace(" ", "");
if ( !appId.isEmpty() )
{
TQStringList appIdList = TQStringList::split(",", appId);
@@ -359,7 +359,7 @@ TQString StringReplacerConf::saveToFile(const TQString& filename)
// kdDebug() << "StringReplacerConf::saveToFile: writing out " << doc.toString() << endl;
file.close();
- return TQString::null;
+ return TQString();
}
/**
@@ -400,7 +400,7 @@ bool StringReplacerConf::supportsMultiInstance() { return true; }
*/
TQString StringReplacerConf::userPlugInName()
{
- if ( m_widget->substLView->childCount() == 0 ) return TQString::null;
+ if ( m_widget->substLView->childCount() == 0 ) return TQString();
TQString instName = m_widget->nameLineEdit->text();
if ( instName.isEmpty() )
{
@@ -442,7 +442,7 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked()
if (!countryCode.isEmpty()) language +=
" (" + KGlobal::locale()->twoAlphaToCountryName(countryCode)+")";
item = new KListViewItem(langLView, language, locale);
- if (m_languageCodeList.contains(locale)) item->setSelected(true);
+ if (m_languageCodeList.tqcontains(locale)) item->setSelected(true);
}
// Sort by language.
langLView->setSorting(0);
@@ -461,7 +461,7 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked()
dlg->setHelp("", "kttsd");
dlg->setInitialSize(TQSize(300, 500), false);
int dlgResult = dlg->exec();
- languageCode = TQString::null;
+ languageCode = TQString();
if (dlgResult == TQDialog::Accepted)
{
m_languageCodeList.clear();
@@ -473,7 +473,7 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked()
}
}
delete dlg;
- // TODO: Also delete KListView and QHBox?
+ // TODO: Also delete KListView and TQHBox?
if (dlgResult != TQDialog::Accepted) return;
language = "";
for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx)
@@ -488,11 +488,11 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked()
if (m_languageCodeList.count() > 1) language = i18n("Multiple Languages");
if ( !s1.isEmpty() )
{
- s2.replace( s1, language );
- s2.replace( i18n("Multiple Languages"), language );
+ s2.tqreplace( s1, language );
+ s2.tqreplace( i18n("Multiple Languages"), language );
}
- s2.replace(" ()", "");
- if ( !s2.contains("(") && !language.isEmpty() ) s2 += " (" + language + ")";
+ s2.tqreplace(" ()", "");
+ if ( !s2.tqcontains("(") && !language.isEmpty() ) s2 += " (" + language + ")";
m_widget->nameLineEdit->setText(s2);
configChanged();
}
diff --git a/kttsd/filters/stringreplacer/stringreplacerconf.h b/kttsd/filters/stringreplacer/stringreplacerconf.h
index 1606390..4de870c 100644
--- a/kttsd/filters/stringreplacer/stringreplacerconf.h
+++ b/kttsd/filters/stringreplacer/stringreplacerconf.h
@@ -24,7 +24,7 @@
#ifndef _STRINGREPLACERCONF_H_
#define _STRINGREPLACERCONF_H_
-// Qt includes.
+// TQt includes.
#include <tqwidget.h>
// KDE includes.
@@ -43,12 +43,13 @@ class EditReplacementWidget;
class StringReplacerConf : public KttsFilterConf
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
*/
- StringReplacerConf( TQWidget *parent, const char *name, const TQStringList &args = TQStringList() );
+ StringReplacerConf( TQWidget *tqparent, const char *name, const TQStringList &args = TQStringList() );
/**
* Destructor
diff --git a/kttsd/filters/stringreplacer/stringreplacerconfwidget.ui b/kttsd/filters/stringreplacer/stringreplacerconfwidget.ui
index e88307f..c1882a0 100644
--- a/kttsd/filters/stringreplacer/stringreplacerconfwidget.ui
+++ b/kttsd/filters/stringreplacer/stringreplacerconfwidget.ui
@@ -2,7 +2,7 @@
<class>StringReplacerConfWidget</class>
<comment>Widget for configuring String Replacer Filter for KTTSD.</comment>
<author>Gary Cramblitt &lt;[email protected]&gt;</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>StringReplacerConfWidget</cstring>
</property>
@@ -21,22 +21,22 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>nameLabel</cstring>
</property>
<property name="text">
<string>&amp;Name:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
<property name="buddy" stdset="0">
@@ -57,7 +57,7 @@
</widget>
</hbox>
</widget>
- <widget class="QGroupBox" row="3" column="0">
+ <widget class="TQGroupBox" row="3" column="0">
<property name="name">
<cstring>applyGroupBox</cstring>
</property>
@@ -71,22 +71,22 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout11</cstring>
+ <cstring>tqlayout11</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>languageLabel</cstring>
</property>
<property name="text">
<string>Lan&amp;guage is:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
<property name="buddy" stdset="0">
@@ -97,14 +97,14 @@
<comment>What's this text</comment>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>appIdLabel</cstring>
</property>
<property name="text">
- <string>Application &amp;ID contains:</string>
+ <string>Application &amp;ID tqcontains:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
<property name="buddy" stdset="0">
@@ -116,17 +116,17 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
- <cstring>layout13</cstring>
+ <cstring>tqlayout13</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout12</cstring>
+ <cstring>tqlayout12</cstring>
</property>
<hbox>
<property name="name">
@@ -168,9 +168,9 @@
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget" row="2" column="0">
+ <widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<hbox>
<property name="name">
@@ -241,9 +241,9 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout24</cstring>
+ <cstring>tqlayout24</cstring>
</property>
<grid>
<property name="name">
@@ -301,9 +301,9 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
- <cstring>layout23</cstring>
+ <cstring>tqlayout23</cstring>
</property>
<vbox>
<property name="name">
@@ -329,7 +329,7 @@
<comment>What's this text</comment>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>upButton</cstring>
</property>
@@ -348,7 +348,7 @@
<string>Click to move selected word up in the list. Words higher in the list are applied first.</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>downButton</cstring>
</property>
@@ -427,7 +427,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -457,7 +457,7 @@
<tabstop>languageBrowseButton</tabstop>
<tabstop>appIdLineEdit</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klineedit.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/kttsd/filters/stringreplacer/stringreplacerproc.cpp b/kttsd/filters/stringreplacer/stringreplacerproc.cpp
index 8987d79..4cee1e7 100644
--- a/kttsd/filters/stringreplacer/stringreplacerproc.cpp
+++ b/kttsd/filters/stringreplacer/stringreplacerproc.cpp
@@ -21,7 +21,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
******************************************************************************/
-// Qt includes.
+// TQt includes.
#include <tqdom.h>
#include <tqfile.h>
#include <tqlistview.h>
@@ -44,8 +44,8 @@
/**
* Constructor.
*/
-StringReplacerProc::StringReplacerProc( TQObject *parent, const char *name, const TQStringList& ) :
- KttsFilterProc(parent, name)
+StringReplacerProc::StringReplacerProc( TQObject *tqparent, const char *name, const TQStringList& ) :
+ KttsFilterProc(tqparent, name)
{
}
@@ -180,14 +180,14 @@ bool StringReplacerProc::init(KConfig* config, const TQString& configGroup){
TQString languageCode = talkerCode->languageCode();
// kdDebug() << "StringReplacerProc::convert: converting " << inputText <<
// " if language code " << languageCode << " matches " << m_languageCodeList << endl;
- if ( !m_languageCodeList.contains( languageCode ) )
+ if ( !m_languageCodeList.tqcontains( languageCode ) )
{
if ( !talkerCode->countryCode().isEmpty() )
{
languageCode += '_' + talkerCode->countryCode();
// kdDebug() << "StringReplacerProc::convert: converting " << inputText <<
// " if language code " << languageCode << " matches " << m_languageCodeList << endl;
- if ( !m_languageCodeList.contains( languageCode ) ) return inputText;
+ if ( !m_languageCodeList.tqcontains( languageCode ) ) return inputText;
} else return inputText;
}
}
@@ -200,7 +200,7 @@ bool StringReplacerProc::init(KConfig* config, const TQString& configGroup){
TQString appIdStr = appId;
for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx )
{
- if ( appIdStr.contains(m_appIdList[ndx]) )
+ if ( appIdStr.tqcontains(m_appIdList[ndx]) )
{
found = true;
break;
@@ -217,7 +217,7 @@ bool StringReplacerProc::init(KConfig* config, const TQString& configGroup){
for ( int index = 0; index < listCount; ++index )
{
//kdDebug() << "newtext = " << newText << " matching " << m_matchList[index].pattern() << " replacing with " << m_substList[index] << endl;
- newText.replace( m_matchList[index], m_substList[index] );
+ newText.tqreplace( m_matchList[index], m_substList[index] );
}
m_wasModified = true;
return newText;
diff --git a/kttsd/filters/stringreplacer/stringreplacerproc.h b/kttsd/filters/stringreplacer/stringreplacerproc.h
index b679113..175bda8 100644
--- a/kttsd/filters/stringreplacer/stringreplacerproc.h
+++ b/kttsd/filters/stringreplacer/stringreplacerproc.h
@@ -25,7 +25,7 @@
#ifndef _STRINGREPLACERPROC_H_
#define _STRINGREPLACERPROC_H_
-// Qt includes.
+// TQt includes.
#include <tqobject.h>
#include <tqtextstream.h>
#include <tqvaluelist.h>
@@ -38,12 +38,13 @@
class StringReplacerProc : virtual public KttsFilterProc
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
*/
- StringReplacerProc( TQObject *parent, const char *name, const TQStringList &args = TQStringList() );
+ StringReplacerProc( TQObject *tqparent, const char *name, const TQStringList &args = TQStringList() );
/**
* Destructor.