diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /wifi/kcmwifi/wificonfig.cpp | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'wifi/kcmwifi/wificonfig.cpp')
-rw-r--r-- | wifi/kcmwifi/wificonfig.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
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 ); } |