diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-23 01:42:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-23 01:42:07 +0000 |
commit | a2277b6bc715464e83882b90c2a058139b8a6b54 (patch) | |
tree | ab09b14014f59b4d8e2ddd12226aa0b22e4dfc5d /ksim/ksimsysinfo.cpp | |
parent | d3f79e04b34bd1f70a458b81b28fc8799498c8dc (diff) | |
download | tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.tar.gz tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.zip |
TQt4 port kdeutils
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1238125 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksim/ksimsysinfo.cpp')
-rw-r--r-- | ksim/ksimsysinfo.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/ksim/ksimsysinfo.cpp b/ksim/ksimsysinfo.cpp index 7140e3a..cda1d58 100644 --- a/ksim/ksimsysinfo.cpp +++ b/ksim/ksimsysinfo.cpp @@ -41,8 +41,8 @@ #include <string.h> KSim::Sysinfo::Sysinfo(KSim::Config *config, - TQWidget *parent, const char *name, WFlags fl) - : DCOPObject("sysinfo"), TQWidget(parent, name, fl) + TQWidget *tqparent, const char *name, WFlags fl) + : DCOPObject("sysinfo"), TQWidget(tqparent, name, fl) { m_config = config; m_layout = new TQVBoxLayout(this); @@ -86,7 +86,7 @@ void KSim::Sysinfo::clockUptimeUpdate() // only update the date when necessary if (m_dateLabel) { if (updateDate) { - m_dateLabel->setText(KGlobal::locale()->formatDate(TQDate::currentDate())); + m_dateLabel->setText(KGlobal::locale()->formatDate(TQDate::tqcurrentDate())); updateDate = false; } } @@ -110,7 +110,7 @@ void KSim::Sysinfo::clockUptimeUpdate() TQString seconds; // found days so we have to modify hours - if (uptime.find(TQRegExp("%d" ), 0) >= 0) + if (uptime.tqfind(TQRegExp("%d" ), 0) >= 0) uptimeHours -= (uptimeDays * 24); days.sprintf("%02li", uptimeDays); @@ -118,10 +118,10 @@ void KSim::Sysinfo::clockUptimeUpdate() minutes.sprintf("%02li", uptimeMins); seconds.sprintf("%02li", uptimeSecs); - uptime.replace(TQRegExp("%d"), days); - uptime.replace(TQRegExp("%h"), hours); - uptime.replace(TQRegExp("%m"), minutes); - uptime.replace(TQRegExp("%s"), seconds); + uptime.tqreplace(TQRegExp("%d"), days); + uptime.tqreplace(TQRegExp("%h"), hours); + uptime.tqreplace(TQRegExp("%m"), minutes); + uptime.tqreplace(TQRegExp("%s"), seconds); m_uptimeLabel->setText(uptime); } } @@ -140,15 +140,15 @@ void KSim::Sysinfo::sysUpdate() unsigned long cache = system.cacheRam(); unsigned long used = system.usedRam(); unsigned long allFree = free + buffer + cache; - bool all = memory.find( "%F" ) != -1; - - memory.replace(TQRegExp("%s"), TQString::number(System::bytesToMegs(shared))); - memory.replace(TQRegExp("%b"), TQString::number(System::bytesToMegs(buffer))); - memory.replace(TQRegExp("%c"), TQString::number(System::bytesToMegs(cache))); - memory.replace(TQRegExp("%u"), TQString::number(System::bytesToMegs(used))); - memory.replace(TQRegExp("%t"), TQString::number(System::bytesToMegs(total))); - memory.replace(TQRegExp("%f"), TQString::number(System::bytesToMegs(free))); - memory.replace(TQRegExp("%F"), TQString::number(System::bytesToMegs(allFree))); + bool all = memory.tqfind( "%F" ) != -1; + + memory.tqreplace(TQRegExp("%s"), TQString::number(System::bytesToMegs(shared))); + memory.tqreplace(TQRegExp("%b"), TQString::number(System::bytesToMegs(buffer))); + memory.tqreplace(TQRegExp("%c"), TQString::number(System::bytesToMegs(cache))); + memory.tqreplace(TQRegExp("%u"), TQString::number(System::bytesToMegs(used))); + memory.tqreplace(TQRegExp("%t"), TQString::number(System::bytesToMegs(total))); + memory.tqreplace(TQRegExp("%f"), TQString::number(System::bytesToMegs(free))); + memory.tqreplace(TQRegExp("%F"), TQString::number(System::bytesToMegs(allFree))); kdDebug(2003) << memory << endl; m_memLabel->setText("Memory"); TQToolTip::add(m_memLabel, memory ); @@ -164,16 +164,16 @@ void KSim::Sysinfo::sysUpdate() unsigned long total = system.totalSwap(); unsigned long free = system.freeSwap(); unsigned long swapUsed = system.usedSwap(); - swap.replace(TQRegExp("%u"), TQString::number(System::bytesToMegs(swapUsed))); - swap.replace(TQRegExp("%t"), TQString::number(System::bytesToMegs(total))); - swap.replace(TQRegExp("%f"), TQString::number(System::bytesToMegs(free))); + swap.tqreplace(TQRegExp("%u"), TQString::number(System::bytesToMegs(swapUsed))); + swap.tqreplace(TQRegExp("%t"), TQString::number(System::bytesToMegs(total))); + swap.tqreplace(TQRegExp("%f"), TQString::number(System::bytesToMegs(free))); m_swapLabel->setText("Swap"); TQToolTip::add(m_swapLabel, swap); m_swapLabel->setValue(System::bytesToMegs(total) - System::bytesToMegs(free)); } // if (m_config->showProcs()) { -// m_procsLabel->setText(i18n("Procs: %1").arg(sysInfo.procs)); +// m_procsLabel->setText(i18n("Procs: %1").tqarg(sysInfo.procs)); // } } @@ -274,7 +274,7 @@ void KSim::Sysinfo::createView() m_procsLabel = 0L; }*/ -// m_layout->invalidate(); +// m_layout->tqinvalidate(); updateGeometry(); adjustSize(); |