diff options
Diffstat (limited to 'wifi/kcmwifi')
-rw-r--r-- | wifi/kcmwifi/configcrypto.ui.h | 8 | ||||
-rw-r--r-- | wifi/kcmwifi/ifconfigpage.cpp | 76 | ||||
-rw-r--r-- | wifi/kcmwifi/ifconfigpage.h | 2 | ||||
-rw-r--r-- | wifi/kcmwifi/kcmwifi.cpp | 42 | ||||
-rw-r--r-- | wifi/kcmwifi/kcmwifi.h | 6 | ||||
-rw-r--r-- | wifi/kcmwifi/mainconfig.cpp | 16 | ||||
-rw-r--r-- | wifi/kcmwifi/mainconfig.h | 2 | ||||
-rw-r--r-- | wifi/kcmwifi/vendorconfig.cpp | 34 | ||||
-rw-r--r-- | wifi/kcmwifi/wificonfig.cpp | 66 | ||||
-rw-r--r-- | wifi/kcmwifi/wificonfig.h | 52 |
10 files changed, 152 insertions, 152 deletions
diff --git a/wifi/kcmwifi/configcrypto.ui.h b/wifi/kcmwifi/configcrypto.ui.h index 6ada4aa4..261e3411 100644 --- a/wifi/kcmwifi/configcrypto.ui.h +++ b/wifi/kcmwifi/configcrypto.ui.h @@ -32,7 +32,7 @@ void ConfigCrypto::save( IfConfig &ifconfig ) } -void ConfigCrypto::slotUpdateKey1Status(const QString& key) +void ConfigCrypto::slotUpdateKey1Status(const TQString& key) { KeyStates status = ::Key::isValid( key ); switch (status) { @@ -63,7 +63,7 @@ void ConfigCrypto::slotUpdateKey1Status(const QString& key) } } -void ConfigCrypto::slotUpdateKey2Status(const QString& key) +void ConfigCrypto::slotUpdateKey2Status(const TQString& key) { KeyStates status = ::Key::isValid( key ); switch (status) { @@ -94,7 +94,7 @@ void ConfigCrypto::slotUpdateKey2Status(const QString& key) } } -void ConfigCrypto::slotUpdateKey3Status(const QString& key) +void ConfigCrypto::slotUpdateKey3Status(const TQString& key) { KeyStates status = ::Key::isValid( key ); switch (status) { @@ -125,7 +125,7 @@ void ConfigCrypto::slotUpdateKey3Status(const QString& key) } } -void ConfigCrypto::slotUpdateKey4Status(const QString& key) +void ConfigCrypto::slotUpdateKey4Status(const TQString& key) { KeyStates status = ::Key::isValid( key ); switch (status) { diff --git a/wifi/kcmwifi/ifconfigpage.cpp b/wifi/kcmwifi/ifconfigpage.cpp index 887c817d..8b96b63b 100644 --- a/wifi/kcmwifi/ifconfigpage.cpp +++ b/wifi/kcmwifi/ifconfigpage.cpp @@ -23,11 +23,11 @@ #include <klocale.h> #include <kurlrequester.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qradiobutton.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> #include "configcrypto.h" #include "configpower.h" @@ -37,41 +37,41 @@ #include <unistd.h> #include <sys/types.h> -IfConfigPage::IfConfigPage( int configNum, QWidget *parent, const char *name ) +IfConfigPage::IfConfigPage( int configNum, TQWidget *parent, const char *name ) : IfConfigPageBase( parent, name ), m_configNum( configNum ) { - connect( cb_pmEnabled, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) ); - connect( cb_useCrypto, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) ); - connect( le_networkName, SIGNAL( textChanged( const QString & ) ), - SIGNAL( changed() ) ); - connect( cmb_wifiMode, SIGNAL( activated( int ) ), SIGNAL( changed() ) ); - connect( cmb_speed, SIGNAL( activated( int ) ), SIGNAL( changed() ) ); - connect( cb_runScript, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) ); - connect( url_connectScript, SIGNAL( textChanged( const QString & ) ), - SIGNAL( changed() ) ); - connect( cb_Autodetect, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) ); - connect( le_interface, SIGNAL( textChanged( const QString & ) ), - SIGNAL( changed() ) ); - - connect( pb_setupPower, SIGNAL( clicked() ), SLOT( slotSetupPower() ) ); - connect( pb_setupCrypto, SIGNAL( clicked() ), SLOT( slotSetupCrypto() ) ); - - connect( cb_useCrypto, SIGNAL( toggled( bool ) ), - pb_setupCrypto, SLOT( setEnabled( bool ) ) ); - connect( cb_pmEnabled, SIGNAL( toggled( bool ) ), - pb_setupPower, SLOT( setEnabled( bool ) ) ); - connect( cb_runScript, SIGNAL( toggled( bool ) ), - lb_connectScript, SLOT( setEnabled( bool ) ) ); - connect( cb_runScript, SIGNAL( toggled( bool ) ), - lb_connectScript, SLOT( setEnabled( bool ) ) ); - connect( cb_runScript, SIGNAL( toggled( bool ) ), - lb_connectScript, SLOT( setEnabled( bool ) ) ); - connect( cb_Autodetect, SIGNAL( toggled( bool ) ), - le_interface, SLOT( setDisabled( bool ) ) ); - - connect( cb_Autodetect, SIGNAL( toggled( bool ) ), - this, SLOT ( slotResetInterface( bool ) ) ); + connect( cb_pmEnabled, TQT_SIGNAL( toggled( bool ) ), TQT_SIGNAL( changed() ) ); + connect( cb_useCrypto, TQT_SIGNAL( toggled( bool ) ), TQT_SIGNAL( changed() ) ); + connect( le_networkName, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SIGNAL( changed() ) ); + connect( cmb_wifiMode, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( changed() ) ); + connect( cmb_speed, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( changed() ) ); + connect( cb_runScript, TQT_SIGNAL( toggled( bool ) ), TQT_SIGNAL( changed() ) ); + connect( url_connectScript, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SIGNAL( changed() ) ); + connect( cb_Autodetect, TQT_SIGNAL( toggled( bool ) ), TQT_SIGNAL( changed() ) ); + connect( le_interface, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SIGNAL( changed() ) ); + + connect( pb_setupPower, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSetupPower() ) ); + connect( pb_setupCrypto, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSetupCrypto() ) ); + + connect( cb_useCrypto, TQT_SIGNAL( toggled( bool ) ), + pb_setupCrypto, TQT_SLOT( setEnabled( bool ) ) ); + connect( cb_pmEnabled, TQT_SIGNAL( toggled( bool ) ), + pb_setupPower, TQT_SLOT( setEnabled( bool ) ) ); + connect( cb_runScript, TQT_SIGNAL( toggled( bool ) ), + lb_connectScript, TQT_SLOT( setEnabled( bool ) ) ); + connect( cb_runScript, TQT_SIGNAL( toggled( bool ) ), + lb_connectScript, TQT_SLOT( setEnabled( bool ) ) ); + connect( cb_runScript, TQT_SIGNAL( toggled( bool ) ), + lb_connectScript, TQT_SLOT( setEnabled( bool ) ) ); + connect( cb_Autodetect, TQT_SIGNAL( toggled( bool ) ), + le_interface, TQT_SLOT( setDisabled( bool ) ) ); + + connect( cb_Autodetect, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT ( slotResetInterface( bool ) ) ); } void IfConfigPage::slotResetInterface( bool checked ) @@ -120,7 +120,7 @@ void IfConfigPage::save() IfConfig &ifconfig = config->m_ifConfig[ m_configNum ]; ifconfig.m_networkName = le_networkName->text(); - ifconfig.m_interface = cb_Autodetect->isChecked()? QString::null : + ifconfig.m_interface = cb_Autodetect->isChecked()? TQString::null : le_interface->text(); ifconfig.m_wifiMode = ( IfConfig::WifiMode ) cmb_wifiMode->currentItem(); ifconfig.m_speed = ( IfConfig::Speed ) cmb_speed->currentItem(); diff --git a/wifi/kcmwifi/ifconfigpage.h b/wifi/kcmwifi/ifconfigpage.h index d7db8a93..bb79f215 100644 --- a/wifi/kcmwifi/ifconfigpage.h +++ b/wifi/kcmwifi/ifconfigpage.h @@ -28,7 +28,7 @@ class IfConfigPage : public IfConfigPageBase Q_OBJECT public: - IfConfigPage( int configNum, QWidget *parent, const char *name ); + IfConfigPage( int configNum, TQWidget *parent, const char *name ); ~IfConfigPage() {} void load(); diff --git a/wifi/kcmwifi/kcmwifi.cpp b/wifi/kcmwifi/kcmwifi.cpp index 693edc92..743f3d2e 100644 --- a/wifi/kcmwifi/kcmwifi.cpp +++ b/wifi/kcmwifi/kcmwifi.cpp @@ -18,10 +18,10 @@ Boston, MA 02110-1301, USA. */ -#include <qlayout.h> -#include <qtabwidget.h> -#include <qcombobox.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqtabwidget.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> #include <kaboutdata.h> #include <kdebug.h> @@ -39,13 +39,13 @@ #include "wificonfig.h" #include "vendorconfig.h" -typedef KGenericFactory < KCMWifi, QWidget > KWiFiFactory; +typedef KGenericFactory < KCMWifi, TQWidget > KWiFiFactory; K_EXPORT_COMPONENT_FACTORY (kcm_wifi, KWiFiFactory("kcmwifi") ) -KCMWifi::KCMWifi(QWidget * parent, const char *name, const QStringList &) +KCMWifi::KCMWifi(TQWidget * parent, const char *name, const TQStringList &) : KCModule (parent, name) { - tabs = new QTabWidget (this, "tabs"); + tabs = new TQTabWidget (this, "tabs"); m_mainConfig = new MainConfig(this, "m_mainConfig"); @@ -55,18 +55,18 @@ KCMWifi::KCMWifi(QWidget * parent, const char *name, const QStringList &) { IfConfigPage *ifConfigPage = new IfConfigPage( i, tabs, "m_configPage" ); tabs->addTab(ifConfigPage, i18n ("Config &%1").arg( i+1 )); - connect(ifConfigPage, SIGNAL(changed()), SLOT( slotChanged() ) ); + connect(ifConfigPage, TQT_SIGNAL(changed()), TQT_SLOT( slotChanged() ) ); m_ifConfigPage[ i ] = ifConfigPage; } - QVBoxLayout *top = new QVBoxLayout (this, 0, KDialog::spacingHint()); + TQVBoxLayout *top = new TQVBoxLayout (this, 0, KDialog::spacingHint()); top->addWidget( tabs ); top->addWidget( m_mainConfig ); top->addStretch(); - connect(m_mainConfig, SIGNAL(changed()), SLOT( slotChanged() ) ); - connect(m_mainConfig, SIGNAL(activateClicked()), SLOT(slotActivate())); + connect(m_mainConfig, TQT_SIGNAL(changed()), TQT_SLOT( slotChanged() ) ); + connect(m_mainConfig, TQT_SIGNAL(activateClicked()), TQT_SLOT(slotActivate())); if ( geteuid() != 0 ) { @@ -147,7 +147,7 @@ IfConfigPage* KCMWifi::addConfigTab( int count, bool vendor ) { IfConfigPage *ifConfigPage = new IfConfigPage( vendorBase + m_activeVendorCount, tabs, "m_configPage" ); tabs->addTab(ifConfigPage, i18n ("Vendor %1").arg( m_activeVendorCount+1 ) ); - connect(ifConfigPage, SIGNAL(changed()), SLOT( slotChanged() ) ); + connect(ifConfigPage, TQT_SIGNAL(changed()), TQT_SLOT( slotChanged() ) ); m_ifConfigPage[ vendorBase+m_activeVendorCount ] = ifConfigPage; m_mainConfig->registerConfig( vendorBase+m_activeVendorCount ); m_activeVendorCount++; @@ -170,7 +170,7 @@ IfConfigPage* KCMWifi::addConfigTab( int count, bool vendor ) { IfConfigPage *ifConfigPage = new IfConfigPage( i, tabs, "m_configPage" ); tabs->insertTab(ifConfigPage, i18n ("Config &%1").arg( i+1 ), i ); - connect(ifConfigPage, SIGNAL(changed()), SLOT( slotChanged() ) ); + connect(ifConfigPage, TQT_SIGNAL(changed()), TQT_SLOT( slotChanged() ) ); m_ifConfigPage[ i ] = ifConfigPage; m_mainConfig->registerConfig( i+1 ); retval = ifConfigPage; @@ -203,7 +203,7 @@ void KCMWifi::activate() { KProcess proc; - QStringList failedParts; + TQStringList failedParts; WifiConfig *config = WifiConfig::instance(); int index; @@ -219,7 +219,7 @@ void KCMWifi::activate() IfConfig ifconfig = config->m_ifConfig[ index ]; - QString tempInterface; + TQString tempInterface; if ( ifconfig.m_interface.isEmpty() ) { tempInterface = config->autoDetectInterface(); @@ -295,8 +295,8 @@ void KCMWifi::activate() if ( ifconfig.m_keys[ i ].isValid( ifconfig.m_keys[ i ].key() ) > INVALID ) { proc << "key" - << QString( "[%1]").arg( i+1 ) - << QString( "%1").arg( ifconfig.m_keys[ i ].rawKey() ); + << TQString( "[%1]").arg( i+1 ) + << TQString( "%1").arg( ifconfig.m_keys[ i ].rawKey() ); } } @@ -308,7 +308,7 @@ void KCMWifi::activate() proc << "key" << ifconfig.cryptomodeAsString(); proc << "key" - << QString( "[%1]" ).arg( ifconfig.activeKeyId() ); + << TQString( "[%1]" ).arg( ifconfig.activeKeyId() ); proc << "key" << "on"; } @@ -334,10 +334,10 @@ void KCMWifi::activate() { proc << "power" << "period" - << QString( "%1" ).arg( ifconfig.m_wakeupPeriod ); + << TQString( "%1" ).arg( ifconfig.m_wakeupPeriod ); proc << "power" << "timeout" - << QString( "%1" ).arg( ifconfig.m_sleepTimeout ); + << TQString( "%1" ).arg( ifconfig.m_sleepTimeout ); proc << ifconfig.powermodeAsString(); } @@ -361,7 +361,7 @@ void KCMWifi::activate() if ( ifconfig.m_runScript ) { proc.clearArguments(); - proc << QStringList::split( " ", ifconfig.m_connectScript ); + proc << TQStringList::split( " ", ifconfig.m_connectScript ); proc.start(KProcess::DontCare); } diff --git a/wifi/kcmwifi/kcmwifi.h b/wifi/kcmwifi/kcmwifi.h index 87822ac0..5ba2af33 100644 --- a/wifi/kcmwifi/kcmwifi.h +++ b/wifi/kcmwifi/kcmwifi.h @@ -23,7 +23,7 @@ #include <kcmodule.h> -#include <qstring.h> +#include <tqstring.h> class IfConfigPage; class MainConfig; @@ -34,7 +34,7 @@ class KCMWifi : public KCModule { Q_OBJECT public: - KCMWifi (QWidget * parent, const char *name, const QStringList &); + KCMWifi (TQWidget * parent, const char *name, const TQStringList &); ~KCMWifi (); void load(); @@ -55,7 +55,7 @@ protected slots: private: MainConfig *m_mainConfig; IfConfigPage *m_ifConfigPage[ 15 ]; // that makes 5 vendor configs - QTabWidget* tabs; + TQTabWidget* tabs; int m_activeVendorCount; }; diff --git a/wifi/kcmwifi/mainconfig.cpp b/wifi/kcmwifi/mainconfig.cpp index 9cdcfcec..c740df69 100644 --- a/wifi/kcmwifi/mainconfig.cpp +++ b/wifi/kcmwifi/mainconfig.cpp @@ -30,10 +30,10 @@ #include <kpushbutton.h> #include <knuminput.h> -#include <qcheckbox.h> -#include <qfile.h> +#include <tqcheckbox.h> +#include <tqfile.h> -MainConfig::MainConfig( QWidget *parent, const char *name ) +MainConfig::MainConfig( TQWidget *parent, const char *name ) : MainConfigBase( parent, name ) { WifiConfig *config = WifiConfig::instance(); @@ -43,12 +43,12 @@ MainConfig::MainConfig( QWidget *parent, const char *name ) } - connect( cb_usePreset, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) ); - connect( cmb_presetConfig, SIGNAL( activated( int ) ), SIGNAL( changed() ) ); - connect( sb_numConfigs, SIGNAL( valueChanged( int ) ), SIGNAL( changed() ) ); + connect( cb_usePreset, TQT_SIGNAL( toggled( bool ) ), TQT_SIGNAL( changed() ) ); + connect( cmb_presetConfig, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( changed() ) ); + connect( sb_numConfigs, TQT_SIGNAL( valueChanged( int ) ), TQT_SIGNAL( changed() ) ); - connect( pb_activate, SIGNAL( clicked() ), SIGNAL( activateClicked() ) ); - connect( sb_numConfigs, SIGNAL( valueChanged( int ) ), SLOT( slotChangeNumConfigs( int ) ) ); + connect( pb_activate, TQT_SIGNAL( clicked() ), TQT_SIGNAL( activateClicked() ) ); + connect( sb_numConfigs, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotChangeNumConfigs( int ) ) ); } diff --git a/wifi/kcmwifi/mainconfig.h b/wifi/kcmwifi/mainconfig.h index 55458fa4..edc09560 100644 --- a/wifi/kcmwifi/mainconfig.h +++ b/wifi/kcmwifi/mainconfig.h @@ -30,7 +30,7 @@ class MainConfig : public MainConfigBase Q_OBJECT public: - MainConfig( QWidget *parent, const char *name=0 ); + MainConfig( TQWidget *parent, const char *name=0 ); ~MainConfig() {} void load(); diff --git a/wifi/kcmwifi/vendorconfig.cpp b/wifi/kcmwifi/vendorconfig.cpp index 36460c4a..e415c276 100644 --- a/wifi/kcmwifi/vendorconfig.cpp +++ b/wifi/kcmwifi/vendorconfig.cpp @@ -17,12 +17,12 @@ Boston, MA 02110-1301, USA. */ -#include <qdir.h> -#include <qstringlist.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qcombobox.h> -#include <qcheckbox.h> +#include <tqdir.h> +#include <tqstringlist.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> #include <kdebug.h> #include <klineedit.h> @@ -54,19 +54,19 @@ VendorConfig::initSuSE_92plus ( ) /* configurations are located in /etc/sysconfig/network/ifcfg-wlan* there can be more than one if there are multiple wireless interfaces */ - QDir filelist ( "/etc/sysconfig/network", "ifcfg-wlan*" ); - QStringList files = filelist.entryList ( ); + TQDir filelist ( "/etc/sysconfig/network", "ifcfg-wlan*" ); + TQStringList files = filelist.entryList ( ); if ( files.count() == 0 ) { return; } - for ( QStringList::Iterator it = files.begin ( ); it != files.end ( ); ++it ) + for ( TQStringList::Iterator it = files.begin ( ); it != files.end ( ); ++it ) { if ( ( ( *it ).endsWith ( "~" ) ) == false ) { // ignore backup files - QFile configfile ( QString ( "/etc/sysconfig/network/%1" ).arg ( *it ) ); + TQFile configfile ( TQString ( "/etc/sysconfig/network/%1" ).arg ( *it ) ); configfile.open ( IO_ReadOnly ); kdDebug ( ) << "Opened SuSE configuration file " << configfile.name ( ) << "\n"; @@ -82,12 +82,12 @@ VendorConfig::initSuSE_92plus ( ) WifiConfig *config = WifiConfig::instance ( ); IfConfig & ifconfig = config->m_ifConfig[KCMWifi::vendorBase + m_totalConfigs]; - QString buffer; + TQString buffer; while ( configfile.readLine ( buffer, 255 ) != -1 ) { // lines look like WIRELESS_ESSID='bla', so split it into WIRELESS_ESSID and bla - QString var = buffer.section ( '=', 0, 0 ); - QString value = buffer.section ( '=', 1, 1 ); + TQString var = buffer.section ( '=', 0, 0 ); + TQString value = buffer.section ( '=', 1, 1 ); value = value.mid ( 1, value.length ( ) - 3 ); kdDebug ( ) << "Variable " << var << " contains " << value << ".\n"; // evaluate the meaningful lines @@ -157,7 +157,7 @@ VendorConfig::initSuSE_92plus ( ) void VendorConfig::initDebian ( ) { - QFile configfile ( QString ( "/etc/network/interfaces" ) ); + TQFile configfile ( TQString ( "/etc/network/interfaces" ) ); if ( !configfile.open ( IO_ReadOnly ) ) { return; @@ -176,12 +176,12 @@ is incremented _after_ successful setup of each given config. */ WifiConfig *config = WifiConfig::instance ( ); IfConfig & ifconfig = config->m_ifConfig[KCMWifi::vendorBase + m_totalConfigs]; - QString buffer; + TQString buffer; while ( configfile.readLine ( buffer, 255 ) != -1 ) { // lines look like wireless-defaultkey bla, so split it into wireless-defaultkey and bla - QString var = buffer.section ( ' ', 0, 0 ); - QString value = buffer.section ( ' ', 1, 1 ); + TQString var = buffer.section ( ' ', 0, 0 ); + TQString value = buffer.section ( ' ', 1, 1 ); kdDebug ( ) << "Variable " << var << " contains " << value << ".\n"; // evaluate the meaningful lines if ( var.startsWith ( "wireless", false ) ) diff --git a/wifi/kcmwifi/wificonfig.cpp b/wifi/kcmwifi/wificonfig.cpp index 5afd041f..53f1c7e0 100644 --- a/wifi/kcmwifi/wificonfig.cpp +++ b/wifi/kcmwifi/wificonfig.cpp @@ -17,7 +17,7 @@ Boston, MA 02110-1301, USA. */ -#include <qfile.h> +#include <tqfile.h> #include <ksimpleconfig.h> #include <kglobal.h> @@ -28,23 +28,23 @@ #include "wificonfig.h" -static QStringList speedList; -static QStringList wifiModeList; -static QStringList cryptoModeList; -static QStringList powerModeList; +static TQStringList speedList; +static TQStringList wifiModeList; +static TQStringList cryptoModeList; +static TQStringList powerModeList; Key::Key() { } -Key::Key( const QString &key ) +Key::Key( const TQString &key ) { setKey( key ); } -QString Key::rawKey() const +TQString Key::rawKey() const { - QString s = m_key; + TQString s = m_key; if ( isValid( m_key ) >= STRING_64 ) s = "s:" + s; @@ -52,12 +52,12 @@ QString Key::rawKey() const return s; } -void Key::setKey( const QString &key ) +void Key::setKey( const TQString &key ) { m_key = key; } -KeyStates Key::isValid ( QString keyCandidate ) +KeyStates Key::isValid ( TQString keyCandidate ) { if (keyCandidate.isEmpty()) { kdDebug() << "Ignoring key: empty.\n"; @@ -117,9 +117,9 @@ IfConfig::IfConfig() void IfConfig::load( KConfig *config, int i ) { - QString entry; + TQString entry; - QString group = QString( "Configuration %1" ).arg( i+1 ); + TQString group = TQString( "Configuration %1" ).arg( i+1 ); config->setGroup( group ); m_networkName = config->readEntry( "NetworkName" ); @@ -150,7 +150,7 @@ void IfConfig::load( KConfig *config, int i ) void IfConfig::save( KConfig *config, int i ) { - QString group = QString( "Configuration %1" ).arg( i+1 ); + TQString group = TQString( "Configuration %1" ).arg( i+1 ); config->setGroup( group ); config->writeEntry( "NetworkName", m_networkName ); @@ -227,11 +227,11 @@ void WifiConfig::save() m_config->sync(); } -QString WifiConfig::autoDetectInterface() +TQString WifiConfig::autoDetectInterface() { m_detectedInterface.truncate( 0 ); - QFile procFile ( "/proc/net/dev" ); + TQFile procFile ( "/proc/net/dev" ); if ( !procFile.open( IO_ReadOnly ) ) { @@ -240,8 +240,8 @@ QString WifiConfig::autoDetectInterface() return m_detectedInterface; } - QStringList list; - QString line; + TQStringList list; + TQString line; while ( !procFile.atEnd() ) { @@ -262,14 +262,14 @@ QString WifiConfig::autoDetectInterface() return m_detectedInterface; } - for ( QStringList::Iterator it = list.begin (); it != list.end (); ++it ) + for ( TQStringList::Iterator it = list.begin (); it != list.end (); ++it ) { if ( ((*it).contains("wifi"))==0 ) { // if the name is wifiX, ignore KProcIO test; test << "iwconfig"; test << *it; - connect( &test, SIGNAL( readReady( KProcIO * ) ), - this, SLOT( slotTestInterface( KProcIO * ) ) ); + connect( &test, TQT_SIGNAL( readReady( KProcIO * ) ), + this, TQT_SLOT( slotTestInterface( KProcIO * ) ) ); test.start ( KProcess::Block ); } } @@ -286,7 +286,7 @@ QString WifiConfig::autoDetectInterface() void WifiConfig::slotTestInterface( KProcIO *proc ) { - QString output; + TQString output; proc->readln( output ); if ( output.find ( "no wireless extensions" ) == -1 ) { @@ -295,22 +295,22 @@ void WifiConfig::slotTestInterface( KProcIO *proc ) } } -QString IfConfig::speedAsString() +TQString IfConfig::speedAsString() { return speedList[ m_speed ]; } -QString IfConfig::wifimodeAsString() +TQString IfConfig::wifimodeAsString() { return wifiModeList[ m_wifiMode ]; } -QString IfConfig::cryptomodeAsString() +TQString IfConfig::cryptomodeAsString() { return cryptoModeList[ m_cryptoMode ]; } -QString IfConfig::powermodeAsString() +TQString IfConfig::powermodeAsString() { return powerModeList[ m_pmMode ]; } @@ -325,42 +325,42 @@ Key IfConfig::activeKey() return m_keys[ m_activeKey-1 ]; } -IfConfig::Speed IfConfig::convertToSpeedFromString( const QString &s ) +IfConfig::Speed IfConfig::convertToSpeedFromString( const TQString &s ) { return ( IfConfig::Speed )speedList.findIndex( s ); } -void IfConfig::speedFromString( const QString &s ) +void IfConfig::speedFromString( const TQString &s ) { m_speed = convertToSpeedFromString( s ); } -IfConfig::WifiMode IfConfig::convertToWifiModeFromString( const QString &s ) +IfConfig::WifiMode IfConfig::convertToWifiModeFromString( const TQString &s ) { return ( IfConfig::WifiMode )wifiModeList.findIndex( s ); } -void IfConfig::wifimodeFromString( const QString &s ) +void IfConfig::wifimodeFromString( const TQString &s ) { m_wifiMode = convertToWifiModeFromString( s ); } -IfConfig::CryptoMode IfConfig::convertToCryptoModeFromString( const QString &s ) +IfConfig::CryptoMode IfConfig::convertToCryptoModeFromString( const TQString &s ) { return ( IfConfig::CryptoMode )cryptoModeList.findIndex( s ); } -void IfConfig::cryptomodeFromString( const QString &s ) +void IfConfig::cryptomodeFromString( const TQString &s ) { m_cryptoMode = convertToCryptoModeFromString( s ); } -IfConfig::PowerMode IfConfig::convertToPowerModeFromString( const QString &s ) +IfConfig::PowerMode IfConfig::convertToPowerModeFromString( const TQString &s ) { return ( IfConfig::PowerMode )powerModeList.findIndex( s ); } -void IfConfig::powermodeFromString( const QString &s ) +void IfConfig::powermodeFromString( const TQString &s ) { m_pmMode = convertToPowerModeFromString( s ); } diff --git a/wifi/kcmwifi/wificonfig.h b/wifi/kcmwifi/wificonfig.h index b9186298..b78e32f6 100644 --- a/wifi/kcmwifi/wificonfig.h +++ b/wifi/kcmwifi/wificonfig.h @@ -20,8 +20,8 @@ #ifndef WIFICONFIG_H #define WIFICONFIG_H -#include <qstring.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqvaluelist.h> #include "kcmwifi.h" @@ -33,20 +33,20 @@ enum KeyStates { EMPTY=0, INVALID=1, HEX_64=2, HEX_128=3, HEX_256=4, STRING_64=5 class Key { public: - Key( const QString &key ); + Key( const TQString &key ); Key(); - QString key() const { return m_key; } - static KeyStates isValid( QString keyCandidate ); - QString rawKey() const; + TQString key() const { return m_key; } + static KeyStates isValid( TQString keyCandidate ); + TQString rawKey() const; - void setKey( const QString &key ); + void setKey( const TQString &key ); protected: - QString m_key; + TQString m_key; }; -typedef QValueList<Key> KeyList; +typedef TQValueList<Key> KeyList; class IfConfig { @@ -61,29 +61,29 @@ class IfConfig void load( KConfig *config, int i ); void save( KConfig *config, int i ); - QString speedAsString(); - QString wifimodeAsString(); - QString cryptomodeAsString(); - QString powermodeAsString(); + TQString speedAsString(); + TQString wifimodeAsString(); + TQString cryptomodeAsString(); + TQString powermodeAsString(); int activeKeyId(); Key activeKey(); - static Speed convertToSpeedFromString( const QString &s ); - static WifiMode convertToWifiModeFromString( const QString &s ); - static PowerMode convertToPowerModeFromString( const QString &s ); - static CryptoMode convertToCryptoModeFromString( const QString &s ); + static Speed convertToSpeedFromString( const TQString &s ); + static WifiMode convertToWifiModeFromString( const TQString &s ); + static PowerMode convertToPowerModeFromString( const TQString &s ); + static CryptoMode convertToCryptoModeFromString( const TQString &s ); - void speedFromString( const QString &s ); - void wifimodeFromString( const QString &s ); - void powermodeFromString( const QString &s ); - void cryptomodeFromString( const QString &s ); + void speedFromString( const TQString &s ); + void wifimodeFromString( const TQString &s ); + void powermodeFromString( const TQString &s ); + void cryptomodeFromString( const TQString &s ); - QString m_networkName; - QString m_interface; + TQString m_networkName; + TQString m_interface; WifiMode m_wifiMode; Speed m_speed; bool m_runScript; - QString m_connectScript; + TQString m_connectScript; bool m_useCrypto; CryptoMode m_cryptoMode; @@ -101,7 +101,7 @@ class WifiConfig : QObject Q_OBJECT public: static WifiConfig *instance(); - QString autoDetectInterface(); + TQString autoDetectInterface(); ~WifiConfig(); void load(); @@ -120,7 +120,7 @@ class WifiConfig : QObject KSimpleConfig *m_config; static WifiConfig *m_instance; - QString m_detectedInterface; + TQString m_detectedInterface; }; #endif // WIFICONFIG_H |