summaryrefslogtreecommitdiffstats
path: root/kmouth/wordcompletion
diff options
context:
space:
mode:
Diffstat (limited to 'kmouth/wordcompletion')
-rw-r--r--kmouth/wordcompletion/creationsourcedetailsui.ui16
-rw-r--r--kmouth/wordcompletion/creationsourcedetailsui.ui.h6
-rw-r--r--kmouth/wordcompletion/creationsourceui.ui24
-rw-r--r--kmouth/wordcompletion/creationsourceui.ui.h2
-rw-r--r--kmouth/wordcompletion/dictionarycreationwizard.cpp30
-rw-r--r--kmouth/wordcompletion/dictionarycreationwizard.h9
-rw-r--r--kmouth/wordcompletion/kdedocsourceui.ui8
-rw-r--r--kmouth/wordcompletion/kdedocsourceui.ui.h2
-rw-r--r--kmouth/wordcompletion/klanguagebutton.cpp30
-rw-r--r--kmouth/wordcompletion/klanguagebutton.h21
-rw-r--r--kmouth/wordcompletion/klanguagebuttonhelper.cpp18
-rw-r--r--kmouth/wordcompletion/klanguagebuttonhelper.h2
-rw-r--r--kmouth/wordcompletion/wordcompletion.cpp18
-rw-r--r--kmouth/wordcompletion/wordcompletion.h1
-rw-r--r--kmouth/wordcompletion/wordcompletionui.ui24
-rw-r--r--kmouth/wordcompletion/wordcompletionui.ui.h6
-rw-r--r--kmouth/wordcompletion/wordcompletionwidget.cpp32
-rw-r--r--kmouth/wordcompletion/wordcompletionwidget.h3
-rw-r--r--kmouth/wordcompletion/wordlist.cpp66
-rw-r--r--kmouth/wordcompletion/wordlist.h2
20 files changed, 163 insertions, 157 deletions
diff --git a/kmouth/wordcompletion/creationsourcedetailsui.ui b/kmouth/wordcompletion/creationsourcedetailsui.ui
index 1a1f61b..689ee25 100644
--- a/kmouth/wordcompletion/creationsourcedetailsui.ui
+++ b/kmouth/wordcompletion/creationsourcedetailsui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>CreationSourceDetailsUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>CreationSourceDetailsUI</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>spellCheckBox</cstring>
</property>
@@ -30,7 +30,7 @@
<string>If you select this check box the words are spell-checked before they are inserted into the new dictionary.</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>encodingLabel</cstring>
</property>
@@ -52,7 +52,7 @@
<string>With this combo box you select the character encoding used to load text files. This combo box is not used for XML files or for dictionary files.</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>urlLabel</cstring>
</property>
@@ -125,7 +125,7 @@
<string>With this input field you select the OpenOffice.org directory that will be used to spellcheck the words of the new dictionary.</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>languageLabel</cstring>
</property>
@@ -166,13 +166,13 @@
<variables>
<variable access="public">KLanguageButton *languageButton;</variable>
</variables>
-<slots>
+<Q_SLOTS>
<slot access="protected" specifier="non virtual">languageButton_activated( int index )</slot>
-</slots>
+</Q_SLOTS>
<functions>
<function access="private" specifier="non virtual">init()</function>
</functions>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kinputdialog.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/kmouth/wordcompletion/creationsourcedetailsui.ui.h b/kmouth/wordcompletion/creationsourcedetailsui.ui.h
index 16ecdc5..f3ed793 100644
--- a/kmouth/wordcompletion/creationsourcedetailsui.ui.h
+++ b/kmouth/wordcompletion/creationsourcedetailsui.ui.h
@@ -2,7 +2,7 @@
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
+** TQt Designer which will update this file, preserving your code. Create an
** init() function in place of a constructor, and a destroy() function in
** place of a destructor.
*****************************************************************************/
@@ -15,7 +15,7 @@ void CreationSourceDetailsUI::init() {
TQWhatsThis::add (languageButton, i18n("With this combo box you decide which language should be associated with the new dictionary."));
loadLanguageList(languageButton);
- languageButton->insertLanguage("??", i18n("Other"), TQString::fromLatin1("l10n/"), TQString::null);
+ languageButton->insertLanguage("??", i18n("Other"), TQString::tqfromLatin1("l10n/"), TQString());
connect (languageButton, TQT_SIGNAL(activated(int)), this, TQT_SLOT(languageButton_activated(int)));
}
@@ -28,7 +28,7 @@ void CreationSourceDetailsUI::languageButton_activated (int) {
languageButton->setCurrentItem(customLanguage);
}
else {
- languageButton->insertLanguage(customLanguage, i18n("without name"), TQString::fromLatin1("l10n/"), TQString::null);
+ languageButton->insertLanguage(customLanguage, i18n("without name"), TQString::tqfromLatin1("l10n/"), TQString());
languageButton->setCurrentItem(customLanguage);
}
}
diff --git a/kmouth/wordcompletion/creationsourceui.ui b/kmouth/wordcompletion/creationsourceui.ui
index 13a7c06..603d15a 100644
--- a/kmouth/wordcompletion/creationsourceui.ui
+++ b/kmouth/wordcompletion/creationsourceui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>CreationSourceUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>CreationSourceUI</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQRadioButton" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>createButton</cstring>
</property>
@@ -30,7 +30,7 @@
<string>If you select this box a new dictionary is created by either loading a dictionary file or by counting the individual words in a text.</string>
</property>
</widget>
- <widget class="QRadioButton" row="4" column="0" rowspan="1" colspan="2">
+ <widget class="TQRadioButton" row="4" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>mergeButton</cstring>
</property>
@@ -41,7 +41,7 @@
<string>If you select this box a new dictionary is created by merging existing dictionaries.</string>
</property>
</widget>
- <widget class="QRadioButton" row="2" column="1">
+ <widget class="TQRadioButton" row="2" column="1">
<property name="name">
<cstring>fileButton</cstring>
</property>
@@ -63,7 +63,7 @@
<string>If you select this box a new dictionary is created by loading a file. You may either select an XML file, a standard text file or a file containing a word completion dictionary. If you select a standard text file or an XML file the frequentness of the individual words is detected by simply counting the occurrences of each word.</string>
</property>
</widget>
- <widget class="QRadioButton" row="1" column="1">
+ <widget class="TQRadioButton" row="1" column="1">
<property name="name">
<cstring>kdeDocButton</cstring>
</property>
@@ -88,7 +88,7 @@
<string>If you select this box a new dictionary is created by parsing the KDE documentation. The frequentness of the individual words is detect by simply counting the occurrences of each word.</string>
</property>
</widget>
- <widget class="QRadioButton" row="3" column="1">
+ <widget class="TQRadioButton" row="3" column="1">
<property name="name">
<cstring>directoryButton</cstring>
</property>
@@ -120,14 +120,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
- <widget class="QRadioButton" row="5" column="0" rowspan="1" colspan="2">
+ <widget class="TQRadioButton" row="5" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>emptyButton</cstring>
</property>
@@ -161,19 +161,19 @@
</connection>
</connections>
<includes>
- <include location="global" impldecl="in implementation">qbuttongroup.h</include>
+ <include location="global" impldecl="in implementation">tqbuttongroup.h</include>
<include location="local" impldecl="in implementation">creationsourceui.ui.h</include>
</includes>
<forwards>
<forward>class QButtonGroup</forward>
</forwards>
<variables>
- <variable access="public">QButtonGroup *group2;</variable>
- <variable access="public">QButtonGroup *group1;</variable>
+ <variable access="public">TQButtonGroup *group2;</variable>
+ <variable access="public">TQButtonGroup *group1;</variable>
</variables>
<functions>
<function access="private" specifier="non virtual">init()</function>
<function access="private" specifier="non virtual">destroy()</function>
</functions>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmouth/wordcompletion/creationsourceui.ui.h b/kmouth/wordcompletion/creationsourceui.ui.h
index f9f3dad..6115008 100644
--- a/kmouth/wordcompletion/creationsourceui.ui.h
+++ b/kmouth/wordcompletion/creationsourceui.ui.h
@@ -2,7 +2,7 @@
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
+** TQt Designer which will update this file, preserving your code. Create an
** init() function in place of a constructor, and a destroy() function in
** place of a destructor.
*****************************************************************************/
diff --git a/kmouth/wordcompletion/dictionarycreationwizard.cpp b/kmouth/wordcompletion/dictionarycreationwizard.cpp
index 13c770e..14b7980 100644
--- a/kmouth/wordcompletion/dictionarycreationwizard.cpp
+++ b/kmouth/wordcompletion/dictionarycreationwizard.cpp
@@ -42,10 +42,10 @@
#include "kdedocsourceui.h"
#include "wordlist.h"
-DictionaryCreationWizard::DictionaryCreationWizard (TQWidget *parent, const char *name,
+DictionaryCreationWizard::DictionaryCreationWizard (TQWidget *tqparent, const char *name,
TQStringList dictionaryNames, TQStringList dictionaryFiles,
TQStringList dictionaryLanguages)
- : KWizard (parent, name)
+ : KWizard (tqparent, name)
{
buildCodecList ();
@@ -161,10 +161,10 @@ TQString DictionaryCreationWizard::createDictionary() {
if (creationSource->mergeButton->isChecked()) {
map = WordList::mergeFiles (mergeWidget->mergeParameters(), pdlg);
- dicFile = TQString::null;
+ dicFile = TQString();
}
else if (creationSource->emptyButton->isChecked()) {
- dicFile = TQString::null;
+ dicFile = TQString();
}
else if (creationSource->fileButton->isChecked()) {
TQString filename = fileWidget->url->url();
@@ -221,7 +221,7 @@ TQString DictionaryCreationWizard::createDictionary() {
TQString dictionaryFile;
do {
dictnumber++;
- filename = TQString("wordcompletion%1.dict").arg(dictnumber);
+ filename = TQString("wordcompletion%1.dict").tqarg(dictnumber);
dictionaryFile = KApplication::kApplication()->dirs()->findResource("appdata", filename);
}
while (KStandardDirs::exists(dictionaryFile));
@@ -274,19 +274,19 @@ TQString DictionaryCreationWizard::language() {
/***************************************************************************/
-MergeWidget::MergeWidget(KWizard *parent, const char *name,
+MergeWidget::MergeWidget(KWizard *tqparent, const char *name,
TQStringList dictionaryNames, TQStringList dictionaryFiles,
TQStringList dictionaryLanguages)
-: TQScrollView (parent, name) {
+: TQScrollView (tqparent, name) {
dictionaries.setAutoDelete (false);
weights.setAutoDelete (false);
TQWidget *contents = new TQWidget(viewport());
addChild(contents);
- TQGridLayout *layout = new TQGridLayout (contents);
+ TQGridLayout *tqlayout = new TQGridLayout (contents);
setResizePolicy (TQScrollView::AutoOneFit);
- layout->setColStretch (0, 0);
- layout->setColStretch (1, 1);
+ tqlayout->setColStretch (0, 0);
+ tqlayout->setColStretch (1, 1);
int row = 0;
TQStringList::Iterator nIt = dictionaryNames.begin();
@@ -295,8 +295,8 @@ MergeWidget::MergeWidget(KWizard *parent, const char *name,
for (; nIt != dictionaryNames.end(); ++nIt, ++fIt, ++lIt) {
TQCheckBox *checkbox = new TQCheckBox(*nIt, contents);
KIntNumInput *numInput = new KIntNumInput(contents);
- layout->addWidget (checkbox, row, 0);
- layout->addWidget (numInput, row, 1);
+ tqlayout->addWidget (checkbox, row, 0);
+ tqlayout->addWidget (numInput, row, 1);
checkbox->setChecked (true);
numInput->setRange (1, 100, 10, true);
@@ -335,13 +335,13 @@ TQString MergeWidget::language () {
}
}
- return TQString::null;
+ return TQString();
}
/***************************************************************************/
-CompletionWizardWidget::CompletionWizardWidget (KWizard *parent, const char *name)
- : KDEDocSourceUI (parent, name) {
+CompletionWizardWidget::CompletionWizardWidget (KWizard *tqparent, const char *name)
+ : KDEDocSourceUI (tqparent, name) {
}
CompletionWizardWidget::~CompletionWizardWidget() {
diff --git a/kmouth/wordcompletion/dictionarycreationwizard.h b/kmouth/wordcompletion/dictionarycreationwizard.h
index b947b7f..c2d1e2e 100644
--- a/kmouth/wordcompletion/dictionarycreationwizard.h
+++ b/kmouth/wordcompletion/dictionarycreationwizard.h
@@ -42,8 +42,9 @@ class MergeWidget;
*/
class DictionaryCreationWizard : public KWizard {
Q_OBJECT
+ TQ_OBJECT
public:
- DictionaryCreationWizard (TQWidget *parent, const char *name,
+ DictionaryCreationWizard (TQWidget *tqparent, const char *name,
TQStringList dictionaryNames,
TQStringList dictionaryFiles,
TQStringList dictionaryLanguages);
@@ -76,8 +77,9 @@ private:
*/
class MergeWidget : public TQScrollView {
Q_OBJECT
+ TQ_OBJECT
public:
- MergeWidget(KWizard *parent, const char *name,
+ MergeWidget(KWizard *tqparent, const char *name,
TQStringList dictionaryNames,
TQStringList dictionaryFiles,
TQStringList dictionaryLanguages);
@@ -99,9 +101,10 @@ private:
*/
class CompletionWizardWidget : public KDEDocSourceUI {
Q_OBJECT
+ TQ_OBJECT
friend class ConfigWizard;
public:
- CompletionWizardWidget(KWizard *parent, const char *name);
+ CompletionWizardWidget(KWizard *tqparent, const char *name);
~CompletionWizardWidget();
void ok (KConfig *config);
diff --git a/kmouth/wordcompletion/kdedocsourceui.ui b/kmouth/wordcompletion/kdedocsourceui.ui
index 21ce02a..8fc7b82 100644
--- a/kmouth/wordcompletion/kdedocsourceui.ui
+++ b/kmouth/wordcompletion/kdedocsourceui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>KDEDocSourceUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KDEDocSourceUI</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>spellCheckBox</cstring>
</property>
@@ -49,7 +49,7 @@
<string>With this input field you select the OpenOffice.org directory that will be used to spellcheck the words of the new dictionary.</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>languageLabel</cstring>
</property>
@@ -92,7 +92,7 @@
<functions>
<function access="private" specifier="non virtual">init()</function>
</functions>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/kmouth/wordcompletion/kdedocsourceui.ui.h b/kmouth/wordcompletion/kdedocsourceui.ui.h
index 92a4c6b..0e3ade1 100644
--- a/kmouth/wordcompletion/kdedocsourceui.ui.h
+++ b/kmouth/wordcompletion/kdedocsourceui.ui.h
@@ -2,7 +2,7 @@
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
+** TQt Designer which will update this file, preserving your code. Create an
** init() function in place of a constructor, and a destroy() function in
** place of a destructor.
*****************************************************************************/
diff --git a/kmouth/wordcompletion/klanguagebutton.cpp b/kmouth/wordcompletion/klanguagebutton.cpp
index 5d4c062..e34881a 100644
--- a/kmouth/wordcompletion/klanguagebutton.cpp
+++ b/kmouth/wordcompletion/klanguagebutton.cpp
@@ -3,7 +3,7 @@
*
* Copyright (c) 1999-2000 Hans Petter Bieker <bieker@kde.org>
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.trolltech.com/
*
* This program is free software; you can redistribute it and/or modify
@@ -60,12 +60,12 @@ static inline void checkInsertPos( TQPopupMenu *popup, const TQString & str,
static inline TQPopupMenu * checkInsertIndex( TQPopupMenu *popup,
const TQStringList *tags, const TQString &submenu )
{
- int pos = tags->findIndex( submenu );
+ int pos = tags->tqfindIndex( submenu );
TQPopupMenu *pi = 0;
if ( pos != -1 )
{
- TQMenuItem *p = popup->findItem( pos );
+ TQMenuItem *p = popup->tqfindItem( pos );
pi = p ? p->popup() : 0;
}
if ( !pi )
@@ -80,8 +80,8 @@ KLanguageButton::~KLanguageButton()
delete m_tags;
}
-KLanguageButton::KLanguageButton( TQWidget * parent, const char *name )
-: TQPushButton( parent, name ),
+KLanguageButton::KLanguageButton( TQWidget * tqparent, const char *name )
+: TQPushButton( tqparent, name ),
m_popup( 0 ),
m_oldPopup( 0 )
{
@@ -112,7 +112,7 @@ void KLanguageButton::insertSeparator( const TQString &submenu, int index )
{
TQPopupMenu *pi = checkInsertIndex( m_popup, m_tags, submenu );
pi->insertSeparator( index );
- m_tags->append( TQString::null );
+ m_tags->append( TQString() );
}
void KLanguageButton::insertSubmenu( const TQString &text, const TQString &tag,
@@ -132,12 +132,12 @@ void KLanguageButton::insertSubmenu( const TQString &text, const TQString &tag,
void KLanguageButton::insertLanguage( const TQString& path, const TQString& name,
const TQString& sub, const TQString &submenu, int index )
{
- TQString output = name + TQString::fromLatin1( " (" ) + path +
- TQString::fromLatin1( ")" );
+ TQString output = name + TQString::tqfromLatin1( " (" ) + path +
+ TQString::tqfromLatin1( ")" );
#if 0
// Nooooo ! Country != language
TQPixmap flag( locate( "locale", sub + path +
- TQString::fromLatin1( "/flag.png" ) ) );
+ TQString::tqfromLatin1( "/flag.png" ) ) );
#endif
insertItem( output, path, submenu, index );
}
@@ -174,7 +174,7 @@ void KLanguageButton::clear()
connect( m_popup, TQT_SIGNAL( highlighted( int ) ),
TQT_SIGNAL( highlighted( int ) ) );
- setText( TQString::null );
+ setText( TQString() );
setIconSet( TQIconSet() );
}
@@ -182,14 +182,14 @@ void KLanguageButton::clear()
{
if ( i < 0 || i >= count() )
return;
- TQString output = name + TQString::fromLatin1( " (" ) + tag( i ) +
- TQString::fromLatin1( ")" );
+ TQString output = name + TQString::tqfromLatin1( " (" ) + tag( i ) +
+ TQString::tqfromLatin1( ")" );
changeItem( output, i );
}*/
bool KLanguageButton::containsTag( const TQString &str ) const
{
- return m_tags->contains( str ) > 0;
+ return m_tags->tqcontains( str ) > 0;
}
TQString KLanguageButton::currentTag() const
@@ -202,7 +202,7 @@ TQString KLanguageButton::tag( int i ) const
if ( i < 0 || i >= count() )
{
kdDebug() << "KLanguageButton::tag(), unknown tag " << i << endl;
- return TQString::null;
+ return TQString();
}
return *m_tags->at( i );
}
@@ -228,7 +228,7 @@ void KLanguageButton::setCurrentItem( int i )
void KLanguageButton::setCurrentItem( const TQString &code )
{
- int i = m_tags->findIndex( code );
+ int i = m_tags->tqfindIndex( code );
if ( code.isNull() )
i = 0;
if ( i != -1 )
diff --git a/kmouth/wordcompletion/klanguagebutton.h b/kmouth/wordcompletion/klanguagebutton.h
index 0ebe5c7..1c116b5 100644
--- a/kmouth/wordcompletion/klanguagebutton.h
+++ b/kmouth/wordcompletion/klanguagebutton.h
@@ -5,7 +5,7 @@
* Copyright (c) 1999-2000 Hans Petter Bieker <bieker@kde.org>
* (c) 2001 Martijn Klingens <mklingens@yahoo.com>
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
@@ -34,33 +34,34 @@
* Essentially just a combo box with a 2-D dataset, but using a real
* TQComboBox will produce ugly results.
*
- * Combined version of KTagCombo and KLanguageCombo but using a QPushButton
+ * Combined version of KTagCombo and KLanguageCombo but using a TQPushButton
* instead.
*/
-class KLanguageButton : public QPushButton
+class KLanguageButton : public TQPushButton
{
Q_OBJECT
+ TQ_OBJECT
public:
- KLanguageButton(TQWidget *parent=0, const char *name=0);
+ KLanguageButton(TQWidget *tqparent=0, const char *name=0);
~KLanguageButton();
void insertItem( const TQIconSet& icon, const TQString &text,
- const TQString &tag, const TQString &submenu = TQString::null,
+ const TQString &tag, const TQString &submenu = TQString(),
int index = -1 );
void insertItem( const TQString &text, const TQString &tag,
- const TQString &submenu = TQString::null, int index = -1 );
- void insertSeparator( const TQString &submenu = TQString::null,
+ const TQString &submenu = TQString(), int index = -1 );
+ void insertSeparator( const TQString &submenu = TQString(),
int index = -1 );
void insertSubmenu( const TQString &text, const TQString &tag,
- const TQString &submenu = TQString::null, int index = -1);
+ const TQString &submenu = TQString(), int index = -1);
int count() const;
void clear();
void insertLanguage( const TQString& path, const TQString& name,
- const TQString& sub = TQString::null,
- const TQString &submenu = TQString::null, int index = -1);
+ const TQString& sub = TQString(),
+ const TQString &submenu = TQString(), int index = -1);
/*
* Tag of the selected item
diff --git a/kmouth/wordcompletion/klanguagebuttonhelper.cpp b/kmouth/wordcompletion/klanguagebuttonhelper.cpp
index a68007b..12059c1 100644
--- a/kmouth/wordcompletion/klanguagebuttonhelper.cpp
+++ b/kmouth/wordcompletion/klanguagebuttonhelper.cpp
@@ -3,7 +3,7 @@
*
* Copyright (c) 2003 Gunnar Schmi Dt <gunnar@schmi-dt.de>
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.trolltech.com/
*
* This program is free software; you can redistribute it and/or modify
@@ -31,30 +31,30 @@
TQString languageName (TQString languageCode) {
TQString filename = KGlobal::dirs()->findResource("locale",
- languageCode + TQString::fromLatin1("/entry.desktop"));
+ languageCode + TQString::tqfromLatin1("/entry.desktop"));
KSimpleConfig entry(filename);
- entry.setGroup(TQString::fromLatin1("KCM Locale"));
- return entry.readEntry(TQString::fromLatin1("Name"), i18n("without name"));
+ entry.setGroup(TQString::tqfromLatin1("KCM Locale"));
+ return entry.readEntry(TQString::tqfromLatin1("Name"), i18n("without name"));
}
void loadLanguageList(KLanguageButton *combo)
// This function was taken from kdebase/kcontrol/kdm/kdm-appear.cpp
{
TQStringList langlist = KGlobal::dirs()->findAllResources("locale",
- TQString::fromLatin1("*/entry.desktop"));
+ TQString::tqfromLatin1("*/entry.desktop"));
langlist.sort();
for ( TQStringList::ConstIterator it = langlist.begin();
it != langlist.end(); ++it )
{
TQString fpath = (*it).left((*it).length() - 14);
- int index = fpath.findRev('/');
+ int index = fpath.tqfindRev('/');
TQString nid = fpath.mid(index + 1);
KSimpleConfig entry(*it);
- entry.setGroup(TQString::fromLatin1("KCM Locale"));
- TQString name = entry.readEntry(TQString::fromLatin1("Name"), i18n("without name"));
- combo->insertLanguage(nid, name, TQString::fromLatin1("l10n/"), TQString::null);
+ entry.setGroup(TQString::tqfromLatin1("KCM Locale"));
+ TQString name = entry.readEntry(TQString::tqfromLatin1("Name"), i18n("without name"));
+ combo->insertLanguage(nid, name, TQString::tqfromLatin1("l10n/"), TQString());
}
if (KGlobal::locale())
diff --git a/kmouth/wordcompletion/klanguagebuttonhelper.h b/kmouth/wordcompletion/klanguagebuttonhelper.h
index 11edd09..0f4f232 100644
--- a/kmouth/wordcompletion/klanguagebuttonhelper.h
+++ b/kmouth/wordcompletion/klanguagebuttonhelper.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2003 Gunnar Schmi Dt <gunnar@schmi-dt.de>
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
diff --git a/kmouth/wordcompletion/wordcompletion.cpp b/kmouth/wordcompletion/wordcompletion.cpp
index 268872a..a5d7a4e 100644
--- a/kmouth/wordcompletion/wordcompletion.cpp
+++ b/kmouth/wordcompletion/wordcompletion.cpp
@@ -38,7 +38,7 @@ WordCompletion::~WordCompletion() {
delete d;
}
-typedef QPair<int,TQString> Match;
+typedef TQPair<int,TQString> Match;
typedef TQValueList<Match> MatchList;
TQString WordCompletion::makeCompletion(const TQString &text) {
@@ -46,7 +46,7 @@ TQString WordCompletion::makeCompletion(const TQString &text) {
d->lastText = text;
KCompletion::clear();
- int border = text.findRev(TQRegExp("\\W"));
+ int border = text.tqfindRev(TQRegExp("\\W"));
TQString suffix = text.right (text.length() - border - 1).lower();
TQString prefix = text.left (border + 1);
@@ -84,10 +84,10 @@ TQStringList WordCompletion::wordLists(const TQString &language) {
}
TQString WordCompletion::languageOfWordList(const TQString &wordlist) {
- if (d->dictDetails.contains(wordlist))
+ if (d->dictDetails.tqcontains(wordlist))
return d->dictDetails[wordlist].language;
else
- return TQString::null;
+ return TQString();
}
TQString WordCompletion::currentWordList() {
@@ -137,7 +137,7 @@ bool WordCompletion::setWordList(const TQString &wordlist) {
d->wordsToSave = false;
d->map.clear();
- bool result = d->dictDetails.contains (wordlist);
+ bool result = d->dictDetails.tqcontains (wordlist);
if (result)
d->current = wordlist;
else
@@ -177,13 +177,13 @@ void WordCompletion::addSentence (const TQString &sentence) {
TQStringList::ConstIterator it;
for (it = words.begin(); it != words.end(); ++it) {
- if (!(*it).contains(TQRegExp("\\d|_"))) {
+ if (!(*it).tqcontains(TQRegExp("\\d|_"))) {
TQString key = (*it).lower();
- if (d->map.contains(key))
+ if (d->map.tqcontains(key))
d->map[key] += 1;
else
d->map[key] = 1;
- if (d->addedWords.contains(key))
+ if (d->addedWords.tqcontains(key))
d->addedWords[key] += 1;
else
d->addedWords[key] = 1;
@@ -208,7 +208,7 @@ void WordCompletion::save () {
stream << "WPDictFile\n";
TQMap<TQString,int>::ConstIterator it;
for (it = d->map.begin(); it != d->map.end(); ++it) {
- if (d->addedWords.contains(it.key())) {
+ if (d->addedWords.tqcontains(it.key())) {
stream << it.key() << "\t" << d->addedWords[it.key()] << "\t1\n";
stream << it.key() << "\t" << it.data() - d->addedWords[it.key()] << "\t2\n";
}
diff --git a/kmouth/wordcompletion/wordcompletion.h b/kmouth/wordcompletion/wordcompletion.h
index 2bc5ceb..220196f 100644
--- a/kmouth/wordcompletion/wordcompletion.h
+++ b/kmouth/wordcompletion/wordcompletion.h
@@ -9,6 +9,7 @@
class WordCompletion : public KCompletion {
friend class WordListWidget;
Q_OBJECT
+ TQ_OBJECT
public:
WordCompletion();
virtual ~WordCompletion();
diff --git a/kmouth/wordcompletion/wordcompletionui.ui b/kmouth/wordcompletion/wordcompletionui.ui
index 8036272..401a71b 100644
--- a/kmouth/wordcompletion/wordcompletionui.ui
+++ b/kmouth/wordcompletion/wordcompletionui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>WordCompletionUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>WordCompletionUI</cstring>
</property>
@@ -16,9 +16,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<vbox>
<property name="name">
@@ -141,7 +141,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>240</height>
@@ -150,9 +150,9 @@
</spacer>
</vbox>
</widget>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<vbox>
<property name="name">
@@ -191,7 +191,7 @@
<string>This list contains all available dictionaries for the word completion. KMouth will display a combo box next to the edit field in the main window if this list contains more than one dictionary. You can use this combo box in order to select the dictionary that actually gets used for the word completion.</string>
</property>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>selectedDictionaryDetails</cstring>
</property>
@@ -213,7 +213,7 @@
<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>languageLabel</cstring>
</property>
@@ -224,7 +224,7 @@
<string>With this combo box you select the language associated with the selected dictionary.</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>dictionaryNameLabel</cstring>
</property>
@@ -273,13 +273,13 @@
<variables>
<variable access="public">KLanguageButton *languageButton;</variable>
</variables>
-<slots>
+<Q_SLOTS>
<slot access="protected" specifier="non virtual">languageButton_activated( int index )</slot>
-</slots>
+</Q_SLOTS>
<functions>
<function access="private" specifier="non virtual">init()</function>
</functions>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/kmouth/wordcompletion/wordcompletionui.ui.h b/kmouth/wordcompletion/wordcompletionui.ui.h
index 9a428df..d74137e 100644
--- a/kmouth/wordcompletion/wordcompletionui.ui.h
+++ b/kmouth/wordcompletion/wordcompletionui.ui.h
@@ -2,7 +2,7 @@
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
+** TQt Designer which will update this file, preserving your code. Create an
** init() function in place of a constructor, and a destroy() function in
** place of a destructor.
*****************************************************************************/
@@ -15,7 +15,7 @@ void WordCompletionUI::init() {
TQWhatsThis::add (languageButton, i18n("With this combo box you select the language associated with the selected dictionary."));
loadLanguageList(languageButton);
- languageButton->insertLanguage("??", i18n("Other"), TQString::fromLatin1("l10n/"), TQString::null);
+ languageButton->insertLanguage("??", i18n("Other"), TQString::tqfromLatin1("l10n/"), TQString());
connect (languageButton, TQT_SIGNAL(activated(int)), this, TQT_SLOT(languageButton_activated(int)));
}
@@ -28,7 +28,7 @@ void WordCompletionUI::languageButton_activated (int) {
languageButton->setCurrentItem(customLanguage);
}
else {
- languageButton->insertLanguage(customLanguage, i18n("without name"), TQString::fromLatin1("l10n/"), TQString::null);
+ languageButton->insertLanguage(customLanguage, i18n("without name"), TQString::tqfromLatin1("l10n/"), TQString());
languageButton->setCurrentItem(customLanguage);
}
}
diff --git a/kmouth/wordcompletion/wordcompletionwidget.cpp b/kmouth/wordcompletion/wordcompletionwidget.cpp
index b25df12..4c05557 100644
--- a/kmouth/wordcompletion/wordcompletionwidget.cpp
+++ b/kmouth/wordcompletion/wordcompletionwidget.cpp
@@ -39,18 +39,18 @@
class DictionaryListItem : public KListViewItem {
public:
- DictionaryListItem (TQListView *parent, TQString filename, TQString name, TQString language, TQString languageCode)
- : KListViewItem (parent, name) {
+ DictionaryListItem (TQListView *tqparent, TQString filename, TQString name, TQString language, TQString languageCode)
+ : KListViewItem (tqparent, name) {
setFilename (filename);
setLanguage (language, languageCode);
};
- DictionaryListItem (TQListView *parent, TQString filename, TQString name, TQString languageCode)
- : KListViewItem (parent, name) {
+ DictionaryListItem (TQListView *tqparent, TQString filename, TQString name, TQString languageCode)
+ : KListViewItem (tqparent, name) {
setFilename (filename);
setLanguage (languageCode);
};
- DictionaryListItem (TQListView *parent, TQListViewItem *after, TQString filename, TQString name, TQString languageCode)
- : KListViewItem (parent, after, name) {
+ DictionaryListItem (TQListView *tqparent, TQListViewItem *after, TQString filename, TQString name, TQString languageCode)
+ : KListViewItem (tqparent, after, name) {
setFilename (filename);
setLanguage (languageCode);
};
@@ -71,11 +71,11 @@ public:
void setLanguage (TQString languageCode) {
TQString filename = KGlobal::dirs()->findResource("locale",
- languageCode + TQString::fromLatin1("/entry.desktop"));
+ languageCode + TQString::tqfromLatin1("/entry.desktop"));
KSimpleConfig entry(filename);
- entry.setGroup(TQString::fromLatin1("KCM Locale"));
- TQString name = entry.readEntry(TQString::fromLatin1("Name"), i18n("without name"));
+ entry.setGroup(TQString::tqfromLatin1("KCM Locale"));
+ TQString name = entry.readEntry(TQString::tqfromLatin1("Name"), i18n("without name"));
setLanguage (name + " (" + languageCode + ")", languageCode);
}
@@ -91,7 +91,7 @@ private:
/***************************************************************************/
-WordCompletionWidget::WordCompletionWidget(TQWidget *parent, const char *name) : WordCompletionUI (parent, name) {
+WordCompletionWidget::WordCompletionWidget(TQWidget *tqparent, const char *name) : WordCompletionUI (tqparent, name) {
dictionaryList->setSorting (-1); // no sorted list
// Connect the signals from hte KCMKTTSDWidget to this class
@@ -136,7 +136,7 @@ void WordCompletionWidget::load() {
config->readEntry("Name"),
languageTag);
if (!languageButton->containsTag(languageTag))
- languageButton->insertLanguage(languageTag, i18n("without name"), TQString::fromLatin1("l10n/"), TQString::null);
+ languageButton->insertLanguage(languageTag, i18n("without name"), TQString::tqfromLatin1("l10n/"), TQString());
}
// Clean up disc space
@@ -159,7 +159,7 @@ void WordCompletionWidget::save() {
while (it.current()) {
DictionaryListItem *item = dynamic_cast<DictionaryListItem*>(it.current());
if (item != 0) {
- config->setGroup(TQString("Dictionary %1").arg(number));
+ config->setGroup(TQString("Dictionary %1").tqarg(number));
config->writeEntry ("Filename", item->filename());
config->writeEntry ("Name", item->text (0));
config->writeEntry ("Language", item->languageCode());
@@ -200,7 +200,7 @@ void WordCompletionWidget::addDictionary() {
newDictionaryFiles += filename;
TQString languageTag = wizard->language();
if (!languageButton->containsTag(languageTag)) {
- languageButton->insertLanguage(languageTag, i18n("without name"), TQString::fromLatin1("l10n/"), TQString::null);
+ languageButton->insertLanguage(languageTag, i18n("without name"), TQString::tqfromLatin1("l10n/"), TQString());
}
KListViewItem *item = new DictionaryListItem (dictionaryList,
filename, wizard->name(), languageTag);
@@ -246,13 +246,13 @@ void WordCompletionWidget::exportDictionary() {
DictionaryListItem *item = dynamic_cast<DictionaryListItem*>(dictionaryList->selectedItem ());
if (item != 0) {
- KURL url = KFileDialog::getSaveURL(TQString::null, TQString::null, this, i18n("Export Dictionary"));
+ KURL url = KFileDialog::getSaveURL(TQString(), TQString(), this, i18n("Export Dictionary"));
if (url.isEmpty() || !url.isValid())
return;
if (KIO::NetAccess::exists(url, false, this)) {
- if (KMessageBox::warningContinueCancel(0,TQString("<qt>%1</qt>").arg(i18n("The file %1 already exists. "
- "Do you want to overwrite it?").arg(url.url())),i18n("File Exists"),i18n("&Overwrite"))==KMessageBox::Cancel) {
+ if (KMessageBox::warningContinueCancel(0,TQString("<qt>%1</qt>").tqarg(i18n("The file %1 already exists. "
+ "Do you want to overwrite it?").tqarg(url.url())),i18n("File Exists"),i18n("&Overwrite"))==KMessageBox::Cancel) {
return;
}
}
diff --git a/kmouth/wordcompletion/wordcompletionwidget.h b/kmouth/wordcompletion/wordcompletionwidget.h
index fddf074..6118642 100644
--- a/kmouth/wordcompletion/wordcompletionwidget.h
+++ b/kmouth/wordcompletion/wordcompletionwidget.h
@@ -30,8 +30,9 @@ class KLanguageButton;
*/
class WordCompletionWidget : public WordCompletionUI {
Q_OBJECT
+ TQ_OBJECT
public:
- WordCompletionWidget(TQWidget *parent, const char *name);
+ WordCompletionWidget(TQWidget *tqparent, const char *name);
~WordCompletionWidget();
/**
diff --git a/kmouth/wordcompletion/wordlist.cpp b/kmouth/wordcompletion/wordlist.cpp
index f10feaf..15c4ea2 100644
--- a/kmouth/wordcompletion/wordlist.cpp
+++ b/kmouth/wordcompletion/wordlist.cpp
@@ -53,7 +53,7 @@ TQString XMLParser::errorString() {
}
bool XMLParser::startDocument() {
- text = TQString::null;
+ text = TQString();
return true;
}
@@ -63,7 +63,7 @@ bool XMLParser::startElement (const TQString &, const TQString &,
{
if (!text.isNull() && !text.isEmpty()) {
addWords (list, text);
- text = TQString::null;
+ text = TQString();
}
return true;
}
@@ -76,7 +76,7 @@ bool XMLParser::characters (const TQString &ch) {
bool XMLParser::ignorableWhitespace (const TQString &) {
if (!text.isNull() && !text.isEmpty()) {
addWords (list, text);
- text = TQString::null;
+ text = TQString();
}
return true;
}
@@ -86,7 +86,7 @@ bool XMLParser::endElement (const TQString &, const TQString &,
{
if (!text.isNull() && !text.isEmpty()) {
addWords (list, text);
- text = TQString::null;
+ text = TQString();
}
return true;
}
@@ -94,7 +94,7 @@ bool XMLParser::endElement (const TQString &, const TQString &,
bool XMLParser::endDocument() {
if (!text.isNull() && !text.isEmpty()) {
addWords (list, text);
- text = TQString::null;
+ text = TQString();
}
return true;
}
@@ -139,9 +139,9 @@ void addWords (WordMap &map, TQString line) {
TQStringList::ConstIterator it;
for (it = words.begin(); it != words.end(); ++it) {
- if (!(*it).contains(TQRegExp("\\d|_"))) {
+ if (!(*it).tqcontains(TQRegExp("\\d|_"))) {
TQString key = (*it).lower();
- if (map.contains(key))
+ if (map.tqcontains(key))
map[key] += 1;
else
map[key] = 1;
@@ -152,7 +152,7 @@ void addWords (WordMap &map, TQString line) {
void addWords (WordMap &map, WordMap add) {
WordList::WordMap::ConstIterator it;
for (it = add.begin(); it != add.end(); ++it)
- if (map.contains(it.key()))
+ if (map.tqcontains(it.key()))
map[it.key()] += it.data();
else
map[it.key()] = it.data();
@@ -160,7 +160,7 @@ void addWords (WordMap &map, WordMap add) {
void addWordsFromFile (WordMap &map, TQString filename, TQTextStream::Encoding encoding, TQTextCodec *codec) {
TQFile xmlfile(filename);
- TQXmlInputSource source (&xmlfile);
+ TQXmlInputSource source (TQT_TQIODEVICE(&xmlfile));
XMLParser parser;
TQXmlSimpleReader reader;
reader.setFeature ("http://trolltech.com/xml/features/report-start-end-entity", true);
@@ -186,7 +186,7 @@ void addWordsFromFile (WordMap &map, TQString filename, TQTextStream::Encoding e
bool ok;
int weight = list[1].toInt(&ok);
if (ok && (weight > 0)) {
- if (map.contains(list[0]))
+ if (map.tqcontains(list[0]))
map[list[0]] += weight;
else
map[list[0]] = weight;
@@ -228,7 +228,7 @@ WordMap parseFiles (TQStringList files, TQTextStream::Encoding encoding, TQTextC
if (steps != 0 && progress*100/steps > percent) {
percent = progress*100/steps;
pdlg->progressBar()->setProgress(percent);
- qApp->processEvents (20);
+ tqApp->tqprocessEvents (20);
}
}
return map;
@@ -237,7 +237,7 @@ WordMap parseFiles (TQStringList files, TQTextStream::Encoding encoding, TQTextC
WordMap mergeFiles (TQMap<TQString,int> files, KProgressDialog *pdlg) {
pdlg->setLabel (i18n("Merging dictionaries..."));
pdlg->show();
- qApp->processEvents (20);
+ tqApp->tqprocessEvents (20);
int progress = 0;
int steps = files.count();
@@ -261,7 +261,7 @@ WordMap mergeFiles (TQMap<TQString,int> files, KProgressDialog *pdlg) {
maxWeight = weight;
for (iter = fileMap.begin(); iter != fileMap.end(); ++iter)
- if (map.contains(iter.key()))
+ if (map.tqcontains(iter.key()))
map[iter.key()] += iter.data() * factor;
else
map[iter.key()] = iter.data() * factor;
@@ -269,7 +269,7 @@ WordMap mergeFiles (TQMap<TQString,int> files, KProgressDialog *pdlg) {
if (steps != 0 && progress*100/steps > percent) {
percent = progress*100/steps;
pdlg->progressBar()->setProgress(percent);
- qApp->processEvents (20);
+ tqApp->tqprocessEvents (20);
}
}
@@ -290,7 +290,7 @@ WordMap mergeFiles (TQMap<TQString,int> files, KProgressDialog *pdlg) {
WordMap parseKDEDoc (TQString language, KProgressDialog *pdlg) {
pdlg->setLabel (i18n("Parsing the KDE documentation..."));
pdlg->show();
- qApp->processEvents (20);
+ tqApp->tqprocessEvents (20);
TQStringList files = KApplication::kApplication()->dirs()->findAllResources ("html", language + "/*.docbook", true, true);
if ((files.count() == 0) && (language.length() == 5)) {
@@ -304,7 +304,7 @@ WordMap parseKDEDoc (TQString language, KProgressDialog *pdlg) {
WordMap parseFile (TQString filename, TQTextStream::Encoding encoding, TQTextCodec *codec, KProgressDialog *pdlg) {
pdlg->setLabel (i18n("Parsing file..."));
pdlg->show();
- qApp->processEvents (20);
+ tqApp->tqprocessEvents (20);
TQStringList files = filename;
@@ -314,16 +314,16 @@ WordMap parseFile (TQString filename, TQTextStream::Encoding encoding, TQTextCod
WordMap parseDir (TQString directory, TQTextStream::Encoding encoding, TQTextCodec *codec, KProgressDialog *pdlg) {
pdlg->setLabel (i18n("Parsing directory..."));
pdlg->show();
- qApp->processEvents (20);
+ tqApp->tqprocessEvents (20);
TQStringList directories;
directories += directory;
TQStringList files;
for (TQStringList::Iterator it = directories.begin(); it != directories.end(); it = directories.remove(it)) {
TQDir dir(*it);
- const QFileInfoList *entries = dir.entryInfoList ("*", TQDir::Dirs | TQDir::Files | TQDir::NoSymLinks | TQDir::Readable);
+ const TQFileInfoList *entries = dir.entryInfoList ("*", TQDir::Dirs | TQDir::Files | TQDir::NoSymLinks | TQDir::Readable);
if (entries != 0) {
- QFileInfoListIterator iter (*entries);
+ TQFileInfoListIterator iter (*entries);
while ((iter.current()) != 0) {
TQString name = iter.current()->fileName();
if (name != "." && name != "..") {
@@ -394,14 +394,14 @@ void loadAffFile(const TQString &filename, AffMap &prefixes, AffMap &suffixes) {
if (s.startsWith("PFX")) {
AffList list;
- if (prefixes.contains (fields[1][0]))
+ if (prefixes.tqcontains (fields[1][0]))
list = prefixes[fields[1][0]];
list << e;
prefixes[fields[1][0]] = list;
}
else if (s.startsWith("SFX")) {
AffList list;
- if (suffixes.contains (fields[1][0]))
+ if (suffixes.tqcontains (fields[1][0]))
list = suffixes[fields[1][0]];
list << e;
suffixes[fields[1][0]] = list;
@@ -432,7 +432,7 @@ inline bool checkCondition (const TQString &word, const TQStringList &condition)
it != condition.end();
++it, ++idx)
{
- if ((*it).contains(word[idx]) == ((*it)[0] == '^'))
+ if ((*it).tqcontains(word[idx]) == ((*it)[0] == '^'))
return false;
}
return true;
@@ -445,7 +445,7 @@ inline bool checkCondition (const TQString &word, const TQStringList &condition)
*/
inline void checkWord(const TQString &word, const TQString &modifiers, bool cross, const WordMap &map, WordMap &checkedMap, const AffMap &suffixes) {
for (uint i = 0; i < modifiers.length(); i++) {
- if (suffixes.contains(modifiers[i])) {
+ if (suffixes.tqcontains(modifiers[i])) {
AffList sList = suffixes[modifiers[i]];
AffList::ConstIterator sIt;
@@ -454,7 +454,7 @@ inline void checkWord(const TQString &word, const TQString &modifiers, bool cros
&& (checkCondition(word, (*sIt).condition)))
{
TQString sWord = word.left(word.length()-(*sIt).charsToRemove) + (*sIt).add;
- if (map.contains(sWord))
+ if (map.tqcontains(sWord))
checkedMap[sWord] = map[sWord];
}
}
@@ -467,19 +467,19 @@ inline void checkWord(const TQString &word, const TQString &modifiers, bool cros
* @param modifiers discribes which pre- and suffixes are valid
*/
void checkWord (const TQString &word, const TQString &modifiers, const WordMap &map, WordMap &checkedMap, const AffMap &prefixes, const AffMap &suffixes) {
- if (map.contains(word))
+ if (map.tqcontains(word))
checkedMap[word] = map[word];
checkWord(word, modifiers, true, map, checkedMap, suffixes);
for (uint i = 0; i < modifiers.length(); i++) {
- if (prefixes.contains(modifiers[i])) {
+ if (prefixes.tqcontains(modifiers[i])) {
AffList pList = prefixes[modifiers[i]];
AffList::ConstIterator pIt;
for (pIt = pList.begin(); pIt != pList.end(); ++pIt) {
TQString pWord = (*pIt).add + word;
- if (map.contains(pWord))
+ if (map.tqcontains(pWord))
checkedMap[pWord] = map[pWord];
checkWord(pWord, modifiers, false, map, checkedMap, suffixes);
@@ -504,7 +504,7 @@ WordMap spellCheck (WordMap map, TQString dictionary, KProgressDialog *pdlg) {
pdlg->setLabel (i18n("Performing spell check..."));
pdlg->progressBar()->setTotalSteps(100);
pdlg->progressBar()->setProgress(0);
- qApp->processEvents (20);
+ tqApp->tqprocessEvents (20);
int progress = 0;
int steps = 0;
int percent = 0;
@@ -520,14 +520,14 @@ WordMap spellCheck (WordMap map, TQString dictionary, KProgressDialog *pdlg) {
while (!stream.atEnd()) {
TQString s = stream.readLine();
- if (s.contains("/")) {
- TQString word = s.left(s.find("/")).lower();
- TQString modifiers = s.right(s.length() - s.find("/"));
+ if (s.tqcontains("/")) {
+ TQString word = s.left(s.tqfind("/")).lower();
+ TQString modifiers = s.right(s.length() - s.tqfind("/"));
checkWord(word, modifiers, map, checkedMap, prefixes, suffixes);
}
else {
- if (!s.isEmpty() && !s.isNull() && map.contains(s.lower()))
+ if (!s.isEmpty() && !s.isNull() && map.tqcontains(s.lower()))
checkedMap[s.lower()] = map[s.lower()];
}
@@ -535,7 +535,7 @@ WordMap spellCheck (WordMap map, TQString dictionary, KProgressDialog *pdlg) {
if (steps != 0 && progress*100/steps > percent) {
percent = progress*100/steps;
pdlg->progressBar()->setProgress(percent);
- qApp->processEvents (20);
+ tqApp->tqprocessEvents (20);
}
}
}
diff --git a/kmouth/wordcompletion/wordlist.h b/kmouth/wordcompletion/wordlist.h
index 2ce004f..11dd6c1 100644
--- a/kmouth/wordcompletion/wordlist.h
+++ b/kmouth/wordcompletion/wordlist.h
@@ -46,7 +46,7 @@ bool saveWordList (WordMap map, TQString filename);
/**
* This class implements a parser for reading docbooks and generating word
- * lists. It is intended to be used together with the Qt SAX2 framework.
+ * lists. It is intended to be used together with the TQt SAX2 framework.
* @author Gunnar Schmi Dt
*/