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/torservers.ui.h | |
parent | 88ea2b6cd4382627fb6efca9cc54825aee881d1e (diff) | |
download | tork-7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931.tar.gz tork-7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931.zip |
Initial TQt conversion
Diffstat (limited to 'src/torservers.ui.h')
-rw-r--r-- | src/torservers.ui.h | 154 |
1 files changed, 77 insertions, 77 deletions
diff --git a/src/torservers.ui.h b/src/torservers.ui.h index caf7021..0468241 100644 --- a/src/torservers.ui.h +++ b/src/torservers.ui.h @@ -21,8 +21,8 @@ #include "torkconfig.h" #include "crypto.h" #include <klocale.h> -#include <qtooltip.h> -#include <qpopupmenu.h> +#include <ntqtooltip.h> +#include <ntqpopupmenu.h> #include <kdebug.h> #include <kiconloader.h> @@ -32,63 +32,63 @@ # include <GeoIP.h> #endif -typedef QMap<QString, QString> codemap; -QString ccode; -QString cname; +typedef TQMap<TQString, TQString> codemap; +TQString ccode; +TQString cname; codemap ccodes; -QStringList blockCCs; +TQStringList blockCCs; void TorServers::init() { - ExcludeNodes->setSelectionMode( QListView::Extended ); - ExcludeNodes->setColumnWidthMode(0, QListView::Manual); + ExcludeNodes->setSelectionMode( TQListView::Extended ); + ExcludeNodes->setColumnWidthMode(0, TQListView::Manual); ExcludeNodes->hideColumn(0); ExcludeNodes->header()->setResizeEnabled(FALSE, 0); - ExcludeNodes->setColumnWidthMode(1, QListView::Manual); + ExcludeNodes->setColumnWidthMode(1, TQListView::Manual); ExcludeNodes->hideColumn(1); ExcludeNodes->header()->setResizeEnabled(FALSE, 1); - ExcludeNodes->setColumnWidthMode(2, QListView::Manual); + ExcludeNodes->setColumnWidthMode(2, TQListView::Manual); ExcludeNodes->hideColumn(2); ExcludeNodes->header()->setResizeEnabled(FALSE, 2); - ExcludeNodes->setResizeMode( QListView::LastColumn ); + ExcludeNodes->setResizeMode( TQListView::LastColumn ); - ExitNodes->setSelectionMode( QListView::Extended ); - ExitNodes->setColumnWidthMode(0, QListView::Manual); + ExitNodes->setSelectionMode( TQListView::Extended ); + ExitNodes->setColumnWidthMode(0, TQListView::Manual); ExitNodes->hideColumn(0); ExitNodes->header()->setResizeEnabled(FALSE, 0); - ExitNodes->setColumnWidthMode(1, QListView::Manual); + ExitNodes->setColumnWidthMode(1, TQListView::Manual); ExitNodes->hideColumn(1); ExitNodes->header()->setResizeEnabled(FALSE, 1); - ExitNodes->setColumnWidthMode(2, QListView::Manual); + ExitNodes->setColumnWidthMode(2, TQListView::Manual); ExitNodes->hideColumn(2); ExitNodes->header()->setResizeEnabled(FALSE, 2); - ExitNodes->setResizeMode( QListView::LastColumn ); - QListViewItem *tm; - QString fp; - QString nick; - QString geoipcc; - QString countryName; - - QStringList excludeCountries = TorkConfig::excludeCountries(); - for ( QStringList::Iterator it = excludeCountries.begin(); it != excludeCountries.end(); ++it ) + ExitNodes->setResizeMode( TQListView::LastColumn ); + TQListViewItem *tm; + TQString fp; + TQString nick; + TQString geoipcc; + TQString countryName; + + TQStringList excludeCountries = TorkConfig::excludeCountries(); + for ( TQStringList::Iterator it = excludeCountries.begin(); it != excludeCountries.end(); ++it ) { countryName = GeoIP_country_name[(*it).toInt()]; ccodes[countryName] = (*it); CountryList->insertItem(countryName); } -// QStringList preferredCountries = TorkConfig::preferredCountries(); -// for ( QStringList::Iterator it = preferredCountries.begin(); it != preferredCountries.end(); ++it ) +// TQStringList preferredCountries = TorkConfig::preferredCountries(); +// for ( TQStringList::Iterator it = preferredCountries.begin(); it != preferredCountries.end(); ++it ) // { // countryName = GeoIP_country_name[(*it).toInt()]; // ccodes[countryName] = (*it); // PreferredCountryList->insertItem(countryName); // } - QStringList existingServers = TorkConfig::excludeServersHistory(); + TQStringList existingServers = TorkConfig::excludeServersHistory(); - for ( QStringList::Iterator it = existingServers.begin(); it != existingServers.end(); ++it ) + for ( TQStringList::Iterator it = existingServers.begin(); it != existingServers.end(); ++it ) { if ((*it).isEmpty()) continue; @@ -100,15 +100,15 @@ void TorServers::init() nick = (*it).section("-",2); countryName = GeoIP_country_name[(geoipcc).toInt()]; - tm = new QListViewItem(ExcludeNodes,countryName,geoipcc,fp,nick); - tm->setPixmap(3,QPixmap(SmallIcon("tork_" + QString(GeoIP_country_code[geoipcc.toInt()]).lower()))); + tm = new TQListViewItem(ExcludeNodes,countryName,geoipcc,fp,nick); + tm->setPixmap(3,TQPixmap(SmallIcon("tork_" + TQString(GeoIP_country_code[geoipcc.toInt()]).lower()))); } existingServers = TorkConfig::includeServersHistory(); - for ( QStringList::Iterator it = existingServers.begin(); it != existingServers.end(); ++it ) + for ( TQStringList::Iterator it = existingServers.begin(); it != existingServers.end(); ++it ) { if ((*it).isEmpty()) @@ -121,27 +121,27 @@ void TorServers::init() nick = (*it).section("-",2); countryName = GeoIP_country_name[(geoipcc).toInt()]; - tm = new QListViewItem(ExitNodes,countryName,geoipcc,fp,nick); - tm->setPixmap(3,QPixmap(SmallIcon("tork_" + QString(GeoIP_country_code[geoipcc.toInt()]).lower()))); + tm = new TQListViewItem(ExitNodes,countryName,geoipcc,fp,nick); + tm->setPixmap(3,TQPixmap(SmallIcon("tork_" + TQString(GeoIP_country_code[geoipcc.toInt()]).lower()))); // CandidateList->insertItem( nick ); } - QStringList mapAddresses = TorkConfig::mapAddress(); + TQStringList mapAddresses = TorkConfig::mapAddress(); - for ( QStringList::Iterator it = mapAddresses.begin(); it != mapAddresses.end(); ++it ) + for ( TQStringList::Iterator it = mapAddresses.begin(); it != mapAddresses.end(); ++it ) { if ((*it).isEmpty()) continue; - QString entry = (*it).section(" ",1,1); - QString destination = entry.section(".",0,-3); - QString server = entry.section(".",-2,-2); - QString waypoint = entry.section(".",-1,-1); + TQString entry = (*it).section(" ",1,1); + TQString destination = entry.section(".",0,-3); + TQString server = entry.section(".",-2,-2); + TQString waypoint = entry.section(".",-1,-1); - tm = new QListViewItem(MapAddress,destination,server,waypoint); + tm = new TQListViewItem(MapAddress,destination,server,waypoint); } - QListViewItemIterator it(AllowUnverifiedNodes); + TQListViewItemIterator it(AllowUnverifiedNodes); while ( it.current() ) { if (TorkConfig::allowUnverifiedNodes().contains(it.current()->text(0))) AllowUnverifiedNodes->setSelected(*it,true); @@ -157,7 +157,7 @@ void TorServers::init() void TorServers::destroy() { -// QStringList cclist; +// TQStringList cclist; // for (unsigned int index = 0; index != CountryList->count(); ++index){ // cclist.append(ccodes[CountryList->item(index)->text()]); // } @@ -173,7 +173,7 @@ void TorServers::destroy() } -QString TorServers::ccode(const QString &country) +TQString TorServers::ccode(const TQString &country) { return ccodes[country]; } @@ -181,15 +181,15 @@ QString TorServers::ccode(const QString &country) void TorServers::pushButton6_clicked() { - new QListViewItem(MapAddress,Destination->text(), CandidateList->currentText(), WayPoints->currentText()); + new TQListViewItem(MapAddress,Destination->text(), CandidateList->currentText(), WayPoints->currentText()); } -void TorServers::MapAddress_contextMenuRequested( QListViewItem *, const QPoint &point, int ) +void TorServers::MapAddress_contextMenuRequested( TQListViewItem *, const TQPoint &point, int ) { - QPopupMenu *menu = new QPopupMenu( MapAddress ); + TQPopupMenu *menu = new TQPopupMenu( MapAddress ); menu->clear(); menu->insertItem( "Delete Entry", this,SLOT(slotDeleteEntry()) ); @@ -201,7 +201,7 @@ void TorServers::MapAddress_contextMenuRequested( QListViewItem *, const QPoint void TorServers::slotDeleteEntry( ) { - QListViewItemIterator it(MapAddress, QListViewItemIterator::Selected); + TQListViewItemIterator it(MapAddress, TQListViewItemIterator::Selected); while ( it.current() ) { if (MapAddress->isSelected( it.current())) delete it.current(); @@ -212,7 +212,7 @@ void TorServers::slotDeleteEntry( ) } -void TorServers::MapAddress_returnPressed( QListViewItem * ) +void TorServers::MapAddress_returnPressed( TQListViewItem * ) { } @@ -221,9 +221,9 @@ void TorServers::MapAddress_returnPressed( QListViewItem * ) void TorServers::clearSelectedCountries_clicked() { - QValueList<QListViewItem*> itemsToDelete; + TQValueList<TQListViewItem*> itemsToDelete; - QListViewItemIterator it(ExcludeNodes, QListViewItemIterator::Selected); + TQListViewItemIterator it(ExcludeNodes, TQListViewItemIterator::Selected); while ( it.current() ) { if (CountryList->findItem(it.current()->text(0))->isSelected()){ itemsToDelete << it.current(); @@ -231,18 +231,18 @@ void TorServers::clearSelectedCountries_clicked() ++it; } - for ( QValueList<QListViewItem*>::Iterator itt = itemsToDelete.begin(); itt != itemsToDelete.end(); ++itt ){ + for ( TQValueList<TQListViewItem*>::Iterator itt = itemsToDelete.begin(); itt != itemsToDelete.end(); ++itt ){ delete (*itt); } - QValueList<QListBoxItem*> countriesToDelete; + TQValueList<TQListBoxItem*> countriesToDelete; for (unsigned int index = 0; index != CountryList->count(); ++index){ if (CountryList->item(index)->isSelected() ) countriesToDelete << CountryList->item(index); } - for ( QValueList<QListBoxItem*>::Iterator itb = countriesToDelete.begin(); + for ( TQValueList<TQListBoxItem*>::Iterator itb = countriesToDelete.begin(); itb != countriesToDelete.end(); ++itb ){ delete (*itb); } @@ -254,15 +254,15 @@ void TorServers::clearSelectedCountries_clicked() void TorServers::clearSelectedNodes_clicked() { - QValueList<QListViewItem*> itemsToDelete; + TQValueList<TQListViewItem*> itemsToDelete; - QListViewItemIterator it(ExcludeNodes, QListViewItemIterator::Selected); + TQListViewItemIterator it(ExcludeNodes, TQListViewItemIterator::Selected); while ( it.current() ) { itemsToDelete << it.current(); ++it; } - for ( QValueList<QListViewItem*>::Iterator itt = itemsToDelete.begin(); itt != itemsToDelete.end(); ++itt ){ + for ( TQValueList<TQListViewItem*>::Iterator itt = itemsToDelete.begin(); itt != itemsToDelete.end(); ++itt ){ delete (*itt); } @@ -273,9 +273,9 @@ void TorServers::clearSelectedNodes_clicked() // void TorServers::clearSelectedPreferredCountries_clicked() // { // -// QValueList<QListViewItem*> itemsToDelete; +// TQValueList<TQListViewItem*> itemsToDelete; // -// QListViewItemIterator it(ExitNodes, QListViewItemIterator::Selected); +// TQListViewItemIterator it(ExitNodes, TQListViewItemIterator::Selected); // while ( it.current() ) { // if (PreferredCountryList->findItem(it.current()->text(0))->isSelected()){ // itemsToDelete << it.current(); @@ -283,18 +283,18 @@ void TorServers::clearSelectedNodes_clicked() // ++it; // } // -// for ( QValueList<QListViewItem*>::Iterator itt = itemsToDelete.begin(); itt != itemsToDelete.end(); ++itt ){ +// for ( TQValueList<TQListViewItem*>::Iterator itt = itemsToDelete.begin(); itt != itemsToDelete.end(); ++itt ){ // delete (*itt); // } // -// QValueList<QListBoxItem*> countriesToDelete; +// TQValueList<TQListBoxItem*> countriesToDelete; // // for (unsigned int index = 0; index != PreferredCountryList->count(); ++index){ // if (PreferredCountryList->item(index)->isSelected() ) // countriesToDelete << PreferredCountryList->item(index); // } // -// for ( QValueList<QListBoxItem*>::Iterator itb = countriesToDelete.begin(); +// for ( TQValueList<TQListBoxItem*>::Iterator itb = countriesToDelete.begin(); // itb != countriesToDelete.end(); ++itb ){ // delete (*itb); // } @@ -306,15 +306,15 @@ void TorServers::clearSelectedNodes_clicked() void TorServers::clearSelectedPreferredNodes_clicked() { - QValueList<QListViewItem*> itemsToDelete; + TQValueList<TQListViewItem*> itemsToDelete; - QListViewItemIterator it(ExitNodes, QListViewItemIterator::Selected); + TQListViewItemIterator it(ExitNodes, TQListViewItemIterator::Selected); while ( it.current() ) { itemsToDelete << it.current(); ++it; } - for ( QValueList<QListViewItem*>::Iterator itt = itemsToDelete.begin(); itt != itemsToDelete.end(); ++itt ){ + for ( TQValueList<TQListViewItem*>::Iterator itt = itemsToDelete.begin(); itt != itemsToDelete.end(); ++itt ){ delete (*itt); } @@ -329,7 +329,7 @@ void TorServers::clearSelectedPreferredNodes_clicked() void TorServers::pushButton6_2_clicked() { - QListViewItemIterator it(AllowUnverifiedNodes, QListViewItemIterator::Selected); + TQListViewItemIterator it(AllowUnverifiedNodes, TQListViewItemIterator::Selected); while ( it.current() ) { it.current()->listView()->setSelected(it.current(),false); ++it; @@ -340,7 +340,7 @@ void TorServers::pushButton6_2_clicked() void TorServers::CountryList_clicked( ) { - QStringList selectedCountries; + TQStringList selectedCountries; for ( unsigned int i = 0; i < CountryList->count(); ++i){ if (CountryList->isSelected(i)){ selectedCountries.append(CountryList->item(i)->text()); @@ -348,9 +348,9 @@ void TorServers::CountryList_clicked( ) } kdDebug() << "country list clicked" << endl; - QListViewItemIterator it( ExcludeNodes ); + TQListViewItemIterator it( ExcludeNodes ); while ( it.current() ) { - QListViewItem *item = it.current(); + TQListViewItem *item = it.current(); if (selectedCountries.contains(item->text(0))) item->setSelected(true); else @@ -361,12 +361,12 @@ void TorServers::CountryList_clicked( ) } -// void TorServers::PreferredCountryList_clicked( QListBoxItem * curitem) +// void TorServers::PreferredCountryList_clicked( TQListBoxItem * curitem) // { // -// QListViewItemIterator it( ExitNodes ); +// TQListViewItemIterator it( ExitNodes ); // while ( it.current() ) { -// QListViewItem *item = it.current(); +// TQListViewItem *item = it.current(); // if (curitem){ // if (item->text(0) == curitem->text()) // item->setSelected(curitem->isSelected()); @@ -388,15 +388,15 @@ void TorServers::CountryList_clicked( ) // </connection> // <connection> // <sender>MapAddress</sender> -// <signal>contextMenuRequested(QListViewItem*,const QPoint&,int)</signal> +// <signal>contextMenuRequested(TQListViewItem*,const TQPoint&,int)</signal> // <receiver>TorServers</receiver> -// <slot>MapAddress_contextMenuRequested(QListViewItem*,const QPoint&,int)</slot> +// <slot>MapAddress_contextMenuRequested(TQListViewItem*,const TQPoint&,int)</slot> // </connection> // <connection> // <sender>MapAddress</sender> -// <signal>returnPressed(QListViewItem*)</signal> +// <signal>returnPressed(TQListViewItem*)</signal> // <receiver>TorServers</receiver> -// <slot>MapAddress_returnPressed(QListViewItem*)</slot> +// <slot>MapAddress_returnPressed(TQListViewItem*)</slot> // </connection> // <connection> // <sender>clearSelected</sender> @@ -434,9 +434,9 @@ void TorServers::CountryList_clicked( ) // </includes> // <slots> // <slot>pushButton6_clicked()</slot> -// <slot>MapAddress_contextMenuRequested( QListViewItem *, const QPoint & point, int )</slot> +// <slot>MapAddress_contextMenuRequested( TQListViewItem *, const TQPoint & point, int )</slot> // <slot>slotDeleteEntry()</slot> -// <slot>MapAddress_returnPressed( QListViewItem * )</slot> +// <slot>MapAddress_returnPressed( TQListViewItem * )</slot> // <slot>clearSelected_clicked()</slot> // <slot>clearSelected_2_clicked()</slot> // <slot>clearSelected_3_clicked()</slot> |