summaryrefslogtreecommitdiffstats
path: root/kpf/src/ServerWizard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kpf/src/ServerWizard.cpp')
-rw-r--r--kpf/src/ServerWizard.cpp124
1 files changed, 62 insertions, 62 deletions
diff --git a/kpf/src/ServerWizard.cpp b/kpf/src/ServerWizard.cpp
index 8ca47e22..840c64d9 100644
--- a/kpf/src/ServerWizard.cpp
+++ b/kpf/src/ServerWizard.cpp
@@ -21,12 +21,12 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qspinbox.h>
-#include <qdir.h>
-#include <qptrlist.h>
-#include <qlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
+#include <tqdir.h>
+#include <tqptrlist.h>
+#include <tqlineedit.h>
#include <kapplication.h>
#include <klineedit.h>
@@ -46,18 +46,18 @@
namespace KPF
{
- ServerWizard::ServerWizard(QWidget * parent)
+ ServerWizard::ServerWizard(TQWidget * parent)
: KWizard(parent, "KPF::ServerWizard", true)
{
setCaption(i18n("New Server - %1").arg("kpf"));
- page1_ = new QWidget(this);
- page2_ = new QWidget(this);
- page3_ = new QWidget(this);
-// page4_ = new QWidget(this);
- page5_ = new QWidget(this);
+ page1_ = new TQWidget(this);
+ page2_ = new TQWidget(this);
+ page3_ = new TQWidget(this);
+// page4_ = new TQWidget(this);
+ page5_ = new TQWidget(this);
- QLabel * l_rootDirectoryHelp =
+ TQLabel * l_rootDirectoryHelp =
new QLabel
(
i18n
@@ -74,7 +74,7 @@ namespace KPF
page1_
);
- QLabel * l_listenPortHelp =
+ TQLabel * l_listenPortHelp =
new QLabel
(
i18n
@@ -87,7 +87,7 @@ namespace KPF
page2_
);
- QLabel * l_bandwidthLimitHelp =
+ TQLabel * l_bandwidthLimitHelp =
new QLabel
(
i18n
@@ -104,7 +104,7 @@ namespace KPF
page3_
);
/*
- QLabel * l_connectionLimitHelp =
+ TQLabel * l_connectionLimitHelp =
new QLabel
(
i18n
@@ -118,42 +118,42 @@ namespace KPF
);
*/
bool canPublish = DNSSD::ServiceBrowser::isAvailable() == DNSSD::ServiceBrowser::Working;
- QLabel * l_serverNameHelp =
+ TQLabel * l_serverNameHelp =
new QLabel
(
KPF::HelpText::getServerNameHelp(),
page5_
);
- QLabel * l_root_ =
- new QLabel(i18n("&Root directory:"), page1_);
+ TQLabel * l_root_ =
+ new TQLabel(i18n("&Root directory:"), page1_);
- QLabel * l_listenPort_ =
- new QLabel(i18n("&Listen port:"), page2_);
+ TQLabel * l_listenPort_ =
+ new TQLabel(i18n("&Listen port:"), page2_);
- QLabel * l_bandwidthLimit_ =
- new QLabel(i18n("&Bandwidth limit:"), page3_);
+ TQLabel * l_bandwidthLimit_ =
+ new TQLabel(i18n("&Bandwidth limit:"), page3_);
-// QLabel * l_connectionLimit_ =
-// new QLabel(i18n("Connection &limit"), page4_);
+// TQLabel * l_connectionLimit_ =
+// new TQLabel(i18n("Connection &limit"), page4_);
- QLabel * l_serverName_ =
- new QLabel(i18n("&Server name:"), page5_);
+ TQLabel * l_serverName_ =
+ new TQLabel(i18n("&Server name:"), page5_);
if(!canPublish)
l_serverName_->setEnabled(false);
kur_root_ = new KURLRequester(page1_);
- sb_listenPort_ = new QSpinBox(1, 65535, 1, page2_);
+ sb_listenPort_ = new TQSpinBox(1, 65535, 1, page2_);
- sb_bandwidthLimit_ = new QSpinBox(1, 999999, 1, page3_);
-// sb_connectionLimit_ = new QSpinBox(1, 9999, 1, page4_);
+ sb_bandwidthLimit_ = new TQSpinBox(1, 999999, 1, page3_);
+// sb_connectionLimit_ = new TQSpinBox(1, 9999, 1, page4_);
char hostname[255];
gethostname(hostname, 255-2);
hostname[255-1]=0;
- le_serverName_ = new QLineEdit(hostname, page5_);
+ le_serverName_ = new TQLineEdit(hostname, page5_);
if(!canPublish)
le_serverName_->setEnabled(false);
@@ -171,20 +171,20 @@ namespace KPF
sb_bandwidthLimit_ ->setSuffix(i18n(" kB/s"));
// sb_connectionLimit_ ->setValue(Config::DefaultConnectionLimit);
- QVBoxLayout * layout1 =
- new QVBoxLayout(page1_, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout * layout1 =
+ new TQVBoxLayout(page1_, KDialog::marginHint(), KDialog::spacingHint());
- QVBoxLayout * layout2 =
- new QVBoxLayout(page2_, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout * layout2 =
+ new TQVBoxLayout(page2_, KDialog::marginHint(), KDialog::spacingHint());
- QVBoxLayout * layout3 =
- new QVBoxLayout(page3_, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout * layout3 =
+ new TQVBoxLayout(page3_, KDialog::marginHint(), KDialog::spacingHint());
-// QVBoxLayout * layout4 =
-// new QVBoxLayout(page4_, KDialog::marginHint(), KDialog::spacingHint());
+// TQVBoxLayout * layout4 =
+// new TQVBoxLayout(page4_, KDialog::marginHint(), KDialog::spacingHint());
- QVBoxLayout * layout5 =
- new QVBoxLayout(page5_, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout * layout5 =
+ new TQVBoxLayout(page5_, KDialog::marginHint(), KDialog::spacingHint());
layout1->addWidget(l_rootDirectoryHelp);
layout2->addWidget(l_listenPortHelp);
@@ -192,35 +192,35 @@ namespace KPF
// layout4->addWidget(l_connectionLimitHelp);
layout5->addWidget(l_serverNameHelp);
- QHBoxLayout * layout10 = new QHBoxLayout(layout1);
+ TQHBoxLayout * layout10 = new TQHBoxLayout(layout1);
layout10->addWidget(l_root_);
layout10->addWidget(kur_root_);
layout1->addStretch(1);
- QHBoxLayout * layout20 = new QHBoxLayout(layout2);
+ TQHBoxLayout * layout20 = new TQHBoxLayout(layout2);
layout20->addWidget(l_listenPort_);
layout20->addWidget(sb_listenPort_);
layout2->addStretch(1);
- QHBoxLayout * layout30 = new QHBoxLayout(layout3);
+ TQHBoxLayout * layout30 = new TQHBoxLayout(layout3);
layout30->addWidget(l_bandwidthLimit_);
layout30->addWidget(sb_bandwidthLimit_);
layout3->addStretch(1);
-// QHBoxLayout * layout40 = new QHBoxLayout(layout4);
+// TQHBoxLayout * layout40 = new TQHBoxLayout(layout4);
// layout40->addWidget(l_connectionLimit_);
// layout40->addWidget(sb_connectionLimit_);
// layout4->addStretch(1);
- QHBoxLayout * layout50 = new QHBoxLayout(layout5);
+ TQHBoxLayout * layout50 = new TQHBoxLayout(layout5);
layout50->addWidget(l_serverName_);
layout50->addWidget(le_serverName_);
@@ -231,7 +231,7 @@ namespace KPF
// addPage(page4_, i18n("Connection Limit"));
addPage(page5_, i18n("Server Name"));
- kur_root_->setURL(QDir::homeDirPath() + "/public_html");
+ kur_root_->setURL(TQDir::homeDirPath() + "/public_html");
kur_root_->setMode
(KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly);
@@ -244,8 +244,8 @@ namespace KPF
connect
(
kur_root_,
- SIGNAL(textChanged(const QString &)),
- SLOT(slotServerRootChanged(const QString &))
+ TQT_SIGNAL(textChanged(const TQString &)),
+ TQT_SLOT(slotServerRootChanged(const TQString &))
);
// Used for setting the caption on the file dialog.
@@ -253,8 +253,8 @@ namespace KPF
connect
(
kur_root_,
- SIGNAL(openFileDialog(KURLRequester *)),
- SLOT(slotOpenFileDialog(KURLRequester *))
+ TQT_SIGNAL(openFileDialog(KURLRequester *)),
+ TQT_SLOT(slotOpenFileDialog(KURLRequester *))
);
// This slot sets the 'Next' button on page 2 to enabled/disabled
@@ -263,8 +263,8 @@ namespace KPF
connect
(
sb_listenPort_,
- SIGNAL(valueChanged(int)),
- SLOT(slotListenPortChanged(int))
+ TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotListenPortChanged(int))
);
// Update 'Next' button on page 1.
@@ -281,7 +281,7 @@ namespace KPF
}
void
- ServerWizard::setLocation(const QString & location)
+ ServerWizard::setLocation(const TQString & location)
{
kur_root_->setURL(location);
}
@@ -319,14 +319,14 @@ namespace KPF
void
ServerWizard::accept()
{
- QWizard::accept();
+ TQWizard::accept();
emit(dying(this));
}
void
ServerWizard::reject()
{
- QWizard::reject();
+ TQWizard::reject();
emit(dying(this));
}
@@ -339,10 +339,10 @@ namespace KPF
return;
}
- QPtrList<WebServer>
+ TQPtrList<WebServer>
serverList(WebServerManager::instance()->serverListLocal());
- for (QPtrListIterator<WebServer> it(serverList); it.current(); ++it)
+ for (TQPtrListIterator<WebServer> it(serverList); it.current(); ++it)
{
if (it.current()->listenPort() == uint(newPort))
{
@@ -355,9 +355,9 @@ namespace KPF
}
void
- ServerWizard::slotServerRootChanged(const QString & _root)
+ ServerWizard::slotServerRootChanged(const TQString & _root)
{
- QString root(_root);
+ TQString root(_root);
kpfDebug << root << endl;
@@ -373,9 +373,9 @@ namespace KPF
if ("/" != root.right(1))
root += "/";
- QFileInfo fi(root);
+ TQFileInfo fi(root);
- if (!fi.isDir()) // || (fi.dirPath() == QDir::homeDirPath()))
+ if (!fi.isDir()) // || (fi.dirPath() == TQDir::homeDirPath()))
{
kpfDebug << root << " isn't a dir" << endl; //, or it's $HOME" << endl;
setNextEnabled(page1_, false);