Rename a number of old tq methods that are no longer tq specific

pull/1/head
Timothy Pearson 13 years ago
parent 7881e88b0e
commit d067f88edb

@ -27,6 +27,6 @@ void KCPUDock::setCPULabel(int set) {
else else
setLabel(i18n("C")); setLabel(i18n("C"));
tqrepaint(); repaint();
} }

@ -66,7 +66,7 @@ void KCPULoad::setSMP(bool set) {
} }
TQString KCPULoad::dockName(int which) const { TQString KCPULoad::dockName(int which) const {
return i18n("CPU %1").tqarg(which+1); return i18n("CPU %1").arg(which+1);
} }
TQColor KCPULoad::defaultDockColor(int which) const { TQColor KCPULoad::defaultDockColor(int which) const {
@ -124,32 +124,32 @@ void KCPULoad::takeReadingInternal() {
if (isSplit()) { if (isSplit()) {
TQString user = TQString user =
i18n("Current CPU User: %1%") i18n("Current CPU User: %1%")
.tqarg(proc->all.userPercent()); .arg(proc->all.userPercent());
TQString sys = TQString sys =
i18n("Current CPU System: %1%") i18n("Current CPU System: %1%")
.tqarg(proc->all.systemPercent()); .arg(proc->all.systemPercent());
for (int i = 0; i < r.size(); i++) { for (int i = 0; i < r.size(); i++) {
user += i18n(", C%1: %2%").tqarg(i+1).tqarg(r[i].upper); user += i18n(", C%1: %2%").arg(i+1).arg(r[i].upper);
sys += i18n(", C%1: %2%").tqarg(i+1).tqarg(r[i].lower); sys += i18n(", C%1: %2%").arg(i+1).arg(r[i].lower);
} }
fullReading = i18n("%1.\n%2.").tqarg(user, sys); fullReading = i18n("%1.\n%2.").arg(user, sys);
} else { } else {
TQString total = TQString total =
i18n("Current CPU usage: %1%") i18n("Current CPU usage: %1%")
.tqarg(proc->all.totalPercent()); .arg(proc->all.totalPercent());
for (int i = 0; i < r.size(); i++) { for (int i = 0; i < r.size(); i++) {
total += i18n(", C%1: %2%").tqarg(i+1).tqarg(r[i].upper); total += i18n(", C%1: %2%").arg(i+1).arg(r[i].upper);
} }
fullReading = i18n("%1.").tqarg(total); fullReading = i18n("%1.").arg(total);
} }
} else if (r.size() > 0) { } else if (r.size() > 0) {
if (isSplit()) { if (isSplit()) {
fullReading = i18n( fullReading = i18n(
"Current CPU User: %1%.\n" "Current CPU User: %1%.\n"
"Current CPU System: %2%.") "Current CPU System: %2%.")
.tqarg(r[0].upper).tqarg(r[0].lower); .arg(r[0].upper).arg(r[0].lower);
} else { } else {
fullReading = i18n("Current CPU usage: %1%.").tqarg(r[0].upper); fullReading = i18n("Current CPU usage: %1%.").arg(r[0].upper);
} }
} }
} }

