summaryrefslogtreecommitdiffstats
path: root/atlantik/client/selectgame_widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'atlantik/client/selectgame_widget.cpp')
-rw-r--r--atlantik/client/selectgame_widget.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/atlantik/client/selectgame_widget.cpp b/atlantik/client/selectgame_widget.cpp
index 85d4f886..8f39ff08 100644
--- a/atlantik/client/selectgame_widget.cpp
+++ b/atlantik/client/selectgame_widget.cpp
@@ -14,8 +14,8 @@
// the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
// Boston, MA 02110-1301, USA.
-#include <qvgroupbox.h>
-#include <qradiobutton.h>
+#include <tqvgroupbox.h>
+#include <tqradiobutton.h>
#include <kdebug.h>
#include <kdialog.h>
@@ -29,18 +29,18 @@
#include "selectgame_widget.h"
-SelectGame::SelectGame(AtlanticCore *atlanticCore, QWidget *parent, const char *name) : QWidget(parent, name)
+SelectGame::SelectGame(AtlanticCore *atlanticCore, TQWidget *parent, const char *name) : TQWidget(parent, name)
{
m_atlanticCore = atlanticCore;
- connect(m_atlanticCore, SIGNAL(createGUI(Game *)), this, SLOT(addGame(Game *)));
- connect(m_atlanticCore, SIGNAL(removeGUI(Game *)), this, SLOT(delGame(Game *)));
+ connect(m_atlanticCore, TQT_SIGNAL(createGUI(Game *)), this, TQT_SLOT(addGame(Game *)));
+ connect(m_atlanticCore, TQT_SIGNAL(removeGUI(Game *)), this, TQT_SLOT(delGame(Game *)));
- m_mainLayout = new QVBoxLayout(this, KDialog::marginHint());
+ m_mainLayout = new TQVBoxLayout(this, KDialog::marginHint());
Q_CHECK_PTR(m_mainLayout);
- QVGroupBox *groupBox;
- groupBox = new QVGroupBox(i18n("Create or Select monopd Game"), this, "groupBox");
+ TQVGroupBox *groupBox;
+ groupBox = new TQVGroupBox(i18n("Create or Select monopd Game"), this, "groupBox");
m_mainLayout->addWidget(groupBox);
// List of games
@@ -52,47 +52,47 @@ SelectGame::SelectGame(AtlanticCore *atlanticCore, QWidget *parent, const char *
m_gameList->setAllColumnsShowFocus(true);
// m_mainLayout->addWidget(m_gameList);
- connect(m_gameList, SIGNAL(clicked(QListViewItem *)), this, SLOT(validateConnectButton()));
- connect(m_gameList, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(connectClicked()));
- connect(m_gameList, SIGNAL(rightButtonClicked(QListViewItem *, const QPoint &, int)), this, SLOT(validateConnectButton()));
- connect(m_gameList, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(validateConnectButton()));
+ connect(m_gameList, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(validateConnectButton()));
+ connect(m_gameList, TQT_SIGNAL(doubleClicked(TQListViewItem *)), this, TQT_SLOT(connectClicked()));
+ connect(m_gameList, TQT_SIGNAL(rightButtonClicked(TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT(validateConnectButton()));
+ connect(m_gameList, TQT_SIGNAL(selectionChanged(TQListViewItem *)), this, TQT_SLOT(validateConnectButton()));
- QHBoxLayout *buttonBox = new QHBoxLayout(m_mainLayout, KDialog::spacingHint());
+ TQHBoxLayout *buttonBox = new TQHBoxLayout(m_mainLayout, KDialog::spacingHint());
KPushButton *backButton = new KPushButton(SmallIcon("back"), i18n("Server List"), this);
buttonBox->addWidget(backButton);
- connect(backButton, SIGNAL(clicked()), this, SIGNAL(leaveServer()));
+ connect(backButton, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(leaveServer()));
- buttonBox->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
+ buttonBox->addItem(new TQSpacerItem(20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
m_connectButton = new KPushButton(SmallIconSet("forward"), i18n("Create Game"), this);
m_connectButton->setEnabled(false);
buttonBox->addWidget(m_connectButton);
- connect(m_connectButton, SIGNAL(clicked()), this, SLOT(connectClicked()));
+ connect(m_connectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(connectClicked()));
}
void SelectGame::addGame(Game *game)
{
- connect(game, SIGNAL(changed(Game *)), this, SLOT(updateGame(Game *)));
+ connect(game, TQT_SIGNAL(changed(Game *)), this, TQT_SLOT(updateGame(Game *)));
if (game->id() == -1)
{
- QListViewItem *item = new QListViewItem( m_gameList, i18n("Create a new %1 Game").arg(game->name()), game->description(), QString::null, QString::null, game->type() );
- item->setPixmap(0, QPixmap(SmallIcon("filenew")));
+ TQListViewItem *item = new TQListViewItem( m_gameList, i18n("Create a new %1 Game").arg(game->name()), game->description(), TQString::null, TQString::null, game->type() );
+ item->setPixmap(0, TQPixmap(SmallIcon("filenew")));
}
else
{
Player *master = game->master();
- QListViewItem *item = new QListViewItem( m_gameList, i18n("Join %1's %2 Game").arg( (master ? master->name() : QString::null), game->name() ), game->description(), QString::number(game->id()), QString::number(game->players()), game->type() );
- item->setPixmap( 0, QPixmap(SmallIcon("atlantik")) );
+ TQListViewItem *item = new TQListViewItem( m_gameList, i18n("Join %1's %2 Game").arg( (master ? master->name() : TQString::null), game->name() ), game->description(), TQString::number(game->id()), TQString::number(game->players()), game->type() );
+ item->setPixmap( 0, TQPixmap(SmallIcon("atlantik")) );
item->setEnabled(game->canBeJoined());
KNotifyClient::event(winId(), "newgame");
- connect(master, SIGNAL(changed(Player *)), this, SLOT(playerChanged(Player *)));
+ connect(master, TQT_SIGNAL(changed(Player *)), this, TQT_SLOT(playerChanged(Player *)));
}
// validateConnectButton();
@@ -100,7 +100,7 @@ void SelectGame::addGame(Game *game)
void SelectGame::delGame(Game *game)
{
- QListViewItem *item = findItem(game);
+ TQListViewItem *item = findItem(game);
if (!item)
return;
@@ -111,7 +111,7 @@ void SelectGame::delGame(Game *game)
void SelectGame::updateGame(Game *game)
{
- QListViewItem *item = findItem(game);
+ TQListViewItem *item = findItem(game);
if (!item)
return;
@@ -122,11 +122,11 @@ void SelectGame::updateGame(Game *game)
else
{
Player *master = game->master();
- item->setText( 0, i18n("Join %1's %2 Game").arg( (master ? master->name() : QString::null), game->name() ) );
- item->setText( 3, QString::number( game->players() ) );
+ item->setText( 0, i18n("Join %1's %2 Game").arg( (master ? master->name() : TQString::null), game->name() ) );
+ item->setText( 3, TQString::number( game->players() ) );
item->setEnabled( game->canBeJoined() );
- connect(master, SIGNAL(changed(Player *)), this, SLOT(playerChanged(Player *)));
+ connect(master, TQT_SIGNAL(changed(Player *)), this, TQT_SLOT(playerChanged(Player *)));
}
m_gameList->triggerUpdate();
@@ -135,7 +135,7 @@ void SelectGame::updateGame(Game *game)
void SelectGame::playerChanged(Player *player)
{
- QListViewItem *item = m_gameList->firstChild();
+ TQListViewItem *item = m_gameList->firstChild();
Game *game = 0;
while (item)
@@ -150,12 +150,12 @@ void SelectGame::playerChanged(Player *player)
}
}
-QListViewItem *SelectGame::findItem(Game *game)
+TQListViewItem *SelectGame::findItem(Game *game)
{
- QListViewItem *item = m_gameList->firstChild();
+ TQListViewItem *item = m_gameList->firstChild();
while (item)
{
- if ( (game->id() == -1 || item->text(2) == QString::number(game->id())) && item->text(4) == game->type() )
+ if ( (game->id() == -1 || item->text(2) == TQString::number(game->id())) && item->text(4) == game->type() )
return item;
item = item->nextSibling();
@@ -165,7 +165,7 @@ QListViewItem *SelectGame::findItem(Game *game)
void SelectGame::validateConnectButton()
{
- if (QListViewItem *item = m_gameList->selectedItem())
+ if (TQListViewItem *item = m_gameList->selectedItem())
{
if (item->text(2).toInt() > 0)
m_connectButton->setText(i18n("Join Game"));
@@ -180,7 +180,7 @@ void SelectGame::validateConnectButton()
void SelectGame::connectClicked()
{
- if (QListViewItem *item = m_gameList->selectedItem())
+ if (TQListViewItem *item = m_gameList->selectedItem())
{
if (int gameId = item->text(2).toInt())
emit joinGame(gameId);