From 2f791ecf181cebc107ea2f68f5f7b29456844f39 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 2 Jul 2011 07:29:25 +0000 Subject: [PATCH] TQt4 port wlassistant This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/wlassistant@1239055 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- bksys/kde.py | 49 ++--- config.bks | 2 +- src/SConscript | 4 +- src/main.cpp | 2 +- src/netlistviewitem.cpp | 42 ++-- src/netlistviewitem.h | 58 +++--- src/netparams.h | 114 +++++----- src/ui_NetParamsEdit.ui | 208 +++++++++---------- src/ui_NetParamsWizard.ui | 172 ++++++++-------- src/ui_main.ui | 102 ++++----- src/ui_netparamsedit.cpp | 28 +-- src/ui_netparamsedit.h | 3 +- src/ui_netparamswizard.cpp | 22 +- src/ui_netparamswizard.h | 5 +- src/waconfig.cpp | 2 +- src/watools.cpp | 2 +- src/watools.h | 4 +- src/wlassistant.cpp | 412 ++++++++++++++++++------------------- src/wlassistant.h | 59 +++--- 19 files changed, 648 insertions(+), 642 deletions(-) diff --git a/bksys/kde.py b/bksys/kde.py index 1055a7e..e38f4e3 100644 --- a/bksys/kde.py +++ b/bksys/kde.py @@ -32,7 +32,7 @@ def KDEuse(lenv, flags): if 'thread' in _flags: ## Uncomment the following if you need threading support lenv.KDEaddflags_cxx( ['-DQT_THREAD_SUPPORT', '-D_REENTRANT'] ) - if 'fastmoc' in _flags: + if 'fasmoc' in _flags: lenv['BKSYS_FASTMOC']=1 if 'dump' in _flags: lenv['DUMPCONFIG']=1 @@ -109,40 +109,40 @@ def detect_kde(env): p('GREEN',kde_version) ## Detect the qt library - print "Checking for the qt library : ", + print "Checking for the tqt library : ", if not qtdir: qtdir = os.getenv("QTDIR") if qtdir: - p('GREEN',"qt is in "+qtdir) + p('GREEN',"tqt is in "+qtdir) else: try: tmplibdir = os.popen(kde_config+' --expandvars --install lib').read().strip() libkdeuiSO = env.join(tmplibdir, getSOfromLA(env.join(tmplibdir,'/libkdeui.la')) ) - m = re.search('(.*)/lib/libqt.*', os.popen('ldd ' + libkdeuiSO + ' | grep libqt').read().strip().split()[2]) + m = re.search('(.*)/lib/libtqt.*', os.popen('ldd ' + libkdeuiSO + ' | grep libtqt').read().strip().split()[2]) except: m=None if m: qtdir = m.group(1) - p('YELLOW',"qt was found as "+m.group(1)) + p('YELLOW',"tqt was found as "+m.group(1)) else: - p('RED','qt was not found') - p('RED','Please set QTDIR first (/usr/lib/qt3?) or try scons -h for more options') + p('RED','tqt was not found') + p('RED','Please set QTDIR first (/usr/lib/tqt?) or try scons -h for more options') env.Exit(1) env['QTDIR'] = qtdir.strip() ## Find the necessary programs uic and moc print "Checking for uic : ", - uic = qtdir + "/bin/uic" + uic = qtdir + "/bin/uic-tqt" if os.path.isfile(uic): - p('GREEN',"uic was found as "+uic) + p('GREEN',"uic-tqt was found as "+uic) else: - uic = os.popen("which uic 2>/dev/null").read().strip() + uic = os.popen("which uic-tqt 2>/dev/null").read().strip() if len(uic): - p('YELLOW',"uic was found as "+uic) + p('YELLOW',"uic-tqt was found as "+uic) else: - uic = os.popen("which uic 2>/dev/null").read().strip() + uic = os.popen("which uic-tqt 2>/dev/null").read().strip() if len(uic): - p('YELLOW',"uic was found as "+uic) + p('YELLOW',"uic-tqt was found as "+uic) else: - p('RED',"uic was not found - set QTDIR put it in your PATH ?") + p('RED',"uic-tqt was not found - set QTDIR put it in your PATH ?") env.Exit(1) env['QT_UIC'] = uic @@ -162,22 +162,25 @@ def detect_kde(env): env.Exit(1) env['QT_MOC'] = moc - ## check for the qt and kde includes - print "Checking for the qt includes : ", - if qtincludes and os.path.isfile(qtincludes + "/qlayout.h"): + ## check for the tqt and kde includes + print "Checking for the tqt includes : ", + if qtincludes and os.path.isfile(qtincludes + "/tqt.h"): # The user told where to look for and it looks valid p('GREEN',"ok "+qtincludes) else: - if os.path.isfile(qtdir + "/include/qlayout.h"): + if os.path.isfile(qtdir + "/include/tqt.h"): # Automatic detection p('GREEN',"ok "+qtdir+"/include/") qtincludes = qtdir + "/include/" - elif os.path.isfile("/usr/include/qt3/qlayout.h"): + elif os.path.isfile("/usr/include/tqt.h"): + p('YELLOW','the qt headers were found in /usr/include/') + qtincludes = "/usr/include" + elif os.path.isfile("/usr/include/tqt/tqt.h"): # Debian probably - p('YELLOW','the qt headers were found in /usr/include/qt3/') - qtincludes = "/usr/include/qt3" + p('YELLOW','the qt headers were found in /usr/include/tqt/') + qtincludes = "/usr/include/tqt" else: - p('RED',"the qt headers were not found") + p('RED',"the tqt headers were not found") env.Exit(1) print "Checking for the kde includes : ", @@ -336,7 +339,7 @@ def generate(env): opts.Save(cachefile, env) ## set default variables, one can override them in sconscript files - env.Append(CXXFLAGS = ['-I'+env['KDEINCLUDEPATH'], '-I'+env['QTINCLUDEPATH'] ], + env.Append(CXXFLAGS = ['-I'+env['KDEINCLUDEPATH'], '-I'+env['QTINCLUDEPATH'], '-I/usr/include/qt4', '-includetqt.h' ], LIBPATH = [env['KDELIBPATH'], env['QTLIBPATH'] ]) env['QT_AUTOSCAN'] = 1 diff --git a/config.bks b/config.bks index 8669f89..6c02961 100644 --- a/config.bks +++ b/config.bks @@ -2,7 +2,7 @@ + libs="kdeui tqt iw"> diff --git a/src/SConscript b/src/SConscript index 85a3fee..62e511b 100644 --- a/src/SConscript +++ b/src/SConscript @@ -20,7 +20,7 @@ wlassistant.cpp """ obj.cxxflags='-DQT_THREAD_SUPPORT' -obj.libs='qt-mt kdecore kdeui iw' +obj.libs='tqt kdecore kdeui iw' obj.execute() -#env.KDEinstall( 'KDEMENU', 'Utilities', 'wlassistant.desktop' ) \ No newline at end of file +#env.KDEinstall( 'KDEMENU', 'Utilities', 'wlassistant.desktop' ) diff --git a/src/main.cpp b/src/main.cpp index a06f95e..ec72c06 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -47,7 +47,7 @@ int main(int argc, char **argv) KApplication app; WirelessAssistant *mainWin = 0; mainWin = new WirelessAssistant(); - mainWin->setCaption( QString("%1 %2").arg(description).arg(version) ); + mainWin->setCaption( TQString("%1 %2").tqarg(description).tqarg(version) ); app.setMainWidget( mainWin ); mainWin->show(); diff --git a/src/netlistviewitem.cpp b/src/netlistviewitem.cpp index a607eee..66f574c 100644 --- a/src/netlistviewitem.cpp +++ b/src/netlistviewitem.cpp @@ -26,22 +26,22 @@ #include #include -void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) +void NetListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) { /// HACK fixes: higher item (connected) is drawn using regular height upon widget change (widgetStack); if ( height()!=mHeight ) setHeight( mHeight ); /// PREPARE COLORS /// - QColor bgColor, fgColor; + TQColor bgColor, fgColor; /// colors of selected item if ( listView()->isSelected(this) ) { - bgColor = cg.color( QColorGroup::Highlight ); /// settings for selected item; - fgColor = cg.color( QColorGroup::HighlightedText ); + bgColor = cg.color( TQColorGroup::Highlight ); /// settings for selected item; + fgColor = cg.color( TQColorGroup::HighlightedText ); /// colors of deselected item` } else { if (mConnected) - bgColor = cg.color( QColorGroup::Background); + bgColor = cg.color( TQColorGroup::Background); else { #if KDE_IS_VERSION(3,4,0) bgColor = ((KListViewItem*)this)->backgroundColor(column); @@ -51,7 +51,7 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, #endif } - fgColor = cg.color( QColorGroup::Text); + fgColor = cg.color( TQColorGroup::Text); if (mQuality<8) fgColor = fgColor.light(); } @@ -66,10 +66,10 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, switch (column) { - /// DRAW QUALITY /// + /// DRAW TQUALITY /// case mQualityColumn: { - QPixmap qualityIcon = SmallIcon("knewstuff"); - QPixmap qualityIconGray = KIconEffect().apply( qualityIcon, KIconEffect::ToGray, 1, Qt::black, true ); + TQPixmap qualityIcon = SmallIcon("knewstuff"); + TQPixmap qualityIconGray = KIconEffect().apply( qualityIcon, KIconEffect::ToGray, 1, TQt::black, true ); int barWidth = int(mQuality/8)*8; if (mQuality>0) barWidth+=8; //add 8 (half a star) b/c int rounds down. @@ -86,7 +86,7 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, if (mEnc) { int icoTop = int( ( this->height()-16 )/2 ); int icoLeft = int( ( width-listView()->itemMargin()-16 )/2 ); - QPixmap encIcon = SmallIcon("encrypted"); + TQPixmap encIcon = SmallIcon("encrypted"); p->drawPixmap(icoLeft,icoTop, encIcon ); } break; @@ -96,13 +96,13 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, case mEssidColumn: { /// draw icon and its shadow. if (mConnected) { - QPixmap connectedIcon; + TQPixmap connectedIcon; connectedIcon = SmallIcon("forward"); int icoTop = int( ( this->height()-16 )/2 ); p->drawPixmap(listView()->itemMargin(),icoTop, connectedIcon ); } - QFont mFont = listView()->font(); + TQFont mFont = listView()->font(); if (mConnected) mFont.setBold( true ); if (mHidden) @@ -127,7 +127,7 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, /// DRAW CHANNEL /// case mChanColumn: { - QFont mFont = listView()->font(); + TQFont mFont = listView()->font(); mFont.setItalic(true); if (mConnected) mFont.setBold( true ); @@ -145,7 +145,7 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, } /// DRAW ACCESS POINT /// case mAPColumn: { - QFont mFont = listView()->font(); + TQFont mFont = listView()->font(); if (mHidden) mFont.setItalic( true ); if (mConnected) @@ -165,20 +165,20 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, } default: - KListViewItem::paintCell(p, cg, column, width, alignment); + KListViewItem::paintCell(p, cg, column, width, tqalignment); } //switch } -int NetListViewItem::width(const QFontMetrics &fm, const QListView *lv, int column) const +int NetListViewItem::width(const TQFontMetrics &fm, const TQListView *lv, int column) const { int w; - QFont mFont = listView()->font(); + TQFont mFont = listView()->font(); if (mConnected) mFont.setBold(true); if (mHidden) mFont.setItalic(true); - QFontMetrics mFm( mFont ); + TQFontMetrics mFm( mFont ); if (column == mQualityColumn) w = 6*16 + (lv->itemMargin()*2); @@ -203,7 +203,7 @@ int NetListViewItem::width(const QFontMetrics &fm, const QListView *lv, int colu return w; } -QString NetListViewItem::key( int column, bool ascending ) const +TQString NetListViewItem::key( int column, bool ascending ) const { if (mConnected) { // make sure that connected item is always 1st. if (ascending) @@ -211,9 +211,9 @@ QString NetListViewItem::key( int column, bool ascending ) const else return "ZZZ"; } - QString t = QString::null; + TQString t = TQString(); if (column == mQualityColumn) { - t = QString::number( mQuality ); + t = TQString::number( mQuality ); if (mQuality < 10) t.prepend("0"); } else if (column == mEncColumn) { diff --git a/src/netlistviewitem.h b/src/netlistviewitem.h index 6410c86..084c274 100644 --- a/src/netlistviewitem.h +++ b/src/netlistviewitem.h @@ -23,7 +23,7 @@ #include -#include +#include #include #include @@ -31,11 +31,11 @@ class NetListViewItem : public KListViewItem { public: - //NetListViewItem(KListView *parent) : KListViewItem(parent) {} - //NetListViewItem(KListView *parent, KListViewItem *after) : KListViewItem(parent, after) {} - //NetListViewItem(KListView *parent, KListViewItem *after, QString essid, QString mode) : KListViewItem(parent, after, essid, mode) {} - NetListViewItem(KListView *parent, QString essid, QString chan, int quality, bool enc, QString ap, bool hidden, bool connected = 0 ) - : KListViewItem(parent, QString::null, QString::null, QString::null, QString::null, QString::null) + //NetListViewItem(KListView *tqparent) : KListViewItem(tqparent) {} + //NetListViewItem(KListView *tqparent, KListViewItem *after) : KListViewItem(tqparent, after) {} + //NetListViewItem(KListView *tqparent, KListViewItem *after, TQString essid, TQString mode) : KListViewItem(tqparent, after, essid, mode) {} + NetListViewItem(KListView *tqparent, TQString essid, TQString chan, int quality, bool enc, TQString ap, bool hidden, bool connected = 0 ) + : KListViewItem(tqparent, TQString(), TQString(), TQString(), TQString(), TQString()) { mEssid = essid; mChannel = chan; @@ -46,38 +46,38 @@ public: mHidden = hidden; mConnected = connected; mHeight = height(); - mWpaSettings = QStringList(); + mWpaSettings = TQStringList(); } ~NetListViewItem() {} - void setEssid(const QString& theValue) + void setEssid(const TQString& theValue) { mEssid = theValue; setText(mEssidColumn, mEssid); //update(); } - QString essid() const + TQString essid() const { return mEssid; } - void setChannel(const QString& theValue) + void setChannel(const TQString& theValue) { - if ( mChannel != theValue ) { //repaint only if difference visible in quality stars + if ( mChannel != theValue ) { //tqrepaint only if difference visible in quality stars mChannel = theValue; - repaint(); + tqrepaint(); } } - QString channel() const + TQString channel() const { return mChannel; } - /*QString mode() const + /*TQString mode() const { return mMode; }*/ @@ -87,12 +87,12 @@ public: return mEnc; } - QString ap() const + TQString ap() const { return mAP; } - void setAp(const QString& ap) { + void setAp(const TQString& ap) { mAP = ap; setText(mAPColumn, mAP); } @@ -111,7 +111,7 @@ public: mHeight-=10; } setHeight( mHeight ); - repaint(); + tqrepaint(); } @@ -122,9 +122,9 @@ public: void setQuality(const int& theValue) { - if ( int(mQuality/8) != int(theValue/8) ) { //repaint only if difference visible in quality stars + if ( int(mQuality/8) != int(theValue/8) ) { //tqrepaint only if difference visible in quality stars mQuality = theValue; - repaint(); + tqrepaint(); } else mQuality = theValue; } @@ -134,13 +134,13 @@ public: return mQuality; } - void setWpaSettings(const QStringList& theValue) + void setWpaSettings(const TQStringList& theValue) { mWpaSettings = theValue; } - QStringList wpaSettings() const + TQStringList wpaSettings() const { return mWpaSettings; } @@ -150,20 +150,20 @@ public: private: - virtual void paintCell (QPainter *p, const QColorGroup &cg, int column, int width, int alignment); - virtual int width(const QFontMetrics &fm, const QListView *lv, int column) const; - virtual QString key( int column, bool ascending ) const; + virtual void paintCell (TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment); + virtual int width(const TQFontMetrics &fm, const TQListView *lv, int column) const; + virtual TQString key( int column, bool ascending ) const; - QString mEssid; - QString mChannel; - //QString mMode; + TQString mEssid; + TQString mChannel; + //TQString mMode; int mQuality; bool mEnc; - QString mAP; + TQString mAP; bool mHidden; bool mConnected; int mHeight; - QStringList mWpaSettings; + TQStringList mWpaSettings; static const int mEssidColumn = 0; static const int mChanColumn = 1; diff --git a/src/netparams.h b/src/netparams.h index 3ec8352..91335a9 100644 --- a/src/netparams.h +++ b/src/netparams.h @@ -22,42 +22,42 @@ #define WA_NETPARAMS_H #include -#include +#include #include #include class WANetParams { public: - QString iface; - QString essid; - //QString mode; - QString channel; - QString ap; + TQString iface; + TQString essid; + //TQString mode; + TQString channel; + TQString ap; bool wep; - QString wepMode; - QString wepKey; + TQString wepMode; + TQString wepKey; bool wpa; - QStringList wpaSettings; - QString wpaKey; + TQStringList wpaSettings; + TQString wpaKey; bool dhcp; - QString ip; - QString netmask; - QString broadcast; - QString gateway; - QString domain; - QString dns1; - QString dns2; + TQString ip; + TQString nettqmask; + TQString broadcast; + TQString gateway; + TQString domain; + TQString dns1; + TQString dns2; bool hiddenEssid; bool wasHiddenEssid; bool wasWep; - QString preConnectionCommand; - QString postConnectionCommand; - QString preDisconnectionCommand; - QString postDisconnectionCommand; + TQString preConnectionCommand; + TQString postConnectionCommand; + TQString preDisconnectionCommand; + TQString postDisconnectionCommand; int preConnectionTimeout; int postConnectionTimeout; int preDisconnectionTimeout; @@ -79,7 +79,7 @@ public: r = true; } if ( (hiddenEssid) && (!wasHiddenEssid) ) - if ( KMessageBox::questionYesNo(0, i18n("

