diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-28 18:31:12 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-28 18:31:12 +0000 |
commit | 0a80cfd57d271dd44221467efb426675fa470356 (patch) | |
tree | 6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/modules/torrent/tc_statusbarapplet.cpp | |
parent | 3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff) | |
download | kvirc-0a80cfd57d271dd44221467efb426675fa470356.tar.gz kvirc-0a80cfd57d271dd44221467efb426675fa470356.zip |
TQt4 port kvirc
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/modules/torrent/tc_statusbarapplet.cpp')
-rw-r--r-- | src/modules/torrent/tc_statusbarapplet.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/modules/torrent/tc_statusbarapplet.cpp b/src/modules/torrent/tc_statusbarapplet.cpp index 5d23a299..b609e8d4 100644 --- a/src/modules/torrent/tc_statusbarapplet.cpp +++ b/src/modules/torrent/tc_statusbarapplet.cpp @@ -1,14 +1,14 @@ -#include "qtimer.h" +#include "tqtimer.h" #include "kvi_locale.h" #include "kvi_iconmanager.h" #include "tc_interface.h" #include "tc_statusbarapplet.h" -KviTorrentStatusBarApplet::KviTorrentStatusBarApplet(KviStatusBar *parent, KviStatusBarAppletDescriptor *desc) - : KviStatusBarApplet(parent, desc) +KviTorrentStatusBarApplet::KviTorrentStatusBarApplet(KviStatusBar *tqparent, KviStatusBarAppletDescriptor *desc) + : KviStatusBarApplet(tqparent, desc) { - QTimer *timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(update())); + TQTimer *timer = new TQTimer(this); + connect(timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(update())); timer->start(250, FALSE); // updateDisplay(); // @@ -36,26 +36,26 @@ void KviTorrentStatusBarApplet::selfRegister(KviStatusBar *bar) bar->registerAppletDescriptor(d); } -QString formatSize(float sz) +TQString formatSize(float sz) { if (sz >= 1024.0f*1024.0f*1024.0f) - return QString("%1 GB").arg(sz / (1024.0f*1024.0f*1024.0f), 2, 'f', 2); + return TQString("%1 GB").tqarg(sz / (1024.0f*1024.0f*1024.0f), 2, 'f', 2); if (sz >= 1024.0f*1024.0f) - return QString("%1 MB").arg(sz / (1024.0f*1024.0f), 2, 'f', 2); + return TQString("%1 MB").tqarg(sz / (1024.0f*1024.0f), 2, 'f', 2); if (sz >= 1024.0f) - return QString("%1 KB").arg(sz / 1024.0f, 2, 'f', 2); - return QString("%1 B").arg(sz, 2, 'f', 2); + return TQString("%1 KB").tqarg(sz / 1024.0f, 2, 'f', 2); + return TQString("%1 B").tqarg(sz, 2, 'f', 2); } void KviTorrentStatusBarApplet::update() { if (KviTorrentInterface::selected()) { - QString msg = QString("up: %1 K/s (%2), dn: %3 K/s (%4)") - .arg(KviTorrentInterface::selected()->speedUp(), 2) - .arg(formatSize(KviTorrentInterface::selected()->trafficUp())) - .arg(KviTorrentInterface::selected()->speedDown(), 2) - .arg(formatSize(KviTorrentInterface::selected()->trafficDown())); + TQString msg = TQString("up: %1 K/s (%2), dn: %3 K/s (%4)") + .tqarg(KviTorrentInterface::selected()->speedUp(), 2) + .tqarg(formatSize(KviTorrentInterface::selected()->trafficUp())) + .tqarg(KviTorrentInterface::selected()->speedDown(), 2) + .tqarg(formatSize(KviTorrentInterface::selected()->trafficDown())); setText(msg); |