diff options
Diffstat (limited to 'libkdegames/kgame/dialogs/kgameconnectdialog.cpp')
-rw-r--r-- | libkdegames/kgame/dialogs/kgameconnectdialog.cpp | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/libkdegames/kgame/dialogs/kgameconnectdialog.cpp b/libkdegames/kgame/dialogs/kgameconnectdialog.cpp index 4d2d90e0..575b3090 100644 --- a/libkdegames/kgame/dialogs/kgameconnectdialog.cpp +++ b/libkdegames/kgame/dialogs/kgameconnectdialog.cpp @@ -24,15 +24,15 @@ #include <knuminput.h> #include <klocale.h> -#include <qlineedit.h> -#include <qcombobox.h> -#include <qvbuttongroup.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qlabel.h> +#include <tqlineedit.h> +#include <tqcombobox.h> +#include <tqvbuttongroup.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqlabel.h> #include <dnssd/servicebrowser.h> -#include <qpushbutton.h> -#include <qgrid.h> +#include <tqpushbutton.h> +#include <tqgrid.h> class KGameConnectWidgetPrivate { @@ -46,42 +46,42 @@ class KGameConnectWidgetPrivate } KIntNumInput* mPort; - QLineEdit* mHost; //KLineEdit? - QVButtonGroup* mButtonGroup; - QComboBox *mClientName; - QLabel *mClientNameLabel; + TQLineEdit* mHost; //KLineEdit? + TQVButtonGroup* mButtonGroup; + TQComboBox *mClientName; + TQLabel *mClientNameLabel; DNSSD::ServiceBrowser *mBrowser; - QLabel *mServerNameLabel; - QLineEdit *mServerName; - QString mType; + TQLabel *mServerNameLabel; + TQLineEdit *mServerName; + TQString mType; }; -KGameConnectWidget::KGameConnectWidget(QWidget* parent) : QWidget(parent) +KGameConnectWidget::KGameConnectWidget(TQWidget* parent) : TQWidget(parent) { d = new KGameConnectWidgetPrivate; - QVBoxLayout* vb = new QVBoxLayout(this, KDialog::spacingHint()); - d->mButtonGroup = new QVButtonGroup(this); + TQVBoxLayout* vb = new TQVBoxLayout(this, KDialog::spacingHint()); + d->mButtonGroup = new TQVButtonGroup(this); vb->addWidget(d->mButtonGroup); - connect(d->mButtonGroup, SIGNAL(clicked(int)), this, SLOT(slotTypeChanged(int))); - (void)new QRadioButton(i18n("Create a network game"), d->mButtonGroup); - (void)new QRadioButton(i18n("Join a network game"), d->mButtonGroup); + connect(d->mButtonGroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotTypeChanged(int))); + (void)new TQRadioButton(i18n("Create a network game"), d->mButtonGroup); + (void)new TQRadioButton(i18n("Join a network game"), d->mButtonGroup); - QGrid* g = new QGrid(2, this); + TQGrid* g = new TQGrid(2, this); vb->addWidget(g); g->setSpacing(KDialog::spacingHint()); - d->mServerNameLabel = new QLabel(i18n("Game name:"), g); - d->mServerName = new QLineEdit(g); - d->mClientNameLabel = new QLabel(i18n("Network games:"), g); - d->mClientName = new QComboBox(g); - connect(d->mClientName,SIGNAL(activated(int)),SLOT(slotGameSelected(int))); - (void)new QLabel(i18n("Port to connect to:"), g); + d->mServerNameLabel = new TQLabel(i18n("Game name:"), g); + d->mServerName = new TQLineEdit(g); + d->mClientNameLabel = new TQLabel(i18n("Network games:"), g); + d->mClientName = new TQComboBox(g); + connect(d->mClientName,TQT_SIGNAL(activated(int)),TQT_SLOT(slotGameSelected(int))); + (void)new TQLabel(i18n("Port to connect to:"), g); d->mPort = new KIntNumInput(g); - (void)new QLabel(i18n("Host to connect to:"), g); - d->mHost = new QLineEdit(g); + (void)new TQLabel(i18n("Host to connect to:"), g); + d->mHost = new TQLineEdit(g); - QPushButton *button=new QPushButton(i18n("&Start Network"), this); - connect(button, SIGNAL(clicked()), this, SIGNAL(signalNetworkSetup())); + TQPushButton *button=new TQPushButton(i18n("&Start Network"), this); + connect(button, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(signalNetworkSetup())); vb->addWidget(button); // Hide until type is set d->mClientName->hide(); @@ -107,12 +107,12 @@ void KGameConnectWidget::showDnssdControls() } } -void KGameConnectWidget::setType(const QString& type) +void KGameConnectWidget::setType(const TQString& type) { d->mType = type; delete d->mBrowser; d->mBrowser = new DNSSD::ServiceBrowser(type); - connect(d->mBrowser,SIGNAL(finished()),SLOT(slotGamesFound())); + connect(d->mBrowser,TQT_SIGNAL(finished()),TQT_SLOT(slotGamesFound())); d->mBrowser->startBrowse(); showDnssdControls(); } @@ -122,25 +122,25 @@ void KGameConnectWidget::slotGamesFound() bool autoselect=false; if (!d->mClientName->count()) autoselect=true; d->mClientName->clear(); - QStringList names; - QValueList<DNSSD::RemoteService::Ptr>::ConstIterator itEnd = d->mBrowser->services().end(); - for (QValueList<DNSSD::RemoteService::Ptr>::ConstIterator it = d->mBrowser->services().begin(); + TQStringList names; + TQValueList<DNSSD::RemoteService::Ptr>::ConstIterator itEnd = d->mBrowser->services().end(); + for (TQValueList<DNSSD::RemoteService::Ptr>::ConstIterator it = d->mBrowser->services().begin(); it!=itEnd; ++it) names << (*it)->serviceName(); d->mClientName->insertStringList(names); if (autoselect && d->mClientName->count()) slotGameSelected(0); } -void KGameConnectWidget::setName(const QString& name) +void KGameConnectWidget::setName(const TQString& name) { d->mServerName->setText(name); } -QString KGameConnectWidget::gameName() const +TQString KGameConnectWidget::gameName() const { return d->mServerName->text(); } -QString KGameConnectWidget::type() const +TQString KGameConnectWidget::type() const { return d->mType; } @@ -160,12 +160,12 @@ KGameConnectWidget::~KGameConnectWidget() delete d; } -QString KGameConnectWidget::host() const +TQString KGameConnectWidget::host() const { if (d->mHost->isEnabled()) { return d->mHost->text(); } else { - return QString::null; + return TQString::null; } } @@ -174,7 +174,7 @@ unsigned short int KGameConnectWidget::port() const return d->mPort->value(); } -void KGameConnectWidget::setHost(const QString& host) +void KGameConnectWidget::setHost(const TQString& host) { d->mHost->setText(host); } @@ -213,11 +213,11 @@ class KGameConnectDialogPrivate }; // buttonmask =Ok|Cancel -KGameConnectDialog::KGameConnectDialog(QWidget* parent,int buttonmask) : KDialogBase(Plain, +KGameConnectDialog::KGameConnectDialog(TQWidget* parent,int buttonmask) : KDialogBase(Plain, i18n("Network Game"),buttonmask , Ok, parent, 0, true, buttonmask!=0) { d = new KGameConnectDialogPrivate; - QVBoxLayout* vb = new QVBoxLayout(plainPage(), spacingHint()); + TQVBoxLayout* vb = new TQVBoxLayout(plainPage(), spacingHint()); d->mConnect = new KGameConnectWidget(plainPage()); vb->addWidget(d->mConnect); } @@ -228,7 +228,7 @@ KGameConnectDialog::~KGameConnectDialog() } int KGameConnectDialog::initConnection( unsigned short int& port, - QString& host, QWidget* parent, bool server) + TQString& host, TQWidget* parent, bool server) { KGameConnectDialog d(parent); d.setHost(host); @@ -240,14 +240,14 @@ int KGameConnectDialog::initConnection( unsigned short int& port, } int result = d.exec(); - if (result == QDialog::Accepted) { + if (result == TQDialog::Accepted) { host = d.host(); port = d.port(); } return result; } -QString KGameConnectDialog::host() const +TQString KGameConnectDialog::host() const { return d->mConnect->host(); } @@ -257,7 +257,7 @@ unsigned short int KGameConnectDialog::port() const return d->mConnect->port(); } -void KGameConnectDialog::setHost(const QString& host) +void KGameConnectDialog::setHost(const TQString& host) { d->mConnect->setHost(host); } |