diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:47:17 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:47:17 -0600 |
commit | 6c3f7a55fb7888efc80a7350ef0c2f46ee02baa3 (patch) | |
tree | cc90a09df2d1fd6d956cc084529a62d354316ad3 /kiten/widgets.cpp | |
parent | 174fd5e23c68598774706ea9b571d3d178e36b81 (diff) | |
download | tdeedu-6c3f7a55fb7888efc80a7350ef0c2f46ee02baa3.tar.gz tdeedu-6c3f7a55fb7888efc80a7350ef0c2f46ee02baa3.zip |
Rename a number of old tq methods that are no longer tq specific
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 284e0618..3c683a1c 100644 --- a/kiten/widgets.cpp +++ b/kiten/widgets.cpp @@ -34,7 +34,7 @@ #include <tqpainter.h> #include <tqregexp.h> #include <tqsimplerichtext.h> -#include <tqtextcodec.h> +#include <textcodec.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")).tqarg(result.dictName()), 5); + addHeader((common? i18n("Common results from %1") : i18n("Results from %1")).arg(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> ").tqarg(result.firstReading()); + html = TQString("<p><font size=\"+2\">%1</font> ").arg(result.firstReading()); else - html = TQString("<p><font size=\"+2\">%1</font>: %2 ").tqarg(putchars(result.kanji())).tqarg(result.firstReading()); + html = TQString("<p><font size=\"+2\">%1</font>: %2 ").arg(putchars(result.kanji())).arg(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")).tqarg(result.dictName()), 5); + addHeader((common? i18n("Common results from %1") : i18n("Results from %1")).arg(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 ").tqarg(putchars(result.kanji())); + html = TQString("<p><font size=\"+3\">%1</font>: %2 ").arg(putchars(result.kanji())); unsigned int freq = result.freq(); if (freq == 0) // does it have a frequency? - html = html.tqarg(i18n("Rare")); + html = html.arg(i18n("Rare")); else // this isn't a number of times, it's simply an index of // probability - html = html.tqarg(i18n("Probability rank #%1").tqarg(freq)); + html = html.arg(i18n("Probability rank #%1").arg(freq)); html += "<br />"; @@ -171,25 +171,25 @@ void ResultView::addKanjiResult(Dict::Entry result, bool common, Radical rad) switch (result.grade()) { case 0: - html = html.tqarg(i18n("None")); + html = html.arg(i18n("None")); break; case 8: - html = html.tqarg(i18n("In Jouyou")); + html = html.arg(i18n("In Jouyou")); break; case 9: - html = html.tqarg(i18n("In Jinmeiyou")); + html = html.arg(i18n("In Jinmeiyou")); break; default: - html = html.tqarg(result.grade()); + html = html.arg(result.grade()); } - html = html.tqarg(result.strokes()); + html = html.arg(result.strokes()); if (result.miscount() != 0) - html.append(i18n(" Common Miscount: %1.").tqarg(result.miscount())); + html.append(i18n(" Common Miscount: %1.").arg(result.miscount())); if (!!rad.radical()) - 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.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 += "</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>").tqarg(degree).tqarg(header).tqarg(degree)); + append(TQString("<h%1>%2</h%3>").arg(degree).arg(header).arg(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>").tqarg(text.tqat(i)).tqarg(text.tqat(i))); + ret.append(TQString("<a href=\"%1\">%1</a>").arg(text.at(i)).arg(text.at(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>").tqarg(title) + printText, font(), context(), styleSheet(), mimeSourceFactory(), body.height(), TQt::black, false); + TQSimpleRichText richText(title.isNull()? printText : i18n("<h1>Search for \"%1\"</h1>").arg(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(tqcolorGroup()); + TQColorGroup goodColorGroup = TQColorGroup(colorGroup()); 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").tqarg(TQString::number(page))); + TQString footer(TQString("%1 - Kiten").arg(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] ").tqarg(reading)); + text.append(TQString("[%1] ").arg(reading)); text.append(meanings); if (common) |