summaryrefslogtreecommitdiffstats
path: root/kmouth
diff options
context:
space:
mode:
Diffstat (limited to 'kmouth')
-rw-r--r--kmouth/books/sv-personal.phrasebook2
-rw-r--r--kmouth/configwizard.cpp6
-rw-r--r--kmouth/configwizard.h3
-rw-r--r--kmouth/kmouth.cpp42
-rw-r--r--kmouth/kmouth.h7
-rw-r--r--kmouth/optionsdialog.cpp16
-rw-r--r--kmouth/optionsdialog.h6
-rw-r--r--kmouth/phrasebook/buttonboxui.ui16
-rw-r--r--kmouth/phrasebook/phrasebook.cpp80
-rw-r--r--kmouth/phrasebook/phrasebook.h10
-rw-r--r--kmouth/phrasebook/phrasebookdialog.cpp134
-rw-r--r--kmouth/phrasebook/phrasebookdialog.h19
-rw-r--r--kmouth/phrasebook/phrasebookparser.h2
-rw-r--r--kmouth/phrasebook/phrasetree.cpp156
-rw-r--r--kmouth/phrasebook/phrasetree.h19
-rw-r--r--kmouth/phraseedit.cpp16
-rw-r--r--kmouth/phraseedit.h2
-rw-r--r--kmouth/phraselist.cpp44
-rw-r--r--kmouth/phraselist.h5
-rw-r--r--kmouth/phraselistitem.cpp4
-rw-r--r--kmouth/preferencesui.ui12
-rw-r--r--kmouth/speech.cpp26
-rw-r--r--kmouth/speech.h1
-rw-r--r--kmouth/texttospeechconfigurationui.ui20
-rw-r--r--kmouth/texttospeechconfigurationwidget.cpp4
-rw-r--r--kmouth/texttospeechconfigurationwidget.h2
-rw-r--r--kmouth/texttospeechsystem.h3
-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
47 files changed, 498 insertions, 479 deletions
diff --git a/kmouth/books/sv-personal.phrasebook b/kmouth/books/sv-personal.phrasebook
index 37f7636..cb4efe7 100644
--- a/kmouth/books/sv-personal.phrasebook
+++ b/kmouth/books/sv-personal.phrasebook
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE phrasebook>
<phrasebook name="Personligt">
-<phrase shortcut="">Jag kan bara prata med hjälp av den här dumma maskinen.</phrase>
+<phrase shortcut="">Jag kan bara prata med hjälp av den här dumma tqmaskinen.</phrase>
<phrase shortcut="">Tyvärr är jag ganska trött nu och behöver ta en paus.</phrase>
<phrase shortcut="">Tack för att du kom.</phrase>
<phrase shortcut="">Trevligt att se dig.</phrase>
diff --git a/kmouth/configwizard.cpp b/kmouth/configwizard.cpp
index 3d99005..bce57e4 100644
--- a/kmouth/configwizard.cpp
+++ b/kmouth/configwizard.cpp
@@ -31,8 +31,8 @@
#include "wordcompletion/wordcompletion.h"
#include "wordcompletion/dictionarycreationwizard.h"
-ConfigWizard::ConfigWizard (TQWidget *parent, const char *name, KConfig *config)
- : KWizard(parent, name, true)
+ConfigWizard::ConfigWizard (TQWidget *tqparent, const char *name, KConfig *config)
+ : KWizard(tqparent, name, true)
{
setCaption (i18n("Initial Configuration - KMouth"));
@@ -88,7 +88,7 @@ void ConfigWizard::initCompletion (KConfig *config) {
config->setGroup("Dictionary 0");
config->writeEntry ("Filename", "dictionary.txt");
config->writeEntry ("Name", "Default");
- config->writeEntry ("Language", TQString::null);
+ config->writeEntry ("Language", TQString());
config->sync();
}
}
diff --git a/kmouth/configwizard.h b/kmouth/configwizard.h
index 112e25a..8f2dd55 100644
--- a/kmouth/configwizard.h
+++ b/kmouth/configwizard.h
@@ -35,8 +35,9 @@ class CompletionWizardWidget;
class ConfigWizard : public KWizard {
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigWizard (TQWidget *parent, const char *name, KConfig *config);
+ ConfigWizard (TQWidget *tqparent, const char *name, KConfig *config);
~ConfigWizard();
bool configurationNeeded ();
diff --git a/kmouth/kmouth.cpp b/kmouth/kmouth.cpp
index 76c715f..83c2797 100644
--- a/kmouth/kmouth.cpp
+++ b/kmouth/kmouth.cpp
@@ -95,57 +95,57 @@ bool KMouthApp::configured() {
void KMouthApp::initActions() {
// The "File" menu
- fileOpen = new KAction(i18n("&Open as History..."), "phrasehistory_open", KStdAccel::open(), this, TQT_SLOT(slotFileOpen()), actionCollection(),"file_open");
+ fileOpen = new KAction(i18n("&Open as History..."), "phrasehistory_open", KStdAccel::open(), TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), actionCollection(),"file_open");
fileOpen->setStatusText(i18n("Opens an existing file as history"));
fileOpen->setWhatsThis (i18n("Opens an existing file as history"));
- fileSaveAs = new KAction(i18n("Save &History As..."), "phrasehistory_save", KStdAccel::save(), this, TQT_SLOT(slotFileSaveAs()), actionCollection(),"file_save_as");
+ fileSaveAs = new KAction(i18n("Save &History As..."), "phrasehistory_save", KStdAccel::save(), TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAs()), actionCollection(),"file_save_as");
fileSaveAs->setStatusText(i18n("Saves the actual history as..."));
fileSaveAs->setWhatsThis (i18n("Saves the actual history as..."));
- filePrint = new KAction(i18n("&Print History..."), "phrasehistory_print", KStdAccel::print(), this, TQT_SLOT(slotFilePrint()), actionCollection(),"file_print");
+ filePrint = new KAction(i18n("&Print History..."), "phrasehistory_print", KStdAccel::print(), TQT_TQOBJECT(this), TQT_SLOT(slotFilePrint()), actionCollection(),"file_print");
filePrint->setStatusText(i18n("Prints out the actual history"));
filePrint->setWhatsThis (i18n("Prints out the actual history"));
- fileQuit = KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection());
+ fileQuit = KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotFileQuit()), actionCollection());
fileQuit->setStatusText(i18n("Quits the application"));
fileQuit->setWhatsThis (i18n("Quits the application"));
// The "Edit" menu
- editCut = KStdAction::cut(phraseList, TQT_SLOT(cut()), actionCollection());
+ editCut = KStdAction::cut(TQT_TQOBJECT(phraseList), TQT_SLOT(cut()), actionCollection());
editCut->setStatusText(i18n("Cuts the selected section and puts it to the clipboard"));
editCut->setWhatsThis (i18n("Cuts the selected section and puts it to the clipboard. If there is some text selected in the edit field it is placed it on the clipboard. Otherwise the selected sentences in the history (if any) are placed on the clipboard."));
- editCopy = KStdAction::copy(phraseList, TQT_SLOT(copy()), actionCollection());
+ editCopy = KStdAction::copy(TQT_TQOBJECT(phraseList), TQT_SLOT(copy()), actionCollection());
editCopy->setStatusText(i18n("Copies the selected section to the clipboard"));
editCopy->setWhatsThis (i18n("Copies the selected section to the clipboard. If there is some text selected in the edit field it is copied to the clipboard. Otherwise the selected sentences in the history (if any) are copied to the clipboard."));
- editPaste = KStdAction::paste(phraseList, TQT_SLOT(paste()), actionCollection());
+ editPaste = KStdAction::paste(TQT_TQOBJECT(phraseList), TQT_SLOT(paste()), actionCollection());
editPaste->setStatusText(i18n("Pastes the clipboard contents to actual position"));
editPaste->setWhatsThis (i18n("Pastes the clipboard contents at the current cursor position into the edit field."));
- editSpeak = new KAction (i18n("&Speak"), "speak", 0, phraseList, TQT_SLOT(speak()), actionCollection(),"edit_speak");
+ editSpeak = new KAction (i18n("&Speak"), "speak", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(speak()), actionCollection(),"edit_speak");
editSpeak->setStatusText(i18n("Speaks the currently active sentence(s)"));
editSpeak->setWhatsThis (i18n("Speaks the currently active sentence(s). If there is some text in the edit field it is spoken. Otherwise the selected sentences in the history (if any) are spoken."));
// The "Phrase book" menu
- phrasebookEdit = new KAction(i18n("&Edit..."), 0, 0, this, TQT_SLOT(slotEditPhrasebook()), actionCollection(),"phrasebook_edit");
+ phrasebookEdit = new KAction(i18n("&Edit..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditPhrasebook()), actionCollection(),"phrasebook_edit");
// The "Options" menu
- viewMenuBar = KStdAction::showMenubar(this, TQT_SLOT(slotViewMenuBar()), actionCollection());
- viewToolBar = KStdAction::showToolbar(this, TQT_SLOT(slotViewToolBar()), actionCollection());
+ viewMenuBar = KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(slotViewMenuBar()), actionCollection());
+ viewToolBar = KStdAction::showToolbar(TQT_TQOBJECT(this), TQT_SLOT(slotViewToolBar()), actionCollection());
viewToolBar->setStatusText(i18n("Enables/disables the toolbar"));
viewToolBar->setWhatsThis (i18n("Enables/disables the toolbar"));
- viewPhrasebookBar = new KToggleAction (i18n("Show P&hrasebook Bar"), 0, 0, this, TQT_SLOT(slotViewPhrasebookBar()), actionCollection(), "showPhrasebookBar");
+ viewPhrasebookBar = new KToggleAction (i18n("Show P&hrasebook Bar"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewPhrasebookBar()), actionCollection(), "showPhrasebookBar");
viewPhrasebookBar->setStatusText(i18n("Enables/disables the phrasebook bar"));
viewPhrasebookBar->setWhatsThis (i18n("Enables/disables the phrasebook bar"));
- viewStatusBar = KStdAction::showStatusbar(this, TQT_SLOT(slotViewStatusBar()), actionCollection());
+ viewStatusBar = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(slotViewStatusBar()), actionCollection());
viewStatusBar->setStatusText(i18n("Enables/disables the statusbar"));
viewStatusBar->setWhatsThis (i18n("Enables/disables the statusbar"));
- configureTTS = new KAction (i18n("&Configure KMouth..."), "configure", 0, this, TQT_SLOT(slotConfigureTTS()), actionCollection(), "configureTTS");
+ configureTTS = new KAction (i18n("&Configure KMouth..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(slotConfigureTTS()), actionCollection(), "configureTTS");
configureTTS->setStatusText(i18n("Opens the configuration dialog"));
configureTTS->setWhatsThis (i18n("Opens the configuration dialog"));
@@ -153,27 +153,27 @@ void KMouthApp::initActions() {
// The "Help" menu will automatically get created.
// The popup menu of the list of spoken sentences
- phraseListSpeak = new KAction (i18n("&Speak"), "speak", 0, phraseList, TQT_SLOT(speakListSelection()), actionCollection(), "phraselist_speak");
+ phraseListSpeak = new KAction (i18n("&Speak"), "speak", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(speakListSelection()), actionCollection(), "phraselist_speak");
phraseListSpeak->setStatusText(i18n("Speaks the currently selected phrases in the history"));
phraseListSpeak->setWhatsThis (i18n("Speaks the currently selected phrases in the history"));
- phraseListRemove = new KAction (i18n("&Delete"), "editdelete", 0, phraseList, TQT_SLOT(removeListSelection()), actionCollection(), "phraselist_remove");
+ phraseListRemove = new KAction (i18n("&Delete"), "editdelete", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(removeListSelection()), actionCollection(), "phraselist_remove");
phraseListRemove->setStatusText(i18n("Deletes the currently selected phrases from the history"));
phraseListRemove->setWhatsThis (i18n("Deletes the currently selected phrases from the history"));
- phraseListCut = new KAction (i18n("Cu&t"), "editcut", 0, phraseList, TQT_SLOT(cutListSelection()), actionCollection(), "phraselist_cut");
+ phraseListCut = new KAction (i18n("Cu&t"), "editcut", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(cutListSelection()), actionCollection(), "phraselist_cut");
phraseListCut->setStatusText(i18n("Cuts the currently selected phrases from the history and puts them to the clipboard"));
phraseListCut->setWhatsThis (i18n("Cuts the currently selected phrases from the history and puts them to the clipboard"));
- phraseListCopy = new KAction (i18n("&Copy"), "editcopy", 0, phraseList, TQT_SLOT(copyListSelection()), actionCollection(), "phraselist_copy");
+ phraseListCopy = new KAction (i18n("&Copy"), "editcopy", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(copyListSelection()), actionCollection(), "phraselist_copy");
phraseListCut->setStatusText(i18n("Copies the currently selected phrases from the history to the clipboard"));
phraseListCut->setWhatsThis (i18n("Copies the currently selected phrases from the history to the clipboard"));
- phraselistSelectAll = new KAction (i18n("Select &All Entries"), 0, 0, phraseList, TQT_SLOT(selectAllEntries()), actionCollection(),"phraselist_select_all");
+ phraselistSelectAll = new KAction (i18n("Select &All Entries"), 0, 0, TQT_TQOBJECT(phraseList), TQT_SLOT(selectAllEntries()), actionCollection(),"phraselist_select_all");
phraselistSelectAll->setStatusText(i18n("Selects all phrases in the history"));
phraselistSelectAll->setWhatsThis (i18n("Selects all phrases in the history"));
- phraselistDeselectAll = new KAction (i18n("D&eselect All Entries"), 0, 0, phraseList, TQT_SLOT(deselectAllEntries()), actionCollection(),"phraselist_deselect_all");
+ phraselistDeselectAll = new KAction (i18n("D&eselect All Entries"), 0, 0, TQT_TQOBJECT(phraseList), TQT_SLOT(deselectAllEntries()), actionCollection(),"phraselist_deselect_all");
phraselistDeselectAll->setStatusText(i18n("Deselects all phrases in the history"));
phraselistDeselectAll->setWhatsThis (i18n("Deselects all phrases in the history"));
@@ -458,7 +458,7 @@ void KMouthApp::slotPhrasebookConfirmed (PhraseBook &book) {
delete phrases;
phrases = new KActionCollection (this, actionCollection());
- book.addToGUI (popup, toolbar, phrases, this, TQT_SLOT(slotPhraseSelected (const TQString &)));
+ book.addToGUI (popup, toolbar, phrases, TQT_TQOBJECT(this), TQT_SLOT(slotPhraseSelected (const TQString &)));
TQString bookLocation = KApplication::kApplication()->dirs()->saveLocation ("appdata", "/");
if (!bookLocation.isNull() && !bookLocation.isEmpty()) {
diff --git a/kmouth/kmouth.h b/kmouth/kmouth.h
index ba7756d..e9b18f4 100644
--- a/kmouth/kmouth.h
+++ b/kmouth/kmouth.h
@@ -24,7 +24,7 @@
#include <config.h>
#endif
-// include files for Qt
+// include files for TQt
// include files for KDE
#include <kapplication.h>
@@ -56,11 +56,12 @@ class PhraseBook;
class KMouthApp : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
/** construtor of KMouthApp, calls all init functions to create the application.
*/
- KMouthApp(TQWidget* parent=0, const char* name=0);
+ KMouthApp(TQWidget* tqparent=0, const char* name=0);
~KMouthApp();
/** Returns true if the configuration wizard was not needed or when it
* was successfully completed.
@@ -78,7 +79,7 @@ class KMouthApp : public KMainWindow
void enableMenuEntries(bool existSelectedEntries, bool existDeselectedEntries);
protected:
- /** save general Options like all bar positions and status as well as the geometry and the recent file list to the configuration
+ /** save general Options like all bar positions and status as well as the tqgeometry and the recent file list to the configuration
* file
*/
void saveOptions();
diff --git a/kmouth/optionsdialog.cpp b/kmouth/optionsdialog.cpp
index a16e1e4..ad98fda 100644
--- a/kmouth/optionsdialog.cpp
+++ b/kmouth/optionsdialog.cpp
@@ -39,8 +39,8 @@
#include "texttospeechconfigurationwidget.h"
#include "speech.h"
-PreferencesWidget::PreferencesWidget (TQWidget *parent, const char *name)
- : PreferencesUI (parent, name)
+PreferencesWidget::PreferencesWidget (TQWidget *tqparent, const char *name)
+ : PreferencesUI (tqparent, name)
{
speakCombo->setCurrentItem (1);
speak = false;
@@ -113,27 +113,27 @@ bool PreferencesWidget::isSpeakImmediately () {
/***************************************************************************/
-OptionsDialog::OptionsDialog (TQWidget *parent)
+OptionsDialog::OptionsDialog (TQWidget *tqparent)
: KDialogBase(IconList, i18n("Configuration"), Ok|Apply|Cancel|Help, Ok,
- parent, "configuration", false, true)
+ tqparent, "configuration", false, true)
{
setHelp ("config-dialog");
TQPixmap iconGeneral = KGlobal::iconLoader()->loadIcon("configure", KIcon::NoGroup, KIcon::SizeMedium);
- TQGrid *pageGeneral = addGridPage (1, Qt::Horizontal, i18n("General Options"), TQString::null, iconGeneral);
+ TQGrid *pageGeneral = addGridPage (1, Qt::Horizontal, i18n("General Options"), TQString(), iconGeneral);
tabCtl = new TQTabWidget (pageGeneral, "general");
behaviourWidget = new PreferencesWidget (tabCtl, "prefPage");
- behaviourWidget->layout()->setMargin(KDialog::marginHint());
+ behaviourWidget->tqlayout()->setMargin(KDialog::marginHint());
tabCtl->addTab (behaviourWidget, i18n("&Preferences"));
commandWidget = new TextToSpeechConfigurationWidget (tabCtl, "ttsTab");
- commandWidget->layout()->setMargin(KDialog::marginHint());
+ commandWidget->tqlayout()->setMargin(KDialog::marginHint());
tabCtl->addTab (commandWidget, i18n("&Text-to-Speech"));
TQPixmap iconCompletion = KGlobal::iconLoader()->loadIcon("keyboard", KIcon::NoGroup, KIcon::SizeMedium);
- TQGrid *pageCompletion = addGridPage (1, Qt::Horizontal, i18n("Word Completion"), TQString::null, iconCompletion);
+ TQGrid *pageCompletion = addGridPage (1, Qt::Horizontal, i18n("Word Completion"), TQString(), iconCompletion);
completionWidget = new WordCompletionWidget(pageCompletion, "Word Completion widget");
kttsd = loadKttsd();
diff --git a/kmouth/optionsdialog.h b/kmouth/optionsdialog.h
index 30f635d..ac50f7d 100644
--- a/kmouth/optionsdialog.h
+++ b/kmouth/optionsdialog.h
@@ -33,8 +33,9 @@ class WordCompletionWidget;
class PreferencesWidget : public PreferencesUI {
Q_OBJECT
+ TQ_OBJECT
public:
- PreferencesWidget(TQWidget *parent, const char *name);
+ PreferencesWidget(TQWidget *tqparent, const char *name);
~PreferencesWidget();
void readOptions (KConfig *config);
@@ -56,8 +57,9 @@ private:
class OptionsDialog : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
- OptionsDialog(TQWidget *parent);
+ OptionsDialog(TQWidget *tqparent);
~OptionsDialog();
void slotCancel();
diff --git a/kmouth/phrasebook/buttonboxui.ui b/kmouth/phrasebook/buttonboxui.ui
index abc999b..d2b5d00 100644
--- a/kmouth/phrasebook/buttonboxui.ui
+++ b/kmouth/phrasebook/buttonboxui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>ButtonBoxUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ButtonBoxUI</cstring>
</property>
@@ -25,7 +25,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QGroupBox" row="0" column="0">
+ <widget class="TQGroupBox" row="0" column="0">
<property name="name">
<cstring>phrasebox</cstring>
</property>
@@ -42,7 +42,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QWidget" row="3" column="2">
+ <widget class="TQWidget" row="3" column="2">
<property name="name">
<cstring>keyButtonPlace</cstring>
</property>
@@ -55,7 +55,7 @@
<string>With this line edit you define the name of a sub-phrasebook or the contents of a phrase.</string>
</property>
</widget>
- <widget class="QRadioButton" row="3" column="0">
+ <widget class="TQRadioButton" row="3" column="0">
<property name="name">
<cstring>noKey</cstring>
</property>
@@ -66,7 +66,7 @@
<string>If you select this option then the selected phrase will not be reachable by a keyboard shortcut.</string>
</property>
</widget>
- <widget class="QRadioButton" row="3" column="1">
+ <widget class="TQRadioButton" row="3" column="1">
<property name="name">
<cstring>customKey</cstring>
</property>
@@ -77,7 +77,7 @@
<string>If you select this option then the selected phrase will be reachable by a keyboard shortcut. You can change the shortcut with the button next to this option.</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0" rowspan="1" colspan="3">
+ <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>shortcutLabel</cstring>
</property>
@@ -85,7 +85,7 @@
<string>Shortcut for the phrase:</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="3">
+ <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>textLabel</cstring>
</property>
@@ -103,5 +103,5 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmouth/phrasebook/phrasebook.cpp b/kmouth/phrasebook/phrasebook.cpp
index cc5d900..2efc2e6 100644
--- a/kmouth/phrasebook/phrasebook.cpp
+++ b/kmouth/phrasebook/phrasebook.cpp
@@ -109,7 +109,7 @@ void PhraseBook::print(KPrinter *pPrinter) {
for (it = begin(); it != end(); ++it) {
TQRect rect = metrics.boundingRect (x+16*(*it).getLevel(), y,
w-16*(*it).getLevel(), 0,
- Qt::AlignJustify | Qt::WordBreak,
+ TQt::AlignJustify | TQt::WordBreak,
(*it).getPhrase().getPhrase());
if (y+rect.height() > size.height()) {
@@ -118,7 +118,7 @@ void PhraseBook::print(KPrinter *pPrinter) {
}
printpainter.drawText (x+16*(*it).getLevel(),y,
w-16*(*it).getLevel(),rect.height(),
- Qt::AlignJustify | Qt::WordBreak,
+ TQt::AlignJustify | TQt::WordBreak,
(*it).getPhrase().getPhrase());
y += rect.height();
}
@@ -151,7 +151,7 @@ TQCString encodeString (const TQString str) {
TQCString res = "";
for (int i = 0; i < (int)str.length(); i++) {
TQChar ch = str.at(i);
- ushort uc = ch.unicode();
+ ushort uc = ch.tqunicode();
TQCString number; number.setNum(uc);
if ((uc>127) || (uc<32) || (ch=='<') || (ch=='>') || (ch=='&') || (ch==';'))
res = res + "&#" + number + ";";
@@ -249,7 +249,7 @@ bool PhraseBook::save (const KURL &url, bool asPhrasebook) {
}
}
-int PhraseBook::save (TQWidget *parent, const TQString &title, KURL &url, bool phrasebookFirst) {
+int PhraseBook::save (TQWidget *tqparent, const TQString &title, KURL &url, bool phrasebookFirst) {
// KFileDialog::getSaveURL(...) is not useful here as we need
// to know the requested file type.
@@ -259,7 +259,7 @@ int PhraseBook::save (TQWidget *parent, const TQString &title, KURL &url, bool p
else
filters = i18n("*.txt|Plain Text Files (*.txt)\n*.phrasebook|Phrase Books (*.phrasebook)\n*|All Files");
- KFileDialog fdlg(TQString::null,filters, parent, "filedialog", true);
+ KFileDialog fdlg(TQString(),filters, tqparent, "filedialog", true);
fdlg.setCaption(title);
fdlg.setOperationMode( KFileDialog::Saving );
@@ -274,20 +274,20 @@ int PhraseBook::save (TQWidget *parent, const TQString &title, KURL &url, bool p
}
if (KIO::NetAccess::exists(url)) {
- 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 0;
}
}
bool result;
if (fdlg.currentFilter() == "*.phrasebook") {
- if (url.fileName (false).contains('.') == 0) {
+ if (url.fileName (false).tqcontains('.') == 0) {
url.setFileName (url.fileName(false) + ".phrasebook");
}
- else if (url.fileName (false).right (11).contains (".phrasebook", false) == 0) {
- int filetype = KMessageBox::questionYesNoCancel (0,TQString("<qt>%1</qt>").arg(i18n("Your chosen filename <i>%1</i> has a different extension than <i>.phrasebook</i>. "
- "Do you wish to add <i>.phrasebook</i> to the filename?").arg(url.filename())),i18n("File Extension"),i18n("Add"),i18n("Do Not Add"));
+ else if (url.fileName (false).right (11).tqcontains (".phrasebook", false) == 0) {
+ int filetype = KMessageBox::questionYesNoCancel (0,TQString("<qt>%1</qt>").tqarg(i18n("Your chosen filename <i>%1</i> has a different extension than <i>.phrasebook</i>. "
+ "Do you wish to add <i>.phrasebook</i> to the filename?").tqarg(url.filename())),i18n("File Extension"),i18n("Add"),i18n("Do Not Add"));
if (filetype == KMessageBox::Cancel) {
return 0;
}
@@ -298,12 +298,12 @@ int PhraseBook::save (TQWidget *parent, const TQString &title, KURL &url, bool p
result = save (url, true);
}
else if (fdlg.currentFilter() == "*.txt") {
- if (url.fileName (false).right (11).contains (".phrasebook", false) == 0) {
+ if (url.fileName (false).right (11).tqcontains (".phrasebook", false) == 0) {
result = save (url, false);
}
else {
- int filetype = KMessageBox::questionYesNoCancel (0,TQString("<qt>%1</qt>").arg(i18n("Your chosen filename <i>%1</i> has the extension <i>.phrasebook</i>. "
- "Do you wish to save in phrasebook format?").arg(url.filename())),i18n("File Extension"),i18n("As Phrasebook"),i18n("As Plain Text"));
+ int filetype = KMessageBox::questionYesNoCancel (0,TQString("<qt>%1</qt>").tqarg(i18n("Your chosen filename <i>%1</i> has the extension <i>.phrasebook</i>. "
+ "Do you wish to save in phrasebook format?").tqarg(url.filename())),i18n("File Extension"),i18n("As Phrasebook"),i18n("As Plain Text"));
if (filetype == KMessageBox::Cancel) {
return 0;
}
@@ -339,7 +339,7 @@ bool PhraseBook::open (const KURL &url) {
// First: try to load it as a normal phrase book
TQFile file(tempFile);
- TQXmlInputSource source (&file);
+ TQXmlInputSource source (TQT_TQIODEVICE(&file));
bool error = !decode (source);
// Second: if the file does not contain a phrase book, load it as
@@ -374,7 +374,7 @@ void PhraseBook::addToGUI (TQPopupMenu *popup, KToolBar *toolbar, KActionCollect
TQObject *receiver, const char *slot) const {
if ((popup != 0) || (toolbar != 0)) {
TQPtrStack<TQWidget> stack;
- TQWidget *parent = popup;
+ TQWidget *tqparent = popup;
int level = 0;
TQValueListConstIterator<PhraseBookEntry> it;
@@ -384,38 +384,38 @@ void PhraseBook::addToGUI (TQPopupMenu *popup, KToolBar *toolbar, KActionCollect
KActionMenu *menu = new KActionMenu("", "phrasebook");
menu->setDelayed(false);
phrases->insert(menu);
- menu->plug (parent);
- if (parent == popup)
+ menu->plug (tqparent);
+ if (tqparent == popup)
menu->plug (toolbar);
- if (parent != 0)
- stack.push (parent);
- parent = menu->popupMenu();
+ if (tqparent != 0)
+ stack.push (tqparent);
+ tqparent = menu->popupMenu();
level++;
}
- while (newLevel < level && (parent != popup)) {
- parent = stack.pop();
+ while (newLevel < level && (tqparent != popup)) {
+ tqparent = stack.pop();
level--;
}
if ((*it).isPhrase()) {
Phrase phrase = (*it).getPhrase();
KAction *action = new PhraseAction (phrase.getPhrase(),
phrase.getShortcut(), receiver, slot, phrases);
- if (parent == popup)
+ if (tqparent == popup)
action->plug (toolbar);
- if (parent != 0)
- action->plug(parent);
+ if (tqparent != 0)
+ action->plug(tqparent);
}
else {
Phrase phrase = (*it).getPhrase();
KActionMenu *menu = new KActionMenu(phrase.getPhrase(), "phrasebook");
menu->setDelayed(false);
phrases->insert(menu);
- if (parent == popup)
+ if (tqparent == popup)
menu->plug (toolbar);
- if (parent != 0)
- menu->plug (parent);
- stack.push (parent);
- parent = menu->popupMenu();
+ if (tqparent != 0)
+ menu->plug (tqparent);
+ stack.push (tqparent);
+ tqparent = menu->popupMenu();
level++;
}
}
@@ -451,9 +451,9 @@ PhraseBookDrag::~PhraseBookDrag () {
void PhraseBookDrag::setBook (PhraseBook *book) {
if (book == 0) {
isEmpty = true;
- xmlphrasebook.setText(TQString::null);
- xml.setText(TQString::null);
- plain.setText(TQString::null);
+ xmlphrasebook.setText(TQString());
+ xml.setText(TQString());
+ plain.setText(TQString());
}
else {
isEmpty = false;
@@ -477,15 +477,15 @@ const char *PhraseBookDrag::format (int i) const {
return xmlphrasebook.format(i/3);
}
-TQByteArray PhraseBookDrag::encodedData (const char* mime) const {
+TQByteArray PhraseBookDrag::tqencodedData (const char* mime) const {
TQCString m(mime);
m = m.lower();
- if (m.contains("xml-phrasebook"))
- return xmlphrasebook.encodedData(mime);
- else if (m.contains("xml"))
- return xml.encodedData(mime);
+ if (m.tqcontains("xml-phrasebook"))
+ return xmlphrasebook.tqencodedData(mime);
+ else if (m.tqcontains("xml"))
+ return xml.tqencodedData(mime);
else
- return plain.encodedData(mime);
+ return plain.tqencodedData(mime);
}
bool PhraseBookDrag::canDecode (const TQMimeSource* e) {
diff --git a/kmouth/phrasebook/phrasebook.h b/kmouth/phrasebook/phrasebook.h
index b0133b1..eb19ea2 100644
--- a/kmouth/phrasebook/phrasebook.h
+++ b/kmouth/phrasebook/phrasebook.h
@@ -118,7 +118,7 @@ public:
* 0, if the user canceled the operation,
* -1, if there was an error when saving the file.
*/
- int save (TQWidget *parent, const TQString &title, KURL &url, bool phrasebookFirst = true);
+ int save (TQWidget *tqparent, const TQString &title, KURL &url, bool phrasebookFirst = true);
/** encodes the phrase book. Returns the encoded xml code. */
TQString encode ();
@@ -148,6 +148,7 @@ public:
*/
class PhraseBookDrag: public TQDragObject {
Q_OBJECT
+ TQ_OBJECT
public:
PhraseBookDrag (PhraseBook *book, TQWidget *dragSource = 0, const char *name = 0);
PhraseBookDrag (TQWidget *dragSource = 0, const char *name = 0);
@@ -156,7 +157,7 @@ public:
virtual void setBook (PhraseBook *book);
const char *format (int i) const;
- virtual TQByteArray encodedData (const char *) const;
+ virtual TQByteArray tqencodedData (const char *) const;
static bool canDecode (const TQMimeSource *e);
static bool decode (const TQMimeSource *e, PhraseBook *book);
@@ -170,9 +171,10 @@ private:
class PhraseAction : public KAction {
Q_OBJECT
+ TQ_OBJECT
public:
- PhraseAction (const TQString& phrase, const TQString& cut, const TQObject* receiver, const char* slot, KActionCollection* parent)
- : KAction (phrase, "phrase", KShortcut(cut), 0, 0, parent, phrase.latin1()) {
+ PhraseAction (const TQString& phrase, const TQString& cut, const TQObject* receiver, const char* slot, KActionCollection* tqparent)
+ : KAction (phrase, "phrase", KShortcut(cut), 0, 0, tqparent, phrase.latin1()) {
this->phrase = phrase;
connect (this, TQT_SIGNAL(slotActivated (const TQString &)), receiver, slot);
};
diff --git a/kmouth/phrasebook/phrasebookdialog.cpp b/kmouth/phrasebook/phrasebookdialog.cpp
index 2abe3d0..6e4deda 100644
--- a/kmouth/phrasebook/phrasebookdialog.cpp
+++ b/kmouth/phrasebook/phrasebookdialog.cpp
@@ -53,9 +53,9 @@ namespace PhraseBookPrivate {
};
}
-CheckBookItem::CheckBookItem (TQListViewItem *parent, TQListViewItem *last,
+CheckBookItem::CheckBookItem (TQListViewItem *tqparent, TQListViewItem *last,
const TQString &text, const TQString &name, const TQString &filename)
- : TQCheckListItem (parent, text, TQCheckListItem::CheckBox)
+ : TQCheckListItem (tqparent, text, TQCheckListItem::CheckBox)
{
moveItem (last);
setText(PhraseBookPrivate::name, name);
@@ -67,12 +67,12 @@ CheckBookItem::CheckBookItem (TQListViewItem *parent, TQListViewItem *last,
else
numberOfBooks = 1;
selectedBooks = 0;
- ((CheckBookItem*)parent)->childChange (numberOfBooks, selectedBooks);
+ ((CheckBookItem*)tqparent)->childChange (numberOfBooks, selectedBooks);
}
-CheckBookItem::CheckBookItem (TQListView *parent, TQListViewItem *last,
+CheckBookItem::CheckBookItem (TQListView *tqparent, TQListViewItem *last,
const TQString &text, const TQString &name, const TQString &filename)
- : TQCheckListItem (parent, text, TQCheckListItem::CheckBox)
+ : TQCheckListItem (tqparent, text, TQCheckListItem::CheckBox)
{
moveItem (last);
setText(PhraseBookPrivate::name, name);
@@ -102,12 +102,12 @@ void CheckBookItem::activate() {
void CheckBookItem::stateChange (bool on) {
TQListViewItem *item = firstChild();
if (item == 0) {
- TQListViewItem *parent = this->parent();
- if (parent != 0) {
+ TQListViewItem *tqparent = this->tqparent();
+ if (tqparent != 0) {
if (on)
- ((CheckBookItem*)parent)->childChange (0, 1);
+ ((CheckBookItem*)tqparent)->childChange (0, 1);
else
- ((CheckBookItem*)parent)->childChange (0, -1);
+ ((CheckBookItem*)tqparent)->childChange (0, -1);
}
}
else propagateStateChange();
@@ -127,19 +127,19 @@ void CheckBookItem::propagateStateChange () {
void CheckBookItem::childChange (int numberDiff, int selDiff) {
numberOfBooks += numberDiff;
selectedBooks += selDiff;
- TQListViewItem *parent = this->parent();
- if (parent != 0)
- ((CheckBookItem*)parent)->childChange (numberDiff, selDiff);
+ TQListViewItem *tqparent = this->tqparent();
+ if (tqparent != 0)
+ ((CheckBookItem*)tqparent)->childChange (numberDiff, selDiff);
TQString text = i18n(" (%1 of %2 books selected)");
- text = text.arg(selectedBooks).arg(numberOfBooks);
+ text = text.tqarg(selectedBooks).tqarg(numberOfBooks);
setText(0, this->text(PhraseBookPrivate::name)+text);
}
/***************************************************************************/
-InitialPhraseBookWidget::InitialPhraseBookWidget (TQWidget *parent, const char *name)
- : TQWidget(parent, name)
+InitialPhraseBookWidget::InitialPhraseBookWidget (TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
{
TQVBoxLayout *mainLayout = new TQVBoxLayout (this, 0, KDialog::spacingHint());
TQLabel *label = new TQLabel (i18n("Please decide which phrase books you need:"), this, "booksTitle");
@@ -165,7 +165,7 @@ InitialPhraseBookWidget::~InitialPhraseBookWidget () {
void InitialPhraseBookWidget::initStandardPhraseBooks() {
StandardBookList bookPaths = PhraseBookDialog::standardPhraseBooks();
- TQListViewItem *parent = 0;
+ TQListViewItem *tqparent = 0;
TQListViewItem *last = 0;
TQStringList currentNamePath = "";
TQPtrStack<TQListViewItem> stack;
@@ -179,26 +179,26 @@ void InitialPhraseBookWidget::initStandardPhraseBooks() {
for (; (it1 != currentNamePath.end())
&& (it1 != dirs.end()) && (*it1 == *it2); ++it1, ++it2);
for (; it1 != currentNamePath.end(); ++it1) {
- last = parent;
- parent = stack.pop();
+ last = tqparent;
+ tqparent = stack.pop();
}
for (; it2 != dirs.end(); ++it2) {
- stack.push (parent);
+ stack.push (tqparent);
TQListViewItem *newParent;
- if (parent == 0)
- newParent = new CheckBookItem (books, last, *it2, *it2, TQString::null);
+ if (tqparent == 0)
+ newParent = new CheckBookItem (books, last, *it2, *it2, TQString());
else
- newParent = new CheckBookItem (parent, last, *it2, *it2, TQString::null);
- parent = newParent;
+ newParent = new CheckBookItem (tqparent, last, *it2, *it2, TQString());
+ tqparent = newParent;
last = 0;
}
currentNamePath = dirs;
TQListViewItem *book;
- if (parent == 0)
+ if (tqparent == 0)
book = new CheckBookItem (books, last, (*it).name, (*it).name, (*it).filename);
else
- book = new CheckBookItem (parent, last, (*it).name, (*it).name, (*it).filename);
+ book = new CheckBookItem (tqparent, last, (*it).name, (*it).name, (*it).filename);
last = book;
}
}
@@ -218,7 +218,7 @@ void InitialPhraseBookWidget::createBook () {
}
while ((item != 0) && (item->nextSibling() == 0)) {
- item = item->parent();
+ item = item->tqparent();
}
if (item != 0)
item = item->nextSibling();
@@ -233,8 +233,8 @@ void InitialPhraseBookWidget::createBook () {
/***************************************************************************/
-ButtonBoxWidget::ButtonBoxWidget (TQWidget *parent, const char *name)
-: ButtonBoxUI (parent, name) {
+ButtonBoxWidget::ButtonBoxWidget (TQWidget *tqparent, const char *name)
+: ButtonBoxUI (tqparent, name) {
keyButtonPlaceLayout = new TQGridLayout (keyButtonPlace, 1, 1, 0, 0, "keyButtonPlaceLayout");
keyButton = new KKeyButton (keyButtonPlace, "key");
@@ -303,10 +303,10 @@ void PhraseBookDialog::initGUI () {
treeView->setAllColumnsShowFocus (true);
treeView->setSelectionMode (TQListView::Extended);
TQWhatsThis::add (treeView, i18n("This list contains the current phrase book in a tree structure. You can select and modify individual phrases and sub phrase books"));
- connect (treeView, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged()));
- connect (treeView, TQT_SIGNAL(contextMenuRequested (TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT(contextMenuRequested (TQListViewItem *, const TQPoint &, int)));
- connect (treeView, TQT_SIGNAL(dropped (TQDropEvent *, TQListViewItem *, TQListViewItem *)), this, TQT_SLOT(slotDropped (TQDropEvent *, TQListViewItem *, TQListViewItem *)));
- connect (treeView, TQT_SIGNAL(moved (TQListViewItem *, TQListViewItem *, TQListViewItem *)), this, TQT_SLOT(slotMoved (TQListViewItem *, TQListViewItem *, TQListViewItem *)));
+ connect (treeView, TQT_SIGNAL(selectionChanged()), TQT_TQOBJECT(this), TQT_SLOT(selectionChanged()));
+ connect (treeView, TQT_SIGNAL(contextMenuRequested (TQListViewItem *, const TQPoint &, int)), TQT_TQOBJECT(this), TQT_SLOT(contextMenuRequested (TQListViewItem *, const TQPoint &, int)));
+ connect (treeView, TQT_SIGNAL(dropped (TQDropEvent *, TQListViewItem *, TQListViewItem *)), TQT_TQOBJECT(this), TQT_SLOT(slotDropped (TQDropEvent *, TQListViewItem *, TQListViewItem *)));
+ connect (treeView, TQT_SIGNAL(moved (TQListViewItem *, TQListViewItem *, TQListViewItem *)), TQT_TQOBJECT(this), TQT_SLOT(slotMoved (TQListViewItem *, TQListViewItem *, TQListViewItem *)));
mainLayout->addWidget (treeView);
buttonBox = new ButtonBoxWidget (page, "buttonbox");
@@ -322,23 +322,23 @@ void PhraseBookDialog::initGUI () {
void PhraseBookDialog::initActions() {
// The file menu
- fileNewPhrase = new KAction (i18n("&New Phrase"), "phrase_new", 0, this, TQT_SLOT(slotAddPhrase()), actionCollection(),"file_new_phrase");
+ fileNewPhrase = new KAction (i18n("&New Phrase"), "phrase_new", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddPhrase()), actionCollection(),"file_new_phrase");
fileNewPhrase->setStatusText(i18n("Adds a new phrase"));
fileNewPhrase->setWhatsThis (i18n("Adds a new phrase"));
- fileNewBook = new KAction (i18n("New Phrase &Book"), "phrasebook_new", 0, this, TQT_SLOT(slotAddPhrasebook()), actionCollection(),"file_new_book");
+ fileNewBook = new KAction (i18n("New Phrase &Book"), "phrasebook_new", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddPhrasebook()), actionCollection(),"file_new_book");
fileNewBook->setStatusText(i18n("Adds a new phrase book into which other books and phrases can be placed"));
fileNewBook->setWhatsThis (i18n("Adds a new phrase book into which other books and phrases can be placed"));
- fileSave = KStdAction::save(this, TQT_SLOT(slotSave()), actionCollection());
+ fileSave = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotSave()), actionCollection());
fileSave->setStatusText(i18n("Saves the phrase book onto the hard disk"));
fileSave->setWhatsThis (i18n("Saves the phrase book onto the hard disk"));
- fileImport = new KAction (i18n("&Import..."), "phrasebook_open", 0, this, TQT_SLOT(slotImportPhrasebook()), actionCollection(),"file_import");
+ fileImport = new KAction (i18n("&Import..."), "phrasebook_open", 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook()), actionCollection(),"file_import");
fileImport->setStatusText(i18n("Imports a file and adds its contents to the phrase book"));
fileImport->setWhatsThis (i18n("Imports a file and adds its contents to the phrase book"));
- toolbarImport = new KToolBarPopupAction (i18n("&Import..."), "phrasebook_open", 0, this, TQT_SLOT(slotImportPhrasebook()), actionCollection(),"toolbar_import");
+ toolbarImport = new KToolBarPopupAction (i18n("&Import..."), "phrasebook_open", 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook()), actionCollection(),"toolbar_import");
toolbarImport->setStatusText(i18n("Imports a file and adds its contents to the phrase book"));
toolbarImport->setWhatsThis (i18n("Imports a file and adds its contents to the phrase book"));
@@ -346,32 +346,32 @@ void PhraseBookDialog::initActions() {
fileImportStandardBook->setStatusText(i18n("Imports a standard phrase book and adds its contents to the phrase book"));
fileImportStandardBook->setWhatsThis (i18n("Imports a standard phrase book and adds its contents to the phrase book"));
- fileExport = new KAction (i18n("&Export..."), "phrasebook_save", 0, this, TQT_SLOT(slotExportPhrasebook()), actionCollection(),"file_export");
+ fileExport = new KAction (i18n("&Export..."), "phrasebook_save", 0, TQT_TQOBJECT(this), TQT_SLOT(slotExportPhrasebook()), actionCollection(),"file_export");
fileExport->setStatusText(i18n("Exports the currently selected phrase(s) or phrase book(s) into a file"));
fileExport->setWhatsThis (i18n("Exports the currently selected phrase(s) or phrase book(s) into a file"));
- filePrint = KStdAction::print(this, TQT_SLOT(slotPrint()), actionCollection());
+ filePrint = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotPrint()), actionCollection());
filePrint->setStatusText(i18n("Prints the currently selected phrase(s) or phrase book(s)"));
filePrint->setWhatsThis (i18n("Prints the currently selected phrase(s) or phrase book(s)"));
- fileClose = KStdAction::close(this, TQT_SLOT(close()), actionCollection());
+ fileClose = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
fileClose->setStatusText(i18n("Closes the window"));
fileClose->setWhatsThis (i18n("Closes the window"));
// The edit menu
- editCut = KStdAction::cut(this, TQT_SLOT(slotCut()), actionCollection());
+ editCut = KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(slotCut()), actionCollection());
editCut->setStatusText(i18n("Cuts the currently selected entries from the phrase book and puts it to the clipboard"));
editCut->setWhatsThis (i18n("Cuts the currently selected entries from the phrase book and puts it to the clipboard"));
- editCopy = KStdAction::copy(this, TQT_SLOT(slotCopy()), actionCollection());
+ editCopy = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), actionCollection());
editCopy->setStatusText(i18n("Copies the currently selected entry from the phrase book to the clipboard"));
editCopy->setWhatsThis (i18n("Copies the currently selected entry from the phrase book to the clipboard"));
- editPaste = KStdAction::paste(this, TQT_SLOT(slotPaste()), actionCollection());
+ editPaste = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(slotPaste()), actionCollection());
editPaste->setStatusText(i18n("Pastes the clipboard contents to actual position"));
editPaste->setWhatsThis (i18n("Pastes the clipboard contents to actual position"));
- editDelete = new KAction (i18n("&Delete"), "editdelete", 0, this, TQT_SLOT(slotRemove()), actionCollection(),"edit_delete");
+ editDelete = new KAction (i18n("&Delete"), "editdelete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotRemove()), actionCollection(),"edit_delete");
editDelete->setStatusText(i18n("Deletes the selected entries from the phrase book"));
editDelete->setWhatsThis (i18n("Deletes the selected entries from the phrase book"));
@@ -383,7 +383,7 @@ TQString PhraseBookDialog::displayPath (TQString filename) {
TQFileInfo file(filename);
TQString path = file.dirPath();
TQString dispPath = "";
- uint position = path.find("/kmouth/books/")+TQString("/kmouth/books/").length();
+ uint position = path.tqfind("/kmouth/books/")+TQString("/kmouth/books/").length();
while (path.length() > position) {
file.setFile(path);
@@ -434,7 +434,7 @@ StandardBookList PhraseBookDialog::standardPhraseBooks() {
void PhraseBookDialog::initStandardPhraseBooks () {
StandardBookList bookPaths = standardPhraseBooks();
- KActionMenu *parent = fileImportStandardBook;
+ KActionMenu *tqparent = fileImportStandardBook;
TQStringList currentNamePath = "x";
TQPtrStack<KActionMenu> stack;
StandardBookList::iterator it;
@@ -450,21 +450,21 @@ void PhraseBookDialog::initStandardPhraseBooks () {
for (; (it1 != currentNamePath.end())
&& (it1 != dirs.end()) && (*it1 == *it2); ++it1, ++it2);
for (; it1 != currentNamePath.end(); ++it1)
- parent = stack.pop();
+ tqparent = stack.pop();
for (; it2 != dirs.end(); ++it2) {
- stack.push (parent);
+ stack.push (tqparent);
KActionMenu *newParent = new KActionMenu (*it2);
- parent->insert(newParent);
- if (parent == fileImportStandardBook)
+ tqparent->insert(newParent);
+ if (tqparent == fileImportStandardBook)
newParent->plug(toolbarImport->popupMenu());
- parent = newParent;
+ tqparent = newParent;
}
currentNamePath = dirs;
KAction *book = new StandardPhraseBookInsertAction (
- url, (*it).name, this, TQT_SLOT(slotImportPhrasebook (const KURL &)), actionCollection());
- parent->insert(book);
- if (parent == fileImportStandardBook)
+ url, (*it).name, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook (const KURL &)), actionCollection());
+ tqparent->insert(book);
+ if (tqparent == fileImportStandardBook)
book->plug(toolbarImport->popupMenu());
}
}
@@ -567,7 +567,7 @@ void PhraseBookDialog::slotNoKey() {
PhraseTreeItem *currentItem = selectedItem (treeView);
if (currentItem != 0) {
- currentItem->setCut (KShortcut(TQString::null));
+ currentItem->setCut (KShortcut(TQString()));
buttonBox->keyButton->setShortcut(currentItem->cut(), false);
}
phrasebookChanged = true;
@@ -597,7 +597,7 @@ void PhraseBookDialog::setShortcut( const KShortcut& cut ) {
{
TQString s = i18n("In order to use the '%1' key as a shortcut, "
"it must be combined with the "
- "Win, Alt, Ctrl, and/or Shift keys.").arg(TQChar(key.sym()));
+ "Win, Alt, Ctrl, and/or Shift keys.").tqarg(TQChar(key.sym()));
KMessageBox::sorry( this, s, i18n("Invalid Shortcut Key") );
return;
}
@@ -615,8 +615,8 @@ void PhraseBookDialog::setShortcut( const KShortcut& cut ) {
}
}
-TQListViewItem *PhraseBookDialog::addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book) {
- TQListViewItem *newItem = treeView->addBook(parent, after, book);
+TQListViewItem *PhraseBookDialog::addBook (TQListViewItem *tqparent, TQListViewItem *after, PhraseBook *book) {
+ TQListViewItem *newItem = treeView->addBook(tqparent, after, book);
if (newItem != 0) {
treeView->clearSelection();
treeView->ensureItemVisible(newItem);
@@ -631,8 +631,8 @@ TQListViewItem *PhraseBookDialog::addBook (TQListViewItem *item, PhraseBook *boo
if (item == 0)
return addBook(0, 0, book);
else if (((PhraseTreeItem *)item)->isPhrase() || !item->isOpen())
- if (item->parent() != 0)
- return addBook(item->parent(), item, book);
+ if (item->tqparent() != 0)
+ return addBook(item->tqparent(), item, book);
else
return addBook(0, item, book);
else
@@ -667,20 +667,20 @@ void PhraseBookDialog::slotCut () {
void PhraseBookDialog::slotCopy () {
PhraseBook book;
treeView->fillBook (&book, true);
- TQApplication::clipboard()->setData(new PhraseBookDrag(&book));
+ TQApplication::tqclipboard()->setData(new PhraseBookDrag(&book));
}
void PhraseBookDialog::slotPaste () {
PhraseBook book;
- if (PhraseBookDrag::decode(TQApplication::clipboard()->data(), &book)) {
+ if (PhraseBookDrag::decode(TQApplication::tqclipboard()->data(), &book)) {
addBook (treeView->currentItem(), &book);
}
}
-void PhraseBookDialog::slotDropped (TQDropEvent *e, TQListViewItem *parent, TQListViewItem *after) {
+void PhraseBookDialog::slotDropped (TQDropEvent *e, TQListViewItem *tqparent, TQListViewItem *after) {
PhraseBook book;
if (PhraseBookDrag::decode(e, &book)) {
- addBook(parent, after, &book);
+ addBook(tqparent, after, &book);
}
}
@@ -719,7 +719,7 @@ void PhraseBookDialog::slotSave () {
}
void PhraseBookDialog::slotImportPhrasebook () {
- KURL url=KFileDialog::getOpenURL(TQString::null,
+ KURL url=KFileDialog::getOpenURL(TQString(),
i18n("*.phrasebook|Phrase Books (*.phrasebook)\n*.txt|Plain Text Files (*.txt)\n*|All Files"), this, i18n("Import Phrasebook"));
slotImportPhrasebook (url);
@@ -731,7 +731,7 @@ void PhraseBookDialog::slotImportPhrasebook (const KURL &url) {
if (book.open (url))
addBook(treeView->currentItem(), &book);
else
- KMessageBox::sorry(this,i18n("There was an error loading file\n%1").arg( url.url() ));
+ KMessageBox::sorry(this,i18n("There was an error loading file\n%1").tqarg( url.url() ));
}
}
@@ -741,7 +741,7 @@ void PhraseBookDialog::slotExportPhrasebook () {
KURL url;
if (book.save (this, i18n("Export Phrase Book"), url) == -1)
- KMessageBox::sorry(this,i18n("There was an error saving file\n%1").arg( url.url() ));
+ KMessageBox::sorry(this,i18n("There was an error saving file\n%1").tqarg( url.url() ));
}
void PhraseBookDialog::slotPrint()
diff --git a/kmouth/phrasebook/phrasebookdialog.h b/kmouth/phrasebook/phrasebookdialog.h
index a3bc352..1a09a79 100644
--- a/kmouth/phrasebook/phrasebookdialog.h
+++ b/kmouth/phrasebook/phrasebookdialog.h
@@ -50,9 +50,9 @@ typedef TQValueList<StandardBook> StandardBookList;
class CheckBookItem : public TQCheckListItem {
public:
- CheckBookItem (TQListViewItem *parent, TQListViewItem *last,
+ CheckBookItem (TQListViewItem *tqparent, TQListViewItem *last,
const TQString &text, const TQString &name, const TQString &filename);
- CheckBookItem (TQListView *parent, TQListViewItem *last,
+ CheckBookItem (TQListView *tqparent, TQListViewItem *last,
const TQString &text, const TQString &name, const TQString &filename);
~CheckBookItem();
@@ -74,8 +74,9 @@ private:
class InitialPhraseBookWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- InitialPhraseBookWidget(TQWidget *parent, const char *name);
+ InitialPhraseBookWidget(TQWidget *tqparent, const char *name);
~InitialPhraseBookWidget();
void createBook();
@@ -94,9 +95,10 @@ private:
*/
class StandardPhraseBookInsertAction : public KAction {
Q_OBJECT
+ TQ_OBJECT
public:
- StandardPhraseBookInsertAction (const KURL &url, const TQString& name, const TQObject* receiver, const char* slot, KActionCollection* parent)
- : KAction (name, "phrasebook", 0, 0, 0, parent, 0) {
+ StandardPhraseBookInsertAction (const KURL &url, const TQString& name, const TQObject* receiver, const char* slot, KActionCollection* tqparent)
+ : KAction (name, "phrasebook", 0, 0, 0, tqparent, 0) {
this->url = url;
connect (this, TQT_SIGNAL(slotActivated (const KURL &)), receiver, slot);
};
@@ -123,7 +125,7 @@ private:
*/
class ButtonBoxWidget : public ButtonBoxUI {
public:
- ButtonBoxWidget (TQWidget *parent = 0, const char *name = 0);
+ ButtonBoxWidget (TQWidget *tqparent = 0, const char *name = 0);
~ButtonBoxWidget ();
KKeyButton *keyButton;
@@ -141,6 +143,7 @@ protected:
class PhraseBookDialog : public KMainWindow {
friend class InitialPhraseBookWidget;
Q_OBJECT
+ TQ_OBJECT
private:
/** Constructor. It is private because this class implements the singleton
* pattern. For creating the instance of the dialog, use the get() method.
@@ -184,7 +187,7 @@ public slots:
void slotExportPhrasebook ();
void slotPrint ();
- void slotDropped (TQDropEvent *e, TQListViewItem *parent, TQListViewItem *after);
+ void slotDropped (TQDropEvent *e, TQListViewItem *tqparent, TQListViewItem *after);
void slotMoved (TQListViewItem *item, TQListViewItem *, TQListViewItem *);
signals:
@@ -199,7 +202,7 @@ private:
/** initializes the list of standard phrase books */
void initStandardPhraseBooks ();
- TQListViewItem *addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book);
+ TQListViewItem *addBook (TQListViewItem *tqparent, TQListViewItem *after, PhraseBook *book);
TQListViewItem *addBook (TQListViewItem *item, PhraseBook *book);
void setShortcut (const KShortcut &cut);
diff --git a/kmouth/phrasebook/phrasebookparser.h b/kmouth/phrasebook/phrasebookparser.h
index a858b4f..fe9db9f 100644
--- a/kmouth/phrasebook/phrasebookparser.h
+++ b/kmouth/phrasebook/phrasebookparser.h
@@ -24,7 +24,7 @@
/**
* This class implements a parser for both the phrase list and for phrase
- * books. It is intended to be used together with the Qt SAX2 framework.
+ * books. It is intended to be used together with the TQt SAX2 framework.
* @author Gunnar Schmi Dt
*/
diff --git a/kmouth/phrasebook/phrasetree.cpp b/kmouth/phrasebook/phrasetree.cpp
index 6ffbaee..dcd08c6 100644
--- a/kmouth/phrasebook/phrasetree.cpp
+++ b/kmouth/phrasebook/phrasetree.cpp
@@ -28,8 +28,8 @@
#include "phrasebookdialog.h"
#include "phrasebook.h"
-PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon)
- : KListViewItem (parent, after, phrase)
+PhraseTreeItem::PhraseTreeItem (TQListView *tqparent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon)
+ : KListViewItem (tqparent, after, phrase)
{
isPhraseValue = true;
cutValue = shortcut;
@@ -38,8 +38,8 @@ PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQStr
setExpandable (false);
}
-PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon)
- : KListViewItem (parent, after, phrase)
+PhraseTreeItem::PhraseTreeItem (TQListViewItem *tqparent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon)
+ : KListViewItem (tqparent, after, phrase)
{
isPhraseValue = true;
cutValue = shortcut;
@@ -47,15 +47,15 @@ PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, T
setPixmap(0, icon);
setExpandable (false);
}
-PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString name, TQPixmap icon)
- : KListViewItem (parent, after, name)
+PhraseTreeItem::PhraseTreeItem (TQListView *tqparent, TQListViewItem *after, TQString name, TQPixmap icon)
+ : KListViewItem (tqparent, after, name)
{
isPhraseValue = false;
setPixmap(0, icon);
setExpandable (true);
}
-PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString name, TQPixmap icon)
- : KListViewItem (parent, after, name)
+PhraseTreeItem::PhraseTreeItem (TQListViewItem *tqparent, TQListViewItem *after, TQString name, TQPixmap icon)
+ : KListViewItem (tqparent, after, name)
{
isPhraseValue = false;
setPixmap(0, icon);
@@ -74,8 +74,8 @@ void PhraseTreeItem::setCut (KShortcut cut) {
// ***************************************************************************
-PhraseTree::PhraseTree (TQWidget *parent, const char *name)
- : KListView (parent, name)
+PhraseTree::PhraseTree (TQWidget *tqparent, const char *name)
+ : KListView (tqparent, name)
{
phrasebook_open = KGlobal::iconLoader()->loadIcon("phrasebook", KIcon::Small);
phrasebook_closed = KGlobal::iconLoader()->loadIcon("phrasebook_closed", KIcon::Small);
@@ -90,14 +90,14 @@ PhraseTree::~PhraseTree (){
namespace PhraseTreePrivate {
TQListViewItem *prevSibling (TQListViewItem *item) {
- TQListViewItem *parent = item->parent();
+ TQListViewItem *tqparent = item->tqparent();
TQListViewItem *above = item->itemAbove();
- if (above == parent)
+ if (above == tqparent)
return 0;
- while (above->parent() != parent)
- above = above->parent();
+ while (above->tqparent() != tqparent)
+ above = above->tqparent();
return above;
}
@@ -109,25 +109,25 @@ namespace PhraseTreePrivate {
if (item == 0)
return false;
- TQListViewItem *parent = item->parent();
+ TQListViewItem *tqparent = item->tqparent();
TQListViewItem *above = item->itemAbove();
if (above == 0)
return false;
- else if (above == parent) {
- *newParent = parent->parent();
- *newAbove = prevSibling (parent);
+ else if (above == tqparent) {
+ *newParent = tqparent->tqparent();
+ *newAbove = prevSibling (tqparent);
return true;
}
- else if (above->parent() == parent) {
- *newParent = parent;
+ else if (above->tqparent() == tqparent) {
+ *newParent = tqparent;
*newAbove = prevSibling (above);
return true;
}
else {
- while (above->parent()->parent() != parent)
- above = above->parent();
- *newParent = above->parent();
+ while (above->tqparent()->tqparent() != tqparent)
+ above = above->tqparent();
+ *newParent = above->tqparent();
*newAbove = above;
return true;
}
@@ -140,14 +140,14 @@ namespace PhraseTreePrivate {
if (item == 0)
return false;
- TQListViewItem *parent = item->parent();
+ TQListViewItem *tqparent = item->tqparent();
TQListViewItem *below = item->nextSibling();
- if (parent == 0 && below == 0)
+ if (tqparent == 0 && below == 0)
return false;
- else if (parent != 0 && below == 0) {
- *newParent = parent->parent();
- *newAbove = parent;
+ else if (tqparent != 0 && below == 0) {
+ *newParent = tqparent->tqparent();
+ *newAbove = tqparent;
return true;
}
else if (below->isOpen()) {
@@ -156,7 +156,7 @@ namespace PhraseTreePrivate {
return true;
}
else {
- *newParent = parent;
+ *newParent = tqparent;
*newAbove = below;
return true;
}
@@ -195,32 +195,32 @@ namespace PhraseTreePrivate {
if (item == 0)
return false;
- TQListViewItem *parent = item->parent();
+ TQListViewItem *tqparent = item->tqparent();
- if (parent == 0)
+ if (tqparent == 0)
return false;
else {
- *newParent = parent->parent();
- *newAbove = parent;
+ *newParent = tqparent->tqparent();
+ *newAbove = tqparent;
return true;
}
}
}
void PhraseTree::moveItem (TQListViewItem *item,
- TQListViewItem *parent,
+ TQListViewItem *tqparent,
TQListViewItem *above)
{
if (item != 0) {
- if (item->parent() == 0)
+ if (item->tqparent() == 0)
takeItem (item);
else
- item->parent()->takeItem (item);
+ item->tqparent()->takeItem (item);
- if (parent == 0)
+ if (tqparent == 0)
insertItem (item);
else
- parent->insertItem (item);
+ tqparent->insertItem (item);
item->moveItem(above);
}
@@ -241,7 +241,7 @@ bool PhraseTree::hasSelectedItems() {
}
else {
while ((i != 0) && (i->nextSibling() == 0)) {
- i = i->parent();
+ i = i->tqparent();
level--;
}
if (i != 0)
@@ -267,7 +267,7 @@ void PhraseTree::deleteSelectedItems() {
}
else {
while ((i != 0) && (i->nextSibling() == 0)) {
- i = i->parent();
+ i = i->tqparent();
}
if (i != 0)
i = i->nextSibling();
@@ -281,15 +281,15 @@ void PhraseTree::deleteSelectedItems() {
}
void PhraseTree::keyPressEvent (TQKeyEvent *e) {
- if ((e->state() & Qt::KeyButtonMask) == Qt::AltButton) {
- if (e->key() == Qt::Key_Up) {
+ if ((e->state() & TQt::KeyButtonMask) == TQt::AltButton) {
+ if (e->key() == TQt::Key_Up) {
TQListViewItem *item = currentItem();
if ((item != 0) && (item->isSelected())) {
- TQListViewItem *parent;
+ TQListViewItem *tqparent;
TQListViewItem *above;
- if (PhraseTreePrivate::findAbovePosition (item, &parent, &above)) {
- moveItem(item, parent, above);
+ if (PhraseTreePrivate::findAbovePosition (item, &tqparent, &above)) {
+ moveItem(item, tqparent, above);
setCurrentItem (item);
item->setSelected(true);
}
@@ -297,14 +297,14 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) {
e->accept();
return;
}
- else if (e->key() == Qt::Key_Down) {
+ else if (e->key() == TQt::Key_Down) {
TQListViewItem *item = currentItem();
if ((item != 0) && (item->isSelected())) {
- TQListViewItem *parent;
+ TQListViewItem *tqparent;
TQListViewItem *above;
- if (PhraseTreePrivate::findBelowPosition (item, &parent, &above)) {
- moveItem(item, parent, above);
+ if (PhraseTreePrivate::findBelowPosition (item, &tqparent, &above)) {
+ moveItem(item, tqparent, above);
setCurrentItem (item);
item->setSelected(true);
}
@@ -312,14 +312,14 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) {
e->accept();
return;
}
- else if (e->key() == Qt::Key_Left) {
+ else if (e->key() == TQt::Key_Left) {
TQListViewItem *item = currentItem();
if ((item != 0) && (item->isSelected())) {
- TQListViewItem *parent;
+ TQListViewItem *tqparent;
TQListViewItem *above;
- if (PhraseTreePrivate::findLeftPosition (item, &parent, &above)) {
- moveItem(item, parent, above);
+ if (PhraseTreePrivate::findLeftPosition (item, &tqparent, &above)) {
+ moveItem(item, tqparent, above);
setCurrentItem (item);
item->setSelected(true);
}
@@ -327,14 +327,14 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) {
e->accept();
return;
}
- else if (e->key() == Qt::Key_Right) {
+ else if (e->key() == TQt::Key_Right) {
TQListViewItem *item = currentItem();
if ((item != 0) && (item->isSelected())) {
- TQListViewItem *parent;
+ TQListViewItem *tqparent;
TQListViewItem *above;
- if (PhraseTreePrivate::findRightPosition (item, &parent, &above)) {
- moveItem(item, parent, above);
+ if (PhraseTreePrivate::findRightPosition (item, &tqparent, &above)) {
+ moveItem(item, tqparent, above);
setCurrentItem (item);
item->setSelected(true);
}
@@ -346,57 +346,57 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) {
KListView::keyPressEvent(e);
}
-PhraseTreeItem *PhraseTree::insertPhrase (TQListViewItem *parent, TQListViewItem *after, TQString phrase, TQString shortcut) {
+PhraseTreeItem *PhraseTree::insertPhrase (TQListViewItem *tqparent, TQListViewItem *after, TQString phrase, TQString shortcut) {
KShortcut cut = KShortcut(shortcut);
if (isKeyPresent (cut, 0, false))
- cut = KShortcut(TQString::null);
+ cut = KShortcut(TQString());
- if (parent == 0)
+ if (tqparent == 0)
return new PhraseTreeItem (this, after, phrase, cut, this->phrase);
else
- return new PhraseTreeItem (parent, after, phrase, cut, this->phrase);
+ return new PhraseTreeItem (tqparent, after, phrase, cut, this->phrase);
}
-PhraseTreeItem *PhraseTree::insertBook (TQListViewItem *parent, TQListViewItem *after, TQString name) {
- if (parent == 0)
+PhraseTreeItem *PhraseTree::insertBook (TQListViewItem *tqparent, TQListViewItem *after, TQString name) {
+ if (tqparent == 0)
return new PhraseTreeItem (this, after, name, phrasebook_closed);
else
- return new PhraseTreeItem (parent, after, name, phrasebook_closed);
+ return new PhraseTreeItem (tqparent, after, name, phrasebook_closed);
}
-TQListViewItem *PhraseTree::addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book) {
+TQListViewItem *PhraseTree::addBook (TQListViewItem *tqparent, TQListViewItem *after, PhraseBook *book) {
TQListViewItem *last = after;
int level = 0;
PhraseBookEntryList::iterator it;
for (it = book->begin(); it != book->end(); ++it) {
int newLevel = (*it).getLevel();
while (level < newLevel) {
- parent = insertBook(parent, last, "");
+ tqparent = insertBook(tqparent, last, "");
last = 0;
level++;
}
while (level > newLevel) {
- last = parent;
- if (parent != 0)
- parent = parent->parent();
+ last = tqparent;
+ if (tqparent != 0)
+ tqparent = tqparent->tqparent();
level--;
}
if ((*it).isPhrase()) {
Phrase phrase = (*it).getPhrase();
- last = insertPhrase (parent, last, phrase.getPhrase(), phrase.getShortcut());
+ last = insertPhrase (tqparent, last, phrase.getPhrase(), phrase.getShortcut());
}
else {
Phrase phrase = (*it).getPhrase();
- parent = insertBook(parent, last, phrase.getPhrase());
+ tqparent = insertBook(tqparent, last, phrase.getPhrase());
last = 0;
level++;
}
}
while (level > 0) {
- last = parent;
- if (parent != 0)
- parent = parent->parent();
+ last = tqparent;
+ if (tqparent != 0)
+ tqparent = tqparent->tqparent();
level--;
}
return last;
@@ -421,7 +421,7 @@ void PhraseTree::fillBook (PhraseBook *book, bool respectSelection) {
}
else {
while ((i != 0) && (i->nextSibling() == 0)) {
- i = i->parent();
+ i = i->tqparent();
if (level > 0)
level--;
}
@@ -470,7 +470,7 @@ void PhraseTree::_warning (const KKeySequence& cut, TQString sAction, TQString s
i18n("The '%1' key combination has already been allocated "
"to %2.\n"
"Please choose a unique key combination.").
- arg(cut.toString()).arg(sAction);
+ tqarg(cut.toString()).tqarg(sAction);
KMessageBox::sorry( this, s, sTitle );
}
@@ -485,7 +485,7 @@ bool PhraseTree::isStdAccelPresent (const KShortcut& cut, bool warnUser) {
{
if (warnUser)
_warning (cut.seq(iSeq),
- i18n("the standard \"%1\" action").arg(KStdAccel::label(id)),
+ i18n("the standard \"%1\" action").tqarg(KStdAccel::label(id)),
i18n("Conflict with Standard Application Shortcut"));
return true;
}
@@ -501,7 +501,7 @@ bool PhraseTree::isGlobalKeyPresent (const KShortcut& cut, bool warnUser) {
if (iSeq > -1) {
if (warnUser)
_warning (cut.seq(iSeq),
- i18n("the global \"%1\" action").arg(it.key()),
+ i18n("the global \"%1\" action").tqarg(it.key()),
i18n("Conflict with Global Shortcuts"));
return true;
}
diff --git a/kmouth/phrasebook/phrasetree.h b/kmouth/phrasebook/phrasetree.h
index 45ae26c..26af68c 100644
--- a/kmouth/phrasebook/phrasetree.h
+++ b/kmouth/phrasebook/phrasetree.h
@@ -33,13 +33,13 @@ class PhraseTreeItem : public KListViewItem {
friend class PhraseTree;
private:
/** Creates a phrase item within a sub phrase book */
- PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon);
+ PhraseTreeItem (TQListView *tqparent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon);
/** Creates a phrase item at the top level */
- PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon);
+ PhraseTreeItem (TQListViewItem *tqparent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon);
/** Creates a phrase book item within a sub phrase book */
- PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString name, TQPixmap icon);
+ PhraseTreeItem (TQListView *tqparent, TQListViewItem *after, TQString name, TQPixmap icon);
/** Creates a phrase book item at the top level */
- PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString name, TQPixmap icon);
+ PhraseTreeItem (TQListViewItem *tqparent, TQListViewItem *after, TQString name, TQPixmap icon);
public:
bool isPhrase();
@@ -60,22 +60,23 @@ private:
class PhraseTree : public KListView {
friend class PhraseTreeItem;
Q_OBJECT
+ TQ_OBJECT
public:
- PhraseTree (TQWidget *parent = 0, const char *name = 0);
+ PhraseTree (TQWidget *tqparent = 0, const char *name = 0);
~PhraseTree ();
void keyPressEvent (TQKeyEvent *e);
- PhraseTreeItem *insertPhrase (TQListViewItem *parent, TQListViewItem *after, TQString phrase, TQString shortcut);
- PhraseTreeItem *insertBook (TQListViewItem *parent, TQListViewItem *after, TQString name);
+ PhraseTreeItem *insertPhrase (TQListViewItem *tqparent, TQListViewItem *after, TQString phrase, TQString shortcut);
+ PhraseTreeItem *insertBook (TQListViewItem *tqparent, TQListViewItem *after, TQString name);
- TQListViewItem *addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book);
+ TQListViewItem *addBook (TQListViewItem *tqparent, TQListViewItem *after, PhraseBook *book);
void fillBook (PhraseBook *book, bool respectSelection);
TQDragObject *dragObject ();
TQDragObject *dragObject (bool isDependent);
- void moveItem (TQListViewItem *item, TQListViewItem *parent, TQListViewItem *above);
+ void moveItem (TQListViewItem *item, TQListViewItem *tqparent, TQListViewItem *above);
bool hasSelectedItems();
void deleteSelectedItems();
diff --git a/kmouth/phraseedit.cpp b/kmouth/phraseedit.cpp
index 000a1f5..4397bb6 100644
--- a/kmouth/phraseedit.cpp
+++ b/kmouth/phraseedit.cpp
@@ -17,36 +17,36 @@
#include "phraseedit.h"
-PhraseEdit::PhraseEdit(const TQString &string, TQWidget *parent)
- : KLineEdit (string, parent) {
+PhraseEdit::PhraseEdit(const TQString &string, TQWidget *tqparent)
+ : KLineEdit (string, tqparent) {
}
PhraseEdit::~PhraseEdit() {
}
void PhraseEdit::keyPressEvent (TQKeyEvent *e) {
- if ((e->state() & Qt::KeyButtonMask) == Qt::ControlButton) {
- if (e->key() == Qt::Key_C) {
+ if ((e->state() & TQt::KeyButtonMask) == TQt::ControlButton) {
+ if (e->key() == TQt::Key_C) {
if (!this->hasSelectedText()) {
e->ignore();
return;
}
}
- else if (e->key() == Qt::Key_Insert) {
+ else if (e->key() == TQt::Key_Insert) {
if (!hasSelectedText()) {
e->ignore();
return;
}
}
- else if (e->key() == Qt::Key_X) {
+ else if (e->key() == TQt::Key_X) {
if (!hasSelectedText()) {
e->ignore();
return;
}
}
}
- else if ((e->state() & Qt::KeyButtonMask) == Qt::ShiftButton) {
- if (e->key() == Qt::Key_Delete) {
+ else if ((e->state() & TQt::KeyButtonMask) == TQt::ShiftButton) {
+ if (e->key() == TQt::Key_Delete) {
if (!hasSelectedText()) {
e->ignore();
return;
diff --git a/kmouth/phraseedit.h b/kmouth/phraseedit.h
index 0ebd132..ccc5342 100644
--- a/kmouth/phraseedit.h
+++ b/kmouth/phraseedit.h
@@ -27,7 +27,7 @@
class PhraseEdit : public KLineEdit {
public:
- PhraseEdit(const TQString &string, TQWidget *parent);
+ PhraseEdit(const TQString &string, TQWidget *tqparent);
virtual ~PhraseEdit();
void keyPressEvent (TQKeyEvent *e);
diff --git a/kmouth/phraselist.cpp b/kmouth/phraselist.cpp
index 48148c3..6264f14 100644
--- a/kmouth/phraselist.cpp
+++ b/kmouth/phraselist.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-// include files for Qt
+// include files for TQt
#include <tqprinter.h>
#include <tqpainter.h>
#include <tqlayout.h>
@@ -45,19 +45,19 @@
#include "phrasebook/phrasebook.h"
#include "wordcompletion/wordcompletion.h"
-PhraseList::PhraseList(TQWidget *parent, const char *name) : TQWidget(parent,name) {
+PhraseList::PhraseList(TQWidget *tqparent, const char *name) : TQWidget(tqparent,name) {
isInSlot = false;
setBackgroundMode(PaletteBase);
- TQVBoxLayout *layout = new TQVBoxLayout (this);
+ TQVBoxLayout *tqlayout = new TQVBoxLayout (this);
listBox = new KListBox (this);
- listBox->setFocusPolicy(TQWidget::NoFocus);
+ listBox->setFocusPolicy(TQ_NoFocus);
listBox->setSelectionMode (TQListBox::Extended);
TQWhatsThis::add (listBox, i18n("This list contains the history of spoken sentences. You can select sentences and press the speak button for re-speaking."));
- layout->addWidget(listBox);
+ tqlayout->addWidget(listBox);
TQHBoxLayout *rowLayout = new TQHBoxLayout ();
- layout->addLayout(rowLayout);
+ tqlayout->addLayout(rowLayout);
completion = new WordCompletion();
@@ -66,7 +66,7 @@ PhraseList::PhraseList(TQWidget *parent, const char *name) : TQWidget(parent,nam
rowLayout->addWidget(dictionaryCombo);
lineEdit = new PhraseEdit ("", this);
- lineEdit->setFocusPolicy(TQWidget::StrongFocus);
+ lineEdit->setFocusPolicy(TQ_StrongFocus);
lineEdit->setFrame(true);
lineEdit->setEchoMode(TQLineEdit::Normal);
lineEdit->setCompletionObject (completion);
@@ -77,7 +77,7 @@ PhraseList::PhraseList(TQWidget *parent, const char *name) : TQWidget(parent,nam
TQIconSet icon = KGlobal::iconLoader()->loadIconSet("speak", KIcon::Small);
speakButton = new TQPushButton (icon, i18n("&Speak"), this);
- speakButton->setFocusPolicy(TQWidget::NoFocus);
+ speakButton->setFocusPolicy(TQ_NoFocus);
speakButton->setAutoDefault(false);
TQWhatsThis::add (speakButton, i18n("Speaks the currently active sentence(s). If there is some text in the edit field it is spoken. Otherwise the selected sentences in the history (if any) are spoken."));
rowLayout->addWidget(speakButton);
@@ -139,7 +139,7 @@ void PhraseList::enableMenuEntries() {
else
deselected = true;
}
- KMouthApp *theApp=(KMouthApp *) parentWidget();
+ KMouthApp *theApp=(KMouthApp *) tqparentWidget();
theApp->enableMenuEntries (selected, deselected);
}
@@ -191,7 +191,7 @@ void PhraseList::readCompletionOptions(KConfig *config) {
int mode = config->readNumEntry ("Mode", KGlobalSettings::completionMode());
lineEdit->setCompletionMode (static_cast<KGlobalSettings::Completion>(mode));
- TQString current = config->readEntry ("List", TQString::null);
+ TQString current = config->readEntry ("List", TQString());
TQStringList list = completion->wordLists();
TQStringList::ConstIterator it;
int i = 0;
@@ -271,7 +271,7 @@ void PhraseList::cutListSelection () {
}
void PhraseList::copyListSelection () {
- TQApplication::clipboard()->setText (getListSelection().join ("\n"));
+ TQApplication::tqclipboard()->setText (getListSelection().join ("\n"));
}
void PhraseList::lineEntered (const TQString &phrase) {
@@ -285,7 +285,7 @@ void PhraseList::lineEntered (const TQString &phrase) {
void PhraseList::speakPhrase (const TQString &phrase) {
TQApplication::setOverrideCursor (KCursor::WaitCursor, false);
- KMouthApp *theApp=(KMouthApp *) parentWidget();
+ KMouthApp *theApp=(KMouthApp *) tqparentWidget();
TQString language = completion->languageOfWordList (completion->currentWordList());
theApp->getTTSSystem()->speak(phrase, language);
TQApplication::restoreOverrideCursor ();
@@ -313,7 +313,7 @@ void PhraseList::contextMenuRequested (TQListBoxItem *, const TQPoint &pos) {
else
name = "phraselist_popup";
- KMouthApp *theApp=(KMouthApp *) parentWidget();
+ KMouthApp *theApp=(KMouthApp *) tqparentWidget();
KXMLGUIFactory *factory = theApp->factory();
TQPopupMenu *popup = (TQPopupMenu *)factory->container(name,theApp);
if (popup != 0) {
@@ -357,7 +357,7 @@ void PhraseList::setEditLineText(const TQString &s) {
}
void PhraseList::keyPressEvent (TQKeyEvent *e) {
- if (e->key() == Qt::Key_Up) {
+ if (e->key() == TQt::Key_Up) {
bool selected = false;
for (TQListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) {
if (item->isSelected()) {
@@ -394,7 +394,7 @@ void PhraseList::keyPressEvent (TQKeyEvent *e) {
e->accept();
}
- else if (e->key() == Qt::Key_Down) {
+ else if (e->key() == TQt::Key_Down) {
bool selected = false;
for (TQListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) {
if (item->isSelected()) {
@@ -419,12 +419,12 @@ void PhraseList::keyPressEvent (TQKeyEvent *e) {
}
e->accept();
}
- else if ((e->state() & Qt::KeyButtonMask) == Qt::ControlButton) {
- if (e->key() == Qt::Key_C) {
+ else if ((e->state() & TQt::KeyButtonMask) == TQt::ControlButton) {
+ if (e->key() == TQt::Key_C) {
copy();
e->accept();
}
- else if (e->key() == Qt::Key_X) {
+ else if (e->key() == TQt::Key_X) {
cut();
e->accept();
}
@@ -446,11 +446,11 @@ void PhraseList::save () {
KURL url;
if (book.save (this, i18n("Save As"), url, false) == -1)
- KMessageBox::sorry(this,i18n("There was an error saving file\n%1").arg( url.url() ));
+ KMessageBox::sorry(this,i18n("There was an error saving file\n%1").tqarg( url.url() ));
}
void PhraseList::open () {
- KURL url=KFileDialog::getOpenURL(TQString::null,
+ KURL url=KFileDialog::getOpenURL(TQString(),
i18n("*|All Files\n*.phrasebook|Phrase Books (*.phrasebook)\n*.txt|Plain Text Files (*.txt)"), this, i18n("Open File as History"));
if(!url.isEmpty())
@@ -464,7 +464,7 @@ void PhraseList::open (KURL url) {
PhraseBook book;
if (book.open (url)) {
- // convert PhraseBookEntryList -> QStringList
+ // convert PhraseBookEntryList -> TQStringList
TQStringList list = book.toStringList();
listBox->clear();
TQStringList::iterator it;
@@ -472,7 +472,7 @@ void PhraseList::open (KURL url) {
insertIntoPhraseList (*it, false);
}
else
- KMessageBox::sorry(this,i18n("There was an error loading file\n%1").arg( url.url() ));
+ KMessageBox::sorry(this,i18n("There was an error loading file\n%1").tqarg( url.url() ));
}
#include "phraselist.moc"
diff --git a/kmouth/phraselist.h b/kmouth/phraselist.h
index 702e135..cad58ad 100644
--- a/kmouth/phraselist.h
+++ b/kmouth/phraselist.h
@@ -23,7 +23,7 @@
#include <klineedit.h>
#include <kprinter.h>
-// include files for Qt
+// include files for TQt
#include <tqwidget.h>
#include <tqpushbutton.h>
@@ -40,8 +40,9 @@ class WordCompletion;
class PhraseList : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- PhraseList(TQWidget *parent=0, const char *name=0);
+ PhraseList(TQWidget *tqparent=0, const char *name=0);
~PhraseList();
/** contains the implementation for printing functionality */
diff --git a/kmouth/phraselistitem.cpp b/kmouth/phraselistitem.cpp
index 721e893..6e902f3 100644
--- a/kmouth/phraselistitem.cpp
+++ b/kmouth/phraselistitem.cpp
@@ -46,7 +46,7 @@ void PhraseListItem::paint (TQPainter *p) {
if (drawCursor()) {
TQRect r (0, 0, listBox()->maxItemWidth(), height (listBox()));
- listBox()->style().drawPrimitive (TQStyle::PE_FocusRect, p, r,
- listBox()->colorGroup());
+ listBox()->tqstyle().tqdrawPrimitive (TQStyle::PE_FocusRect, p, r,
+ listBox()->tqcolorGroup());
}
}
diff --git a/kmouth/preferencesui.ui b/kmouth/preferencesui.ui
index a718b9d..dcc219d 100644
--- a/kmouth/preferencesui.ui
+++ b/kmouth/preferencesui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>PreferencesUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>PreferencesUI</cstring>
</property>
@@ -33,7 +33,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout1</cstring>
</property>
@@ -47,7 +47,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>speakLabel</cstring>
</property>
@@ -92,7 +92,7 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout2</cstring>
</property>
@@ -106,7 +106,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>closeLabel</cstring>
</property>
@@ -158,5 +158,5 @@
</widget>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmouth/speech.cpp b/kmouth/speech.cpp
index 8fc8f19..300bfb1 100644
--- a/kmouth/speech.cpp
+++ b/kmouth/speech.cpp
@@ -51,7 +51,7 @@ TQString Speech::prepareCommand (TQString command, const TQString &text,
TQValueStack<bool> stack; // saved isdoublequote values during parsing of braces
bool issinglequote=false; // inside '...' ?
bool isdoublequote=false; // inside "..." ?
- int noreplace=0; // nested braces when within ${...}
+ int notqreplace=0; // nested braces when within ${...}
TQString escText = KShellProcess::quote(text);
// character sequences that change the state or need to be otherwise processed
@@ -71,17 +71,17 @@ TQString Speech::prepareCommand (TQString command, const TQString &text,
if ((command[i]=='(') || (command[i]=='{')) { // (...) or {...}
// assert(isdoublequote == false)
stack.push(isdoublequote);
- if (noreplace > 0)
+ if (notqreplace > 0)
// count nested braces when within ${...}
- noreplace++;
+ notqreplace++;
i++;
}
else if (command[i]=='$') { // $(...) or ${...}
stack.push(isdoublequote);
isdoublequote = false;
- if ((noreplace > 0) || (command[i+1]=='{'))
+ if ((notqreplace > 0) || (command[i+1]=='{'))
// count nested braces when within ${...}
- noreplace++;
+ notqreplace++;
i+=2;
}
else if ((command[i]==')') || (command[i]=='}')) {
@@ -90,9 +90,9 @@ TQString Speech::prepareCommand (TQString command, const TQString &text,
isdoublequote = stack.pop();
else
qWarning("Parse error.");
- if (noreplace > 0)
+ if (notqreplace > 0)
// count nested braces when within ${...}
- noreplace--;
+ notqreplace--;
i++;
}
else if (command[i]=='\'') {
@@ -107,7 +107,7 @@ TQString Speech::prepareCommand (TQString command, const TQString &text,
i+=2;
else if (command[i]=='`') {
// Replace all `...` with safer $(...)
- command.replace (i, 1, "$(");
+ command.tqreplace (i, 1, "$(");
TQRegExp re_backticks("(`|\\\\`|\\\\\\\\|\\\\\\$)");
for (int i2=re_backticks.search(command,i+2);
i2!=-1;
@@ -115,7 +115,7 @@ TQString Speech::prepareCommand (TQString command, const TQString &text,
)
{
if (command[i2] == '`') {
- command.replace (i2, 1, ")");
+ command.tqreplace (i2, 1, ")");
i2=command.length(); // leave loop
}
else {
@@ -126,7 +126,7 @@ TQString Speech::prepareCommand (TQString command, const TQString &text,
}
// Leave i unchanged! We need to process "$("
}
- else if (noreplace > 0) { // do not replace macros within ${...}
+ else if (notqreplace > 0) { // do not replace macros within ${...}
if (issinglequote)
i+=re_singlequote.matchedLength();
else if (isdoublequote)
@@ -161,7 +161,7 @@ TQString Speech::prepareCommand (TQString command, const TQString &text,
else if (issinglequote)
v="'"+v+"'";
- command.replace (i, match.length(), v);
+ command.tqreplace (i, match.length(), v);
i+=v.length();
}
}
@@ -225,10 +225,10 @@ void Speech::speak(TQString command, bool stdIn, const TQString &text, const TQS
}
void Speech::receivedStdout (KProcess *, char *buffer, int buflen) {
- kdDebug() << TQString::fromLatin1(buffer, buflen) + "\n";
+ kdDebug() << TQString::tqfromLatin1(buffer, buflen) + "\n";
}
void Speech::receivedStderr (KProcess *, char *buffer, int buflen) {
- kdDebug() << TQString::fromLatin1(buffer, buflen) + "\n";
+ kdDebug() << TQString::tqfromLatin1(buffer, buflen) + "\n";
}
void Speech::wroteStdin(KProcess *) {
diff --git a/kmouth/speech.h b/kmouth/speech.h
index 11331cf..f92bb98 100644
--- a/kmouth/speech.h
+++ b/kmouth/speech.h
@@ -29,6 +29,7 @@
class Speech : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
enum CharacterCodec {
Local = 0,
diff --git a/kmouth/texttospeechconfigurationui.ui b/kmouth/texttospeechconfigurationui.ui
index de393ce..877b831 100644
--- a/kmouth/texttospeechconfigurationui.ui
+++ b/kmouth/texttospeechconfigurationui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>texttospeechconfigurationui</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>texttospeechconfigurationui</cstring>
</property>
@@ -25,7 +25,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout4</cstring>
</property>
@@ -39,7 +39,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>urlLabel</cstring>
</property>
@@ -87,7 +87,7 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout5</cstring>
</property>
@@ -101,7 +101,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>characterCodingLabel</cstring>
</property>
@@ -133,7 +133,7 @@
</widget>
</vbox>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>stdInButton</cstring>
</property>
@@ -144,7 +144,7 @@
<string>This check box specifies whether the text is sent as standard input to the speech synthesizer.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>useKttsd</cstring>
</property>
@@ -157,10 +157,10 @@
</widget>
</vbox>
</widget>
-<signals>
+<Q_SIGNALS>
<signal>configurationChanged()</signal>
-</signals>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SIGNALS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/kmouth/texttospeechconfigurationwidget.cpp b/kmouth/texttospeechconfigurationwidget.cpp
index f7fe16a..11ad5d9 100644
--- a/kmouth/texttospeechconfigurationwidget.cpp
+++ b/kmouth/texttospeechconfigurationwidget.cpp
@@ -31,8 +31,8 @@
#include <tqcheckbox.h>
#include <kurlrequester.h>
-TextToSpeechConfigurationWidget::TextToSpeechConfigurationWidget (TQWidget *parent, const char *name)
- : texttospeechconfigurationui (parent, name)
+TextToSpeechConfigurationWidget::TextToSpeechConfigurationWidget (TQWidget *tqparent, const char *name)
+ : texttospeechconfigurationui (tqparent, name)
{
ttsSystem = new TextToSpeechSystem();
diff --git a/kmouth/texttospeechconfigurationwidget.h b/kmouth/texttospeechconfigurationwidget.h
index a5ef3ba..0e567a3 100644
--- a/kmouth/texttospeechconfigurationwidget.h
+++ b/kmouth/texttospeechconfigurationwidget.h
@@ -30,7 +30,7 @@
class TextToSpeechConfigurationWidget : public texttospeechconfigurationui {
friend class TextToSpeechConfigurationDialog;
public:
- TextToSpeechConfigurationWidget(TQWidget *parent, const char *name);
+ TextToSpeechConfigurationWidget(TQWidget *tqparent, const char *name);
~TextToSpeechConfigurationWidget();
TextToSpeechSystem *getTTSSystem() const;
diff --git a/kmouth/texttospeechsystem.h b/kmouth/texttospeechsystem.h
index f435585..db494e7 100644
--- a/kmouth/texttospeechsystem.h
+++ b/kmouth/texttospeechsystem.h
@@ -29,8 +29,9 @@ class KConfig;
*@author Gunnar Schmi Dt
*/
-class TextToSpeechSystem : public QObject{
+class TextToSpeechSystem : public TQObject{
Q_OBJECT
+ TQ_OBJECT
friend class TextToSpeechConfigurationWidget;
public:
TextToSpeechSystem();
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
*/