diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:58:43 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:58:43 -0600 |
commit | 2d7b541a4e0095d40e37aaefbf9c4a9b9d149302 (patch) | |
tree | 628c1676b27475e583cfd0c2105bb41b646654bf /kiten/widgets.cpp | |
parent | 6c3f7a55fb7888efc80a7350ef0c2f46ee02baa3 (diff) | |
download | tdeedu-2d7b541a4e0095d40e37aaefbf9c4a9b9d149302.tar.gz tdeedu-2d7b541a4e0095d40e37aaefbf9c4a9b9d149302.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 6c3f7a55fb7888efc80a7350ef0c2f46ee02baa3.
Diffstat (limited to 'kiten/widgets.cpp')
-rw-r--r-- | kiten/widgets.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/kiten/widgets.cpp b/kiten/widgets.cpp index 3c683a1c..284e0618 100644 --- a/kiten/widgets.cpp +++ b/kiten/widgets.cpp @@ -34,7 +34,7 @@ #include <tqpainter.h> #include <tqregexp.h> #include <tqsimplerichtext.h> -#include <textcodec.h> +#include <tqtextcodec.h> #include <cassert> @@ -59,7 +59,7 @@ void ResultView::addResult(Dict::Entry result, bool common) { if (result.dictName() != "__NOTSET") { - addHeader((common? i18n("Common results from %1") : i18n("Results from %1")).arg(result.dictName()), 5); + addHeader((common? i18n("Common results from %1") : i18n("Results from %1")).tqarg(result.dictName()), 5); return; } if (result.header() != "__NOTSET") @@ -70,9 +70,9 @@ void ResultView::addResult(Dict::Entry result, bool common) TQString html; if (result.kanaOnly()) - html = TQString("<p><font size=\"+2\">%1</font> ").arg(result.firstReading()); + html = TQString("<p><font size=\"+2\">%1</font> ").tqarg(result.firstReading()); else - html = TQString("<p><font size=\"+2\">%1</font>: %2 ").arg(putchars(result.kanji())).arg(result.firstReading()); + html = TQString("<p><font size=\"+2\">%1</font>: %2 ").tqarg(putchars(result.kanji())).tqarg(result.firstReading()); TQStringList::Iterator it; TQStringList Meanings = result.meanings(); @@ -103,7 +103,7 @@ void ResultView::addKanjiResult(Dict::Entry result, bool common, Radical rad) { if (result.dictName() != "__NOTSET") { - addHeader((common? i18n("Common results from %1") : i18n("Results from %1")).arg(result.dictName()), 5); + addHeader((common? i18n("Common results from %1") : i18n("Results from %1")).tqarg(result.dictName()), 5); return; } if (result.header() != "__NOTSET") @@ -113,15 +113,15 @@ void ResultView::addKanjiResult(Dict::Entry result, bool common, Radical rad) } TQString html; - html = TQString("<p><font size=\"+3\">%1</font>: %2 ").arg(putchars(result.kanji())); + html = TQString("<p><font size=\"+3\">%1</font>: %2 ").tqarg(putchars(result.kanji())); unsigned int freq = result.freq(); if (freq == 0) // does it have a frequency? - html = html.arg(i18n("Rare")); + html = html.tqarg(i18n("Rare")); else // this isn't a number of times, it's simply an index of // probability - html = html.arg(i18n("Probability rank #%1").arg(freq)); + html = html.tqarg(i18n("Probability rank #%1").tqarg(freq)); html += "<br />"; @@ -171,25 +171,25 @@ void ResultView::addKanjiResult(Dict::Entry result, bool common, Radical rad) switch (result.grade()) { case 0: - html = html.arg(i18n("None")); + html = html.tqarg(i18n("None")); break; case 8: - html = html.arg(i18n("In Jouyou")); + html = html.tqarg(i18n("In Jouyou")); break; case 9: - html = html.arg(i18n("In Jinmeiyou")); + html = html.tqarg(i18n("In Jinmeiyou")); break; default: - html = html.arg(result.grade()); + html = html.tqarg(result.grade()); } - html = html.arg(result.strokes()); + html = html.tqarg(result.strokes()); if (result.miscount() != 0) - html.append(i18n(" Common Miscount: %1.").arg(result.miscount())); + html.append(i18n(" Common Miscount: %1.").tqarg(result.miscount())); if (!!rad.radical()) - html.append(i18n(" Largest radical: %1, with %2 strokes.").arg(TQString("<a href=\"__radical:%1\">%2</a>").arg(rad.radical()).arg(rad.radical())).arg(rad.strokes())); + html.append(i18n(" Largest radical: %1, with %2 strokes.").tqarg(TQString("<a href=\"__radical:%1\">%2</a>").tqarg(rad.radical()).tqarg(rad.radical())).tqarg(rad.strokes())); html += "</p>"; @@ -198,7 +198,7 @@ void ResultView::addKanjiResult(Dict::Entry result, bool common, Radical rad) void ResultView::addHeader(const TQString &header, unsigned int degree) { - append(TQString("<h%1>%2</h%3>").arg(degree).arg(header).arg(degree)); + append(TQString("<h%1>%2</h%3>").tqarg(degree).tqarg(header).tqarg(degree)); } TQString ResultView::putchars(const TQString &text) @@ -212,7 +212,7 @@ TQString ResultView::putchars(const TQString &text) for (unsigned i = 0; i < len; i++) { if (Dict::textType(TQString(text.at(i))) == Dict::Text_Kanji) - ret.append(TQString("<a href=\"%1\">%1</a>").arg(text.at(i)).arg(text.at(i))); + ret.append(TQString("<a href=\"%1\">%1</a>").tqarg(text.tqat(i)).tqarg(text.tqat(i))); else ret.append(text.at(i)); } @@ -251,12 +251,12 @@ void ResultView::print(TQString title) TQRect body(dpix, dpiy, metrics.width() - margin * dpix / margin * 2, metrics.height() - margin * dpiy / margin * 2); - TQSimpleRichText richText(title.isNull()? printText : i18n("<h1>Search for \"%1\"</h1>").arg(title) + printText, font(), context(), styleSheet(), mimeSourceFactory(), body.height(), TQt::black, false); + TQSimpleRichText richText(title.isNull()? printText : i18n("<h1>Search for \"%1\"</h1>").tqarg(title) + printText, font(), context(), styleSheet(), mimeSourceFactory(), body.height(), TQt::black, false); richText.setWidth(&p, body.width()); TQRect view(body); int page = 1; - TQColorGroup goodColorGroup = TQColorGroup(colorGroup()); + TQColorGroup goodColorGroup = TQColorGroup(tqcolorGroup()); goodColorGroup.setColor(TQColorGroup::Link, TQt::black); do @@ -268,7 +268,7 @@ void ResultView::print(TQString title) TQFont myFont(font()); myFont.setPointSize(9); p.setFont(myFont); - TQString footer(TQString("%1 - Kiten").arg(TQString::number(page))); + TQString footer(TQString("%1 - Kiten").tqarg(TQString::number(page))); p.drawText(view.right() - p.fontMetrics().width(footer), view.bottom() + p.fontMetrics().ascent() + 5, footer); @@ -391,7 +391,7 @@ void eEdit::save() text.append(" "); if (!kanji.isEmpty()) - text.append(TQString("[%1] ").arg(reading)); + text.append(TQString("[%1] ").tqarg(reading)); text.append(meanings); if (common) |