summaryrefslogtreecommitdiffstats
path: root/kiten/widgets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kiten/widgets.cpp')
-rw-r--r--kiten/widgets.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/kiten/widgets.cpp b/kiten/widgets.cpp
index cfe4c18a..94d61b83 100644
--- a/kiten/widgets.cpp
+++ b/kiten/widgets.cpp
@@ -43,8 +43,8 @@
#include "kromajiedit.h"
#include "widgets.h"
-ResultView::ResultView(bool showLinks, TQWidget *parent, const char *name)
- : KTextBrowser(parent, name)
+ResultView::ResultView(bool showLinks, TQWidget *tqparent, const char *name)
+ : KTextBrowser(tqparent, name)
{
setReadOnly(true);
setLinkUnderline(false);
@@ -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,15 +70,15 @@ 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();
for (it = Meanings.begin(); it != Meanings.end(); ++it)
{
- if ((*it).find("(P)") >= 0)
+ if ((*it).tqfind("(P)") >= 0)
{
if (common)
continue;
@@ -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,13 +251,13 @@ 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(), Qt::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());
- goodColorGroup.setColor(TQColorGroup::Link, Qt::black);
+ 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);
@@ -292,8 +292,8 @@ void ResultView::updateFont()
/////////////////////////////////////////////////////
// nice EDICT dictionary editor
-eEdit::eEdit(const TQString &_filename, TQWidget *parent, const char *name)
- : KMainWindow(parent, name)
+eEdit::eEdit(const TQString &_filename, TQWidget *tqparent, const char *name)
+ : KMainWindow(tqparent, name)
, filename(_filename)
{
List = new KListView(this);
@@ -317,11 +317,11 @@ eEdit::eEdit(const TQString &_filename, TQWidget *parent, const char *name)
List->setMultiSelection(true);
List->setDragEnabled(true);
- saveAct = KStdAction::save(this, TQT_SLOT(save()), actionCollection());
- removeAct = new KAction(i18n("&Delete"), "edit_remove", CTRL + Key_X, this, TQT_SLOT(del()), actionCollection(), "del");
- (void) new KAction(i18n("&Disable Dictionary"), 0, this, TQT_SLOT(disable()), actionCollection(), "disable");
- addAct = new KAction(i18n("&Add"), "edit_add", CTRL + Key_A, this, TQT_SLOT(add()), actionCollection(), "add");
- (void) KStdAction::close(this, TQT_SLOT(close()), actionCollection());
+ saveAct = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(save()), actionCollection());
+ removeAct = new KAction(i18n("&Delete"), "edit_remove", CTRL + Key_X, TQT_TQOBJECT(this), TQT_SLOT(del()), actionCollection(), "del");
+ (void) new KAction(i18n("&Disable Dictionary"), 0, TQT_TQOBJECT(this), TQT_SLOT(disable()), actionCollection(), "disable");
+ addAct = new KAction(i18n("&Add"), "edit_add", CTRL + Key_A, TQT_TQOBJECT(this), TQT_SLOT(add()), actionCollection(), "add");
+ (void) KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
createGUI("eeditui.rc");
//closeAction->plug(toolBar());
@@ -357,9 +357,9 @@ void eEdit::openFile(const TQString &file)
continue;
Dict::Entry entry = Dict::parse(s);
TQString meanings = Dict::prettyMeaning(entry.meanings());
- bool common = meanings.find(TQString("(P)")) >= 0;
- meanings.replace(TQRegExp("; "), "/");
- meanings.replace(TQRegExp("/\\(P\\)"), "");
+ bool common = meanings.tqfind(TQString("(P)")) >= 0;
+ meanings.tqreplace(TQRegExp("; "), "/");
+ meanings.tqreplace(TQRegExp("/\\(P\\)"), "");
new TQListViewItem(List, entry.kanji(), Dict::prettyKanjiReading(entry.readings()), meanings, common? i18n("yes") : i18n("no"));
}
}
@@ -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)
@@ -414,7 +414,7 @@ void eEdit::save()
void eEdit::disable()
{
- int result = KMessageBox::warningYesNo(this, i18n("Disabling your personal dictionary will delete its contents.\n\n(You can however always create your dictionary again.)"), TQString::null, i18n("Disable"), KStdGuiItem::cancel(), "DisableAsk", true);
+ int result = KMessageBox::warningYesNo(this, i18n("Disabling your personal dictionary will delete its contents.\n\n(You can however always create your dictionary again.)"), TQString(), i18n("Disable"), KStdGuiItem::cancel(), "DisableAsk", true);
if (result == KMessageBox::No)
return;
@@ -436,8 +436,8 @@ void eEdit::del()
/////////////////////////////////////////////////////
// sorta taken from konqy
-EditAction::EditAction(const TQString& text, int accel, const TQObject *receiver, const char *member, TQObject* parent, const char* name)
- : KAction(text, accel, parent, name)
+EditAction::EditAction(const TQString& text, int accel, const TQObject *receiver, const char *member, TQObject* tqparent, const char* name)
+ : KAction(text, accel, tqparent, name)
{
m_receiver = receiver;
m_member = member;
@@ -462,7 +462,7 @@ int EditAction::plug( TQWidget *w, int index )
addContainer(toolBar, id);
- connect( toolBar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
+ connect( toolBar, TQT_SIGNAL( destroyed() ), TQT_TQOBJECT(this), TQT_SLOT( slotDestroyed() ) );
toolBar->setItemAutoSized( id, true );