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
v3.5.13-sru
tpearson 13 years ago
parent 2e4e9860d4
commit 2f791ecf18

@ -32,7 +32,7 @@ def KDEuse(lenv, flags):
if 'thread' in _flags: if 'thread' in _flags:
## Uncomment the following if you need threading support ## Uncomment the following if you need threading support
lenv.KDEaddflags_cxx( ['-DQT_THREAD_SUPPORT', '-D_REENTRANT'] ) lenv.KDEaddflags_cxx( ['-DQT_THREAD_SUPPORT', '-D_REENTRANT'] )
if 'fastmoc' in _flags: if 'fasmoc' in _flags:
lenv['BKSYS_FASTMOC']=1 lenv['BKSYS_FASTMOC']=1
if 'dump' in _flags: if 'dump' in _flags:
lenv['DUMPCONFIG']=1 lenv['DUMPCONFIG']=1
@ -109,40 +109,40 @@ def detect_kde(env):
p('GREEN',kde_version) p('GREEN',kde_version)
## Detect the qt library ## Detect the qt library
print "Checking for the qt library : ", print "Checking for the tqt library : ",
if not qtdir: qtdir = os.getenv("QTDIR") if not qtdir: qtdir = os.getenv("QTDIR")
if qtdir: if qtdir:
p('GREEN',"qt is in "+qtdir) p('GREEN',"tqt is in "+qtdir)
else: else:
try: try:
tmplibdir = os.popen(kde_config+' --expandvars --install lib').read().strip() tmplibdir = os.popen(kde_config+' --expandvars --install lib').read().strip()
libkdeuiSO = env.join(tmplibdir, getSOfromLA(env.join(tmplibdir,'/libkdeui.la')) ) 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 except: m=None
if m: if m:
qtdir = m.group(1) qtdir = m.group(1)
p('YELLOW',"qt was found as "+m.group(1)) p('YELLOW',"tqt was found as "+m.group(1))
else: else:
p('RED','qt was not found') p('RED','tqt was not found')
p('RED','Please set QTDIR first (/usr/lib/qt3?) or try scons -h for more options') p('RED','Please set QTDIR first (/usr/lib/tqt?) or try scons -h for more options')
env.Exit(1) env.Exit(1)
env['QTDIR'] = qtdir.strip() env['QTDIR'] = qtdir.strip()
## Find the necessary programs uic and moc ## Find the necessary programs uic and moc
print "Checking for uic : ", print "Checking for uic : ",
uic = qtdir + "/bin/uic" uic = qtdir + "/bin/uic-tqt"
if os.path.isfile(uic): if os.path.isfile(uic):
p('GREEN',"uic was found as "+uic) p('GREEN',"uic-tqt was found as "+uic)
else: 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): if len(uic):
p('YELLOW',"uic was found as "+uic) p('YELLOW',"uic-tqt was found as "+uic)
else: 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): if len(uic):
p('YELLOW',"uic was found as "+uic) p('YELLOW',"uic-tqt was found as "+uic)
else: 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.Exit(1)
env['QT_UIC'] = uic env['QT_UIC'] = uic
@ -162,22 +162,25 @@ def detect_kde(env):
env.Exit(1) env.Exit(1)
env['QT_MOC'] = moc env['QT_MOC'] = moc
## check for the qt and kde includes ## check for the tqt and kde includes
print "Checking for the qt includes : ", print "Checking for the tqt includes : ",
if qtincludes and os.path.isfile(qtincludes + "/qlayout.h"): if qtincludes and os.path.isfile(qtincludes + "/tqt.h"):
# The user told where to look for and it looks valid # The user told where to look for and it looks valid
p('GREEN',"ok "+qtincludes) p('GREEN',"ok "+qtincludes)
else: else:
if os.path.isfile(qtdir + "/include/qlayout.h"): if os.path.isfile(qtdir + "/include/tqt.h"):
# Automatic detection # Automatic detection
p('GREEN',"ok "+qtdir+"/include/") p('GREEN',"ok "+qtdir+"/include/")
qtincludes = 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 # Debian probably
p('YELLOW','the qt headers were found in /usr/include/qt3/') p('YELLOW','the qt headers were found in /usr/include/tqt/')
qtincludes = "/usr/include/qt3" qtincludes = "/usr/include/tqt"
else: else:
p('RED',"the qt headers were not found") p('RED',"the tqt headers were not found")
env.Exit(1) env.Exit(1)
print "Checking for the kde includes : ", print "Checking for the kde includes : ",
@ -336,7 +339,7 @@ def generate(env):
opts.Save(cachefile, env) opts.Save(cachefile, env)
## set default variables, one can override them in sconscript files ## 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'] ]) LIBPATH = [env['KDELIBPATH'], env['QTLIBPATH'] ])
env['QT_AUTOSCAN'] = 1 env['QT_AUTOSCAN'] = 1

@ -2,7 +2,7 @@
<bksys version="2"> <bksys version="2">
<compile type="program" dirprefix="src" <compile type="program" dirprefix="src"
target="wlassistant" target="wlassistant"
libs="kdeui qt-mt iw"> libs="kdeui tqt iw">
<source file="main.cpp"/> <source file="main.cpp"/>
<source file="netlistviewitem.cpp"/> <source file="netlistviewitem.cpp"/>
<source file="ui_NetParamsEdit.ui"/> <source file="ui_NetParamsEdit.ui"/>

@ -20,7 +20,7 @@ wlassistant.cpp
""" """
obj.cxxflags='-DQT_THREAD_SUPPORT' obj.cxxflags='-DQT_THREAD_SUPPORT'
obj.libs='qt-mt kdecore kdeui iw' obj.libs='tqt kdecore kdeui iw'
obj.execute() obj.execute()
#env.KDEinstall( 'KDEMENU', 'Utilities', 'wlassistant.desktop' ) #env.KDEinstall( 'KDEMENU', 'Utilities', 'wlassistant.desktop' )

@ -47,7 +47,7 @@ int main(int argc, char **argv)
KApplication app; KApplication app;
WirelessAssistant *mainWin = 0; WirelessAssistant *mainWin = 0;
mainWin = new WirelessAssistant(); mainWin = new WirelessAssistant();
mainWin->setCaption( QString("%1 %2").arg(description).arg(version) ); mainWin->setCaption( TQString("%1 %2").tqarg(description).tqarg(version) );
app.setMainWidget( mainWin ); app.setMainWidget( mainWin );
mainWin->show(); mainWin->show();

@ -26,22 +26,22 @@
#include <kiconeffect.h> #include <kiconeffect.h>
#include <kdeversion.h> #include <kdeversion.h>
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); /// HACK fixes: higher item (connected) is drawn using regular height upon widget change (widgetStack);
if ( height()!=mHeight ) if ( height()!=mHeight )
setHeight( mHeight ); setHeight( mHeight );
/// PREPARE COLORS /// /// PREPARE COLORS ///
QColor bgColor, fgColor; TQColor bgColor, fgColor;
/// colors of selected item /// colors of selected item
if ( listView()->isSelected(this) ) { if ( listView()->isSelected(this) ) {
bgColor = cg.color( QColorGroup::Highlight ); /// settings for selected item; bgColor = cg.color( TQColorGroup::Highlight ); /// settings for selected item;
fgColor = cg.color( QColorGroup::HighlightedText ); fgColor = cg.color( TQColorGroup::HighlightedText );
/// colors of deselected item` /// colors of deselected item`
} else { } else {
if (mConnected) if (mConnected)
bgColor = cg.color( QColorGroup::Background); bgColor = cg.color( TQColorGroup::Background);
else { else {
#if KDE_IS_VERSION(3,4,0) #if KDE_IS_VERSION(3,4,0)
bgColor = ((KListViewItem*)this)->backgroundColor(column); bgColor = ((KListViewItem*)this)->backgroundColor(column);
@ -51,7 +51,7 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column,
#endif #endif
} }
fgColor = cg.color( QColorGroup::Text); fgColor = cg.color( TQColorGroup::Text);
if (mQuality<8) if (mQuality<8)
fgColor = fgColor.light(); fgColor = fgColor.light();
} }
@ -66,10 +66,10 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column,
switch (column) { switch (column) {
/// DRAW QUALITY /// /// DRAW TQUALITY ///
case mQualityColumn: { case mQualityColumn: {
QPixmap qualityIcon = SmallIcon("knewstuff"); TQPixmap qualityIcon = SmallIcon("knewstuff");
QPixmap qualityIconGray = KIconEffect().apply( qualityIcon, KIconEffect::ToGray, 1, Qt::black, true ); TQPixmap qualityIconGray = KIconEffect().apply( qualityIcon, KIconEffect::ToGray, 1, TQt::black, true );
int barWidth = int(mQuality/8)*8; int barWidth = int(mQuality/8)*8;
if (mQuality>0) if (mQuality>0)
barWidth+=8; //add 8 (half a star) b/c int rounds down. 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) { if (mEnc) {
int icoTop = int( ( this->height()-16 )/2 ); int icoTop = int( ( this->height()-16 )/2 );
int icoLeft = int( ( width-listView()->itemMargin()-16 )/2 ); int icoLeft = int( ( width-listView()->itemMargin()-16 )/2 );
QPixmap encIcon = SmallIcon("encrypted"); TQPixmap encIcon = SmallIcon("encrypted");
p->drawPixmap(icoLeft,icoTop, encIcon ); p->drawPixmap(icoLeft,icoTop, encIcon );
} }
break; break;
@ -96,13 +96,13 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column,
case mEssidColumn: { case mEssidColumn: {
/// draw icon and its shadow. /// draw icon and its shadow.
if (mConnected) { if (mConnected) {
QPixmap connectedIcon; TQPixmap connectedIcon;
connectedIcon = SmallIcon("forward"); connectedIcon = SmallIcon("forward");
int icoTop = int( ( this->height()-16 )/2 ); int icoTop = int( ( this->height()-16 )/2 );
p->drawPixmap(listView()->itemMargin(),icoTop, connectedIcon ); p->drawPixmap(listView()->itemMargin(),icoTop, connectedIcon );
} }
QFont mFont = listView()->font(); TQFont mFont = listView()->font();
if (mConnected) if (mConnected)
mFont.setBold( true ); mFont.setBold( true );
if (mHidden) if (mHidden)
@ -127,7 +127,7 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column,
/// DRAW CHANNEL /// /// DRAW CHANNEL ///
case mChanColumn: { case mChanColumn: {
QFont mFont = listView()->font(); TQFont mFont = listView()->font();
mFont.setItalic(true); mFont.setItalic(true);
if (mConnected) if (mConnected)
mFont.setBold( true ); mFont.setBold( true );
@ -145,7 +145,7 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column,
} }
/// DRAW ACCESS POINT /// /// DRAW ACCESS POINT ///
case mAPColumn: { case mAPColumn: {
QFont mFont = listView()->font(); TQFont mFont = listView()->font();
if (mHidden) if (mHidden)
mFont.setItalic( true ); mFont.setItalic( true );
if (mConnected) if (mConnected)
@ -165,20 +165,20 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column,
} }
default: default:
KListViewItem::paintCell(p, cg, column, width, alignment); KListViewItem::paintCell(p, cg, column, width, tqalignment);
} //switch } //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; int w;
QFont mFont = listView()->font(); TQFont mFont = listView()->font();
if (mConnected) if (mConnected)
mFont.setBold(true); mFont.setBold(true);
if (mHidden) if (mHidden)
mFont.setItalic(true); mFont.setItalic(true);
QFontMetrics mFm( mFont ); TQFontMetrics mFm( mFont );
if (column == mQualityColumn) if (column == mQualityColumn)
w = 6*16 + (lv->itemMargin()*2); w = 6*16 + (lv->itemMargin()*2);
@ -203,7 +203,7 @@ int NetListViewItem::width(const QFontMetrics &fm, const QListView *lv, int colu
return w; 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 (mConnected) { // make sure that connected item is always 1st.
if (ascending) if (ascending)
@ -211,9 +211,9 @@ QString NetListViewItem::key( int column, bool ascending ) const
else else
return "ZZZ"; return "ZZZ";
} }
QString t = QString::null; TQString t = TQString();
if (column == mQualityColumn) { if (column == mQualityColumn) {
t = QString::number( mQuality ); t = TQString::number( mQuality );
if (mQuality < 10) if (mQuality < 10)
t.prepend("0"); t.prepend("0");
} else if (column == mEncColumn) { } else if (column == mEncColumn) {

@ -23,7 +23,7 @@
#include <iostream> #include <iostream>
#include <qpainter.h> #include <tqpainter.h>
#include <klistview.h> #include <klistview.h>
#include <kmessagebox.h> #include <kmessagebox.h>
@ -31,11 +31,11 @@
class NetListViewItem : public KListViewItem class NetListViewItem : public KListViewItem
{ {
public: public:
//NetListViewItem(KListView *parent) : KListViewItem(parent) {} //NetListViewItem(KListView *tqparent) : KListViewItem(tqparent) {}
//NetListViewItem(KListView *parent, KListViewItem *after) : KListViewItem(parent, after) {} //NetListViewItem(KListView *tqparent, KListViewItem *after) : KListViewItem(tqparent, after) {}
//NetListViewItem(KListView *parent, KListViewItem *after, QString essid, QString mode) : KListViewItem(parent, after, essid, mode) {} //NetListViewItem(KListView *tqparent, KListViewItem *after, TQString essid, TQString mode) : KListViewItem(tqparent, after, essid, mode) {}
NetListViewItem(KListView *parent, QString essid, QString chan, int quality, bool enc, QString ap, bool hidden, bool connected = 0 ) NetListViewItem(KListView *tqparent, TQString essid, TQString chan, int quality, bool enc, TQString ap, bool hidden, bool connected = 0 )
: KListViewItem(parent, QString::null, QString::null, QString::null, QString::null, QString::null) : KListViewItem(tqparent, TQString(), TQString(), TQString(), TQString(), TQString())
{ {
mEssid = essid; mEssid = essid;
mChannel = chan; mChannel = chan;
@ -46,38 +46,38 @@ public:
mHidden = hidden; mHidden = hidden;
mConnected = connected; mConnected = connected;
mHeight = height(); mHeight = height();
mWpaSettings = QStringList(); mWpaSettings = TQStringList();
} }
~NetListViewItem() ~NetListViewItem()
{} {}
void setEssid(const QString& theValue) void setEssid(const TQString& theValue)
{ {
mEssid = theValue; mEssid = theValue;
setText(mEssidColumn, mEssid); setText(mEssidColumn, mEssid);
//update(); //update();
} }
QString essid() const TQString essid() const
{ {
return mEssid; 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; mChannel = theValue;
repaint(); tqrepaint();
} }
} }
QString channel() const TQString channel() const
{ {
return mChannel; return mChannel;
} }
/*QString mode() const /*TQString mode() const
{ {
return mMode; return mMode;
}*/ }*/
@ -87,12 +87,12 @@ public:
return mEnc; return mEnc;
} }
QString ap() const TQString ap() const
{ {
return mAP; return mAP;
} }
void setAp(const QString& ap) { void setAp(const TQString& ap) {
mAP = ap; mAP = ap;
setText(mAPColumn, mAP); setText(mAPColumn, mAP);
} }
@ -111,7 +111,7 @@ public:
mHeight-=10; mHeight-=10;
} }
setHeight( mHeight ); setHeight( mHeight );
repaint(); tqrepaint();
} }
@ -122,9 +122,9 @@ public:
void setQuality(const int& theValue) 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; mQuality = theValue;
repaint(); tqrepaint();
} else } else
mQuality = theValue; mQuality = theValue;
} }
@ -134,13 +134,13 @@ public:
return mQuality; return mQuality;
} }
void setWpaSettings(const QStringList& theValue) void setWpaSettings(const TQStringList& theValue)
{ {
mWpaSettings = theValue; mWpaSettings = theValue;
} }
QStringList wpaSettings() const TQStringList wpaSettings() const
{ {
return mWpaSettings; return mWpaSettings;
} }
@ -150,20 +150,20 @@ public:
private: private:
virtual void paintCell (QPainter *p, const QColorGroup &cg, int column, int width, int alignment); virtual void paintCell (TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment);
virtual int width(const QFontMetrics &fm, const QListView *lv, int column) const; virtual int width(const TQFontMetrics &fm, const TQListView *lv, int column) const;
virtual QString key( int column, bool ascending ) const; virtual TQString key( int column, bool ascending ) const;
QString mEssid; TQString mEssid;
QString mChannel; TQString mChannel;
//QString mMode; //TQString mMode;
int mQuality; int mQuality;
bool mEnc; bool mEnc;
QString mAP; TQString mAP;
bool mHidden; bool mHidden;
bool mConnected; bool mConnected;
int mHeight; int mHeight;
QStringList mWpaSettings; TQStringList mWpaSettings;
static const int mEssidColumn = 0; static const int mEssidColumn = 0;
static const int mChanColumn = 1; static const int mChanColumn = 1;

