summaryrefslogtreecommitdiffstats
path: root/libksirtet/lib/wizard.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
commit576eb4299a00bc053db35414406f46372a0f70f2 (patch)
tree4c030922d533821db464af566188e7d40cc8848c /libksirtet/lib/wizard.cpp
parent0718336b6017d1a4fc1d626544180a5a2a29ddec (diff)
downloadtdegames-576eb4299a00bc053db35414406f46372a0f70f2.tar.gz
tdegames-576eb4299a00bc053db35414406f46372a0f70f2.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libksirtet/lib/wizard.cpp')
-rw-r--r--libksirtet/lib/wizard.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/libksirtet/lib/wizard.cpp b/libksirtet/lib/wizard.cpp
index 30d5a89d..19d9de34 100644
--- a/libksirtet/lib/wizard.cpp
+++ b/libksirtet/lib/wizard.cpp
@@ -4,14 +4,14 @@
#include <sys/types.h>
#include <netinet/in.h>
-#include <qvbuttongroup.h>
-#include <qradiobutton.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qsignalmapper.h>
-#include <qvgroupbox.h>
-#include <qgrid.h>
-#include <qfile.h>
+#include <tqvbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqsignalmapper.h>
+#include <tqvgroupbox.h>
+#include <tqgrid.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <klocale.h>
@@ -32,7 +32,7 @@
#define MAX_USER_PORT 65535
MPWizard::MPWizard(const MPGameInfo &gi, ConnectionData &_cd,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: KWizard(parent, name, TRUE), cd(_cd)
{
// setupTypePage(); // #### REMOVE NETWORK GAMES UNTIL FIXED
@@ -45,26 +45,26 @@ void MPWizard::setupTypePage()
{
KConfigGroupSaver cg(kapp->config(), MP_GROUP);
- typePage = new QVBox(this);
+ typePage = new TQVBox(this);
typePage->setMargin(KDialogBase::marginHint());
- QVButtonGroup *vbg = new QVButtonGroup(typePage);
- connect(vbg, SIGNAL(clicked(int)), SLOT(typeChanged(int)));
- QRadioButton *b;
- b = new QRadioButton(i18n("Create a local game"), vbg);
- b = new QRadioButton(i18n("Create a network game"), vbg);
- b = new QRadioButton(i18n("Join a network game"), vbg);
+ TQVButtonGroup *vbg = new TQVButtonGroup(typePage);
+ connect(vbg, TQT_SIGNAL(clicked(int)), TQT_SLOT(typeChanged(int)));
+ TQRadioButton *b;
+ b = new TQRadioButton(i18n("Create a local game"), vbg);
+ b = new TQRadioButton(i18n("Create a network game"), vbg);
+ b = new TQRadioButton(i18n("Join a network game"), vbg);
type = (Type)cg.config()->readNumEntry(MP_GAMETYPE, 0);
if ( type<0 || type>2 ) type = Local;
vbg->setButton(type);
typePage->setSpacing(KDialogBase::spacingHint());
- net = new QVGroupBox(i18n("Network Settings"), typePage);
- QGrid *grid = new QGrid(2, net);
- lserver = new QLabel(" ", grid);
+ net = new TQVGroupBox(i18n("Network Settings"), typePage);
+ TQGrid *grid = new TQGrid(2, net);
+ lserver = new TQLabel(" ", grid);
grid->setSpacing(KDialogBase::spacingHint());
- eserver = new QLineEdit(grid);
- (void)new QLabel(i18n("Port:"), grid);
+ eserver = new TQLineEdit(grid);
+ (void)new TQLabel(i18n("Port:"), grid);
int p = cg.config()->readNumEntry(MP_PORT, (uint)MIN_USER_PORT);
eport = new KIntNumInput(p, grid);
eport->setRange(MIN_USER_PORT, MAX_USER_PORT, 1, false);
@@ -77,51 +77,51 @@ void MPWizard::setupTypePage()
//-----------------------------------------------------------------------------
void MPWizard::setupLocalPage(const MPGameInfo &gi)
{
- localPage = new QVBox(this);
+ localPage = new TQVBox(this);
localPage->setMargin(KDialogBase::marginHint());
wl = new WidgetList<PlayerLine>(5, localPage);
- QSignalMapper *husm = new QSignalMapper(this);
- if (gi.humanSettingSlot) connect(husm, SIGNAL(mapped(int)),
+ TQSignalMapper *husm = new TQSignalMapper(this);
+ if (gi.humanSettingSlot) connect(husm, TQT_SIGNAL(mapped(int)),
gi.humanSettingSlot);
- QSignalMapper *aism = new QSignalMapper(this);
- if (gi.AISettingSlot) connect(aism, SIGNAL(mapped(int)), gi.AISettingSlot);
+ TQSignalMapper *aism = new TQSignalMapper(this);
+ if (gi.AISettingSlot) connect(aism, TQT_SIGNAL(mapped(int)), gi.AISettingSlot);
KConfigGroupSaver cg(kapp->config(), MP_GROUP);
- QString n;
+ TQString n;
PlayerComboBox::Type type;
PlayerLine *pl;
Q_ASSERT( gi.maxNbLocalPlayers>0 );
for (uint i=0; i<gi.maxNbLocalPlayers; i++) {
type = (PlayerComboBox::Type)
- cg.config()->readNumEntry(QString(MP_PLAYER_TYPE).arg(i),
+ cg.config()->readNumEntry(TQString(MP_PLAYER_TYPE).arg(i),
(i==0 ? PlayerComboBox::Human : PlayerComboBox::None));
- n = cg.config()->readEntry(QString(MP_PLAYER_NAME).arg(i),
+ n = cg.config()->readEntry(TQString(MP_PLAYER_NAME).arg(i),
i18n("Player #%1").arg(i));
pl = new PlayerLine(type, n, gi.humanSettingSlot, gi.AISettingSlot,
i!=0, gi.AIAllowed, wl);
- connect(pl, SIGNAL(typeChanged(int)), SLOT(lineTypeChanged(int)));
+ connect(pl, TQT_SIGNAL(typeChanged(int)), TQT_SLOT(lineTypeChanged(int)));
husm->setMapping(pl, i);
- connect(pl, SIGNAL(setHuman()), husm, SLOT(map()));
+ connect(pl, TQT_SIGNAL(setHuman()), husm, TQT_SLOT(map()));
aism->setMapping(pl, i);
- connect(pl, SIGNAL(setAI()), aism, SLOT(map()));
+ connect(pl, TQT_SIGNAL(setAI()), aism, TQT_SLOT(map()));
wl->append(pl);
}
- ((QVBox *)localPage)->setSpacing(KDialogBase::spacingHint());
+ ((TQVBox *)localPage)->setSpacing(KDialogBase::spacingHint());
-// keys = new QPushButton(i18n("Configure Keys..."), localPage);
-// connect(keys, SIGNAL(clicked()), SLOT(configureKeysSlot()));
+// keys = new TQPushButton(i18n("Configure Keys..."), localPage);
+// connect(keys, TQT_SIGNAL(clicked()), TQT_SLOT(configureKeysSlot()));
addPage(localPage, i18n("Local Player's Settings"));
setHelpEnabled(localPage, FALSE);
lineTypeChanged(0);
}
-QString MPWizard::name(uint i) const
+TQString MPWizard::name(uint i) const
{
- QString s = wl->widget(i)->name();
+ TQString s = wl->widget(i)->name();
if ( s.length()==0 ) s = i18n("Player #%1").arg(i);
return s;
}
@@ -130,7 +130,7 @@ void MPWizard::typeChanged(int t)
{
type = (Type)t;
- QString str;
+ TQString str;
if ( type!=Client ) {
str = "localhost";
lserver->setText(i18n("Hostname:"));
@@ -170,7 +170,7 @@ void MPWizard::accept()
int flags = KExtendedSocket::inetSocket
| KExtendedSocket::streamSocket;
if (cd.server) flags |= KExtendedSocket::passiveSocket;
- QString host = QFile::encodeName(eserver->text());
+ TQString host = TQFile::encodeName(eserver->text());
KExtendedSocket *socket
= new KExtendedSocket(host, eport->value(), flags);
@@ -206,15 +206,15 @@ void MPWizard::accept()
cg.config()->writeEntry(MP_GAMETYPE, (int)type);
for (uint i=0; i<wl->size(); i++) {
- cg.config()->writeEntry(QString(MP_PLAYER_TYPE).arg(i),
+ cg.config()->writeEntry(TQString(MP_PLAYER_TYPE).arg(i),
(int)wl->widget(i)->type());
- cg.config()->writeEntry(QString(MP_PLAYER_NAME).arg(i), name(i));
+ cg.config()->writeEntry(TQString(MP_PLAYER_NAME).arg(i), name(i));
}
KWizard::accept();
}
-void MPWizard::showPage(QWidget *page)
+void MPWizard::showPage(TQWidget *page)
{
if ( page==localPage ) setFinishEnabled(localPage, TRUE);
KWizard::showPage(page);