@ -78,54 +78,54 @@ void StatDock::resizeEvent ( TQResizeEvent * )
delete[] bufUpperOld; delete[] bufUpperOld;
delete[] bufLowerOld; delete[] bufLowerOld;
tqrepaint(); repaint();
} }
void StatDock::setGrid(bool set) { void StatDock::setGrid(bool set) {
grid = set; grid = set;
tqrepaint(); repaint();
} }
void StatDock::setActive(bool set) { void StatDock::setActive(bool set) {
active = set; active = set;
tqrepaint(); repaint();
} }
void StatDock::setSoft(bool set) { void StatDock::setSoft(bool set) {
soft = set; soft = set;
tqrepaint(); repaint();
} }
void StatDock::setSplit(bool set) { void StatDock::setSplit(bool set) {
split = set; split = set;
tqrepaint(); repaint();
} }
void StatDock::setLabelled(bool set) { void StatDock::setLabelled(bool set) {
labelled = set; labelled = set;
tqrepaint(); repaint();
} }
void StatDock::setLabel(const TQString& set) { void StatDock::setLabel(const TQString& set) {
label = set; label = set;
tqrepaint(); repaint();
} }
void StatDock::setFill(int set) { void StatDock::setFill(int set) {
fill = set; fill = set;
tqrepaint(); repaint();
} }
void StatDock::setColor(const TQColor& set) { void StatDock::setColor(const TQColor& set) {
colorUpper = set; colorUpper = set;
colorUpperInactive = colorUpper.dark(); colorUpperInactive = colorUpper.dark();
tqrepaint(); repaint();
} }
void StatDock::clearHistory(void) { void StatDock::clearHistory(void) {
for (i = 0; i < DOCK_SIZE; i++) for (i = 0; i < DOCK_SIZE; i++)
bufUpper[i] = bufLower[i] = 0; bufUpper[i] = bufLower[i] = 0;
tqrepaint(); repaint();
} }
void StatDock::addPercentReading(int upper, int lower) { void StatDock::addPercentReading(int upper, int lower) {
@ -164,7 +164,7 @@ void StatDock::addPercentReading(int upper, int lower) {
} }
// Refresh the diagram. // Refresh the diagram.
tqrepaint(); repaint();
} }
void StatDock::paintEvent(TQPaintEvent*) { void StatDock::paintEvent(TQPaintEvent*) {

@ -54,7 +54,7 @@ void StatPopup::Reading::Init(int which, StatPopup* popup)
color = popup->defaultDockColor(which); color = popup->defaultDockColor(which);
color = popup->config->readColorEntry(colorid, &color); color = popup->config->readColorEntry(colorid, &color);
actColor = new KAction(i18n("Color (%1)...").tqarg(popup->dockName(which)), actColor = new KAction(i18n("Color (%1)...").arg(popup->dockName(which)),
"color", 0, TQT_TQOBJECT(popup), TQT_SLOT(selectColor()), popup->coll, colorid); "color", 0, TQT_TQOBJECT(popup), TQT_SLOT(selectColor()), popup->coll, colorid);
} }
@ -399,7 +399,7 @@ void StatPopup::paintEvent(TQPaintEvent*) {
// Draw the text. // Draw the text.
p.setFont(font()); p.setFont(font());
p.setPen(tqcolorGroup().foreground()); p.setPen(colorGroup().foreground());
p.drawText(rect(), AlignHCenter | AlignVCenter, fullReading); p.drawText(rect(), AlignHCenter | AlignVCenter, fullReading);
} }
@ -412,7 +412,7 @@ void StatPopup::mousePressEvent(TQMouseEvent* e) {
isDragged = true; isDragged = true;
relX = e->x(); relX = e->x();
relY = e->y(); relY = e->y();
tqrepaint(); repaint();
} }
} }
@ -425,7 +425,7 @@ void StatPopup::mouseReleaseEvent(TQMouseEvent* e) {
// The end of a drag operation. // The end of a drag operation.
move(e->globalX() - relX, e->globalY() - relY); move(e->globalX() - relX, e->globalY() - relY);
isDragged = false; isDragged = false;
tqrepaint(); repaint();
} }
void StatPopup::closeEvent(TQCloseEvent* e) { void StatPopup::closeEvent(TQCloseEvent* e) {
@ -469,7 +469,7 @@ void StatPopup::takeReading() {
if (resizeRequested) if (resizeRequested)
resizeToText(); resizeToText();
tqrepaint(); repaint();
} }
} }
@ -479,7 +479,7 @@ void StatPopup::resizeToText() {
TQSize size = fontMetrics().size(0, fullReading); TQSize size = fontMetrics().size(0, fullReading);
resize(size.width() + 2 * TEXT_EXPANSION_HORIZONTAL, resize(size.width() + 2 * TEXT_EXPANSION_HORIZONTAL,
size.height() + 2 * TEXT_EXPANSION_VERTICAL); size.height() + 2 * TEXT_EXPANSION_VERTICAL);
tqrepaint(); repaint();
} }
#include "statpopup.moc" #include "statpopup.moc"

Loading…
Cancel
Save