@ -22,42 +22,42 @@
#define WA_NETPARAMS_H #define WA_NETPARAMS_H
#include <iostream> #include <iostream>
#include <qfile.h> #include <tqfile.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <klocale.h> #include <klocale.h>
class WANetParams class WANetParams
{ {
public: public:
QString iface; TQString iface;
QString essid; TQString essid;
//QString mode; //TQString mode;
QString channel; TQString channel;
QString ap; TQString ap;
bool wep; bool wep;
QString wepMode; TQString wepMode;
QString wepKey; TQString wepKey;
bool wpa; bool wpa;
QStringList wpaSettings; TQStringList wpaSettings;
QString wpaKey; TQString wpaKey;
bool dhcp; bool dhcp;
QString ip; TQString ip;
QString netmask; TQString nettqmask;
QString broadcast; TQString broadcast;
QString gateway; TQString gateway;
QString domain; TQString domain;
QString dns1; TQString dns1;
QString dns2; TQString dns2;
bool hiddenEssid; bool hiddenEssid;
bool wasHiddenEssid; bool wasHiddenEssid;
bool wasWep; bool wasWep;
QString preConnectionCommand; TQString preConnectionCommand;
QString postConnectionCommand; TQString postConnectionCommand;
QString preDisconnectionCommand; TQString preDisconnectionCommand;
QString postDisconnectionCommand; TQString postDisconnectionCommand;
int preConnectionTimeout; int preConnectionTimeout;
int postConnectionTimeout; int postConnectionTimeout;
int preDisconnectionTimeout; int preDisconnectionTimeout;
@ -79,7 +79,7 @@ public:
r = true; r = true;
} }
if ( (hiddenEssid) && (!wasHiddenEssid) ) if ( (hiddenEssid) && (!wasHiddenEssid) )
if ( KMessageBox::questionYesNo(0, i18n("<qt><p>The network has stopped broadcasting its ESSID since the last time you were connected.</p><p>Would you like to use '<b>%1</b>' as an ESSID for this network?</p><p><i>NOTE: If you answer No, a dialog will appear where you will be able to specify a different ESSID.</i></p></qt>").arg(essid) ) != 3 ) // !=YES if ( KMessageBox::questionYesNo(0, i18n("<qt><p>The network has stopped broadcasting its ESSID since the last time you were connected.</p><p>Would you like to use '<b>%1</b>' as an ESSID for this network?</p><p><i>NOTE: If you answer No, a dialog will appear where you will be able to specify a different ESSID.</i></p></qt>").tqarg(essid) ) != 3 ) // !=YES
r = true; r = true;
wasHiddenEssid = hiddenEssid; wasHiddenEssid = hiddenEssid;
@ -87,19 +87,19 @@ public:
return r; return r;
} }
QString netParamsString() TQString netParamsString()
{ {
QStringList mNPS; TQStringList mNPS;
mNPS << boolToString(hiddenEssid) << essid << ap << channel << boolToString(wep) << wepMode << wepKey << boolToString(dhcp) << ip << netmask << broadcast << gateway << domain << dns1 << dns2 << boolToString(wasHiddenEssid) << boolToString(wasWep) << \ mNPS << boolToString(hiddenEssid) << essid << ap << channel << boolToString(wep) << wepMode << wepKey << boolToString(dhcp) << ip << nettqmask << broadcast << gateway << domain << dns1 << dns2 << boolToString(wasHiddenEssid) << boolToString(wasWep) << \
preConnectionCommand << QString::number(preConnectionTimeout) << boolToString(preConnectionDetached) << \ preConnectionCommand << TQString::number(preConnectionTimeout) << boolToString(preConnectionDetached) << \
postConnectionCommand << QString::number(postConnectionTimeout) << boolToString(postConnectionDetached) << \ postConnectionCommand << TQString::number(postConnectionTimeout) << boolToString(postConnectionDetached) << \
preDisconnectionCommand << QString::number(preDisconnectionTimeout) << boolToString(preDisconnectionDetached) << \ preDisconnectionCommand << TQString::number(preDisconnectionTimeout) << boolToString(preDisconnectionDetached) << \
postDisconnectionCommand << QString::number(postDisconnectionTimeout) << boolToString(postDisconnectionDetached) << \ postDisconnectionCommand << TQString::number(postDisconnectionTimeout) << boolToString(postDisconnectionDetached) << \
wpaSettings.join(",") << wpaKey; wpaSettings.join(",") << wpaKey;
return mNPS.join(","); return mNPS.join(",");
} }
void loadNetParamsString( const QString & nps ) void loadNetParamsString( const TQString & nps )
{ {
/*if (nps.section(",",0,0)=="true") /*if (nps.section(",",0,0)=="true")
hiddenEssid=true; hiddenEssid=true;
@ -116,7 +116,7 @@ public:
wepKey = nps.section(",",6,6); wepKey = nps.section(",",6,6);
dhcp = ( nps.section(",",7,7) == "true" ); dhcp = ( nps.section(",",7,7) == "true" );
ip = nps.section(",",8,8); ip = nps.section(",",8,8);
netmask = nps.section(",",9,9); nettqmask = nps.section(",",9,9);
broadcast = nps.section(",",10,10); broadcast = nps.section(",",10,10);
gateway = nps.section(",",11,11); gateway = nps.section(",",11,11);
domain = nps.section(",",12,12); domain = nps.section(",",12,12);
@ -140,14 +140,14 @@ public:
postDisconnectionCommand = nps.section(",",26,26); postDisconnectionCommand = nps.section(",",26,26);
postDisconnectionTimeout = nps.section(",",27,27).toInt(); postDisconnectionTimeout = nps.section(",",27,27).toInt();
postDisconnectionDetached = ( nps.section(",",28,28) == "true" ); 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); wpaKey = nps.section(",",33,33);
} }
private: private:
QString boolToString( bool b ) TQString boolToString( bool b )
{ {
QString result; TQString result;
b ? result = "true" : result = "false"; b ? result = "true" : result = "false";
return result; return result;
} }
@ -157,11 +157,11 @@ class WACommands
{ {
public: public:
bool allFound; bool allFound;
QStringList notFound; TQStringList notFound;
void init() void init()
{ {
QStringList binDirs; TQStringList binDirs;
binDirs << "/sbin" << "/usr/sbin" << "/usr/local/sbin" << "/bin" << "/usr/bin" << "/usr/local/bin"; binDirs << "/sbin" << "/usr/sbin" << "/usr/local/sbin" << "/bin" << "/usr/bin" << "/usr/local/bin";
wpa_supplicant = getPath("wpa_supplicant", binDirs); wpa_supplicant = getPath("wpa_supplicant", binDirs);
@ -187,9 +187,9 @@ public:
std::cout << "All executables found." << std::endl; 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") /*if (action=="ifup")
mCmd << ifconfig << np.iface << "up"; mCmd << ifconfig << np.iface << "up";
@ -234,8 +234,8 @@ public:
} else if (action=="ifconfig_manual") { } else if (action=="ifconfig_manual") {
mCmd << ifconfig << np.iface << np.ip; mCmd << ifconfig << np.iface << np.ip;
if (!np.netmask.isEmpty()) if (!np.nettqmask.isEmpty())
mCmd << "netmask" << np.netmask; mCmd << "nettqmask" << np.nettqmask;
if (!np.broadcast.isEmpty()) if (!np.broadcast.isEmpty())
mCmd << "broadcast" << np.broadcast; mCmd << "broadcast" << np.broadcast;
@ -250,31 +250,31 @@ public:
} else } else
std::cout << "Unknown action: " << action << std::endl; std::cout << "Unknown action: " << action << std::endl;
if ( (!mCmd.isEmpty()) && (!quiet) ) {//mCmd = QStringList(); if ( (!mCmd.isEmpty()) && (!quiet) ) {//mCmd = TQStringList();
QString mCmdString = mCmd.join(" "); TQString mCmdString = mCmd.join(" ");
if (!np.wepKey.isEmpty()) mCmdString.replace(np.wepKey, "xxxxxxxxxx"); if (!np.wepKey.isEmpty()) mCmdString.tqreplace(np.wepKey, "xxxxxxxxxx");
std::cout << action << ": " << mCmdString << std::endl; std::cout << action << ": " << mCmdString << std::endl;
} }
return mCmd; return mCmd;
} }
QString route; TQString route;
QString dhcpClient; TQString dhcpClient;
QString wpa_supplicant; TQString wpa_supplicant;
QString wpa_cli; TQString wpa_cli;
private: private:
QString ifconfig; TQString ifconfig;
QString iwconfig; TQString iwconfig;
QString iwlist; TQString iwlist;
QString dhcp; TQString dhcp;
QString pidof; TQString pidof;
QString getPath(QString file, QStringList dirs) TQString getPath(TQString file, TQStringList dirs)
{ {
QString s; TQString s;
for ( QStringList::Iterator it = dirs.begin(); it != dirs.end(); it++ ) { for ( TQStringList::Iterator it = dirs.begin(); it != dirs.end(); it++ ) {
if (QFile( QString(*it+"/"+file) ).exists()) { if (TQFile( TQString(*it+"/"+file) ).exists()) {
s = QString(*it+"/"+file); s = TQString(*it+"/"+file);
break; break;
} }
} }

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>netProperties</class> <class>netProperties</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>netProperties</cstring> <cstring>netProperties</cstring>
</property> </property>
@ -36,7 +36,7 @@
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<widget class="QLayoutWidget" row="1" column="0"> <widget class="TQLayoutWidget" row="1" column="0">
<property name="name"> <property name="name">
<cstring>Layout1</cstring> <cstring>Layout1</cstring>
</property> </property>
@ -50,7 +50,7 @@
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonHelp</cstring> <cstring>buttonHelp</cstring>
</property> </property>
@ -74,14 +74,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonOk</cstring> <cstring>buttonOk</cstring>
</property> </property>
@ -98,7 +98,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonCancel</cstring> <cstring>buttonCancel</cstring>
</property> </property>
@ -114,11 +114,11 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QTabWidget" row="0" column="0"> <widget class="TQTabWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>tabNetParams</cstring> <cstring>tabNetParams</cstring>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tabInterface</cstring> <cstring>tabInterface</cstring>
</property> </property>
@ -129,7 +129,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>boxEssid</cstring> <cstring>boxEssid</cstring>
</property> </property>
@ -148,7 +148,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -156,14 +156,14 @@
<string>ESSID:</string> <string>ESSID:</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>essid</cstring> <cstring>essid</cstring>
</property> </property>
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QButtonGroup"> <widget class="TQButtonGroup">
<property name="name"> <property name="name">
<cstring>buttonGroup1</cstring> <cstring>buttonGroup1</cstring>
</property> </property>
@ -182,15 +182,15 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout3</cstring> <cstring>tqlayout3</cstring>
</property> </property>
<vbox> <vbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>radioDhcp</cstring> <cstring>radioDhcp</cstring>
</property> </property>
@ -198,7 +198,7 @@
<string>Automatic (DHCP)</string> <string>Automatic (DHCP)</string>
</property> </property>
</widget> </widget>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>radioManualConfig</cstring> <cstring>radioManualConfig</cstring>
</property> </property>
@ -208,7 +208,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QFrame"> <widget class="TQFrame">
<property name="name"> <property name="name">
<cstring>boxManualConfig</cstring> <cstring>boxManualConfig</cstring>
</property> </property>
@ -222,30 +222,30 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLineEdit" row="2" column="1"> <widget class="TQLineEdit" row="2" column="1">
<property name="name"> <property name="name">
<cstring>netmask</cstring> <cstring>nettqmask</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>textLabel4</cstring> <cstring>textLabel4</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Netmask:</string> <string>Nettqmask:</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="0" column="1"> <widget class="TQLineEdit" row="0" column="1">
<property name="name"> <property name="name">
<cstring>ip</cstring> <cstring>ip</cstring>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="4" column="1"> <widget class="TQLineEdit" row="4" column="1">
<property name="name"> <property name="name">
<cstring>domain</cstring> <cstring>domain</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -253,7 +253,7 @@
<string>IP:</string> <string>IP:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>textLabel3</cstring> <cstring>textLabel3</cstring>
</property> </property>
@ -261,7 +261,7 @@
<string>Broadcast:</string> <string>Broadcast:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="0"> <widget class="TQLabel" row="3" column="0">
<property name="name"> <property name="name">
<cstring>textLabel5</cstring> <cstring>textLabel5</cstring>
</property> </property>
@ -269,12 +269,12 @@
<string>Gateway:</string> <string>Gateway:</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="5" column="1"> <widget class="TQLineEdit" row="5" column="1">
<property name="name"> <property name="name">
<cstring>dns1</cstring> <cstring>dns1</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="4" column="0"> <widget class="TQLabel" row="4" column="0">
<property name="name"> <property name="name">
<cstring>textLabel6</cstring> <cstring>textLabel6</cstring>
</property> </property>
@ -282,22 +282,22 @@
<string>Domain:</string> <string>Domain:</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="1" column="1"> <widget class="TQLineEdit" row="1" column="1">
<property name="name"> <property name="name">
<cstring>broadcast</cstring> <cstring>broadcast</cstring>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="3" column="1"> <widget class="TQLineEdit" row="3" column="1">
<property name="name"> <property name="name">
<cstring>gateway</cstring> <cstring>gateway</cstring>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="6" column="1"> <widget class="TQLineEdit" row="6" column="1">
<property name="name"> <property name="name">
<cstring>dns2</cstring> <cstring>dns2</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="6" column="0"> <widget class="TQLabel" row="6" column="0">
<property name="name"> <property name="name">
<cstring>textLabel8</cstring> <cstring>textLabel8</cstring>
</property> </property>
@ -305,7 +305,7 @@
<string>Secondary DNS:</string> <string>Secondary DNS:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="5" column="0"> <widget class="TQLabel" row="5" column="0">
<property name="name"> <property name="name">
<cstring>textLabel7</cstring> <cstring>textLabel7</cstring>
</property> </property>
@ -327,7 +327,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>21</height> <height>21</height>
@ -336,7 +336,7 @@
</spacer> </spacer>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tabSecurity</cstring> <cstring>tabSecurity</cstring>
</property> </property>
@ -357,14 +357,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>21</width> <width>21</width>
<height>40</height> <height>40</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QButtonGroup" row="1" column="0"> <widget class="TQButtonGroup" row="1" column="0">
<property name="name"> <property name="name">
<cstring>groupWpa</cstring> <cstring>groupWpa</cstring>
</property> </property>
@ -375,15 +375,15 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="1" column="0"> <widget class="TQLayoutWidget" row="1" column="0">
<property name="name"> <property name="name">
<cstring>layout33</cstring> <cstring>tqlayout33</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_2_2</cstring> <cstring>textLabel1_2_2</cstring>
</property> </property>
@ -399,7 +399,7 @@
<string>Key:</string> <string>Key:</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>wpaKey</cstring> <cstring>wpaKey</cstring>
</property> </property>
@ -407,7 +407,7 @@
<enum>Password</enum> <enum>Password</enum>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>checkWpaAscii</cstring> <cstring>checkWpaAscii</cstring>
</property> </property>
@ -417,15 +417,15 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget" row="0" column="0"> <widget class="TQLayoutWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>layout34</cstring> <cstring>tqlayout34</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_3_5</cstring> <cstring>textLabel1_3_5</cstring>
</property> </property>
@ -441,7 +441,7 @@
<string>WPA Version:&lt;br&gt;Group Cipher:&lt;br&gt;Pairwise Cipher:&lt;br&gt;Authentication Suite:</string> <string>WPA Version:&lt;br&gt;Group Cipher:&lt;br&gt;Pairwise Cipher:&lt;br&gt;Authentication Suite:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>labelWpaSettings</cstring> <cstring>labelWpaSettings</cstring>
</property> </property>
@ -467,7 +467,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>131</width> <width>131</width>
<height>21</height> <height>21</height>
@ -478,7 +478,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QButtonGroup" row="0" column="0"> <widget class="TQButtonGroup" row="0" column="0">
<property name="name"> <property name="name">
<cstring>groupWep</cstring> <cstring>groupWep</cstring>
</property> </property>
@ -489,7 +489,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QRadioButton" row="0" column="0"> <widget class="TQRadioButton" row="0" column="0">
<property name="name"> <property name="name">
<cstring>radioWepOpen</cstring> <cstring>radioWepOpen</cstring>
</property> </property>
@ -500,15 +500,15 @@
<string>Alt+M</string> <string>Alt+M</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget" row="2" column="0"> <widget class="TQLayoutWidget" row="2" column="0">
<property name="name"> <property name="name">
<cstring>layout35</cstring> <cstring>tqlayout35</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_2</cstring> <cstring>textLabel1_2</cstring>
</property> </property>
@ -524,7 +524,7 @@
<string>Key:</string> <string>Key:</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>wepKey</cstring> <cstring>wepKey</cstring>
</property> </property>
@ -532,7 +532,7 @@
<enum>Password</enum> <enum>Password</enum>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>checkWepAscii</cstring> <cstring>checkWepAscii</cstring>
</property> </property>
@ -542,7 +542,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QRadioButton" row="1" column="0"> <widget class="TQRadioButton" row="1" column="0">
<property name="name"> <property name="name">
<cstring>radioWepRestricted</cstring> <cstring>radioWepRestricted</cstring>
</property> </property>
@ -557,7 +557,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tabAdvanced</cstring> <cstring>tabAdvanced</cstring>
</property> </property>
@ -568,7 +568,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_4</cstring> <cstring>textLabel1_4</cstring>
</property> </property>
@ -576,7 +576,7 @@
<string>&lt;b&gt;Security Warning:&lt;/b&gt; the commands specified below will be ran with the same privileges as Wireless Assistant has.</string> <string>&lt;b&gt;Security Warning:&lt;/b&gt; the commands specified below will be ran with the same privileges as Wireless Assistant has.</string>
</property> </property>
</widget> </widget>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>groupBox3</cstring> <cstring>groupBox3</cstring>
</property> </property>
@ -587,9 +587,9 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="1" column="0"> <widget class="TQLayoutWidget" row="1" column="0">
<property name="name"> <property name="name">
<cstring>layout6</cstring> <cstring>tqlayout6</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -605,14 +605,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>130</width> <width>130</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_3</cstring> <cstring>textLabel1_3</cstring>
</property> </property>
@ -620,7 +620,7 @@
<string>Timeout:</string> <string>Timeout:</string>
</property> </property>
</widget> </widget>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>preConnectionTimeout</cstring> <cstring>preConnectionTimeout</cstring>
</property> </property>
@ -644,7 +644,7 @@
&lt;p&gt;This option specifies how long should Wireless Assistant wait for the process to finish, before it will be killed.&lt;/p&gt;</string> &lt;p&gt;This option specifies how long should Wireless Assistant wait for the process to finish, before it will be killed.&lt;/p&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>preConnectionDetached</cstring> <cstring>preConnectionDetached</cstring>
</property> </property>
@ -661,15 +661,15 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget" row="0" column="0"> <widget class="TQLayoutWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>layout7</cstring> <cstring>tqlayout7</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_3_2</cstring> <cstring>textLabel1_3_2</cstring>
</property> </property>
@ -677,7 +677,7 @@
<string>Command:</string> <string>Command:</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>preConnectionCommand</cstring> <cstring>preConnectionCommand</cstring>
</property> </property>
@ -686,7 +686,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>groupBox3_2</cstring> <cstring>groupBox3_2</cstring>
</property> </property>
@ -697,9 +697,9 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="1" column="0"> <widget class="TQLayoutWidget" row="1" column="0">
<property name="name"> <property name="name">
<cstring>layout6_2</cstring> <cstring>tqlayout6_2</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -715,14 +715,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>130</width> <width>130</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_3_3</cstring> <cstring>textLabel1_3_3</cstring>
</property> </property>
@ -730,7 +730,7 @@
<string>Timeout:</string> <string>Timeout:</string>
</property> </property>
</widget> </widget>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>postConnectionTimeout</cstring> <cstring>postConnectionTimeout</cstring>
</property> </property>
@ -754,7 +754,7 @@
&lt;p&gt;This option specifies how long should Wireless Assistant wait for the process to finish, before it will be killed.&lt;/p&gt;</string> &lt;p&gt;This option specifies how long should Wireless Assistant wait for the process to finish, before it will be killed.&lt;/p&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>postConnectionDetached</cstring> <cstring>postConnectionDetached</cstring>
</property> </property>
@ -771,15 +771,15 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget" row="0" column="0"> <widget class="TQLayoutWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>layout7_2</cstring> <cstring>tqlayout7_2</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_3_2_2</cstring> <cstring>textLabel1_3_2_2</cstring>
</property> </property>
@ -787,7 +787,7 @@
<string>Command:</string> <string>Command:</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>postConnectionCommand</cstring> <cstring>postConnectionCommand</cstring>
</property> </property>
@ -796,7 +796,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>groupBox3_3</cstring> <cstring>groupBox3_3</cstring>
</property> </property>
@ -807,9 +807,9 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="1" column="0"> <widget class="TQLayoutWidget" row="1" column="0">
<property name="name"> <property name="name">
<cstring>layout6_3</cstring> <cstring>tqlayout6_3</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -825,14 +825,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>130</width> <width>130</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_3_4</cstring> <cstring>textLabel1_3_4</cstring>
</property> </property>
@ -840,7 +840,7 @@
<string>Timeout:</string> <string>Timeout:</string>
</property> </property>
</widget> </widget>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>preDisconnectionTimeout</cstring> <cstring>preDisconnectionTimeout</cstring>
</property> </property>
@ -864,7 +864,7 @@
&lt;p&gt;This option specifies how long should Wireless Assistant wait for the process to finish, before it will be killed.&lt;/p&gt;</string> &lt;p&gt;This option specifies how long should Wireless Assistant wait for the process to finish, before it will be killed.&lt;/p&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>preDisconnectionDetached</cstring> <cstring>preDisconnectionDetached</cstring>
</property> </property>
@ -881,15 +881,15 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget" row="0" column="0"> <widget class="TQLayoutWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>layout7_3</cstring> <cstring>tqlayout7_3</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_3_2_3</cstring> <cstring>textLabel1_3_2_3</cstring>
</property> </property>
@ -897,7 +897,7 @@
<string>Command:</string> <string>Command:</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>preDisconnectionCommand</cstring> <cstring>preDisconnectionCommand</cstring>
</property> </property>
@ -906,7 +906,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>groupBox3_3_2</cstring> <cstring>groupBox3_3_2</cstring>
</property> </property>
@ -917,9 +917,9 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="1" column="0"> <widget class="TQLayoutWidget" row="1" column="0">
<property name="name"> <property name="name">
<cstring>layout6_3_2</cstring> <cstring>tqlayout6_3_2</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -935,14 +935,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>130</width> <width>130</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_3_4_2</cstring> <cstring>textLabel1_3_4_2</cstring>
</property> </property>
@ -950,7 +950,7 @@
<string>Timeout:</string> <string>Timeout:</string>
</property> </property>
</widget> </widget>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>postDisconnectionTimeout</cstring> <cstring>postDisconnectionTimeout</cstring>
</property> </property>
@ -974,7 +974,7 @@
&lt;p&gt;This option specifies how long should Wireless Assistant wait for the process to finish, before it will be killed.&lt;/p&gt;</string> &lt;p&gt;This option specifies how long should Wireless Assistant wait for the process to finish, before it will be killed.&lt;/p&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>postDisconnectionDetached</cstring> <cstring>postDisconnectionDetached</cstring>
</property> </property>
@ -991,15 +991,15 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget" row="0" column="0"> <widget class="TQLayoutWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>layout7_3_2</cstring> <cstring>tqlayout7_3_2</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_3_2_3_2</cstring> <cstring>textLabel1_3_2_3_2</cstring>
</property> </property>
@ -1007,7 +1007,7 @@
<string>Command:</string> <string>Command:</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>postDisconnectionCommand</cstring> <cstring>postDisconnectionCommand</cstring>
</property> </property>
@ -1026,7 +1026,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>31</width> <width>31</width>
<height>20</height> <height>20</height>
@ -1094,7 +1094,7 @@
<tabstop>radioManualConfig</tabstop> <tabstop>radioManualConfig</tabstop>
<tabstop>ip</tabstop> <tabstop>ip</tabstop>
<tabstop>broadcast</tabstop> <tabstop>broadcast</tabstop>
<tabstop>netmask</tabstop> <tabstop>nettqmask</tabstop>
<tabstop>gateway</tabstop> <tabstop>gateway</tabstop>
<tabstop>domain</tabstop> <tabstop>domain</tabstop>
<tabstop>dns1</tabstop> <tabstop>dns1</tabstop>
@ -1107,5 +1107,5 @@
<tabstop>buttonOk</tabstop> <tabstop>buttonOk</tabstop>
<tabstop>buttonCancel</tabstop> <tabstop>buttonCancel</tabstop>
</tabstops> </tabstops>
<layoutdefaults spacing="6" margin="11"/> <tqlayoutdefaults spacing="6" margin="11"/>
</UI> </UI>

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>NetParamsWizard</class> <class>NetParamsWizard</class>
<widget class="QWizard"> <widget class="TQWizard">
<property name="name"> <property name="name">
<cstring>NetParamsWizard</cstring> <cstring>NetParamsWizard</cstring>
</property> </property>
@ -26,7 +26,7 @@
<bold>1</bold> <bold>1</bold>
</font> </font>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>welcome</cstring> <cstring>welcome</cstring>
</property> </property>
@ -37,7 +37,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1_2</cstring> <cstring>textLabel1_2</cstring>
</property> </property>
@ -46,13 +46,13 @@
&lt;p&gt;You will be asked a few questions necessary to configure this connection.&lt;/p&gt; &lt;p&gt;You will be asked a few questions necessary to configure this connection.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Press Next to continue.&lt;/i&gt;&lt;/p&gt;</string> &lt;p&gt;&lt;i&gt;Press Next to continue.&lt;/i&gt;&lt;/p&gt;</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>WordBreak|AlignTop</set> <set>WordBreak|AlignTop</set>
</property> </property>
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>WizardPage</cstring> <cstring>WizardPage</cstring>
</property> </property>
@ -66,7 +66,7 @@
<property name="spacing"> <property name="spacing">
<number>15</number> <number>15</number>
</property> </property>
<widget class="QLabel" row="0" column="0" rowspan="1" colspan="4"> <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="4">
<property name="name"> <property name="name">
<cstring>textLabel8_2</cstring> <cstring>textLabel8_2</cstring>
</property> </property>
@ -85,25 +85,25 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>21</width> <width>21</width>
<height>100</height> <height>100</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel" row="1" column="1"> <widget class="TQLabel" row="1" column="1">
<property name="name"> <property name="name">
<cstring>textLabel9</cstring> <cstring>textLabel9</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>ESSID:</string> <string>ESSID:</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="1" column="2"> <widget class="TQLineEdit" row="1" column="2">
<property name="name"> <property name="name">
<cstring>essid</cstring> <cstring>essid</cstring>
</property> </property>
@ -118,7 +118,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>101</width> <width>101</width>
<height>21</height> <height>21</height>
@ -135,7 +135,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>61</width> <width>61</width>
<height>21</height> <height>21</height>
@ -144,7 +144,7 @@
</spacer> </spacer>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>ConfigMode</cstring> <cstring>ConfigMode</cstring>
</property> </property>
@ -168,7 +168,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>80</width> <width>80</width>
<height>21</height> <height>21</height>
@ -185,7 +185,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>60</width> <width>60</width>
<height>31</height> <height>31</height>
@ -202,14 +202,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>21</width> <width>21</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QButtonGroup" row="1" column="1"> <widget class="TQButtonGroup" row="1" column="1">
<property name="name"> <property name="name">
<cstring>buttonGroup3</cstring> <cstring>buttonGroup3</cstring>
</property> </property>
@ -229,7 +229,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>radioDhcp</cstring> <cstring>radioDhcp</cstring>
</property> </property>
@ -243,7 +243,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>radioManualConfig</cstring> <cstring>radioManualConfig</cstring>
</property> </property>
@ -256,7 +256,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QLabel" row="0" column="0" rowspan="1" colspan="3"> <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>textLabel2_2</cstring> <cstring>textLabel2_2</cstring>
</property> </property>
@ -267,7 +267,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>ManualConfig</cstring> <cstring>ManualConfig</cstring>
</property> </property>
@ -281,15 +281,15 @@
<property name="spacing"> <property name="spacing">
<number>15</number> <number>15</number>
</property> </property>
<widget class="QLayoutWidget" row="1" column="1"> <widget class="TQLayoutWidget" row="1" column="1">
<property name="name"> <property name="name">
<cstring>layout12</cstring> <cstring>tqlayout12</cstring>
</property> </property>
<grid> <grid>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLineEdit" row="5" column="1"> <widget class="TQLineEdit" row="5" column="1">
<property name="name"> <property name="name">
<cstring>dns1</cstring> <cstring>dns1</cstring>
</property> </property>
@ -297,7 +297,7 @@
<number>32767</number> <number>32767</number>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="3" column="1"> <widget class="TQLineEdit" row="3" column="1">
<property name="name"> <property name="name">
<cstring>gateway</cstring> <cstring>gateway</cstring>
</property> </property>
@ -305,18 +305,18 @@
<number>32767</number> <number>32767</number>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="6" column="0"> <widget class="TQLabel" row="6" column="0">
<property name="name"> <property name="name">
<cstring>textLabel6</cstring> <cstring>textLabel6</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Secondary DNS:</string> <string>Secondary DNS:</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="0" column="1"> <widget class="TQLineEdit" row="0" column="1">
<property name="name"> <property name="name">
<cstring>ip</cstring> <cstring>ip</cstring>
</property> </property>
@ -324,7 +324,7 @@
<number>32767</number> <number>32767</number>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="1" column="1"> <widget class="TQLineEdit" row="1" column="1">
<property name="name"> <property name="name">
<cstring>broadcast</cstring> <cstring>broadcast</cstring>
</property> </property>
@ -332,29 +332,29 @@
<number>32767</number> <number>32767</number>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>IP:</string> <string>IP:</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>textLabel3</cstring> <cstring>textLabel3</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Netmask:</string> <string>Nettqmask:</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="6" column="1"> <widget class="TQLineEdit" row="6" column="1">
<property name="name"> <property name="name">
<cstring>dns2</cstring> <cstring>dns2</cstring>
</property> </property>
@ -362,60 +362,60 @@
<number>32767</number> <number>32767</number>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="5" column="0"> <widget class="TQLabel" row="5" column="0">
<property name="name"> <property name="name">
<cstring>textLabel5</cstring> <cstring>textLabel5</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Primary DNS:</string> <string>Primary DNS:</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="0"> <widget class="TQLabel" row="3" column="0">
<property name="name"> <property name="name">
<cstring>textLabel7</cstring> <cstring>textLabel7</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Gateway:</string> <string>Gateway:</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="4" column="1"> <widget class="TQLineEdit" row="4" column="1">
<property name="name"> <property name="name">
<cstring>domain</cstring> <cstring>domain</cstring>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="2" column="1"> <widget class="TQLineEdit" row="2" column="1">
<property name="name"> <property name="name">
<cstring>netmask</cstring> <cstring>nettqmask</cstring>
</property> </property>
<property name="maxLength"> <property name="maxLength">
<number>32767</number> <number>32767</number>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="4" column="0"> <widget class="TQLabel" row="4" column="0">
<property name="name"> <property name="name">
<cstring>textLabel4</cstring> <cstring>textLabel4</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Domain:</string> <string>Domain:</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Broadcast:</string> <string>Broadcast:</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
@ -431,7 +431,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>60</width> <width>60</width>
<height>31</height> <height>31</height>
@ -448,7 +448,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>50</width> <width>50</width>
<height>21</height> <height>21</height>
@ -465,14 +465,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>21</width> <width>21</width>
<height>16</height> <height>16</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel" row="0" column="0" rowspan="1" colspan="3"> <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>textLabel3_2</cstring> <cstring>textLabel3_2</cstring>
</property> </property>
@ -483,7 +483,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>WepConfig</cstring> <cstring>WepConfig</cstring>
</property> </property>
@ -494,7 +494,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="0" rowspan="1" colspan="6"> <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="6">
<property name="name"> <property name="name">
<cstring>textLabel5_2</cstring> <cstring>textLabel5_2</cstring>
</property> </property>
@ -503,7 +503,7 @@
&lt;p&gt;Which WEP mode would you like to use?&lt;/p&gt;</string> &lt;p&gt;Which WEP mode would you like to use?&lt;/p&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QButtonGroup" row="1" column="3"> <widget class="TQButtonGroup" row="1" column="3">
<property name="name"> <property name="name">
<cstring>buttonGroup3_2_2</cstring> <cstring>buttonGroup3_2_2</cstring>
</property> </property>
@ -520,7 +520,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>radioWepOpen</cstring> <cstring>radioWepOpen</cstring>
</property> </property>
@ -531,7 +531,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>radioButton2_2_2</cstring> <cstring>radioButton2_2_2</cstring>
</property> </property>
@ -551,7 +551,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>122</width> <width>122</width>
<height>31</height> <height>31</height>
@ -568,14 +568,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>150</width> <width>150</width>
<height>21</height> <height>21</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel" row="2" column="0" rowspan="1" colspan="6"> <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="6">
<property name="name"> <property name="name">
<cstring>textLabel6_2</cstring> <cstring>textLabel6_2</cstring>
</property> </property>
@ -593,7 +593,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>31</width> <width>31</width>
<height>16</height> <height>16</height>
@ -610,7 +610,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>50</width> <width>50</width>
<height>21</height> <height>21</height>
@ -627,29 +627,29 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>30</width> <width>30</width>
<height>21</height> <height>21</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel" row="3" column="1"> <widget class="TQLabel" row="3" column="1">
<property name="name"> <property name="name">
<cstring>textLabel8</cstring> <cstring>textLabel8</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>WEP key:</string> <string>WEP key:</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="3" column="2" rowspan="1" colspan="2"> <widget class="TQLineEdit" row="3" column="2" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>wepKey</cstring> <cstring>wepKey</cstring>
</property> </property>
<property name="minimumSize"> <property name="tqminimumSize">
<size> <size>
<width>140</width> <width>140</width>
<height>0</height> <height>0</height>
@ -659,7 +659,7 @@
<enum>Password</enum> <enum>Password</enum>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="3" column="4"> <widget class="TQCheckBox" row="3" column="4">
<property name="name"> <property name="name">
<cstring>checkWepAscii</cstring> <cstring>checkWepAscii</cstring>
</property> </property>
@ -669,7 +669,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>WizardPage</cstring> <cstring>WizardPage</cstring>
</property> </property>
@ -690,7 +690,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>31</width> <width>31</width>
<height>54</height> <height>54</height>
@ -707,7 +707,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>80</width> <width>80</width>
<height>21</height> <height>21</height>
@ -724,14 +724,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>49</width> <width>49</width>
<height>21</height> <height>21</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel" row="0" column="0" rowspan="1" colspan="7"> <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="7">
<property name="name"> <property name="name">
<cstring>textLabel5_2_2</cstring> <cstring>textLabel5_2_2</cstring>
</property> </property>
@ -739,22 +739,22 @@
<string>&lt;p&gt;&lt;b&gt;The network you are trying to connect to requires WPA authentication.&lt;/b&gt;&lt;/p&gt;</string> <string>&lt;p&gt;&lt;b&gt;The network you are trying to connect to requires WPA authentication.&lt;/b&gt;&lt;/p&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="1" rowspan="1" colspan="2"> <widget class="TQLabel" row="3" column="1" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>textLabel8_3</cstring> <cstring>textLabel8_3</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>WPA Key:</string> <string>WPA Key:</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="3" column="3" rowspan="1" colspan="2"> <widget class="TQLineEdit" row="3" column="3" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>wpaKey</cstring> <cstring>wpaKey</cstring>
</property> </property>
<property name="minimumSize"> <property name="tqminimumSize">
<size> <size>
<width>140</width> <width>140</width>
<height>0</height> <height>0</height>
@ -764,7 +764,7 @@
<enum>Password</enum> <enum>Password</enum>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="3" column="5"> <widget class="TQCheckBox" row="3" column="5">
<property name="name"> <property name="name">
<cstring>checkWpaAscii</cstring> <cstring>checkWpaAscii</cstring>
</property> </property>
@ -772,7 +772,7 @@
<string>ASCII</string> <string>ASCII</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0" rowspan="1" colspan="7"> <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="7">
<property name="name"> <property name="name">
<cstring>textLabel6_2_2</cstring> <cstring>textLabel6_2_2</cstring>
</property> </property>
@ -790,7 +790,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>80</width> <width>80</width>
<height>21</height> <height>21</height>
@ -807,14 +807,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>60</width> <width>60</width>
<height>31</height> <height>31</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel" row="1" column="4" rowspan="1" colspan="2"> <widget class="TQLabel" row="1" column="4" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>labelWpaSettings</cstring> <cstring>labelWpaSettings</cstring>
</property> </property>
@ -830,7 +830,7 @@
<string>&lt;b&gt;?&lt;br&gt;?&lt;br&gt;?&lt;br&gt;?&lt;/b&gt;</string> <string>&lt;b&gt;?&lt;br&gt;?&lt;br&gt;?&lt;br&gt;?&lt;/b&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="2" rowspan="1" colspan="2"> <widget class="TQLabel" row="1" column="2" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>textLabel1_3</cstring> <cstring>textLabel1_3</cstring>
</property> </property>
@ -848,7 +848,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>done</cstring> <cstring>done</cstring>
</property> </property>
@ -859,7 +859,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel7_2</cstring> <cstring>textLabel7_2</cstring>
</property> </property>
@ -868,7 +868,7 @@
&lt;p&gt;You have successfully finished configuring this connection.&lt;/p&gt; &lt;p&gt;You have successfully finished configuring this connection.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Press Finish to connect!&lt;/b&gt;&lt;/p&gt;</string> &lt;p&gt;&lt;b&gt;Press Finish to connect!&lt;/b&gt;&lt;/p&gt;</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>WordBreak|AlignTop</set> <set>WordBreak|AlignTop</set>
</property> </property>
</widget> </widget>
@ -879,7 +879,7 @@
<tabstop>buttonGroup3</tabstop> <tabstop>buttonGroup3</tabstop>
<tabstop>ip</tabstop> <tabstop>ip</tabstop>
<tabstop>broadcast</tabstop> <tabstop>broadcast</tabstop>
<tabstop>netmask</tabstop> <tabstop>nettqmask</tabstop>
<tabstop>gateway</tabstop> <tabstop>gateway</tabstop>
<tabstop>domain</tabstop> <tabstop>domain</tabstop>
<tabstop>dns1</tabstop> <tabstop>dns1</tabstop>
@ -888,5 +888,5 @@
<tabstop>wepKey</tabstop> <tabstop>wepKey</tabstop>
<tabstop>radioDhcp</tabstop> <tabstop>radioDhcp</tabstop>
</tabstops> </tabstops>
<layoutdefaults spacing="6" margin="11"/> <tqlayoutdefaults spacing="6" margin="11"/>
</UI> </UI>

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>mainWindow</class> <class>mainWindow</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>mainWindow</cstring> <cstring>mainWindow</cstring>
</property> </property>
@ -23,7 +23,7 @@
<property name="name"> <property name="name">
<cstring>buttonOptions</cstring> <cstring>buttonOptions</cstring>
</property> </property>
<property name="minimumSize"> <property name="tqminimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>0</height> <height>0</height>
@ -75,7 +75,7 @@
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="minimumSize"> <property name="tqminimumSize">
<size> <size>
<width>120</width> <width>120</width>
<height>0</height> <height>0</height>
@ -129,16 +129,16 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>21</width> <width>21</width>
<height>120</height> <height>120</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLayoutWidget" row="0" column="0" rowspan="5" colspan="1"> <widget class="TQLayoutWidget" row="0" column="0" rowspan="5" colspan="1">
<property name="name"> <property name="name">
<cstring>layout16</cstring> <cstring>tqlayout16</cstring>
</property> </property>
<vbox> <vbox>
<property name="name"> <property name="name">
@ -147,7 +147,7 @@
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QFrame"> <widget class="TQFrame">
<property name="name"> <property name="name">
<cstring>frameDevice</cstring> <cstring>frameDevice</cstring>
</property> </property>
@ -172,7 +172,7 @@
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>devLabel</cstring> <cstring>devLabel</cstring>
</property> </property>
@ -184,7 +184,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="tqminimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>20</height> <height>20</height>
@ -209,7 +209,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="tqminimumSize">
<size> <size>
<width>60</width> <width>60</width>
<height>0</height> <height>0</height>
@ -226,7 +226,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QWidgetStack"> <widget class="TQWidgetStack">
<property name="name"> <property name="name">
<cstring>widgetStack</cstring> <cstring>widgetStack</cstring>
</property> </property>
@ -247,7 +247,7 @@
<property name="lineWidth"> <property name="lineWidth">
<number>2</number> <number>2</number>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>netPage</cstring> <cstring>netPage</cstring>
</property> </property>
@ -338,7 +338,7 @@
&lt;p&gt;&lt;i&gt;HINT: Click the Refresh button to update this list.&lt;/i&gt;&lt;/p&gt;</string> &lt;p&gt;&lt;i&gt;HINT: Click the Refresh button to update this list.&lt;/i&gt;&lt;/p&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>statusLabel</cstring> <cstring>statusLabel</cstring>
</property> </property>
@ -350,7 +350,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="tqminimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>20</height> <height>20</height>
@ -362,17 +362,17 @@
<property name="text"> <property name="text">
<string>Ready</string> <string>Ready</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>WordBreak|AlignVCenter</set> <set>WordBreak|AlignVCenter</set>
</property> </property>
<property name="whatsThis" stdset="0"> <property name="whatsThis" stdset="0">
<string>&lt;p&gt;&lt;b&gt;Status Bar&lt;/b&gt;&lt;/p&gt; <string>&lt;p&gt;&lt;b&gt;tqStatus Bar&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Messages describing current process are shown in this area.&lt;/p&gt;</string> &lt;p&gt;Messages describing current process are shown in this area.&lt;/p&gt;</string>
</property> </property>
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>optionsPage</cstring> <cstring>optionsPage</cstring>
</property> </property>
@ -383,15 +383,15 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout20</cstring> <cstring>tqlayout20</cstring>
</property> </property>
<vbox> <vbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>checkAutoConnect</cstring> <cstring>checkAutoConnect</cstring>
</property> </property>
@ -406,7 +406,7 @@
&lt;p&gt;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.&lt;/p&gt;</string> &lt;p&gt;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.&lt;/p&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>checkAutoReconnect</cstring> <cstring>checkAutoReconnect</cstring>
</property> </property>
@ -421,7 +421,7 @@
&lt;p&gt;Checking this box will make the application try to reconnect after the connection is lost.&lt;/p&gt;</string> &lt;p&gt;Checking this box will make the application try to reconnect after the connection is lost.&lt;/p&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>checkAutoQuit</cstring> <cstring>checkAutoQuit</cstring>
</property> </property>
@ -436,7 +436,7 @@
&lt;p&gt;Checking this box will make the application close after successfully establishing a connection to a wireless network.&lt;/p&gt;</string> &lt;p&gt;Checking this box will make the application close after successfully establishing a connection to a wireless network.&lt;/p&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>checkGroupAPs</cstring> <cstring>checkGroupAPs</cstring>
</property> </property>
@ -453,23 +453,23 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout17</cstring> <cstring>tqlayout17</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout12</cstring> <cstring>tqlayout12</cstring>
</property> </property>
<vbox> <vbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2_2</cstring> <cstring>textLabel2_2</cstring>
</property> </property>
@ -485,7 +485,7 @@
&lt;p&gt;&lt;i&gt;HINT: Increasing this number can help if you have problems connecting to some networks.&lt;/i&gt;&lt;/p&gt;</string> &lt;p&gt;&lt;i&gt;HINT: Increasing this number can help if you have problems connecting to some networks.&lt;/i&gt;&lt;/p&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -503,9 +503,9 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout13</cstring> <cstring>tqlayout13</cstring>
</property> </property>
<vbox> <vbox>
<property name="name"> <property name="name">
@ -521,7 +521,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>21</width> <width>21</width>
<height>20</height> <height>20</height>
@ -538,7 +538,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>21</width> <width>21</width>
<height>20</height> <height>20</height>
@ -547,15 +547,15 @@
</spacer> </spacer>
</vbox> </vbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout14</cstring> <cstring>tqlayout14</cstring>
</property> </property>
<vbox> <vbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>spinDelayBeforeScanning</cstring> <cstring>spinDelayBeforeScanning</cstring>
</property> </property>
@ -580,7 +580,7 @@
&lt;p&gt;&lt;i&gt;HINT: Increasing this number can help if you have to refresh the list manually to see all the available networks.&lt;/i&gt;&lt;/p&gt;</string> &lt;p&gt;&lt;i&gt;HINT: Increasing this number can help if you have to refresh the list manually to see all the available networks.&lt;/i&gt;&lt;/p&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>spinDhcpTimeout</cstring> <cstring>spinDhcpTimeout</cstring>
</property> </property>
@ -607,9 +607,9 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout15</cstring> <cstring>tqlayout15</cstring>
</property> </property>
<vbox> <vbox>
<property name="name"> <property name="name">
@ -625,7 +625,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>101</width> <width>101</width>
<height>21</height> <height>21</height>
@ -642,7 +642,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>118</width> <width>118</width>
<height>21</height> <height>21</height>
@ -653,7 +653,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -661,9 +661,9 @@
<string>&lt;i&gt;Press the button below to enable all messages which have been turned off with the 'Don't Show Again' feature.&lt;/i&gt;</string> <string>&lt;i&gt;Press the button below to enable all messages which have been turned off with the 'Don't Show Again' feature.&lt;/i&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout19</cstring> <cstring>tqlayout19</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -679,14 +679,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>201</width> <width>201</width>
<height>21</height> <height>21</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonEnableAllMessages</cstring> <cstring>buttonEnableAllMessages</cstring>
</property> </property>
@ -713,7 +713,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>31</height> <height>31</height>
@ -738,16 +738,16 @@
<tabstop>spinDhcpTimeout</tabstop> <tabstop>spinDhcpTimeout</tabstop>
<tabstop>buttonEnableAllMessages</tabstop> <tabstop>buttonEnableAllMessages</tabstop>
</tabstops> </tabstops>
<slots> <Q_SLOTS>
<slot>netScan()</slot> <slot>netScan()</slot>
<slot>netConnect()</slot> <slot>netConnect()</slot>
<slot>showCfgDlg()</slot> <slot>showCfgDlg()</slot>
<slot>setDeviceList()</slot> <slot>setDeviceList()</slot>
</slots> </Q_SLOTS>
<functions> <functions>
<function>updateStatus(char sts)</function> <function>updatetqStatus(char sts)</function>
</functions> </functions>
<layoutdefaults spacing="6" margin="11"/> <tqlayoutdefaults spacing="6" margin="11"/>
<includehints> <includehints>
<includehint>kpushbutton.h</includehint> <includehint>kpushbutton.h</includehint>
<includehint>kpushbutton.h</includehint> <includehint>kpushbutton.h</includehint>

@ -22,20 +22,20 @@
#include "ui_netparamsedit.h" #include "ui_netparamsedit.h"
#include "netparams.h" #include "netparams.h"
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <qlineedit.h> #include <tqlineedit.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qtabwidget.h> #include <tqtabwidget.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qlabel.h> #include <tqlabel.h>
#include <kiconloader.h> #include <kiconloader.h>
ui_NetParamsEdit::ui_NetParamsEdit(QWidget* parent, const char* name, bool modal, WFlags fl) ui_NetParamsEdit::ui_NetParamsEdit(TQWidget* tqparent, const char* name, bool modal, WFlags fl)
: netProperties(parent,name, modal,fl) : netProperties(tqparent,name, modal,fl)
{ {
buttonHelp->hide(); buttonHelp->hide();
buttonOk->setIconSet( SmallIconSet("ok") ); buttonOk->setIconSet( SmallIconSet("ok") );
@ -81,7 +81,7 @@ void ui_NetParamsEdit::setValues( const WANetParams & np )
} }
} }
if (np.wpa) { if (np.wpa) {
labelWpaSettings->setText( QString("<i>%1</i>").arg( np.wpaSettings.join("<br>") ) ); labelWpaSettings->setText( TQString("<i>%1</i>").tqarg( np.wpaSettings.join("<br>") ) );
if ( np.wpaKey.left(2)=="s:" ) { //ASCII key if ( np.wpaKey.left(2)=="s:" ) { //ASCII key
checkWpaAscii->setChecked(true); checkWpaAscii->setChecked(true);
wpaKey->setText( np.wpaKey.right(np.wpaKey.length()-2) ); wpaKey->setText( np.wpaKey.right(np.wpaKey.length()-2) );
@ -97,7 +97,7 @@ void ui_NetParamsEdit::setValues( const WANetParams & np )
ip->setText(np.ip); ip->setText(np.ip);
broadcast->setText( np.broadcast ); broadcast->setText( np.broadcast );
netmask->setText( np.netmask ); nettqmask->setText( np.nettqmask );
gateway->setText( np.gateway ); gateway->setText( np.gateway );
domain->setText( np.domain ); domain->setText( np.domain );
dns1->setText( np.dns1 ); dns1->setText( np.dns1 );
@ -129,7 +129,7 @@ WANetParams ui_NetParamsEdit::readNetParams( WANetParams & np )
np.dhcp = radioDhcp->isChecked(); np.dhcp = radioDhcp->isChecked();
np.ip = ip->text(); np.ip = ip->text();
np.broadcast = broadcast->text(); np.broadcast = broadcast->text();
np.netmask = netmask->text(); np.nettqmask = nettqmask->text();
np.gateway = gateway->text(); np.gateway = gateway->text();
np.domain = domain->text(); np.domain = domain->text();
np.dns1 = dns1->text(); np.dns1 = dns1->text();

@ -28,9 +28,10 @@ class WANetParams;
class ui_NetParamsEdit : public netProperties class ui_NetParamsEdit : public netProperties
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: 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(); ~ui_NetParamsEdit();
/*$PUBLIC_FUNCTIONS$*/ /*$PUBLIC_FUNCTIONS$*/
//void setWepEnabled( bool w ); //void setWepEnabled( bool w );

@ -22,16 +22,16 @@
#include "ui_netparamswizard.h" #include "ui_netparamswizard.h"
#include "netparams.h" #include "netparams.h"
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <qlineedit.h> #include <tqlineedit.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qlabel.h> #include <tqlabel.h>
#include <kiconloader.h> #include <kiconloader.h>
ui_NetParamsWizard::ui_NetParamsWizard(QWidget* parent, const char* name, bool modal, WFlags fl) ui_NetParamsWizard::ui_NetParamsWizard(TQWidget* tqparent, const char* name, bool modal, WFlags fl)
: NetParamsWizard(parent,name, modal,fl) : NetParamsWizard(tqparent,name, modal,fl)
{ {
backButton()->setIconSet( SmallIconSet("back") ); backButton()->setIconSet( SmallIconSet("back") );
nextButton()->setIconSet( SmallIconSet("forward") ); nextButton()->setIconSet( SmallIconSet("forward") );
@ -52,10 +52,10 @@ void ui_NetParamsWizard::setWepEnabled( bool w )
setAppropriate( page(4), 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 ); setAppropriate( page(5), w );
if (w) labelWpaSettings->setText( QString("<i>%1</i>").arg( settings.join("<br>") ) ); if (w) labelWpaSettings->setText( TQString("<i>%1</i>").tqarg( settings.join("<br>") ) );
} }
@ -68,7 +68,7 @@ void ui_NetParamsWizard::next()
{ {
if (indexOf(currentPage())==2) if (indexOf(currentPage())==2)
setAppropriate( page(3), radioManualConfig->isChecked() ); setAppropriate( page(3), radioManualConfig->isChecked() );
QWizard::next(); TQWizard::next();
} }
WANetParams ui_NetParamsWizard::readNetParams( WANetParams & np ) WANetParams ui_NetParamsWizard::readNetParams( WANetParams & np )
@ -79,7 +79,7 @@ WANetParams ui_NetParamsWizard::readNetParams( WANetParams & np )
if (!np.dhcp) { // manual configuration option selected if (!np.dhcp) { // manual configuration option selected
np.ip = ip->text(); np.ip = ip->text();
np.broadcast = broadcast->text(); np.broadcast = broadcast->text();
np.netmask = netmask->text(); np.nettqmask = nettqmask->text();
np.gateway = gateway->text(); np.gateway = gateway->text();
np.domain = domain->text(); np.domain = domain->text();
np.dns1 = dns1->text(); np.dns1 = dns1->text();

@ -28,13 +28,14 @@ class WANetParams;
class ui_NetParamsWizard : public NetParamsWizard class ui_NetParamsWizard : public NetParamsWizard
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: 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(); ~ui_NetParamsWizard();
/*$PUBLIC_FUNCTIONS$*/ /*$PUBLIC_FUNCTIONS$*/
void setWepEnabled( bool w ); void setWepEnabled( bool w );
void setWpaEnabled( bool w, QStringList settings = QStringList() ); void setWpaEnabled( bool w, TQStringList settings = TQStringList() );
void setEssidEnabled( bool e ); void setEssidEnabled( bool e );
WANetParams readNetParams( WANetParams & np ); WANetParams readNetParams( WANetParams & np );

@ -16,7 +16,7 @@ WAConfig *WAConfig::self()
} }
WAConfig::WAConfig( ) WAConfig::WAConfig( )
: KConfigSkeleton( QString::fromLatin1( "wlassistantrc" ) ) : KConfigSkeleton( TQString::tqfromLatin1( "wlassistantrc" ) )
{ {
mSelf = this; mSelf = this;
} }

@ -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 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; if (std_qual > 100) std_qual = 100;
// std::cout << "* QUALITY: " << std_qual << std::endl; // std::cout << "* TQUALITY: " << std_qual << std::endl;
return std_qual; return std_qual;
} }

