diff options
author | Slávek Banko <[email protected]> | 2013-07-27 16:57:53 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2013-07-27 18:48:46 +0200 |
commit | 7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931 (patch) | |
tree | 4655c7263ca5c64d23d10167cb459dd9cb253815 /src/trayicon.cpp | |
parent | 88ea2b6cd4382627fb6efca9cc54825aee881d1e (diff) | |
download | tork-7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931.tar.gz tork-7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931.zip |
Initial TQt conversion
Diffstat (limited to 'src/trayicon.cpp')
-rw-r--r-- | src/trayicon.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/trayicon.cpp b/src/trayicon.cpp index 5517def..4422bf0 100644 --- a/src/trayicon.cpp +++ b/src/trayicon.cpp @@ -47,9 +47,9 @@ #include <klocale.h> #include <kapplication.h> #include "trayicon.h" -#include <qtooltip.h> +#include <ntqtooltip.h> #include <kpassivepopup.h> -#include <qstringlist.h> +#include <ntqstringlist.h> #include "trayhoverpopup.h" #include "torkconfig.h" @@ -59,7 +59,7 @@ TrayIcon::TrayIcon( tork *parent, const char *name) { m_kt_pix = loadIcon("tork"); setPixmap(m_kt_pix); - paint=new QPainter( this ); + paint=new TQPainter( this ); drawContents ( paint ); m_parent = parent; @@ -75,15 +75,15 @@ TrayIcon::TrayIcon( tork *parent, const char *name) TrayIcon::~TrayIcon() {} -void TrayIcon::dragEnterEvent(QDragEnterEvent *e) +void TrayIcon::dragEnterEvent(TQDragEnterEvent *e) { e->accept (KURLDrag::canDecode(e)); } -void TrayIcon::dropEvent (QDropEvent *o) +void TrayIcon::dropEvent (TQDropEvent *o) { KURL::List list; - QString text; + TQString text; if ( KURLDrag::decode( o, list ) ) droppedfile(list); } @@ -98,34 +98,34 @@ void TrayIcon::droppedfile (KURL::List url) } -void TrayIcon::enterEvent(QEvent* ev) +void TrayIcon::enterEvent(TQEvent* ev) { KSystemTray::enterEvent(ev); m_hover_popup->enterEvent(); } -void TrayIcon::leaveEvent(QEvent* ) +void TrayIcon::leaveEvent(TQEvent* ) { m_hover_popup->leaveEvent(); } -void TrayIcon::updateStats(const QString & downloadBandwidthHist, - const QString & uploadBandwidthHist, - const QString & downloadBandwidth, const QString & uploadBandwidth, - const QStringList & serverReport, const QStringList & clientReport, - const QString & curBandwidthRate) +void TrayIcon::updateStats(const TQString & downloadBandwidthHist, + const TQString & uploadBandwidthHist, + const TQString & downloadBandwidth, const TQString & uploadBandwidth, + const TQStringList & serverReport, const TQStringList & clientReport, + const TQString & curBandwidthRate) { - QString serverStatus; - for ( QStringList::ConstIterator it = serverReport.begin(); it != serverReport.end(); ++it ) + TQString serverStatus; + for ( TQStringList::ConstIterator it = serverReport.begin(); it != serverReport.end(); ++it ) { if ((*it).isEmpty()) continue; if ((it) != serverReport.begin()) - serverStatus.append(QString("<tr><td></td><td colspan='2'>%1</td></tr>").arg((*it))); + serverStatus.append(TQString("<tr><td></td><td colspan='2'>%1</td></tr>").arg((*it))); } - QString tip = i18n("<table cellpadding='2' cellspacing='2'align='center'>" + TQString tip = i18n("<table cellpadding='2' cellspacing='2'align='center'>" "<tr>" "<td><b>Client:</b></td>" "<td colspan='2'>%1</td>" @@ -202,7 +202,7 @@ void SetMaxRate::makeMenu() for (int i = 0; i < 15; i++) { - QValueList<int> valuePair; + TQValueList<int> valuePair; if (delta == 0) valuePair.append(maxBandwidth); else @@ -225,10 +225,10 @@ void SetMaxRate::makeMenu() { if(m_rate == valuePair[j] && j==0) { - setItemChecked(insertItem(QString("%1 KB/s").arg(valuePair[j]),-1, (j == 0) ? 2 : (int)count()), true); + setItemChecked(insertItem(TQString("%1 KB/s").arg(valuePair[j]),-1, (j == 0) ? 2 : (int)count()), true); } else - insertItem(QString("%1 KB/s").arg(valuePair[j]),-1, (j == 0) ? 2 : (int)count()); + insertItem(TQString("%1 KB/s").arg(valuePair[j]),-1, (j == 0) ? 2 : (int)count()); } } @@ -249,8 +249,8 @@ void SetMaxRate::rateSelected(int id) // kdDebug() << text(id) << endl; // kdDebug() << text(id).toInt() << endl; - //QT Bug: The value referenced by the QPopUpMenu ID often has an ampersand - QString textID = text(id); + //QT Bug: The value referenced by the TQPopUpMenu ID often has an ampersand + TQString textID = text(id); textID.replace("&",""); textID.replace(" KB/s",""); |