summaryrefslogtreecommitdiffstats
path: root/lanbrowsing/kcmlisa/setupwizard.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /lanbrowsing/kcmlisa/setupwizard.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lanbrowsing/kcmlisa/setupwizard.cpp')
-rw-r--r--lanbrowsing/kcmlisa/setupwizard.cpp152
1 files changed, 76 insertions, 76 deletions
diff --git a/lanbrowsing/kcmlisa/setupwizard.cpp b/lanbrowsing/kcmlisa/setupwizard.cpp
index 8b304359..fbe8db4e 100644
--- a/lanbrowsing/kcmlisa/setupwizard.cpp
+++ b/lanbrowsing/kcmlisa/setupwizard.cpp
@@ -20,7 +20,7 @@
#include "setupwizard.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdialog.h>
@@ -31,8 +31,8 @@
#include <netinet/in.h>
#include <arpa/inet.h>
-SetupWizard::SetupWizard(QWidget* parent, LisaConfigInfo* configInfo)
- :QWizard(parent,"hallo",true)
+SetupWizard::SetupWizard(TQWidget* parent, LisaConfigInfo* configInfo)
+ :TQWizard(parent,"hallo",true)
,m_page1(0)
,m_noNicPage(0)
,m_multiNicPage(0)
@@ -60,7 +60,7 @@ SetupWizard::SetupWizard(QWidget* parent, LisaConfigInfo* configInfo)
,m_nics(0)
,m_configInfo(configInfo)
{
- QString title( i18n("LISa Network Neighborhood Setup") );
+ TQString title( i18n("LISa Network Neighborhood Setup") );
setCaption(title);
m_configInfo->clear();
@@ -121,9 +121,9 @@ void SetupWizard::clearAll()
void SetupWizard::setupPage1()
{
- m_page1 = new QVBox( this );
+ m_page1 = new TQVBox( this );
- new QLabel(i18n("<qt><p>This wizard will ask you a few questions about your network.</p> "
+ new TQLabel(i18n("<qt><p>This wizard will ask you a few questions about your network.</p> "
"<p>Usually you can simply keep the suggested settings.</p> "
"<p>After you have finished the wizard, you will be able to browse and use "
"shared resources on your LAN, not only Samba/Windows shares, but also "
@@ -134,7 +134,7 @@ void SetupWizard::setupPage1()
"only one LISa server can run on one machine.</qt>"),
m_page1);
- QWidget *dummy=new QWidget(m_page1);
+ TQWidget *dummy=new TQWidget(m_page1);
m_page1->setStretchFactor(dummy,10);
m_page1->setSpacing(KDialog::spacingHint());
m_page1->setMargin(KDialog::marginHint());
@@ -145,23 +145,23 @@ void SetupWizard::setupPage1()
void SetupWizard::setupMultiNicPage()
{
- m_multiNicPage=new QVBox(this);
- new QLabel(i18n("<qt><p>More than one network interface card was found on your system.</p>"
+ m_multiNicPage=new TQVBox(this);
+ new TQLabel(i18n("<qt><p>More than one network interface card was found on your system.</p>"
"<p>Please choose the one to which your LAN is connected.</p></qt>"),
m_multiNicPage);
m_multiNicPage->setMargin(KDialog::marginHint());
m_multiNicPage->setSpacing(KDialog::spacingHint());
- m_nicListBox=new QListBox(m_multiNicPage);
- m_nicListBox->setSelectionMode(QListBox::Single);
+ m_nicListBox=new TQListBox(m_multiNicPage);
+ m_nicListBox->setSelectionMode(TQListBox::Single);
setHelpEnabled( m_multiNicPage, false );
}
void SetupWizard::setupNoNicPage()
{
- m_noNicPage=new QVBox(this);
- new QLabel(i18n("<qt><p><b>No network interface card was found on your system.</b></p>"
+ m_noNicPage=new TQVBox(this);
+ new TQLabel(i18n("<qt><p><b>No network interface card was found on your system.</b></p>"
"<p>Possible reason: no network card is installed. You probably want to cancel now "
"or enter your IP address and network manually</p>"
"Example: <code>192.168.0.1/255.255.255.0</code>.</qt>"),
@@ -170,8 +170,8 @@ void SetupWizard::setupNoNicPage()
m_noNicPage->setMargin(KDialog::marginHint());
m_noNicPage->setSpacing(KDialog::spacingHint());
m_manualAddress=new KRestrictedLine(m_noNicPage,"0123456789./");
- connect(m_manualAddress,SIGNAL(textChanged(const QString&)),this,SLOT(checkIPAddress(const QString&)));
- QWidget *dummy=new QWidget(m_noNicPage);
+ connect(m_manualAddress,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(checkIPAddress(const TQString&)));
+ TQWidget *dummy=new TQWidget(m_noNicPage);
m_noNicPage->setStretchFactor(dummy,10);
setNextEnabled(m_noNicPage, false);
@@ -181,24 +181,24 @@ void SetupWizard::setupNoNicPage()
void SetupWizard::setupSearchPage()
{
- m_searchPage=new QVBox(this);
- QLabel *info=new QLabel(i18n("There are two ways LISa can search hosts on your network."),m_searchPage);
+ m_searchPage=new TQVBox(this);
+ TQLabel *info=new TQLabel(i18n("There are two ways LISa can search hosts on your network."),m_searchPage);
info->setTextFormat(Qt::RichText);
- m_ping=new QCheckBox(i18n("Send pings"), m_searchPage);
- info=new QLabel(i18n("All hosts with TCP/IP will respond,<br>"
+ m_ping=new TQCheckBox(i18n("Send pings"), m_searchPage);
+ info=new TQLabel(i18n("All hosts with TCP/IP will respond,<br>"
"whether or not they are samba servers.<br>"
"Don\'t use it if your network is very large, i.e. more than 1000 hosts.<br>"),m_searchPage);
- m_nmblookup=new QCheckBox(i18n("Send NetBIOS broadcasts"),m_searchPage);
- info=new QLabel(i18n("You need to have the samba package (nmblookup) installed.<br>"
+ m_nmblookup=new TQCheckBox(i18n("Send NetBIOS broadcasts"),m_searchPage);
+ info=new TQLabel(i18n("You need to have the samba package (nmblookup) installed.<br>"
"Only samba/windows servers will respond.<br>"
"This method is not very reliable.<br>"
"You should enable it if you are part of a large network."),m_searchPage);
info->setTextFormat(Qt::RichText);
- QWidget *dummy=new QWidget(m_searchPage);
+ TQWidget *dummy=new TQWidget(m_searchPage);
m_searchPage->setStretchFactor(dummy,10);
m_searchPage->setSpacing(KDialog::spacingHint());
m_searchPage->setMargin(KDialog::marginHint());
- info=new QLabel(i18n("<b>If unsure, keep it as is.</b>"),m_searchPage);
+ info=new TQLabel(i18n("<b>If unsure, keep it as is.</b>"),m_searchPage);
info->setAlignment(AlignRight|AlignVCenter);
setHelpEnabled( m_searchPage, false );
@@ -206,13 +206,13 @@ void SetupWizard::setupSearchPage()
void SetupWizard::setupAddressesPage()
{
- m_addressesPage=new QVBox(this);
- QLabel *info=new QLabel(i18n("All IP addresses included in the specified range will be pinged.<br>"
+ m_addressesPage=new TQVBox(this);
+ TQLabel *info=new TQLabel(i18n("All IP addresses included in the specified range will be pinged.<br>"
"If you are part of a small network, e.g. with network mask 255.255.255.0<br>"
"use your IP address/network mask.<br>"),m_addressesPage);
info->setTextFormat(Qt::RichText);
m_pingAddresses=new KRestrictedLine(m_addressesPage,"0123456789./;-");
- info=new QLabel(i18n("<br>There are four ways to specify address ranges:<br>"
+ info=new TQLabel(i18n("<br>There are four ways to specify address ranges:<br>"
"1. IP address/network mask, like <code>192.168.0.0/255.255.255.0;</code><br>"
"2. single IP addresses, like <code>10.0.0.23;</code><br>"
"3. continuous ranges, like <code>10.0.1.0-10.0.1.200;</code><br>"
@@ -220,11 +220,11 @@ void SetupWizard::setupAddressesPage()
"You can also enter combinations of 1 to 4, separated by \";\", like<br>"
"<code>192.168.0.0/255.255.255.0;10.0.0.0;10.0.1.1-10.0.1.100;</code><br>"),m_addressesPage);
info->setAlignment(AlignLeft|AlignVCenter|WordBreak);
- QWidget *dummy=new QWidget(m_addressesPage);
+ TQWidget *dummy=new TQWidget(m_addressesPage);
m_addressesPage->setStretchFactor(dummy,10);
m_addressesPage->setSpacing(KDialog::spacingHint());
m_addressesPage->setMargin(KDialog::marginHint());
- info=new QLabel(i18n("<b>If unsure, keep it as is.</b>"), m_addressesPage);
+ info=new TQLabel(i18n("<b>If unsure, keep it as is.</b>"), m_addressesPage);
info->setAlignment(AlignRight|AlignVCenter);
setHelpEnabled( m_addressesPage, false );
@@ -232,21 +232,21 @@ void SetupWizard::setupAddressesPage()
void SetupWizard::setupAllowedPage()
{
- m_allowedAddressesPage=new QVBox(this);
- QLabel* info=new QLabel(i18n("This is a security related setting.<br>"
+ m_allowedAddressesPage=new TQVBox(this);
+ TQLabel* info=new TQLabel(i18n("This is a security related setting.<br>"
"It provides a simple IP address based way to specify \"trusted\" hosts.<br>"
"Only hosts which fit into the addresses given here are accepted by LISa as clients. "
"The list of hosts published by LISa will also only contain hosts which fit into this scheme.<br>"
"Usually you enter your IP address/network mask here."),m_allowedAddressesPage);
info->setAlignment(AlignLeft|AlignVCenter|WordBreak);
m_allowedAddresses=new KRestrictedLine(m_allowedAddressesPage,"0123456789./-;");
- m_trustedHostsLabel=new QLabel(m_allowedAddressesPage);
+ m_trustedHostsLabel=new TQLabel(m_allowedAddressesPage);
- QWidget *dummy=new QWidget(m_allowedAddressesPage);
+ TQWidget *dummy=new TQWidget(m_allowedAddressesPage);
m_allowedAddressesPage->setStretchFactor(dummy,10);
m_allowedAddressesPage->setSpacing(KDialog::spacingHint());
m_allowedAddressesPage->setMargin(KDialog::marginHint());
- info=new QLabel(i18n("<b>If unsure, keep it as is.</b>"), m_allowedAddressesPage);
+ info=new TQLabel(i18n("<b>If unsure, keep it as is.</b>"), m_allowedAddressesPage);
info->setAlignment(AlignRight|AlignVCenter);
setHelpEnabled( m_allowedAddressesPage, false );
@@ -254,19 +254,19 @@ void SetupWizard::setupAllowedPage()
void SetupWizard::setupBcastPage()
{
- m_bcastPage=new QVBox(this);
- QLabel *info=new QLabel(i18n("<br>Enter your IP address and network mask here, like <code>192.168.0.1/255.255.255.0</code>"),m_bcastPage);
+ m_bcastPage=new TQVBox(this);
+ TQLabel *info=new TQLabel(i18n("<br>Enter your IP address and network mask here, like <code>192.168.0.1/255.255.255.0</code>"),m_bcastPage);
info->setAlignment(AlignLeft|AlignVCenter|WordBreak);
m_bcastAddress=new KRestrictedLine(m_bcastPage,"0123456789./");
- info=new QLabel(i18n("<br>To reduce the network load, the LISa servers in one network<br>"
+ info=new TQLabel(i18n("<br>To reduce the network load, the LISa servers in one network<br>"
"cooperate with each other. Therefore you have to enter the broadcast<br>"
"address here. If you are connected to more than one network, choose <br>"
"one of the broadcast addresses."),m_bcastPage);
info->setAlignment(AlignLeft|AlignVCenter|WordBreak);
- QWidget *dummy=new QWidget(m_bcastPage);
+ TQWidget *dummy=new TQWidget(m_bcastPage);
m_bcastPage->setStretchFactor(dummy,10);
m_bcastPage->setSpacing(KDialog::spacingHint());
- info=new QLabel(i18n("<b>If unsure, keep it as is.</b>"), m_bcastPage);
+ info=new TQLabel(i18n("<b>If unsure, keep it as is.</b>"), m_bcastPage);
info->setAlignment(AlignRight|AlignVCenter);
m_bcastPage->setSpacing(KDialog::spacingHint());
@@ -276,23 +276,23 @@ void SetupWizard::setupBcastPage()
void SetupWizard::setupUpdateIntervalPage()
{
- m_intervalPage=new QVBox(this);
- QLabel *info=new QLabel(i18n("<br>Enter the interval after which LISa, if busy, will update its host list."),m_intervalPage);
+ m_intervalPage=new TQVBox(this);
+ TQLabel *info=new TQLabel(i18n("<br>Enter the interval after which LISa, if busy, will update its host list."),m_intervalPage);
info->setTextFormat(Qt::RichText);
- m_updatePeriod=new QSpinBox(300,1800,10,m_intervalPage);
+ m_updatePeriod=new TQSpinBox(300,1800,10,m_intervalPage);
m_updatePeriod->setSuffix(i18n(" sec"));
- info=new QLabel(i18n("<br>Please note that the update interval will grow automatically by "
+ info=new TQLabel(i18n("<br>Please note that the update interval will grow automatically by "
"up to 16 times the value you enter here, if nobody accesses the LISa server. "
"So if you enter 300 sec = 5 min here, this does not mean that LISa will ping "
"your whole network every 5 minutes. The interval will increase up to 16 x 5 min = 80 min."),m_intervalPage);
info->setAlignment(AlignLeft|AlignVCenter|WordBreak);
- QWidget *dummy=new QWidget(m_intervalPage);
+ TQWidget *dummy=new TQWidget(m_intervalPage);
m_intervalPage->setStretchFactor(dummy,10);
m_intervalPage->setSpacing(KDialog::spacingHint());
m_intervalPage->setMargin(KDialog::marginHint());
- info=new QLabel(i18n("<b>If unsure, keep it as is.</b>"), m_intervalPage);
+ info=new TQLabel(i18n("<b>If unsure, keep it as is.</b>"), m_intervalPage);
info->setAlignment(AlignRight|AlignVCenter);
info->setTextFormat(Qt::RichText);
@@ -301,53 +301,53 @@ void SetupWizard::setupUpdateIntervalPage()
void SetupWizard::setupAdvancedSettingsPage()
{
- m_advancedPage=new QVBox(this);
- QLabel *info=new QLabel(i18n("This page contains several settings you usually only<br>"
+ m_advancedPage=new TQVBox(this);
+ TQLabel *info=new TQLabel(i18n("This page contains several settings you usually only<br>"
"need if LISa doesn't find all hosts in your network."),m_advancedPage);
info->setTextFormat(Qt::RichText);
- m_deliverUnnamedHosts=new QCheckBox(i18n("Re&port unnamed hosts"),m_advancedPage);
- info=new QLabel(i18n("Should hosts for which LISa can\'t resolve the name be included in the host list?<br>"),m_advancedPage);
+ m_deliverUnnamedHosts=new TQCheckBox(i18n("Re&port unnamed hosts"),m_advancedPage);
+ info=new TQLabel(i18n("Should hosts for which LISa can\'t resolve the name be included in the host list?<br>"),m_advancedPage);
- QHBox* hbox=new QHBox(m_advancedPage);
+ TQHBox* hbox=new TQHBox(m_advancedPage);
- info=new QLabel(i18n("Wait for replies after first scan"),hbox);
- m_firstWait=new QSpinBox(10,1000,50,hbox);
+ info=new TQLabel(i18n("Wait for replies after first scan"),hbox);
+ m_firstWait=new TQSpinBox(10,1000,50,hbox);
m_firstWait->setSuffix(i18n(" ms"));
- info=new QLabel(i18n("How long should LISa wait for answers to pings?<br>"
+ info=new TQLabel(i18n("How long should LISa wait for answers to pings?<br>"
"If LISa doesn\'t find all hosts, try to increase this value.<br>"),m_advancedPage);
- hbox=new QHBox(m_advancedPage);
- info=new QLabel(i18n("Max. number of pings to send at once"),hbox);
+ hbox=new TQHBox(m_advancedPage);
+ info=new TQLabel(i18n("Max. number of pings to send at once"),hbox);
info->setTextFormat(Qt::RichText);
- m_maxPingsAtOnce=new QSpinBox(8,1024,5,hbox);
- info=new QLabel(i18n("How many ping packets should LISa send at once?<br>"
+ m_maxPingsAtOnce=new TQSpinBox(8,1024,5,hbox);
+ info=new TQLabel(i18n("How many ping packets should LISa send at once?<br>"
"If LISa doesn't find all hosts you could try to decrease this value.<br>"),m_advancedPage);
- m_secondScan=new QCheckBox(i18n("Al&ways scan twice"),m_advancedPage);
+ m_secondScan=new TQCheckBox(i18n("Al&ways scan twice"),m_advancedPage);
- hbox=new QHBox(m_advancedPage);
+ hbox=new TQHBox(m_advancedPage);
// hbox->setSpacing(10); // WTF?
- info=new QLabel(i18n("Wait for replies after second scan"),hbox);
+ info=new TQLabel(i18n("Wait for replies after second scan"),hbox);
info->setTextFormat(Qt::RichText);
- m_secondWait=new QSpinBox(0,1000,50,hbox);
+ m_secondWait=new TQSpinBox(0,1000,50,hbox);
m_secondWait->setSuffix(i18n(" ms"));
- info=new QLabel(i18n("If LISa doesn't find all hosts, enable this option."),m_advancedPage);
+ info=new TQLabel(i18n("If LISa doesn't find all hosts, enable this option."),m_advancedPage);
//this would make the dialog to large
//m_advancedPage->setSpacing(KDialog::spacingHint());
//m_advancedPage->setMargin(KDialog::marginHint());
- info=new QLabel(i18n("<b>If unsure, keep it as is.</b>"), m_advancedPage);
+ info=new TQLabel(i18n("<b>If unsure, keep it as is.</b>"), m_advancedPage);
info->setAlignment(AlignRight|AlignVCenter);
- connect(m_secondScan,SIGNAL(toggled(bool)),m_secondWait,SLOT(setEnabled(bool)));
+ connect(m_secondScan,TQT_SIGNAL(toggled(bool)),m_secondWait,TQT_SLOT(setEnabled(bool)));
setHelpEnabled( m_advancedPage, false );
}
void SetupWizard::setupFinalPage()
{
- m_finalPage=new QVBox(this);
- QLabel *info=new QLabel(i18n("<br>Your LAN browsing has been successfully set up.<br><br>"
+ m_finalPage=new TQVBox(this);
+ TQLabel *info=new TQLabel(i18n("<br>Your LAN browsing has been successfully set up.<br><br>"
"Make sure that the LISa server is started during the "
"boot process. How this is done depends on your "
"distribution and OS. Usually you have to insert it somewhere "
@@ -357,7 +357,7 @@ void SetupWizard::setupFinalPage()
"To test the server, try <code>lan:/</code> in Konqueror.<br><br>"
"If you have problems or suggestions, visit http://lisa-home.sourceforge.net."),m_finalPage);
info->setTextFormat(Qt::RichText);
- QWidget *dummy=new QWidget(m_finalPage);
+ TQWidget *dummy=new TQWidget(m_finalPage);
m_finalPage->setStretchFactor(dummy,10);
m_finalPage->setSpacing(KDialog::spacingHint());
m_finalPage->setMargin(KDialog::marginHint());
@@ -398,7 +398,7 @@ void SetupWizard::next()
m_nicListBox->clear();
for (MyNIC *nic=m_nics->first(); nic!=0; nic=m_nics->next())
{
- QString tmp=nic->name+": "+nic->addr+"/"+nic->netmask+";";
+ TQString tmp=nic->name+": "+nic->addr+"/"+nic->netmask+";";
m_nicListBox->insertItem(tmp);
}
m_nicListBox->setSelected(0,true);
@@ -406,7 +406,7 @@ void SetupWizard::next()
}
else if (currentPage()==m_multiNicPage)
{
- QString nic=m_nicListBox->currentText();
+ TQString nic=m_nicListBox->currentText();
unsigned int i=0;
for (i=0; i<m_nicListBox->count(); i++)
{
@@ -438,10 +438,10 @@ void SetupWizard::next()
}
setAppropriate(m_advancedPage, m_ping->isChecked());
}
- QWizard::next();
+ TQWizard::next();
}
-void SetupWizard::showPage(QWidget* page)
+void SetupWizard::showPage(TQWidget* page)
{
if (page==m_noNicPage)
{
@@ -457,7 +457,7 @@ void SetupWizard::showPage(QWidget* page)
m_pingAddresses->setFocus();
else if (page==m_allowedAddressesPage)
{
- QString text;
+ TQString text;
if (m_ping->isChecked())
text+=i18n("You can use the same syntax as on the previous page.<br>");
else
@@ -479,7 +479,7 @@ void SetupWizard::showPage(QWidget* page)
else if (page==m_finalPage)
setFinishEnabled(m_finalPage,true);
- QWizard::showPage(page);
+ TQWizard::showPage(page);
}
void SetupWizard::setupRest()
@@ -538,13 +538,13 @@ void SetupWizard::accept()
m_configInfo->updatePeriod=m_updatePeriod->value();
m_configInfo->useNmblookup=m_nmblookup->isChecked();
m_configInfo->unnamedHosts=m_deliverUnnamedHosts->isChecked();
- QWizard::accept();
+ TQWizard::accept();
}
-void SetupWizard::checkIPAddress(const QString& addr)
+void SetupWizard::checkIPAddress(const TQString& addr)
{
- QString address=addr.simplifyWhiteSpace();
- QRegExp regex("^\\d+\\.\\d+\\.\\d+\\.\\d+\\s*/\\s*\\d+\\.\\d+\\.\\d+\\.\\d+$");
+ TQString address=addr.simplifyWhiteSpace();
+ TQRegExp regex("^\\d+\\.\\d+\\.\\d+\\.\\d+\\s*/\\s*\\d+\\.\\d+\\.\\d+\\.\\d+$");
setNextEnabled(m_noNicPage, (regex.search(address,0)!=-1));
// setNextEnabled(m_noNicPage, (regex.find(address,0)!=-1));
}