diff options
Diffstat (limited to 'src/configdialog.cpp')
-rw-r--r-- | src/configdialog.cpp | 146 |
1 files changed, 73 insertions, 73 deletions
diff --git a/src/configdialog.cpp b/src/configdialog.cpp index 55af9ab..341ab58 100644 --- a/src/configdialog.cpp +++ b/src/configdialog.cpp @@ -51,21 +51,21 @@ email : [email protected] #include "crypto.h" #include "../config.h" -#include <qcombobox.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qmessagebox.h> -#include <qobjectlist.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qspinbox.h> -#include <qtextcodec.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qlistview.h> -#include <qcheckbox.h> +#include <ntqcombobox.h> +#include <ntqgroupbox.h> +#include <ntqlabel.h> +#include <ntqlayout.h> +#include <ntqlineedit.h> +#include <ntqmessagebox.h> +#include <ntqobjectlist.h> +#include <ntqpushbutton.h> +#include <ntqradiobutton.h> +#include <ntqspinbox.h> +#include <ntqtextcodec.h> +#include <ntqtooltip.h> +#include <ntqvbox.h> +#include <ntqlistview.h> +#include <ntqcheckbox.h> #include <kapplication.h> //kapp #include <kcombobox.h> @@ -82,7 +82,7 @@ email : [email protected] // PUBLIC ////////////////////////////////////////////////////////////////////////////////////////// -TorkConfigDialog::TorkConfigDialog( QWidget *parent, const char* name, KConfigSkeleton *config ) +TorkConfigDialog::TorkConfigDialog( TQWidget *parent, const char* name, KConfigSkeleton *config ) : KConfigDialog( parent, name, config ),m_parent(parent) { setWFlags( WDestructiveClose ); @@ -132,15 +132,15 @@ TorkConfigDialog::TorkConfigDialog( QWidget *parent, const char* name, KConfigSk i18n( "Configure My Hidden Services" ) ); - QObjectList *list = queryList( "QLabel", "infoPixmap" ); - for( QObject *label = list->first(); label; label = list->next() ) - static_cast<QLabel*>(label)->setPixmap( QMessageBox::standardIcon( QMessageBox::Information ) ); + TQObjectList *list = queryList( "TQLabel", "infoPixmap" ); + for( TQObject *label = list->first(); label; label = list->next() ) + static_cast<TQLabel*>(label)->setPixmap( TQMessageBox::standardIcon( TQMessageBox::Information ) ); delete list; //stop KFont Requesters getting stupidly large - list = queryList( "QLabel", "m_sampleLabel" ); - for( QObject *label = list->first(); label; label = list->next() ) - static_cast<QLabel*>(label)->setMaximumWidth( 250 ); + list = queryList( "TQLabel", "m_sampleLabel" ); + for( TQObject *label = list->first(); label; label = list->next() ) + static_cast<TQLabel*>(label)->setMaximumWidth( 250 ); delete list; connect( m_usability->LongLivedPorts, SIGNAL( selectionChanged() ), this, SLOT( enableApply() ) ); @@ -225,7 +225,7 @@ void TorkConfigDialog::showServerOpts( bool state) /** Show page by object name */ -void TorkConfigDialog::showPage( const QCString& page ) +void TorkConfigDialog::showPage( const TQCString& page ) { for( uint index = 0; index < m_pageList.count(); index++ ) { if ( m_pageList[index]->name() == page ) { @@ -236,7 +236,7 @@ void TorkConfigDialog::showPage( const QCString& page ) } /** Reimplemented from KConfigDialog */ -void TorkConfigDialog::addPage( QWidget *page, const QString &itemName, const QString &pixmapName, const QString &header, bool manage ) +void TorkConfigDialog::addPage( TQWidget *page, const TQString &itemName, const TQString &pixmapName, const TQString &header, bool manage ) { // Add the widget pointer to our list, for later reference m_pageList << page; @@ -258,7 +258,7 @@ void TorkConfigDialog::updateCustomSettings() //When settings are changed in the config dialog, this is called //to update all possibly changed values and apply them to Tor. - //QListViews need to be handled outside of kconfigxt + //TQListViews need to be handled outside of kconfigxt TorkConfig::setQuickConfigure( m_quickconfig->QuickConfigure->currentItem() ); TorkConfig::setAccountingStart(m_myserver->AccountingStart->currentText()); @@ -267,8 +267,8 @@ void TorkConfigDialog::updateCustomSettings() //Unverified Servers if ( m_torservers->AllowUnverifiedNodes->childCount() > 0 ) { - QStringList v_allowUnverifiedNodes; - QListViewItemIterator it( m_torservers->AllowUnverifiedNodes, QListViewItemIterator::Selected ); + TQStringList v_allowUnverifiedNodes; + TQListViewItemIterator it( m_torservers->AllowUnverifiedNodes, TQListViewItemIterator::Selected ); while ( it.current() ) { v_allowUnverifiedNodes.append(it.current()->text(0)); ++it; @@ -278,10 +278,10 @@ void TorkConfigDialog::updateCustomSettings() //Friendly Servers if ( m_torservers->MapAddress->childCount() > 0 ) { - QStringList v_mapAddress; - QListViewItemIterator it( m_torservers->MapAddress ); + TQStringList v_mapAddress; + TQListViewItemIterator it( m_torservers->MapAddress ); while ( it.current() ) { - QString s_mapAddress = it.current()->text(0) + " " + it.current()->text(0) + "." + + TQString s_mapAddress = it.current()->text(0) + " " + it.current()->text(0) + "." + it.current()->text(1) + "." + it.current()->text(2); v_mapAddress.append(s_mapAddress); ++it; @@ -291,7 +291,7 @@ void TorkConfigDialog::updateCustomSettings() TorkConfig::setMapAddress( "" ); //Exclude Countries - QStringList cclist; + TQStringList cclist; for (unsigned int index = 0; index != m_torservers->CountryList->count(); ++index){ cclist.append(m_torservers->ccode(m_torservers->CountryList->item(index)->text())); } @@ -306,9 +306,9 @@ void TorkConfigDialog::updateCustomSettings() //Enemy Servers if ( m_torservers->ExcludeNodes->childCount() > 0 ) { - QStringList v_excludeNodes; - QStringList v_excludeServersHistory; - QListViewItemIterator it( m_torservers->ExcludeNodes ); + TQStringList v_excludeNodes; + TQStringList v_excludeServersHistory; + TQListViewItemIterator it( m_torservers->ExcludeNodes ); while ( it.current() ) { v_excludeNodes.append("$"+getFPFromFPDigest(it.current()->text(2))); v_excludeServersHistory.append(it.current()->text(1) + "-" + @@ -318,15 +318,15 @@ void TorkConfigDialog::updateCustomSettings() TorkConfig::setExcludeNodes( v_excludeNodes ); TorkConfig::setExcludeServersHistory( v_excludeServersHistory ); }else{ - TorkConfig::setExcludeNodes( QStringList() ); - TorkConfig::setExcludeServersHistory( QStringList() ); + TorkConfig::setExcludeNodes( TQStringList() ); + TorkConfig::setExcludeServersHistory( TQStringList() ); } //Exit Servers if ( m_torservers->ExitNodes->childCount() > 0 ) { - QStringList v_exitNodes; - QStringList v_includeServersHistory; - QListViewItemIterator it( m_torservers->ExitNodes ); + TQStringList v_exitNodes; + TQStringList v_includeServersHistory; + TQListViewItemIterator it( m_torservers->ExitNodes ); while ( it.current() ) { v_exitNodes.append("$"+getFPFromFPDigest(it.current()->text(2))); v_includeServersHistory.append(it.current()->text(1) + "-" + @@ -337,14 +337,14 @@ void TorkConfigDialog::updateCustomSettings() TorkConfig::setExitNodes( v_exitNodes ); TorkConfig::setIncludeServersHistory( v_includeServersHistory ); }else{ - TorkConfig::setExitNodes( QStringList() ); - TorkConfig::setIncludeServersHistory( QStringList() ); + TorkConfig::setExitNodes( TQStringList() ); + TorkConfig::setIncludeServersHistory( TQStringList() ); } //Family Servers if ( m_myserver->MyFamily->childCount() > 0 ) { - QStringList v_myFamily; - QListViewItemIterator it( m_myserver->MyFamily, QListViewItemIterator::Selected ); + TQStringList v_myFamily; + TQListViewItemIterator it( m_myserver->MyFamily, TQListViewItemIterator::Selected ); while ( it.current() ) { v_myFamily.append(it.current()->text(1) + "-" + it.current()->text(2) + "-" + it.current()->text(3)); @@ -352,13 +352,13 @@ void TorkConfigDialog::updateCustomSettings() } TorkConfig::setMyFamily( v_myFamily ); }else{ - TorkConfig::setMyFamily( QStringList() ); + TorkConfig::setMyFamily( TQStringList() ); } //Track Host Exits if ( m_usability->TrackHostExits->childCount() > 0 ) { - QStringList v_trackHostExits; - QListViewItemIterator it( m_usability->TrackHostExits ); + TQStringList v_trackHostExits; + TQListViewItemIterator it( m_usability->TrackHostExits ); while ( it.current() ) { v_trackHostExits.append(it.current()->text(0)); ++it; @@ -369,8 +369,8 @@ void TorkConfigDialog::updateCustomSettings() //Long Lived Ports if ( m_usability->LongLivedPorts->childCount() > 0 ) { - QStringList v_longLivedPorts; - QListViewItemIterator it( m_usability->LongLivedPorts, QListViewItemIterator::Selected ); + TQStringList v_longLivedPorts; + TQListViewItemIterator it( m_usability->LongLivedPorts, TQListViewItemIterator::Selected ); while ( it.current() ) { int i; for (i = 0; _port_name[i].port; ++i) { @@ -387,10 +387,10 @@ void TorkConfigDialog::updateCustomSettings() //Socks Bind Addresses if ( m_running->SOCKSBindAddressMany->childCount() > 0 ) { - QStringList v_sOCKSBindAddressMany; - QListViewItemIterator it( m_running->SOCKSBindAddressMany ); + TQStringList v_sOCKSBindAddressMany; + TQListViewItemIterator it( m_running->SOCKSBindAddressMany ); while ( it.current() ) { - QString s_sOCKSBindAddressMany = it.current()->text(0) + ":" + it.current()->text(1); + TQString s_sOCKSBindAddressMany = it.current()->text(0) + ":" + it.current()->text(1); v_sOCKSBindAddressMany.append(s_sOCKSBindAddressMany); ++it; } @@ -400,10 +400,10 @@ void TorkConfigDialog::updateCustomSettings() //Exit Policy if ( m_myserver->ExitPolicy->childCount() > 0 ) { - QStringList v_exitPolicy; - QListViewItemIterator it( m_myserver->ExitPolicy ); + TQStringList v_exitPolicy; + TQListViewItemIterator it( m_myserver->ExitPolicy ); while ( it.current() ) { - QString s_exitPolicy = it.current()->text(0) + " " + it.current()->text(1) + ":" + it.current()->text(2); + TQString s_exitPolicy = it.current()->text(0) + " " + it.current()->text(1) + ":" + it.current()->text(2); v_exitPolicy.append(s_exitPolicy); ++it; } @@ -413,10 +413,10 @@ void TorkConfigDialog::updateCustomSettings() //Socks Policy if ( m_running->SOCKSPolicy->childCount() > 0 ) { - QStringList v_sOCKSPolicy; - QListViewItemIterator it( m_running->SOCKSPolicy ); + TQStringList v_sOCKSPolicy; + TQListViewItemIterator it( m_running->SOCKSPolicy ); while ( it.current() ) { - QString s_sOCKSPolicy = it.current()->text(0) + " " + it.current()->text(1) + ":" + it.current()->text(2); + TQString s_sOCKSPolicy = it.current()->text(0) + " " + it.current()->text(1) + ":" + it.current()->text(2); v_sOCKSPolicy.append(s_sOCKSPolicy); ++it; } @@ -426,10 +426,10 @@ void TorkConfigDialog::updateCustomSettings() //Filter Rules if ( m_filtertable->FilterRules->childCount() > 0 ) { - QStringList v_filterRules; - QListViewItemIterator it( m_filtertable->FilterRules ); + TQStringList v_filterRules; + TQListViewItemIterator it( m_filtertable->FilterRules ); while ( it.current() ) { - QString s_filterRules = it.current()->text(0) + "%:%" + it.current()->text(1)+ "%:%" + it.current()->text(2); + TQString s_filterRules = it.current()->text(0) + "%:%" + it.current()->text(1)+ "%:%" + it.current()->text(2); v_filterRules.append(s_filterRules); ++it; } @@ -439,10 +439,10 @@ void TorkConfigDialog::updateCustomSettings() //Reachable Address if ( m_firewallsproxies->ReachableAddresses->childCount() > 0 ) { - QStringList v_reachableAddresses; - QListViewItemIterator it( m_firewallsproxies->ReachableAddresses ); + TQStringList v_reachableAddresses; + TQListViewItemIterator it( m_firewallsproxies->ReachableAddresses ); while ( it.current() ) { - QString s_reachableAddresses = "*:" + it.current()->text(0); + TQString s_reachableAddresses = "*:" + it.current()->text(0); v_reachableAddresses.append(s_reachableAddresses); ++it; } @@ -452,24 +452,24 @@ void TorkConfigDialog::updateCustomSettings() //Bridge Addresses if ( m_firewallsproxies->Bridge->childCount() > 0 ) { - QStringList v_bridges; - QListViewItemIterator it( m_firewallsproxies->Bridge ); + TQStringList v_bridges; + TQListViewItemIterator it( m_firewallsproxies->Bridge ); while ( it.current() ) { - QString s_bridges = it.current()->text(0) + ":" + it.current()->text(1) + TQString s_bridges = it.current()->text(0) + ":" + it.current()->text(1) + " " + it.current()->text(2); v_bridges.append(s_bridges); ++it; } TorkConfig::setBridge( v_bridges ); }else - TorkConfig::setBridge( QStringList() ); + TorkConfig::setBridge( TQStringList() ); //Hidden Services // if ( m_myhidden->servicesList->childCount() > 0 ) { -// QStringList v_hiddenServices; -// QListViewItemIterator it( m_myhidden->servicesList ); +// TQStringList v_hiddenServices; +// TQListViewItemIterator it( m_myhidden->servicesList ); // while ( it.current() ) { -// QString s_hiddenServices = it.current()->text(0) + "\n" + it.current()->text(1) +// TQString s_hiddenServices = it.current()->text(0) + "\n" + it.current()->text(1) // + "\n" + it.current()->text(2) + "\n" + it.current()->text(3) // + "\n" + it.current()->text(4)+ "\n" + it.current()->text(5); // v_hiddenServices.append(s_hiddenServices); @@ -481,10 +481,10 @@ void TorkConfigDialog::updateCustomSettings() //Bandwidth Slots if ( m_maxmin->timedBandwidthList->childCount() > 0 ) { - QStringList v_bandwidthSlots; - QListViewItemIterator it( m_maxmin->timedBandwidthList ); + TQStringList v_bandwidthSlots; + TQListViewItemIterator it( m_maxmin->timedBandwidthList ); while ( it.current() ) { - QString s_bandwidthSlots = it.current()->text(0) + "\n" + it.current()->text(1) + TQString s_bandwidthSlots = it.current()->text(0) + "\n" + it.current()->text(1) + "\n" + it.current()->text(2) + "\n" + it.current()->text(3) + "\n" + it.current()->text(4); v_bandwidthSlots.append(s_bandwidthSlots); |