The network has stopped broadcasting its ESSID since the last time you were connected.

Would you like to use '%1' as an ESSID for this network?

NOTE: If you answer No, a dialog will appear where you will be able to specify a different ESSID.

").arg(essid) ) != 3 ) // !=YES + if ( KMessageBox::questionYesNo(0, i18n("

The network has stopped broadcasting its ESSID since the last time you were connected.

Would you like to use '%1' as an ESSID for this network?

NOTE: If you answer No, a dialog will appear where you will be able to specify a different ESSID.

").tqarg(essid) ) != 3 ) // !=YES r = true; wasHiddenEssid = hiddenEssid; @@ -87,19 +87,19 @@ public: return r; } - QString netParamsString() + TQString netParamsString() { - QStringList mNPS; - mNPS << boolToString(hiddenEssid) << essid << ap << channel << boolToString(wep) << wepMode << wepKey << boolToString(dhcp) << ip << netmask << broadcast << gateway << domain << dns1 << dns2 << boolToString(wasHiddenEssid) << boolToString(wasWep) << \ - preConnectionCommand << QString::number(preConnectionTimeout) << boolToString(preConnectionDetached) << \ - postConnectionCommand << QString::number(postConnectionTimeout) << boolToString(postConnectionDetached) << \ - preDisconnectionCommand << QString::number(preDisconnectionTimeout) << boolToString(preDisconnectionDetached) << \ - postDisconnectionCommand << QString::number(postDisconnectionTimeout) << boolToString(postDisconnectionDetached) << \ + TQStringList mNPS; + mNPS << boolToString(hiddenEssid) << essid << ap << channel << boolToString(wep) << wepMode << wepKey << boolToString(dhcp) << ip << nettqmask << broadcast << gateway << domain << dns1 << dns2 << boolToString(wasHiddenEssid) << boolToString(wasWep) << \ + preConnectionCommand << TQString::number(preConnectionTimeout) << boolToString(preConnectionDetached) << \ + postConnectionCommand << TQString::number(postConnectionTimeout) << boolToString(postConnectionDetached) << \ + preDisconnectionCommand << TQString::number(preDisconnectionTimeout) << boolToString(preDisconnectionDetached) << \ + postDisconnectionCommand << TQString::number(postDisconnectionTimeout) << boolToString(postDisconnectionDetached) << \ wpaSettings.join(",") << wpaKey; return mNPS.join(","); } - void loadNetParamsString( const QString & nps ) + void loadNetParamsString( const TQString & nps ) { /*if (nps.section(",",0,0)=="true") hiddenEssid=true; @@ -116,7 +116,7 @@ public: wepKey = nps.section(",",6,6); dhcp = ( nps.section(",",7,7) == "true" ); ip = nps.section(",",8,8); - netmask = nps.section(",",9,9); + nettqmask = nps.section(",",9,9); broadcast = nps.section(",",10,10); gateway = nps.section(",",11,11); domain = nps.section(",",12,12); @@ -140,14 +140,14 @@ public: postDisconnectionCommand = nps.section(",",26,26); postDisconnectionTimeout = nps.section(",",27,27).toInt(); postDisconnectionDetached = ( nps.section(",",28,28) == "true" ); - wpaSettings = QStringList::split( ",", nps.section(",",29,32) ); // 4 fields + wpaSettings = TQStringList::split( ",", nps.section(",",29,32) ); // 4 fields wpaKey = nps.section(",",33,33); } private: - QString boolToString( bool b ) + TQString boolToString( bool b ) { - QString result; + TQString result; b ? result = "true" : result = "false"; return result; } @@ -157,11 +157,11 @@ class WACommands { public: bool allFound; - QStringList notFound; + TQStringList notFound; void init() { - QStringList binDirs; + TQStringList binDirs; binDirs << "/sbin" << "/usr/sbin" << "/usr/local/sbin" << "/bin" << "/usr/bin" << "/usr/local/bin"; wpa_supplicant = getPath("wpa_supplicant", binDirs); @@ -187,9 +187,9 @@ public: std::cout << "All executables found." << std::endl; } - QStringList cmd( const QString & action, const WANetParams & np, const bool & quiet = false ) + TQStringList cmd( const TQString & action, const WANetParams & np, const bool & quiet = false ) { - QStringList mCmd; + TQStringList mCmd; /*if (action=="ifup") mCmd << ifconfig << np.iface << "up"; @@ -234,8 +234,8 @@ public: } else if (action=="ifconfig_manual") { mCmd << ifconfig << np.iface << np.ip; - if (!np.netmask.isEmpty()) - mCmd << "netmask" << np.netmask; + if (!np.nettqmask.isEmpty()) + mCmd << "nettqmask" << np.nettqmask; if (!np.broadcast.isEmpty()) mCmd << "broadcast" << np.broadcast; @@ -250,31 +250,31 @@ public: } else std::cout << "Unknown action: " << action << std::endl; - if ( (!mCmd.isEmpty()) && (!quiet) ) {//mCmd = QStringList(); - QString mCmdString = mCmd.join(" "); - if (!np.wepKey.isEmpty()) mCmdString.replace(np.wepKey, "xxxxxxxxxx"); + if ( (!mCmd.isEmpty()) && (!quiet) ) {//mCmd = TQStringList(); + TQString mCmdString = mCmd.join(" "); + if (!np.wepKey.isEmpty()) mCmdString.tqreplace(np.wepKey, "xxxxxxxxxx"); std::cout << action << ": " << mCmdString << std::endl; } return mCmd; } - QString route; - QString dhcpClient; - QString wpa_supplicant; - QString wpa_cli; + TQString route; + TQString dhcpClient; + TQString wpa_supplicant; + TQString wpa_cli; private: - QString ifconfig; - QString iwconfig; - QString iwlist; - QString dhcp; - QString pidof; + TQString ifconfig; + TQString iwconfig; + TQString iwlist; + TQString dhcp; + TQString pidof; - QString getPath(QString file, QStringList dirs) + TQString getPath(TQString file, TQStringList dirs) { - QString s; - for ( QStringList::Iterator it = dirs.begin(); it != dirs.end(); it++ ) { - if (QFile( QString(*it+"/"+file) ).exists()) { - s = QString(*it+"/"+file); + TQString s; + for ( TQStringList::Iterator it = dirs.begin(); it != dirs.end(); it++ ) { + if (TQFile( TQString(*it+"/"+file) ).exists()) { + s = TQString(*it+"/"+file); break; } } diff --git a/src/ui_NetParamsEdit.ui b/src/ui_NetParamsEdit.ui index b10b5f3..cf3caba 100644 --- a/src/ui_NetParamsEdit.ui +++ b/src/ui_NetParamsEdit.ui @@ -1,6 +1,6 @@ netProperties - + netProperties @@ -36,7 +36,7 @@ 6 - + Layout1 @@ -50,7 +50,7 @@ 6 - + buttonHelp @@ -74,14 +74,14 @@ Expanding - + 20 20 - + buttonOk @@ -98,7 +98,7 @@ true - + buttonCancel @@ -114,11 +114,11 @@ - + tabNetParams - + tabInterface @@ -129,7 +129,7 @@ unnamed - + boxEssid @@ -148,7 +148,7 @@ unnamed - + textLabel1 @@ -156,14 +156,14 @@ ESSID: - + essid - + buttonGroup1 @@ -182,15 +182,15 @@ unnamed - + -layout3 +tqlayout3 unnamed - + radioDhcp @@ -198,7 +198,7 @@ Automatic (DHCP) - + radioManualConfig @@ -208,7 +208,7 @@ - + boxManualConfig @@ -222,30 +222,30 @@ unnamed - + -netmask +nettqmask - + textLabel4 -Netmask: +Nettqmask: - + ip - + domain - + textLabel2 @@ -253,7 +253,7 @@ IP: - + textLabel3 @@ -261,7 +261,7 @@ Broadcast: - + textLabel5 @@ -269,12 +269,12 @@ Gateway: - + dns1 - + textLabel6 @@ -282,22 +282,22 @@ Domain: - + broadcast - + gateway - + dns2 - + textLabel8 @@ -305,7 +305,7 @@ Secondary DNS: - + textLabel7 @@ -327,7 +327,7 @@ Expanding - + 20 21 @@ -336,7 +336,7 @@ - + tabSecurity @@ -357,14 +357,14 @@ Expanding - + 21 40 - + groupWpa @@ -375,15 +375,15 @@ unnamed - + -layout33 +tqlayout33 unnamed - + textLabel1_2_2 @@ -399,7 +399,7 @@ Key: - + wpaKey @@ -407,7 +407,7 @@ Password - + checkWpaAscii @@ -417,15 +417,15 @@ - + -layout34 +tqlayout34 unnamed - + textLabel1_3_5 @@ -441,7 +441,7 @@ WPA Version:<br>Group Cipher:<br>Pairwise Cipher:<br>Authentication Suite: - + labelWpaSettings @@ -467,7 +467,7 @@ Expanding - + 131 21 @@ -478,7 +478,7 @@ - + groupWep @@ -489,7 +489,7 @@ unnamed - + radioWepOpen @@ -500,15 +500,15 @@ Alt+M - + -layout35 +tqlayout35 unnamed - + textLabel1_2 @@ -524,7 +524,7 @@ Key: - + wepKey @@ -532,7 +532,7 @@ Password - + checkWepAscii @@ -542,7 +542,7 @@ - + radioWepRestricted @@ -557,7 +557,7 @@ - + tabAdvanced @@ -568,7 +568,7 @@ unnamed - + textLabel1_4 @@ -576,7 +576,7 @@ <b>Security Warning:</b> the commands specified below will be ran with the same privileges as Wireless Assistant has. - + groupBox3 @@ -587,9 +587,9 @@ unnamed - + -layout6 +tqlayout6 @@ -605,14 +605,14 @@ Expanding - + 130 20 - + textLabel1_3 @@ -620,7 +620,7 @@ Timeout: - + preConnectionTimeout @@ -644,7 +644,7 @@ <p>This option specifies how long should Wireless Assistant wait for the process to finish, before it will be killed.</p> - + preConnectionDetached @@ -661,15 +661,15 @@ - + -layout7 +tqlayout7 unnamed - + textLabel1_3_2 @@ -677,7 +677,7 @@ Command: - + preConnectionCommand @@ -686,7 +686,7 @@ - + groupBox3_2 @@ -697,9 +697,9 @@ unnamed - + -layout6_2 +tqlayout6_2 @@ -715,14 +715,14 @@ Expanding - + 130 20 - + textLabel1_3_3 @@ -730,7 +730,7 @@ Timeout: - + postConnectionTimeout @@ -754,7 +754,7 @@ <p>This option specifies how long should Wireless Assistant wait for the process to finish, before it will be killed.</p> - + postConnectionDetached @@ -771,15 +771,15 @@ - + -layout7_2 +tqlayout7_2 unnamed - + textLabel1_3_2_2 @@ -787,7 +787,7 @@ Command: - + postConnectionCommand @@ -796,7 +796,7 @@ - + groupBox3_3 @@ -807,9 +807,9 @@ unnamed - + -layout6_3 +tqlayout6_3 @@ -825,14 +825,14 @@ Expanding - + 130 20 - + textLabel1_3_4 @@ -840,7 +840,7 @@ Timeout: - + preDisconnectionTimeout @@ -864,7 +864,7 @@ <p>This option specifies how long should Wireless Assistant wait for the process to finish, before it will be killed.</p> - + preDisconnectionDetached @@ -881,15 +881,15 @@ - + -layout7_3 +tqlayout7_3 unnamed - + textLabel1_3_2_3 @@ -897,7 +897,7 @@ Command: - + preDisconnectionCommand @@ -906,7 +906,7 @@ - + groupBox3_3_2 @@ -917,9 +917,9 @@ unnamed - + -layout6_3_2 +tqlayout6_3_2 @@ -935,14 +935,14 @@ Expanding - + 130 20 - + textLabel1_3_4_2 @@ -950,7 +950,7 @@ Timeout: - + postDisconnectionTimeout @@ -974,7 +974,7 @@ <p>This option specifies how long should Wireless Assistant wait for the process to finish, before it will be killed.</p> - + postDisconnectionDetached @@ -991,15 +991,15 @@ - + -layout7_3_2 +tqlayout7_3_2 unnamed - + textLabel1_3_2_3_2 @@ -1007,7 +1007,7 @@ Command: - + postDisconnectionCommand @@ -1026,7 +1026,7 @@ Expanding - + 31 20 @@ -1094,7 +1094,7 @@ radioManualConfig ip broadcast -netmask +nettqmask gateway domain dns1 @@ -1107,5 +1107,5 @@ buttonOk buttonCancel - + diff --git a/src/ui_NetParamsWizard.ui b/src/ui_NetParamsWizard.ui index 14e8a46..b14cc09 100644 --- a/src/ui_NetParamsWizard.ui +++ b/src/ui_NetParamsWizard.ui @@ -1,6 +1,6 @@ NetParamsWizard - + NetParamsWizard @@ -26,7 +26,7 @@ 1 - + welcome @@ -37,7 +37,7 @@ unnamed - + textLabel1_2 @@ -46,13 +46,13 @@ <p>You will be asked a few questions necessary to configure this connection.</p> <p><i>Press Next to continue.</i></p> - + WordBreak|AlignTop - + WizardPage @@ -66,7 +66,7 @@ 15 - + textLabel8_2 @@ -85,25 +85,25 @@ Expanding - + 21 100 - + textLabel9 ESSID: - + AlignVCenter|AlignRight - + essid @@ -118,7 +118,7 @@ Expanding - + 101 21 @@ -135,7 +135,7 @@ Expanding - + 61 21 @@ -144,7 +144,7 @@ - + ConfigMode @@ -168,7 +168,7 @@ Expanding - + 80 21 @@ -185,7 +185,7 @@ Expanding - + 60 31 @@ -202,14 +202,14 @@ Expanding - + 21 20 - + buttonGroup3 @@ -229,7 +229,7 @@ unnamed - + radioDhcp @@ -243,7 +243,7 @@ true - + radioManualConfig @@ -256,7 +256,7 @@ - + textLabel2_2 @@ -267,7 +267,7 @@ - + ManualConfig @@ -281,15 +281,15 @@ 15 - + -layout12 +tqlayout12 unnamed - + dns1 @@ -297,7 +297,7 @@ 32767 - + gateway @@ -305,18 +305,18 @@ 32767 - + textLabel6 Secondary DNS: - + AlignVCenter|AlignRight - + ip @@ -324,7 +324,7 @@ 32767 - + broadcast @@ -332,29 +332,29 @@ 32767 - + textLabel1 IP: - + AlignVCenter|AlignRight - + textLabel3 -Netmask: +Nettqmask: - + AlignVCenter|AlignRight - + dns2 @@ -362,60 +362,60 @@ 32767 - + textLabel5 Primary DNS: - + AlignVCenter|AlignRight - + textLabel7 Gateway: - + AlignVCenter|AlignRight - + domain - + -netmask +nettqmask 32767 - + textLabel4 Domain: - + AlignVCenter|AlignRight - + textLabel2 Broadcast: - + AlignVCenter|AlignRight @@ -431,7 +431,7 @@ Expanding - + 60 31 @@ -448,7 +448,7 @@ Expanding - + 50 21 @@ -465,14 +465,14 @@ Expanding - + 21 16 - + textLabel3_2 @@ -483,7 +483,7 @@ - + WepConfig @@ -494,7 +494,7 @@ unnamed - + textLabel5_2 @@ -503,7 +503,7 @@ <p>Which WEP mode would you like to use?</p> - + buttonGroup3_2_2 @@ -520,7 +520,7 @@ unnamed - + radioWepOpen @@ -531,7 +531,7 @@ true - + radioButton2_2_2 @@ -551,7 +551,7 @@ Expanding - + 122 31 @@ -568,14 +568,14 @@ Expanding - + 150 21 - + textLabel6_2 @@ -593,7 +593,7 @@ Expanding - + 31 16 @@ -610,7 +610,7 @@ Expanding - + 50 21 @@ -627,29 +627,29 @@ Expanding - + 30 21 - + textLabel8 WEP key: - + AlignVCenter|AlignRight - + wepKey - + 140 0 @@ -659,7 +659,7 @@ Password - + checkWepAscii @@ -669,7 +669,7 @@ - + WizardPage @@ -690,7 +690,7 @@ Expanding - + 31 54 @@ -707,7 +707,7 @@ Expanding - + 80 21 @@ -724,14 +724,14 @@ Expanding - + 49 21 - + textLabel5_2_2 @@ -739,22 +739,22 @@ <p><b>The network you are trying to connect to requires WPA authentication.</b></p> - + textLabel8_3 WPA Key: - + AlignVCenter|AlignRight - + wpaKey - + 140 0 @@ -764,7 +764,7 @@ Password - + checkWpaAscii @@ -772,7 +772,7 @@ ASCII - + textLabel6_2_2 @@ -790,7 +790,7 @@ Expanding - + 80 21 @@ -807,14 +807,14 @@ Expanding - + 60 31 - + labelWpaSettings @@ -830,7 +830,7 @@ <b>?<br>?<br>?<br>?</b> - + textLabel1_3 @@ -848,7 +848,7 @@ - + done @@ -859,7 +859,7 @@ unnamed - + textLabel7_2 @@ -868,7 +868,7 @@ <p>You have successfully finished configuring this connection.</p> <p><b>Press Finish to connect!</b></p> - + WordBreak|AlignTop @@ -879,7 +879,7 @@ buttonGroup3 ip broadcast -netmask +nettqmask gateway domain dns1 @@ -888,5 +888,5 @@ wepKey radioDhcp - + diff --git a/src/ui_main.ui b/src/ui_main.ui index eca55a9..5dd8274 100644 --- a/src/ui_main.ui +++ b/src/ui_main.ui @@ -1,6 +1,6 @@ mainWindow - + mainWindow @@ -23,7 +23,7 @@ buttonOptions - + 0 0 @@ -75,7 +75,7 @@ false - + 120 0 @@ -129,16 +129,16 @@ Expanding - + 21 120 - + -layout16 +tqlayout16 @@ -147,7 +147,7 @@ 0 - + frameDevice @@ -172,7 +172,7 @@ 0 - + devLabel @@ -184,7 +184,7 @@ 0 - + 0 20 @@ -209,7 +209,7 @@ 0 - + 60 0 @@ -226,7 +226,7 @@ - + widgetStack @@ -247,7 +247,7 @@ 2 - + netPage @@ -338,7 +338,7 @@ <p><i>HINT: Click the Refresh button to update this list.</i></p> - + statusLabel @@ -350,7 +350,7 @@ 0 - + 0 20 @@ -362,17 +362,17 @@ Ready - + WordBreak|AlignVCenter -<p><b>Status Bar</b></p> +<p><b>tqStatus Bar</b></p> <p>Messages describing current process are shown in this area.</p> - + optionsPage @@ -383,15 +383,15 @@ unnamed - + -layout20 +tqlayout20 unnamed - + checkAutoConnect @@ -406,7 +406,7 @@ <p>Checking this box will make the application try to connect to the best available network. Only networks that have been previously configured will be taken into account.</p> - + checkAutoReconnect @@ -421,7 +421,7 @@ <p>Checking this box will make the application try to reconnect after the connection is lost.</p> - + checkAutoQuit @@ -436,7 +436,7 @@ <p>Checking this box will make the application close after successfully establishing a connection to a wireless network.</p> - + checkGroupAPs @@ -453,23 +453,23 @@ - + -layout17 +tqlayout17 unnamed - + -layout12 +tqlayout12 unnamed - + textLabel2_2 @@ -485,7 +485,7 @@ <p><i>HINT: Increasing this number can help if you have problems connecting to some networks.</i></p> - + textLabel2 @@ -503,9 +503,9 @@ - + -layout13 +tqlayout13 @@ -521,7 +521,7 @@ Fixed - + 21 20 @@ -538,7 +538,7 @@ Fixed - + 21 20 @@ -547,15 +547,15 @@ - + -layout14 +tqlayout14 unnamed - + spinDelayBeforeScanning @@ -580,7 +580,7 @@ <p><i>HINT: Increasing this number can help if you have to refresh the list manually to see all the available networks.</i></p> - + spinDhcpTimeout @@ -607,9 +607,9 @@ - + -layout15 +tqlayout15 @@ -625,7 +625,7 @@ Expanding - + 101 21 @@ -642,7 +642,7 @@ Expanding - + 118 21 @@ -653,7 +653,7 @@ - + textLabel1 @@ -661,9 +661,9 @@ <i>Press the button below to enable all messages which have been turned off with the 'Don't Show Again' feature.</i> - + -layout19 +tqlayout19 @@ -679,14 +679,14 @@ Expanding - + 201 21 - + buttonEnableAllMessages @@ -713,7 +713,7 @@ Expanding - + 20 31 @@ -738,16 +738,16 @@ spinDhcpTimeout buttonEnableAllMessages - + netScan() netConnect() showCfgDlg() setDeviceList() - + -updateStatus(char sts) +updatetqStatus(char sts) - + kpushbutton.h kpushbutton.h diff --git a/src/ui_netparamsedit.cpp b/src/ui_netparamsedit.cpp index 0e994d6..ee4b588 100644 --- a/src/ui_netparamsedit.cpp +++ b/src/ui_netparamsedit.cpp @@ -22,20 +22,20 @@ #include "ui_netparamsedit.h" #include "netparams.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -ui_NetParamsEdit::ui_NetParamsEdit(QWidget* parent, const char* name, bool modal, WFlags fl) - : netProperties(parent,name, modal,fl) +ui_NetParamsEdit::ui_NetParamsEdit(TQWidget* tqparent, const char* name, bool modal, WFlags fl) + : netProperties(tqparent,name, modal,fl) { buttonHelp->hide(); buttonOk->setIconSet( SmallIconSet("ok") ); @@ -81,7 +81,7 @@ void ui_NetParamsEdit::setValues( const WANetParams & np ) } } if (np.wpa) { - labelWpaSettings->setText( QString("%1").arg( np.wpaSettings.join("
") ) ); + labelWpaSettings->setText( TQString("%1").tqarg( np.wpaSettings.join("
") ) ); if ( np.wpaKey.left(2)=="s:" ) { //ASCII key checkWpaAscii->setChecked(true); wpaKey->setText( np.wpaKey.right(np.wpaKey.length()-2) ); @@ -97,7 +97,7 @@ void ui_NetParamsEdit::setValues( const WANetParams & np ) ip->setText(np.ip); broadcast->setText( np.broadcast ); - netmask->setText( np.netmask ); + nettqmask->setText( np.nettqmask ); gateway->setText( np.gateway ); domain->setText( np.domain ); dns1->setText( np.dns1 ); @@ -129,7 +129,7 @@ WANetParams ui_NetParamsEdit::readNetParams( WANetParams & np ) np.dhcp = radioDhcp->isChecked(); np.ip = ip->text(); np.broadcast = broadcast->text(); - np.netmask = netmask->text(); + np.nettqmask = nettqmask->text(); np.gateway = gateway->text(); np.domain = domain->text(); np.dns1 = dns1->text(); diff --git a/src/ui_netparamsedit.h b/src/ui_netparamsedit.h index 4c3b8b0..e1e13c9 100644 --- a/src/ui_netparamsedit.h +++ b/src/ui_netparamsedit.h @@ -28,9 +28,10 @@ class WANetParams; class ui_NetParamsEdit : public netProperties { Q_OBJECT + TQ_OBJECT public: - ui_NetParamsEdit(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + ui_NetParamsEdit(TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~ui_NetParamsEdit(); /*$PUBLIC_FUNCTIONS$*/ //void setWepEnabled( bool w ); diff --git a/src/ui_netparamswizard.cpp b/src/ui_netparamswizard.cpp index 9945eea..a2b46ce 100644 --- a/src/ui_netparamswizard.cpp +++ b/src/ui_netparamswizard.cpp @@ -22,16 +22,16 @@ #include "ui_netparamswizard.h" #include "netparams.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -ui_NetParamsWizard::ui_NetParamsWizard(QWidget* parent, const char* name, bool modal, WFlags fl) - : NetParamsWizard(parent,name, modal,fl) +ui_NetParamsWizard::ui_NetParamsWizard(TQWidget* tqparent, const char* name, bool modal, WFlags fl) + : NetParamsWizard(tqparent,name, modal,fl) { backButton()->setIconSet( SmallIconSet("back") ); nextButton()->setIconSet( SmallIconSet("forward") ); @@ -52,10 +52,10 @@ void ui_NetParamsWizard::setWepEnabled( bool w ) setAppropriate( page(4), w ); } -void ui_NetParamsWizard::setWpaEnabled( bool w, QStringList settings ) +void ui_NetParamsWizard::setWpaEnabled( bool w, TQStringList settings ) { setAppropriate( page(5), w ); - if (w) labelWpaSettings->setText( QString("%1").arg( settings.join("
") ) ); + if (w) labelWpaSettings->setText( TQString("%1").tqarg( settings.join("
") ) ); } @@ -68,7 +68,7 @@ void ui_NetParamsWizard::next() { if (indexOf(currentPage())==2) setAppropriate( page(3), radioManualConfig->isChecked() ); - QWizard::next(); + TQWizard::next(); } WANetParams ui_NetParamsWizard::readNetParams( WANetParams & np ) @@ -79,7 +79,7 @@ WANetParams ui_NetParamsWizard::readNetParams( WANetParams & np ) if (!np.dhcp) { // manual configuration option selected np.ip = ip->text(); np.broadcast = broadcast->text(); - np.netmask = netmask->text(); + np.nettqmask = nettqmask->text(); np.gateway = gateway->text(); np.domain = domain->text(); np.dns1 = dns1->text(); diff --git a/src/ui_netparamswizard.h b/src/ui_netparamswizard.h index fc3dfcb..e617176 100644 --- a/src/ui_netparamswizard.h +++ b/src/ui_netparamswizard.h @@ -28,13 +28,14 @@ class WANetParams; class ui_NetParamsWizard : public NetParamsWizard { Q_OBJECT + TQ_OBJECT public: - ui_NetParamsWizard(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + ui_NetParamsWizard(TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~ui_NetParamsWizard(); /*$PUBLIC_FUNCTIONS$*/ void setWepEnabled( bool w ); - void setWpaEnabled( bool w, QStringList settings = QStringList() ); + void setWpaEnabled( bool w, TQStringList settings = TQStringList() ); void setEssidEnabled( bool e ); WANetParams readNetParams( WANetParams & np ); diff --git a/src/waconfig.cpp b/src/waconfig.cpp index aadad38..bb8cc97 100644 --- a/src/waconfig.cpp +++ b/src/waconfig.cpp @@ -16,7 +16,7 @@ WAConfig *WAConfig::self() } WAConfig::WAConfig( ) - : KConfigSkeleton( QString::fromLatin1( "wlassistantrc" ) ) + : KConfigSkeleton( TQString::tqfromLatin1( "wlassistantrc" ) ) { mSelf = this; } diff --git a/src/watools.cpp b/src/watools.cpp index 5814274..eaaf51f 100644 --- a/src/watools.cpp +++ b/src/watools.cpp @@ -137,7 +137,7 @@ int WATools::quality( const char* _ifname ) ///returns active link quality in ra unsigned int std_qual = (100*stats.qual.qual)/50; //calculate normalized quality (0-100). 50 is the best noise/signal difference if (std_qual > 100) std_qual = 100; -// std::cout << "* QUALITY: " << std_qual << std::endl; +// std::cout << "* TQUALITY: " << std_qual << std::endl; return std_qual; } diff --git a/src/watools.h b/src/watools.h index e2088e5..5e03b8a 100644 --- a/src/watools.h +++ b/src/watools.h @@ -26,7 +26,7 @@ #include #include -class QStringList; +class TQStringList; class WATools { @@ -50,7 +50,7 @@ public: static bool isWireless( const char* _ifname ); //returns true if iface is a valid wireless interface static char* essid( const char* _ifname = 0 ); //returns current ESSID static char* ap( const char* _ifname = 0 ); //returns current AP - static int quality( const char* _ifname = 0 ); //returns current QUALITY + static int quality( const char* _ifname = 0 ); //returns current TQUALITY static int txpower( const char* _ifname = 0 ); //returns current TXPOWER static bool hasKey( const char* _ifname = 0 ); //returns true if WEP key for the specified interface is set diff --git a/src/wlassistant.cpp b/src/wlassistant.cpp index bf58914..6149e47 100644 --- a/src/wlassistant.cpp +++ b/src/wlassistant.cpp @@ -27,16 +27,16 @@ #include #include //provides LINUX_VERSION* macros -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -48,8 +48,8 @@ #include #include -WirelessAssistant::WirelessAssistant(QWidget* parent, const char* name, bool modal, WFlags fl) - : mainWindow(parent,name, modal,fl) +WirelessAssistant::WirelessAssistant(TQWidget* tqparent, const char* name, bool modal, WFlags fl) + : mainWindow(tqparent,name, modal,fl) { buttonScan->setIconSet( SmallIconSet("reload") ); buttonConnect->setIconSet( SmallIconSet("connect_creating") ); @@ -61,35 +61,35 @@ WirelessAssistant::WirelessAssistant(QWidget* parent, const char* name, bool mod frameDevice->hide(); /// Network List Widget - connect( buttonScan, SIGNAL(clicked()), - this, SLOT(netScan()) ); + connect( buttonScan, TQT_SIGNAL(clicked()), + this, TQT_SLOT(netScan()) ); - connect( buttonConnect, SIGNAL(clicked()), - this, SLOT(itemAction()) ); + connect( buttonConnect, TQT_SIGNAL(clicked()), + this, TQT_SLOT(itemAction()) ); - connect( buttonClose, SIGNAL(clicked()), - this, SLOT(close()) ); + connect( buttonClose, TQT_SIGNAL(clicked()), + this, TQT_SLOT(close()) ); - connect( devCombo, SIGNAL(activated( const QString & )), - this, SLOT(setDev( const QString & )) ); + connect( devCombo, TQT_SIGNAL(activated( const TQString & )), + this, TQT_SLOT(setDev( const TQString & )) ); - connect( netList, SIGNAL(rightButtonPressed( QListViewItem*, const QPoint&, int )), - SLOT(showItemContextMenu( QListViewItem*, const QPoint&, int )) ); + connect( netList, TQT_SIGNAL(rightButtonPressed( TQListViewItem*, const TQPoint&, int )), + TQT_SLOT(showItemContextMenu( TQListViewItem*, const TQPoint&, int )) ); /// Settings Widget - connect( buttonOptions, SIGNAL(toggled(bool)), - this, SLOT(togglePage(bool)) ); + connect( buttonOptions, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(togglePage(bool)) ); - connect( buttonEnableAllMessages, SIGNAL(clicked()), - this, SLOT(enableAllMessages()) ); + connect( buttonEnableAllMessages, TQT_SIGNAL(clicked()), + this, TQT_SLOT(enableAllMessages()) ); /// Global KDE Options - connect( KApplication::kApplication(), SIGNAL(settingsChanged(int)), - this, SLOT(updateConfiguration(int)) ); + connect( KApplication::kApplication(), TQT_SIGNAL(settingsChanged(int)), + this, TQT_SLOT(updateConfiguration(int)) ); setMouseBehaviour(); - QTimer::singleShot(10, this, SLOT(init()) ); //WAIT FOR THE UI TO BE READY BEFORE FURTHER SETUP (msec) + TQTimer::singleShot(10, this, TQT_SLOT(init()) ); //WAIT FOR THE UI TO BE READY BEFORE FURTHER SETUP (msec) } WirelessAssistant::~WirelessAssistant() @@ -101,11 +101,11 @@ WirelessAssistant::~WirelessAssistant() void WirelessAssistant::init() { statusLabel->setText(i18n("Initializing...")); - statusLabel->repaint(); + statusLabel->tqrepaint(); //////////////////////////////////////// ///// CHECK FOR SYSFS (KERNEL 2.6) ///// - if ( !QFile::exists("/sys") ) { + if ( !TQFile::exists("/sys") ) { std::cout << "Sysfs not present. Exiting." << std::endl; KMessageBox::error( 0, i18n("Kernel 2.6 or later not present.\nWireless Assistant will now quit.") ); close(); @@ -150,7 +150,7 @@ void WirelessAssistant::init() /////////////////////////////////// ///// DETECT WIRELESS DEVICES ///// - QStringList devList = interfaceList(); + TQStringList devList = interfaceList(); if ( devList.count()==0 ) { std::cout << "No wireless interfaces found. Exiting." << std::endl; KMessageBox::error(0, i18n("No usable wireless devices found.\nWireless Assistant will now quit.")); @@ -174,7 +174,7 @@ void WirelessAssistant::init() ////////////////////////////////// ///// CHECK FILE PERMISSIONS ///// - if (!QFileInfo("/etc/resolv.conf").isWritable()) { + if (!TQFileInfo("/etc/resolv.conf").isWritable()) { std::cout << "warning: /etc/resolv.conf not writable" << std::endl; KMessageBox::information(0, i18n("

You might have insufficient permissions for Wireless Assistant to function properly.

Did you run it using 'sudo'?

") ); } @@ -188,16 +188,16 @@ void WirelessAssistant::init() ///// INITIALIZE GLOBAL VARIABLES ///// wpaAvailable = ( !( Commands.wpa_supplicant.isEmpty() || Commands.wpa_cli.isEmpty() ) ); connectedItem = 0; - timerGui = new QTimer(); - timerConnectionCheck = new QTimer(); - connect( timerGui, SIGNAL(timeout()), SLOT(updateConnectedItem()) ); - connect( timerConnectionCheck, SIGNAL(timeout()), SLOT(checkConnectionStatus()) ); + timerGui = new TQTimer(); + timerConnectionCheck = new TQTimer(); + connect( timerGui, TQT_SIGNAL(timeout()), TQT_SLOT(updateConnectedItem()) ); + connect( timerConnectionCheck, TQT_SIGNAL(timeout()), TQT_SLOT(checkConnectiontqStatus()) ); //////////////////////// ///// DETECT & SET PATHS ///// if (!Commands.allFound) { //all ok or ONLY dhcpcd not found (i.e. dhclient present). std::cout << "Missing executables (" << Commands.notFound.join("', '") << "). Exiting." << std::endl; - KMessageBox::error(0, i18n("Executable(s) '%1' could not be found.\nWireless Assistant will now quit.").arg(Commands.notFound.join("', '")) ); + KMessageBox::error(0, i18n("Executable(s) '%1' could not be found.\nWireless Assistant will now quit.").tqarg(Commands.notFound.join("', '")) ); close(); return; } @@ -208,14 +208,14 @@ void WirelessAssistant::init() /////////////////////////////////////// ///// SCAN FOR AVAILABLE NETWORKS ///// if ( autoConnect ) - QTimer::singleShot( 0, this, SLOT(netAutoConnect()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(netAutoConnect()) ); else - QTimer::singleShot( 0, this, SLOT(netScan()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(netScan()) ); } -void WirelessAssistant::checkConnectionStatus() +void WirelessAssistant::checkConnectiontqStatus() { - QListViewItem* lvi; + TQListViewItem* lvi; if (groupAPs) lvi = getItemByEssid( WATools::essid(NetParams.iface)); else lvi = getItemByAp( WATools::ap(NetParams.iface )); bool needsKey; @@ -235,7 +235,7 @@ void WirelessAssistant::checkConnectionStatus() } else if (connectedItem) { //connection LOST setConnectedItem(0); timerConnectionCheck->stop(); - if ( autoReconnect || KMessageBox::questionYesNo(0, i18n("Connection to '%1' has been lost!\nWould you like to reconnect?").arg(NetParams.essid), i18n("Connection Lost") , KStdGuiItem::yes(), KStdGuiItem::no() ) == KMessageBox::Yes ) { + if ( autoReconnect || KMessageBox::questionYesNo(0, i18n("Connection to '%1' has been lost!\nWould you like to reconnect?").tqarg(NetParams.essid), i18n("Connection Lost") , KStdGuiItem::yes(), KStdGuiItem::no() ) == KMessageBox::Yes ) { netDisconnect( true ); netConnect(); } @@ -246,10 +246,10 @@ void WirelessAssistant::checkConnectionStatus() void WirelessAssistant::removeNetParams() { NetListViewItem *nvi = static_cast(netList->selectedItem()); - QString ap = nvi->ap(); QString essid = nvi->essid(); - for (QStringList::Iterator nps = NetParamsList.begin(); nps != NetParamsList.end(); nps++) { + TQString ap = nvi->ap(); TQString essid = nvi->essid(); + for (TQStringList::Iterator nps = NetParamsList.begin(); nps != NetParamsList.end(); nps++) { if ( (*nps).section(",",2,2)==ap && (*nps).section(",",1,1)==essid) { - if ( KMessageBox::warningContinueCancel(0, i18n("

Settings for network '%1' are about to be deleted.

Would you like to continue?

").arg(essid)) == KMessageBox::Continue ) { + if ( KMessageBox::warningContinueCancel(0, i18n("

Settings for network '%1' are about to be deleted.

Would you like to continue?

").tqarg(essid)) == KMessageBox::Continue ) { if (nvi->hidden()) // hiddenEssid = 1 nvi->setEssid(""); NetParamsList.remove(nps); @@ -264,25 +264,25 @@ void WirelessAssistant::removeNetParams() void WirelessAssistant::setDNS( const WANetParams & np ) { - QFile f("/etc/resolv.conf"); + TQFile f("/etc/resolv.conf"); if (f.open( IO_WriteOnly | IO_Truncate )) { - QTextStream s( &f ); + TQTextStream s( &f ); if (!np.domain.isEmpty()) { - s << QString("domain " + np.domain + "\n"); + s << TQString("domain " + np.domain + "\n"); std::cout << "resolv.conf: domain " << np.domain << std::endl; } if (!np.dns1.isEmpty()) { - s << QString("nameserver " + np.dns1 + "\n"); + s << TQString("nameserver " + np.dns1 + "\n"); std::cout << "resolv.conf: nameserver " << np.dns1 << std::endl; } if (!np.dns2.isEmpty()) { - s << QString("nameserver " + np.dns2 + "\n"); + s << TQString("nameserver " + np.dns2 + "\n"); std::cout << "resolv.conf: nameserver " << np.dns2 << std::endl; } f.close(); } else { std::cout << "dns setup error: " << f.name() << " is not writeable." << std::endl; - KMessageBox::error(0, i18n("

File '%1' could not be opened for writing.

Nameserver(s) and/or domain are not set.

").arg(f.name()) ); + KMessageBox::error(0, i18n("

File '%1' could not be opened for writing.

Nameserver(s) and/or domain are not set.

").tqarg(f.name()) ); } } @@ -291,7 +291,7 @@ void WirelessAssistant::netScan() timerConnectionCheck->stop(); //stop while scanning. netScan( NetParams ); if (netList->childCount() > 0) { - QTimer::singleShot( 0, this, SLOT(checkConnectionStatus()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(checkConnectiontqStatus()) ); timerConnectionCheck->start(WA_CONNECTION_CHECK_INTERVAL); } } @@ -314,30 +314,30 @@ void WirelessAssistant::netScan( const WANetParams & np ) } if ( !WATools::isUp(np.iface) ) { - statusLabel->setText(i18n("Bringing interface %1 up...").arg(np.iface)); + statusLabel->setText(i18n("Bringing interface %1 up...").tqarg(np.iface)); //runCommand( Commands.cmd("ifup",np) ); WATools::setUp(true, np.iface); if (DelayBeforeScanning>0) { statusLabel->setText(i18n("Waiting before scanning...")); - statusLabel->repaint(); - KApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput ); + statusLabel->tqrepaint(); + KApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); usleep(DelayBeforeScanning * 1000000); // delay * 1000ms } } statusLabel->setText(i18n("Scanning...")); - statusLabel->repaint(); + statusLabel->tqrepaint(); netList->clear(); - QString result; + TQString result; statusLabel->setText(i18n("Scanning...")); result = runCommand( Commands.cmd("scan",np) ); parseScan( result ); if (netList->childCount() > 0) { - std::cout << "Networks found: " << QString::number( netList->childCount() ) << std::endl; + std::cout << "Networks found: " << TQString::number( netList->childCount() ) << std::endl; if (wasConnected) groupAPs ? setConnectedItem( WATools::essid() ) : setConnectedItem( WATools::ap() ); //mark item as connected. statusLabel->setText( i18n("Done.") ); @@ -346,7 +346,7 @@ void WirelessAssistant::netScan( const WANetParams & np ) //runCommand( Commands.cmd("ifdown", NetParams) ); //Commented out b/c it seems to cause more problems than it solves. (like no scan results) std::cout << "No networks found!" << std::endl; statusLabel->setText( i18n("No networks found.") ); - if ( result.find("Resource temporarily unavailable")>-1 ) { + if ( result.tqfind("Resource temporarily unavailable")>-1 ) { std::cout << "Radio switch seems to be off." << std::endl; KMessageBox::information(0, i18n("Radio of your wireless card seems to be turned off using an external switch on your computer.\nYou need turn it on to be able to use wireless networks.") ); } @@ -354,25 +354,25 @@ void WirelessAssistant::netScan( const WANetParams & np ) setNetListColumns(); } -void WirelessAssistant::parseScan( const QString & output ) +void WirelessAssistant::parseScan( const TQString & output ) { - QString essid; - QStringList essidList; - QString channel; - QString mode; + TQString essid; + TQStringList essidList; + TQString channel; + TQString mode; int qualInt; bool enc; //default to false bool hidden; //default to false - QString ap; + TQString ap; // security parameters bool wpa; - QStringList wpaSettings; - //QString wpaVersion, wpaGroupCipher, wpaPairwiseCipher, wpaAuthenticationSuite; + TQStringList wpaSettings; + //TQString wpaVersion, wpaGroupCipher, wpaPairwiseCipher, wpaAuthenticationSuite; bool ok_channel = true; //does iwlist return channel? - QString section; + TQString section; netList->setUpdatesEnabled( false ); //do not redraw while adding items to avoid flicker. @@ -410,7 +410,7 @@ void WirelessAssistant::parseScan( const QString & output ) } else hidden=false; - // GET QUALITY + // GET TQUALITY int wsignal; //check if driver reports quality directly qualInt = getVal(section, "Quality\\D+(\\d+)").toInt(); @@ -429,8 +429,8 @@ void WirelessAssistant::parseScan( const QString & output ) enc = true; wpaSettings.clear(); - if ( section.contains("WPA2 Version") ) wpaSettings << "WPA2"; //prefer WPA2 over WPA - else if ( section.contains("WPA Version") ) wpaSettings << "WPA"; + if ( section.tqcontains("WPA2 Version") ) wpaSettings << "WPA2"; //prefer WPA2 over WPA + else if ( section.tqcontains("WPA Version") ) wpaSettings << "WPA"; wpa = ( !wpaSettings.isEmpty() ); if (wpa) { @@ -442,7 +442,7 @@ void WirelessAssistant::parseScan( const QString & output ) // CHECK IF SAME ESSID ALREADY FOUND, if necessary if (groupAPs) { - if ( !hidden && essidList.contains(essid) ) { + if ( !hidden && essidList.tqcontains(essid) ) { NetListViewItem* sameEssid = static_cast(getItemByEssid(essid)); sameEssid->setAp("any"); if (sameEssid->quality() < qualInt) { @@ -485,7 +485,7 @@ bool WirelessAssistant::radioEnabled() return r; } -void WirelessAssistant::setNetParamsFromList( QListViewItem* lvi ) +void WirelessAssistant::setNetParamsFromList( TQListViewItem* lvi ) { NetListViewItem *nvi = static_cast(lvi); NetParams.essid = nvi->essid(); @@ -498,12 +498,12 @@ void WirelessAssistant::setNetParamsFromList( QListViewItem* lvi ) NetParams.wpa = ( nvi->enc() && !NetParams.wpaSettings.isEmpty() ); } -bool WirelessAssistant::setNetParamsFromConfig( const QString & s ) +bool WirelessAssistant::setNetParamsFromConfig( const TQString & s ) { - for (QStringList::Iterator nps = NetParamsList.begin(); nps != NetParamsList.end(); nps++) { + for (TQStringList::Iterator nps = NetParamsList.begin(); nps != NetParamsList.end(); nps++) { if ( (*nps).section(",",2,2)==s || ( (*nps).section(",",1,1)==s && (*nps).section(",",2,2)=="any") ) { NetParams.loadNetParamsString( *nps ); - if (!s.contains(":")) NetParams.ap = "any"; //if searched by essid + if (!s.tqcontains(":")) NetParams.ap = "any"; //if searched by essid return 1; } } @@ -512,7 +512,7 @@ bool WirelessAssistant::setNetParamsFromConfig( const QString & s ) void WirelessAssistant::itemAction() { - QListViewItem* lvi = netList->selectedItem(); + TQListViewItem* lvi = netList->selectedItem(); if (!lvi) return; @@ -539,7 +539,7 @@ void WirelessAssistant::netAutoConnect() int bestQuality = 0; for ( int i = 0; i < netList->childCount(); i++ ) { NetListViewItem* nvi = static_cast( netList->itemAtIndex(i) ); - QString search = nvi->ap(); + TQString search = nvi->ap(); if (search == "any") search = nvi->essid(); if ( setNetParamsFromConfig(search) ) { if ( nvi->quality() > bestQuality ) { @@ -552,7 +552,7 @@ void WirelessAssistant::netAutoConnect() if ( bestItem != -1 ) { NetListViewItem* nvi = static_cast( netList->itemAtIndex( bestItem ) ); setNetParamsFromList( nvi ); - QString search = nvi->ap(); + TQString search = nvi->ap(); if (search == "any") search = nvi->essid(); setNetParamsFromConfig( search ); timerConnectionCheck->stop(); @@ -570,21 +570,21 @@ void WirelessAssistant::netConnect() setNetParamsFromList( netList->selectedItem() ); //can't connect if WPA needed, and wpa_supplicant and wpa_cli not available if ( NetParams.wpa && !wpaAvailable ) { - KMessageBox::error(0, i18n("

Can not connect to network '%1'.

The network you are trying to connect to requires WPA authentication. The necessary executables wpa_supplicant and wpa_cli could not be found. Install wpa_supplicant and restart Wireless Assistant to connect.

").arg(NetParams.essid) ); + KMessageBox::error(0, i18n("

Can not connect to network '%1'.

The network you are trying to connect to requires WPA authentication. The necessary executables wpa_supplicant and wpa_cli could not be found. Install wpa_supplicant and restart Wireless Assistant to connect.

").tqarg(NetParams.essid) ); timerConnectionCheck->start(WA_CONNECTION_CHECK_INTERVAL); //resume connection checking return; } - QString search = NetParams.ap; + TQString search = NetParams.ap; if (search == "any") search = NetParams.essid; if ( (NetParams.essid=="") || (!setNetParamsFromConfig( search )) ) { ui_NetParamsWizard *netwiz = new ui_NetParamsWizard; if (!NetParams.hiddenEssid) - netwiz->setCaption( i18n("%1 - First Connection Wizard").arg(NetParams.essid) ); + netwiz->setCaption( i18n("%1 - First Connection Wizard").tqarg(NetParams.essid) ); netwiz->setEssidEnabled( NetParams.hiddenEssid ); netwiz->setWepEnabled( NetParams.wep ); netwiz->setWpaEnabled( NetParams.wpa, NetParams.wpaSettings ); netwiz->exec(); - if (netwiz->result()==QDialog::Rejected) { + if (netwiz->result()==TQDialog::Rejected) { delete netwiz; timerConnectionCheck->start(WA_CONNECTION_CHECK_INTERVAL); //resume connection checking return; @@ -609,9 +609,9 @@ void WirelessAssistant::netConnect() void WirelessAssistant::updateNetParams() { - for (QStringList::Iterator nps = NetParamsList.begin(); nps != NetParamsList.end(); nps++) { + for (TQStringList::Iterator nps = NetParamsList.begin(); nps != NetParamsList.end(); nps++) { if ( (*nps).section(",",2,2)==NetParams.ap ) { - QString newNps = NetParams.netParamsString(); + TQString newNps = NetParams.netParamsString(); if ( newNps!=(*nps) ) { (*nps) = newNps; WAConfig::self()->writeConfig(); @@ -623,9 +623,9 @@ void WirelessAssistant::updateNetParams() } } -QString WirelessAssistant::matchEssidForAp( const QString & ap ) +TQString WirelessAssistant::matchEssidForAp( const TQString & ap ) { - for (QStringList::Iterator nps = NetParamsList.begin(); nps != NetParamsList.end(); nps++) { + for (TQStringList::Iterator nps = NetParamsList.begin(); nps != NetParamsList.end(); nps++) { if ( (*nps).section(",",2,2)==ap ) { return (*nps).section(",",1,1); //essid } @@ -645,16 +645,16 @@ void WirelessAssistant::netConnect( const WANetParams & np ) if ( !np.preConnectionCommand.isEmpty() ) { std::cout << "Running pre-connection command: " << np.preConnectionCommand << std::endl; statusLabel->setText( i18n("Running pre-connection command...") ); - runCommand( QStringList::split( " ", np.preConnectionCommand ), np.preConnectionTimeout, np.preConnectionDetached ); + runCommand( TQStringList::split( " ", np.preConnectionCommand ), np.preConnectionTimeout, np.preConnectionDetached ); } else std::cout << "No pre-connection command specified." << std::endl; - statusLabel->setText( i18n("Connecting to '%1'...").arg(np.essid) ); - statusLabel->repaint(); + statusLabel->setText( i18n("Connecting to '%1'...").tqarg(np.essid) ); + statusLabel->tqrepaint(); if (!WATools::isUp(np.iface) ) WATools::setUp( true, np.iface ); //runCommand( Commands.cmd("ifup", np) ); - if ( runCommand( Commands.cmd("iwconfig_set", np) ).find("8B04") > -1 ) { // error 8B04 - Request 'Set Frequency' not supported. + if ( runCommand( Commands.cmd("iwconfig_set", np) ).tqfind("8B04") > -1 ) { // error 8B04 - Request 'Set Frequency' not supported. WANetParams np2 = np; np2.channel = "0"; runCommand( Commands.cmd("iwconfig_set", np2) ); @@ -679,8 +679,8 @@ void WirelessAssistant::netConnect( const WANetParams & np ) //////////////////////// ///// CONFIGURE IP ADDRESS etc. if (np.dhcp) { //DHCP config - QString dhcp_out = runCommand( Commands.cmd("ifconfig_dhcp", np), DhcpTimeout ); - if ( dhcp_out.contains("::ERR::") && !dhcp_out.contains("bound to ") ) { // 'bound to' is a check for dhclient, which gives some output to stderr even when succeeded + TQString dhcp_out = runCommand( Commands.cmd("ifconfig_dhcp", np), DhcpTimeout ); + if ( dhcp_out.tqcontains("::ERR::") && !dhcp_out.tqcontains("bound to ") ) { // 'bound to' is a check for dhclient, which gives some output to stderr even when succeeded if ( dhcpClientRunning() ) runCommand( Commands.cmd("kill_dhcp", np) ); //kill any stale DHCP client running (seems it's dhclient only) setUi(1); @@ -698,7 +698,7 @@ void WirelessAssistant::netConnect( const WANetParams & np ) if ( !np.postConnectionCommand.isEmpty() ) { std::cout << "Running post-connection command: " << np.postConnectionCommand << std::endl; statusLabel->setText( i18n("Running post-connection command...") ); - runCommand( QStringList::split( " ", np.postConnectionCommand ), np.postConnectionTimeout, np.postConnectionDetached ); + runCommand( TQStringList::split( " ", np.postConnectionCommand ), np.postConnectionTimeout, np.postConnectionDetached ); } else std::cout << "No post-connection command specified." << std::endl; @@ -710,7 +710,7 @@ void WirelessAssistant::netConnect( const WANetParams & np ) if (autoQuit) this->close(); groupAPs ? setConnectedItem( np.essid ) : setConnectedItem( np.ap ); - statusLabel->setText( i18n("Successfully connected to '%1'.").arg(np.essid) ); + statusLabel->setText( i18n("Successfully connected to '%1'.").tqarg(np.essid) ); setUi(1); } else { std::cout << "CONNECTION FAILED." << std::endl; @@ -728,7 +728,7 @@ void WirelessAssistant::updateConnectedItem() connectedItem->setQuality( WATools::quality() ); } -void WirelessAssistant::setConnectedItem( const QString & netid ) +void WirelessAssistant::setConnectedItem( const TQString & netid ) { timerConnectionCheck->stop(); //stop timer while changing currentItem if (connectedItem) { @@ -737,8 +737,8 @@ void WirelessAssistant::setConnectedItem( const QString & netid ) connectedItem = 0; } if (!netid.isEmpty()) { - QListViewItem* lvi; - if (netid.contains(":")) lvi = getItemByAp( netid ); //netid is an AP address + TQListViewItem* lvi; + if (netid.tqcontains(":")) lvi = getItemByAp( netid ); //netid is an AP address else lvi = getItemByEssid( netid ); if (lvi) { NetListViewItem* nvi = static_cast(lvi); @@ -757,29 +757,29 @@ void WirelessAssistant::setConnectedItem( const QString & netid ) void WirelessAssistant::netDisconnect( const bool & quiet ) { - if ( (quiet) || (KMessageBox::warningContinueCancel(0, i18n("

You are about to disconnect from '%1'.

Would you like to continue?

").arg(connectedItem->essid()) )== KMessageBox::Continue ) ) { + if ( (quiet) || (KMessageBox::warningContinueCancel(0, i18n("

You are about to disconnect from '%1'.

Would you like to continue?

").tqarg(connectedItem->essid()) )== KMessageBox::Continue ) ) { timerConnectionCheck->stop(); //stop while disconnecting. if ( !NetParams.preDisconnectionCommand.isEmpty() ) { std::cout << "Running pre-disconnection command: " << NetParams.preDisconnectionCommand << std::endl; statusLabel->setText( i18n("Running pre-disconnection command...") ); - runCommand( QStringList::split( " ", NetParams.preDisconnectionCommand ), NetParams.preDisconnectionTimeout, NetParams.preDisconnectionDetached ); + runCommand( TQStringList::split( " ", NetParams.preDisconnectionCommand ), NetParams.preDisconnectionTimeout, NetParams.preDisconnectionDetached ); } else std::cout << "No pre-disconnection command specified." << std::endl; statusLabel->setText( i18n("Disconnecting...") ); - statusLabel->repaint(); + statusLabel->tqrepaint(); setConnectedItem( 0 ); if ( NetParams.dhcp ) { if ( dhcpClientRunning() ) { runCommand( Commands.cmd( "kill_dhcp", NetParams ) ); statusLabel->setText( i18n("Waiting for DHCP client to shut down...") ); - statusLabel->repaint(); - QTimer* tmr = new QTimer(); + statusLabel->tqrepaint(); + TQTimer* tmr = new TQTimer(); tmr->start(1500, true); //wait 1.5sec for dhcp client to really shutdown, single shot. while ( tmr->isActive() ) { - KApplication::eventLoop()->processEvents( QEventLoop::AllEvents ); + KApplication::eventLoop()->processEvents( TQEventLoop::AllEvents ); usleep(75*1000); //75msec on Linux } delete tmr; @@ -798,7 +798,7 @@ void WirelessAssistant::netDisconnect( const bool & quiet ) if ( !NetParams.postDisconnectionCommand.isEmpty() ) { std::cout << "Running post-disconnection command: " << NetParams.postDisconnectionCommand << std::endl; statusLabel->setText( i18n("Running post-disconnection command...") ); - runCommand( QStringList::split( " ", NetParams.postDisconnectionCommand ), NetParams.postDisconnectionTimeout, NetParams.postDisconnectionDetached ); + runCommand( TQStringList::split( " ", NetParams.postDisconnectionCommand ), NetParams.postDisconnectionTimeout, NetParams.postDisconnectionDetached ); } else std::cout << "No post-disconnection command specified." << std::endl; @@ -810,9 +810,9 @@ void WirelessAssistant::netDisconnect( const bool & quiet ) } } -QListViewItem* WirelessAssistant::getItemByAp( const QString & ap ) +TQListViewItem* WirelessAssistant::getItemByAp( const TQString & ap ) { - QListViewItem* lvi = netList->firstChild(); + TQListViewItem* lvi = netList->firstChild(); while (lvi) { if ( static_cast(lvi)-> ap() == ap ) { @@ -823,9 +823,9 @@ QListViewItem* WirelessAssistant::getItemByAp( const QString & ap ) return lvi; } -QListViewItem* WirelessAssistant::getItemByEssid( const QString & essid ) +TQListViewItem* WirelessAssistant::getItemByEssid( const TQString & essid ) { - QListViewItem* lvi = netList->firstChild(); + TQListViewItem* lvi = netList->firstChild(); while (lvi) { if ( static_cast(lvi)-> essid() == essid ) { @@ -858,7 +858,7 @@ void WirelessAssistant::togglePage(bool options) buttonScan->setDisabled(options); buttonConnect->setDisabled(options); if (options) { - if (WAConfig::self()->config()->groupList().contains("Notification Messages")>0) + if (WAConfig::self()->config()->groupList().tqcontains("Notification Messages")>0) buttonEnableAllMessages->setEnabled(true); else buttonEnableAllMessages->setEnabled(false); @@ -878,43 +878,43 @@ void WirelessAssistant::enableAllMessages() void WirelessAssistant::setMouseBehaviour() { if ( KGlobalSettings::singleClick() ) { - disconnect( netList, SIGNAL(selectionChanged(QListViewItem*)), - this, SLOT(updateConnectButton(QListViewItem*)) ); - disconnect( netList, SIGNAL(doubleClicked(QListViewItem*, const QPoint &, int)), - this, SLOT(itemAction()) ); - connect( netList, SIGNAL(clicked(QListViewItem*, const QPoint &, int)), - this, SLOT(itemAction()) ); + disconnect( netList, TQT_SIGNAL(selectionChanged(TQListViewItem*)), + this, TQT_SLOT(updateConnectButton(TQListViewItem*)) ); + disconnect( netList, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint &, int)), + this, TQT_SLOT(itemAction()) ); + connect( netList, TQT_SIGNAL(clicked(TQListViewItem*, const TQPoint &, int)), + this, TQT_SLOT(itemAction()) ); buttonConnect->hide(); } else { - disconnect( netList, SIGNAL(clicked(QListViewItem*, const QPoint &, int)), - this, SLOT(itemAction()) ); + disconnect( netList, TQT_SIGNAL(clicked(TQListViewItem*, const TQPoint &, int)), + this, TQT_SLOT(itemAction()) ); - connect( netList, SIGNAL(selectionChanged(QListViewItem*)), - this, SLOT(updateConnectButton(QListViewItem*)) ); - connect( netList, SIGNAL(doubleClicked(QListViewItem*, const QPoint &, int)), - this, SLOT(itemAction()) ); + connect( netList, TQT_SIGNAL(selectionChanged(TQListViewItem*)), + this, TQT_SLOT(updateConnectButton(TQListViewItem*)) ); + connect( netList, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint &, int)), + this, TQT_SLOT(itemAction()) ); buttonConnect->show(); } } -void WirelessAssistant::updateConnectButton(QListViewItem* lvi) +void WirelessAssistant::updateConnectButton(TQListViewItem* lvi) { - QToolTip::remove + TQToolTip::remove (buttonConnect); if ( lvi == connectedItem ) { buttonConnect->setText( i18n("&Disconnect") ); - QToolTip::add + TQToolTip::add ( buttonConnect, i18n("Disconnect from the selected network") ); } else { buttonConnect->setText( i18n("&Connect") ); - QToolTip::add + TQToolTip::add ( buttonConnect, i18n("Connect to the selected network") ); } } -void WirelessAssistant::setDev( const QString & ifname) +void WirelessAssistant::setDev( const TQString & ifname) { NetParams.iface = ifname; WATools::setInterface( ifname ); @@ -922,67 +922,67 @@ void WirelessAssistant::setDev( const QString & ifname) netScan(); } -QString WirelessAssistant::runCommand( const QStringList & cmd, int timeout, bool detached ) +TQString WirelessAssistant::runCommand( const TQStringList & cmd, int timeout, bool detached ) { if (cmd.isEmpty()) - return QString::null; + return TQString(); // a very basic and easy-to-workaround attepmt to restrict using dangerous commands via custom commands setting. This *REALLY* needs a working solution. - if ( cmd[0] == "rm" || cmd[0] == "mv" || cmd[0] == "cp" || cmd[0] == "ln" ) return QString::null; + if ( cmd[0] == "rm" || cmd[0] == "mv" || cmd[0] == "cp" || cmd[0] == "ln" ) return TQString(); - QProcess* p = new QProcess( this ); + TQProcess* p = new TQProcess( TQT_TQOBJECT(this) ); p->setArguments( cmd ); p->start(); if (detached) { p = 0; - return QString::null; + return TQString(); } - QTimer* timerProc = new QTimer(); //timeout timer + TQTimer* timerProc = new TQTimer(); //timeout timer if ( timeout>0 && !detached ) { - connect( timerProc, SIGNAL(timeout()), p, SLOT(kill()) ); + connect( timerProc, TQT_SIGNAL(timeout()), p, TQT_SLOT(kill()) ); timerProc->start(timeout*1000); //convert sec to msec } - connect(buttonClose, SIGNAL(clicked()), - p, SLOT(kill()) ); + connect(buttonClose, TQT_SIGNAL(clicked()), + p, TQT_SLOT(kill()) ); int i = 0; while ( p->isRunning() ) { // PROCESS USER EVENTS - KApplication::eventLoop()->processEvents( QEventLoop::AllEvents ); + KApplication::eventLoop()->processEvents( TQEventLoop::AllEvents ); usleep(75*1000); //75msec on Linux (75000msec on Windows...) if (i==27) { // ca 2sec have passed and the process is still running. Replace the 'Close' button with 'Stop'. - disconnect(buttonClose, SIGNAL(clicked()), - this, SLOT(close()) ); + disconnect(buttonClose, TQT_SIGNAL(clicked()), + this, TQT_SLOT(close()) ); buttonClose->setIconSet( SmallIconSet("stop") ); buttonClose->setText( i18n("&Stop") ); - QToolTip::remove + TQToolTip::remove (buttonClose); - QToolTip::add - ( buttonClose, i18n("Terminate current process\n(%1)").arg( p->arguments().join(" ") ) ); + TQToolTip::add + ( buttonClose, i18n("Terminate current process\n(%1)").tqarg( p->arguments().join(" ") ) ); } i++; } - disconnect(buttonClose, SIGNAL(clicked()), - p, SLOT(kill()) ); + disconnect(buttonClose, TQT_SIGNAL(clicked()), + p, TQT_SLOT(kill()) ); if (i>27) {//set 'stop' back to 'close' if needed - connect(buttonClose, SIGNAL(clicked()), - this, SLOT(close()) ); + connect(buttonClose, TQT_SIGNAL(clicked()), + this, TQT_SLOT(close()) ); buttonClose->setIconSet( SmallIconSet("fileclose") ); buttonClose->setText( i18n("&Quit") ); - QToolTip::remove + TQToolTip::remove (buttonClose); - QToolTip::add + TQToolTip::add ( buttonClose, i18n("Quit the application") ); } if (timerProc->isActive()) timerProc->stop(); delete timerProc; - QString e = QString( p->readStderr() ); - QString o = QString( p->readStdout() ); + TQString e = TQString( p->readStderr() ); + TQString o = TQString( p->readStdout() ); if (!p->normalExit()) { o.append("::ERR::killed"); //std::cout << "Process terminated (timed out)." << std::endl; //too much output when checking for internet when it's not available. @@ -1006,7 +1006,7 @@ void WirelessAssistant::setUi(int uiState) buttonScan->setEnabled( false ); buttonConnect->setEnabled( false ); buttonOptions->setEnabled( false ); - KApplication::setOverrideCursor( QCursor(Qt::BusyCursor) ); + KApplication::setOverrideCursor( TQCursor(TQt::BusyCursor) ); } else { if (devCombo->count() > 0) { devCombo->setEnabled( true ); @@ -1019,14 +1019,14 @@ void WirelessAssistant::setUi(int uiState) } } -void WirelessAssistant::showItemContextMenu( QListViewItem* i, const QPoint& p, int c ) +void WirelessAssistant::showItemContextMenu( TQListViewItem* i, const TQPoint& p, int c ) { if (!i) return; NetListViewItem *nvi = static_cast(i); - QString search = nvi->ap(); + TQString search = nvi->ap(); if (search == "any") search = nvi->essid(); bool isConfigured = setNetParamsFromConfig(search); @@ -1034,21 +1034,21 @@ void WirelessAssistant::showItemContextMenu( QListViewItem* i, const QPoint& p, icm->insertTitle(nvi->essid()); if (isConfigured) { if (nvi->isConnected()) { - icm->insertItem( SmallIcon("connect_no"), i18n("Disconnect..."), this, SLOT(netDisconnect()) ); - //icm->insertItem( SmallIcon("reload"), i18n("Reconnect"), this, SLOT(netConnect()) ); + icm->insertItem( SmallIcon("connect_no"), i18n("Disconnect..."), this, TQT_SLOT(netDisconnect()) ); + //icm->insertItem( SmallIcon("reload"), i18n("Reconnect"), this, TQT_SLOT(netConnect()) ); } else - icm->insertItem( SmallIcon("connect_creating"), i18n("Connect"), this, SLOT(netConnect()) ); + icm->insertItem( SmallIcon("connect_creating"), i18n("Connect"), this, TQT_SLOT(netConnect()) ); icm->insertSeparator(); - icm->insertItem(i18n("Forget Settings..."), this, SLOT(removeNetParams()) ); - icm->insertItem(i18n("Edit Settings..."), this, SLOT(editNetParams()) ); + icm->insertItem(i18n("Forget Settings..."), this, TQT_SLOT(removeNetParams()) ); + icm->insertItem(i18n("Edit Settings..."), this, TQT_SLOT(editNetParams()) ); } else { if (nvi->isConnected()) { - icm->insertItem( SmallIcon("connect_no"), i18n("Disconnect..."), this, SLOT(netDisconnect()) ); - //icm->insertItem( SmallIcon("reload"), i18n("Configure and Reconnect..."), this, SLOT(netConnect()) ); + icm->insertItem( SmallIcon("connect_no"), i18n("Disconnect..."), this, TQT_SLOT(netDisconnect()) ); + //icm->insertItem( SmallIcon("reload"), i18n("Configure and Reconnect..."), this, TQT_SLOT(netConnect()) ); } else - icm->insertItem( SmallIcon("connect_creating"), i18n("Configure and Connect..."), this, SLOT(netConnect()) ); + icm->insertItem( SmallIcon("connect_creating"), i18n("Configure and Connect..."), this, TQT_SLOT(netConnect()) ); } - icm->exec( QCursor::pos() ); + icm->exec( TQCursor::pos() ); } void WirelessAssistant::editNetParams() @@ -1059,9 +1059,9 @@ void WirelessAssistant::editNetParams() ui_NetParamsEdit *netedit = new ui_NetParamsEdit(); netedit->setValues( NetParams ); - netedit->setCaption( i18n("%1 Settings").arg(NetParams.essid) ); + netedit->setCaption( i18n("%1 Settings").tqarg(NetParams.essid) ); netedit->exec(); - if (netedit->result() == QDialog::Rejected) { + if (netedit->result() == TQDialog::Rejected) { delete netedit; return; } else { //accepted @@ -1081,16 +1081,16 @@ void WirelessAssistant::setNetListColumns() bool WirelessAssistant::dhcpClientRunning() { - QStringList pidPaths; - QString pidFile; + TQStringList pidPaths; + TQString pidFile; pidPaths << "/etc/" << "/etc/dhcpc/" << "/var/run/"; if ( Commands.dhcpClient=="dhcpcd" ) - pidFile = QString("dhcpcd-%1.pid").arg(NetParams.iface); + pidFile = TQString("dhcpcd-%1.pid").tqarg(NetParams.iface); else - pidFile = QString("dhclient.pid"); + pidFile = TQString("dhclient.pid"); - for ( QStringList::Iterator it = pidPaths.begin(); it != pidPaths.end(); ++it ) { - if ( QFile( QString(*it).append(pidFile) ).exists() ) { + for ( TQStringList::Iterator it = pidPaths.begin(); it != pidPaths.end(); ++it ) { + if ( TQFile( TQString(*it).append(pidFile) ).exists() ) { std::cout << "Running DHCP client found." << std::endl; return true; } @@ -1099,13 +1099,13 @@ bool WirelessAssistant::dhcpClientRunning() return false; } -QStringList WirelessAssistant::interfaceList() +TQStringList WirelessAssistant::interfaceList() { - QDir d("/sys/class/net"); - QStringList ifList = d.entryList( QDir::Dirs ); + TQDir d("/sys/class/net"); + TQStringList ifList = d.entryList( TQDir::Dirs ); ifList.remove("."); ifList.remove(".."); ifList.remove("lo"); std::cout << "All interfaces: " << ifList.join(", ") << std::endl; - for (QStringList::Iterator nps = ifList.begin(); nps != ifList.end(); nps++) { + for (TQStringList::Iterator nps = ifList.begin(); nps != ifList.end(); nps++) { const char* i = *nps; bool w = WATools::isWireless( i ); if ( !WATools::isWireless( (const char*)*nps ) ) { @@ -1115,18 +1115,18 @@ QStringList WirelessAssistant::interfaceList() return ifList; } -QString WirelessAssistant::getVal(const QString & str, const QString & rxs) +TQString WirelessAssistant::getVal(const TQString & str, const TQString & rxs) { - QRegExp rx(rxs); + TQRegExp rx(rxs); rx.search(str); return rx.cap(1).stripWhiteSpace(); } -bool WirelessAssistant::generateWpaConfigFile( const QString& essid, const QStringList& wpaSettings, const QString& wpaKey ) +bool WirelessAssistant::generateWpaConfigFile( const TQString& essid, const TQStringList& wpaSettings, const TQString& wpaKey ) { // 0 WPA version (1 or 2), 1 group, 2 pairwise, 3 suite - if ( wpaSettings.isEmpty() ) return QString(); - QString c = "ctrl_interface=/var/run/wpa_supplicant\nnetwork={\nscan_ssid=0\nssid=\""; //fast_reauth=1\n + if ( wpaSettings.isEmpty() ) return TQString(); + TQString c = "ctrl_interface=/var/run/wpa_supplicant\nnetwork={\nscan_ssid=0\nssid=\""; //fast_reauth=1\n c.append(essid).append("\"\n"); // WPA version @@ -1134,8 +1134,8 @@ bool WirelessAssistant::generateWpaConfigFile( const QString& essid, const QStri //WPA authentication suite c.append("key_mgmt="); - if ( wpaSettings[3].contains("PSK") ) c.append("WPA-PSK\n"); - else return QString(); // not supported + if ( wpaSettings[3].tqcontains("PSK") ) c.append("WPA-PSK\n"); + else return TQString(); // not supported //WPA pairwise cipher c.append("pairwise="); @@ -1146,7 +1146,7 @@ bool WirelessAssistant::generateWpaConfigFile( const QString& essid, const QStri c.append( wpaSettings[1] ).append("\n"); //WPA key - QString k = QString(); + TQString k = TQString(); if (wpaKey.left(2)=="s:") { // PASSPHRASE k.append("\""); k.append( wpaKey.right( wpaKey.length() - 2 ) ); @@ -1170,10 +1170,10 @@ bool WirelessAssistant::generateWpaConfigFile( const QString& essid, const QStri // psk=your_psk_here // } - QFile file( wpaConfigFile ); + TQFile file( wpaConfigFile ); if (file.exists()) file.remove(); if ( file.open( IO_WriteOnly ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); stream << c; file.close(); //std::cout << "Wrote WPA config: " << wpaConfigFile << std::endl; @@ -1182,42 +1182,42 @@ bool WirelessAssistant::generateWpaConfigFile( const QString& essid, const QStri return 0; } -bool WirelessAssistant::setWpaClientEnabled( bool e, const QString& iface, QString driver ) +bool WirelessAssistant::setWpaClientEnabled( bool e, const TQString& iface, TQString driver ) { if (!e) { - if ( runCommand( QStringList(Commands.wpa_cli) << QString("-i%1").arg(NetParams.iface) << "terminate" ).contains("OK") ) { - QFile( wpaConfigFile ).remove(); + if ( runCommand( TQStringList(Commands.wpa_cli) << TQString("-i%1").tqarg(NetParams.iface) << "terminate" ).tqcontains("OK") ) { + TQFile( wpaConfigFile ).remove(); return 1; } else return 0; // wpa client was not running. } - if ( !runCommand( QStringList(Commands.wpa_cli) << QString("-i%1").arg(NetParams.iface) << "status" ).contains("Failed to connect") ) { + if ( !runCommand( TQStringList(Commands.wpa_cli) << TQString("-i%1").tqarg(NetParams.iface) << "status" ).tqcontains("Failed to connect") ) { std::cout << "WPA client already running. Reconfiguring..." << std::endl; - runCommand( QStringList(Commands.wpa_cli) << "reconfigure" ); + runCommand( TQStringList(Commands.wpa_cli) << "reconfigure" ); } else { if ( driver.isEmpty() ) { //detect needed driver - QString k = WATools::kernelModule( iface ); - if ( k.contains("hermes") ) driver = "hermes"; - else if ( k.contains("atmel") ) driver = "atmel"; + TQString k = WATools::kernelModule( iface ); + if ( k.tqcontains("hermes") ) driver = "hermes"; + else if ( k.tqcontains("atmel") ) driver = "atmel"; #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13) - else if ( k.contains("ipw") ) driver = "ipw"; //wext should be used for kernels newer than 2.6.12 + else if ( k.tqcontains("ipw") ) driver = "ipw"; //wext should be used for kernels newer than 2.6.12 #endif //Commented out, because ndiswrapper newer than 1.13 works with wext driver. - //else if ( k.contains("ndiswrapper") ) driver = "ndiswrapper"; + //else if ( k.tqcontains("ndiswrapper") ) driver = "ndiswrapper"; //Commented out, because madwifi-ng works with wext driver. - //else if ( k.contains("ath") ) driver = "madwifi"; + //else if ( k.tqcontains("ath") ) driver = "madwifi"; else driver = "wext"; std::cout << "Using wpa_supplicant driver: " << driver << std::endl; } - QProcess* wp = new QProcess( this ); + TQProcess* wp = new TQProcess( TQT_TQOBJECT(this) ); wp->clearArguments(); wp->addArgument( Commands.wpa_supplicant ); wp->addArgument( "-W" ); //wait for control interface - wp->addArgument( QString("-D%1").arg(driver) ); - wp->addArgument( QString("-i%1").arg(iface) ); - wp->addArgument( QString("-c%1").arg(wpaConfigFile) ); + wp->addArgument( TQString("-D%1").tqarg(driver) ); + wp->addArgument( TQString("-i%1").tqarg(iface) ); + wp->addArgument( TQString("-c%1").tqarg(wpaConfigFile) ); //std::cout << "Starting WPA client: " << wp->arguments().join(" ") << std::endl; if ( !wp->start() ) { std::cout << "Failed to start WPA client." << std::endl; @@ -1229,19 +1229,19 @@ bool WirelessAssistant::setWpaClientEnabled( bool e, const QString& iface, QStri usleep(200*1000); //200msec for wpa_supplicant to initiate - QString o; + TQString o; int i = 0; - while ( !(o =runCommand( QStringList(Commands.wpa_cli) << QString("-i%1").arg(NetParams.iface) << "status" )).contains("Failed to connect") ) { + while ( !(o =runCommand( TQStringList(Commands.wpa_cli) << TQString("-i%1").tqarg(NetParams.iface) << "status" )).tqcontains("Failed to connect") ) { for (int c = 0; c < 15; c++) { usleep(75*1000); //75msec - KApplication::eventLoop()->processEvents( QEventLoop::AllEvents ); + KApplication::eventLoop()->processEvents( TQEventLoop::AllEvents ); i++; } if (i>400) { //more than 30sec have passed - runCommand( QStringList(Commands.wpa_cli) << QString("-i%1").arg(NetParams.iface) << "terminate" ); + runCommand( TQStringList(Commands.wpa_cli) << TQString("-i%1").tqarg(NetParams.iface) << "terminate" ); return 0; } - if ( o.contains("wpa_state=COMPLETED") ) { + if ( o.tqcontains("wpa_state=COMPLETED") ) { std::cout << "WPA Authorisation successful." << std::endl; return 1; } @@ -1257,7 +1257,7 @@ bool WirelessAssistant::close() std::cout << "Application options saved." << std::endl; WATools::cleanup(); std::cout << "Kernel socket closed." << std::endl; - return QWidget::close(); + return TQWidget::close(); } diff --git a/src/wlassistant.h b/src/wlassistant.h index 64cd048..388935a 100644 --- a/src/wlassistant.h +++ b/src/wlassistant.h @@ -29,20 +29,21 @@ #include "netparams.h" -class QTimer; -class QProcess; +class TQTimer; +class TQProcess; class NetListViewItem; class WirelessAssistant : public mainWindow { Q_OBJECT + TQ_OBJECT public: /*$PUBLIC_FUNCTIONS$*/ - WirelessAssistant(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + WirelessAssistant(TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~WirelessAssistant(); - static QString getVal(const QString & str, const QString & rxs); + static TQString getVal(const TQString & str, const TQString & rxs); public slots: /*$PUBLIC_SLOTS$*/ @@ -58,24 +59,24 @@ private: void saveSettings(); void setUi(int uiState); void setSingleClick(bool i); - QString runCommand( const QStringList & cmd, int timeout = 0, bool detached = 0 ); - void setNetParamsFromList( QListViewItem* lvi ); - bool setNetParamsFromConfig( const QString & s ); - QString matchEssidForAp( const QString & ap ); + TQString runCommand( const TQStringList & cmd, int timeout = 0, bool detached = 0 ); + void setNetParamsFromList( TQListViewItem* lvi ); + bool setNetParamsFromConfig( const TQString & s ); + TQString matchEssidForAp( const TQString & ap ); bool radioEnabled(); - QListViewItem* getItemByAp( const QString & ap ); - QListViewItem* getItemByEssid( const QString & essid ); - void setConnectedItem( const QString & netid ); - QString getGateway(); + TQListViewItem* getItemByAp( const TQString & ap ); + TQListViewItem* getItemByEssid( const TQString & essid ); + void setConnectedItem( const TQString & netid ); + TQString getGateway(); bool dhcpClientRunning(); - QStringList interfaceList(); - bool generateWpaConfigFile( const QString& essid, const QStringList& wpaSettings, const QString& wpaKey ); - bool setWpaClientEnabled( bool e, const QString& iface = 0, QString driver = 0 ); + TQStringList interfaceList(); + bool generateWpaConfigFile( const TQString& essid, const TQStringList& wpaSettings, const TQString& wpaKey ); + bool setWpaClientEnabled( bool e, const TQString& iface = 0, TQString driver = 0 ); - QStringList NetParamsList; - QStringList execsNotFound; + TQStringList NetParamsList; + TQStringList execsNotFound; NetListViewItem* connectedItem; - QString wpaConfigFile; + TQString wpaConfigFile; /// settings saved in wlassistantrc bool autoQuit; bool autoReconnect; @@ -84,33 +85,33 @@ private: bool wpaAvailable; int DelayBeforeScanning; int DhcpTimeout; - /*QString dhcpcdInfoPath; - QString dhclientInfoPath; - QString dhcpcdPidPath; - QString dhclientPidPath;*/ + /*TQString dhcpcdInfoPath; + TQString dhclientInfoPath; + TQString dhcpcdPidPath; + TQString dhclientPidPath;*/ /// end settings. WACommands Commands; WANetParams NetParams; - QTimer* timerGui; - QTimer* timerConnectionCheck; + TQTimer* timerGui; + TQTimer* timerConnectionCheck; protected slots: /*$PROTECTED_SLOTS$*/ virtual void init(); virtual void netAutoConnect(); - virtual void parseScan( const QString & output ); - virtual void setDev( const QString & ifname); + virtual void parseScan( const TQString & output ); + virtual void setDev( const TQString & ifname); virtual void setNetListColumns(); virtual void updateConfiguration(int category = -1); virtual void updateConnectedItem(); - virtual void showItemContextMenu( QListViewItem* i, const QPoint& p, int c); + virtual void showItemContextMenu( TQListViewItem* i, const TQPoint& p, int c); virtual void editNetParams(); virtual void removeNetParams(); virtual void updateNetParams(); virtual void itemAction(); - virtual void checkConnectionStatus(); - virtual void updateConnectButton(QListViewItem* lvi); + virtual void checkConnectiontqStatus(); + virtual void updateConnectButton(TQListViewItem* lvi); virtual void setMouseBehaviour(); virtual void togglePage(bool options ); virtual void enableAllMessages();