summaryrefslogtreecommitdiffstats
path: root/kiten/learn.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:47:17 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:47:17 -0600
commit6c3f7a55fb7888efc80a7350ef0c2f46ee02baa3 (patch)
treecc90a09df2d1fd6d956cc084529a62d354316ad3 /kiten/learn.cpp
parent174fd5e23c68598774706ea9b571d3d178e36b81 (diff)
downloadtdeedu-6c3f7a55fb7888efc80a7350ef0c2f46ee02baa3.tar.gz
tdeedu-6c3f7a55fb7888efc80a7350ef0c2f46ee02baa3.zip
Rename a number of old tq methods that are no longer tq specific
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 2b4aa2d3..3faa9c25 100644
--- a/kiten/learn.cpp
+++ b/kiten/learn.cpp
@@ -31,10 +31,10 @@
#include <kstringhandler.h>
#include <tqbuttongroup.h>
#include <tqheader.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqtabwidget.h>
#include <tqtimer.h>
-#include <tqtextcodec.h>
+#include <textcodec.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 *htqlayout = new TQHBoxLayout(quizLayout);
+ TQHBoxLayout *hlayout = new TQHBoxLayout(quizLayout);
qKanji = new TQPushButton(quizTop);
connect(qKanji, TQT_SIGNAL(clicked()), this, TQT_SLOT(qKanjiClicked()));
- htqlayout->addStretch();
- htqlayout->addWidget(qKanji);
- htqlayout->addStretch();
+ hlayout->addStretch();
+ hlayout->addWidget(qKanji);
+ hlayout->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").tqarg(kanji));
+ View->addHeader(i18n("%1 in compounds").arg(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.tqarg(grade);
+ regexp = regexp.arg(grade);
Dict::SearchResult result = index->searchKanji(TQRegExp(regexp), regexp, false);
list = result.list;
- statusBar()->message(i18n("%1 entries in grade %2").tqarg(list.count()).tqarg(grade));
+ statusBar()->message(i18n("%1 entries in grade %2").arg(list.count()).arg(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").tqarg(kanji) );
+ TQRegExp regexp ( TQString("^%1\\W").arg(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).tqat(0);
+ stream << it.current()->text(0).at(0);
if (!saver.close())
{
@@ -456,7 +456,7 @@ void Learn::write(const KURL &url)
setClean();
- statusBar()->message(i18n("%1 written").tqarg(url.prettyURL()));
+ statusBar()->message(i18n("%1 written").arg(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").tqarg(kanji));
+ statusBar()->message(i18n("%1 already on your list").arg(kanji));
return;
}
}
}
- statusBar()->message(i18n("%1 added to your list").tqarg(kanji));
+ statusBar()->message(i18n("%1 added to your list").arg(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.tqarg(grade);
+ regexp = regexp.arg(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>").tqarg(i18n("Learning List")), 1);
+ View->addHeader(TQString("<h1>%1</h1>").arg(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").tqarg(curItem->text(0)).tqarg(curItem->text(1)).tqarg(curItem->text(2)));
+ statusBar()->message(TQString("%1 %2 %3").arg(curItem->text(0)).arg(curItem->text(1)).arg(curItem->text(2)));
backAct->setEnabled(true);