summaryrefslogtreecommitdiffstats
path: root/kpoker/newgamedlg.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 /kpoker/newgamedlg.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 'kpoker/newgamedlg.cpp')
-rw-r--r--kpoker/newgamedlg.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kpoker/newgamedlg.cpp b/kpoker/newgamedlg.cpp
index 002833b6..80a9a501 100644
--- a/kpoker/newgamedlg.cpp
+++ b/kpoker/newgamedlg.cpp
@@ -16,11 +16,11 @@
// QT includes
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
// KDE includes
#include <klocale.h>
@@ -34,12 +34,12 @@
#include "newgamedlg.h"
-NewGameDlg::NewGameDlg(QWidget* parent)
+NewGameDlg::NewGameDlg(TQWidget* parent)
: KDialogBase(Plain, i18n("New Game"),
Ok|Cancel, Ok, parent, 0, true, true)
{
- QVBoxLayout *topLayout = new QVBoxLayout(plainPage(), spacingHint());
- QHBoxLayout *l = new QHBoxLayout(topLayout);
+ TQVBoxLayout *topLayout = new TQVBoxLayout(plainPage(), spacingHint());
+ TQHBoxLayout *l = new TQHBoxLayout(topLayout);
KConfig* conf = kapp->config();
conf->setGroup("NewGameDlg");
@@ -50,46 +50,46 @@ NewGameDlg::NewGameDlg(QWidget* parent)
int playerNr = conf->readNumEntry("players", DEFAULT_PLAYERS);
int money = conf->readNumEntry("startMoney", START_MONEY);
- readFromConfig = new QCheckBox(i18n("Try loading a game"), plainPage());
+ readFromConfig = new TQCheckBox(i18n("Try loading a game"), plainPage());
readFromConfig->adjustSize();
readFromConfig->setChecked(readConfig);
l->addWidget(readFromConfig);
- readFromConfigLabel = new QLabel(i18n("The following values are used if loading from config fails"), plainPage());
+ readFromConfigLabel = new TQLabel(i18n("The following values are used if loading from config fails"), plainPage());
if (!readFromConfig->isChecked())
readFromConfigLabel->hide();
readFromConfigLabel->adjustSize();
l->addWidget(readFromConfigLabel);
- connect(readFromConfig, SIGNAL(toggled(bool)),
- this, SLOT(changeReadFromConfig(bool)));
+ connect(readFromConfig, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(changeReadFromConfig(bool)));
players = new KIntNumInput(playerNr, plainPage());
players->setRange(1, MAX_PLAYERS);
players->setLabel(i18n("How many players do you want?"));
topLayout->addWidget(players);
- l = new QHBoxLayout(topLayout);
- l->addWidget(new QLabel(i18n("Your name:"), plainPage()));
- player1Name = new QLineEdit(plainPage());
+ l = new TQHBoxLayout(topLayout);
+ l->addWidget(new TQLabel(i18n("Your name:"), plainPage()));
+ player1Name = new TQLineEdit(plainPage());
l->addWidget(player1Name);
- l = new QHBoxLayout(topLayout);
- l->addWidget(new QLabel(i18n("Players' starting money:"), plainPage()));
- moneyOfPlayers = new QLineEdit(QString("%1").arg(money), plainPage());
+ l = new TQHBoxLayout(topLayout);
+ l->addWidget(new TQLabel(i18n("Players' starting money:"), plainPage()));
+ moneyOfPlayers = new TQLineEdit(TQString("%1").arg(money), plainPage());
moneyOfPlayers->setValidator( new KIntValidator( 0,999999,moneyOfPlayers ) );
l->addWidget(moneyOfPlayers);
- l = new QHBoxLayout(topLayout);
- l->addWidget(new QLabel(i18n("The names of your opponents:"), plainPage()));
- computerNames = new QComboBox(true, plainPage());
- computerNames->setInsertionPolicy(QComboBox::AtCurrent);
+ l = new TQHBoxLayout(topLayout);
+ l->addWidget(new TQLabel(i18n("The names of your opponents:"), plainPage()));
+ computerNames = new TQComboBox(true, plainPage());
+ computerNames->setInsertionPolicy(TQComboBox::AtCurrent);
l->addWidget(computerNames);
- l = new QHBoxLayout(topLayout);
- l->addWidget(new QLabel(i18n("Show this dialog every time on startup"),
+ l = new TQHBoxLayout(topLayout);
+ l->addWidget(new TQLabel(i18n("Show this dialog every time on startup"),
plainPage()));
- showDialogOnStartup = new QCheckBox(plainPage());
+ showDialogOnStartup = new TQCheckBox(plainPage());
showDialogOnStartup->setChecked(showNewGameDlg);
l->addWidget(showDialogOnStartup);
@@ -120,14 +120,14 @@ NewGameDlg::~NewGameDlg()
}
-void NewGameDlg::setPlayerNames(int no, QString playerName)
+void NewGameDlg::setPlayerNames(int no, TQString playerName)
{
if (no < 0) {
kapp->config()->setGroup("Save");
player1Name->setText(kapp->config()->readEntry("Name_0", i18n("You")));
computerNames->clear();
for (int i = 1; i < MAX_PLAYERS; i++) {
- computerNames->insertItem(kapp->config()->readEntry(QString("Name_%1").arg(i), i18n("Computer %1").arg(i)));
+ computerNames->insertItem(kapp->config()->readEntry(TQString("Name_%1").arg(i), i18n("Computer %1").arg(i)));
}
} else if (no == 0) {
player1Name->setText(playerName);
@@ -178,7 +178,7 @@ int NewGameDlg::money()
}
-QString NewGameDlg::name(int nr)
+TQString NewGameDlg::name(int nr)
{
if (computerNames->currentText() != computerNames->text(computerNames->currentItem()))
computerNames->changeItem(computerNames->currentText(), computerNames->currentItem());