summaryrefslogtreecommitdiffstats
path: root/knetworkconf
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:25:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:25:18 +0000
commitaa3a1ca934bc541bddd3fa136a85f106f7da266e (patch)
tree9ad0b795aed8fa4ac30c2fe0fd1aacb8175714c0 /knetworkconf
parentb10cf7066791a2f362495890cd50c984e8025412 (diff)
downloadtdeadmin-aa3a1ca934bc541bddd3fa136a85f106f7da266e.tar.gz
tdeadmin-aa3a1ca934bc541bddd3fa136a85f106f7da266e.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1157635 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knetworkconf')
-rw-r--r--knetworkconf/knetworkconf/kadddevicecontainer.cpp70
-rw-r--r--knetworkconf/knetworkconf/kadddevicecontainer.h26
-rw-r--r--knetworkconf/knetworkconf/kadddevicedlgextension.ui.h2
-rw-r--r--knetworkconf/knetworkconf/kaddknownhostdlg.ui.h4
-rw-r--r--knetworkconf/knetworkconf/kaddressvalidator.cpp32
-rw-r--r--knetworkconf/knetworkconf/kaddressvalidator.h24
-rw-r--r--knetworkconf/knetworkconf/kdnsinfo.cpp20
-rw-r--r--knetworkconf/knetworkconf/kdnsinfo.h36
-rw-r--r--knetworkconf/knetworkconf/kknownhostinfo.cpp10
-rw-r--r--knetworkconf/knetworkconf/kknownhostinfo.h18
-rw-r--r--knetworkconf/knetworkconf/knetworkconf.cpp262
-rw-r--r--knetworkconf/knetworkconf/knetworkconf.h88
-rw-r--r--knetworkconf/knetworkconf/knetworkconfdlg.ui.h4
-rw-r--r--knetworkconf/knetworkconf/knetworkconfigparser.cpp360
-rw-r--r--knetworkconf/knetworkconf/knetworkconfigparser.h80
-rw-r--r--knetworkconf/knetworkconf/knetworkconfmodule.cpp14
-rw-r--r--knetworkconf/knetworkconf/knetworkconfmodule.h6
-rw-r--r--knetworkconf/knetworkconf/knetworkinfo.cpp20
-rw-r--r--knetworkconf/knetworkconf/knetworkinfo.h34
-rw-r--r--knetworkconf/knetworkconf/knetworkinterface.cpp44
-rw-r--r--knetworkconf/knetworkconf/knetworkinterface.h68
-rw-r--r--knetworkconf/knetworkconf/kprofileslistviewtooltip.h50
-rw-r--r--knetworkconf/knetworkconf/kroutinginfo.cpp24
-rw-r--r--knetworkconf/knetworkconf/kroutinginfo.h38
-rw-r--r--knetworkconf/knetworkconf/kwirelessinterface.cpp12
-rw-r--r--knetworkconf/knetworkconf/kwirelessinterface.h20
-rw-r--r--knetworkconf/knetworkconf/main.cpp2
27 files changed, 684 insertions, 684 deletions
diff --git a/knetworkconf/knetworkconf/kadddevicecontainer.cpp b/knetworkconf/knetworkconf/kadddevicecontainer.cpp
index 7ed7e0f..129d5c9 100644
--- a/knetworkconf/knetworkconf/kadddevicecontainer.cpp
+++ b/knetworkconf/knetworkconf/kadddevicecontainer.cpp
@@ -17,7 +17,7 @@
***************************************************************************/
#include "kadddevicecontainer.h"
-KAddDeviceContainer::KAddDeviceContainer(QWidget *parent, const char *name)
+KAddDeviceContainer::KAddDeviceContainer(TQWidget *parent, const char *name)
: KDialog(parent, name)
{
_modified = false;
@@ -29,16 +29,16 @@ KAddDeviceContainer::KAddDeviceContainer(QWidget *parent, const char *name)
//Create dialog that contains the KAddDeviceDlg and KAddDeviceWifiExt (when
//configuring a wireless interface) widgets
- QPixmap activeEthernetDeviceImg(BarIcon("network_connected_lan_knc"));
+ TQPixmap activeEthernetDeviceImg(BarIcon("network_connected_lan_knc"));
setIcon(activeEthernetDeviceImg);
//First create a main QHBoxLayout
- mainLayout = new QVBoxLayout( this, 10, 2, "mainLayout");
+ mainLayout = new TQVBoxLayout( this, 10, 2, "mainLayout");
//Create the Addvanced settings, Ok and Cancel buttons and add them to a QHBoxLayout
- buttonsLayout = new QHBoxLayout( 0, 0, 4, "buttonsLayout");
+ buttonsLayout = new TQHBoxLayout( 0, 0, 4, "buttonsLayout");
kpbAdvanced = new KPushButton( this, "kpbAdvanced" );
buttonsLayout->addWidget( kpbAdvanced );
- buttonsSpacer = new QSpacerItem( 70, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ buttonsSpacer = new TQSpacerItem( 70, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
buttonsLayout->addItem( buttonsSpacer );
kpbApply = new KPushButton( this, "kpbApply" );
@@ -49,47 +49,47 @@ KAddDeviceContainer::KAddDeviceContainer(QWidget *parent, const char *name)
kpbCancel = new KPushButton( this, "kpbCancel" );
buttonsLayout->addWidget( kpbCancel );
- setCaption( QString::null );
+ setCaption( TQString::null );
kpbAdvanced->setText( i18n( "&Advanced Settings" ) );
- QToolTip::add( kpbAdvanced, i18n( "Toggle between advanced and basic settings" ) );
- QWhatsThis::add( kpbAdvanced, i18n( "Toggle between advanced and basic settings" ) );
+ TQToolTip::add( kpbAdvanced, i18n( "Toggle between advanced and basic settings" ) );
+ TQWhatsThis::add( kpbAdvanced, i18n( "Toggle between advanced and basic settings" ) );
kpbApply->setText( i18n( "&OK" ) );
- QToolTip::add( kpbApply, i18n( "Apply changes" ) );
+ TQToolTip::add( kpbApply, i18n( "Apply changes" ) );
kpbCancel->setText( i18n( "&Cancel" ) );
- QToolTip::add( kpbCancel, i18n( "Forget changes" ) );
+ TQToolTip::add( kpbCancel, i18n( "Forget changes" ) );
//Creat and add the KAddDeviceDlg widget to the main layout
addDlg = new KAddDeviceDlg(this);
mainLayout->addWidget(addDlg);
- mainLayout->setResizeMode(QLayout::Auto);
+ mainLayout->setResizeMode(TQLayout::Auto);
//Setup connections
- connect((KAddDeviceDlgExtension*)extension(),SIGNAL(valueChangedSignal(int)),this,SLOT(toggleApplyButtonSlot(int)));
- connect(addDlg->kleIPAddress,SIGNAL(textChanged(const QString&)),this,SLOT(toggleApplyButtonSlot(const QString&)));
-// connect(addDlg->kleGateway,SIGNAL(textChanged(const QString&)),this,SLOT(toggleApplyButtonSlot(const QString&)));
- connect(addDlg->kcbNetmask,SIGNAL(activated(int)),this,SLOT(toggleApplyButtonSlot(int)));
- connect(addDlg->kcbAutoBootProto,SIGNAL(activated(const QString&)),this,SLOT(toggleApplyButtonSlot(const QString&)));
- connect(addDlg->kcbstartAtBoot,SIGNAL(stateChanged(int)),this,SLOT(toggleApplyButtonSlot(int)));
- connect(addDlg->rbBootProtoAuto,SIGNAL(toggled(bool)),this,SLOT(toggleAdvancedOptionsSlot(bool)));
- connect(addDlg->rbBootProtoAuto,SIGNAL(toggled(bool)),kpbAdvanced,SLOT(setDisabled(bool)));
- connect(addDlg->rbBootProtoAuto,SIGNAL(stateChanged(int)),this,SLOT(toggleApplyButtonSlot(int)));
- // connect(addDlg->rbBootProtoAuto,SIGNAL(toggled(bool)),addDlg->kleIPAddress,SLOT(setDisabled(bool)));
- // connect(addDlg->rbBootProtoAuto,SIGNAL(toggled(bool)),addDlg->kcbNetmask,SLOT(setDisabled(bool)));
- // connect(addDlg->rbBootProtoManual,SIGNAL(toggled(bool)),addDlg->kcbAutoBootProto,SLOT(setDisabled(bool)));
- connect(kpbCancel,SIGNAL(clicked()),this,SLOT(cancelSlot()));
- connect(kpbApply,SIGNAL(clicked()),this,SLOT(verifyDeviceInfoSlot()));
- connect(kpbAdvanced,SIGNAL(clicked()),this,SLOT(advancedOptionsSlot()));
+ connect((KAddDeviceDlgExtension*)extension(),TQT_SIGNAL(valueChangedSignal(int)),this,TQT_SLOT(toggleApplyButtonSlot(int)));
+ connect(addDlg->kleIPAddress,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(toggleApplyButtonSlot(const TQString&)));
+// connect(addDlg->kleGateway,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(toggleApplyButtonSlot(const TQString&)));
+ connect(addDlg->kcbNetmask,TQT_SIGNAL(activated(int)),this,TQT_SLOT(toggleApplyButtonSlot(int)));
+ connect(addDlg->kcbAutoBootProto,TQT_SIGNAL(activated(const TQString&)),this,TQT_SLOT(toggleApplyButtonSlot(const TQString&)));
+ connect(addDlg->kcbstartAtBoot,TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(toggleApplyButtonSlot(int)));
+ connect(addDlg->rbBootProtoAuto,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(toggleAdvancedOptionsSlot(bool)));
+ connect(addDlg->rbBootProtoAuto,TQT_SIGNAL(toggled(bool)),kpbAdvanced,TQT_SLOT(setDisabled(bool)));
+ connect(addDlg->rbBootProtoAuto,TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(toggleApplyButtonSlot(int)));
+ // connect(addDlg->rbBootProtoAuto,TQT_SIGNAL(toggled(bool)),addDlg->kleIPAddress,TQT_SLOT(setDisabled(bool)));
+ // connect(addDlg->rbBootProtoAuto,TQT_SIGNAL(toggled(bool)),addDlg->kcbNetmask,TQT_SLOT(setDisabled(bool)));
+ // connect(addDlg->rbBootProtoManual,TQT_SIGNAL(toggled(bool)),addDlg->kcbAutoBootProto,TQT_SLOT(setDisabled(bool)));
+ connect(kpbCancel,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelSlot()));
+ connect(kpbApply,TQT_SIGNAL(clicked()),this,TQT_SLOT(verifyDeviceInfoSlot()));
+ connect(kpbAdvanced,TQT_SIGNAL(clicked()),this,TQT_SLOT(advancedOptionsSlot()));
}
void KAddDeviceContainer::addWirelessWidget(){
extDlg = new KAddDeviceWifiExt(this);
mainLayout->addWidget( extDlg );
- connect(extDlg->kleEssid,SIGNAL(textChanged(const QString&)),this,SLOT(toggleApplyButtonSlot(const QString&)));
- connect(extDlg->kleWepKey,SIGNAL(textChanged(const QString&)),this,SLOT(toggleApplyButtonSlot(const QString&)));
- connect(extDlg->qcbKeyType,SIGNAL(activated(const QString&)),this,SLOT(toggleApplyButtonSlot(const QString&)));
+ connect(extDlg->kleEssid,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(toggleApplyButtonSlot(const TQString&)));
+ connect(extDlg->kleWepKey,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(toggleApplyButtonSlot(const TQString&)));
+ connect(extDlg->qcbKeyType,TQT_SIGNAL(activated(const TQString&)),this,TQT_SLOT(toggleApplyButtonSlot(const TQString&)));
}
-void KAddDeviceContainer::toggleApplyButtonSlot( const QString & )
+void KAddDeviceContainer::toggleApplyButtonSlot( const TQString & )
{
toggleApplyButtonSlot(0);
}
@@ -119,10 +119,10 @@ void KAddDeviceContainer::verifyDeviceInfoSlot()
if (addDlg->rbBootProtoManual->isChecked())
{
- QString ipAddress = addDlg->kleIPAddress->text();
- QString netmask = addDlg->kcbNetmask->currentText();
- QString broadcast = advancedOptions->kleBroadcast->text();
- QString gateway = advancedOptions->kleGateway->text();
+ TQString ipAddress = addDlg->kleIPAddress->text();
+ TQString netmask = addDlg->kcbNetmask->currentText();
+ TQString broadcast = advancedOptions->kleBroadcast->text();
+ TQString gateway = advancedOptions->kleGateway->text();
if (!KAddressValidator::isValidIPAddress(ipAddress))
{
@@ -197,7 +197,7 @@ KAddDeviceContainer::~KAddDeviceContainer()
void KAddDeviceContainer::addButtons()
{
- widgetHSpacer = new QSpacerItem( 20, 16, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ widgetHSpacer = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
mainLayout->addItem( widgetHSpacer );
mainLayout->addLayout( buttonsLayout );
}
diff --git a/knetworkconf/knetworkconf/kadddevicecontainer.h b/knetworkconf/knetworkconf/kadddevicecontainer.h
index 5b1f6a6..d749576 100644
--- a/knetworkconf/knetworkconf/kadddevicecontainer.h
+++ b/knetworkconf/knetworkconf/kadddevicecontainer.h
@@ -17,13 +17,13 @@
#ifndef KADDDEVICECONTAINER_H
#define KADDDEVICECONTAINER_H
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kcombobox.h>
#include <kdialog.h>
#include <kiconloader.h>
@@ -47,7 +47,7 @@ class KAddDeviceContainer : public KDialog
{
Q_OBJECT
public:
- KAddDeviceContainer(QWidget *parent = 0, const char *name = 0);
+ KAddDeviceContainer(TQWidget *parent = 0, const char *name = 0);
~KAddDeviceContainer();
KPushButton* kpbAdvanced;
@@ -64,15 +64,15 @@ class KAddDeviceContainer : public KDialog
void makeButtonsResizeable();
protected:
- QVBoxLayout* mainLayout;
- QHBoxLayout* buttonsLayout;
- QSpacerItem* buttonsSpacer;
- QSpacerItem* widgetHSpacer;
+ TQVBoxLayout* mainLayout;
+ TQHBoxLayout* buttonsLayout;
+ TQSpacerItem* buttonsSpacer;
+ TQSpacerItem* widgetHSpacer;
bool _modified;
bool _advanced;
protected slots:
- void toggleApplyButtonSlot( const QString & );
+ void toggleApplyButtonSlot( const TQString & );
void toggleApplyButtonSlot( int );
void toggleAdvancedOptionsSlot(bool enabled );
void verifyDeviceInfoSlot();
diff --git a/knetworkconf/knetworkconf/kadddevicedlgextension.ui.h b/knetworkconf/knetworkconf/kadddevicedlgextension.ui.h
index 455cabf..1e38f60 100644
--- a/knetworkconf/knetworkconf/kadddevicedlgextension.ui.h
+++ b/knetworkconf/knetworkconf/kadddevicedlgextension.ui.h
@@ -12,7 +12,7 @@ void KAddDeviceDlgExtension::init()
}
-void KAddDeviceDlgExtension::valueChanged( const QString &s )
+void KAddDeviceDlgExtension::valueChanged( const TQString &s )
{
emit valueChangedSignal(0);
}
diff --git a/knetworkconf/knetworkconf/kaddknownhostdlg.ui.h b/knetworkconf/knetworkconf/kaddknownhostdlg.ui.h
index 49ea4b7..701e1b2 100644
--- a/knetworkconf/knetworkconf/kaddknownhostdlg.ui.h
+++ b/knetworkconf/knetworkconf/kaddknownhostdlg.ui.h
@@ -63,8 +63,8 @@ void KAddKnownHostDlg::editHostSlot()
dlg.setCaption(i18n("Edit Alias"));
dlg.lIPAddress->setText(i18n("Alias:"));
dlg.setAddingAlias(true);
- QListBoxItem *item = klbAliases->item(currentPos);
- QString currentText = item->text();
+ TQListBoxItem *item = klbAliases->item(currentPos);
+ TQString currentText = item->text();
dlg.kleNewServer->setText(currentText);
dlg.kpbAddServer->setText(i18n("&OK"));
dlg.exec();
diff --git a/knetworkconf/knetworkconf/kaddressvalidator.cpp b/knetworkconf/knetworkconf/kaddressvalidator.cpp
index b80e737..03d21c6 100644
--- a/knetworkconf/knetworkconf/kaddressvalidator.cpp
+++ b/knetworkconf/knetworkconf/kaddressvalidator.cpp
@@ -28,8 +28,8 @@ KAddressValidator::KAddressValidator(){
KAddressValidator::~KAddressValidator(){
}
/** Validates if the address written by the user is a valid one. Return true if it is and false if not. */
-bool KAddressValidator::isValidIPAddress(QString addr){
- QString s = "";
+bool KAddressValidator::isValidIPAddress(TQString addr){
+ TQString s = "";
int i;
int number;
bool ok;
@@ -53,8 +53,8 @@ bool KAddressValidator::isValidIPAddress(QString addr){
else
return false;
}
-bool KAddressValidator::isNetmaskValid(QString addr){
- QString s = "";
+bool KAddressValidator::isNetmaskValid(TQString addr){
+ TQString s = "";
int i;
int number;
bool ok;
@@ -76,8 +76,8 @@ bool KAddressValidator::isNetmaskValid(QString addr){
}
-bool KAddressValidator::isNetworkValid(const QString &addr){
- QString s = "";
+bool KAddressValidator::isNetworkValid(const TQString &addr){
+ TQString s = "";
int i;
int number;
bool ok;
@@ -98,8 +98,8 @@ bool KAddressValidator::isNetworkValid(const QString &addr){
return false;
}
-bool KAddressValidator::isBroadcastValid(QString addr){
- QString s = "";
+bool KAddressValidator::isBroadcastValid(TQString addr){
+ TQString s = "";
int i;
int number;
bool ok;
@@ -182,12 +182,12 @@ unsigned long int KAddressValidator::calc_broadcast(unsigned long int addr, int
unsigned long int KAddressValidator::calc_network(unsigned long int addr, int prefix){
return (addr & prefix2mask(prefix));
}
-/** Is a wrapper function to calc_network that receives the IP address and netsmask as QString and
-returns the network value also as a QString, or NULL if it couldn't be calculated. */
-QString KAddressValidator::calculateNetwork(QString addr,QString netmask){
+/** Is a wrapper function to calc_network that receives the IP address and netsmask as TQString and
+returns the network value also as a TQString, or NULL if it couldn't be calculated. */
+TQString KAddressValidator::calculateNetwork(TQString addr,TQString netmask){
struct in_addr _addr, _netmask, _network;
int prefix = 0;
- QString s;
+ TQString s;
if (addr.isNull() || netmask.isNull())
return NULL; //bad address
if (!inet_pton(AF_INET,addr.latin1(),&_addr))
@@ -210,12 +210,12 @@ QString KAddressValidator::calculateNetwork(QString addr,QString netmask){
return s;
}
-/** Is a wrapper function to calc_broadcast that receives the IP address and netsmask as QString and
-returns the broadcast value also as a QString, or NULL if it couldn't be calculated. */
-QString KAddressValidator::calculateBroadcast(QString addr, QString netmask){
+/** Is a wrapper function to calc_broadcast that receives the IP address and netsmask as TQString and
+returns the broadcast value also as a TQString, or NULL if it couldn't be calculated. */
+TQString KAddressValidator::calculateBroadcast(TQString addr, TQString netmask){
struct in_addr _addr, _netmask, _network;
int prefix = 0;
- QString s;
+ TQString s;
if (addr.isNull() || netmask.isNull())
return NULL; //bad address
if (!inet_pton(AF_INET,addr.latin1(),&_addr))
diff --git a/knetworkconf/knetworkconf/kaddressvalidator.h b/knetworkconf/knetworkconf/kaddressvalidator.h
index 32dcc37..9e1df59 100644
--- a/knetworkconf/knetworkconf/kaddressvalidator.h
+++ b/knetworkconf/knetworkconf/kaddressvalidator.h
@@ -41,7 +41,7 @@
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
-#include <qstring.h>
+#include <tqstring.h>
/**Class that has simple methods for validating IP addresses, netmasks, calculating
broadcast and network addresses.
@@ -54,20 +54,20 @@ public:
KAddressValidator();
~KAddressValidator();
/** Validates if the address written by the user is a valid one. Return true if it is and false if not. */
- static bool isValidIPAddress(QString addr);
+ static bool isValidIPAddress(TQString addr);
/** Validates if the Netmask written by the user is a valid one. Return true if it is and false if not. */
- static bool isNetmaskValid(QString addr);
+ static bool isNetmaskValid(TQString addr);
/** Validates if the Network written by the user is a valid one. Return true if it is and false if not. */
- static bool isNetworkValid(const QString &addr);
+ static bool isNetworkValid(const TQString &addr);
/** Validates if the Broadcast written by the user is a valid one. Return true if it is and false if not. */
- static bool isBroadcastValid(QString addr);
-
- /** Is a wrapper function to calc_network that receives the IP address and netsmask as QString and
- returns the network value also as a QString, or NULL if it couldn't be calculated. */
- static QString calculateNetwork(QString addr,QString netmask);
-/** Is a wrapper function to calc_broadcast that receives the IP address and netsmask as QString and
-returns the broadcast value also as a QString, or NULL if it couldn't be calculated. */
- static QString calculateBroadcast(QString addr, QString netmask);
+ static bool isBroadcastValid(TQString addr);
+
+ /** Is a wrapper function to calc_network that receives the IP address and netsmask as TQString and
+ returns the network value also as a TQString, or NULL if it couldn't be calculated. */
+ static TQString calculateNetwork(TQString addr,TQString netmask);
+/** Is a wrapper function to calc_broadcast that receives the IP address and netsmask as TQString and
+returns the broadcast value also as a TQString, or NULL if it couldn't be calculated. */
+ static TQString calculateBroadcast(TQString addr, TQString netmask);
private: // Private methods
/** \fn unsigned long int calc_broadcast(unsigned long int addr, int prefix)
diff --git a/knetworkconf/knetworkconf/kdnsinfo.cpp b/knetworkconf/knetworkconf/kdnsinfo.cpp
index 357bc49..724118c 100644
--- a/knetworkconf/knetworkconf/kdnsinfo.cpp
+++ b/knetworkconf/knetworkconf/kdnsinfo.cpp
@@ -21,33 +21,33 @@ KDNSInfo::KDNSInfo(){
}
KDNSInfo::~KDNSInfo(){
}
-QStringList KDNSInfo::getNameServers(){
+TQStringList KDNSInfo::getNameServers(){
return nameServers;
}
-QString KDNSInfo::getDomainName(){
+TQString KDNSInfo::getDomainName(){
return domainName;
}
-QString KDNSInfo::getMachineName(){
+TQString KDNSInfo::getMachineName(){
return machineName;
}
-QStringList KDNSInfo::getSearchDomains(){
+TQStringList KDNSInfo::getSearchDomains(){
return searchDomains;
}
-void KDNSInfo::setNameServers(const QStringList &nameServers){
+void KDNSInfo::setNameServers(const TQStringList &nameServers){
KDNSInfo::nameServers = nameServers;
}
-void KDNSInfo::setDomainName(const QString &domain){
+void KDNSInfo::setDomainName(const TQString &domain){
KDNSInfo::domainName = domain;
}
-void KDNSInfo::setMachineName(const QString &machine){
+void KDNSInfo::setMachineName(const TQString &machine){
KDNSInfo::machineName = machine;
}
-void KDNSInfo::setSearchDomains(const QStringList &searchDomains){
+void KDNSInfo::setSearchDomains(const TQStringList &searchDomains){
KDNSInfo::searchDomains = searchDomains;
}
-QPtrList<KKnownHostInfo> KDNSInfo::getKnownHostsList(){
+TQPtrList<KKnownHostInfo> KDNSInfo::getKnownHostsList(){
return knownHosts;
}
void KDNSInfo::addKnownHost(KKnownHostInfo *host){
@@ -56,6 +56,6 @@ void KDNSInfo::addKnownHost(KKnownHostInfo *host){
bool KDNSInfo::removeKnownHost(int index){
return knownHosts.remove(index);
}
-void KDNSInfo::setKnownHostsList(QPtrList<KKnownHostInfo> hostsList){
+void KDNSInfo::setKnownHostsList(TQPtrList<KKnownHostInfo> hostsList){
KDNSInfo::knownHosts = hostsList;
}
diff --git a/knetworkconf/knetworkconf/kdnsinfo.h b/knetworkconf/knetworkconf/kdnsinfo.h
index e81a7cb..9c1a27d 100644
--- a/knetworkconf/knetworkconf/kdnsinfo.h
+++ b/knetworkconf/knetworkconf/kdnsinfo.h
@@ -18,9 +18,9 @@
#ifndef KDNSINFO_H
#define KDNSINFO_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
#include "kknownhostinfo.h"
/**
@@ -31,25 +31,25 @@ class KDNSInfo {
public:
KDNSInfo();
~KDNSInfo();
- QString getDomainName();
- QString getMachineName();
- QStringList getNameServers();
- QStringList getSearchDomains();
- void setNameServers(const QStringList &nameServer);
- void setSearchDomains(const QStringList &searchDomains);
- void setDomainName(const QString &domain);
- void setMachineName(const QString &machine);
- QPtrList<KKnownHostInfo> getKnownHostsList();
+ TQString getDomainName();
+ TQString getMachineName();
+ TQStringList getNameServers();
+ TQStringList getSearchDomains();
+ void setNameServers(const TQStringList &nameServer);
+ void setSearchDomains(const TQStringList &searchDomains);
+ void setDomainName(const TQString &domain);
+ void setMachineName(const TQString &machine);
+ TQPtrList<KKnownHostInfo> getKnownHostsList();
void addKnownHost(KKnownHostInfo *host);
bool removeKnownHost(int index);
- void setKnownHostsList(QPtrList<KKnownHostInfo> hostsList);
+ void setKnownHostsList(TQPtrList<KKnownHostInfo> hostsList);
private: // Private attributes
- QStringList nameServers;
- QStringList searchDomains;
- QString domainName;
- QString machineName;
+ TQStringList nameServers;
+ TQStringList searchDomains;
+ TQString domainName;
+ TQString machineName;
/** List of known hosts (/etc/hosts). */
- QPtrList<KKnownHostInfo> knownHosts;
+ TQPtrList<KKnownHostInfo> knownHosts;
};
#endif
diff --git a/knetworkconf/knetworkconf/kknownhostinfo.cpp b/knetworkconf/knetworkconf/kknownhostinfo.cpp
index 7e779f1..a83fc77 100644
--- a/knetworkconf/knetworkconf/kknownhostinfo.cpp
+++ b/knetworkconf/knetworkconf/kknownhostinfo.cpp
@@ -22,21 +22,21 @@ KKnownHostInfo::KKnownHostInfo(){
KKnownHostInfo::~KKnownHostInfo(){
}
/** No descriptions */
-QString KKnownHostInfo::getIpAddress(){
+TQString KKnownHostInfo::getIpAddress(){
return ipAddress;
}
-QStringList KKnownHostInfo::getAliases(){
+TQStringList KKnownHostInfo::getAliases(){
return aliases;
}
-void KKnownHostInfo::setIpAddress(QString ipAddress){
+void KKnownHostInfo::setIpAddress(TQString ipAddress){
KKnownHostInfo::ipAddress = ipAddress;
}
-void KKnownHostInfo::addAlias(QString alias){
+void KKnownHostInfo::addAlias(TQString alias){
KKnownHostInfo::aliases.append(alias);
}
-void KKnownHostInfo::setAliases(QStringList aliases){
+void KKnownHostInfo::setAliases(TQStringList aliases){
KKnownHostInfo::aliases = aliases;
}
diff --git a/knetworkconf/knetworkconf/kknownhostinfo.h b/knetworkconf/knetworkconf/kknownhostinfo.h
index 584639e..1023f59 100644
--- a/knetworkconf/knetworkconf/kknownhostinfo.h
+++ b/knetworkconf/knetworkconf/kknownhostinfo.h
@@ -18,8 +18,8 @@
#ifndef KKNOWNHOSTINFO_H
#define KKNOWNHOSTINFO_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
/**Class that represents an entry in the /etc/hosts file.
*@author Juan Luis Baptiste
@@ -29,16 +29,16 @@ class KKnownHostInfo {
public:
KKnownHostInfo();
~KKnownHostInfo();
- QStringList getAliases();
- QString getIpAddress();
- void setAliases(QStringList aliases);
- void addAlias(QString alias);
- void setIpAddress(QString ipAddress);
+ TQStringList getAliases();
+ TQString getIpAddress();
+ void setAliases(TQStringList aliases);
+ void addAlias(TQString alias);
+ void setIpAddress(TQString ipAddress);
private: // Private attributes
/** IP address of the known Host. */
- QString ipAddress;
+ TQString ipAddress;
/** Lists of aliases of the known host. */
- QStringList aliases;
+ TQStringList aliases;
};
#endif
diff --git a/knetworkconf/knetworkconf/knetworkconf.cpp b/knetworkconf/knetworkconf/knetworkconf.cpp
index bc39c0e..8723d4b 100644
--- a/knetworkconf/knetworkconf/knetworkconf.cpp
+++ b/knetworkconf/knetworkconf/knetworkconf.cpp
@@ -19,7 +19,7 @@
#include "knetworkconf.h"
-KNetworkConf::KNetworkConf(QWidget *parent, const char *name) : DCOPObject("KNetworkConfIface"), KNetworkConfDlg(parent, name)
+KNetworkConf::KNetworkConf(TQWidget *parent, const char *name) : DCOPObject("KNetworkConfIface"), KNetworkConfDlg(parent, name)
{
netInfo = 0L;
makeButtonsResizeable();
@@ -29,18 +29,18 @@ KNetworkConf::KNetworkConf(QWidget *parent, const char *name) : DCOPObject("KNet
klvProfilesList->setAllColumnsShowFocus(true);
klvProfilesList->setRenameable(0,true);
klvProfilesList->setRenameable(1,true);
- QToolTip::remove( &(QListView)klvProfilesList );
+ TQToolTip::remove( &(TQListView)klvProfilesList );
tooltip = new KProfilesListViewToolTip(klvProfilesList);
//Connect signals emmitted by the backend to know when data is ready to be painted.
- connect(config,SIGNAL(readyLoadingNetworkInfo()),this,SLOT(getNetworkInfoSlot()));
- connect(config,SIGNAL(readyLoadingNetworkInfo()),this,SLOT(showMainWindow()));
- connect(config,SIGNAL(readyLoadingNetworkInfo()),this,SLOT(enableSignals()));
- connect(config, SIGNAL(setReadOnly(bool)),this,SLOT(setReadOnlySlot(bool)));
+ connect(config,TQT_SIGNAL(readyLoadingNetworkInfo()),this,TQT_SLOT(getNetworkInfoSlot()));
+ connect(config,TQT_SIGNAL(readyLoadingNetworkInfo()),this,TQT_SLOT(showMainWindow()));
+ connect(config,TQT_SIGNAL(readyLoadingNetworkInfo()),this,TQT_SLOT(enableSignals()));
+ connect(config, TQT_SIGNAL(setReadOnly(bool)),this,TQT_SLOT(setReadOnlySlot(bool)));
connect(klvCardList,
- SIGNAL(contextMenu(KListView*,QListViewItem*,const QPoint&)),
+ TQT_SIGNAL(contextMenu(KListView*,TQListViewItem*,const TQPoint&)),
this,
- SLOT(showInterfaceContextMenuSlot(KListView*,QListViewItem*, const QPoint&)));
+ TQT_SLOT(showInterfaceContextMenuSlot(KListView*,TQListViewItem*, const TQPoint&)));
// Register with DCOP - No longer needed as now we are a kcontrol module?
if ( !kapp->dcopClient()->isRegistered() ) {
@@ -70,7 +70,7 @@ void KNetworkConf::getNetworkInfoSlot()
}
else
{
- //QPtrList<KNetworkInterface> deviceList;
+ //TQPtrList<KNetworkInterface> deviceList;
routingInfo = netInfo->getRoutingInfo();
dnsInfo = netInfo->getDNSInfo();
profilesList = netInfo->getProfilesList();
@@ -93,20 +93,20 @@ void KNetworkConf::getNetworkInfoSlot()
void KNetworkConf::loadNetworkDevicesInfo()
{
KNetworkInterface *device;
- QPixmap activeEthernetDeviceImg(locate("icon","hicolor/22x22/actions/network_connected_lan_knc.png"));
- QPixmap inactiveEthernetDeviceImg(locate("icon","hicolor/22x22/actions/network_disconnected_lan.png"));
- QPixmap activeWirelessDeviceImg(locate("icon","hicolor/22x22/actions/network_traffic_wlan.png"));
- QPixmap inactiveWirelessDeviceImg(locate("icon","hicolor/22x22/actions/network_disconnected_wlan.png"));
+ TQPixmap activeEthernetDeviceImg(locate("icon","hicolor/22x22/actions/network_connected_lan_knc.png"));
+ TQPixmap inactiveEthernetDeviceImg(locate("icon","hicolor/22x22/actions/network_disconnected_lan.png"));
+ TQPixmap activeWirelessDeviceImg(locate("icon","hicolor/22x22/actions/network_traffic_wlan.png"));
+ TQPixmap inactiveWirelessDeviceImg(locate("icon","hicolor/22x22/actions/network_disconnected_wlan.png"));
klvCardList->clear();
- QPtrList<KNetworkInterface> deviceList = netInfo->getDeviceList();
+ TQPtrList<KNetworkInterface> deviceList = netInfo->getDeviceList();
for (device = deviceList.first(); device; device = deviceList.next())
{
if ( device->getType() != "loopback" )
{
if (klvCardList->findItem(device->getDeviceName(),0,CaseSensitive|ExactMatch) == 0)
{
- QListViewItem * item = new QListViewItem( klvCardList, 0 );
+ TQListViewItem * item = new TQListViewItem( klvCardList, 0 );
if (device->isActive())
{
@@ -138,7 +138,7 @@ void KNetworkConf::loadNetworkDevicesInfo()
else
item->setText(2,device->getBootProto());
item->setText(4,device->getDescription());
- QStringList l = deviceNamesList.grep(device->getDeviceName());
+ TQStringList l = deviceNamesList.grep(device->getDeviceName());
if (l.size() == 0)
deviceNamesList.append(device->getDeviceName());
}
@@ -151,7 +151,7 @@ void KNetworkConf::loadNetworkDevicesInfo()
*/
void KNetworkConf::quitSlot(){
int code = 0;
- connect( config, SIGNAL(readyLoadingNetworkInfo()), this, SLOT(quitSlot()) );
+ connect( config, TQT_SIGNAL(readyLoadingNetworkInfo()), this, TQT_SLOT(quitSlot()) );
if (modified)
{
code = KMessageBox::warningYesNoCancel(this,
@@ -170,8 +170,8 @@ void KNetworkConf::enableButtonsSlot(){
if (!readOnly)
{
kpbConfigureNetworkInterface->setEnabled(true);
- QListViewItem *item = klvCardList->currentItem();
- QString currentDevice = item->text(0);
+ TQListViewItem *item = klvCardList->currentItem();
+ TQString currentDevice = item->text(0);
KNetworkInterface *dev = getDeviceInfo(currentDevice);
if (dev->isActive())
@@ -204,8 +204,8 @@ void KNetworkConf::editServerSlot(){
{
int currentPos = klbDomainServerList->currentItem();
dlg.setCaption(i18n("Edit Server"));
- QListBoxItem *item = klbDomainServerList->item(currentPos);
- QString currentText = item->text();
+ TQListBoxItem *item = klbDomainServerList->item(currentPos);
+ TQString currentText = item->text();
dlg.kleNewServer->setText(currentText);
dlg.kpbAddServer->setText(i18n("&OK"));
dlg.exec();
@@ -221,7 +221,7 @@ void KNetworkConf::editServerSlot(){
/** Pops up the window for adding a new interface. */
void KNetworkConf::configureDeviceSlot(){
- QListViewItem *item = klvCardList->currentItem();
+ TQListViewItem *item = klvCardList->currentItem();
KWirelessInterface *wifiDev = NULL;
//KAddDeviceContainer *configDlg = new KAddDeviceContainer(this,0);
@@ -229,7 +229,7 @@ void KNetworkConf::configureDeviceSlot(){
if (item != NULL)
{
- QString currentDevice = item->text(0);
+ TQString currentDevice = item->text(0);
configDlg.setCaption(i18n("Configure Device %1").arg(currentDevice));
KNetworkInterface *dev = getDeviceInfo(currentDevice);
KAddDeviceDlgExtension *advancedOptions = (KAddDeviceDlgExtension *)configDlg.extension();
@@ -336,9 +336,9 @@ void KNetworkConf::configureDeviceSlot(){
dev->setIpAddress(configDlg.addDlg->kleIPAddress->text().stripWhiteSpace());
dev->setGateway(advancedOptions->kleGateway->text().stripWhiteSpace());
dev->setNetmask(configDlg.addDlg->kcbNetmask->currentText().stripWhiteSpace());
- QString network = KAddressValidator::calculateNetwork(dev->getIpAddress().stripWhiteSpace(),dev->getNetmask().stripWhiteSpace());
+ TQString network = KAddressValidator::calculateNetwork(dev->getIpAddress().stripWhiteSpace(),dev->getNetmask().stripWhiteSpace());
dev->setNetwork(network);
- QString broadcast = advancedOptions->kleBroadcast->text().stripWhiteSpace();
+ TQString broadcast = advancedOptions->kleBroadcast->text().stripWhiteSpace();
if (broadcast.isEmpty())
broadcast = KAddressValidator::calculateBroadcast(dev->getIpAddress().stripWhiteSpace(),dev->getNetmask().stripWhiteSpace());
dev->setBroadcast(broadcast);
@@ -363,9 +363,9 @@ void KNetworkConf::configureDeviceSlot(){
}
/**Returns the info of the network device 'device or NULL if not found.'*/
-KNetworkInterface * KNetworkConf::getDeviceInfo(QString device){
- QPtrList<KNetworkInterface> deviceList = netInfo->getDeviceList();
- QPtrListIterator<KNetworkInterface> i(deviceList);
+KNetworkInterface * KNetworkConf::getDeviceInfo(TQString device){
+ TQPtrList<KNetworkInterface> deviceList = netInfo->getDeviceList();
+ TQPtrListIterator<KNetworkInterface> i(deviceList);
KNetworkInterface *temp;
while ((temp = i.current()) != 0)
{
@@ -379,9 +379,9 @@ KNetworkInterface * KNetworkConf::getDeviceInfo(QString device){
}
/**Returns the name of the network device that corresponds to the IP address 'ipAddr' or NULL if not found.'*/
-QString KNetworkConf::getDeviceName(QString ipAddr){
- QPtrList<KNetworkInterface> deviceList = netInfo->getDeviceList();
- QPtrListIterator<KNetworkInterface> i(deviceList);
+TQString KNetworkConf::getDeviceName(TQString ipAddr){
+ TQPtrList<KNetworkInterface> deviceList = netInfo->getDeviceList();
+ TQPtrListIterator<KNetworkInterface> i(deviceList);
KNetworkInterface *temp;
while ((temp = i.current()) != 0)
{
@@ -412,8 +412,8 @@ void KNetworkConf::loadRoutingInfo(){
//because some platforms (Debian-like ones) seems that don't handle the concept of a default
//gateway, instead a gateway per interface.
KNetworkInterface *device;
- QString defaultGwDevice = routingInfo->getGatewayDevice();
- QPtrList<KNetworkInterface> deviceList = netInfo->getDeviceList();
+ TQString defaultGwDevice = routingInfo->getGatewayDevice();
+ TQPtrList<KNetworkInterface> deviceList = netInfo->getDeviceList();
for (device = deviceList.first(); device; device = deviceList.next())
{
if ( device->getDeviceName() == defaultGwDevice )
@@ -437,7 +437,7 @@ void KNetworkConf::loadRoutingInfo(){
}
void KNetworkConf::loadDNSInfo(){
- QStringList nameServers;
+ TQStringList nameServers;
if (dnsInfo == NULL)
KMessageBox::error(this,i18n("Could not open file '/etc/resolv.conf' for reading."),
i18n("Error Loading Config Files"));
@@ -447,24 +447,24 @@ void KNetworkConf::loadDNSInfo(){
kleDomainName->setText(dnsInfo->getDomainName());
klbDomainServerList->clear();
nameServers = dnsInfo->getNameServers();
- for ( QStringList::Iterator it = nameServers.begin(); it != nameServers.end(); ++it)
+ for ( TQStringList::Iterator it = nameServers.begin(); it != nameServers.end(); ++it)
{
klbDomainServerList->insertItem(*it);
}
klvKnownHosts->clear();
knownHostsList = dnsInfo->getKnownHostsList();
- QPtrListIterator<KKnownHostInfo> it(knownHostsList);
+ TQPtrListIterator<KKnownHostInfo> it(knownHostsList);
KKnownHostInfo *host;
while ((host = it.current()) != 0)
{
++it;
if (!(host->getIpAddress().isEmpty()))
{
- QListViewItem * item = new QListViewItem( klvKnownHosts, 0 );
+ TQListViewItem * item = new TQListViewItem( klvKnownHosts, 0 );
item->setText(0,host->getIpAddress());
- QStringList aliasesList = host->getAliases();
- QString aliases;
- for ( QStringList::Iterator it = aliasesList.begin(); it != aliasesList.end(); ++it )
+ TQStringList aliasesList = host->getAliases();
+ TQString aliases;
+ for ( TQStringList::Iterator it = aliasesList.begin(); it != aliasesList.end(); ++it )
{
aliases += *it+" ";
}
@@ -475,7 +475,7 @@ void KNetworkConf::loadDNSInfo(){
}
void KNetworkConf::loadNetworkProfiles(){
- QPtrListIterator<KNetworkInfo> it(profilesList);
+ TQPtrListIterator<KNetworkInfo> it(profilesList);
KNetworkInfo *profile = NULL;
klvProfilesList->clear();
@@ -484,7 +484,7 @@ void KNetworkConf::loadNetworkProfiles(){
++it;
if (!profile->getProfileName().isEmpty())
{
- QListViewItem * item = new QListViewItem( klvProfilesList, 0 );
+ TQListViewItem * item = new TQListViewItem( klvProfilesList, 0 );
item->setText(0,profile->getProfileName());
}
}
@@ -517,7 +517,7 @@ void KNetworkConf::setReadOnly(bool state){
KNetworkConf::readOnly = state;
}
/** No descriptions */
-void KNetworkConf::enableApplyButtonSlot(const QString &text){
+void KNetworkConf::enableApplyButtonSlot(const TQString &text){
enableApplyButtonSlot();
}
/** No descriptions */
@@ -538,9 +538,9 @@ void KNetworkConf::moveUpServerSlot(){
if (antPos >= 0)
{
- QListBoxItem *current = klbDomainServerList->item(curPos);
- QListBoxItem *ant = current->prev();
- QString antText = ant->text();
+ TQListBoxItem *current = klbDomainServerList->item(curPos);
+ TQListBoxItem *ant = current->prev();
+ TQString antText = ant->text();
klbDomainServerList->removeItem(antPos);
klbDomainServerList->insertItem(antText,curPos);
enableApplyButtonSlot();
@@ -554,8 +554,8 @@ void KNetworkConf::moveDownServerSlot(){
{
if (klbDomainServerList->count() >= nextPos)
{
- QListBoxItem *current = klbDomainServerList->item(curPos);
- QString curText = current->text();
+ TQListBoxItem *current = klbDomainServerList->item(curPos);
+ TQString curText = current->text();
klbDomainServerList->removeItem(curPos);
klbDomainServerList->insertItem(curText,nextPos);
klbDomainServerList->setSelected(nextPos,true);
@@ -569,7 +569,7 @@ void KNetworkConf::disableAll(){
kleDomainName->setReadOnly(true);
tlDomainName->setEnabled(false);
tlHostName->setEnabled(false);
- disconnect(klvCardList,SIGNAL(doubleClicked(QListViewItem *)),this,SLOT(configureDeviceSlot()));
+ disconnect(klvCardList,TQT_SIGNAL(doubleClicked(TQListViewItem *)),this,TQT_SLOT(configureDeviceSlot()));
klvCardList->setEnabled(false);
kpbUpButton->setEnabled(false);
kpbDownButton->setEnabled(false);
@@ -615,9 +615,9 @@ void KNetworkConf::saveInfoSlot(){
//because some platforms (Debian-like ones) get the default gateway from there
//instead from the default gateway field. funny huh?
KNetworkInterface *device;
- QString defaultGwDevice = routingInfo->getGatewayDevice();
- QString defaultGwAddress = routingInfo->getGateway();
- QPtrList<KNetworkInterface> deviceList = netInfo->getDeviceList();
+ TQString defaultGwDevice = routingInfo->getGatewayDevice();
+ TQString defaultGwAddress = routingInfo->getGateway();
+ TQPtrList<KNetworkInterface> deviceList = netInfo->getDeviceList();
for (device = deviceList.first(); device; device = deviceList.next())
{
if ( device->getGateway().length() == 0 )
@@ -633,19 +633,19 @@ void KNetworkConf::saveInfoSlot(){
modified = false;
}
}
-/** Creates a QStringList with the IP addresses contained in the QListBox of name servers. */
-QStringList KNetworkConf::getNamserversList(KListBox * serverList){
- QStringList list;
+/** Creates a TQStringList with the IP addresses contained in the TQListBox of name servers. */
+TQStringList KNetworkConf::getNamserversList(KListBox * serverList){
+ TQStringList list;
for (unsigned i = 0; i < serverList->count(); i++)
{
list.append(serverList->text(i));
}
return list;
}
-/** Creates a QPtrList<KKownHostInfo> with the info contained in the KListView of name servers. */
-QPtrList<KKnownHostInfo> KNetworkConf::getKnownHostsList(KListView * hostsList){
- QPtrList<KKnownHostInfo> list;
- QListViewItem *it = hostsList->firstChild();
+/** Creates a TQPtrList<KKownHostInfo> with the info contained in the KListView of name servers. */
+TQPtrList<KKnownHostInfo> KNetworkConf::getKnownHostsList(KListView * hostsList){
+ TQPtrList<KKnownHostInfo> list;
+ TQListViewItem *it = hostsList->firstChild();
for (int i = 0; i < hostsList->childCount(); i++)
{
KKnownHostInfo *host = new KKnownHostInfo();
@@ -654,7 +654,7 @@ QPtrList<KKnownHostInfo> KNetworkConf::getKnownHostsList(KListView * hostsList){
{
host->setIpAddress(it->text(0));
// host->setHostName(it->text(1));
- host->setAliases(QStringList::split(" ",it->text(1)));
+ host->setAliases(TQStringList::split(" ",it->text(1)));
it = it->nextSibling();
list.append(host);
}
@@ -662,16 +662,16 @@ QPtrList<KKnownHostInfo> KNetworkConf::getKnownHostsList(KListView * hostsList){
return list;
}
-QString KNetworkConf::getVersion(){
+TQString KNetworkConf::getVersion(){
return version;
}
-void KNetworkConf::setVersion(QString ver){
+void KNetworkConf::setVersion(TQString ver){
KNetworkConf::version = ver;
}
/** Changes the state of device 'dev' to DEVICE_UP or DEVICE_DOWN.
Return true on success, false on failure. */
-void KNetworkConf::changeDeviceState(const QString &dev, int state){
+void KNetworkConf::changeDeviceState(const TQString &dev, int state){
// If the text "Changing device state" is user visible it cannot be the
// name parameter to the constructor.
KInterfaceUpDownDlg* dialog = new KInterfaceUpDownDlg(this,"Changing device state");
@@ -684,12 +684,12 @@ void KNetworkConf::changeDeviceState(const QString &dev, int state){
dialog->setModal(true);
dialog->show();
- procDeviceState = new QProcess(this);
- QString cmd;
+ procDeviceState = new TQProcess(this);
+ TQString cmd;
procDeviceState->addArgument( locate("data",BACKEND_PATH) );
//If the platform couldn't be autodetected specify it manually
- if (netInfo->getPlatformName() != QString::null)
+ if (netInfo->getPlatformName() != TQString::null)
{
procDeviceState->addArgument( "--platform" );
procDeviceState->addArgument( netInfo->getPlatformName() );
@@ -701,10 +701,10 @@ void KNetworkConf::changeDeviceState(const QString &dev, int state){
else if (state == DEVICE_DOWN)
procDeviceState->addArgument("enable_iface::"+dev+"::0" );
- connect( procDeviceState, SIGNAL(readyReadStdout()),this, SLOT(readFromStdoutUpDown()) );
- connect( procDeviceState, SIGNAL(readyReadStderr()),this, SLOT(readFromStdErrUpDown()) );
- connect( procDeviceState, SIGNAL(processExited()),this, SLOT(verifyDeviceStateChanged()) );
- connect( procDeviceState, SIGNAL(processExited()), dialog, SLOT(close()) );
+ connect( procDeviceState, TQT_SIGNAL(readyReadStdout()),this, TQT_SLOT(readFromStdoutUpDown()) );
+ connect( procDeviceState, TQT_SIGNAL(readyReadStderr()),this, TQT_SLOT(readFromStdErrUpDown()) );
+ connect( procDeviceState, TQT_SIGNAL(processExited()),this, TQT_SLOT(verifyDeviceStateChanged()) );
+ connect( procDeviceState, TQT_SIGNAL(processExited()), dialog, TQT_SLOT(close()) );
currentDevice = dev;
commandOutput = "";
@@ -725,10 +725,10 @@ void KNetworkConf::readFromStdoutUpDown(){
void KNetworkConf::verifyDeviceStateChanged(){
KNetworkInterface *dev;
- QPixmap activeEthernetDeviceImg(BarIcon("network_connected_lan_knc"));
- QPixmap inactiveEthernetDeviceImg(BarIcon("network_disconnected_lan"));
- QPixmap activeWirelessDeviceImg(BarIcon("network_traffic_wlan"));
- QPixmap inactiveWirelessDeviceImg(BarIcon("network_disconnected_wlan"));
+ TQPixmap activeEthernetDeviceImg(BarIcon("network_connected_lan_knc"));
+ TQPixmap inactiveEthernetDeviceImg(BarIcon("network_disconnected_lan"));
+ TQPixmap activeWirelessDeviceImg(BarIcon("network_traffic_wlan"));
+ TQPixmap inactiveWirelessDeviceImg(BarIcon("network_disconnected_wlan"));
commandOutput = commandOutput.section('\n',1);
if (commandErrOutput.length() > 0)
@@ -740,7 +740,7 @@ void KNetworkConf::verifyDeviceStateChanged(){
}
else if (commandOutput == "\n<!-- GST: end of request -->")
{
- QListViewItem *item = klvCardList->findItem(currentDevice,0,ExactMatch);
+ TQListViewItem *item = klvCardList->findItem(currentDevice,0,ExactMatch);
if (item != NULL)
{
dev = getDeviceInfo(currentDevice);
@@ -776,10 +776,10 @@ void KNetworkConf::verifyDeviceStateChanged(){
}
}
/** Returns a list of strings of all the configured devices. */
-QStringList KNetworkConf::getDeviceList(){
- QStringList list;
+TQStringList KNetworkConf::getDeviceList(){
+ TQStringList list;
KNetworkInterface * device;
- QPtrList<KNetworkInterface> deviceList = netInfo->getDeviceList();
+ TQPtrList<KNetworkInterface> deviceList = netInfo->getDeviceList();
for (device = deviceList.first(); device; device = deviceList.next())
{
list.append(device->getDeviceName());
@@ -788,13 +788,13 @@ QStringList KNetworkConf::getDeviceList(){
}
/** No descriptions */
bool KNetworkConf::valuesChanged(KNetworkInterface *dev,
- QString bootProto,
- QString netmask,
- QString ipAddr,
- QString gateway,
+ TQString bootProto,
+ TQString netmask,
+ TQString ipAddr,
+ TQString gateway,
bool onBoot,
- QString desc,
- QString broadcast){
+ TQString desc,
+ TQString broadcast){
if ((dev->getBootProto() != bootProto) ||
(dev->getNetmask() != netmask) ||
(dev->getIpAddress() != ipAddr) ||
@@ -808,7 +808,7 @@ bool KNetworkConf::valuesChanged(KNetworkInterface *dev,
return false;
}
-/** Sets the QPushButton::autoResize() in true for all buttons. */
+/** Sets the TQPushButton::autoResize() in true for all buttons. */
void KNetworkConf::makeButtonsResizeable(){
kpbConfigureNetworkInterface->setAutoResize(true);
kcbGwDevice->setAutoResize(true);
@@ -864,13 +864,13 @@ void KNetworkConf::disableInterfaceSlot()
void KNetworkConf::addKnownHostSlot(){
KAddKnownHostDlg dlg(this,0);
dlg.setCaption(i18n("Add New Static Host"));
- QString aliases;
+ TQString aliases;
dlg.exec();
if (!dlg.kleIpAddress->text().isEmpty() && dlg.klbAliases->firstItem() > 0 )
{
- QListViewItem * item = new QListViewItem( klvKnownHosts, 0 );
+ TQListViewItem * item = new TQListViewItem( klvKnownHosts, 0 );
item->setText(0,dlg.kleIpAddress->text());
@@ -897,23 +897,23 @@ void KNetworkConf::editKnownHostSlot()
{
KAddKnownHostDlg dlg(this,0);
dlg.setCaption(i18n("Edit Static Host"));
- QListViewItem *item = klvKnownHosts->currentItem();
+ TQListViewItem *item = klvKnownHosts->currentItem();
dlg.kleIpAddress->setText(item->text(0));
- QStringList aliases = QStringList::split( " ", item->text(1) );
+ TQStringList aliases = TQStringList::split( " ", item->text(1) );
int n = 0;
- for ( QStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it, ++n )
+ for ( TQStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it, ++n )
{
- QString alias = *it;
+ TQString alias = *it;
dlg.klbAliases->insertItem(alias,n);
}
dlg.exec();
- QString _aliases;
+ TQString _aliases;
if (!dlg.kleIpAddress->text().isEmpty() && dlg.klbAliases->firstItem() > 0 )
{
- QListViewItem * item = klvKnownHosts->currentItem();
+ TQListViewItem * item = klvKnownHosts->currentItem();
item->setText(0,dlg.kleIpAddress->text());
@@ -937,23 +937,23 @@ void KNetworkConf::readFromStdErrUpDown()
commandErrOutput.append(procDeviceState->readStderr());
}
/** Sees if a device is active or not in the ifconfig output. Not very nice, but it works. Inthe future, this has to be managed by gst. */
-bool KNetworkConf::isDeviceActive(const QString &device, const QString &ifconfigOutput){
- QString temp = ifconfigOutput.section(device,1,1);
+bool KNetworkConf::isDeviceActive(const TQString &device, const TQString &ifconfigOutput){
+ TQString temp = ifconfigOutput.section(device,1,1);
if (temp.isEmpty())
return false;
else
{
- QString temp2 = temp.section("UP",0,0); //two firts lines of the device info.
- QString temp3 = temp2.section("\n",0,0); //Link encap:Ethernet HWaddr 00:00:21:C5:99:A0
- QString temp4 = temp2.section("\n",1,1); //inet addr:192.168.1.1 Bcast:192.255.255.255 Mask:255.0.0.0
+ TQString temp2 = temp.section("UP",0,0); //two firts lines of the device info.
+ TQString temp3 = temp2.section("\n",0,0); //Link encap:Ethernet HWaddr 00:00:21:C5:99:A0
+ TQString temp4 = temp2.section("\n",1,1); //inet addr:192.168.1.1 Bcast:192.255.255.255 Mask:255.0.0.0
temp3 = temp3.stripWhiteSpace();
temp4 = temp4.stripWhiteSpace();
- QString temp5 = temp3.section(" ",4,4); //00:00:21:C5:99:A0
- QString temp6 = temp4.section(" ",1,1); // addr:192.168.1.1
+ TQString temp5 = temp3.section(" ",4,4); //00:00:21:C5:99:A0
+ TQString temp6 = temp4.section(" ",1,1); // addr:192.168.1.1
temp6 = temp6.section(":",1,1); //192.168.1.1
- QString temp7 = temp4.section(" ",3,3); //Bcast:192.255.255.255
+ TQString temp7 = temp4.section(" ",3,3); //Bcast:192.255.255.255
temp7 = temp7.section(":",1,1); //192.255.255.255
- QString temp8 = temp4.section(" ",5,5); // Mask:255.0.0.0
+ TQString temp8 = temp4.section(" ",5,5); // Mask:255.0.0.0
temp8 = temp8.section(":",1,1); //255.0.0.0
//If the ip address is empty it must be a dhcp interface, so fill these fields:
@@ -977,14 +977,14 @@ void KNetworkConf::setReadOnlySlot(bool state)
}
/*Shows a context menu when right-clicking in the interface list*/
-void KNetworkConf::showInterfaceContextMenuSlot(KListView* lv, QListViewItem* lvi, const QPoint& pt)
+void KNetworkConf::showInterfaceContextMenuSlot(KListView* lv, TQListViewItem* lvi, const TQPoint& pt)
{
KPopupMenu *context = new KPopupMenu( this );
Q_CHECK_PTR( context );
- context->insertItem( "&Enable Interface", this, SLOT(enableInterfaceSlot()));
- context->insertItem( "&Disable Interface", this, SLOT(disableInterfaceSlot()));
- QListViewItem *item = klvCardList->currentItem();
- QString currentDevice = item->text(0);
+ context->insertItem( "&Enable Interface", this, TQT_SLOT(enableInterfaceSlot()));
+ context->insertItem( "&Disable Interface", this, TQT_SLOT(disableInterfaceSlot()));
+ TQListViewItem *item = klvCardList->currentItem();
+ TQString currentDevice = item->text(0);
KNetworkInterface *dev = getDeviceInfo(currentDevice);
if (dev->isActive())
@@ -998,27 +998,27 @@ void KNetworkConf::showInterfaceContextMenuSlot(KListView* lv, QListViewItem* lv
context->setItemEnabled(1,false);
}
context->insertSeparator(2);
- context->insertItem( "&Configure Interface...", this, SLOT(configureDeviceSlot()));
+ context->insertItem( "&Configure Interface...", this, TQT_SLOT(configureDeviceSlot()));
context->popup(pt);
- //context->insertItem( "About &Qt", this, SLOT(aboutQt()) );
+ //context->insertItem( "About &Qt", this, TQT_SLOT(aboutQt()) );
}
void KNetworkConf::enableSignals()
{
tooltip->setProfiles(netInfo->getProfilesList());
- connect(kleDefaultRoute,SIGNAL(textChanged(const QString&)),this,SLOT(enableApplyButtonSlot(const QString&)));
- connect(kleDomainName,SIGNAL(textChanged(const QString&)),this,SLOT(enableApplyButtonSlot(const QString&)));
- connect(kleHostName,SIGNAL(textChanged(const QString&)),this,SLOT(enableApplyButtonSlot(const QString&)));
+ connect(kleDefaultRoute,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(enableApplyButtonSlot(const TQString&)));
+ connect(kleDomainName,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(enableApplyButtonSlot(const TQString&)));
+ connect(kleHostName,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(enableApplyButtonSlot(const TQString&)));
}
void KNetworkConf::enableProfileSlot()
{
//Get selected profile
- QListViewItem *item = klvProfilesList->currentItem();
+ TQListViewItem *item = klvProfilesList->currentItem();
if (item != NULL)
{
- QString selectedProfile = item->text(0);
+ TQString selectedProfile = item->text(0);
//And search for it in the profiles list
KNetworkInfo *profile = getProfile(netInfo->getProfilesList(),selectedProfile);
@@ -1027,7 +1027,7 @@ void KNetworkConf::enableProfileSlot()
profile->setProfilesList(netInfo->getProfilesList());
config->saveNetworkInfo(profile);
modified = false;
- //connect( config, SIGNAL(readyLoadingNetworkInfo()), this, SLOT(showSelectedProfile(selectedProfile)) );
+ //connect( config, TQT_SIGNAL(readyLoadingNetworkInfo()), this, TQT_SLOT(showSelectedProfile(selectedProfile)) );
}
else
KMessageBox::error(this,
@@ -1036,9 +1036,9 @@ void KNetworkConf::enableProfileSlot()
}
}
-KNetworkInfo *KNetworkConf::getProfile(QPtrList<KNetworkInfo> profilesList, QString selectedProfile)
+KNetworkInfo *KNetworkConf::getProfile(TQPtrList<KNetworkInfo> profilesList, TQString selectedProfile)
{
- QPtrListIterator<KNetworkInfo> it(profilesList);
+ TQPtrListIterator<KNetworkInfo> it(profilesList);
KNetworkInfo *net = NULL;
while ((net = it.current()) != 0)
@@ -1055,19 +1055,19 @@ void KNetworkConf::createProfileSlot()
if (!netInfo)
return;
bool ok;
- QString newProfileName = KInputDialog::getText(i18n("Create New Network Profile"),
+ TQString newProfileName = KInputDialog::getText(i18n("Create New Network Profile"),
i18n("Name of new profile:"),
- QString::null, &ok, this );
+ TQString::null, &ok, this );
if ( ok && !newProfileName.isEmpty() )
{
- QPtrList<KNetworkInfo> profiles = netInfo->getProfilesList();
+ TQPtrList<KNetworkInfo> profiles = netInfo->getProfilesList();
KNetworkInfo *currentProfile = getProfile(profiles,newProfileName);
KNetworkInfo *newProfile = new KNetworkInfo();
//If there isn't a profile with the new name we add it to the list.
if (currentProfile == NULL)
{
- QListViewItem *newItem = new QListViewItem( klvProfilesList,newProfileName);
+ TQListViewItem *newItem = new TQListViewItem( klvProfilesList,newProfileName);
//memcpy(newProfile,netInfo,sizeof(netInfo) + sizeof(KRoutingInfo) + sizeof(KDNSInfo));
//Is there a better way to copy an object? the above memcpy doesn't do the trick
@@ -1091,9 +1091,9 @@ void KNetworkConf::createProfileSlot()
}
-/*void KNetworkConf::updateProfileNameSlot(QListViewItem *item)
+/*void KNetworkConf::updateProfileNameSlot(TQListViewItem *item)
{
- QString newName = item->text(0);
+ TQString newName = item->text(0);
if (newName.isEmpty())
KMessageBox::error(this,
@@ -1116,20 +1116,20 @@ void KNetworkConf::createProfileSlot()
void KNetworkConf::removeProfileSlot()
{
- QListViewItem *item= klvProfilesList->selectedItem();
+ TQListViewItem *item= klvProfilesList->selectedItem();
if (item != NULL)
{
/* if (KMessageBox::warningContinueCancel(this,
i18n("Are you sure you want to delete the selected network profile?"),
i18n("Delete Profile"),KStdGuiItem::del()) == KMessageBox::Continue)*/
{
- QString selectedProfile = item->text(0);
- QPtrList<KNetworkInfo> profiles = netInfo->getProfilesList();
+ TQString selectedProfile = item->text(0);
+ TQPtrList<KNetworkInfo> profiles = netInfo->getProfilesList();
KNetworkInfo *profileToDelete = NULL;
for ( profileToDelete = profiles.first(); profileToDelete; profileToDelete = profiles.next() )
{
- QString profileName = profileToDelete->getProfileName();
+ TQString profileName = profileToDelete->getProfileName();
if (profileName == selectedProfile)
{
profiles.remove(profileToDelete);
@@ -1146,17 +1146,17 @@ void KNetworkConf::removeProfileSlot()
void KNetworkConf::updateProfileSlot()
{
- QListViewItem *item= klvProfilesList->selectedItem();
+ TQListViewItem *item= klvProfilesList->selectedItem();
if (item != NULL)
{
- QString selectedProfile = item->text(0);
- QPtrList<KNetworkInfo> profiles = netInfo->getProfilesList();
+ TQString selectedProfile = item->text(0);
+ TQPtrList<KNetworkInfo> profiles = netInfo->getProfilesList();
KNetworkInfo *profileToUpdate = NULL;
KNetworkInfo *newProfile = new KNetworkInfo();
for ( profileToUpdate = profiles.first(); profileToUpdate; profileToUpdate = profiles.next() )
{
- QString profileName = profileToUpdate->getProfileName();
+ TQString profileName = profileToUpdate->getProfileName();
if (profileName == selectedProfile)
{
qDebug("profile updated");
diff --git a/knetworkconf/knetworkconf/knetworkconf.h b/knetworkconf/knetworkconf/knetworkconf.h
index 3416776..813b150 100644
--- a/knetworkconf/knetworkconf/knetworkconf.h
+++ b/knetworkconf/knetworkconf/knetworkconf.h
@@ -29,17 +29,17 @@
#include <sys/types.h>
#include <kapp.h>
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qprocess.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qlayout.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqprocess.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqlayout.h>
#include <kdialog.h>
#include <kinputdialog.h>
#include <kpopupmenu.h>
@@ -78,13 +78,13 @@ class KNetworkConf : public KNetworkConfDlg, virtual public KNetworkConfIface
Q_OBJECT
public:
/** construtor */
- KNetworkConf(QWidget* parent=0, const char *name=0);
+ KNetworkConf(TQWidget* parent=0, const char *name=0);
/** destructor */
~KNetworkConf();
/** Puts the application in read-only mode. This happens when the user runing the application isn't root. */
void setReadOnly(bool state);
- void setVersion(QString ver);
- QString getVersion();
+ void setVersion(TQString ver);
+ TQString getVersion();
/** Disables all buttons a line edit widgets when the user has read only access. */
void disableAll();
@@ -99,38 +99,38 @@ class KNetworkConf : public KNetworkConfDlg, virtual public KNetworkConfIface
private: // Private attributes
/** */
KNetworkConfigParser *config;
- KNetworkInterface * getDeviceInfo(QString device);
- QString getDeviceName(QString ipAddr);
- /** Creates a QStringList with the IP addresses contained in the QListBox of name servers. */
- QStringList getNamserversList(KListBox * serverList);
-/** Creates a QPtrList<KKownHostInfo> with the info contained in the KListView of name servers. */
- QPtrList<KKnownHostInfo> getKnownHostsList(KListView * hostsList);
- QString currentDevice;
+ KNetworkInterface * getDeviceInfo(TQString device);
+ TQString getDeviceName(TQString ipAddr);
+ /** Creates a TQStringList with the IP addresses contained in the TQListBox of name servers. */
+ TQStringList getNamserversList(KListBox * serverList);
+/** Creates a TQPtrList<KKownHostInfo> with the info contained in the KListView of name servers. */
+ TQPtrList<KKnownHostInfo> getKnownHostsList(KListView * hostsList);
+ TQString currentDevice;
KRoutingInfo *routingInfo;
KDNSInfo *dnsInfo;
bool reloaded;
- QString commandOutput;
- QProcess *procUpdateDevice;
- QProcess *procDeviceState;
- QStringList deviceNamesList;
+ TQString commandOutput;
+ TQProcess *procUpdateDevice;
+ TQProcess *procDeviceState;
+ TQStringList deviceNamesList;
bool devicesModified;
bool readOnly;
- QPtrList<KKnownHostInfo> knownHostsList;
- QPtrList<KNetworkInfo> profilesList;
+ TQPtrList<KKnownHostInfo> knownHostsList;
+ TQPtrList<KNetworkInfo> profilesList;
bool nameServersModified;
/** The program's version. */
- QString version;
+ TQString version;
bool modified;
bool devStateChanged;
/** */
KNetworkInfo * netInfo;
/** Has the errors throwed by GST when executed. */
- QString commandErrOutput;
+ TQString commandErrOutput;
/** Changes the state of device 'dev' to DEVICE_UP or DEVICE_DOWN.
Return true on success, false on failure. */
- void changeDeviceState(const QString &dev, int state);
- KNetworkInfo *getProfile(QPtrList<KNetworkInfo> profilesList, QString selectedProfile);
- void showSelectedProfile(QString profile);
+ void changeDeviceState(const TQString &dev, int state);
+ KNetworkInfo *getProfile(TQPtrList<KNetworkInfo> profilesList, TQString selectedProfile);
+ void showSelectedProfile(TQString profile);
KProfilesListViewToolTip *tooltip;
public slots:
@@ -157,22 +157,22 @@ class KNetworkConf : public KNetworkConfDlg, virtual public KNetworkConfIface
/** Shows the help browser. Hopefully some day it will be one :-). */
virtual void helpSlot();
virtual void enableApplyButtonSlot(bool);
- virtual void enableApplyButtonSlot(const QString &text);
+ virtual void enableApplyButtonSlot(const TQString &text);
/** Saves all the modified info of devices, routes,etc. */
virtual void moveDownServerSlot();
virtual void moveUpServerSlot();
virtual void removeServerSlot();
bool valuesChanged(KNetworkInterface *dev,
- QString bootProto,
- QString netmask,
- QString ipAddr,
- QString gateway,
+ TQString bootProto,
+ TQString netmask,
+ TQString ipAddr,
+ TQString gateway,
bool onBoot,
- QString desc,
- QString broadcast);
+ TQString desc,
+ TQString broadcast);
/** Returns a list of strings of all the configured devices. */
- QStringList getDeviceList();
- /** Sets the QPushButton::autoResize() in true for all buttons. */
+ TQStringList getDeviceList();
+ /** Sets the TQPushButton::autoResize() in true for all buttons. */
void makeButtonsResizeable();
/** Adds a new host to the KListView that has the known hosts. */
@@ -189,16 +189,16 @@ class KNetworkConf : public KNetworkConfDlg, virtual public KNetworkConfIface
void showMainWindow();
void verifyDeviceStateChanged();
/** Sees if a device is active or not in the ifconfig output. Not very nice, but it works. Inthe future, this has to be managed by gst. */
- bool isDeviceActive(const QString &device, const QString &ifconfigOutput);
+ bool isDeviceActive(const TQString &device, const TQString &ifconfigOutput);
/*Shows a context menu when right-clicking in the interface list*/
- void showInterfaceContextMenuSlot(KListView*, QListViewItem*, const QPoint&);
+ void showInterfaceContextMenuSlot(KListView*, TQListViewItem*, const TQPoint&);
/** Enable some signals in the GUI that need to be enabled *after* the loading of the network info is done.*/
void enableSignals ();
virtual void enableProfileSlot();
virtual void createProfileSlot();
- //virtual void updateProfileNameSlot(QListViewItem *item);
+ //virtual void updateProfileNameSlot(TQListViewItem *item);
virtual void removeProfileSlot();
virtual void updateProfileSlot();
diff --git a/knetworkconf/knetworkconf/knetworkconfdlg.ui.h b/knetworkconf/knetworkconf/knetworkconfdlg.ui.h
index 69a1275..68bb00f 100644
--- a/knetworkconf/knetworkconf/knetworkconfdlg.ui.h
+++ b/knetworkconf/knetworkconf/knetworkconfdlg.ui.h
@@ -43,7 +43,7 @@ void KNetworkConfDlg::enableApplyButtonSlot( bool )
}
-void KNetworkConfDlg::enableApplyButtonSlot( const QString & )
+void KNetworkConfDlg::enableApplyButtonSlot( const TQString & )
{
}
@@ -150,7 +150,7 @@ void KNetworkConfDlg::updateProfileNameSlot()
}
-void KNetworkConfDlg::updateProfileNameSlot( QListViewItem *item )
+void KNetworkConfDlg::updateProfileNameSlot( TQListViewItem *item )
{
}
diff --git a/knetworkconf/knetworkconf/knetworkconfigparser.cpp b/knetworkconf/knetworkconf/knetworkconfigparser.cpp
index 2e2351d..ceacdac 100644
--- a/knetworkconf/knetworkconf/knetworkconfigparser.cpp
+++ b/knetworkconf/knetworkconf/knetworkconfigparser.cpp
@@ -21,20 +21,20 @@
KNetworkConfigParser::KNetworkConfigParser(){
networkInfo = new KNetworkInfo();
- QString platform;
+ TQString platform;
bool askAgain = readAskAgain(platform);
if (!askAgain || platform.length() > 0)
runDetectionScript(platform);
else
- runDetectionScript(QString::null);
+ runDetectionScript(TQString::null);
}
/** Runs the gst backend to get network values. You can pass to the script a specific platform to load using the platform parameter. */
-void KNetworkConfigParser::runDetectionScript(QString platform){
+void KNetworkConfigParser::runDetectionScript(TQString platform){
KDetectDistroDlg* dialog = new KDetectDistroDlg(0, 0);
dialog->show();
- procDetect = new QProcess(this);
- QString pathToProgram = locate("data",BACKEND_PATH);
+ procDetect = new TQProcess(this);
+ TQString pathToProgram = locate("data",BACKEND_PATH);
if (pathToProgram.isEmpty())
{
KMessageBox::error(0,
@@ -46,17 +46,17 @@ void KNetworkConfigParser::runDetectionScript(QString platform){
else
{
procDetect->addArgument( pathToProgram );
- if (platform != QString::null)
+ if (platform != TQString::null)
{
procDetect->addArgument( "--platform" );
procDetect->addArgument( platform );
}
procDetect->addArgument( "--get" );
- connect( this, SIGNAL(readyLoadingNetworkInfo()), dialog, SLOT(close()) );
- connect( this, SIGNAL(errorDetectingPlatform()), dialog, SLOT(close()) );
- connect( procDetect, SIGNAL(processExited()), this, SLOT(readNetworkInfo()) );
- connect( procDetect, SIGNAL(readyReadStdout()),this, SLOT(concatXMLOutputSlot()));
- connect( procDetect, SIGNAL(readyReadStderr()),this, SLOT(readXMLErrSlot()));
+ connect( this, TQT_SIGNAL(readyLoadingNetworkInfo()), dialog, TQT_SLOT(close()) );
+ connect( this, TQT_SIGNAL(errorDetectingPlatform()), dialog, TQT_SLOT(close()) );
+ connect( procDetect, TQT_SIGNAL(processExited()), this, TQT_SLOT(readNetworkInfo()) );
+ connect( procDetect, TQT_SIGNAL(readyReadStdout()),this, TQT_SLOT(concatXMLOutputSlot()));
+ connect( procDetect, TQT_SIGNAL(readyReadStderr()),this, TQT_SLOT(readXMLErrSlot()));
if ( !procDetect->start() )
{
@@ -70,10 +70,10 @@ void KNetworkConfigParser::runDetectionScript(QString platform){
}
/** runs gst to find out the state of network devices.It runs the command:
$knetworkconf_home/backends/networkconf [--platform platform] -d list_ifaces. */
-void KNetworkConfigParser::listIfaces(const QString &platform){
- procDetect = new QProcess(this);
+void KNetworkConfigParser::listIfaces(const TQString &platform){
+ procDetect = new TQProcess(this);
procDetect->addArgument( locate("data",BACKEND_PATH) );
- if (platform != QString::null)
+ if (platform != TQString::null)
{
procDetect->addArgument( "--platform" );
procDetect->addArgument( platform );
@@ -82,9 +82,9 @@ void KNetworkConfigParser::listIfaces(const QString &platform){
procDetect->addArgument( "-d" );
procDetect->addArgument( "list_ifaces" );
- connect( procDetect, SIGNAL(processExited()), this, SLOT(readListIfacesSlot()) );
- connect( procDetect, SIGNAL(readyReadStdout()),this, SLOT(concatXMLOutputSlot()));
- connect( procDetect, SIGNAL(readyReadStderr()),this, SLOT(readXMLErrSlot()));
+ connect( procDetect, TQT_SIGNAL(processExited()), this, TQT_SLOT(readListIfacesSlot()) );
+ connect( procDetect, TQT_SIGNAL(readyReadStdout()),this, TQT_SLOT(concatXMLOutputSlot()));
+ connect( procDetect, TQT_SIGNAL(readyReadStderr()),this, TQT_SLOT(readXMLErrSlot()));
xmlOuput = "";
xmlErr = "";
@@ -98,15 +98,15 @@ void KNetworkConfigParser::listIfaces(const QString &platform){
}
void KNetworkConfigParser::readListIfacesSlot(){
- QPtrList<KNetworkInterface> tempDeviceList;
+ TQPtrList<KNetworkInterface> tempDeviceList;
//The gst backend puts a \n at the beginning of the xml output, so
//we have to erase it first before we parse it.
xmlOuput = xmlOuput.section('\n',1);
qDebug("XML -d list_ifaces: %s",xmlOuput.latin1());
- QString err;
+ TQString err;
int x,y;
- QDomDocument doc( "network-ifaces");
+ TQDomDocument doc( "network-ifaces");
if ( !doc.setContent( xmlOuput.utf8(),false,&err,&x,&y ) )
{
KMessageBox::error(0,
@@ -114,16 +114,16 @@ void KNetworkConfigParser::readListIfacesSlot(){
i18n("Error While Listing Network Interfaces"));
// qDebug("error: %s %d,%d",err.latin1(),x,y);
}
- QDomElement root = doc.documentElement();
- QDomNode node = root.firstChild();
+ TQDomElement root = doc.documentElement();
+ TQDomNode node = root.firstChild();
while( !node.isNull() )
{
if ( node.isElement() && node.nodeName() == "interface" )
{
- QDomElement interface = node.toElement();
+ TQDomElement interface = node.toElement();
KNetworkInterface *tempDevice = new KNetworkInterface();
- tempDevice = getInterfaceInfo(interface,QString::null);
+ tempDevice = getInterfaceInfo(interface,TQString::null);
if (tempDevice->getType().lower() != LOOPBACK_IFACE_TYPE)
{
@@ -163,14 +163,14 @@ unsigned KNetworkConfigParser::numDevices(){
return _numDevices;
}
-void KNetworkConfigParser::setProgramVersion(QString ver)
+void KNetworkConfigParser::setProgramVersion(TQString ver)
{
KNetworkConfigParser::programVersion = ver;
}
void KNetworkConfigParser::readIfconfigOutput(){
- QString s = proc->readStdout();
+ TQString s = proc->readStdout();
ifconfigOutput = s;
}
@@ -184,7 +184,7 @@ void KNetworkConfigParser::readIfconfigOutput(){
*/
void KNetworkConfigParser::loadRoutingInfo( KRoutingInfo *routingInfo){
#ifndef Q_OS_FREEBSD
- QFile f( "/proc/net/route");
+ TQFile f( "/proc/net/route");
if ( !f.open(IO_ReadOnly) )
{
KMessageBox::error(0,
@@ -193,14 +193,14 @@ void KNetworkConfigParser::loadRoutingInfo( KRoutingInfo *routingInfo){
}
else
{
- QTextStream t( &f ); // use a text stream
- QString s;
+ TQTextStream t( &f ); // use a text stream
+ TQString s;
while (!t.eof())
{
s = t.readLine(); // line of text excluding '\n'
- QString interface = s.section('\t',0,0);
- QString destination = s.section('\t',1,1);
- QString gw = s.section('\t',2,2);
+ TQString interface = s.section('\t',0,0);
+ TQString destination = s.section('\t',1,1);
+ TQString gw = s.section('\t',2,2);
if (destination == "00000000")
{
@@ -213,13 +213,13 @@ void KNetworkConfigParser::loadRoutingInfo( KRoutingInfo *routingInfo){
#endif
}
QString
-KNetworkConfigParser::hexIPv4ToDecIPv4(const QString &hex)
+KNetworkConfigParser::hexIPv4ToDecIPv4(const TQString &hex)
{
bool ok;
- QString dec = "";
- QString dec2 = "";
- QString temp = "";
- QString temp2 = "";
+ TQString dec = "";
+ TQString dec2 = "";
+ TQString temp = "";
+ TQString temp2 = "";
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
temp = hex.mid(6,2);
@@ -265,16 +265,16 @@ KNetworkConfigParser::hexIPv4ToDecIPv4(const QString &hex)
void KNetworkConfigParser::saveNetworkInfo(KNetworkInfo *networkInfo)
{
this->networkInfo = networkInfo;
- QPtrList<KNetworkInterface> devList = networkInfo->getDeviceList();
- QPtrList<KNetworkInfo> profileList = networkInfo->getProfilesList();
+ TQPtrList<KNetworkInterface> devList = networkInfo->getDeviceList();
+ TQPtrList<KNetworkInfo> profileList = networkInfo->getProfilesList();
dnsInfo = networkInfo->getDNSInfo();
routingInfo = networkInfo->getRoutingInfo();
//Start xml file
- QDomDocument doc( "network []" );
- QDomProcessingInstruction instr = doc.createProcessingInstruction("xml","version=\"1.0\" ");
+ TQDomDocument doc( "network []" );
+ TQDomProcessingInstruction instr = doc.createProcessingInstruction("xml","version=\"1.0\" ");
doc.appendChild(instr);
- QDomElement root = doc.createElement( "network" );
+ TQDomElement root = doc.createElement( "network" );
doc.appendChild( root );
addRoutingInfoToXMLDoc(&doc, &root, routingInfo);
@@ -283,12 +283,12 @@ void KNetworkConfigParser::saveNetworkInfo(KNetworkInfo *networkInfo)
addNetworkProfilesToXMLDoc(&doc, &root, profileList);
//If we don't add this comment to the end of the xml file, the gst process never exits!
- QDomComment endComment = doc.createComment(" GST: end of request ");
+ TQDomComment endComment = doc.createComment(" GST: end of request ");
doc.appendChild( endComment );
- QString xml = doc.toString();
+ TQString xml = doc.toString();
qDebug("--set XML:\n%s",xml.latin1());
- procSaveNetworkInfo = new QProcess(this);
+ procSaveNetworkInfo = new TQProcess(this);
procSaveNetworkInfo->addArgument( locate("data",BACKEND_PATH) );
if (!networkInfo->getPlatformName().isEmpty())
@@ -298,21 +298,21 @@ void KNetworkConfigParser::saveNetworkInfo(KNetworkInfo *networkInfo)
}
procSaveNetworkInfo->addArgument( "--set" );
-// KDetectDistroDlg* dialog = new KDetectDistroDlg(0, 0, true,QDialog::WStyle_Customize|QDialog::WStyle_NormalBorder|QDialog::WStyle_Title|QDialog::WStyle_SysMenu); //made it semi-modal
- KDetectDistroDlg* dialog = new KDetectDistroDlg((QWidget*)parent(), 0, true);
+// KDetectDistroDlg* dialog = new KDetectDistroDlg(0, 0, true,TQDialog::WStyle_Customize|TQDialog::WStyle_NormalBorder|TQDialog::WStyle_Title|TQDialog::WStyle_SysMenu); //made it semi-modal
+ KDetectDistroDlg* dialog = new KDetectDistroDlg((TQWidget*)parent(), 0, true);
dialog->setCaption(i18n("Reloading Network"));
dialog->text->setText(i18n("%1Please wait while saving the network settings...%2").arg("<center>").arg("</center>"));
dialog->show();
xmlOuput = "";
- connect( this, SIGNAL(readyLoadingNetworkInfo()), dialog, SLOT(close()) );
- connect(procSaveNetworkInfo,SIGNAL(readyReadStdout()),this,SLOT(readFromStdoutSaveNetworkInfo()));
- connect(procSaveNetworkInfo,SIGNAL(wroteToStdin()),this,SLOT(sendNetworkInfoSavedSignalSlot()));
- connect(procSaveNetworkInfo,SIGNAL(processExited()),this,SLOT(listIfacesSlot()));
+ connect( this, TQT_SIGNAL(readyLoadingNetworkInfo()), dialog, TQT_SLOT(close()) );
+ connect(procSaveNetworkInfo,TQT_SIGNAL(readyReadStdout()),this,TQT_SLOT(readFromStdoutSaveNetworkInfo()));
+ connect(procSaveNetworkInfo,TQT_SIGNAL(wroteToStdin()),this,TQT_SLOT(sendNetworkInfoSavedSignalSlot()));
+ connect(procSaveNetworkInfo,TQT_SIGNAL(processExited()),this,TQT_SLOT(listIfacesSlot()));
processRunning = true;
- connect( procSaveNetworkInfo, SIGNAL(processExited()), this, SLOT(processExitedSlot()) );
+ connect( procSaveNetworkInfo, TQT_SIGNAL(processExited()), this, TQT_SLOT(processExitedSlot()) );
if ( !procSaveNetworkInfo->start() )
{
@@ -333,25 +333,25 @@ void KNetworkConfigParser::processExitedSlot() {
processRunning = false;
}
-void KNetworkConfigParser::addNetworkProfilesToXMLDoc(QDomDocument *doc, QDomNode *root, QPtrList<KNetworkInfo> profileList)
+void KNetworkConfigParser::addNetworkProfilesToXMLDoc(TQDomDocument *doc, TQDomNode *root, TQPtrList<KNetworkInfo> profileList)
{
- QPtrListIterator<KNetworkInfo> profileIt(profileList);
+ TQPtrListIterator<KNetworkInfo> profileIt(profileList);
KNetworkInfo *profile;
- QDomElement tag = doc->createElement( "profiledb" );
+ TQDomElement tag = doc->createElement( "profiledb" );
root->appendChild( tag );
while ( (profile = profileIt.current()) != 0)
{
++profileIt;
- QPtrList<KNetworkInterface> devList = profile->getDeviceList();
+ TQPtrList<KNetworkInterface> devList = profile->getDeviceList();
KDNSInfo *dnsInfo = profile->getDNSInfo();
KRoutingInfo *routingInfo = profile->getRoutingInfo();
- QDomElement profileTag = doc->createElement( "profile" );
+ TQDomElement profileTag = doc->createElement( "profile" );
tag.appendChild( profileTag );
- QDomElement innerTag = doc->createElement( "name" );
+ TQDomElement innerTag = doc->createElement( "name" );
profileTag.appendChild( innerTag );
- QDomText t = doc->createTextNode( profile->getProfileName() );
+ TQDomText t = doc->createTextNode( profile->getProfileName() );
innerTag.appendChild( t );
addRoutingInfoToXMLDoc(doc, &profileTag, routingInfo);
@@ -360,10 +360,10 @@ void KNetworkConfigParser::addNetworkProfilesToXMLDoc(QDomDocument *doc, QDomNod
}
}
-void KNetworkConfigParser::addNetworkInterfacesToXMLDoc(QDomDocument *doc, QDomNode *root, QPtrList<KNetworkInterface> devList)
+void KNetworkConfigParser::addNetworkInterfacesToXMLDoc(TQDomDocument *doc, TQDomNode *root, TQPtrList<KNetworkInterface> devList)
{
KNetworkInterface *device;
- QPtrListIterator<KNetworkInterface> devIt(devList);
+ TQPtrListIterator<KNetworkInterface> devIt(devList);
//Save in the configuration file the description of the interfaces as
//the backend no longer handles this
@@ -378,15 +378,15 @@ void KNetworkConfigParser::addNetworkInterfacesToXMLDoc(QDomDocument *doc, QDomN
if (device->getBootProto().isEmpty())
continue;
- QDomElement tag = doc->createElement( "interface" );
+ TQDomElement tag = doc->createElement( "interface" );
tag.setAttribute("type",device->getType());
root->appendChild( tag );
- QDomElement configurationTag;
+ TQDomElement configurationTag;
configurationTag = doc->createElement( "configuration" );
tag.appendChild( configurationTag );
- QDomElement innerTag;
- QDomText t;
+ TQDomElement innerTag;
+ TQDomText t;
if ((device->getBootProto().lower() != "dhcp") && (device->getBootProto().lower() != "bootp"))
{
if (!device->getIpAddress().isEmpty())
@@ -502,16 +502,16 @@ void KNetworkConfigParser::addNetworkInterfacesToXMLDoc(QDomDocument *doc, QDomN
}
}
-void KNetworkConfigParser::addDNSInfoToXMLDoc(QDomDocument *doc, QDomNode *root, KDNSInfo *dnsInfo)
+void KNetworkConfigParser::addDNSInfoToXMLDoc(TQDomDocument *doc, TQDomNode *root, KDNSInfo *dnsInfo)
{
- QStringList nameServerList = dnsInfo->getNameServers();
- QPtrList<KKnownHostInfo> knownHostsList = dnsInfo->getKnownHostsList();
- QPtrListIterator<KKnownHostInfo> knownHostsIt(knownHostsList);
+ TQStringList nameServerList = dnsInfo->getNameServers();
+ TQPtrList<KKnownHostInfo> knownHostsList = dnsInfo->getKnownHostsList();
+ TQPtrListIterator<KKnownHostInfo> knownHostsIt(knownHostsList);
KKnownHostInfo *host;
- QDomElement tag = doc->createElement( "hostname" );
+ TQDomElement tag = doc->createElement( "hostname" );
root->appendChild( tag );
- QDomText t = doc->createTextNode( dnsInfo->getMachineName() );
+ TQDomText t = doc->createTextNode( dnsInfo->getMachineName() );
tag.appendChild( t );
tag = doc->createElement( "domain" );
root->appendChild( tag );
@@ -519,7 +519,7 @@ void KNetworkConfigParser::addDNSInfoToXMLDoc(QDomDocument *doc, QDomNode *root,
tag.appendChild( t );
//Add the list of name servers
- for ( QStringList::Iterator it = nameServerList.begin(); it != nameServerList.end(); ++it ) {
+ for ( TQStringList::Iterator it = nameServerList.begin(); it != nameServerList.end(); ++it ) {
tag = doc->createElement( "nameserver" );
root->appendChild( tag );
t = doc->createTextNode( *it );
@@ -532,7 +532,7 @@ void KNetworkConfigParser::addDNSInfoToXMLDoc(QDomDocument *doc, QDomNode *root,
++knownHostsIt;
tag = doc->createElement( "statichost" );
root->appendChild( tag );
- QDomElement innerTag;
+ TQDomElement innerTag;
if (!host->getIpAddress().isEmpty())
{
innerTag = doc->createElement( "ip" );
@@ -540,9 +540,9 @@ void KNetworkConfigParser::addDNSInfoToXMLDoc(QDomDocument *doc, QDomNode *root,
t = doc->createTextNode( host->getIpAddress() );
innerTag.appendChild( t );
}
- QStringList aliases = host->getAliases();
+ TQStringList aliases = host->getAliases();
- for ( QStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it )
+ for ( TQStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it )
{
innerTag = doc->createElement( "alias" );
tag.appendChild( innerTag );
@@ -552,11 +552,11 @@ void KNetworkConfigParser::addDNSInfoToXMLDoc(QDomDocument *doc, QDomNode *root,
}
}
-void KNetworkConfigParser::addRoutingInfoToXMLDoc(QDomDocument *doc, QDomNode *root, KRoutingInfo *routingInfo)
+void KNetworkConfigParser::addRoutingInfoToXMLDoc(TQDomDocument *doc, TQDomNode *root, KRoutingInfo *routingInfo)
{
- QDomElement tag = doc->createElement( "gateway" );
+ TQDomElement tag = doc->createElement( "gateway" );
root->appendChild( tag );
- QDomText t = doc->createTextNode( routingInfo->getGateway() );
+ TQDomText t = doc->createTextNode( routingInfo->getGateway() );
tag.appendChild( t );
tag = doc->createElement( "gatewaydev" );
@@ -573,7 +573,7 @@ KNetworkInfo * KNetworkConfigParser::getNetworkInfo(){
/** Parses all of the <interface>...</interface> entries in the xml configuration file. Returns a KWirelessInterface
object that contains all the info of the wireless interface. */
-KWirelessInterface * KNetworkConfigParser::getWirelessInterfaceInfo(QDomElement interface, const QString &type){
+KWirelessInterface * KNetworkConfigParser::getWirelessInterfaceInfo(TQDomElement interface, const TQString &type){
KWirelessInterface *wifiDevice = new KWirelessInterface();
KNetworkInterface *tempDevice = NULL;
@@ -585,37 +585,37 @@ KWirelessInterface * KNetworkConfigParser::getWirelessInterfaceInfo(QDomElement
memcpy(wifiDevice,tempDevice,sizeof(KNetworkInterface));
//wifiDevice = static_cast<KWirelessInterface*>(tempDevice);
- QDomNode node = interface.firstChild();
+ TQDomNode node = interface.firstChild();
while ( !node.isNull() )
{
if ( node.isElement() )
{
- QString nodeName =node.nodeName();
+ TQString nodeName =node.nodeName();
//Parsing --get interfaces configuration
if ( node.isElement() && node.nodeName() == "configuration" )
{
- QDomNode configNode = node.firstChild();
+ TQDomNode configNode = node.firstChild();
while ( !configNode.isNull() )
{
if ( configNode.isElement() )
{
- QString configNodeName =configNode.nodeName();
+ TQString configNodeName =configNode.nodeName();
if ( configNodeName == "key" )
{
- QDomElement e = configNode.toElement();
+ TQDomElement e = configNode.toElement();
wifiDevice->setWepKey(e.text());
}
else if ( configNodeName == "essid" )
{
- QDomElement e = configNode.toElement();
+ TQDomElement e = configNode.toElement();
wifiDevice->setEssid(e.text());
}
else if ( configNodeName == "key_type" )
{
- QDomElement e = configNode.toElement();
+ TQDomElement e = configNode.toElement();
wifiDevice->setKeyType(e.text());
}
configNode = configNode.nextSibling();
@@ -631,8 +631,8 @@ KWirelessInterface * KNetworkConfigParser::getWirelessInterfaceInfo(QDomElement
/** Parses all of the <interface>...</interface> entries in the xml configuration file. Returns a KNetworkInterface
object with all the info of the interface.*/
-KNetworkInterface * KNetworkConfigParser::getInterfaceInfo(QDomElement interface, const QString &type){
- QDomNode node = interface.firstChild();
+KNetworkInterface * KNetworkConfigParser::getInterfaceInfo(TQDomElement interface, const TQString &type){
+ TQDomNode node = interface.firstChild();
KNetworkInterface *tempDevice = new KNetworkInterface();
//tempDevice->setDescription(i18n("Ethernet Network Device"));
@@ -640,21 +640,21 @@ KNetworkInterface * KNetworkConfigParser::getInterfaceInfo(QDomElement interface
{
if ( node.isElement() )
{
- QString nodeName =node.nodeName();
+ TQString nodeName =node.nodeName();
//Parsing --get interfaces configuration
if ( node.isElement() && node.nodeName() == "configuration" )
{
- QDomNode configNode = node.firstChild();
+ TQDomNode configNode = node.firstChild();
while ( !configNode.isNull() )
{
if ( configNode.isElement() )
{
- QString configNodeName =configNode.nodeName();
+ TQString configNodeName =configNode.nodeName();
if ( configNodeName == "auto" )
{
- QDomElement e = configNode.toElement();
+ TQDomElement e = configNode.toElement();
if (e.text() == "1")
tempDevice->setOnBoot("yes");
else
@@ -662,36 +662,36 @@ KNetworkInterface * KNetworkConfigParser::getInterfaceInfo(QDomElement interface
}
else if ( configNodeName == "bootproto" )
{
- QDomElement e = configNode.toElement();
+ TQDomElement e = configNode.toElement();
tempDevice->setBootProto(e.text());
}
if ( configNodeName == "address" || configNodeName == "addr")
{
- QDomElement e = configNode.toElement();
+ TQDomElement e = configNode.toElement();
if (!e.text().isEmpty())
tempDevice->setIpAddress(e.text());
}
else if ( configNodeName == "gateway")
{
- QDomElement e = configNode.toElement();
+ TQDomElement e = configNode.toElement();
if (!e.text().isEmpty())
tempDevice->setGateway(e.text());
}
else if ( configNodeName == "netmask" || configNodeName == "mask")
{
- QDomElement e = configNode.toElement();
+ TQDomElement e = configNode.toElement();
if (!e.text().isEmpty())
tempDevice->setNetmask(e.text());
}
else if ( configNodeName == "network" )
{
- QDomElement e = configNode.toElement();
+ TQDomElement e = configNode.toElement();
if (!e.text().isEmpty())
tempDevice->setNetwork(e.text());
}
else if ( configNodeName == "broadcast" || configNodeName == "bdcast")
{
- QDomElement e = configNode.toElement();
+ TQDomElement e = configNode.toElement();
if (!e.text().isEmpty())
tempDevice->setBroadcast(e.text());
}
@@ -703,19 +703,19 @@ KNetworkInterface * KNetworkConfigParser::getInterfaceInfo(QDomElement interface
//Parse -d list_ifaces interfaces configuration
if ( nodeName == "addr")
{
- QDomElement e = node.toElement();
+ TQDomElement e = node.toElement();
if (!e.text().isEmpty())
tempDevice->setIpAddress(e.text());
}
else if ( nodeName == "mask")
{
- QDomElement e = node.toElement();
+ TQDomElement e = node.toElement();
if (!e.text().isEmpty())
tempDevice->setNetmask(e.text());
}
else if ( nodeName == "bdcast")
{
- QDomElement e = node.toElement();
+ TQDomElement e = node.toElement();
if (!e.text().isEmpty())
tempDevice->setBroadcast(e.text());
}
@@ -724,7 +724,7 @@ KNetworkInterface * KNetworkConfigParser::getInterfaceInfo(QDomElement interface
//These ones are common for both --get and -d list_ifaces
else if ( nodeName == "dev" )
{
- QDomElement e = node.toElement();
+ TQDomElement e = node.toElement();
tempDevice->setDeviceName(e.text());
}
//we had to add the OR because the xml sintax when listing the interfaces
@@ -732,7 +732,7 @@ KNetworkInterface * KNetworkConfigParser::getInterfaceInfo(QDomElement interface
//address->addr, etc...
else if ( nodeName == "enabled" || nodeName == "active")
{
- QDomElement e = node.toElement();
+ TQDomElement e = node.toElement();
if (e.text() == "1")
tempDevice->setActive(true);
else
@@ -740,17 +740,17 @@ KNetworkInterface * KNetworkConfigParser::getInterfaceInfo(QDomElement interface
}
else if ( nodeName == "hwaddr" )
{
- QDomElement e = node.toElement();
+ TQDomElement e = node.toElement();
if (!e.text().isEmpty())
tempDevice->setMacAddress(e.text());
}
}
node = node.nextSibling();
}
- if (type != QString::null)
+ if (type != TQString::null)
tempDevice->setType(type);
- QString description;
+ TQString description;
KSimpleConfig cfg("knetworkconfrc");
cfg.setGroup("Interfaces");
description = cfg.readEntry(tempDevice->getDeviceName());
@@ -778,26 +778,26 @@ KNetworkInterface * KNetworkConfigParser::getInterfaceInfo(QDomElement interface
}
/** Parses all of the <statichost>...</statichost> entries in the xml configuration file. */
-KKnownHostInfo * KNetworkConfigParser::getStaticHostInfo(QDomElement host)
+KKnownHostInfo * KNetworkConfigParser::getStaticHostInfo(TQDomElement host)
{
- QDomNode node = host.firstChild();
+ TQDomNode node = host.firstChild();
KKnownHostInfo *tempHost = new KKnownHostInfo();
while ( !node.isNull() )
{
if ( node.isElement() )
{
- QString nodeName =node.nodeName();
+ TQString nodeName =node.nodeName();
if ( nodeName == "ip")
{
- QDomElement e = node.toElement();
+ TQDomElement e = node.toElement();
if (!e.text().isEmpty())
tempHost->setIpAddress(e.text());
}
else if ( nodeName == "alias")
{
- QDomElement e = node.toElement();
+ TQDomElement e = node.toElement();
if (!e.text().isEmpty())
tempHost->addAlias(e.text());
}
@@ -811,7 +811,7 @@ KKnownHostInfo * KNetworkConfigParser::getStaticHostInfo(QDomElement host)
/** Reads the xml with the network info. */
void KNetworkConfigParser::readNetworkInfo()
{
- QPtrList<KNetworkInfo> profilesList;
+ TQPtrList<KNetworkInfo> profilesList;
//deviceList.clear();
//The gst backend puts a \n at the beginning of the xml output, so
//we have to erase it first before we can parse it.
@@ -822,15 +822,15 @@ void KNetworkConfigParser::readNetworkInfo()
//user a dialog with all the supported platforms to choose.
if (xmlErr.contains("platform_unsup::"))
{
- connect( this, SIGNAL(readyLoadingSupportedPlatforms()), this, SLOT(showSupportedPlatformsDialogSlot()) );
+ connect( this, TQT_SIGNAL(readyLoadingSupportedPlatforms()), this, TQT_SLOT(showSupportedPlatformsDialogSlot()) );
loadSupportedPlatforms();
emit errorDetectingPlatform();
}
else //parse the XML file
{
- QString err;
+ TQString err;
int x,y;
- QDomDocument doc( "network");
+ TQDomDocument doc( "network");
if ( !doc.setContent( xmlOuput.utf8(),false,&err,&x,&y ) )
{
KMessageBox::error(0,
@@ -839,8 +839,8 @@ void KNetworkConfigParser::readNetworkInfo()
// qDebug("error: %s %d,%d",err.latin1(),x,y);
}
- QDomElement root = doc.documentElement();
- QDomNode node = root.firstChild();
+ TQDomElement root = doc.documentElement();
+ TQDomNode node = root.firstChild();
//Load first the network information
parseNetworkInfo(node, networkInfo, false);
@@ -851,22 +851,22 @@ void KNetworkConfigParser::readNetworkInfo()
{
if ( node.isElement())
{
- QString nodeName = node.nodeName();
+ TQString nodeName = node.nodeName();
if ( nodeName == "profiledb" )
{
- QDomNode profileNode = node.firstChild();
+ TQDomNode profileNode = node.firstChild();
while( !profileNode.isNull() )
{
if ( profileNode.isElement())
{
- QString profileName = profileNode.nodeName();
+ TQString profileName = profileNode.nodeName();
if (profileNode.isElement() && profileName == "profile")
{
KNetworkInfo * networkProfile = new KNetworkInfo();
- QDomNode profileConfigurationNode = profileNode.firstChild();
+ TQDomNode profileConfigurationNode = profileNode.firstChild();
parseNetworkInfo(profileConfigurationNode, networkProfile, true);
profilesList.append(networkProfile);
}
@@ -881,44 +881,44 @@ void KNetworkConfigParser::readNetworkInfo()
}
}
-void KNetworkConfigParser::parseNetworkInfo(QDomNode node, KNetworkInfo *_networkInfo, bool isProfile){
- QPtrList<KNetworkInterface> deviceList;
+void KNetworkConfigParser::parseNetworkInfo(TQDomNode node, KNetworkInfo *_networkInfo, bool isProfile){
+ TQPtrList<KNetworkInterface> deviceList;
KDNSInfo *_dnsInfo = new KDNSInfo();
KRoutingInfo *_routingInfo = new KRoutingInfo();
- QStringList serverList;
- QPtrList<KNetworkInterface> tempDeviceList;
- QPtrList<KKnownHostInfo> knownHostsList;
+ TQStringList serverList;
+ TQPtrList<KNetworkInterface> tempDeviceList;
+ TQPtrList<KKnownHostInfo> knownHostsList;
while( !node.isNull() )
{
if ( node.isElement())
{
- QString nodeName = node.nodeName();
+ TQString nodeName = node.nodeName();
//Get the gatway
if ( nodeName == "gateway" )
{
- QDomElement gateway = node.toElement();
+ TQDomElement gateway = node.toElement();
_routingInfo->setGateway(gateway.text());
}
else if ( nodeName == "gatewaydev" )
{
- QDomElement gatewaydev = node.toElement();
+ TQDomElement gatewaydev = node.toElement();
_routingInfo->setGatewayDevice(gatewaydev.text());
}
//The name of the profile, in the case it's a profile ;)
else if ( nodeName == "name" && isProfile)
{
- QDomElement profileName = node.toElement();
+ TQDomElement profileName = node.toElement();
_networkInfo->setProfileName(profileName.text());
}
//Get the network interfaces
else if ( nodeName == "interface" )
{
- QDomElement interface = node.toElement();
+ TQDomElement interface = node.toElement();
- QString attr = interface.attribute("type").lower();
+ TQString attr = interface.attribute("type").lower();
//We have hardcoded to load only the supported interface types,
//for now, ethernet, loopback and wireless, thus loopback interfaces
//aren't shown.
@@ -939,26 +939,26 @@ void KNetworkConfigParser::parseNetworkInfo(QDomNode node, KNetworkInfo *_networ
//Get domain and host names
else if ( nodeName == "hostname" )
{
- QDomElement hostname = node.toElement();
+ TQDomElement hostname = node.toElement();
_dnsInfo->setMachineName(hostname.text());
}
else if ( nodeName == "domain" )
{
- QDomElement domainname = node.toElement();
+ TQDomElement domainname = node.toElement();
_dnsInfo->setDomainName(domainname.text());
}
//Get the nameServers
else if ( nodeName == "nameserver" )
{
- QDomElement nameserver = node.toElement();
+ TQDomElement nameserver = node.toElement();
serverList.append(nameserver.text());
}
//Get the static hosts
else if ( nodeName == "statichost" )
{
- QDomElement host = node.toElement();
+ TQDomElement host = node.toElement();
KKnownHostInfo *tempHost = getStaticHostInfo(host);
knownHostsList.append(tempHost);
}
@@ -982,7 +982,7 @@ void KNetworkConfigParser::parseNetworkInfo(QDomNode node, KNetworkInfo *_networ
//return _networkInfo;
}
void KNetworkConfigParser::readFromStdoutReloadScript(){
- QString s = procReloadNetwork->readStdout();
+ TQString s = procReloadNetwork->readStdout();
reloadScriptOutput.append(s);
}
/** emits a signal when the network changes have benn saved. */
@@ -990,7 +990,7 @@ void KNetworkConfigParser::sendNetworkInfoSavedSignalSlot(){
procSaveNetworkInfo->closeStdin();
}
-/** Concatenates into a QString the xml output of the network backend. */
+/** Concatenates into a TQString the xml output of the network backend. */
void KNetworkConfigParser::concatXMLOutputSlot(){
xmlOuput.append(procDetect->readStdout());
}
@@ -1000,14 +1000,14 @@ void KNetworkConfigParser::readXMLErrSlot(){
}
/** lists all platforms supported by GST. */
void KNetworkConfigParser::loadSupportedPlatforms(){
- procDetect = new QProcess(this);
+ procDetect = new TQProcess(this);
procDetect->addArgument( locate("data",BACKEND_PATH) );
procDetect->addArgument( "-d" );
procDetect->addArgument( "platforms" );
- connect( procDetect, SIGNAL(processExited()), this, SLOT(readSupportedPlatformsSlot()) );
+ connect( procDetect, TQT_SIGNAL(processExited()), this, TQT_SLOT(readSupportedPlatformsSlot()) );
xmlOuput = "";
- connect( procDetect, SIGNAL(readyReadStdout()),this, SLOT(concatXMLOutputSlot()));
-// connect( procDetect, SIGNAL(readyReadStderr()),this, SLOT(readXMLErrSlot()));
+ connect( procDetect, TQT_SIGNAL(readyReadStdout()),this, TQT_SLOT(concatXMLOutputSlot()));
+// connect( procDetect, TQT_SIGNAL(readyReadStderr()),this, TQT_SLOT(readXMLErrSlot()));
if ( !procDetect->start() )
{
@@ -1023,21 +1023,21 @@ void KNetworkConfigParser::readSupportedPlatformsSlot(){
//The gst backend puts a \n at the beginning of the xml output, so
//we have to erase it first before we parse it.
xmlOuput = xmlOuput.section('\n',1);
- QDomDocument doc( "platforms" );
+ TQDomDocument doc( "platforms" );
if ( !doc.setContent( xmlOuput.utf8() ) )
{
KMessageBox::error(0,
i18n("Could not parse the list of supported platforms from the network configuration backend."),
i18n("Error Obtaining Supported Platforms List"));
}
- QDomElement root = doc.documentElement();
- QDomNode node = root.firstChild();
- QString s;
+ TQDomElement root = doc.documentElement();
+ TQDomNode node = root.firstChild();
+ TQString s;
while( !node.isNull() )
{
if ( node.isElement() && node.nodeName() == "platform" )
{
- QDomElement platform = node.toElement();
+ TQDomElement platform = node.toElement();
s = getPlatformInfo(platform);
}
supportedPlatformsList << s;
@@ -1046,22 +1046,22 @@ void KNetworkConfigParser::readSupportedPlatformsSlot(){
emit readyLoadingSupportedPlatforms();
}
/** Returns the info of a platform in the form of 'key:value' . */
-QString KNetworkConfigParser::getPlatformInfo(QDomElement platform){
- QDomNode node = platform.firstChild();
- QString s;
+TQString KNetworkConfigParser::getPlatformInfo(TQDomElement platform){
+ TQDomNode node = platform.firstChild();
+ TQString s;
while ( !node.isNull() )
{
if ( node.isElement() )
{
if ( node.nodeName() == "key" )
{
- QDomElement e = node.toElement();
+ TQDomElement e = node.toElement();
s += e.text();
s += ":";
}
else if ( node.nodeName() == "name" )
{
- QDomElement e = node.toElement();
+ TQDomElement e = node.toElement();
s += e.text();
}
@@ -1075,100 +1075,100 @@ QString KNetworkConfigParser::getPlatformInfo(QDomElement platform){
void KNetworkConfigParser::showSupportedPlatformsDialogSlot(){
KSelectDistroDlg* dialog = new KSelectDistroDlg(0, 0);
- for ( QStringList::Iterator it = supportedPlatformsList.begin(); it != supportedPlatformsList.end(); ++it )
+ for ( TQStringList::Iterator it = supportedPlatformsList.begin(); it != supportedPlatformsList.end(); ++it )
{
- QString key = (*it);
+ TQString key = (*it);
key = key.section(":",0,0);
- QString name = (*it);
+ TQString name = (*it);
name = name.section(":",1,1);
if (key.contains("debian"))
{
- QPixmap distroImg(locate("data","knetworkconf/pixmaps/debian.png"));
+ TQPixmap distroImg(locate("data","knetworkconf/pixmaps/debian.png"));
dialog->klbDistroList->insertItem(distroImg, name);
}
else if (key.contains("mandriva"))
{
- QPixmap distroImg(locate("data","knetworkconf/pixmaps/mandriva.png"));
+ TQPixmap distroImg(locate("data","knetworkconf/pixmaps/mandriva.png"));
dialog->klbDistroList->insertItem(distroImg, name);
}
else if (key.contains("conectiva"))
{
- QPixmap distroImg(locate("data","knetworkconf/pixmaps/conectiva.png"));
+ TQPixmap distroImg(locate("data","knetworkconf/pixmaps/conectiva.png"));
dialog->klbDistroList->insertItem(distroImg, name);
}
else if (key.contains("pld"))
{
- QPixmap distroImg(locate("data","knetworkconf/pixmaps/pld.png"));
+ TQPixmap distroImg(locate("data","knetworkconf/pixmaps/pld.png"));
dialog->klbDistroList->insertItem(distroImg, name);
}
else if (key.contains("redhat"))
{
- QPixmap distroImg(locate("data","knetworkconf/pixmaps/redhat.png"));
+ TQPixmap distroImg(locate("data","knetworkconf/pixmaps/redhat.png"));
dialog->klbDistroList->insertItem(distroImg, name);
}
else if (key.contains("suse"))
{
- QPixmap distroImg(locate("data","knetworkconf/pixmaps/suse.png"));
+ TQPixmap distroImg(locate("data","knetworkconf/pixmaps/suse.png"));
dialog->klbDistroList->insertItem(distroImg, name);
}
else if (key.contains("turbolinux"))
{
- QPixmap distroImg(locate("data","knetworkconf/pixmaps/turbolinux.png"));
+ TQPixmap distroImg(locate("data","knetworkconf/pixmaps/turbolinux.png"));
dialog->klbDistroList->insertItem(distroImg, name);
}
else if (key.contains("fedora"))
{
- QPixmap distroImg(locate("data","knetworkconf/pixmaps/fedora.png"));
+ TQPixmap distroImg(locate("data","knetworkconf/pixmaps/fedora.png"));
dialog->klbDistroList->insertItem(distroImg, name);
}
else if (key.contains("openna"))
{
- QPixmap distroImg(locate("data","knetworkconf/pixmaps/openna.png"));
+ TQPixmap distroImg(locate("data","knetworkconf/pixmaps/openna.png"));
dialog->klbDistroList->insertItem(distroImg, name);
}
else if (key.contains("slackware"))
{
- QPixmap distroImg(locate("data","knetworkconf/pixmaps/slackware.png"));
+ TQPixmap distroImg(locate("data","knetworkconf/pixmaps/slackware.png"));
dialog->klbDistroList->insertItem(distroImg, name);
}
else if (key.contains("freebsd"))
{
- QPixmap distroImg(locate("data","knetworkconf/pixmaps/freebsd.png"));
+ TQPixmap distroImg(locate("data","knetworkconf/pixmaps/freebsd.png"));
dialog->klbDistroList->insertItem(distroImg, name);
}
else if (key.contains("gentoo"))
{
- QPixmap distroImg(locate("data","knetworkconf/pixmaps/gentoo.png"));
+ TQPixmap distroImg(locate("data","knetworkconf/pixmaps/gentoo.png"));
dialog->klbDistroList->insertItem(distroImg, name);
}
else if (key.contains("blackpanther"))
{
- QPixmap distroImg(locate("data","knetworkconf/pixmaps/blackpanther.png"));
+ TQPixmap distroImg(locate("data","knetworkconf/pixmaps/blackpanther.png"));
dialog->klbDistroList->insertItem(distroImg, name);
}
else if (key.contains("rpath"))
{
- QPixmap distroImg(locate("data","knetworkconf/pixmaps/rpath.png"));
+ TQPixmap distroImg(locate("data","knetworkconf/pixmaps/rpath.png"));
dialog->klbDistroList->insertItem(distroImg, name);
}
else if (key.contains("vine"))
{
- QPixmap distroImg(locate("data","knetworkconf/pixmaps/vine.png"));
+ TQPixmap distroImg(locate("data","knetworkconf/pixmaps/vine.png"));
dialog->klbDistroList->insertItem(distroImg, name);
}
else if (key.contains("ubuntu"))
{
- QPixmap distroImg(locate("data","knetworkconf/pixmaps/kubuntu.png"));
+ TQPixmap distroImg(locate("data","knetworkconf/pixmaps/kubuntu.png"));
dialog->klbDistroList->insertItem(distroImg, name);
}
else if (key.contains("yoper"))
{
- QPixmap distroImg(locate("data","knetworkconf/pixmaps/yoper.png"));
+ TQPixmap distroImg(locate("data","knetworkconf/pixmaps/yoper.png"));
dialog->klbDistroList->insertItem(distroImg, name);
}
else if (key.contains("ark"))
{
- QPixmap distroImg(locate("data","knetworkconf/pixmaps/ark.png"));
+ TQPixmap distroImg(locate("data","knetworkconf/pixmaps/ark.png"));
dialog->klbDistroList->insertItem(distroImg, name);
}
}
@@ -1178,13 +1178,13 @@ void KNetworkConfigParser::showSupportedPlatformsDialogSlot(){
else
{
int i = 0;
- QStringList::Iterator it = supportedPlatformsList.begin();
+ TQStringList::Iterator it = supportedPlatformsList.begin();
while (i < dialog->klbDistroList->currentItem())
{
i++;
++it;
}
- QString key = (*it);
+ TQString key = (*it);
key = key.section(":",0,0);
//clean variables and run again the detection script but now don't
//auto-detect.
@@ -1197,7 +1197,7 @@ void KNetworkConfigParser::showSupportedPlatformsDialogSlot(){
}
}
-void KNetworkConfigParser::saveAskAgain(const QString &platform, bool askAgain)
+void KNetworkConfigParser::saveAskAgain(const TQString &platform, bool askAgain)
{
KSimpleConfig cfg("knetworkconfrc");
cfg.setGroup("General");
@@ -1206,7 +1206,7 @@ void KNetworkConfigParser::saveAskAgain(const QString &platform, bool askAgain)
cfg.sync();
}
-bool KNetworkConfigParser::readAskAgain(QString &platform)
+bool KNetworkConfigParser::readAskAgain(TQString &platform)
{
KSimpleConfig cfg("knetworkconfrc");
cfg.setGroup("General");
@@ -1223,9 +1223,9 @@ void KNetworkConfigParser::listIfacesSlot(){
listIfaces(networkInfo->getPlatformName());
}
/**Returns the info of the network device 'device or NULL if not found.'*/
-KNetworkInterface * KNetworkConfigParser::getDeviceInfo(QString device){
- QPtrList<KNetworkInterface> deviceList = networkInfo->getDeviceList();
- QPtrListIterator<KNetworkInterface> i(deviceList);
+KNetworkInterface * KNetworkConfigParser::getDeviceInfo(TQString device){
+ TQPtrList<KNetworkInterface> deviceList = networkInfo->getDeviceList();
+ TQPtrListIterator<KNetworkInterface> i(deviceList);
KNetworkInterface *temp;
while ((temp = i.current()) != 0)
{
diff --git a/knetworkconf/knetworkconf/knetworkconfigparser.h b/knetworkconf/knetworkconf/knetworkconfigparser.h
index 0c2254e..f0af15f 100644
--- a/knetworkconf/knetworkconf/knetworkconfigparser.h
+++ b/knetworkconf/knetworkconf/knetworkconfigparser.h
@@ -33,14 +33,14 @@
#include <kapp.h>
#include <kmessagebox.h>
#include <klocale.h>
-#include <qobject.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qstring.h>
-#include <qprocess.h>
-#include <qdom.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
+#include <tqobject.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqstring.h>
+#include <tqprocess.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
#include <klistbox.h>
#include <ksimpleconfig.h>
@@ -57,14 +57,14 @@
*@author Juan Luis Baptiste
*/
-class KNetworkConfigParser : public QObject {
+class KNetworkConfigParser : public TQObject {
Q_OBJECT
public:
KNetworkConfigParser();
~KNetworkConfigParser();
/** return tyhe number of configured devices. */
unsigned numDevices();
- void setProgramVersion(QString ver);
+ void setProgramVersion(TQString ver);
/** Reads /proc/net/route looking for the default gateway. */
void loadRoutingInfo(KRoutingInfo *routingInfo);
/** Saves the new network configuration. */
@@ -72,28 +72,28 @@ class KNetworkConfigParser : public QObject {
/** Loads the network info from a xml file generated by the gnome system tools
network backends that are included with this app. */
KNetworkInfo * getNetworkInfo();
- QProcess * proc;
- QProcess * procDetect;
- QProcess * procSaveNetworkInfo;
+ TQProcess * proc;
+ TQProcess * procDetect;
+ TQProcess * procSaveNetworkInfo;
/** Variable to know if there is an dhcp device configured, so we can know if we need to save the defauilt gw info or not. */
bool dhcpDevice;
- KNetworkInterface * getDeviceInfo(QString device);
+ KNetworkInterface * getDeviceInfo(TQString device);
public slots:
/** runs gst to find out the state of network devices.It runs the command:
$knetworkconf_home/backends/networkconf [--platform platform] -d list_ifaces */
- void listIfaces(const QString &platform);
+ void listIfaces(const TQString &platform);
private slots:
/** Runs the gst backend to get network values. You can pass to the script a specific platform to load using the platform parameter. */
- void runDetectionScript(QString platform);
+ void runDetectionScript(TQString platform);
void readIfconfigOutput();
void readNetworkInfo();
void readFromStdoutReloadScript();
/** emits a signal when the network changes have benn saved. */
void sendNetworkInfoSavedSignalSlot();
- /** Concatenates into a QString the xml output of the network backend. */
+ /** Concatenates into a TQString the xml output of the network backend. */
void concatXMLOutputSlot();
void readXMLErrSlot();
/** Shows the dialog with all the supported platforms by GST. */
@@ -109,56 +109,56 @@ class KNetworkConfigParser : public QObject {
void processExitedSlot();
private:
- //QPtrList<KNetworkInterface> deviceList;
- QPtrList<KNetworkInterface> tempList;
+ //TQPtrList<KNetworkInterface> deviceList;
+ TQPtrList<KNetworkInterface> tempList;
KNetworkInterface *newDevice;
bool isUp;
/** Counts the number of configured devices that had been found. */
unsigned _numDevices;
KRoutingInfo *routingInfo;
KDNSInfo *dnsInfo;
- QString programVersion;
+ TQString programVersion;
/** The output of ifconfig command that needs to be parsed in readIfconfigOutput()*/
- QString ifconfigOutput;
+ TQString ifconfigOutput;
KNetworkInfo * networkInfo;
- QPtrList<KKnownHostInfo> knownHostsList;
- QString hexIPv4ToDecIPv4(const QString &hex);
+ TQPtrList<KKnownHostInfo> knownHostsList;
+ TQString hexIPv4ToDecIPv4(const TQString &hex);
/** lists all platforms supported by GST. */
void loadSupportedPlatforms();
/** Returns the info of a platform in the form of 'key:value' . */
- QString getPlatformInfo(QDomElement platform);
+ TQString getPlatformInfo(TQDomElement platform);
/** save process is running */
bool processRunning;
/** Shows a progress dialog while the networl is being reloaded. */
KInterfaceUpDownDlg * kpdReloadStatusDlg;
- QProcess *procReloadNetwork;
- QString reloadScriptOutput;
+ TQProcess *procReloadNetwork;
+ TQString reloadScriptOutput;
/** Contains the network configuration en xml format. */
/** List of supported platforms. */
- QStringList supportedPlatformsList;
- QString xmlOuput;
- QString xmlErr;
+ TQStringList supportedPlatformsList;
+ TQString xmlOuput;
+ TQString xmlErr;
/** Temporal device list to be used when loading the dhcp devices info */
- QPtrList<KNetworkInterface> tempDevList;
+ TQPtrList<KNetworkInterface> tempDevList;
/** Parses all of the <statichost>...</statichost> entries in the xml configuration file. */
- KKnownHostInfo * getStaticHostInfo(QDomElement host);
+ KKnownHostInfo * getStaticHostInfo(TQDomElement host);
/** Saves the option to show again or not the platform using KSimpleConfig*/
- void saveAskAgain(const QString &platform, bool askAgain);
+ void saveAskAgain(const TQString &platform, bool askAgain);
/**Returns if the show platform should be shown again or not and the saved platform*/
- bool readAskAgain(QString &platform);
- void parseNetworkInfo(QDomNode node, KNetworkInfo *networkInfo, bool isProfile);
- void addRoutingInfoToXMLDoc(QDomDocument *doc, QDomNode *root, KRoutingInfo *routingInfo);
- void addDNSInfoToXMLDoc(QDomDocument *doc, QDomNode *root, KDNSInfo *dnsInfo);
- void addNetworkInterfacesToXMLDoc(QDomDocument *doc, QDomNode *root, QPtrList<KNetworkInterface> devList);
- void addNetworkProfilesToXMLDoc(QDomDocument *doc, QDomNode *root, QPtrList<KNetworkInfo> profileList);
+ bool readAskAgain(TQString &platform);
+ void parseNetworkInfo(TQDomNode node, KNetworkInfo *networkInfo, bool isProfile);
+ void addRoutingInfoToXMLDoc(TQDomDocument *doc, TQDomNode *root, KRoutingInfo *routingInfo);
+ void addDNSInfoToXMLDoc(TQDomDocument *doc, TQDomNode *root, KDNSInfo *dnsInfo);
+ void addNetworkInterfacesToXMLDoc(TQDomDocument *doc, TQDomNode *root, TQPtrList<KNetworkInterface> devList);
+ void addNetworkProfilesToXMLDoc(TQDomDocument *doc, TQDomNode *root, TQPtrList<KNetworkInfo> profileList);
protected: // Protected methods
/** Parses all of the <interface>...</interface> entries in the xml configuration file. */
- virtual KNetworkInterface *getInterfaceInfo(QDomElement interface, const QString &type);
+ virtual KNetworkInterface *getInterfaceInfo(TQDomElement interface, const TQString &type);
/** Parses all of the <interface>...</interface> entries in the xml configuration file. Returns a KWirelessInterface
object that contains all the info of the wireless interface. */
- virtual KWirelessInterface *getWirelessInterfaceInfo(QDomElement interface, const QString &type);
+ virtual KWirelessInterface *getWirelessInterfaceInfo(TQDomElement interface, const TQString &type);
signals: // Signals
/** emmited when the xml file is finished reading. */
diff --git a/knetworkconf/knetworkconf/knetworkconfmodule.cpp b/knetworkconf/knetworkconf/knetworkconfmodule.cpp
index 03b8554..3f67b0c 100644
--- a/knetworkconf/knetworkconf/knetworkconfmodule.cpp
+++ b/knetworkconf/knetworkconf/knetworkconfmodule.cpp
@@ -17,19 +17,19 @@
#include <klocale.h>
#include <kcmodule.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <version.h>
#include "knetworkconfmodule.h"
-KNetworkConfModule::KNetworkConfModule(QWidget* parent, const char *name/*, QStringList list*/)
+KNetworkConfModule::KNetworkConfModule(TQWidget* parent, const char *name/*, TQStringList list*/)
: KCModule(parent,name)
{
- QVBoxLayout *top = new QVBoxLayout(this);
+ TQVBoxLayout *top = new TQVBoxLayout(this);
conf = new KNetworkConf(this);
- conf->setVersion(QString(VERSION));
+ conf->setVersion(TQString(VERSION));
conf->setReadOnly(false);
top->addWidget(conf);
@@ -39,7 +39,7 @@ KNetworkConfModule::KNetworkConfModule(QWidget* parent, const char *name/*, QStr
conf->setReadOnly(true);
}
- connect(conf,SIGNAL(networkStateChanged(bool)),SLOT(configChanged(bool)));
+ connect(conf,TQT_SIGNAL(networkStateChanged(bool)),TQT_SLOT(configChanged(bool)));
setButtons(KCModule::Apply|KCModule::Help);
}
@@ -74,7 +74,7 @@ bool KNetworkConfModule::useRootOnlyMsg() const
return true;
}
-QString KNetworkConfModule::rootOnlyMsg() const
+TQString KNetworkConfModule::rootOnlyMsg() const
{
return "Changing the network configuration requires root access";
}
@@ -108,7 +108,7 @@ KAboutData *aboutData = new KAboutData( "knetworkconf", I18N_NOOP("KNetworkConf"
return aboutData;// Memory leak, oh well...
}
-QString KNetworkConfModule::quickHelp() const
+TQString KNetworkConfModule::quickHelp() const
{
return i18n("%1Network configuration%2This module allows you to configure your TCP/IP settings.%3").arg("<h1>").arg("</h1><p>").arg("</p>");
}
diff --git a/knetworkconf/knetworkconf/knetworkconfmodule.h b/knetworkconf/knetworkconf/knetworkconfmodule.h
index 424dc94..6dedaed 100644
--- a/knetworkconf/knetworkconf/knetworkconfmodule.h
+++ b/knetworkconf/knetworkconf/knetworkconfmodule.h
@@ -27,7 +27,7 @@ class KNetworkConfModule : public KCModule
Q_OBJECT
public:
- KNetworkConfModule(QWidget* parent, const char *name/*, QStringList list*/);
+ KNetworkConfModule(TQWidget* parent, const char *name/*, TQStringList list*/);
~KNetworkConfModule();
void load();
@@ -35,9 +35,9 @@ public:
int buttons();
bool useRootOnlyMsg() const;
- QString rootOnlyMsg() const;
+ TQString rootOnlyMsg() const;
KAboutData* aboutData() const;
- QString quickHelp() const;
+ TQString quickHelp() const;
private slots:
void configChanged(bool);
diff --git a/knetworkconf/knetworkconf/knetworkinfo.cpp b/knetworkconf/knetworkconf/knetworkinfo.cpp
index 182bc14..ccbf511 100644
--- a/knetworkconf/knetworkconf/knetworkinfo.cpp
+++ b/knetworkconf/knetworkconf/knetworkinfo.cpp
@@ -21,7 +21,7 @@ KNetworkInfo::KNetworkInfo(){
}
KNetworkInfo::~KNetworkInfo(){
}
-void KNetworkInfo::setDeviceList(QPtrList<KNetworkInterface> deviceList){
+void KNetworkInfo::setDeviceList(TQPtrList<KNetworkInterface> deviceList){
KNetworkInfo::deviceList = deviceList;
}
void KNetworkInfo::setRoutingInfo(KRoutingInfo *routingInfo){
@@ -31,7 +31,7 @@ void KNetworkInfo::setDNSInfo(KDNSInfo *dnsInfo){
KNetworkInfo::dnsInfo = dnsInfo;
}
-QPtrList<KNetworkInterface> KNetworkInfo::getDeviceList(){
+TQPtrList<KNetworkInterface> KNetworkInfo::getDeviceList(){
return deviceList;
}
KRoutingInfo * KNetworkInfo::getRoutingInfo(){
@@ -41,35 +41,35 @@ KDNSInfo * KNetworkInfo::getDNSInfo(){
return dnsInfo;
}
-void KNetworkInfo::setNetworkScript(QString script){
+void KNetworkInfo::setNetworkScript(TQString script){
KNetworkInfo::networkScript = script;
}
-QString KNetworkInfo::getNetworkScript(){
+TQString KNetworkInfo::getNetworkScript(){
return networkScript;
}
/** Returns the platform name KnetworkConf is running on. */
-QString KNetworkInfo::getPlatformName(){
+TQString KNetworkInfo::getPlatformName(){
return platformName;
}
/** Sets the platform name KNetworkConf is running on. */
-void KNetworkInfo::setPlatformName(QString name){
+void KNetworkInfo::setPlatformName(TQString name){
KNetworkInfo::platformName = name;
}
-void KNetworkInfo::setProfilesList(QPtrList<KNetworkInfo> profilesList){
+void KNetworkInfo::setProfilesList(TQPtrList<KNetworkInfo> profilesList){
KNetworkInfo::profilesList = profilesList;
}
-QPtrList<KNetworkInfo> KNetworkInfo::getProfilesList(){
+TQPtrList<KNetworkInfo> KNetworkInfo::getProfilesList(){
return profilesList;
}
/** Returns the platform name KnetworkConf is running on. */
-QString KNetworkInfo::getProfileName(){
+TQString KNetworkInfo::getProfileName(){
return profileName;
}
/** Sets the platform name KNetworkConf is running on. */
-void KNetworkInfo::setProfileName(QString profileName){
+void KNetworkInfo::setProfileName(TQString profileName){
KNetworkInfo::profileName = profileName;
}
diff --git a/knetworkconf/knetworkconf/knetworkinfo.h b/knetworkconf/knetworkconf/knetworkinfo.h
index 7ae8b25..59c3dc0 100644
--- a/knetworkconf/knetworkconf/knetworkinfo.h
+++ b/knetworkconf/knetworkconf/knetworkinfo.h
@@ -18,8 +18,8 @@
#ifndef KNETWORKINFO_H
#define KNETWORKINFO_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include "knetworkinterface.h"
#include "kwirelessinterface.h"
#include "kaddressvalidator.h"
@@ -35,34 +35,34 @@ class KNetworkInfo {
KNetworkInfo();
~KNetworkInfo();
private: // Private attributes
- QPtrList<KNetworkInterface> deviceList;
+ TQPtrList<KNetworkInterface> deviceList;
KRoutingInfo *routingInfo;
/** Path to the network script that permits starting/stopping/reloading the
network. */
- QString networkScript;
+ TQString networkScript;
KDNSInfo *dnsInfo;
/** Platform name. */
- QString platformName;
- QPtrList<KNetworkInfo> profilesList;
- QString profileName;
+ TQString platformName;
+ TQPtrList<KNetworkInfo> profilesList;
+ TQString profileName;
public: // Public attributes
- void setDeviceList(QPtrList<KNetworkInterface> deviceList);
+ void setDeviceList(TQPtrList<KNetworkInterface> deviceList);
void setRoutingInfo(KRoutingInfo *routingInfo);
void setDNSInfo(KDNSInfo *dnsInfo);
- QPtrList<KNetworkInterface> getDeviceList();
+ TQPtrList<KNetworkInterface> getDeviceList();
KRoutingInfo *getRoutingInfo();
KDNSInfo *getDNSInfo();
- QString getNetworkScript();
- void setNetworkScript(QString script);
+ TQString getNetworkScript();
+ void setNetworkScript(TQString script);
/** Returns the platform name KnetworkConf is running on. */
- QString getPlatformName();
+ TQString getPlatformName();
/** Sets the platform name KNetworkConf is running on. */
- void setPlatformName(QString name);
- void setProfilesList(QPtrList<KNetworkInfo> profilesList);
- QPtrList<KNetworkInfo> getProfilesList();
- void setProfileName(QString profileName);
- QString getProfileName();
+ void setPlatformName(TQString name);
+ void setProfilesList(TQPtrList<KNetworkInfo> profilesList);
+ TQPtrList<KNetworkInfo> getProfilesList();
+ void setProfileName(TQString profileName);
+ TQString getProfileName();
};
#endif
diff --git a/knetworkconf/knetworkconf/knetworkinterface.cpp b/knetworkconf/knetworkconf/knetworkinterface.cpp
index 4e48c27..0a7fad5 100644
--- a/knetworkconf/knetworkconf/knetworkinterface.cpp
+++ b/knetworkconf/knetworkconf/knetworkinterface.cpp
@@ -22,53 +22,53 @@ KNetworkInterface::KNetworkInterface(){
KNetworkInterface::~KNetworkInterface(){
}
-QString KNetworkInterface::getBootProto(){
+TQString KNetworkInterface::getBootProto(){
return bootProto;
}
-QString KNetworkInterface::getBroadcast(){
+TQString KNetworkInterface::getBroadcast(){
return broadcast;
}
-QString KNetworkInterface::getDeviceName(){
+TQString KNetworkInterface::getDeviceName(){
return deviceName;
}
-QString KNetworkInterface::getIpAddress(){
+TQString KNetworkInterface::getIpAddress(){
return ipAddress;
}
-QString KNetworkInterface::getNetmask(){
+TQString KNetworkInterface::getNetmask(){
return netmask;
}
-QString KNetworkInterface::getNetwork(){
+TQString KNetworkInterface::getNetwork(){
return network;
}
-QString KNetworkInterface::getOnBoot(){
+TQString KNetworkInterface::getOnBoot(){
return onBoot;
}
-QString KNetworkInterface::getGateway(){
+TQString KNetworkInterface::getGateway(){
return gateway;
}
-void KNetworkInterface::setBootProto(const QString &bootProto){
+void KNetworkInterface::setBootProto(const TQString &bootProto){
KNetworkInterface::bootProto = bootProto;
}
-void KNetworkInterface::setBroadcast(const QString &broadcast){
+void KNetworkInterface::setBroadcast(const TQString &broadcast){
KNetworkInterface::broadcast = broadcast;
}
-void KNetworkInterface::setDeviceName(const QString &deviceName){
+void KNetworkInterface::setDeviceName(const TQString &deviceName){
KNetworkInterface::deviceName = deviceName;
}
-void KNetworkInterface::setIpAddress(const QString &ipAddress){
+void KNetworkInterface::setIpAddress(const TQString &ipAddress){
KNetworkInterface::ipAddress = ipAddress;
}
-void KNetworkInterface::setNetmask(const QString &netmask){
+void KNetworkInterface::setNetmask(const TQString &netmask){
KNetworkInterface::netmask = netmask;
}
-void KNetworkInterface::setNetwork(const QString &network){
+void KNetworkInterface::setNetwork(const TQString &network){
KNetworkInterface::network = network;
}
-void KNetworkInterface::setOnBoot(const QString &onBoot){
+void KNetworkInterface::setOnBoot(const TQString &onBoot){
KNetworkInterface::onBoot = onBoot;
}
-void KNetworkInterface::setGateway(const QString &gateway){
+void KNetworkInterface::setGateway(const TQString &gateway){
KNetworkInterface::gateway = gateway;
}
bool KNetworkInterface::isActive(){
@@ -78,27 +78,27 @@ void KNetworkInterface::setActive(bool active){
KNetworkInterface::active = active;
}
/** No descriptions */
-QString KNetworkInterface::getMacAddress(){
+TQString KNetworkInterface::getMacAddress(){
return hwAddress;
}
/** No descriptions */
-void KNetworkInterface::setMacAddress(const QString &addr){
+void KNetworkInterface::setMacAddress(const TQString &addr){
KNetworkInterface::hwAddress = addr;
}
/** No descriptions */
-QString KNetworkInterface::getDescription(){
+TQString KNetworkInterface::getDescription(){
return description;
}
/** No descriptions */
-void KNetworkInterface::setDescription(const QString &desc){
+void KNetworkInterface::setDescription(const TQString &desc){
KNetworkInterface::description = desc;
}
/** No descriptions */
-QString KNetworkInterface::getType(){
+TQString KNetworkInterface::getType(){
return type;
}
/** No descriptions */
-void KNetworkInterface::setType(const QString &type){
+void KNetworkInterface::setType(const TQString &type){
KNetworkInterface::type = type;
}
diff --git a/knetworkconf/knetworkconf/knetworkinterface.h b/knetworkconf/knetworkconf/knetworkinterface.h
index 859afc6..65ccfc0 100644
--- a/knetworkconf/knetworkconf/knetworkinterface.h
+++ b/knetworkconf/knetworkconf/knetworkinterface.h
@@ -18,7 +18,7 @@
#ifndef KNETWORKINTERFACE_H
#define KNETWORKINTERFACE_H
-#include <qstring.h>
+#include <tqstring.h>
/**This class has all the values associated with a network interface.
*@author Juan Luis Baptiste
@@ -29,55 +29,55 @@ class KNetworkInterface {
KNetworkInterface();
~KNetworkInterface();
- QString getBootProto();
- QString getBroadcast();
- QString getDeviceName();
- QString getIpAddress();
- QString getNetmask();
- QString getNetwork();
- QString getOnBoot();
- QString getGateway();
- void setBootProto(const QString &bootProto);
- void setBroadcast(const QString &broadcast);
- void setDeviceName(const QString &deviceName);
- void setIpAddress(const QString &ipAddress);
- void setNetmask(const QString &netmask);
- void setNetwork(const QString &network);
- void setOnBoot(const QString &onBoot);
- void setGateway(const QString &gateway);
+ TQString getBootProto();
+ TQString getBroadcast();
+ TQString getDeviceName();
+ TQString getIpAddress();
+ TQString getNetmask();
+ TQString getNetwork();
+ TQString getOnBoot();
+ TQString getGateway();
+ void setBootProto(const TQString &bootProto);
+ void setBroadcast(const TQString &broadcast);
+ void setDeviceName(const TQString &deviceName);
+ void setIpAddress(const TQString &ipAddress);
+ void setNetmask(const TQString &netmask);
+ void setNetwork(const TQString &network);
+ void setOnBoot(const TQString &onBoot);
+ void setGateway(const TQString &gateway);
bool isActive();
void setActive(bool active);
- void setMacAddress(const QString &addr);
- QString getMacAddress();
- void setDescription(const QString &desc);
- QString getDescription();
- void setType(const QString &type);
- QString getType();
+ void setMacAddress(const TQString &addr);
+ TQString getMacAddress();
+ void setDescription(const TQString &desc);
+ TQString getDescription();
+ void setType(const TQString &type);
+ TQString getType();
private: // Private attributes
/** Interface name (i.e. eth0, eth1, etc). */
- QString deviceName;
+ TQString deviceName;
/** Boot protocol of the device (static, dhcp). */
- QString bootProto;
+ TQString bootProto;
/** IPv4 address of the interface. */
- QString ipAddress;
+ TQString ipAddress;
/** The Netmask. */
- QString netmask;
+ TQString netmask;
/** The network. */
- QString network;
+ TQString network;
/** The broadcast. */
- QString broadcast;
+ TQString broadcast;
/** thetermines if this device is configured at boot time. */
- QString onBoot;
+ TQString onBoot;
/** default gateway for this device. */
- QString gateway;
+ TQString gateway;
bool active;
/** The MAC address. */
- QString hwAddress;
+ TQString hwAddress;
/** A little description about the network device. */
- QString description;
+ TQString description;
/** Type of interface (ethernet,wireless,loopback or modem)*/
- QString type;
+ TQString type;
};
#endif
diff --git a/knetworkconf/knetworkconf/kprofileslistviewtooltip.h b/knetworkconf/knetworkconf/kprofileslistviewtooltip.h
index c0c6bce..ec65c68 100644
--- a/knetworkconf/knetworkconf/kprofileslistviewtooltip.h
+++ b/knetworkconf/knetworkconf/kprofileslistviewtooltip.h
@@ -17,10 +17,10 @@
#ifndef KPROFILESLISTVIEWTOOLTIP_H
#define KPROFILESLISTVIEWTOOLTIP_H
-#include <qtooltip.h>
-#include <qlistview.h>
-#include <qheader.h>
-#include <qptrlist.h>
+#include <tqtooltip.h>
+#include <tqlistview.h>
+#include <tqheader.h>
+#include <tqptrlist.h>
#include "knetworkinfo.h"
#include "knetworkconfigparser.h"
@@ -28,39 +28,39 @@
class KProfilesListViewToolTip : public QToolTip
{
public:
- KProfilesListViewToolTip(QListView* parent);
- void setProfiles(QPtrList<KNetworkInfo> profiles_);
+ KProfilesListViewToolTip(TQListView* parent);
+ void setProfiles(TQPtrList<KNetworkInfo> profiles_);
~KProfilesListViewToolTip();
protected:
- void maybeTip( const QPoint& p );
- KNetworkInfo *getProfile(QPtrList<KNetworkInfo> profilesList, QString selectedProfile);
+ void maybeTip( const TQPoint& p );
+ KNetworkInfo *getProfile(TQPtrList<KNetworkInfo> profilesList, TQString selectedProfile);
private:
- QListView* listView;
+ TQListView* listView;
//KNetworkConf* conf;
- QPtrList<KNetworkInfo> profiles;
+ TQPtrList<KNetworkInfo> profiles;
};
-inline void KProfilesListViewToolTip::setProfiles(QPtrList<KNetworkInfo> profiles_)
+inline void KProfilesListViewToolTip::setProfiles(TQPtrList<KNetworkInfo> profiles_)
{
profiles = profiles_;
}
-inline KProfilesListViewToolTip::KProfilesListViewToolTip( QListView* parent ):QToolTip( parent->viewport() ), listView( parent ) {}
+inline KProfilesListViewToolTip::KProfilesListViewToolTip( TQListView* parent ):TQToolTip( parent->viewport() ), listView( parent ) {}
-inline void KProfilesListViewToolTip::maybeTip( const QPoint& p )
+inline void KProfilesListViewToolTip::maybeTip( const TQPoint& p )
{
if ( !listView )
return;
- const QListViewItem* item = listView->itemAt( p );
+ const TQListViewItem* item = listView->itemAt( p );
if ( !item )
return;
- const QRect itemRect = listView->itemRect( item );
+ const TQRect itemRect = listView->itemRect( item );
if ( !itemRect.isValid() )
return;
@@ -70,22 +70,22 @@ inline void KProfilesListViewToolTip::maybeTip( const QPoint& p )
if ( col == -1 )
return;
- const QRect headerRect = listView->header()->sectionRect( col );
+ const TQRect headerRect = listView->header()->sectionRect( col );
if ( !headerRect.isValid() )
return;
- const QRect cellRect( headerRect.left(), itemRect.top(),headerRect.width() + 60, itemRect.height() );
+ const TQRect cellRect( headerRect.left(), itemRect.top(),headerRect.width() + 60, itemRect.height() );
- QString tipStr;
+ TQString tipStr;
if( col == 0 )
{
- tipStr = QString(i18n("<b>Network Configuration of this Profile:</b>" ));
+ tipStr = TQString(i18n("<b>Network Configuration of this Profile:</b>" ));
KNetworkInfo *profile = getProfile(profiles,item->text(0));
if (profile != NULL)
{
- QPtrList<KNetworkInterface> devices = profile->getDeviceList();
+ TQPtrList<KNetworkInterface> devices = profile->getDeviceList();
KNetworkInterface *device = NULL;
for (device = devices.first(); device; device = devices.next())
{
@@ -93,7 +93,7 @@ inline void KProfilesListViewToolTip::maybeTip( const QPoint& p )
{
tipStr.append(i18n("<p><b>Interface:</b> %1").arg(device->getDeviceName().latin1()));
tipStr.append(i18n("<br><b>Type:</b> %1").arg(device->getType()));
- QString bootProto;
+ TQString bootProto;
if (device->getBootProto() == "none")
bootProto = "Manual";
else
@@ -112,8 +112,8 @@ inline void KProfilesListViewToolTip::maybeTip( const QPoint& p )
KDNSInfo *dns = profile->getDNSInfo();
tipStr.append(i18n("<br><b>Domain Name:</b> %1").arg(dns->getDomainName()));
tipStr.append(i18n("<br><b>Machine Name:</b> %1").arg(dns->getMachineName()));
- QStringList nameServers = dns->getNameServers();
- for ( QStringList::Iterator it = nameServers.begin(); it != nameServers.end(); ++it)
+ TQStringList nameServers = dns->getNameServers();
+ for ( TQStringList::Iterator it = nameServers.begin(); it != nameServers.end(); ++it)
{
tipStr.append(i18n("<br><b>DNS Name Server:</b> %1").arg((*it)));
}
@@ -122,9 +122,9 @@ inline void KProfilesListViewToolTip::maybeTip( const QPoint& p )
tip( cellRect, tipStr );
}
-inline KNetworkInfo *KProfilesListViewToolTip::getProfile(QPtrList<KNetworkInfo> profilesList, QString selectedProfile)
+inline KNetworkInfo *KProfilesListViewToolTip::getProfile(TQPtrList<KNetworkInfo> profilesList, TQString selectedProfile)
{
- QPtrListIterator<KNetworkInfo> it(profilesList);
+ TQPtrListIterator<KNetworkInfo> it(profilesList);
KNetworkInfo *net = NULL;
while ((net = it.current()) != 0)
diff --git a/knetworkconf/knetworkconf/kroutinginfo.cpp b/knetworkconf/knetworkconf/kroutinginfo.cpp
index ebf8380..9695fa0 100644
--- a/knetworkconf/knetworkconf/kroutinginfo.cpp
+++ b/knetworkconf/knetworkconf/kroutinginfo.cpp
@@ -21,40 +21,40 @@ KRoutingInfo::KRoutingInfo(){
}
KRoutingInfo::~KRoutingInfo(){
}
-QString KRoutingInfo::isNetworkingEnabled(){
+TQString KRoutingInfo::isNetworkingEnabled(){
return networking;
}
-QString KRoutingInfo::isForwardIPv4Enabled(){
+TQString KRoutingInfo::isForwardIPv4Enabled(){
return forwardIPv4;
}
-QString KRoutingInfo::getHostName(){
+TQString KRoutingInfo::getHostName(){
return hostName;
}
-QString KRoutingInfo::getDomainName(){
+TQString KRoutingInfo::getDomainName(){
return domainName;
}
-QString KRoutingInfo::getGateway(){
+TQString KRoutingInfo::getGateway(){
return gateway;
}
-QString KRoutingInfo::getGatewayDevice(){
+TQString KRoutingInfo::getGatewayDevice(){
return gatewayDevice;
}
-void KRoutingInfo::setNetworkingEnabled(const QString &networking){
+void KRoutingInfo::setNetworkingEnabled(const TQString &networking){
KRoutingInfo::networking = networking;
}
-void KRoutingInfo::setForwardIPv4Enabled(const QString &forwardIPv4){
+void KRoutingInfo::setForwardIPv4Enabled(const TQString &forwardIPv4){
KRoutingInfo::forwardIPv4 = forwardIPv4;
}
-void KRoutingInfo::setHostName(const QString &hostName){
+void KRoutingInfo::setHostName(const TQString &hostName){
KRoutingInfo::hostName = hostName;
}
-void KRoutingInfo::setDomainName(const QString &domainName){
+void KRoutingInfo::setDomainName(const TQString &domainName){
KRoutingInfo::domainName = domainName;
}
-void KRoutingInfo::setGateway(const QString &gateway){
+void KRoutingInfo::setGateway(const TQString &gateway){
KRoutingInfo::gateway = gateway;
}
-void KRoutingInfo::setGatewayDevice(const QString &gatewayDevice){
+void KRoutingInfo::setGatewayDevice(const TQString &gatewayDevice){
KRoutingInfo::gatewayDevice = gatewayDevice;
}
diff --git a/knetworkconf/knetworkconf/kroutinginfo.h b/knetworkconf/knetworkconf/kroutinginfo.h
index 1092f88..febcd18 100644
--- a/knetworkconf/knetworkconf/kroutinginfo.h
+++ b/knetworkconf/knetworkconf/kroutinginfo.h
@@ -18,7 +18,7 @@
#ifndef KROUTINGINFO_H
#define KROUTINGINFO_H
-#include <qstring.h>
+#include <tqstring.h>
/**Has all the routing info of the machine, like default gateway, default gateway device,
@@ -32,26 +32,26 @@ public:
KRoutingInfo();
~KRoutingInfo();
private: // Private attributes
- QString networking;
- QString forwardIPv4;
- QString hostName;
- QString domainName;
- QString gateway;
- QString gatewayDevice;
+ TQString networking;
+ TQString forwardIPv4;
+ TQString hostName;
+ TQString domainName;
+ TQString gateway;
+ TQString gatewayDevice;
public: // Public attributes
- QString isNetworkingEnabled();
- QString isForwardIPv4Enabled();
- QString getHostName();
- QString getGatewayDevice();
- QString getGateway();
- QString getDomainName();
- void setNetworkingEnabled(const QString &networking);
- void setForwardIPv4Enabled(const QString &forwardIPv4);
- void setHostName(const QString &hostName);
- void setDomainName(const QString &domainName);
- void setGateway(const QString &gateway);
- void setGatewayDevice(const QString &gatewayDevice);
+ TQString isNetworkingEnabled();
+ TQString isForwardIPv4Enabled();
+ TQString getHostName();
+ TQString getGatewayDevice();
+ TQString getGateway();
+ TQString getDomainName();
+ void setNetworkingEnabled(const TQString &networking);
+ void setForwardIPv4Enabled(const TQString &forwardIPv4);
+ void setHostName(const TQString &hostName);
+ void setDomainName(const TQString &domainName);
+ void setGateway(const TQString &gateway);
+ void setGatewayDevice(const TQString &gatewayDevice);
};
diff --git a/knetworkconf/knetworkconf/kwirelessinterface.cpp b/knetworkconf/knetworkconf/kwirelessinterface.cpp
index c24d237..08d2b29 100644
--- a/knetworkconf/knetworkconf/kwirelessinterface.cpp
+++ b/knetworkconf/knetworkconf/kwirelessinterface.cpp
@@ -25,31 +25,31 @@ KWirelessInterface::~KWirelessInterface()
{
}
-QString KWirelessInterface::getEssid()
+TQString KWirelessInterface::getEssid()
{
return essid;
}
-QString KWirelessInterface::getWepKey()
+TQString KWirelessInterface::getWepKey()
{
return wepKey;
}
-void KWirelessInterface::setWepKey(QString newKey)
+void KWirelessInterface::setWepKey(TQString newKey)
{
wepKey = newKey;
}
-void KWirelessInterface::setEssid(QString newEssid)
+void KWirelessInterface::setEssid(TQString newEssid)
{
essid = newEssid;
}
-QString KWirelessInterface::getKeyType()
+TQString KWirelessInterface::getKeyType()
{
return keyType;
}
-void KWirelessInterface::setKeyType(QString type)
+void KWirelessInterface::setKeyType(TQString type)
{
keyType = type;
}
diff --git a/knetworkconf/knetworkconf/kwirelessinterface.h b/knetworkconf/knetworkconf/kwirelessinterface.h
index 982d68b..25549b9 100644
--- a/knetworkconf/knetworkconf/kwirelessinterface.h
+++ b/knetworkconf/knetworkconf/kwirelessinterface.h
@@ -18,7 +18,7 @@
#define KWIRELESSINTERFACE_H
#include <knetworkinterface.h>
-#include <qstring.h>
+#include <tqstring.h>
/**
Class that represents a wireless network interface. It inherits from KNetworkInterface.
@@ -32,17 +32,17 @@ class KWirelessInterface : public KNetworkInterface
~KWirelessInterface();
- QString getEssid();
- QString getWepKey();
- void setEssid(QString newEssid);
- void setWepKey(QString newKey);
- QString getKeyType();
- void setKeyType(QString type);
+ TQString getEssid();
+ TQString getWepKey();
+ void setEssid(TQString newEssid);
+ void setWepKey(TQString newKey);
+ TQString getKeyType();
+ void setKeyType(TQString type);
private:
- QString essid;
- QString wepKey;
- QString keyType;
+ TQString essid;
+ TQString wepKey;
+ TQString keyType;
};
#endif
diff --git a/knetworkconf/knetworkconf/main.cpp b/knetworkconf/knetworkconf/main.cpp
index 336d33e..8ebe038 100644
--- a/knetworkconf/knetworkconf/main.cpp
+++ b/knetworkconf/knetworkconf/main.cpp
@@ -40,7 +40,7 @@ K_EXPORT_COMPONENT_FACTORY( knetworkconfmodule, KDEDFactory( "kcm_knetworkconfmo
extern "C"
{
- KDE_EXPORT KCModule *create_knetworkconfmodule(QWidget *parent, const char *name)
+ KDE_EXPORT KCModule *create_knetworkconfmodule(TQWidget *parent, const char *name)
{
KGlobal::locale()->insertCatalogue("knetworkconf");
return new KNetworkConfModule(parent, name);