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/torkview.cpp | |
parent | 88ea2b6cd4382627fb6efca9cc54825aee881d1e (diff) | |
download | tork-7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931.tar.gz tork-7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931.zip |
Initial TQt conversion
Diffstat (limited to 'src/torkview.cpp')
-rw-r--r-- | src/torkview.cpp | 528 |
1 files changed, 264 insertions, 264 deletions
diff --git a/src/torkview.cpp b/src/torkview.cpp index eed8c8b..c5e8ed7 100644 --- a/src/torkview.cpp +++ b/src/torkview.cpp @@ -25,8 +25,8 @@ #include "tork.h" #include "torclient.h" #include <klocale.h> -#include <qlabel.h> -#include <qlistview.h> +#include <ntqlabel.h> +#include <ntqlistview.h> #include "dndlistview.h" #include "portsandicons.h" #include "torkconfig.h" @@ -57,12 +57,12 @@ #include <kurl.h> #include <kio/netaccess.h> -#include <qregexp.h> -#include <qsplitter.h> -#include <qgroupbox.h> -#include <qfile.h> -#include <qdir.h> -#include <qpixmap.h> +#include <ntqregexp.h> +#include <ntqsplitter.h> +#include <ntqgroupbox.h> +#include <ntqfile.h> +#include <ntqdir.h> +#include <ntqpixmap.h> /* Linux-specific includes */ #include <dirent.h> #include <unistd.h> @@ -76,7 +76,7 @@ using namespace tk; #define MAX_TN_RATE 60*20 #define MAX_CBWS_RATE 60 -torkView::torkView(QWidget *parent) +torkView::torkView(TQWidget *parent) : torkview_base(parent), m_pop(0L), m_tormon(TorkConfig::showTorMon()), torbtx(0), torbrx(0) { @@ -145,7 +145,7 @@ torkView::torkView(QWidget *parent) menuItems << allpurposeitem << konversationitem << pidginitem << gaimitem << operaitem << firefoxitem; menuItems << hiddenservicesitem << konqitem << mixminionitem; - for ( QValueList<HitWidget*>::Iterator it = menuItems.begin(); it != menuItems.end(); ++it ){ + for ( TQValueList<HitWidget*>::Iterator it = menuItems.begin(); it != menuItems.end(); ++it ){ if (*it) (*it)->setEnabled(false); } @@ -169,13 +169,13 @@ torkView::torkView(QWidget *parent) m_nontorosd->readSettings(KGlobal::config()); //Icons showing the status of the stream - streamStatusIcon["SUCCEEDED"] = QPixmap(SmallIcon("tork_green")); - streamStatusIcon["FAILED"] = QPixmap(SmallIcon("tork_red")); - streamStatusIcon["SENTCONNECT"] = QPixmap(SmallIcon("tork_yellow")); - streamStatusIcon["SENTRESOLVE"] = QPixmap(SmallIcon("tork_orange")); - streamStatusIcon["NEW"] = QPixmap(SmallIcon("tork_little")); - streamStatusIcon["DETACHED"] = QPixmap(SmallIcon("tork_little")); - streamStatusIcon["CLOSED"] = QPixmap(SmallIcon("tork_todelete")); + streamStatusIcon["SUCCEEDED"] = TQPixmap(SmallIcon("tork_green")); + streamStatusIcon["FAILED"] = TQPixmap(SmallIcon("tork_red")); + streamStatusIcon["SENTCONNECT"] = TQPixmap(SmallIcon("tork_yellow")); + streamStatusIcon["SENTRESOLVE"] = TQPixmap(SmallIcon("tork_orange")); + streamStatusIcon["NEW"] = TQPixmap(SmallIcon("tork_little")); + streamStatusIcon["DETACHED"] = TQPixmap(SmallIcon("tork_little")); + streamStatusIcon["CLOSED"] = TQPixmap(SmallIcon("tork_todelete")); progDisplayCounter = 0; } @@ -212,7 +212,7 @@ void torkView::updateChart() { void torkView::changeQuickConfigure(int no) { -/* QValueList<int> qconf; +/* TQValueList<int> qconf; qconf << 4 << 2 << 3 << 5 << 6 << 7;*/ TorkConfig::setQuickConfigure(no); } @@ -257,8 +257,8 @@ void torkView::sendAnonymousEmail() { if (TorkConfig::availablePrograms().contains("mixminion")){ - QString caption; - QString message; + TQString caption; + TQString message; caption = i18n("Mixminion Not Installed!"); message = i18n("<p>Mixminion does not appear to be installed on your system.<br>"); message += i18n("<p><b>Try installing it from the main interface.</b><br>"); @@ -275,12 +275,12 @@ bool torkView::checkInterface() { bool gotone = false; //Would anyone have this many ethernet cards? - QStringList devices; + TQStringList devices; devices << "eth" << "wlan"; - for ( QStringList::Iterator it = devices.begin(); it != devices.end(); ++it ){ + for ( TQStringList::Iterator it = devices.begin(); it != devices.end(); ++it ){ for (int i=0; i < 5; i++){ - QString devpath = QString("/sys/class/net/%1%2").arg((*it)).arg(i); - QDir ethdir(devpath); + TQString devpath = TQString("/sys/class/net/%1%2").arg((*it)).arg(i); + TQDir ethdir(devpath); if (ethdir.exists()){ mSysDevPathList.append(devpath); gotone = true; @@ -292,11 +292,11 @@ bool torkView::checkInterface() { return gotone; } -void torkView::torify(const QString& text) +void torkView::torify(const TQString& text) { - QString command = "usewithtor " + text; - QString icon = text.section(" ",0,0); + TQString command = "usewithtor " + text; + TQString icon = text.section(" ",0,0); KRun::runCommand( command, icon, icon ); } @@ -306,25 +306,25 @@ void torkView::anonymousFirefox() anonymizedFirefox("http://healthcheck.anonymityanywhere.com/"); } -void torkView::anonymizedFirefox(const QString& url) +void torkView::anonymizedFirefox(const TQString& url) { - QString text = "firefox"; - QString firefoxdir = QString("%1/.mozilla/firefox").arg(getenv("HOME")); + TQString text = "firefox"; + TQString firefoxdir = TQString("%1/.mozilla/firefox").arg(getenv("HOME")); - QString torkfirefox = QString("%1/tork.TorkAnonymous").arg(firefoxdir); - QDir torkdir(torkfirefox); + TQString torkfirefox = TQString("%1/tork.TorkAnonymous").arg(firefoxdir); + TQDir torkdir(torkfirefox); if (!torkdir.exists()){ - QFile inf(QString("%1/profiles.ini").arg(firefoxdir)); - QString line; + TQFile inf(TQString("%1/profiles.ini").arg(firefoxdir)); + TQString line; int profileno=0; if ( inf.open(IO_ReadOnly) ) { - QTextStream stream( &inf ); + TQTextStream stream( &inf ); while ( !stream.atEnd() ) { line = stream.readLine(); // line of text excluding '\n' if (line.contains("[Profile")){ - QRegExp rx("([0-9]{1,4})"); + TQRegExp rx("([0-9]{1,4})"); rx.search(line); profileno = rx.cap(0).toInt() + 1; } @@ -334,13 +334,13 @@ void torkView::anonymizedFirefox(const QString& url) inf.close(); }else{ emit processWarning("cantreadprofiles",i18n("Can't read %1") - .arg(QString("%1/profiles.ini").arg(firefoxdir))); + .arg(TQString("%1/profiles.ini").arg(firefoxdir))); KIO::NetAccess::del(torkfirefox,0L); return; } - QString originalprofile = line.replace("Path=",""); - QString originalfirefox = QString("%1/%2").arg(firefoxdir).arg(originalprofile); + TQString originalprofile = line.replace("Path=",""); + TQString originalfirefox = TQString("%1/%2").arg(firefoxdir).arg(originalprofile); if (!KIO::NetAccess::dircopy(originalfirefox,torkfirefox, 0L)) { @@ -351,10 +351,10 @@ void torkView::anonymizedFirefox(const QString& url) //Update Profile - QFile inf2(QString("%1/profiles.ini").arg(firefoxdir)); + TQFile inf2(TQString("%1/profiles.ini").arg(firefoxdir)); if ( inf2.open(IO_WriteOnly | IO_Append) ) { - QTextStream ts( &inf2 ); + TQTextStream ts( &inf2 ); ts << "\n"; ts << "[Profile" << profileno << "]" << "\n"; ts << "Name=TorkAnonymous" << "\n"; @@ -364,7 +364,7 @@ void torkView::anonymizedFirefox(const QString& url) inf2.close(); }else{ emit processWarning("cantreadprofiles",i18n("Can't read %1") - .arg(QString("%1/profiles.ini").arg(firefoxdir))); + .arg(TQString("%1/profiles.ini").arg(firefoxdir))); KIO::NetAccess::del(torkfirefox,0L); return; } @@ -372,10 +372,10 @@ void torkView::anonymizedFirefox(const QString& url) } //Update Profile - QFile inf3(QString("%1/prefs.js").arg(torkfirefox)); + TQFile inf3(TQString("%1/prefs.js").arg(torkfirefox)); if ( inf3.open(IO_WriteOnly | IO_Append) ) { - QTextStream ts( &inf3 ); + TQTextStream ts( &inf3 ); ts << "user_pref(\"network.proxy.ftp\", \"\");" << "\n"; ts << "user_pref(\"network.proxy.ftp_port\", 0);" << "\n"; @@ -438,12 +438,12 @@ void torkView::anonymizedFirefox(const QString& url) inf3.close(); }else{ - emit processWarning("cantwritefirefoxsettings", i18n("Can't write to %1").arg(QString("%1/prefs.js").arg(torkfirefox))); + emit processWarning("cantwritefirefoxsettings", i18n("Can't write to %1").arg(TQString("%1/prefs.js").arg(torkfirefox))); KIO::NetAccess::del(torkfirefox,0L); return; } - KRun::runCommand( QString("%1 -P TorkAnonymous %2").arg(text).arg(url), text, text ); + KRun::runCommand( TQString("%1 -P TorkAnonymous %2").arg(text).arg(url), text, text ); } @@ -453,20 +453,20 @@ void torkView::anonymousOpera() anonymizedOpera("http://healthcheck.anonymityanywhere.com/"); } -void torkView::anonymizedOpera(const QString& url) +void torkView::anonymizedOpera(const TQString& url) { - QString text = "opera"; - QString originalopera = QString("%1/.opera").arg(getenv("HOME")); - QString torkopera = QString("%1/.opera-tork").arg(getenv("HOME")); - QDir torkdir(torkopera); + TQString text = "opera"; + TQString originalopera = TQString("%1/.opera").arg(getenv("HOME")); + TQString torkopera = TQString("%1/.opera-tork").arg(getenv("HOME")); + TQDir torkdir(torkopera); if (!torkdir.exists()) KIO::NetAccess::dircopy(originalopera,torkopera,0L); - QFile inf(QString("%1/.opera-tork/opera6.ini").arg(getenv("HOME"))); + TQFile inf(TQString("%1/.opera-tork/opera6.ini").arg(getenv("HOME"))); if ( inf.open(IO_WriteOnly | IO_Append) ) { - QTextStream ts( &inf ); + TQTextStream ts( &inf ); ts << "[Proxy]" << "\n"; ts << "HTTPS server=" << TorkConfig::konqHttpsProxy() << ":" << TorkConfig::konqHttpsProxyPort() << "\n"; @@ -485,7 +485,7 @@ void torkView::anonymizedOpera(const QString& url) ts << "Enable Cookies=0" << "\n"; inf.close(); - KRun::runCommand( QString("%1 -personaldir %2 -newpage %3").arg(text).arg(torkopera).arg(url), text, text ); + KRun::runCommand( TQString("%1 -personaldir %2 -newpage %3").arg(text).arg(torkopera).arg(url), text, text ); } @@ -495,24 +495,24 @@ void torkView::anonymizedOpera(const QString& url) void torkView::privoxiedBash() { - QString location = getenv("HOME"); + TQString location = getenv("HOME"); location += "/.tork"; - QDir torkdir(location); + TQDir torkdir(location); if (!torkdir.exists() && !torkdir.mkdir(location)) location = getenv("HOME"); - QFile inf(QString("%1/privoxy_konsole_session").arg(location)); + TQFile inf(TQString("%1/privoxy_konsole_session").arg(location)); if (! inf.open(IO_WriteOnly) ) { inf.close(); KMessageBox::information (this,"Couldn't create bash session file!"); return ; } - QTextStream ts( &inf ); -/* QTextStream &ts = *(inf.textStream());*/ + TQTextStream ts( &inf ); +/* TQTextStream &ts = *(inf.textStream());*/ - ts << QString("http_proxy=%1:%2").arg(TorkConfig::konqHttpProxy()).arg(TorkConfig::konqHttpProxyPort()) << "\n"; - ts << QString("https_proxy=%1:%2").arg(TorkConfig::konqHttpsProxy()).arg(TorkConfig::konqHttpsProxyPort()) << "\n"; + ts << TQString("http_proxy=%1:%2").arg(TorkConfig::konqHttpProxy()).arg(TorkConfig::konqHttpProxyPort()) << "\n"; + ts << TQString("https_proxy=%1:%2").arg(TorkConfig::konqHttpsProxy()).arg(TorkConfig::konqHttpsProxyPort()) << "\n"; ts << "HTTP_PROXY=$http_proxy" << "\n"; ts << "HTTPS_PROXY=$https_proxy" << "\n"; ts << "export HTTP_PROXY HTTP_PROXY http_proxy https_proxy" << "\n"; @@ -522,7 +522,7 @@ void torkView::privoxiedBash() inf.close(); - KRun::runCommand( QString("konsole --caption 'Shell Using Privoxy for Http requests - Launched From TorK' --noclose -e bash --init-file %1").arg(inf.name()), "konsole", "konsole" ); + KRun::runCommand( TQString("konsole --caption 'Shell Using Privoxy for Http requests - Launched From TorK' --noclose -e bash --init-file %1").arg(inf.name()), "konsole", "konsole" ); } @@ -576,7 +576,7 @@ void torkView::toggleAnonymizerTork(bool state) setHiddenServicesText(); welcomeitem->score->setEnabled(false); - for ( QValueList<HitWidget*>::Iterator it = menuItems.begin(); it != menuItems.end(); ++it ){ + for ( TQValueList<HitWidget*>::Iterator it = menuItems.begin(); it != menuItems.end(); ++it ){ if (*it) (*it)->setEnabled(true); } @@ -597,7 +597,7 @@ void torkView::toggleAnonymizerTork(bool state) welcomeitem->score->setEnabled(true); setHiddenServicesText(); - for ( QValueList<HitWidget*>::Iterator it = menuItems.begin(); it != menuItems.end(); ++it ){ + for ( TQValueList<HitWidget*>::Iterator it = menuItems.begin(); it != menuItems.end(); ++it ){ if (*it) (*it)->setEnabled(false); } @@ -609,9 +609,9 @@ void torkView::toggleAnonymizerTork(bool state) void torkView::setHiddenServicesText() { - QString activeHiddenServices; - QStringList hiddenServices = TorkConfig::hiddenServices(); - for ( QStringList::Iterator it = hiddenServices.begin(); it != hiddenServices.end(); ++it ) + TQString activeHiddenServices; + TQStringList hiddenServices = TorkConfig::hiddenServices(); + for ( TQStringList::Iterator it = hiddenServices.begin(); it != hiddenServices.end(); ++it ) { if ((*it).isEmpty()) continue; @@ -642,16 +642,16 @@ torkView::~torkView() #define MAXPROGDISPLAY 5 -void torkView::streamStatusUpdated(const QString &streamID, const QString &status, - const QString &circID, const QString &Target, const QString &info) +void torkView::streamStatusUpdated(const TQString &streamID, const TQString &status, + const TQString &circID, const TQString &Target, const TQString &info) { - QString tmpstatus = status.stripWhiteSpace(); + TQString tmpstatus = status.stripWhiteSpace(); streamItem* streamline; - QListViewItem* osdstreamline; - QListViewItem* torTrafficLine; + TQListViewItem* osdstreamline; + TQListViewItem* torTrafficLine; torTrafficLine=0L; @@ -661,46 +661,46 @@ void torkView::streamStatusUpdated(const QString &streamID, const QString &statu m_osd->infoList->adjustColumn(1); infoList->adjustColumn(2); - timeLastTorUse = QTime::currentTime(); + timeLastTorUse = TQTime::currentTime(); - QString cleanedFullTarget = Target; - cleanedFullTarget.replace(QRegExp("(\\.\\$[A-Z0-9]{40})\\."),"."); - QString cleanedTarget = cleanedFullTarget.section(":",0,0); - QString cleanedPort = cleanedFullTarget.section(":",1,1); + TQString cleanedFullTarget = Target; + cleanedFullTarget.replace(TQRegExp("(\\.\\$[A-Z0-9]{40})\\."),"."); + TQString cleanedTarget = cleanedFullTarget.section(":",0,0); + TQString cleanedPort = cleanedFullTarget.section(":",1,1); addrLastTorUse = cleanedFullTarget; if (TorkConfig::paranoidMode() > 0) emit newIdentity(); // Find the program associated with the stream - QString program = ".."; - QPixmap programicon; + TQString program = ".."; + TQPixmap programicon; if ((tmpstatus == "NEW")){ if (info.contains("PURPOSE=USER")){ - QRegExp rx("(SOURCE_ADDR=127.0.0.1:[0-9]+ )"); + TQRegExp rx("(SOURCE_ADDR=127.0.0.1:[0-9]+ )"); rx.search(info); - QString port = rx.cap(0).section("SOURCE_ADDR=127.0.0.1:",-1) + TQString port = rx.cap(0).section("SOURCE_ADDR=127.0.0.1:",-1) .stripWhiteSpace(); portStream[streamID] = port; }else{ - QString purpose = info.section("PURPOSE=",-1,-1); + TQString purpose = info.section("PURPOSE=",-1,-1); program = streamPurpose[purpose]; - programicon = QPixmap(SmallIcon("tork_tor")); + programicon = TQPixmap(SmallIcon("tork_tor")); } } // Assign the circuit and exit server to the stream circuitItem* circuitline; - QString circuit = "Pending.."; - QString exitserver; - QPixmap exitserverflag; + TQString circuit = "Pending.."; + TQString exitserver; + TQPixmap exitserverflag; // Don't look for circuit if one hasn't been assigned yet if (circID != "0") { if ((circuitline = (circuitItem*) circuitList->findItem(circID,0)) != 0){ - QListViewItem* serverline; - if ((serverline = (QListViewItem*) circuitExits[circID]) != 0){ + TQListViewItem* serverline; + if ((serverline = (TQListViewItem*) circuitExits[circID]) != 0){ exitserver = serverline->text(1); exitserverflag = *serverline->pixmap(1); } @@ -709,10 +709,10 @@ void torkView::streamStatusUpdated(const QString &streamID, const QString &statu } //Assign an icon to illustrate the type of stream - QPixmap icon = cachedStreamIcon[cleanedFullTarget]; + TQPixmap icon = cachedStreamIcon[cleanedFullTarget]; if (icon.isNull()){ - QString iconPath = locate("cache", + TQString iconPath = locate("cache", KMimeType::favIconForURL("http://"+cleanedTarget) +".png"); @@ -720,7 +720,7 @@ void torkView::streamStatusUpdated(const QString &streamID, const QString &statu icon.load( iconPath ); if (cleanedPort == "443"){ - QPixmap overlay = KSystemTray::loadIcon( "tork_ssl" ); + TQPixmap overlay = KSystemTray::loadIcon( "tork_ssl" ); if ( !overlay.isNull() ) { @@ -728,10 +728,10 @@ void torkView::streamStatusUpdated(const QString &streamID, const QString &statu int y = icon.height() - overlay.height(); if ( icon.mask() ) { - QBitmap mask = *icon.mask(); + TQBitmap mask = *icon.mask(); bitBlt( &mask, x, y, overlay.mask() ? - const_cast<QBitmap*>(overlay.mask()) : &overlay, + const_cast<TQBitmap*>(overlay.mask()) : &overlay, 0, 0, overlay.width(), overlay.height(), overlay.mask() ? OrROP : SetROP ); icon.setMask(mask); @@ -760,15 +760,15 @@ void torkView::streamStatusUpdated(const QString &streamID, const QString &statu } //Assign an icon to illustrate the stream status - QPixmap statusicon = streamStatusIcon[tmpstatus]; + TQPixmap statusicon = streamStatusIcon[tmpstatus]; //Display the entries in the UI //Add to the traffic log if necessary if (TorkConfig::logTorTraffic()){ - torTrafficLine = new QListViewItem(TorTraffic, streamID, - QDateTime::currentDateTime(). - toString(Qt::ISODate). + torTrafficLine = new TQListViewItem(TorTraffic, streamID, + TQDateTime::currentDateTime(). + toString(TQt::ISODate). replace("T"," "), cleanedFullTarget, circuit); @@ -788,7 +788,7 @@ void torkView::streamStatusUpdated(const QString &streamID, const QString &statu streamline->setDropEnabled(true); //The stream in the OSD display - osdstreamline = new QListViewItem(m_osd->infoList,streamID, + osdstreamline = new TQListViewItem(m_osd->infoList,streamID, cleanedTarget,"","0 B/s", circuit); osdstreamline->setPixmap(2,statusicon); osdstreamline->setPixmap(1,icon); @@ -821,7 +821,7 @@ void torkView::streamStatusUpdated(const QString &streamID, const QString &statu return; } - QPixmap statusicon = streamStatusIcon[status.stripWhiteSpace()]; + TQPixmap statusicon = streamStatusIcon[status.stripWhiteSpace()]; streamline->setPixmap(3,statusicon); osdstreamline->setPixmap(2,statusicon); @@ -829,16 +829,16 @@ void torkView::streamStatusUpdated(const QString &streamID, const QString &statu // If the stream does not have a verbose circuit description, add one if ((streamline->text(6) == "Pending..")){ - QString circuit = "Pending.."; - QString exitserver; - QPixmap exitserverflag; + TQString circuit = "Pending.."; + TQString exitserver; + TQPixmap exitserverflag; circuitItem* circuitline; // Don't look for circuit if one hasn't been assigned yet if (circID != "0") { if ((circuitline = (circuitItem*) circuitList->findItem(circID,0)) != 0){ - QListViewItem* serverline; - if ((serverline = (QListViewItem*) circuitExits[circID]) != 0){ + TQListViewItem* serverline; + if ((serverline = (TQListViewItem*) circuitExits[circID]) != 0){ exitserver = serverline->text(1); exitserverflag = *serverline->pixmap(1); } @@ -868,8 +868,8 @@ void torkView::streamStatusUpdated(const QString &streamID, const QString &statu if (streamline->text(1) == ".."){ if ((streamList->childCount() < (MAXPROGDISPLAY * 3)) && (progDisplayCounter < MAXPROGDISPLAY)) { - QString program = parseStreamPort(portStream[streamID]); - QPixmap programicon = streamProgram(program); + TQString program = parseStreamPort(portStream[streamID]); + TQPixmap programicon = streamProgram(program); streamline->setText(1,program); streamline->setPixmap(1,programicon); progDisplayCounter++; @@ -881,7 +881,7 @@ void torkView::streamStatusUpdated(const QString &streamID, const QString &statu } -QString torkView::parseStreamPort(const QString &str_port) +TQString torkView::parseStreamPort(const TQString &str_port) { int m_port = str_port.toInt(); @@ -894,19 +894,19 @@ QString torkView::parseStreamPort(const QString &str_port) struct dirent *pde; DIR *pdir; - QString line; - QString inode; + TQString line; + TQString inode; bool foundIt = false; - QFile tcp("/proc/net/tcp") ; + TQFile tcp("/proc/net/tcp") ; tcp.open (IO_ReadOnly) ; - QTextStream input(&tcp) ; + TQTextStream input(&tcp) ; while (!input.eof()) { - QString line = input.readLine() ; - QStringList bits = QStringList::split (QRegExp("[ :]+"), line) ; + TQString line = input.readLine() ; + TQStringList bits = TQStringList::split (TQRegExp("[ :]+"), line) ; int port = bits[2].toLong(0, 16) ; if (port == m_port) @@ -917,19 +917,19 @@ QString torkView::parseStreamPort(const QString &str_port) } if (inode.isEmpty()) - return QString(); + return TQString(); - QDir d = QDir( "/proc" ); - QStringList dirs = d.entryList( QDir::Dirs ); - QStringList::Iterator it; + TQDir d = TQDir( "/proc" ); + TQStringList dirs = d.entryList( TQDir::Dirs ); + TQStringList::Iterator it; for ( it = dirs.begin(); it != dirs.end(); ++it ) { - QDir fd = QDir( "/proc/" +*it+"/fd" ); + TQDir fd = TQDir( "/proc/" +*it+"/fd" ); if (!fd.exists()) continue; - QString path = "/proc/" +*it+"/fd"; + TQString path = "/proc/" +*it+"/fd"; if ((pdir = opendir((const char*)path)) == NULL) continue; @@ -945,14 +945,14 @@ QString torkView::parseStreamPort(const QString &str_port) lbuf[len] = '\0'; - if (QString(lbuf).contains(inode)){ + if (TQString(lbuf).contains(inode)){ foundIt = true; - QFile file( "/proc/"+*it+"/cmdline" ); + TQFile file( "/proc/"+*it+"/cmdline" ); file.open( IO_ReadOnly ); if ( !file.isOpen() ) continue; - QTextStream t( &file ); - QString program = t.readLine(); + TQTextStream t( &file ); + TQString program = t.readLine(); program.replace('\0',' '); program = program.section(" ",0,0).section("/",-1); return program; @@ -963,13 +963,13 @@ QString torkView::parseStreamPort(const QString &str_port) if (foundIt) break; } - return QString(); + return TQString(); } -void torkView::circuitStatusUpdated(const QString &circuitID, const QString &status, const QString &server, const QString &exit) +void torkView::circuitStatusUpdated(const TQString &circuitID, const TQString &status, const TQString &server, const TQString &exit) { - QString tmpstatus = status.lower().stripWhiteSpace(); + TQString tmpstatus = status.lower().stripWhiteSpace(); circuitItem* circuitline; if ((circuitline = (circuitItem*)circuitList->findItem(circuitID,0)) == 0){ @@ -982,7 +982,7 @@ void torkView::circuitStatusUpdated(const QString &circuitID, const QString &sta for( uint index = 0; index < circuitIconList.count(); index++ ) { if ( circuitIconList[index].contains(tmpstatus)) { - circuitline->setPixmap(1,QPixmap(SmallIcon("tork_"+circuitIconList[index].first()))); + circuitline->setPixmap(1,TQPixmap(SmallIcon("tork_"+circuitIconList[index].first()))); continue; } } @@ -991,23 +991,23 @@ void torkView::circuitStatusUpdated(const QString &circuitID, const QString &sta delete circuitline; circuitExits.erase(circuitID); }else if (!exit.isEmpty()){ - QListViewItem* serverline; - if ((serverline = (QListViewItem*) serverList->findItem(exit,2)) != 0){ + TQListViewItem* serverline; + if ((serverline = (TQListViewItem*) serverList->findItem(exit,2)) != 0){ circuitExits[circuitID] = serverline; } } } -void torkView::ORStatusUpdated(const QString &ORID, const QString &status) +void torkView::ORStatusUpdated(const TQString &ORID, const TQString &status) { - QString tmpstatus = status.lower().stripWhiteSpace(); + TQString tmpstatus = status.lower().stripWhiteSpace(); - QListViewItem* ORline = ORList->findItem(ORID,1); + TQListViewItem* ORline = ORList->findItem(ORID,1); if (ORline == 0) - ORline = new QListViewItem(ORList, "", ORID); + ORline = new TQListViewItem(ORList, "", ORID); if (tmpstatus.contains("closed") || tmpstatus.contains("failed")){ delete ORline; @@ -1023,34 +1023,34 @@ void torkView::ORStatusUpdated(const QString &ORID, const QString &status) for( uint index = 0; index < iconList.count(); index++ ) { if ( iconList[index].contains(tmpstatus)) { - ORline->setPixmap(0,QPixmap(SmallIcon("tork_"+iconList[index].first()))); + ORline->setPixmap(0,TQPixmap(SmallIcon("tork_"+iconList[index].first()))); return; } } } -void torkView::guardStatusUpdated(const QString &ORID, const QString &status) +void torkView::guardStatusUpdated(const TQString &ORID, const TQString &status) { entryGuards[ORID] = status; - QString tmpstatus = status.lower().stripWhiteSpace(); + TQString tmpstatus = status.lower().stripWhiteSpace(); - QListViewItem* ORline = ORList->findItem(ORID,1); + TQListViewItem* ORline = ORList->findItem(ORID,1); if (ORline == 0) - ORline = new QListViewItem(ORList, "", ORID); + ORline = new TQListViewItem(ORList, "", ORID); for( uint index = 0; index < iconList.count(); index++ ) { if ( guardIconList[index].contains(tmpstatus)) { - ORline->setPixmap(0,QPixmap(SmallIcon("tork_guard_"+guardIconList[index].first()))); + ORline->setPixmap(0,TQPixmap(SmallIcon("tork_guard_"+guardIconList[index].first()))); return; } } } -void torkView::infoUpdated(const QString &type, const QString &summary, const QString &) +void torkView::infoUpdated(const TQString &type, const TQString &summary, const TQString &) { static int id = 0; @@ -1059,12 +1059,12 @@ void torkView::infoUpdated(const QString &type, const QString &summary, const QS total++; } uint count = 1; - QString tmpid; + TQString tmpid; for( uint index = 0; index < summary.length(); index += 120) { id++; - tmpid = QString("00000000000%1").arg(id).right(10); - new QListViewItem(infoList, QDateTime::currentDateTime ().toString(Qt::ISODate).replace("T"," "), - tmpid, type, QString("(%1 of %2) %3").arg(count) + tmpid = TQString("00000000000%1").arg(id).right(10); + new TQListViewItem(infoList, TQDateTime::currentDateTime ().toString(TQt::ISODate).replace("T"," "), + tmpid, type, TQString("(%1 of %2) %3").arg(count) .arg(total) .arg(summary.mid(index,120))); count++; @@ -1072,7 +1072,7 @@ void torkView::infoUpdated(const QString &type, const QString &summary, const QS } -void torkView::bwUpdated(const QString &in, const QString &out) +void torkView::bwUpdated(const TQString &in, const TQString &out) { @@ -1112,11 +1112,11 @@ void torkView::bwUpdated(const QString &in, const QString &out) } -QPixmap torkView::streamProgram(const QString &program) +TQPixmap torkView::streamProgram(const TQString &program) { - QString prog = KGlobal::iconLoader()->iconPath(program, KIcon::Small, true); + TQString prog = KGlobal::iconLoader()->iconPath(program, KIcon::Small, true); if (prog.isEmpty()) return SmallIcon( "exec" ); else @@ -1124,7 +1124,7 @@ QPixmap torkView::streamProgram(const QString &program) } -void torkView::streamBwUpdated(const QString &stream, const QString &in, const QString &out) +void torkView::streamBwUpdated(const TQString &stream, const TQString &in, const TQString &out) { //Tor Tx/Rx @@ -1141,28 +1141,28 @@ void torkView::reportBW(int secs) //Calculate Streams Tx/Rx - for ( QMap<QString, streamItem*>::Iterator stream = streams.begin(); stream != streams.end(); ++stream ) + for ( TQMap<TQString, streamItem*>::Iterator stream = streams.begin(); stream != streams.end(); ++stream ) { if (stream.data()){ stream.data()->calcBWRate(streamBwIn[stream.key().latin1()], streamBwOut[stream.key().latin1()], secs); - QString sbw = + TQString sbw = BytesPerSecToString( stream.data()->mSpeedHistoryRx[stream.data()->mSpeedHistoryPtr] + stream.data()->mSpeedHistoryTx[stream.data()->mSpeedHistoryPtr],0); //Overlay here -// QPixmap icon = stream.data()->pixmap(3); -// QPixmap pm(*(stream.data()->pixmap(3))); -// QPainter p; +// TQPixmap icon = stream.data()->pixmap(3); +// TQPixmap pm(*(stream.data()->pixmap(3))); +// TQPainter p; // p.begin(&pm); // -// p.drawText(stream.data()->pixmap(3)->rect(),Qt::AlignCenter,sbw); +// p.drawText(stream.data()->pixmap(3)->rect(),TQt::AlignCenter,sbw); // p.end(); // stream.data()->setPixmap(3,pm); stream.data()->setText(4,sbw); - QListViewItem* osdstreamline = osdstreams[stream.data()->text(0)]; + TQListViewItem* osdstreamline = osdstreams[stream.data()->text(0)]; osdstreamline->setText(3,sbw); } } @@ -1170,7 +1170,7 @@ void torkView::reportBW(int secs) //Calculate System Tx/Rx unsigned int sysbrx = 0; unsigned int sysbtx = 0; - for ( QStringList::Iterator it = mSysDevPathList.begin(); it != mSysDevPathList.end(); ++it ) + for ( TQStringList::Iterator it = mSysDevPathList.begin(); it != mSysDevPathList.end(); ++it ) { if ((*it).isEmpty()) continue; @@ -1262,14 +1262,14 @@ void torkView::reportBW(int secs) if (upperOut < 0) upperOut = 0; else if (upperOut > 100) upperOut = 100; - QString kbsrx = BytesPerSecToString(mSpeedHistoryRx[mSpeedHistoryPtr]); - QString kbstx = BytesPerSecToString(mSpeedHistoryTx[mSpeedHistoryPtr]); + TQString kbsrx = BytesPerSecToString(mSpeedHistoryRx[mSpeedHistoryPtr]); + TQString kbstx = BytesPerSecToString(mSpeedHistoryTx[mSpeedHistoryPtr]); m_osd->m_graphIn->addPercentReading(upperIn, false); m_osd->m_graphOut->addPercentReading(upperOut, false); - m_osd->m_graphIn->setLabel(QString("Dn: %1") + m_osd->m_graphIn->setLabel(TQString("Dn: %1") .arg(kbsrx)); - m_osd->m_graphOut->setLabel(QString("Up: %1") + m_osd->m_graphOut->setLabel(TQString("Up: %1") .arg(kbstx)); // Update Tray and StatusBar @@ -1279,9 +1279,9 @@ void torkView::reportBW(int secs) kbstx); } -unsigned long torkView::readInterfaceNumValue(QString interface, +unsigned long torkView::readInterfaceNumValue(TQString interface, const char* name) { - // stdio functions appear to be more fast than QFile? + // stdio functions appear to be more fast than TQFile? FILE* fp = fopen((interface+"/statistics/"+name).latin1(), "r"); if (!fp) return 0; @@ -1292,35 +1292,35 @@ unsigned long torkView::readInterfaceNumValue(QString interface, } -void torkView::activeServersUpdated( const QStringList &servers) +void torkView::activeServersUpdated( const TQStringList &servers) { - QListViewItem* tm; - QStringList tmpservers = servers; - for ( QStringList::Iterator it = tmpservers.begin(); it != tmpservers.end(); ++it ) + TQListViewItem* tm; + TQStringList tmpservers = servers; + for ( TQStringList::Iterator it = tmpservers.begin(); it != tmpservers.end(); ++it ) { if ((*it).isEmpty()) continue; if ( (tm = serverList->findItem((*it),1)) > 0){ - tm->setPixmap(0,QPixmap(SmallIcon("tork_green"))); + tm->setPixmap(0,TQPixmap(SmallIcon("tork_green"))); }else{ - tm = new QListViewItem(serverList, (*it)); - tm->setPixmap(0,QPixmap(SmallIcon("tork_green"))); + tm = new TQListViewItem(serverList, (*it)); + tm->setPixmap(0,TQPixmap(SmallIcon("tork_green"))); } } } -void torkView::serverStatusUpdated(const QString &ip,const QString &fp, - const QString &server, const QString &statuses) +void torkView::serverStatusUpdated(const TQString &ip,const TQString &fp, + const TQString &server, const TQString &statuses) { - QListViewItem* tm; + TQListViewItem* tm; if (!(tm = torservers[fp])){ - tm = new QListViewItem(serverList, "", (server), fp, statuses); + tm = new TQListViewItem(serverList, "", (server), fp, statuses); torservers[fp] = tm; } - QString cc; + TQString cc; int country_id = 0; GeoIP * gi = 0; if (geoip_db) @@ -1340,23 +1340,23 @@ void torkView::serverStatusUpdated(const QString &ip,const QString &fp, }else cc = "--"; - QString ccode = QString("%1").arg(country_id); + TQString ccode = TQString("%1").arg(country_id); tm->setText(4,ccode); tm->setText(5,ip); /* - QRegExp rx("^[0-9]{1,3}\\."); + TQRegExp rx("^[0-9]{1,3}\\."); rx.search(ip); - QString tmp = rx.cap(0); + TQString tmp = rx.cap(0); if (!m_subnet16List.contains(tmp)) m_subnet16List << tmp; */ if (cc == "--") - tm->setPixmap(1,QPixmap(SmallIcon("help"))); + tm->setPixmap(1,TQPixmap(SmallIcon("help"))); else - tm->setPixmap(1,QPixmap(SmallIcon("tork_" + cc.lower()))); + tm->setPixmap(1,TQPixmap(SmallIcon("tork_" + cc.lower()))); - QString icontouse; + TQString icontouse; if ((statuses.contains("Stable")) && (statuses.contains("Running")) && (statuses.contains("Fast"))) icontouse = "tork_green"; else if ((statuses.contains("Fast")) && (statuses.contains("Running"))) @@ -1375,30 +1375,30 @@ void torkView::serverStatusUpdated(const QString &ip,const QString &fp, // Update Exclude Nodes if Country is Excluded and this server is new to us if (TorkConfig::excludeCountries().contains(ccode)){ - if (!TorkConfig::excludeServersHistory().contains(QString("%1-%2-%3") + if (!TorkConfig::excludeServersHistory().contains(TQString("%1-%2-%3") .arg(ccode).arg(fp).arg(server))){ - QStringList existingServers = TorkConfig::excludeServersHistory(); - existingServers.append(QString("%1-%2-%3").arg(ccode).arg(fp).arg(server)); + TQStringList existingServers = TorkConfig::excludeServersHistory(); + existingServers.append(TQString("%1-%2-%3").arg(ccode).arg(fp).arg(server)); TorkConfig::setExcludeServersHistory(existingServers); - QStringList permList; + TQStringList permList; permList = TorkConfig::excludeNodes(); - QString node = "$"+getFPFromFPDigest(fp); + TQString node = "$"+getFPFromFPDigest(fp); permList.append(node); } } - tm->setPixmap(0,QPixmap(SmallIcon(icontouse))); + tm->setPixmap(0,TQPixmap(SmallIcon(icontouse))); } void torkView::switchColors() { // switch the foreground/background colors of the label -/* QColor color = Settings::col_background(); +/* TQColor color = Settings::col_background(); Settings::setCol_background( Settings::col_foreground() ); Settings::setCol_foreground( color ); */ @@ -1415,19 +1415,19 @@ void torkView::settingsChanged() emit signalChangeStatusbar( i18n("Settings changed") );*/ } -void torkView::displayError( const QString &caption, const QString &infol) +void torkView::displayError( const TQString &caption, const TQString &infol) { if (!circuitList->recentDropEvent()) return; - QString info = infol;; - info.replace(QRegExp("(\\$[A-Z0-9]{40})(~|=)"),""); + TQString info = infol;; + info.replace(TQRegExp("(\\$[A-Z0-9]{40})(~|=)"),""); delete m_pop; KPassivePopup* pop; - QPoint pnt; + TQPoint pnt; if (kmain->isActiveWindow()){ pop = new KPassivePopup( kmain ); pnt = kmain->pos() += kmain->m_view->pos() += kmain->m_view->circuitList->pos() += @@ -1438,18 +1438,18 @@ void torkView::displayError( const QString &caption, const QString &infol) pnt = kmain->_tray->pos(); } pop->setView( caption,info ); - pop->show(QPoint(pnt)); + pop->show(TQPoint(pnt)); m_pop = pop; } -void torkView::displayServer( const QString &caption, const QString &info) +void torkView::displayServer( const TQString &caption, const TQString &info) { KPassivePopup* pop; - QPoint pnt; + TQPoint pnt; if (kmain->isActiveWindow()){ pop = new KPassivePopup( serverList ); //pnt = kmain->pos() -= kmain->m_view->serverList->getMousePos() -= kmain->m_view->serverList->getMousePos() -= kmain->m_view->serverList->getMousePos(); @@ -1458,22 +1458,22 @@ void torkView::displayServer( const QString &caption, const QString &info) pnt = kmain->_tray->pos(); } pop->setView( caption,info ); - //pop->show(QPoint(pnt)); + //pop->show(TQPoint(pnt)); pop->show(); } -void torkView::showServerBW(const QString &fp ) +void torkView::showServerBW(const TQString &fp ) { - QString fl; - QString tmpFile; - fl = QString("http://www.noreply.org/tor-running-routers/%1/node-traf-%2.png") + TQString fl; + TQString tmpFile; + fl = TQString("http://www.noreply.org/tor-running-routers/%1/node-traf-%2.png") .arg(fp.left(2)).arg(fp); KIO::NetAccess::download( fl, tmpFile, 0L ); kapp->processEvents(); - streamList-> setPaletteBackgroundPixmap( QPixmap(tmpFile) ); + streamList-> setPaletteBackgroundPixmap( TQPixmap(tmpFile) ); } @@ -1487,11 +1487,11 @@ void torkView::hidePopup( ) void torkView::populateMenu() { Anonymizer->clear(); - QFont font; + TQFont font; //Welcome - welcomeitem = new HitWidget(QString::null, QString::null); - welcomeheaderLabel = new QLabel(welcomeitem); + welcomeitem = new HitWidget(TQString::null, TQString::null); + welcomeheaderLabel = new TQLabel(welcomeitem); welcomeheaderLabel->setText(i18n("Press 'Play' to get started!")); font.setBold( true ); welcomeheaderLabel->setFont( font ); @@ -1529,11 +1529,11 @@ void torkView::populateMenu() paranoidmodeicon->setPixmap(SmallIcon("tork_penguin")); paranoidmodetext->setText(i18n("In Normal mode!")); - QStringList qconf; + TQStringList qconf; qconf << "Clnt/Exit" << "Clnt/Relay" << "Exit" << "Relay" << "Client" << "Custom" << "Remote" << "Local"; welcomeitem->score->setHidden(false); welcomeitem->score->insertStringList(qconf); - welcomeitem->score->setPalette(QPalette(Qt::white,Qt::white)); + welcomeitem->score->setPalette(TQPalette(TQt::white,TQt::white)); welcomeitem->score->setCurrentItem(TorkConfig::quickConfigure()); @@ -1543,16 +1543,16 @@ void torkView::populateMenu() connect(welcomeitem->icon, SIGNAL(leftClickedURL()), SIGNAL(startEverything())); - QLabel *headerLabel; + TQLabel *headerLabel; //Firefox firefoxitem = 0L; #ifndef LIVECD if (TorkConfig::availablePrograms().contains("firefox")){ - firefoxitem = new HitWidget(QString::null, QString::null); + firefoxitem = new HitWidget(TQString::null, TQString::null); - headerLabel = new QLabel(firefoxitem); + headerLabel = new TQLabel(firefoxitem); headerLabel->setText(i18n("Anonymous Browsing (with Firefox)")); font.setBold( true ); headerLabel->setFont( font ); @@ -1568,7 +1568,7 @@ void torkView::populateMenu() )+"</qt>"); firefoxitem->icon->setURL("firefox"); - //QComboBox* countries = new QComboBox( FALSE, "this" ); + //TQComboBox* countries = new TQComboBox( FALSE, "this" ); //firefoxitem->insertWidget(1,countries); buttonStart = new KURLLabel(firefoxitem); @@ -1588,8 +1588,8 @@ void torkView::populateMenu() #endif //Anonymous Mail - mixminionitem = new HitWidget(QString::null, QString::null); - headerLabel = new QLabel(mixminionitem); + mixminionitem = new HitWidget(TQString::null, TQString::null); + headerLabel = new TQLabel(mixminionitem); headerLabel->setText(i18n("Anonymous Email")); font.setBold( true ); headerLabel->setFont( font ); @@ -1606,15 +1606,15 @@ void torkView::populateMenu() )+"</qt>"); -// QStringList qconf; +// TQStringList qconf; // qconf << "Simple" << "KMail"; // -// QFont f( sshitem->score->font().rawName(), +// TQFont f( sshitem->score->font().rawName(), // sshitem->score->font().pointSize() - 1 ); // mixminionitem->score->setFont( f ); // mixminionitem->score->setHidden(false); // mixminionitem->score->insertStringList(shellsAvailable); -// mixminionitem->score->setPalette(QPalette(Qt::white,Qt::white)); +// mixminionitem->score->setPalette(TQPalette(TQt::white,TQt::white)); // connect(mixminionitem->score, SIGNAL(activated(int)),mixminionitem, // SLOT(changeTerminalUrl(int))); @@ -1646,8 +1646,8 @@ void torkView::populateMenu() //Konqueror #ifndef LIVECD if (TorkConfig::availablePrograms().contains("konqueror")){ - konqitem = new HitWidget(QString::null, QString::null); - headerLabel = new QLabel(konqitem); + konqitem = new HitWidget(TQString::null, TQString::null); + headerLabel = new TQLabel(konqitem); headerLabel->setText(i18n("Anonymous Browsing (with Konqueror)")); font.setBold( true ); headerLabel->setFont( font ); @@ -1656,7 +1656,7 @@ void torkView::populateMenu() konqitem->setIcon("tork_konqueror_play"); if (TorkConfig::kDEUsesTor()) - konqitem->icon->pixmap()->fill(Qt::red); + konqitem->icon->pixmap()->fill(TQt::red); konqitem->setDescriptionText("<qt>"+i18n("<b>Click the icon to launch an anonymous browsing session. </b><br>" )+"</qt>"); @@ -1701,8 +1701,8 @@ void torkView::populateMenu() if (TorkConfig::availablePrograms().contains("opera")){ - operaitem = new HitWidget(QString::null, QString::null); - headerLabel = new QLabel(operaitem); + operaitem = new HitWidget(TQString::null, TQString::null); + headerLabel = new TQLabel(operaitem); headerLabel->setText(i18n("Anonymous Browsing (with Opera)")); font.setBold( true ); headerLabel->setFont( font ); @@ -1718,16 +1718,16 @@ void torkView::populateMenu() )+"</qt>"); operaitem->icon->setURL("opera"); Anonymizer->insertItem(operaitem); - connect(operaitem->icon, SIGNAL(leftClickedURL(const QString&)), SLOT(anonymizedOpera(const QString&))); + connect(operaitem->icon, SIGNAL(leftClickedURL(const TQString&)), SLOT(anonymizedOpera(const TQString&))); } #endif hiddenservicesitem = 0L; //Hidden Services - hiddenservicesitem = new HitWidget(QString::null, QString::null); + hiddenservicesitem = new HitWidget(TQString::null, TQString::null); - headerLabel = new QLabel(hiddenservicesitem); + headerLabel = new TQLabel(hiddenservicesitem); headerLabel->setText(i18n("Anonymous Websites and Web Services")); font.setBold( true ); headerLabel->setFont( font ); @@ -1759,9 +1759,9 @@ void torkView::populateMenu() #ifndef LIVECD if (TorkConfig::availablePrograms().contains("kopete")){ - kopeteitem = new HitWidget(QString::null, QString::null); + kopeteitem = new HitWidget(TQString::null, TQString::null); - headerLabel = new QLabel(kopeteitem); + headerLabel = new TQLabel(kopeteitem); headerLabel->setText(i18n("Anonymous Instant Messaging/IRC (with Kopete)")); font.setBold( true ); headerLabel->setFont( font ); @@ -1775,7 +1775,7 @@ void torkView::populateMenu() )+"</qt>"); kopeteitem->icon->setURL("kopete --caption 'Anonymous IM Session - Launched From TorK'"); Anonymizer->insertItem(kopeteitem); - connect(kopeteitem->icon, SIGNAL(leftClickedURL(const QString&)), SLOT(torify(const QString&))); + connect(kopeteitem->icon, SIGNAL(leftClickedURL(const TQString&)), SLOT(torify(const TQString&))); } #endif //Gaim @@ -1784,8 +1784,8 @@ void torkView::populateMenu() #ifndef LIVECD if (TorkConfig::availablePrograms().contains("gaim")){ - gaimitem = new HitWidget(QString::null, QString::null); - headerLabel = new QLabel(gaimitem); + gaimitem = new HitWidget(TQString::null, TQString::null); + headerLabel = new TQLabel(gaimitem); headerLabel->setText(i18n("Anonymous Instant Messaging/IRC (with Gaim)")); font.setBold( true ); headerLabel->setFont( font ); @@ -1799,7 +1799,7 @@ void torkView::populateMenu() )+"</qt>"); gaimitem->icon->setURL("gaim"); Anonymizer->insertItem(gaimitem); - connect(gaimitem->icon, SIGNAL(leftClickedURL(const QString&)), SLOT(torify(const QString&))); + connect(gaimitem->icon, SIGNAL(leftClickedURL(const TQString&)), SLOT(torify(const TQString&))); } #endif //Pidgin @@ -1809,8 +1809,8 @@ void torkView::populateMenu() #ifndef LIVECD if (TorkConfig::availablePrograms().contains("pidgin")){ - pidginitem = new HitWidget(QString::null, QString::null); - headerLabel = new QLabel(pidginitem); + pidginitem = new HitWidget(TQString::null, TQString::null); + headerLabel = new TQLabel(pidginitem); headerLabel->setText(i18n("Anonymous Instant Messaging/IRC (with Pidgin)")); font.setBold( true ); headerLabel->setFont( font ); @@ -1824,7 +1824,7 @@ void torkView::populateMenu() )+"</qt>"); pidginitem->icon->setURL("pidgin"); Anonymizer->insertItem(pidginitem); - connect(pidginitem->icon, SIGNAL(leftClickedURL(const QString&)), SLOT(torify(const QString&))); + connect(pidginitem->icon, SIGNAL(leftClickedURL(const TQString&)), SLOT(torify(const TQString&))); } #endif //Gaim @@ -1834,9 +1834,9 @@ void torkView::populateMenu() if (TorkConfig::availablePrograms().contains("konversation")){ - konversationitem = new HitWidget(QString::null, QString::null); + konversationitem = new HitWidget(TQString::null, TQString::null); - headerLabel = new QLabel(konversationitem); + headerLabel = new TQLabel(konversationitem); headerLabel->setText(i18n("Anonymous Instant Messaging/IRC (with Konversation)")); font.setBold( true ); headerLabel->setFont( font ); @@ -1850,7 +1850,7 @@ void torkView::populateMenu() )+"</qt>"); konversationitem->icon->setURL("konversation"); Anonymizer->insertItem(konversationitem); - connect(konversationitem->icon, SIGNAL(leftClickedURL(const QString&)), SLOT(torify(const QString&))); + connect(konversationitem->icon, SIGNAL(leftClickedURL(const TQString&)), SLOT(torify(const TQString&))); } #endif //KSIRC @@ -1859,9 +1859,9 @@ void torkView::populateMenu() #ifndef LIVECD if (TorkConfig::availablePrograms().contains("ksirc")){ - ksircitem = new HitWidget(QString::null, QString::null); + ksircitem = new HitWidget(TQString::null, TQString::null); - headerLabel = new QLabel(ksircitem); + headerLabel = new TQLabel(ksircitem); headerLabel->setText(i18n("Anonymous IRC (with KSirc)")); font.setBold( true ); headerLabel->setFont( font ); @@ -1876,23 +1876,23 @@ void torkView::populateMenu() ksircitem->icon->setURL("ksirc --caption 'Anonymous IRC Shell - Launched From TorK'"); Anonymizer->insertItem(ksircitem); - connect(ksircitem->icon, SIGNAL(leftClickedURL(const QString&)), SLOT(torify(const QString&))); + connect(ksircitem->icon, SIGNAL(leftClickedURL(const TQString&)), SLOT(torify(const TQString&))); } #endif //SSH - QStringList shellCandidates; - QStringList shellsAvailable; + TQStringList shellCandidates; + TQStringList shellsAvailable; shellCandidates << "konsole" << "yakuake" << "xterm" << "rxvt" << "gnome-terminal"; - for ( QStringList::Iterator it = shellCandidates.begin(); it != shellCandidates.end(); it++ ) + for ( TQStringList::Iterator it = shellCandidates.begin(); it != shellCandidates.end(); it++ ) { if (TorkConfig::availablePrograms().contains(*it)) shellsAvailable << (*it); } - QStringList hkpShellsAvailable = shellsAvailable; + TQStringList hkpShellsAvailable = shellsAvailable; if (TorkConfig::availablePrograms().contains("x3270")) shellsAvailable << "x3270"; @@ -1902,9 +1902,9 @@ void torkView::populateMenu() #ifndef LIVECD if (!shellsAvailable.isEmpty()){ - sshitem = new HitWidget(QString::null, QString::null); + sshitem = new HitWidget(TQString::null, TQString::null); - headerLabel = new QLabel(sshitem); + headerLabel = new TQLabel(sshitem); headerLabel->setText(i18n("Anonymous SSH Session")); font.setBold( true ); headerLabel->setFont( font ); @@ -1937,15 +1937,15 @@ void torkView::populateMenu() sshitem->shellTitles["rxvt"] = " -title 'Anonymous SSH Shell - Launched From TorK'"; sshitem->shellTitles["gnome-terminal"] = " --title 'Anonymous SSH Shell - Launched From TorK'"; - QFont f( sshitem->score->font().rawName(), sshitem->score->font().pointSize() - 1 ); + TQFont f( sshitem->score->font().rawName(), sshitem->score->font().pointSize() - 1 ); sshitem->score->setFont( f ); sshitem->score->setHidden(false); sshitem->score->insertStringList(shellsAvailable); - sshitem->score->setPalette(QPalette(Qt::white,Qt::white)); + sshitem->score->setPalette(TQPalette(TQt::white,TQt::white)); connect(sshitem->score, SIGNAL(activated(int)),sshitem, SLOT(changeTerminalUrl(int))); Anonymizer->insertItem(sshitem); - connect(sshitem->icon, SIGNAL(leftClickedURL(const QString&)), SLOT(torify(const QString&))); + connect(sshitem->icon, SIGNAL(leftClickedURL(const TQString&)), SLOT(torify(const TQString&))); } #endif //Telnet @@ -1954,9 +1954,9 @@ void torkView::populateMenu() #ifndef LIVECD if (!shellsAvailable.isEmpty()){ - telnetitem = new HitWidget(QString::null, QString::null); + telnetitem = new HitWidget(TQString::null, TQString::null); - headerLabel = new QLabel(telnetitem); + headerLabel = new TQLabel(telnetitem); headerLabel->setText(i18n("Anonymous Telnet Session")); font.setBold( true ); headerLabel->setFont( font ); @@ -1987,15 +1987,15 @@ void torkView::populateMenu() telnetitem->shellTitles["rxvt"] = " -title 'Anonymous Telnet Session - Launched From TorK'"; telnetitem->shellTitles["gnome-terminal"] = " --title 'Anonymous Telnet Session - Launched From TorK'"; - QFont f( telnetitem->score->font().rawName(), telnetitem->score->font().pointSize() - 1 ); + TQFont f( telnetitem->score->font().rawName(), telnetitem->score->font().pointSize() - 1 ); telnetitem->score->setFont( f ); telnetitem->score->setHidden(false); telnetitem->score->insertStringList(shellsAvailable); - telnetitem->score->setPalette(QPalette(Qt::white,Qt::white)); + telnetitem->score->setPalette(TQPalette(TQt::white,TQt::white)); connect(telnetitem->score, SIGNAL(activated(int)),telnetitem, SLOT(changeTerminalUrl(int))); Anonymizer->insertItem(telnetitem); - connect(telnetitem->icon, SIGNAL(leftClickedURL(const QString&)), SLOT(torify(const QString&))); + connect(telnetitem->icon, SIGNAL(leftClickedURL(const TQString&)), SLOT(torify(const TQString&))); } //GPG #endif @@ -2005,9 +2005,9 @@ void torkView::populateMenu() #ifndef LIVECD if ((TorkConfig::availablePrograms().contains("gpg")) && !shellsAvailable.isEmpty()){ - gpgitem = new HitWidget(QString::null, QString::null); + gpgitem = new HitWidget(TQString::null, TQString::null); - headerLabel = new QLabel(gpgitem); + headerLabel = new TQLabel(gpgitem); headerLabel->setText(i18n("Anonymously Refresh GPG Keys")); font.setBold( true ); headerLabel->setFont( font ); @@ -2030,16 +2030,16 @@ void torkView::populateMenu() gpgitem->shellTitles["rxvt"] = " -title 'Anonymous GPG Keys Refresh - Launched From TorK' -e gpg --refresh-keys"; gpgitem->shellTitles["gnome-terminal"] = " --title 'Anonymous GPG Keys Refresh - Launched From TorK' -e gpg --refresh-keys"; - QFont f( gpgitem->score->font().rawName(), gpgitem->score->font().pointSize() - 1 ); + TQFont f( gpgitem->score->font().rawName(), gpgitem->score->font().pointSize() - 1 ); gpgitem->score->setFont( f ); gpgitem->score->setHidden(false); gpgitem->score->insertStringList(hkpShellsAvailable); - gpgitem->score->setPalette(QPalette(Qt::white,Qt::white)); + gpgitem->score->setPalette(TQPalette(TQt::white,TQt::white)); connect(gpgitem->score, SIGNAL(activated(int)),gpgitem, SLOT(changeTerminalUrl(int))); Anonymizer->insertItem(gpgitem); - connect(gpgitem->icon, SIGNAL(leftClickedURL(const QString&)), SLOT(torify(const QString&))); + connect(gpgitem->icon, SIGNAL(leftClickedURL(const TQString&)), SLOT(torify(const TQString&))); } #endif //All Purpose Shell @@ -2048,8 +2048,8 @@ void torkView::populateMenu() #ifndef LIVECD if (!shellsAvailable.isEmpty()){ - allpurposeitem = new HitWidget(QString::null, QString::null); - headerLabel = new QLabel(allpurposeitem); + allpurposeitem = new HitWidget(TQString::null, TQString::null); + headerLabel = new TQLabel(allpurposeitem); headerLabel->setText(i18n("Anonymous Shell for Command-Line Programs using HTTP/HTTPS")); font.setBold( true ); headerLabel->setFont( font ); @@ -2062,11 +2062,11 @@ void torkView::populateMenu() "- Suitable for such programs as <b>wget</b>, <b>slapt-get</b> and <b>lynx</b>. <br>" )+"</qt>"); -// QFont f( allpurposeitem->score->font().rawName(), 8 ); +// TQFont f( allpurposeitem->score->font().rawName(), 8 ); // allpurposeitem->score->setFont( f ); // allpurposeitem->score->setHidden(false); // allpurposeitem->score->insertStringList(shellsAvailable); -// allpurposeitem->score->setPalette(QPalette(Qt::white,Qt::white)); +// allpurposeitem->score->setPalette(TQPalette(TQt::white,TQt::white)); Anonymizer->insertItem(allpurposeitem); @@ -2076,14 +2076,14 @@ void torkView::populateMenu() } -circuitItem::circuitItem( DndListView *parent, const QString &id, const QString &status, const QString &server ) - : QListViewItem( parent, id, status, server) +circuitItem::circuitItem( DndListView *parent, const TQString &id, const TQString &status, const TQString &server ) + : TQListViewItem( parent, id, status, server) { } -streamItem::streamItem( DndListView *parent, const QString &id, const QString &program, const QString &target, const QString &status, const QString &bw, const QString &exit, const QString &circuit ) - : QListViewItem( parent, id, program, target, status, bw, exit, circuit) +streamItem::streamItem( DndListView *parent, const TQString &id, const TQString &program, const TQString &target, const TQString &status, const TQString &bw, const TQString &exit, const TQString &circuit ) + : TQListViewItem( parent, id, program, target, status, bw, exit, circuit) { /* setDragEnabled(true); setDropEnabled(true);*/ |