summaryrefslogtreecommitdiffstats
path: root/kiten/learn.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kiten/learn.cpp')
-rw-r--r--kiten/learn.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/kiten/learn.cpp b/kiten/learn.cpp
index 3faa9c25..2b4aa2d3 100644
--- a/kiten/learn.cpp
+++ b/kiten/learn.cpp
@@ -31,10 +31,10 @@
#include <kstringhandler.h>
#include <tqbuttongroup.h>
#include <tqheader.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqtabwidget.h>
#include <tqtimer.h>
-#include <textcodec.h>
+#include <tqtextcodec.h>
#include <stdlib.h> // RAND_MAX
#include <cassert>
@@ -138,12 +138,12 @@ Learn::Learn(Dict::Index *parentDict, TQWidget *parent, const char *name)
TQVBoxLayout *quizLayout = new TQVBoxLayout(quizTop, KDialog::marginHint(), KDialog::spacingHint());
quizLayout->addStretch();
- TQHBoxLayout *hlayout = new TQHBoxLayout(quizLayout);
+ TQHBoxLayout *htqlayout = new TQHBoxLayout(quizLayout);
qKanji = new TQPushButton(quizTop);
connect(qKanji, TQT_SIGNAL(clicked()), this, TQT_SLOT(qKanjiClicked()));
- hlayout->addStretch();
- hlayout->addWidget(qKanji);
- hlayout->addStretch();
+ htqlayout->addStretch();
+ htqlayout->addWidget(qKanji);
+ htqlayout->addStretch();
quizLayout->addStretch();
answers = new TQButtonGroup(1,Qt::Horizontal, quizTop);
@@ -299,7 +299,7 @@ void Learn::update()
TQString kanji = curKanji.kanji();
Dict::SearchResult compounds = index->search(TQRegExp(kanji), kanji, true);
- View->addHeader(i18n("%1 in compounds").arg(kanji));
+ View->addHeader(i18n("%1 in compounds").tqarg(kanji));
for (TQValueListIterator<Dict::Entry> it = compounds.list.begin(); it != compounds.list.end(); ++it)
{
@@ -315,12 +315,12 @@ void Learn::updateGrade()
int grade = getCurrentGrade();
TQString regexp("G%1 ");
- regexp = regexp.arg(grade);
+ regexp = regexp.tqarg(grade);
Dict::SearchResult result = index->searchKanji(TQRegExp(regexp), regexp, false);
list = result.list;
- statusBar()->message(i18n("%1 entries in grade %2").arg(list.count()).arg(grade));
+ statusBar()->message(i18n("%1 entries in grade %2").tqarg(list.count()).tqarg(grade));
list.remove(list.begin());
current = list.begin();
@@ -351,7 +351,7 @@ void Learn::read(const KURL &url)
// ignore whitespace
if (!kanji.isSpace())
{
- TQRegExp regexp ( TQString("^%1\\W").arg(kanji) );
+ TQRegExp regexp ( TQString("^%1\\W").tqarg(kanji) );
Dict::SearchResult res = index->searchKanji(regexp, kanji, false);
Dict::Entry first = Dict::firstEntry(res);
if (first.extendedKanjiInfo())
@@ -444,7 +444,7 @@ void Learn::write(const KURL &url)
stream.setCodec(&codec);
for (TQListViewItemIterator it(List); it.current(); ++it)
- stream << it.current()->text(0).at(0);
+ stream << it.current()->text(0).tqat(0);
if (!saver.close())
{
@@ -456,7 +456,7 @@ void Learn::write(const KURL &url)
setClean();
- statusBar()->message(i18n("%1 written").arg(url.prettyURL()));
+ statusBar()->message(i18n("%1 written").tqarg(url.prettyURL()));
}
void Learn::saveScores()
@@ -485,13 +485,13 @@ void Learn::add(Dict::Entry toAdd, bool noEmit)
{
if (it.current()->text(0) == kanji)
{
- statusBar()->message(i18n("%1 already on your list").arg(kanji));
+ statusBar()->message(i18n("%1 already on your list").tqarg(kanji));
return;
}
}
}
- statusBar()->message(i18n("%1 added to your list").arg(kanji));
+ statusBar()->message(i18n("%1 added to your list").tqarg(kanji));
KConfig &config = *Config::self()->config();
int score = 0;
@@ -515,7 +515,7 @@ void Learn::addAll()
int grade = getCurrentGrade();
TQString regexp("G%1 ");
- regexp = regexp.arg(grade);
+ regexp = regexp.tqarg(grade);
Dict::SearchResult result = index->searchKanji(TQRegExp(regexp), regexp, false);
for (TQValueListIterator<Dict::Entry> i = result.list.begin(); i != result.list.end(); ++i)
@@ -607,7 +607,7 @@ void Learn::del()
void Learn::print()
{
View->clear();
- View->addHeader(TQString("<h1>%1</h1>").arg(i18n("Learning List")), 1);
+ View->addHeader(TQString("<h1>%1</h1>").tqarg(i18n("Learning List")), 1);
TQListViewItemIterator it(List);
for (; it.current(); ++it)
@@ -774,7 +774,7 @@ void Learn::qnew() // new quiz kanji
nogood = false;
statusBar()->clear();
- statusBar()->message(TQString("%1 %2 %3").arg(curItem->text(0)).arg(curItem->text(1)).arg(curItem->text(2)));
+ statusBar()->message(TQString("%1 %2 %3").tqarg(curItem->text(0)).tqarg(curItem->text(1)).tqarg(curItem->text(2)));
backAct->setEnabled(true);