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