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 14 years ago
parent 2e4e9860d4
commit 2f791ecf18

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

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

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

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

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

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

@ -22,42 +22,42 @@
#define WA_NETPARAMS_H
#include <iostream>
#include <qfile.h>
#include <tqfile.h>
#include <kmessagebox.h>
#include <klocale.h>
class WANetParams
{
public:
QString iface;
QString essid;
//QString mode;
QString channel;
QString ap;
TQString iface;
TQString essid;
//TQString mode;
TQString channel;
TQString ap;
bool wep;
QString wepMode;
QString wepKey;
TQString wepMode;
TQString wepKey;
bool wpa;
QStringList wpaSettings;
QString wpaKey;
TQStringList wpaSettings;
TQString wpaKey;
bool dhcp;
QString ip;
QString netmask;
QString broadcast;
QString gateway;
QString domain;
QString dns1;
QString dns2;
TQString ip;
TQString nettqmask;
TQString broadcast;
TQString gateway;
TQString domain;
TQString dns1;
TQString dns2;
bool hiddenEssid;
bool wasHiddenEssid;
bool wasWep;
QString preConnectionCommand;
QString postConnectionCommand;
QString preDisconnectionCommand;
QString postDisconnectionCommand;
TQString preConnectionCommand;
TQString postConnectionCommand;
TQString preDisconnectionCommand;
TQString postDisconnectionCommand;
int preConnectionTimeout;
int postConnectionTimeout;
int preDisconnectionTimeout;
@ -79,7 +79,7 @@ public:
r = true;
}
if ( (hiddenEssid) && (!wasHiddenEssid) )
if ( KMessageBox::questionYesNo(0, i18n("<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;
wasHiddenEssid = hiddenEssid;
@ -87,19 +87,19 @@ public:
return r;
}
QString netParamsString()
TQString netParamsString()
{
QStringList mNPS;
mNPS << boolToString(hiddenEssid) << essid << ap << channel << boolToString(wep) << wepMode << wepKey << boolToString(dhcp) << ip << netmask << broadcast << gateway << domain << dns1 << dns2 << boolToString(wasHiddenEssid) << boolToString(wasWep) << \
preConnectionCommand << QString::number(preConnectionTimeout) << boolToString(preConnectionDetached) << \
postConnectionCommand << QString::number(postConnectionTimeout) << boolToString(postConnectionDetached) << \
preDisconnectionCommand << QString::number(preDisconnectionTimeout) << boolToString(preDisconnectionDetached) << \
postDisconnectionCommand << QString::number(postDisconnectionTimeout) << boolToString(postDisconnectionDetached) << \
TQStringList mNPS;
mNPS << boolToString(hiddenEssid) << essid << ap << channel << boolToString(wep) << wepMode << wepKey << boolToString(dhcp) << ip << nettqmask << broadcast << gateway << domain << dns1 << dns2 << boolToString(wasHiddenEssid) << boolToString(wasWep) << \
preConnectionCommand << TQString::number(preConnectionTimeout) << boolToString(preConnectionDetached) << \
postConnectionCommand << TQString::number(postConnectionTimeout) << boolToString(postConnectionDetached) << \
preDisconnectionCommand << TQString::number(preDisconnectionTimeout) << boolToString(preDisconnectionDetached) << \
postDisconnectionCommand << TQString::number(postDisconnectionTimeout) << boolToString(postDisconnectionDetached) << \
wpaSettings.join(",") << wpaKey;
return mNPS.join(",");
}
void loadNetParamsString( const QString & nps )
void loadNetParamsString( const TQString & nps )
{
/*if (nps.section(",",0,0)=="true")
hiddenEssid=true;
@ -116,7 +116,7 @@ public:
wepKey = nps.section(",",6,6);
dhcp = ( nps.section(",",7,7) == "true" );
ip = nps.section(",",8,8);
netmask = nps.section(",",9,9);
nettqmask = nps.section(",",9,9);
broadcast = nps.section(",",10,10);
gateway = nps.section(",",11,11);
domain = nps.section(",",12,12);
@ -140,14 +140,14 @@ public:
postDisconnectionCommand = nps.section(",",26,26);
postDisconnectionTimeout = nps.section(",",27,27).toInt();
postDisconnectionDetached = ( nps.section(",",28,28) == "true" );
wpaSettings = QStringList::split( ",", nps.section(",",29,32) ); // 4 fields
wpaSettings = TQStringList::split( ",", nps.section(",",29,32) ); // 4 fields
wpaKey = nps.section(",",33,33);
}
private:
QString boolToString( bool b )
TQString boolToString( bool b )
{
QString result;
TQString result;
b ? result = "true" : result = "false";
return result;
}
@ -157,11 +157,11 @@ class WACommands
{
public:
bool allFound;
QStringList notFound;
TQStringList notFound;
void init()
{
QStringList binDirs;
TQStringList binDirs;
binDirs << "/sbin" << "/usr/sbin" << "/usr/local/sbin" << "/bin" << "/usr/bin" << "/usr/local/bin";
wpa_supplicant = getPath("wpa_supplicant", binDirs);
@ -187,9 +187,9 @@ public:
std::cout << "All executables found." << std::endl;
}
QStringList cmd( const QString & action, const WANetParams & np, const bool & quiet = false )
TQStringList cmd( const TQString & action, const WANetParams & np, const bool & quiet = false )
{
QStringList mCmd;
TQStringList mCmd;
/*if (action=="ifup")
mCmd << ifconfig << np.iface << "up";
@ -234,8 +234,8 @@ public:
} else if (action=="ifconfig_manual") {
mCmd << ifconfig << np.iface << np.ip;
if (!np.netmask.isEmpty())
mCmd << "netmask" << np.netmask;
if (!np.nettqmask.isEmpty())
mCmd << "nettqmask" << np.nettqmask;
if (!np.broadcast.isEmpty())
mCmd << "broadcast" << np.broadcast;
@ -250,31 +250,31 @@ public:
} else
std::cout << "Unknown action: " << action << std::endl;
if ( (!mCmd.isEmpty()) && (!quiet) ) {//mCmd = QStringList();
QString mCmdString = mCmd.join(" ");
if (!np.wepKey.isEmpty()) mCmdString.replace(np.wepKey, "xxxxxxxxxx");
if ( (!mCmd.isEmpty()) && (!quiet) ) {//mCmd = TQStringList();
TQString mCmdString = mCmd.join(" ");
if (!np.wepKey.isEmpty()) mCmdString.tqreplace(np.wepKey, "xxxxxxxxxx");
std::cout << action << ": " << mCmdString << std::endl;
}
return mCmd;
}
QString route;
QString dhcpClient;
QString wpa_supplicant;
QString wpa_cli;
TQString route;
TQString dhcpClient;
TQString wpa_supplicant;
TQString wpa_cli;
private:
QString ifconfig;
QString iwconfig;
QString iwlist;
QString dhcp;
QString pidof;
TQString ifconfig;
TQString iwconfig;
TQString iwlist;
TQString dhcp;
TQString pidof;
QString getPath(QString file, QStringList dirs)
TQString getPath(TQString file, TQStringList dirs)
{
QString s;
for ( QStringList::Iterator it = dirs.begin(); it != dirs.end(); it++ ) {
if (QFile( QString(*it+"/"+file) ).exists()) {
s = QString(*it+"/"+file);
TQString s;
for ( TQStringList::Iterator it = dirs.begin(); it != dirs.end(); it++ ) {
if (TQFile( TQString(*it+"/"+file) ).exists()) {
s = TQString(*it+"/"+file);
break;
}
}

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

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

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>mainWindow</class>
<widget class="QDialog">
<widget class="TQDialog">
<property name="name">
<cstring>mainWindow</cstring>
</property>
@ -23,7 +23,7 @@
<property name="name">
<cstring>buttonOptions</cstring>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@ -75,7 +75,7 @@
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>120</width>
<height>0</height>
@ -129,16 +129,16 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>21</width>
<height>120</height>
</size>
</property>
</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">
<cstring>layout16</cstring>
<cstring>tqlayout16</cstring>
</property>
<vbox>
<property name="name">
@ -147,7 +147,7 @@
<property name="margin">
<number>0</number>
</property>
<widget class="QFrame">
<widget class="TQFrame">
<property name="name">
<cstring>frameDevice</cstring>
</property>
@ -172,7 +172,7 @@
<property name="margin">
<number>0</number>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>devLabel</cstring>
</property>
@ -184,7 +184,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>0</width>
<height>20</height>
@ -209,7 +209,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>60</width>
<height>0</height>
@ -226,7 +226,7 @@
</widget>
</hbox>
</widget>
<widget class="QWidgetStack">
<widget class="TQWidgetStack">
<property name="name">
<cstring>widgetStack</cstring>
</property>
@ -247,7 +247,7 @@
<property name="lineWidth">
<number>2</number>
</property>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>netPage</cstring>
</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>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>statusLabel</cstring>
</property>
@ -350,7 +350,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>0</width>
<height>20</height>
@ -362,17 +362,17 @@
<property name="text">
<string>Ready</string>
</property>
<property name="alignment">
<property name="tqalignment">
<set>WordBreak|AlignVCenter</set>
</property>
<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>
</property>
</widget>
</grid>
</widget>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>optionsPage</cstring>
</property>
@ -383,15 +383,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout20</cstring>
<cstring>tqlayout20</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>checkAutoConnect</cstring>
</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>
</property>
</widget>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>checkAutoReconnect</cstring>
</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>
</property>
</widget>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>checkAutoQuit</cstring>
</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>
</property>
</widget>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>checkGroupAPs</cstring>
</property>
@ -453,23 +453,23 @@
</widget>
</vbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout17</cstring>
<cstring>tqlayout17</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout12</cstring>
<cstring>tqlayout12</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>textLabel2_2</cstring>
</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>
</property>
</widget>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@ -503,9 +503,9 @@
</widget>
</vbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout13</cstring>
<cstring>tqlayout13</cstring>
</property>
<vbox>
<property name="name">
@ -521,7 +521,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>21</width>
<height>20</height>
@ -538,7 +538,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>21</width>
<height>20</height>
@ -547,15 +547,15 @@
</spacer>
</vbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout14</cstring>
<cstring>tqlayout14</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QSpinBox">
<widget class="TQSpinBox">
<property name="name">
<cstring>spinDelayBeforeScanning</cstring>
</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>
</property>
</widget>
<widget class="QSpinBox">
<widget class="TQSpinBox">
<property name="name">
<cstring>spinDhcpTimeout</cstring>
</property>
@ -607,9 +607,9 @@
</widget>
</vbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout15</cstring>
<cstring>tqlayout15</cstring>
</property>
<vbox>
<property name="name">
@ -625,7 +625,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>101</width>
<height>21</height>
@ -642,7 +642,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>118</width>
<height>21</height>
@ -653,7 +653,7 @@
</widget>
</hbox>
</widget>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</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>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout19</cstring>
<cstring>tqlayout19</cstring>
</property>
<hbox>
<property name="name">
@ -679,14 +679,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>201</width>
<height>21</height>
</size>
</property>
</spacer>
<widget class="QPushButton">
<widget class="TQPushButton">
<property name="name">
<cstring>buttonEnableAllMessages</cstring>
</property>
@ -713,7 +713,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>20</width>
<height>31</height>
@ -738,16 +738,16 @@
<tabstop>spinDhcpTimeout</tabstop>
<tabstop>buttonEnableAllMessages</tabstop>
</tabstops>
<slots>
<Q_SLOTS>
<slot>netScan()</slot>
<slot>netConnect()</slot>
<slot>showCfgDlg()</slot>
<slot>setDeviceList()</slot>
</slots>
</Q_SLOTS>
<functions>
<function>updateStatus(char sts)</function>
<function>updatetqStatus(char sts)</function>
</functions>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kpushbutton.h</includehint>
<includehint>kpushbutton.h</includehint>

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

@ -28,9 +28,10 @@ class WANetParams;
class ui_NetParamsEdit : public netProperties
{
Q_OBJECT
TQ_OBJECT
public:
ui_NetParamsEdit(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
ui_NetParamsEdit(TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~ui_NetParamsEdit();
/*$PUBLIC_FUNCTIONS$*/
//void setWepEnabled( bool w );

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

@ -28,13 +28,14 @@ class WANetParams;
class ui_NetParamsWizard : public NetParamsWizard
{
Q_OBJECT
TQ_OBJECT
public:
ui_NetParamsWizard(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
ui_NetParamsWizard(TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~ui_NetParamsWizard();
/*$PUBLIC_FUNCTIONS$*/
void setWepEnabled( bool w );
void setWpaEnabled( bool w, QStringList settings = QStringList() );
void setWpaEnabled( bool w, TQStringList settings = TQStringList() );
void setEssidEnabled( bool e );
WANetParams readNetParams( WANetParams & np );

@ -16,7 +16,7 @@ WAConfig *WAConfig::self()
}
WAConfig::WAConfig( )
: KConfigSkeleton( QString::fromLatin1( "wlassistantrc" ) )
: KConfigSkeleton( TQString::tqfromLatin1( "wlassistantrc" ) )
{
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
if (std_qual > 100) std_qual = 100;
// std::cout << "* QUALITY: " << std_qual << std::endl;
// std::cout << "* TQUALITY: " << std_qual << std::endl;
return std_qual;
}

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

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

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

Loading…
Cancel
Save