@ -26,7 +26,7 @@
#include <iwlib.h> #include <iwlib.h>
#include <time.h> #include <time.h>
class QStringList; class TQStringList;
class WATools class WATools
{ {
@ -50,7 +50,7 @@ public:
static bool isWireless( const char* _ifname ); //returns true if iface is a valid wireless interface 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* essid( const char* _ifname = 0 ); //returns current ESSID
static char* ap( const char* _ifname = 0 ); //returns current AP 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 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 static bool hasKey( const char* _ifname = 0 ); //returns true if WEP key for the specified interface is set

@ -27,16 +27,16 @@
#include <iostream> #include <iostream>
#include <linux/version.h> //provides LINUX_VERSION* macros #include <linux/version.h> //provides LINUX_VERSION* macros
#include <qregexp.h> #include <tqregexp.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qprocess.h> #include <tqprocess.h>
#include <qcursor.h> #include <tqcursor.h>
#include <qeventloop.h> #include <tqeventloop.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qwidgetstack.h> #include <tqwidgetstack.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <kpushbutton.h> #include <kpushbutton.h>
#include <kcombobox.h> #include <kcombobox.h>
@ -48,8 +48,8 @@
#include <klocale.h> #include <klocale.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
WirelessAssistant::WirelessAssistant(QWidget* parent, const char* name, bool modal, WFlags fl) WirelessAssistant::WirelessAssistant(TQWidget* tqparent, const char* name, bool modal, WFlags fl)
: mainWindow(parent,name, modal,fl) : mainWindow(tqparent,name, modal,fl)
{ {
buttonScan->setIconSet( SmallIconSet("reload") ); buttonScan->setIconSet( SmallIconSet("reload") );
buttonConnect->setIconSet( SmallIconSet("connect_creating") ); buttonConnect->setIconSet( SmallIconSet("connect_creating") );
@ -61,35 +61,35 @@ WirelessAssistant::WirelessAssistant(QWidget* parent, const char* name, bool mod
frameDevice->hide(); frameDevice->hide();
/// Network List Widget /// Network List Widget
connect( buttonScan, SIGNAL(clicked()), connect( buttonScan, TQT_SIGNAL(clicked()),
this, SLOT(netScan()) ); this, TQT_SLOT(netScan()) );
connect( buttonConnect, SIGNAL(clicked()), connect( buttonConnect, TQT_SIGNAL(clicked()),
this, SLOT(itemAction()) ); this, TQT_SLOT(itemAction()) );
connect( buttonClose, SIGNAL(clicked()), connect( buttonClose, TQT_SIGNAL(clicked()),
this, SLOT(close()) ); this, TQT_SLOT(close()) );
connect( devCombo, SIGNAL(activated( const QString & )), connect( devCombo, TQT_SIGNAL(activated( const TQString & )),
this, SLOT(setDev( const QString & )) ); this, TQT_SLOT(setDev( const TQString & )) );
connect( netList, SIGNAL(rightButtonPressed( QListViewItem*, const QPoint&, int )), connect( netList, TQT_SIGNAL(rightButtonPressed( TQListViewItem*, const TQPoint&, int )),
SLOT(showItemContextMenu( QListViewItem*, const QPoint&, int )) ); TQT_SLOT(showItemContextMenu( TQListViewItem*, const TQPoint&, int )) );
/// Settings Widget /// Settings Widget
connect( buttonOptions, SIGNAL(toggled(bool)), connect( buttonOptions, TQT_SIGNAL(toggled(bool)),
this, SLOT(togglePage(bool)) ); this, TQT_SLOT(togglePage(bool)) );
connect( buttonEnableAllMessages, SIGNAL(clicked()), connect( buttonEnableAllMessages, TQT_SIGNAL(clicked()),
this, SLOT(enableAllMessages()) ); this, TQT_SLOT(enableAllMessages()) );
/// Global KDE Options /// Global KDE Options
connect( KApplication::kApplication(), SIGNAL(settingsChanged(int)), connect( KApplication::kApplication(), TQT_SIGNAL(settingsChanged(int)),
this, SLOT(updateConfiguration(int)) ); this, TQT_SLOT(updateConfiguration(int)) );
setMouseBehaviour(); 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() WirelessAssistant::~WirelessAssistant()
@ -101,11 +101,11 @@ WirelessAssistant::~WirelessAssistant()
void WirelessAssistant::init() void WirelessAssistant::init()
{ {
statusLabel->setText(i18n("Initializing...")); statusLabel->setText(i18n("Initializing..."));
statusLabel->repaint(); statusLabel->tqrepaint();
//////////////////////////////////////// ////////////////////////////////////////
///// CHECK FOR SYSFS (KERNEL 2.6) ///// ///// CHECK FOR SYSFS (KERNEL 2.6) /////
if ( !QFile::exists("/sys") ) { if ( !TQFile::exists("/sys") ) {
std::cout << "Sysfs not present. Exiting." << std::endl; std::cout << "Sysfs not present. Exiting." << std::endl;
KMessageBox::error( 0, i18n("Kernel 2.6 or later not present.\nWireless Assistant will now quit.") ); KMessageBox::error( 0, i18n("Kernel 2.6 or later not present.\nWireless Assistant will now quit.") );
close(); close();
@ -150,7 +150,7 @@ void WirelessAssistant::init()
/////////////////////////////////// ///////////////////////////////////
///// DETECT WIRELESS DEVICES ///// ///// DETECT WIRELESS DEVICES /////
QStringList devList = interfaceList(); TQStringList devList = interfaceList();
if ( devList.count()==0 ) { if ( devList.count()==0 ) {
std::cout << "No wireless interfaces found. Exiting." << std::endl; std::cout << "No wireless interfaces found. Exiting." << std::endl;
KMessageBox::error(0, i18n("No usable wireless devices found.\nWireless Assistant will now quit.")); KMessageBox::error(0, i18n("No usable wireless devices found.\nWireless Assistant will now quit."));
@ -174,7 +174,7 @@ void WirelessAssistant::init()
////////////////////////////////// //////////////////////////////////
///// CHECK FILE PERMISSIONS ///// ///// 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; std::cout << "warning: /etc/resolv.conf not writable" << std::endl;
KMessageBox::information(0, i18n("<qt><p>You might have insufficient permissions for Wireless Assistant to function properly.</p><p>Did you run it using '<tt>sudo</tt>'?</p></qt>") ); KMessageBox::information(0, i18n("<qt><p>You might have insufficient permissions for Wireless Assistant to function properly.</p><p>Did you run it using '<tt>sudo</tt>'?</p></qt>") );
} }
@ -188,16 +188,16 @@ void WirelessAssistant::init()
///// INITIALIZE GLOBAL VARIABLES ///// ///// INITIALIZE GLOBAL VARIABLES /////
wpaAvailable = ( !( Commands.wpa_supplicant.isEmpty() || Commands.wpa_cli.isEmpty() ) ); wpaAvailable = ( !( Commands.wpa_supplicant.isEmpty() || Commands.wpa_cli.isEmpty() ) );
connectedItem = 0; connectedItem = 0;
timerGui = new QTimer(); timerGui = new TQTimer();
timerConnectionCheck = new QTimer(); timerConnectionCheck = new TQTimer();
connect( timerGui, SIGNAL(timeout()), SLOT(updateConnectedItem()) ); connect( timerGui, TQT_SIGNAL(timeout()), TQT_SLOT(updateConnectedItem()) );
connect( timerConnectionCheck, SIGNAL(timeout()), SLOT(checkConnectionStatus()) ); connect( timerConnectionCheck, TQT_SIGNAL(timeout()), TQT_SLOT(checkConnectiontqStatus()) );
//////////////////////// ////////////////////////
///// DETECT & SET PATHS ///// ///// DETECT & SET PATHS /////
if (!Commands.allFound) { //all ok or ONLY dhcpcd not found (i.e. dhclient present). if (!Commands.allFound) { //all ok or ONLY dhcpcd not found (i.e. dhclient present).
std::cout << "Missing executables (" << Commands.notFound.join("', '") << "). Exiting." << std::endl; 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(); close();
return; return;
} }
@ -208,14 +208,14 @@ void WirelessAssistant::init()
/////////////////////////////////////// ///////////////////////////////////////
///// SCAN FOR AVAILABLE NETWORKS ///// ///// SCAN FOR AVAILABLE NETWORKS /////
if ( autoConnect ) if ( autoConnect )
QTimer::singleShot( 0, this, SLOT(netAutoConnect()) ); TQTimer::singleShot( 0, this, TQT_SLOT(netAutoConnect()) );
else 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)); if (groupAPs) lvi = getItemByEssid( WATools::essid(NetParams.iface));
else lvi = getItemByAp( WATools::ap(NetParams.iface )); else lvi = getItemByAp( WATools::ap(NetParams.iface ));
bool needsKey; bool needsKey;
@ -235,7 +235,7 @@ void WirelessAssistant::checkConnectionStatus()
} else if (connectedItem) { //connection LOST } else if (connectedItem) { //connection LOST
setConnectedItem(0); setConnectedItem(0);
timerConnectionCheck->stop(); 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 ); netDisconnect( true );
netConnect(); netConnect();
} }
@ -246,10 +246,10 @@ void WirelessAssistant::checkConnectionStatus()
void WirelessAssistant::removeNetParams() void WirelessAssistant::removeNetParams()
{ {
NetListViewItem *nvi = static_cast<NetListViewItem*>(netList->selectedItem()); NetListViewItem *nvi = static_cast<NetListViewItem*>(netList->selectedItem());
QString ap = nvi->ap(); QString essid = nvi->essid(); TQString ap = nvi->ap(); TQString essid = nvi->essid();
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 && (*nps).section(",",1,1)==essid) { if ( (*nps).section(",",2,2)==ap && (*nps).section(",",1,1)==essid) {
if ( KMessageBox::warningContinueCancel(0, i18n("<qt><p>Settings for network '<b>%1</b>' are about to be deleted.</p><p>Would you like to continue?</p></qt>").arg(essid)) == KMessageBox::Continue ) { if ( KMessageBox::warningContinueCancel(0, i18n("<qt><p>Settings for network '<b>%1</b>' are about to be deleted.</p><p>Would you like to continue?</p></qt>").tqarg(essid)) == KMessageBox::Continue ) {
if (nvi->hidden()) // hiddenEssid = 1 if (nvi->hidden()) // hiddenEssid = 1
nvi->setEssid("<hidden>"); nvi->setEssid("<hidden>");
NetParamsList.remove(nps); NetParamsList.remove(nps);
@ -264,25 +264,25 @@ void WirelessAssistant::removeNetParams()
void WirelessAssistant::setDNS( const WANetParams & np ) void WirelessAssistant::setDNS( const WANetParams & np )
{ {
QFile f("/etc/resolv.conf"); TQFile f("/etc/resolv.conf");
if (f.open( IO_WriteOnly | IO_Truncate )) { if (f.open( IO_WriteOnly | IO_Truncate )) {
QTextStream s( &f ); TQTextStream s( &f );
if (!np.domain.isEmpty()) { 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; std::cout << "resolv.conf: domain " << np.domain << std::endl;
} }
if (!np.dns1.isEmpty()) { 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; std::cout << "resolv.conf: nameserver " << np.dns1 << std::endl;
} }
if (!np.dns2.isEmpty()) { 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; std::cout << "resolv.conf: nameserver " << np.dns2 << std::endl;
} }
f.close(); f.close();
} else { } else {
std::cout << "dns setup error: " << f.name() << " is not writeable." << std::endl; std::cout << "dns setup error: " << f.name() << " is not writeable." << std::endl;
KMessageBox::error(0, i18n("<qt><p>File '<i>%1</i>' could not be opened for writing.</p><p>Nameserver(s) and/or domain are not set.</p></qt>").arg(f.name()) ); KMessageBox::error(0, i18n("<qt><p>File '<i>%1</i>' could not be opened for writing.</p><p>Nameserver(s) and/or domain are not set.</p></qt>").tqarg(f.name()) );
} }
} }
@ -291,7 +291,7 @@ void WirelessAssistant::netScan()
timerConnectionCheck->stop(); //stop while scanning. timerConnectionCheck->stop(); //stop while scanning.
netScan( NetParams ); netScan( NetParams );
if (netList->childCount() > 0) { if (netList->childCount() > 0) {
QTimer::singleShot( 0, this, SLOT(checkConnectionStatus()) ); TQTimer::singleShot( 0, this, TQT_SLOT(checkConnectiontqStatus()) );
timerConnectionCheck->start(WA_CONNECTION_CHECK_INTERVAL); timerConnectionCheck->start(WA_CONNECTION_CHECK_INTERVAL);
} }
} }
@ -314,30 +314,30 @@ void WirelessAssistant::netScan( const WANetParams & np )
} }
if ( !WATools::isUp(np.iface) ) { 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) ); //runCommand( Commands.cmd("ifup",np) );
WATools::setUp(true, np.iface); WATools::setUp(true, np.iface);
if (DelayBeforeScanning>0) { if (DelayBeforeScanning>0) {
statusLabel->setText(i18n("Waiting before scanning...")); statusLabel->setText(i18n("Waiting before scanning..."));
statusLabel->repaint(); statusLabel->tqrepaint();
KApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput ); KApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
usleep(DelayBeforeScanning * 1000000); // delay * 1000ms usleep(DelayBeforeScanning * 1000000); // delay * 1000ms
} }
} }
statusLabel->setText(i18n("Scanning...")); statusLabel->setText(i18n("Scanning..."));
statusLabel->repaint(); statusLabel->tqrepaint();
netList->clear(); netList->clear();
QString result; TQString result;
statusLabel->setText(i18n("Scanning...")); statusLabel->setText(i18n("Scanning..."));
result = runCommand( Commands.cmd("scan",np) ); result = runCommand( Commands.cmd("scan",np) );
parseScan( result ); parseScan( result );
if (netList->childCount() > 0) { 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) if (wasConnected)
groupAPs ? setConnectedItem( WATools::essid() ) : setConnectedItem( WATools::ap() ); //mark item as connected. groupAPs ? setConnectedItem( WATools::essid() ) : setConnectedItem( WATools::ap() ); //mark item as connected.
statusLabel->setText( i18n("Done.") ); 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) //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; std::cout << "No networks found!" << std::endl;
statusLabel->setText( i18n("No networks found.") ); 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; 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.") ); 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(); setNetListColumns();
} }
void WirelessAssistant::parseScan( const QString & output ) void WirelessAssistant::parseScan( const TQString & output )
{ {
QString essid; TQString essid;
QStringList essidList; TQStringList essidList;
QString channel; TQString channel;
QString mode; TQString mode;
int qualInt; int qualInt;
bool enc; //default to false bool enc; //default to false
bool hidden; //default to false bool hidden; //default to false
QString ap; TQString ap;
// security parameters // security parameters
bool wpa; bool wpa;
QStringList wpaSettings; TQStringList wpaSettings;
//QString wpaVersion, wpaGroupCipher, wpaPairwiseCipher, wpaAuthenticationSuite; //TQString wpaVersion, wpaGroupCipher, wpaPairwiseCipher, wpaAuthenticationSuite;
bool ok_channel = true; //does iwlist return channel? bool ok_channel = true; //does iwlist return channel?
QString section; TQString section;
netList->setUpdatesEnabled( false ); //do not redraw while adding items to avoid flicker. netList->setUpdatesEnabled( false ); //do not redraw while adding items to avoid flicker.
@ -410,7 +410,7 @@ void WirelessAssistant::parseScan( const QString & output )
} else } else
hidden=false; hidden=false;
// GET QUALITY // GET TQUALITY
int wsignal; int wsignal;
//check if driver reports quality directly //check if driver reports quality directly
qualInt = getVal(section, "Quality\\D+(\\d+)").toInt(); qualInt = getVal(section, "Quality\\D+(\\d+)").toInt();
@ -429,8 +429,8 @@ void WirelessAssistant::parseScan( const QString & output )
enc = true; enc = true;
wpaSettings.clear(); wpaSettings.clear();
if ( section.contains("WPA2 Version") ) wpaSettings << "WPA2"; //prefer WPA2 over WPA if ( section.tqcontains("WPA2 Version") ) wpaSettings << "WPA2"; //prefer WPA2 over WPA
else if ( section.contains("WPA Version") ) wpaSettings << "WPA"; else if ( section.tqcontains("WPA Version") ) wpaSettings << "WPA";
wpa = ( !wpaSettings.isEmpty() ); wpa = ( !wpaSettings.isEmpty() );
if (wpa) { if (wpa) {
@ -442,7 +442,7 @@ void WirelessAssistant::parseScan( const QString & output )
// CHECK IF SAME ESSID ALREADY FOUND, if necessary // CHECK IF SAME ESSID ALREADY FOUND, if necessary
if (groupAPs) { if (groupAPs) {
if ( !hidden && essidList.contains(essid) ) { if ( !hidden && essidList.tqcontains(essid) ) {
NetListViewItem* sameEssid = static_cast<NetListViewItem*>(getItemByEssid(essid)); NetListViewItem* sameEssid = static_cast<NetListViewItem*>(getItemByEssid(essid));
sameEssid->setAp("any"); sameEssid->setAp("any");
if (sameEssid->quality() < qualInt) { if (sameEssid->quality() < qualInt) {
@ -485,7 +485,7 @@ bool WirelessAssistant::radioEnabled()
return r; return r;
} }
void WirelessAssistant::setNetParamsFromList( QListViewItem* lvi ) void WirelessAssistant::setNetParamsFromList( TQListViewItem* lvi )
{ {
NetListViewItem *nvi = static_cast<NetListViewItem*>(lvi); NetListViewItem *nvi = static_cast<NetListViewItem*>(lvi);
NetParams.essid = nvi->essid(); NetParams.essid = nvi->essid();
@ -498,12 +498,12 @@ void WirelessAssistant::setNetParamsFromList( QListViewItem* lvi )
NetParams.wpa = ( nvi->enc() && !NetParams.wpaSettings.isEmpty() ); 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") ) { if ( (*nps).section(",",2,2)==s || ( (*nps).section(",",1,1)==s && (*nps).section(",",2,2)=="any") ) {
NetParams.loadNetParamsString( *nps ); 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; return 1;
} }
} }
@ -512,7 +512,7 @@ bool WirelessAssistant::setNetParamsFromConfig( const QString & s )
void WirelessAssistant::itemAction() void WirelessAssistant::itemAction()
{ {
QListViewItem* lvi = netList->selectedItem(); TQListViewItem* lvi = netList->selectedItem();
if (!lvi) if (!lvi)
return; return;
@ -539,7 +539,7 @@ void WirelessAssistant::netAutoConnect()
int bestQuality = 0; int bestQuality = 0;
for ( int i = 0; i < netList->childCount(); i++ ) { for ( int i = 0; i < netList->childCount(); i++ ) {
NetListViewItem* nvi = static_cast<NetListViewItem*>( netList->itemAtIndex(i) ); NetListViewItem* nvi = static_cast<NetListViewItem*>( netList->itemAtIndex(i) );
QString search = nvi->ap(); TQString search = nvi->ap();
if (search == "any") search = nvi->essid(); if (search == "any") search = nvi->essid();
if ( setNetParamsFromConfig(search) ) { if ( setNetParamsFromConfig(search) ) {
if ( nvi->quality() > bestQuality ) { if ( nvi->quality() > bestQuality ) {
@ -552,7 +552,7 @@ void WirelessAssistant::netAutoConnect()
if ( bestItem != -1 ) { if ( bestItem != -1 ) {
NetListViewItem* nvi = static_cast<NetListViewItem*>( netList->itemAtIndex( bestItem ) ); NetListViewItem* nvi = static_cast<NetListViewItem*>( netList->itemAtIndex( bestItem ) );
setNetParamsFromList( nvi ); setNetParamsFromList( nvi );
QString search = nvi->ap(); TQString search = nvi->ap();
if (search == "any") search = nvi->essid(); if (search == "any") search = nvi->essid();
setNetParamsFromConfig( search ); setNetParamsFromConfig( search );
timerConnectionCheck->stop(); timerConnectionCheck->stop();
@ -570,21 +570,21 @@ void WirelessAssistant::netConnect()
setNetParamsFromList( netList->selectedItem() ); setNetParamsFromList( netList->selectedItem() );
//can't connect if WPA needed, and wpa_supplicant and wpa_cli not available //can't connect if WPA needed, and wpa_supplicant and wpa_cli not available
if ( NetParams.wpa && !wpaAvailable ) { if ( NetParams.wpa && !wpaAvailable ) {
KMessageBox::error(0, i18n("<qt><p><b>Can not connect to network '%1'.<b></p><p>The network you are trying to connect to requires WPA authentication. The necessary executables <i>wpa_supplicant</i> and <i>wpa_cli</i> could not be found. Install <i>wpa_supplicant</i> and restart Wireless Assistant to connect.</p></qt>").arg(NetParams.essid) ); KMessageBox::error(0, i18n("<qt><p><b>Can not connect to network '%1'.<b></p><p>The network you are trying to connect to requires WPA authentication. The necessary executables <i>wpa_supplicant</i> and <i>wpa_cli</i> could not be found. Install <i>wpa_supplicant</i> and restart Wireless Assistant to connect.</p></qt>").tqarg(NetParams.essid) );
timerConnectionCheck->start(WA_CONNECTION_CHECK_INTERVAL); //resume connection checking timerConnectionCheck->start(WA_CONNECTION_CHECK_INTERVAL); //resume connection checking
return; return;
} }
QString search = NetParams.ap; TQString search = NetParams.ap;
if (search == "any") search = NetParams.essid; if (search == "any") search = NetParams.essid;
if ( (NetParams.essid=="<hidden>") || (!setNetParamsFromConfig( search )) ) { if ( (NetParams.essid=="<hidden>") || (!setNetParamsFromConfig( search )) ) {
ui_NetParamsWizard *netwiz = new ui_NetParamsWizard; ui_NetParamsWizard *netwiz = new ui_NetParamsWizard;
if (!NetParams.hiddenEssid) 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->setEssidEnabled( NetParams.hiddenEssid );
netwiz->setWepEnabled( NetParams.wep ); netwiz->setWepEnabled( NetParams.wep );
netwiz->setWpaEnabled( NetParams.wpa, NetParams.wpaSettings ); netwiz->setWpaEnabled( NetParams.wpa, NetParams.wpaSettings );
netwiz->exec(); netwiz->exec();
if (netwiz->result()==QDialog::Rejected) { if (netwiz->result()==TQDialog::Rejected) {
delete netwiz; delete netwiz;
timerConnectionCheck->start(WA_CONNECTION_CHECK_INTERVAL); //resume connection checking timerConnectionCheck->start(WA_CONNECTION_CHECK_INTERVAL); //resume connection checking
return; return;
@ -609,9 +609,9 @@ void WirelessAssistant::netConnect()
void WirelessAssistant::updateNetParams() 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 ) { if ( (*nps).section(",",2,2)==NetParams.ap ) {
QString newNps = NetParams.netParamsString(); TQString newNps = NetParams.netParamsString();
if ( newNps!=(*nps) ) { if ( newNps!=(*nps) ) {
(*nps) = newNps; (*nps) = newNps;
WAConfig::self()->writeConfig(); 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 ) { if ( (*nps).section(",",2,2)==ap ) {
return (*nps).section(",",1,1); //essid return (*nps).section(",",1,1); //essid
} }
@ -645,16 +645,16 @@ void WirelessAssistant::netConnect( const WANetParams & np )
if ( !np.preConnectionCommand.isEmpty() ) { if ( !np.preConnectionCommand.isEmpty() ) {
std::cout << "Running pre-connection command: " << np.preConnectionCommand << std::endl; std::cout << "Running pre-connection command: " << np.preConnectionCommand << std::endl;
statusLabel->setText( i18n("Running pre-connection command...") ); 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 } else
std::cout << "No pre-connection command specified." << std::endl; std::cout << "No pre-connection command specified." << std::endl;
statusLabel->setText( i18n("Connecting to '%1'...").arg(np.essid) ); statusLabel->setText( i18n("Connecting to '%1'...").tqarg(np.essid) );
statusLabel->repaint(); statusLabel->tqrepaint();
if (!WATools::isUp(np.iface) ) WATools::setUp( true, np.iface ); if (!WATools::isUp(np.iface) ) WATools::setUp( true, np.iface );
//runCommand( Commands.cmd("ifup", np) ); //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; WANetParams np2 = np;
np2.channel = "0"; np2.channel = "0";
runCommand( Commands.cmd("iwconfig_set", np2) ); runCommand( Commands.cmd("iwconfig_set", np2) );
@ -679,8 +679,8 @@ void WirelessAssistant::netConnect( const WANetParams & np )
//////////////////////// ////////////////////////
///// CONFIGURE IP ADDRESS etc. ///// CONFIGURE IP ADDRESS etc.
if (np.dhcp) { //DHCP config if (np.dhcp) { //DHCP config
QString dhcp_out = runCommand( Commands.cmd("ifconfig_dhcp", np), DhcpTimeout ); TQString 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 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() ) if ( dhcpClientRunning() )
runCommand( Commands.cmd("kill_dhcp", np) ); //kill any stale DHCP client running (seems it's dhclient only) runCommand( Commands.cmd("kill_dhcp", np) ); //kill any stale DHCP client running (seems it's dhclient only)
setUi(1); setUi(1);
@ -698,7 +698,7 @@ void WirelessAssistant::netConnect( const WANetParams & np )
if ( !np.postConnectionCommand.isEmpty() ) { if ( !np.postConnectionCommand.isEmpty() ) {
std::cout << "Running post-connection command: " << np.postConnectionCommand << std::endl; std::cout << "Running post-connection command: " << np.postConnectionCommand << std::endl;
statusLabel->setText( i18n("Running post-connection command...") ); 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 } else
std::cout << "No post-connection command specified." << std::endl; std::cout << "No post-connection command specified." << std::endl;
@ -710,7 +710,7 @@ void WirelessAssistant::netConnect( const WANetParams & np )
if (autoQuit) if (autoQuit)
this->close(); this->close();
groupAPs ? setConnectedItem( np.essid ) : setConnectedItem( np.ap ); 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); setUi(1);
} else { } else {
std::cout << "CONNECTION FAILED." << std::endl; std::cout << "CONNECTION FAILED." << std::endl;
@ -728,7 +728,7 @@ void WirelessAssistant::updateConnectedItem()
connectedItem->setQuality( WATools::quality() ); connectedItem->setQuality( WATools::quality() );
} }
void WirelessAssistant::setConnectedItem( const QString & netid ) void WirelessAssistant::setConnectedItem( const TQString & netid )
{ {
timerConnectionCheck->stop(); //stop timer while changing currentItem timerConnectionCheck->stop(); //stop timer while changing currentItem
if (connectedItem) { if (connectedItem) {
@ -737,8 +737,8 @@ void WirelessAssistant::setConnectedItem( const QString & netid )
connectedItem = 0; connectedItem = 0;
} }
if (!netid.isEmpty()) { if (!netid.isEmpty()) {
QListViewItem* lvi; TQListViewItem* lvi;
if (netid.contains(":")) lvi = getItemByAp( netid ); //netid is an AP address if (netid.tqcontains(":")) lvi = getItemByAp( netid ); //netid is an AP address
else lvi = getItemByEssid( netid ); else lvi = getItemByEssid( netid );
if (lvi) { if (lvi) {
NetListViewItem* nvi = static_cast<NetListViewItem*>(lvi); NetListViewItem* nvi = static_cast<NetListViewItem*>(lvi);
@ -757,29 +757,29 @@ void WirelessAssistant::setConnectedItem( const QString & netid )
void WirelessAssistant::netDisconnect( const bool & quiet ) void WirelessAssistant::netDisconnect( const bool & quiet )
{ {
if ( (quiet) || (KMessageBox::warningContinueCancel(0, i18n("<qt><p>You are about to disconnect from '<b>%1</b>'.</p><p>Would you like to continue?<p></qt>").arg(connectedItem->essid()) )== KMessageBox::Continue ) ) { if ( (quiet) || (KMessageBox::warningContinueCancel(0, i18n("<qt><p>You are about to disconnect from '<b>%1</b>'.</p><p>Would you like to continue?<p></qt>").tqarg(connectedItem->essid()) )== KMessageBox::Continue ) ) {
timerConnectionCheck->stop(); //stop while disconnecting. timerConnectionCheck->stop(); //stop while disconnecting.
if ( !NetParams.preDisconnectionCommand.isEmpty() ) { if ( !NetParams.preDisconnectionCommand.isEmpty() ) {
std::cout << "Running pre-disconnection command: " << NetParams.preDisconnectionCommand << std::endl; std::cout << "Running pre-disconnection command: " << NetParams.preDisconnectionCommand << std::endl;
statusLabel->setText( i18n("Running pre-disconnection command...") ); 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 } else
std::cout << "No pre-disconnection command specified." << std::endl; std::cout << "No pre-disconnection command specified." << std::endl;
statusLabel->setText( i18n("Disconnecting...") ); statusLabel->setText( i18n("Disconnecting...") );
statusLabel->repaint(); statusLabel->tqrepaint();
setConnectedItem( 0 ); setConnectedItem( 0 );
if ( NetParams.dhcp ) { if ( NetParams.dhcp ) {
if ( dhcpClientRunning() ) { if ( dhcpClientRunning() ) {
runCommand( Commands.cmd( "kill_dhcp", NetParams ) ); runCommand( Commands.cmd( "kill_dhcp", NetParams ) );
statusLabel->setText( i18n("Waiting for DHCP client to shut down...") ); statusLabel->setText( i18n("Waiting for DHCP client to shut down...") );
statusLabel->repaint(); statusLabel->tqrepaint();
QTimer* tmr = new QTimer(); TQTimer* tmr = new TQTimer();
tmr->start(1500, true); //wait 1.5sec for dhcp client to really shutdown, single shot. tmr->start(1500, true); //wait 1.5sec for dhcp client to really shutdown, single shot.
while ( tmr->isActive() ) { while ( tmr->isActive() ) {
KApplication::eventLoop()->processEvents( QEventLoop::AllEvents ); KApplication::eventLoop()->processEvents( TQEventLoop::AllEvents );
usleep(75*1000); //75msec on Linux usleep(75*1000); //75msec on Linux
} }
delete tmr; delete tmr;
@ -798,7 +798,7 @@ void WirelessAssistant::netDisconnect( const bool & quiet )
if ( !NetParams.postDisconnectionCommand.isEmpty() ) { if ( !NetParams.postDisconnectionCommand.isEmpty() ) {
std::cout << "Running post-disconnection command: " << NetParams.postDisconnectionCommand << std::endl; std::cout << "Running post-disconnection command: " << NetParams.postDisconnectionCommand << std::endl;
statusLabel->setText( i18n("Running post-disconnection command...") ); 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 } else
std::cout << "No post-disconnection command specified." << std::endl; 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) { while (lvi) {
if ( static_cast<NetListViewItem*>(lvi)-> if ( static_cast<NetListViewItem*>(lvi)->
ap() == ap ) { ap() == ap ) {
@ -823,9 +823,9 @@ QListViewItem* WirelessAssistant::getItemByAp( const QString & ap )
return lvi; return lvi;
} }
QListViewItem* WirelessAssistant::getItemByEssid( const QString & essid ) TQListViewItem* WirelessAssistant::getItemByEssid( const TQString & essid )
{ {
QListViewItem* lvi = netList->firstChild(); TQListViewItem* lvi = netList->firstChild();
while (lvi) { while (lvi) {
if ( static_cast<NetListViewItem*>(lvi)-> if ( static_cast<NetListViewItem*>(lvi)->
essid() == essid ) { essid() == essid ) {
@ -858,7 +858,7 @@ void WirelessAssistant::togglePage(bool options)
buttonScan->setDisabled(options); buttonScan->setDisabled(options);
buttonConnect->setDisabled(options); buttonConnect->setDisabled(options);
if (options) { if (options) {
if (WAConfig::self()->config()->groupList().contains("Notification Messages")>0) if (WAConfig::self()->config()->groupList().tqcontains("Notification Messages")>0)
buttonEnableAllMessages->setEnabled(true); buttonEnableAllMessages->setEnabled(true);
else else
buttonEnableAllMessages->setEnabled(false); buttonEnableAllMessages->setEnabled(false);
@ -878,43 +878,43 @@ void WirelessAssistant::enableAllMessages()
void WirelessAssistant::setMouseBehaviour() void WirelessAssistant::setMouseBehaviour()
{ {
if ( KGlobalSettings::singleClick() ) { if ( KGlobalSettings::singleClick() ) {
disconnect( netList, SIGNAL(selectionChanged(QListViewItem*)), disconnect( netList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
this, SLOT(updateConnectButton(QListViewItem*)) ); this, TQT_SLOT(updateConnectButton(TQListViewItem*)) );
disconnect( netList, SIGNAL(doubleClicked(QListViewItem*, const QPoint &, int)), disconnect( netList, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint &, int)),
this, SLOT(itemAction()) ); this, TQT_SLOT(itemAction()) );
connect( netList, SIGNAL(clicked(QListViewItem*, const QPoint &, int)), connect( netList, TQT_SIGNAL(clicked(TQListViewItem*, const TQPoint &, int)),
this, SLOT(itemAction()) ); this, TQT_SLOT(itemAction()) );
buttonConnect->hide(); buttonConnect->hide();
} else { } else {
disconnect( netList, SIGNAL(clicked(QListViewItem*, const QPoint &, int)), disconnect( netList, TQT_SIGNAL(clicked(TQListViewItem*, const TQPoint &, int)),
this, SLOT(itemAction()) ); this, TQT_SLOT(itemAction()) );
connect( netList, SIGNAL(selectionChanged(QListViewItem*)), connect( netList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
this, SLOT(updateConnectButton(QListViewItem*)) ); this, TQT_SLOT(updateConnectButton(TQListViewItem*)) );
connect( netList, SIGNAL(doubleClicked(QListViewItem*, const QPoint &, int)), connect( netList, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint &, int)),
this, SLOT(itemAction()) ); this, TQT_SLOT(itemAction()) );
buttonConnect->show(); buttonConnect->show();
} }
} }
void WirelessAssistant::updateConnectButton(QListViewItem* lvi) void WirelessAssistant::updateConnectButton(TQListViewItem* lvi)
{ {
QToolTip::remove TQToolTip::remove
(buttonConnect); (buttonConnect);
if ( lvi == connectedItem ) { if ( lvi == connectedItem ) {
buttonConnect->setText( i18n("&Disconnect") ); buttonConnect->setText( i18n("&Disconnect") );
QToolTip::add TQToolTip::add
( buttonConnect, i18n("Disconnect from the selected network") ); ( buttonConnect, i18n("Disconnect from the selected network") );
} else { } else {
buttonConnect->setText( i18n("&Connect") ); buttonConnect->setText( i18n("&Connect") );
QToolTip::add TQToolTip::add
( buttonConnect, i18n("Connect to the selected network") ); ( buttonConnect, i18n("Connect to the selected network") );
} }
} }
void WirelessAssistant::setDev( const QString & ifname) void WirelessAssistant::setDev( const TQString & ifname)
{ {
NetParams.iface = ifname; NetParams.iface = ifname;
WATools::setInterface( ifname ); WATools::setInterface( ifname );
@ -922,67 +922,67 @@ void WirelessAssistant::setDev( const QString & ifname)
netScan(); netScan();
} }
QString WirelessAssistant::runCommand( const QStringList & cmd, int timeout, bool detached ) TQString WirelessAssistant::runCommand( const TQStringList & cmd, int timeout, bool detached )
{ {
if (cmd.isEmpty()) 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. // 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->setArguments( cmd );
p->start(); p->start();
if (detached) { if (detached) {
p = 0; p = 0;
return QString::null; return TQString();
} }
QTimer* timerProc = new QTimer(); //timeout timer TQTimer* timerProc = new TQTimer(); //timeout timer
if ( timeout>0 && !detached ) { 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 timerProc->start(timeout*1000); //convert sec to msec
} }
connect(buttonClose, SIGNAL(clicked()), connect(buttonClose, TQT_SIGNAL(clicked()),
p, SLOT(kill()) ); p, TQT_SLOT(kill()) );
int i = 0; int i = 0;
while ( p->isRunning() ) { // PROCESS USER EVENTS 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...) 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'. if (i==27) { // ca 2sec have passed and the process is still running. Replace the 'Close' button with 'Stop'.
disconnect(buttonClose, SIGNAL(clicked()), disconnect(buttonClose, TQT_SIGNAL(clicked()),
this, SLOT(close()) ); this, TQT_SLOT(close()) );
buttonClose->setIconSet( SmallIconSet("stop") ); buttonClose->setIconSet( SmallIconSet("stop") );
buttonClose->setText( i18n("&Stop") ); buttonClose->setText( i18n("&Stop") );
QToolTip::remove TQToolTip::remove
(buttonClose); (buttonClose);
QToolTip::add TQToolTip::add
( buttonClose, i18n("Terminate current process\n(%1)").arg( p->arguments().join(" ") ) ); ( buttonClose, i18n("Terminate current process\n(%1)").tqarg( p->arguments().join(" ") ) );
} }
i++; i++;
} }
disconnect(buttonClose, SIGNAL(clicked()), disconnect(buttonClose, TQT_SIGNAL(clicked()),
p, SLOT(kill()) ); p, TQT_SLOT(kill()) );
if (i>27) {//set 'stop' back to 'close' if needed if (i>27) {//set 'stop' back to 'close' if needed
connect(buttonClose, SIGNAL(clicked()), connect(buttonClose, TQT_SIGNAL(clicked()),
this, SLOT(close()) ); this, TQT_SLOT(close()) );
buttonClose->setIconSet( SmallIconSet("fileclose") ); buttonClose->setIconSet( SmallIconSet("fileclose") );
buttonClose->setText( i18n("&Quit") ); buttonClose->setText( i18n("&Quit") );
QToolTip::remove TQToolTip::remove
(buttonClose); (buttonClose);
QToolTip::add TQToolTip::add
( buttonClose, i18n("Quit the application") ); ( buttonClose, i18n("Quit the application") );
} }
if (timerProc->isActive()) if (timerProc->isActive())
timerProc->stop(); timerProc->stop();
delete timerProc; delete timerProc;
QString e = QString( p->readStderr() ); TQString e = TQString( p->readStderr() );
QString o = QString( p->readStdout() ); TQString o = TQString( p->readStdout() );
if (!p->normalExit()) { if (!p->normalExit()) {
o.append("::ERR::killed"); o.append("::ERR::killed");
//std::cout << "Process terminated (timed out)." << std::endl; //too much output when checking for internet when it's not available. //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 ); buttonScan->setEnabled( false );
buttonConnect->setEnabled( false ); buttonConnect->setEnabled( false );
buttonOptions->setEnabled( false ); buttonOptions->setEnabled( false );
KApplication::setOverrideCursor( QCursor(Qt::BusyCursor) ); KApplication::setOverrideCursor( TQCursor(TQt::BusyCursor) );
} else { } else {
if (devCombo->count() > 0) { if (devCombo->count() > 0) {
devCombo->setEnabled( true ); 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) if (!i)
return; return;
NetListViewItem *nvi = static_cast<NetListViewItem*>(i); NetListViewItem *nvi = static_cast<NetListViewItem*>(i);
QString search = nvi->ap(); TQString search = nvi->ap();
if (search == "any") search = nvi->essid(); if (search == "any") search = nvi->essid();
bool isConfigured = setNetParamsFromConfig(search); bool isConfigured = setNetParamsFromConfig(search);
@ -1034,21 +1034,21 @@ void WirelessAssistant::showItemContextMenu( QListViewItem* i, const QPoint& p,
icm->insertTitle(nvi->essid()); icm->insertTitle(nvi->essid());
if (isConfigured) { if (isConfigured) {
if (nvi->isConnected()) { if (nvi->isConnected()) {
icm->insertItem( SmallIcon("connect_no"), i18n("Disconnect..."), this, SLOT(netDisconnect()) ); icm->insertItem( SmallIcon("connect_no"), i18n("Disconnect..."), this, TQT_SLOT(netDisconnect()) );
//icm->insertItem( SmallIcon("reload"), i18n("Reconnect"), this, SLOT(netConnect()) ); //icm->insertItem( SmallIcon("reload"), i18n("Reconnect"), this, TQT_SLOT(netConnect()) );
} else } 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->insertSeparator();
icm->insertItem(i18n("Forget Settings..."), this, SLOT(removeNetParams()) ); icm->insertItem(i18n("Forget Settings..."), this, TQT_SLOT(removeNetParams()) );
icm->insertItem(i18n("Edit Settings..."), this, SLOT(editNetParams()) ); icm->insertItem(i18n("Edit Settings..."), this, TQT_SLOT(editNetParams()) );
} else { } else {
if (nvi->isConnected()) { if (nvi->isConnected()) {
icm->insertItem( SmallIcon("connect_no"), i18n("Disconnect..."), this, SLOT(netDisconnect()) ); icm->insertItem( SmallIcon("connect_no"), i18n("Disconnect..."), this, TQT_SLOT(netDisconnect()) );
//icm->insertItem( SmallIcon("reload"), i18n("Configure and Reconnect..."), this, SLOT(netConnect()) ); //icm->insertItem( SmallIcon("reload"), i18n("Configure and Reconnect..."), this, TQT_SLOT(netConnect()) );
} else } 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() void WirelessAssistant::editNetParams()
@ -1059,9 +1059,9 @@ void WirelessAssistant::editNetParams()
ui_NetParamsEdit *netedit = new ui_NetParamsEdit(); ui_NetParamsEdit *netedit = new ui_NetParamsEdit();
netedit->setValues( NetParams ); netedit->setValues( NetParams );
netedit->setCaption( i18n("%1 Settings").arg(NetParams.essid) ); netedit->setCaption( i18n("%1 Settings").tqarg(NetParams.essid) );
netedit->exec(); netedit->exec();
if (netedit->result() == QDialog::Rejected) { if (netedit->result() == TQDialog::Rejected) {
delete netedit; delete netedit;
return; return;
} else { //accepted } else { //accepted
@ -1081,16 +1081,16 @@ void WirelessAssistant::setNetListColumns()
bool WirelessAssistant::dhcpClientRunning() bool WirelessAssistant::dhcpClientRunning()
{ {
QStringList pidPaths; TQStringList pidPaths;
QString pidFile; TQString pidFile;
pidPaths << "/etc/" << "/etc/dhcpc/" << "/var/run/"; pidPaths << "/etc/" << "/etc/dhcpc/" << "/var/run/";
if ( Commands.dhcpClient=="dhcpcd" ) if ( Commands.dhcpClient=="dhcpcd" )
pidFile = QString("dhcpcd-%1.pid").arg(NetParams.iface); pidFile = TQString("dhcpcd-%1.pid").tqarg(NetParams.iface);
else else
pidFile = QString("dhclient.pid"); pidFile = TQString("dhclient.pid");
for ( QStringList::Iterator it = pidPaths.begin(); it != pidPaths.end(); ++it ) { for ( TQStringList::Iterator it = pidPaths.begin(); it != pidPaths.end(); ++it ) {
if ( QFile( QString(*it).append(pidFile) ).exists() ) { if ( TQFile( TQString(*it).append(pidFile) ).exists() ) {
std::cout << "Running DHCP client found." << std::endl; std::cout << "Running DHCP client found." << std::endl;
return true; return true;
} }
@ -1099,13 +1099,13 @@ bool WirelessAssistant::dhcpClientRunning()
return false; return false;
} }
QStringList WirelessAssistant::interfaceList() TQStringList WirelessAssistant::interfaceList()
{ {
QDir d("/sys/class/net"); TQDir d("/sys/class/net");
QStringList ifList = d.entryList( QDir::Dirs ); TQStringList ifList = d.entryList( TQDir::Dirs );
ifList.remove("."); ifList.remove(".."); ifList.remove("lo"); ifList.remove("."); ifList.remove(".."); ifList.remove("lo");
std::cout << "All interfaces: " << ifList.join(", ") << std::endl; 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; const char* i = *nps;
bool w = WATools::isWireless( i ); bool w = WATools::isWireless( i );
if ( !WATools::isWireless( (const char*)*nps ) ) { if ( !WATools::isWireless( (const char*)*nps ) ) {
@ -1115,18 +1115,18 @@ QStringList WirelessAssistant::interfaceList()
return ifList; 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); rx.search(str);
return rx.cap(1).stripWhiteSpace(); 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 // 0 WPA version (1 or 2), 1 group, 2 pairwise, 3 suite
if ( wpaSettings.isEmpty() ) return QString(); if ( wpaSettings.isEmpty() ) return TQString();
QString c = "ctrl_interface=/var/run/wpa_supplicant\nnetwork={\nscan_ssid=0\nssid=\""; //fast_reauth=1\n TQString c = "ctrl_interface=/var/run/wpa_supplicant\nnetwork={\nscan_ssid=0\nssid=\""; //fast_reauth=1\n
c.append(essid).append("\"\n"); c.append(essid).append("\"\n");
// WPA version // WPA version
@ -1134,8 +1134,8 @@ bool WirelessAssistant::generateWpaConfigFile( const QString& essid, const QStri
//WPA authentication suite //WPA authentication suite
c.append("key_mgmt="); c.append("key_mgmt=");
if ( wpaSettings[3].contains("PSK") ) c.append("WPA-PSK\n"); if ( wpaSettings[3].tqcontains("PSK") ) c.append("WPA-PSK\n");
else return QString(); // not supported else return TQString(); // not supported
//WPA pairwise cipher //WPA pairwise cipher
c.append("pairwise="); c.append("pairwise=");
@ -1146,7 +1146,7 @@ bool WirelessAssistant::generateWpaConfigFile( const QString& essid, const QStri
c.append( wpaSettings[1] ).append("\n"); c.append( wpaSettings[1] ).append("\n");
//WPA key //WPA key
QString k = QString(); TQString k = TQString();
if (wpaKey.left(2)=="s:") { // PASSPHRASE if (wpaKey.left(2)=="s:") { // PASSPHRASE
k.append("\""); k.append("\"");
k.append( wpaKey.right( wpaKey.length() - 2 ) ); k.append( wpaKey.right( wpaKey.length() - 2 ) );
@ -1170,10 +1170,10 @@ bool WirelessAssistant::generateWpaConfigFile( const QString& essid, const QStri
// psk=your_psk_here // psk=your_psk_here
// } // }
QFile file( wpaConfigFile ); TQFile file( wpaConfigFile );
if (file.exists()) file.remove(); if (file.exists()) file.remove();
if ( file.open( IO_WriteOnly ) ) { if ( file.open( IO_WriteOnly ) ) {
QTextStream stream( &file ); TQTextStream stream( &file );
stream << c; stream << c;
file.close(); file.close();
//std::cout << "Wrote WPA config: " << wpaConfigFile << std::endl; //std::cout << "Wrote WPA config: " << wpaConfigFile << std::endl;
@ -1182,42 +1182,42 @@ bool WirelessAssistant::generateWpaConfigFile( const QString& essid, const QStri
return 0; 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 (!e) {
if ( runCommand( QStringList(Commands.wpa_cli) << QString("-i%1").arg(NetParams.iface) << "terminate" ).contains("OK") ) { if ( runCommand( TQStringList(Commands.wpa_cli) << TQString("-i%1").tqarg(NetParams.iface) << "terminate" ).tqcontains("OK") ) {
QFile( wpaConfigFile ).remove(); TQFile( wpaConfigFile ).remove();
return 1; return 1;
} else } else
return 0; // wpa client was not running. 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; std::cout << "WPA client already running. Reconfiguring..." << std::endl;
runCommand( QStringList(Commands.wpa_cli) << "reconfigure" ); runCommand( TQStringList(Commands.wpa_cli) << "reconfigure" );
} else { } else {
if ( driver.isEmpty() ) { //detect needed driver if ( driver.isEmpty() ) { //detect needed driver
QString k = WATools::kernelModule( iface ); TQString k = WATools::kernelModule( iface );
if ( k.contains("hermes") ) driver = "hermes"; if ( k.tqcontains("hermes") ) driver = "hermes";
else if ( k.contains("atmel") ) driver = "atmel"; else if ( k.tqcontains("atmel") ) driver = "atmel";
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13) #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 #endif
//Commented out, because ndiswrapper newer than 1.13 works with wext driver. //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. //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"; else driver = "wext";
std::cout << "Using wpa_supplicant driver: " << driver << std::endl; std::cout << "Using wpa_supplicant driver: " << driver << std::endl;
} }
QProcess* wp = new QProcess( this ); TQProcess* wp = new TQProcess( TQT_TQOBJECT(this) );
wp->clearArguments(); wp->clearArguments();
wp->addArgument( Commands.wpa_supplicant ); wp->addArgument( Commands.wpa_supplicant );
wp->addArgument( "-W" ); //wait for control interface wp->addArgument( "-W" ); //wait for control interface
wp->addArgument( QString("-D%1").arg(driver) ); wp->addArgument( TQString("-D%1").tqarg(driver) );
wp->addArgument( QString("-i%1").arg(iface) ); wp->addArgument( TQString("-i%1").tqarg(iface) );
wp->addArgument( QString("-c%1").arg(wpaConfigFile) ); wp->addArgument( TQString("-c%1").tqarg(wpaConfigFile) );
//std::cout << "Starting WPA client: " << wp->arguments().join(" ") << std::endl; //std::cout << "Starting WPA client: " << wp->arguments().join(" ") << std::endl;
if ( !wp->start() ) { if ( !wp->start() ) {
std::cout << "Failed to start WPA client." << std::endl; 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 usleep(200*1000); //200msec for wpa_supplicant to initiate
QString o; TQString o;
int i = 0; 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++) { for (int c = 0; c < 15; c++) {
usleep(75*1000); //75msec usleep(75*1000); //75msec
KApplication::eventLoop()->processEvents( QEventLoop::AllEvents ); KApplication::eventLoop()->processEvents( TQEventLoop::AllEvents );
i++; i++;
} }
if (i>400) { //more than 30sec have passed 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; return 0;
} }
if ( o.contains("wpa_state=COMPLETED") ) { if ( o.tqcontains("wpa_state=COMPLETED") ) {
std::cout << "WPA Authorisation successful." << std::endl; std::cout << "WPA Authorisation successful." << std::endl;
return 1; return 1;
} }
@ -1257,7 +1257,7 @@ bool WirelessAssistant::close()
std::cout << "Application options saved." << std::endl; std::cout << "Application options saved." << std::endl;
WATools::cleanup(); WATools::cleanup();
std::cout << "Kernel socket closed." << std::endl; std::cout << "Kernel socket closed." << std::endl;
return QWidget::close(); return TQWidget::close();
} }

@ -29,20 +29,21 @@
#include "netparams.h" #include "netparams.h"
class QTimer; class TQTimer;
class QProcess; class TQProcess;
class NetListViewItem; class NetListViewItem;
class WirelessAssistant : public mainWindow class WirelessAssistant : public mainWindow
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
/*$PUBLIC_FUNCTIONS$*/ /*$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(); ~WirelessAssistant();
static QString getVal(const QString & str, const QString & rxs); static TQString getVal(const TQString & str, const TQString & rxs);
public slots: public slots:
/*$PUBLIC_SLOTS$*/ /*$PUBLIC_SLOTS$*/
@ -58,24 +59,24 @@ private:
void saveSettings(); void saveSettings();
void setUi(int uiState); void setUi(int uiState);
void setSingleClick(bool i); void setSingleClick(bool i);
QString runCommand( const QStringList & cmd, int timeout = 0, bool detached = 0 ); TQString runCommand( const TQStringList & cmd, int timeout = 0, bool detached = 0 );
void setNetParamsFromList( QListViewItem* lvi ); void setNetParamsFromList( TQListViewItem* lvi );
bool setNetParamsFromConfig( const QString & s ); bool setNetParamsFromConfig( const TQString & s );
QString matchEssidForAp( const QString & ap ); TQString matchEssidForAp( const TQString & ap );
bool radioEnabled(); bool radioEnabled();
QListViewItem* getItemByAp( const QString & ap ); TQListViewItem* getItemByAp( const TQString & ap );
QListViewItem* getItemByEssid( const QString & essid ); TQListViewItem* getItemByEssid( const TQString & essid );
void setConnectedItem( const QString & netid ); void setConnectedItem( const TQString & netid );
QString getGateway(); TQString getGateway();
bool dhcpClientRunning(); bool dhcpClientRunning();
QStringList interfaceList(); TQStringList interfaceList();
bool generateWpaConfigFile( const QString& essid, const QStringList& wpaSettings, const QString& wpaKey ); bool generateWpaConfigFile( const TQString& essid, const TQStringList& wpaSettings, const TQString& wpaKey );
bool setWpaClientEnabled( bool e, const QString& iface = 0, QString driver = 0 ); bool setWpaClientEnabled( bool e, const TQString& iface = 0, TQString driver = 0 );
QStringList NetParamsList; TQStringList NetParamsList;
QStringList execsNotFound; TQStringList execsNotFound;
NetListViewItem* connectedItem; NetListViewItem* connectedItem;
QString wpaConfigFile; TQString wpaConfigFile;
/// settings saved in wlassistantrc /// settings saved in wlassistantrc
bool autoQuit; bool autoQuit;
bool autoReconnect; bool autoReconnect;
@ -84,33 +85,33 @@ private:
bool wpaAvailable; bool wpaAvailable;
int DelayBeforeScanning; int DelayBeforeScanning;
int DhcpTimeout; int DhcpTimeout;
/*QString dhcpcdInfoPath; /*TQString dhcpcdInfoPath;
QString dhclientInfoPath; TQString dhclientInfoPath;
QString dhcpcdPidPath; TQString dhcpcdPidPath;
QString dhclientPidPath;*/ TQString dhclientPidPath;*/
/// end settings. /// end settings.
WACommands Commands; WACommands Commands;
WANetParams NetParams; WANetParams NetParams;
QTimer* timerGui; TQTimer* timerGui;
QTimer* timerConnectionCheck; TQTimer* timerConnectionCheck;
protected slots: protected slots:
/*$PROTECTED_SLOTS$*/ /*$PROTECTED_SLOTS$*/
virtual void init(); virtual void init();
virtual void netAutoConnect(); virtual void netAutoConnect();
virtual void parseScan( const QString & output ); virtual void parseScan( const TQString & output );
virtual void setDev( const QString & ifname); virtual void setDev( const TQString & ifname);
virtual void setNetListColumns(); virtual void setNetListColumns();
virtual void updateConfiguration(int category = -1); virtual void updateConfiguration(int category = -1);
virtual void updateConnectedItem(); 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 editNetParams();
virtual void removeNetParams(); virtual void removeNetParams();
virtual void updateNetParams(); virtual void updateNetParams();
virtual void itemAction(); virtual void itemAction();
virtual void checkConnectionStatus(); virtual void checkConnectiontqStatus();
virtual void updateConnectButton(QListViewItem* lvi); virtual void updateConnectButton(TQListViewItem* lvi);
virtual void setMouseBehaviour(); virtual void setMouseBehaviour();
virtual void togglePage(bool options ); virtual void togglePage(bool options );
virtual void enableAllMessages(); virtual void enableAllMessages();

Loading…
Cancel
Save