summaryrefslogtreecommitdiffstats
path: root/libkdegames/kgame/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'libkdegames/kgame/dialogs')
-rw-r--r--libkdegames/kgame/dialogs/kgameconnectdialog.cpp98
-rw-r--r--libkdegames/kgame/dialogs/kgameconnectdialog.h30
-rw-r--r--libkdegames/kgame/dialogs/kgamedebugdialog.cpp218
-rw-r--r--libkdegames/kgame/dialogs/kgamedebugdialog.h10
-rw-r--r--libkdegames/kgame/dialogs/kgamedialog.cpp50
-rw-r--r--libkdegames/kgame/dialogs/kgamedialog.h26
-rw-r--r--libkdegames/kgame/dialogs/kgamedialogconfig.cpp190
-rw-r--r--libkdegames/kgame/dialogs/kgamedialogconfig.h32
-rw-r--r--libkdegames/kgame/dialogs/kgameerrordialog.cpp40
-rw-r--r--libkdegames/kgame/dialogs/kgameerrordialog.h12
10 files changed, 353 insertions, 353 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);
}
diff --git a/libkdegames/kgame/dialogs/kgameconnectdialog.h b/libkdegames/kgame/dialogs/kgameconnectdialog.h
index acbf21d2..fdb0be4f 100644
--- a/libkdegames/kgame/dialogs/kgameconnectdialog.h
+++ b/libkdegames/kgame/dialogs/kgameconnectdialog.h
@@ -30,19 +30,19 @@ class KGameConnectWidget : public QWidget
{
Q_OBJECT
public:
- KGameConnectWidget(QWidget* parent);
+ KGameConnectWidget(TQWidget* parent);
virtual ~KGameConnectWidget();
/**
* @param host The host to connect to by default
**/
- void setHost(const QString& host);
+ void setHost(const TQString& host);
/**
- * @return The host to connect to or QString::null if the user wants to
+ * @return The host to connect to or TQString::null if the user wants to
* be the MASTER
**/
- QString host() const;
+ TQString host() const;
/**
* @param port The port that will be shown by default
@@ -66,24 +66,24 @@ public:
* It should be unique for application.
* @since 3.4
**/
- void setType(const QString& type);
+ void setType(const TQString& type);
/**
* @return service type
*/
- QString type() const;
+ TQString type() const;
/**
* Set game name for publishing.
* @param name Game name. Important only for server mode. If not
* set hostname will be used. In case of name conflict -2, -3 and so on will be added to name.
*/
- void setName(const QString& name);
+ void setName(const TQString& name);
/**
* @return game name.
*/
- QString gameName() const;
+ TQString gameName() const;
protected slots:
/**
@@ -108,7 +108,7 @@ private:
* @short Dialog to ask for host and port
*
* This Dialog is used to create a game. You call initConnection(port,
- * QString::null, parent, true) to create a network game (as a server)
+ * TQString::null, parent, true) to create a network game (as a server)
* or initConnection(port, host, parent) to join a network game.
*
* @author Andreas Beckermann <b_mann@gmx.de>
@@ -117,7 +117,7 @@ class KGameConnectDialog : public KDialogBase
{
Q_OBJECT
public:
- KGameConnectDialog(QWidget* parent = 0,int buttonmask=Ok|Cancel);
+ KGameConnectDialog(TQWidget* parent = 0,int buttonmask=Ok|Cancel);
virtual ~KGameConnectDialog();
/**
@@ -125,23 +125,23 @@ public:
* server game, depending on user's choice.
* @param port The port the user wants to connect to.
* @param host The host the user wants to connect to. Will be
- * QString::null if server game is chosen
+ * TQString::null if server game is chosen
* @param parent The parent of the dialog
* @param server True to create a network game per default, false to
* join a game by default
**/
- static int initConnection(unsigned short int& port, QString& host, QWidget* parent, bool server = false);
+ static int initConnection(unsigned short int& port, TQString& host, TQWidget* parent, bool server = false);
/**
* @param host The host to connect to by default
**/
- void setHost(const QString& host);
+ void setHost(const TQString& host);
/**
- * @return The host to connect to or QString::null if the user wants to
+ * @return The host to connect to or TQString::null if the user wants to
* be the MASTER
**/
- QString host() const;
+ TQString host() const;
/**
* @param port The port that will be shown by default
diff --git a/libkdegames/kgame/dialogs/kgamedebugdialog.cpp b/libkdegames/kgame/dialogs/kgamedebugdialog.cpp
index b112b04c..09a35e56 100644
--- a/libkdegames/kgame/dialogs/kgamedebugdialog.cpp
+++ b/libkdegames/kgame/dialogs/kgamedebugdialog.cpp
@@ -32,11 +32,11 @@
#include <kpushbutton.h>
#include <kstdguiitem.h>
-#include <qlayout.h>
-#include <qstring.h>
-#include <qintdict.h>
-#include <qlabel.h>
-#include <qdatetime.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqintdict.h>
+#include <tqlabel.h>
+#include <tqdatetime.h>
#include <typeinfo>
@@ -85,42 +85,42 @@ public:
const KGame* mGame;
- QFrame* mGamePage;
+ TQFrame* mGamePage;
KListView* mGameProperties;
- QListViewItem* mGameAddress;
- QListViewItem* mGameId;
- QListViewItem* mGameCookie;
- QListViewItem* mGameMaster;
- QListViewItem* mGameAdmin;
- QListViewItem* mGameOffering;
- QListViewItem* mGameStatus;
- QListViewItem* mGameRunning;
- QListViewItem* mGameMaxPlayers;
- QListViewItem* mGameMinPlayers;
- QListViewItem* mGamePlayerCount;
+ TQListViewItem* mGameAddress;
+ TQListViewItem* mGameId;
+ TQListViewItem* mGameCookie;
+ TQListViewItem* mGameMaster;
+ TQListViewItem* mGameAdmin;
+ TQListViewItem* mGameOffering;
+ TQListViewItem* mGameStatus;
+ TQListViewItem* mGameRunning;
+ TQListViewItem* mGameMaxPlayers;
+ TQListViewItem* mGameMinPlayers;
+ TQListViewItem* mGamePlayerCount;
- QFrame* mPlayerPage;
+ TQFrame* mPlayerPage;
KListBox* mPlayerList;
KListView* mPlayerProperties;
- QListViewItem* mPlayerAddress;
- QListViewItem* mPlayerId;
- QListViewItem* mPlayerName;
- QListViewItem* mPlayerGroup;
- QListViewItem* mPlayerUserId;
- QListViewItem* mPlayerMyTurn;
- QListViewItem* mPlayerAsyncInput;
- QListViewItem* mPlayerKGameAddress;
- QListViewItem* mPlayerVirtual;
- QListViewItem* mPlayerActive;
- QListViewItem* mPlayerRtti;
- QListViewItem* mPlayerNetworkPriority;
-
- QFrame* mMessagePage;
+ TQListViewItem* mPlayerAddress;
+ TQListViewItem* mPlayerId;
+ TQListViewItem* mPlayerName;
+ TQListViewItem* mPlayerGroup;
+ TQListViewItem* mPlayerUserId;
+ TQListViewItem* mPlayerMyTurn;
+ TQListViewItem* mPlayerAsyncInput;
+ TQListViewItem* mPlayerKGameAddress;
+ TQListViewItem* mPlayerVirtual;
+ TQListViewItem* mPlayerActive;
+ TQListViewItem* mPlayerRtti;
+ TQListViewItem* mPlayerNetworkPriority;
+
+ TQFrame* mMessagePage;
KListView* mMessageList;
KListBox* mHideIdList;
};
-KGameDebugDialog::KGameDebugDialog(KGame* g, QWidget* parent, bool modal) :
+KGameDebugDialog::KGameDebugDialog(KGame* g, TQWidget* parent, bool modal) :
KDialogBase(Tabbed, i18n("KGame Debug Dialog"), Close, Close,
parent, 0, modal, true)
{
@@ -141,8 +141,8 @@ KGameDebugDialog::~KGameDebugDialog()
void KGameDebugDialog::initGamePage()
{
d->mGamePage = addPage(i18n("Debug &KGame"));
- QVBoxLayout* topLayout = new QVBoxLayout(d->mGamePage, marginHint(), spacingHint());
- QHBoxLayout* layout = new QHBoxLayout(topLayout);
+ TQVBoxLayout* topLayout = new TQVBoxLayout(d->mGamePage, marginHint(), spacingHint());
+ TQHBoxLayout* layout = new TQHBoxLayout(topLayout);
KListView* v = new KListView(d->mGamePage);
v->addColumn(i18n("Data"));
@@ -155,38 +155,38 @@ void KGameDebugDialog::initGamePage()
d->mGameProperties->addColumn(i18n("Policy"));
layout->addWidget(d->mGameProperties);
- QPushButton* b = new QPushButton(i18n("Update"), d->mGamePage);
- connect(b, SIGNAL(pressed()), this, SLOT(slotUpdateGameData()));
+ TQPushButton* b = new TQPushButton(i18n("Update"), d->mGamePage);
+ connect(b, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotUpdateGameData()));
topLayout->addWidget(b);
// game data
- d->mGameAddress = new QListViewItem(v, i18n("KGame Pointer"));
- d->mGameId = new QListViewItem(v, i18n("Game ID"));
- d->mGameCookie = new QListViewItem(v, i18n("Game Cookie"));
- d->mGameMaster = new QListViewItem(v, i18n("Is Master"));
- d->mGameAdmin = new QListViewItem(v, i18n("Is Admin"));
- d->mGameOffering = new QListViewItem(v, i18n("Is Offering Connections"));
- d->mGameStatus = new QListViewItem(v, i18n("Game Status"));
- d->mGameRunning = new QListViewItem(v, i18n("Game is Running"));
- d->mGameMaxPlayers = new QListViewItem(v, i18n("Maximal Players"));
- d->mGameMinPlayers = new QListViewItem(v, i18n("Minimal Players"));
- d->mGamePlayerCount = new QListViewItem(v, i18n("Players"));
+ d->mGameAddress = new TQListViewItem(v, i18n("KGame Pointer"));
+ d->mGameId = new TQListViewItem(v, i18n("Game ID"));
+ d->mGameCookie = new TQListViewItem(v, i18n("Game Cookie"));
+ d->mGameMaster = new TQListViewItem(v, i18n("Is Master"));
+ d->mGameAdmin = new TQListViewItem(v, i18n("Is Admin"));
+ d->mGameOffering = new TQListViewItem(v, i18n("Is Offering Connections"));
+ d->mGameStatus = new TQListViewItem(v, i18n("Game Status"));
+ d->mGameRunning = new TQListViewItem(v, i18n("Game is Running"));
+ d->mGameMaxPlayers = new TQListViewItem(v, i18n("Maximal Players"));
+ d->mGameMinPlayers = new TQListViewItem(v, i18n("Minimal Players"));
+ d->mGamePlayerCount = new TQListViewItem(v, i18n("Players"));
}
void KGameDebugDialog::initPlayerPage()
{
d->mPlayerPage = addPage(i18n("Debug &Players"));
- QVBoxLayout* topLayout = new QVBoxLayout(d->mPlayerPage, marginHint(), spacingHint());
- QHBoxLayout* layout = new QHBoxLayout(topLayout);
+ TQVBoxLayout* topLayout = new TQVBoxLayout(d->mPlayerPage, marginHint(), spacingHint());
+ TQHBoxLayout* layout = new TQHBoxLayout(topLayout);
//TODO: connect to the KGame signals for joined/removed players!!!
- QVBoxLayout* listLayout = new QVBoxLayout(layout);
- QLabel* listLabel = new QLabel(i18n("Available Players"), d->mPlayerPage);
+ TQVBoxLayout* listLayout = new TQVBoxLayout(layout);
+ TQLabel* listLabel = new TQLabel(i18n("Available Players"), d->mPlayerPage);
listLayout->addWidget(listLabel);
d->mPlayerList = new KListBox(d->mPlayerPage);
- connect(d->mPlayerList, SIGNAL(executed(QListBoxItem*)), this, SLOT(slotUpdatePlayerData(QListBoxItem*)));
+ connect(d->mPlayerList, TQT_SIGNAL(executed(TQListBoxItem*)), this, TQT_SLOT(slotUpdatePlayerData(TQListBoxItem*)));
listLayout->addWidget(d->mPlayerList);
- d->mPlayerList->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding));
+ d->mPlayerList->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding));
KListView* v = new KListView(d->mPlayerPage);
layout->addWidget(v);
@@ -199,28 +199,28 @@ void KGameDebugDialog::initPlayerPage()
d->mPlayerProperties->addColumn(i18n("Policy"));
layout->addWidget(d->mPlayerProperties);
- QPushButton* b = new QPushButton(i18n("Update"), d->mPlayerPage);
- connect(b, SIGNAL(pressed()), this, SLOT(slotUpdatePlayerList()));
+ TQPushButton* b = new TQPushButton(i18n("Update"), d->mPlayerPage);
+ connect(b, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotUpdatePlayerList()));
topLayout->addWidget(b);
- d->mPlayerAddress = new QListViewItem(v, i18n("Player Pointer"));
- d->mPlayerId = new QListViewItem(v, i18n("Player ID"));
- d->mPlayerName = new QListViewItem(v, i18n("Player Name"));
- d->mPlayerGroup = new QListViewItem(v, i18n("Player Group"));
- d->mPlayerUserId = new QListViewItem(v, i18n("Player User ID"));
- d->mPlayerMyTurn = new QListViewItem(v, i18n("My Turn"));
- d->mPlayerAsyncInput = new QListViewItem(v, i18n("Async Input"));
- d->mPlayerKGameAddress = new QListViewItem(v, i18n("KGame Address"));
- d->mPlayerVirtual = new QListViewItem(v, i18n("Player is Virtual"));
- d->mPlayerActive = new QListViewItem(v, i18n("Player is Active"));
- d->mPlayerRtti = new QListViewItem(v, i18n("RTTI"));
- d->mPlayerNetworkPriority = new QListViewItem(v, i18n("Network Priority"));
+ d->mPlayerAddress = new TQListViewItem(v, i18n("Player Pointer"));
+ d->mPlayerId = new TQListViewItem(v, i18n("Player ID"));
+ d->mPlayerName = new TQListViewItem(v, i18n("Player Name"));
+ d->mPlayerGroup = new TQListViewItem(v, i18n("Player Group"));
+ d->mPlayerUserId = new TQListViewItem(v, i18n("Player User ID"));
+ d->mPlayerMyTurn = new TQListViewItem(v, i18n("My Turn"));
+ d->mPlayerAsyncInput = new TQListViewItem(v, i18n("Async Input"));
+ d->mPlayerKGameAddress = new TQListViewItem(v, i18n("KGame Address"));
+ d->mPlayerVirtual = new TQListViewItem(v, i18n("Player is Virtual"));
+ d->mPlayerActive = new TQListViewItem(v, i18n("Player is Active"));
+ d->mPlayerRtti = new TQListViewItem(v, i18n("RTTI"));
+ d->mPlayerNetworkPriority = new TQListViewItem(v, i18n("Network Priority"));
}
void KGameDebugDialog::initMessagePage()
{
d->mMessagePage = addPage(i18n("Debug &Messages"));
- QGridLayout* layout = new QGridLayout(d->mMessagePage, 11, 7, marginHint(), spacingHint());
+ TQGridLayout* layout = new TQGridLayout(d->mMessagePage, 11, 7, marginHint(), spacingHint());
d->mMessageList = new KListView(d->mMessagePage);
layout->addMultiCellWidget(d->mMessageList, 0, 9, 0, 3);
d->mMessageList->addColumn(i18n("Time"));
@@ -229,21 +229,21 @@ void KGameDebugDialog::initMessagePage()
d->mMessageList->addColumn(i18n("Sender"));
d->mMessageList->addColumn(i18n("ID - Text"));
- QPushButton* hide = new QPushButton(i18n("&>>"), d->mMessagePage);
- connect(hide, SIGNAL(pressed()), this, SLOT(slotHideId()));
+ TQPushButton* hide = new TQPushButton(i18n("&>>"), d->mMessagePage);
+ connect(hide, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotHideId()));
layout->addWidget(hide, 4, 4);
- QPushButton* show = new QPushButton(i18n("&<<"), d->mMessagePage);
- connect(show, SIGNAL(pressed()), this, SLOT(slotShowId()));
+ TQPushButton* show = new TQPushButton(i18n("&<<"), d->mMessagePage);
+ connect(show, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotShowId()));
layout->addWidget(show, 6, 4);
- QLabel* l = new QLabel(i18n("Do not show IDs:"), d->mMessagePage);
+ TQLabel* l = new TQLabel(i18n("Do not show IDs:"), d->mMessagePage);
layout->addMultiCellWidget(l, 0, 0, 5, 6);
d->mHideIdList = new KListBox(d->mMessagePage);
layout->addMultiCellWidget(d->mHideIdList, 1, 8, 5, 6);
- QPushButton* clear = new KPushButton(KStdGuiItem::clear(), d->mMessagePage);
- connect(clear, SIGNAL(pressed()), this, SLOT(slotClearMessages()));
+ TQPushButton* clear = new KPushButton(KStdGuiItem::clear(), d->mMessagePage);
+ connect(clear, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotClearMessages()));
layout->addMultiCellWidget(clear, 10, 10, 0, 6);
//TODO: "show all but..." and "show nothing but..."
}
@@ -292,12 +292,12 @@ void KGameDebugDialog::slotUpdatePlayerData()
void KGameDebugDialog::slotUpdatePlayerList()
{
- QListBoxItem* i = d->mPlayerList->firstItem();
+ TQListBoxItem* i = d->mPlayerList->firstItem();
for (; i; i = d->mPlayerList->firstItem()) {
removePlayer(i);
}
- QPtrList<KPlayer> list = *d->mGame->playerList();
+ TQPtrList<KPlayer> list = *d->mGame->playerList();
for (KPlayer* p = list.first(); p; p = list.next()) {
addPlayer(p);
}
@@ -312,26 +312,26 @@ void KGameDebugDialog::slotUpdateGameData()
clearGameData();
- QString buf;
+ TQString buf;
buf.sprintf("%p", d->mGame);
d->mGameAddress->setText(1, buf);
- d->mGameId->setText(1, QString::number(d->mGame->gameId()));
- d->mGameCookie->setText(1, QString::number(d->mGame->cookie()));
+ d->mGameId->setText(1, TQString::number(d->mGame->gameId()));
+ d->mGameCookie->setText(1, TQString::number(d->mGame->cookie()));
d->mGameMaster->setText(1, d->mGame->isMaster() ? i18n("True") : i18n("False"));
d->mGameAdmin->setText(1, d->mGame->isAdmin() ? i18n("True") : i18n("False"));
d->mGameOffering->setText(1, d->mGame->isOfferingConnections() ? i18n("True") : i18n("False"));
- d->mGameStatus->setText(1, QString::number(d->mGame->gameStatus()));
+ d->mGameStatus->setText(1, TQString::number(d->mGame->gameStatus()));
d->mGameRunning->setText(1, d->mGame->isRunning() ? i18n("True") : i18n("False"));
- d->mGameMaxPlayers->setText(1, QString::number(d->mGame->maxPlayers()));
- d->mGameMinPlayers->setText(1, QString::number(d->mGame->minPlayers()));
- d->mGamePlayerCount->setText(1, QString::number(d->mGame->playerCount()));
+ d->mGameMaxPlayers->setText(1, TQString::number(d->mGame->maxPlayers()));
+ d->mGameMinPlayers->setText(1, TQString::number(d->mGame->minPlayers()));
+ d->mGamePlayerCount->setText(1, TQString::number(d->mGame->playerCount()));
//TODO ios
KGamePropertyHandler* handler = d->mGame->dataHandler();
- QIntDictIterator<KGamePropertyBase> it(handler->dict());
+ TQIntDictIterator<KGamePropertyBase> it(handler->dict());
while (it.current()) {
- QString policy;
+ TQString policy;
switch (it.current()->policy()) {
case KGamePropertyBase::PolicyClean:
policy = i18n("Clean");
@@ -347,7 +347,7 @@ void KGameDebugDialog::slotUpdateGameData()
policy = i18n("Undefined");
break;
}
- (void) new QListViewItem(d->mGameProperties,
+ (void) new TQListViewItem(d->mGameProperties,
handler->propertyName(it.current()->id()),
handler->propertyValue(it.current()),
policy);
@@ -356,7 +356,7 @@ void KGameDebugDialog::slotUpdateGameData()
}
}
-void KGameDebugDialog::slotUpdatePlayerData(QListBoxItem* item)
+void KGameDebugDialog::slotUpdatePlayerData(TQListBoxItem* item)
{
if (!item || !d->mGame) {
return;
@@ -371,29 +371,29 @@ void KGameDebugDialog::slotUpdatePlayerData(QListBoxItem* item)
clearPlayerData();
- QString buf;
+ TQString buf;
buf.sprintf("%p", p);
d->mPlayerAddress->setText(1, buf);
- d->mPlayerId->setText(1, QString::number(p->id()));
+ d->mPlayerId->setText(1, TQString::number(p->id()));
d->mPlayerName->setText(1, p->name());
d->mPlayerGroup->setText(1, p->group());
- d->mPlayerUserId->setText(1, QString::number(p->userId()));
+ d->mPlayerUserId->setText(1, TQString::number(p->userId()));
d->mPlayerMyTurn->setText(1, p->myTurn() ? i18n("True") : i18n("False"));
d->mPlayerAsyncInput->setText(1, p->asyncInput() ? i18n("True") : i18n("False"));
buf.sprintf("%p", p->game());
d->mPlayerKGameAddress->setText(1, buf);
d->mPlayerVirtual->setText(1, p->isVirtual() ? i18n("True") : i18n("False"));
d->mPlayerActive->setText(1, p->isActive() ? i18n("True") : i18n("False"));
- d->mPlayerRtti->setText(1, QString::number(p->rtti()));
- d->mPlayerNetworkPriority->setText(1, QString::number(p->networkPriority()));
+ d->mPlayerRtti->setText(1, TQString::number(p->rtti()));
+ d->mPlayerNetworkPriority->setText(1, TQString::number(p->networkPriority()));
//TODO ios
// Properties
KGamePropertyHandler * handler = p->dataHandler();
- QIntDictIterator<KGamePropertyBase> it((handler->dict()));
+ TQIntDictIterator<KGamePropertyBase> it((handler->dict()));
while (it.current()) {
- QString policy;
+ TQString policy;
switch (it.current()->policy()) {
case KGamePropertyBase::PolicyClean:
policy = i18n("Clean");
@@ -409,7 +409,7 @@ void KGameDebugDialog::slotUpdatePlayerData(QListBoxItem* item)
policy = i18n("Undefined");
break;
}
- (void)new QListViewItem(d->mPlayerProperties,
+ (void)new TQListViewItem(d->mPlayerProperties,
handler->propertyName(it.current()->id()),
handler->propertyValue(it.current()),
policy);
@@ -431,17 +431,17 @@ void KGameDebugDialog::setKGame(const KGame* g)
d->mGame = g;
if (g) {
//TODO: connect to the KGame signals for joined/removed players!!!
- connect(d->mGame, SIGNAL(destroyed()), this, SLOT(slotUnsetKGame()));
+ connect(d->mGame, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotUnsetKGame()));
// connect();
- QPtrList<KPlayer> list = *d->mGame->playerList();
+ TQPtrList<KPlayer> list = *d->mGame->playerList();
for (KPlayer* p = list.first(); p; p = list.next()) {
addPlayer(p);
}
slotUpdateGameData();
- connect(d->mGame, SIGNAL(signalMessageUpdate(int, Q_UINT32, Q_UINT32)), this, SLOT(slotMessageUpdate(int, Q_UINT32, Q_UINT32)));
+ connect(d->mGame, TQT_SIGNAL(signalMessageUpdate(int, Q_UINT32, Q_UINT32)), this, TQT_SLOT(slotMessageUpdate(int, Q_UINT32, Q_UINT32)));
}
}
@@ -461,11 +461,11 @@ void KGameDebugDialog::addPlayer(KPlayer* p)
return;
}
- (void) new QListBoxText(d->mPlayerList, QString::number(p->id()));
+ (void) new TQListBoxText(d->mPlayerList, TQString::number(p->id()));
//TODO connect to signals, like deleted/removed, ...
}
-void KGameDebugDialog::removePlayer(QListBoxItem* i)
+void KGameDebugDialog::removePlayer(TQListBoxItem* i)
{
if (!i || !d->mGame) {
return;
@@ -486,7 +486,7 @@ void KGameDebugDialog::slotMessageUpdate(int msgid, Q_UINT32 receiver, Q_UINT32
if (!showId(msgid)) {
return;
}
- QString msgidText = KGameMessage::messageId2Text(msgid);
+ TQString msgidText = KGameMessage::messageId2Text(msgid);
if (msgidText.isNull()) {
if (msgid > KGameMessage::IdUser) {
emit signalRequestIdName(msgid-KGameMessage::IdUser, true, msgidText);
@@ -497,9 +497,9 @@ void KGameDebugDialog::slotMessageUpdate(int msgid, Q_UINT32 receiver, Q_UINT32
msgidText = i18n("Unknown");
}
}
- (void) new QListViewItem( d->mMessageList, QTime::currentTime().toString(),
- QString::number(msgid), QString::number(receiver),
- QString::number(sender), msgidText);
+ (void) new TQListViewItem( d->mMessageList, TQTime::currentTime().toString(),
+ TQString::number(msgid), TQString::number(receiver),
+ TQString::number(sender), msgidText);
}
void KGameDebugDialog::slotClearMessages()
@@ -509,7 +509,7 @@ void KGameDebugDialog::slotClearMessages()
void KGameDebugDialog::slotShowId()
{
-/* QListBoxItem* i = d->mHideIdList->firstItem();
+/* TQListBoxItem* i = d->mHideIdList->firstItem();
for (; i; i = i->next()) {
if (i->selected()) {
d->mHideIdList->removeItem(i->);
@@ -530,12 +530,12 @@ void KGameDebugDialog::slotHideId()
if (!showId(msgid)) {
return;
}
- (void)new QListBoxText(d->mHideIdList, QString::number(msgid));
+ (void)new TQListBoxText(d->mHideIdList, TQString::number(msgid));
}
bool KGameDebugDialog::showId(int msgid)
{
- QListBoxItem* i = d->mHideIdList->firstItem();
+ TQListBoxItem* i = d->mHideIdList->firstItem();
for (; i; i = i->next()) {
if (i->text().toInt() == msgid) {
return false;
diff --git a/libkdegames/kgame/dialogs/kgamedebugdialog.h b/libkdegames/kgame/dialogs/kgamedebugdialog.h
index 65afc92a..57f20c34 100644
--- a/libkdegames/kgame/dialogs/kgamedebugdialog.h
+++ b/libkdegames/kgame/dialogs/kgamedebugdialog.h
@@ -35,7 +35,7 @@ class KDE_EXPORT KGameDebugDialog : public KDialogBase
{
Q_OBJECT
public:
- KGameDebugDialog(KGame* g, QWidget* parent, bool modal = false);
+ KGameDebugDialog(KGame* g, TQWidget* parent, bool modal = false);
~KGameDebugDialog();
/**
@@ -89,7 +89,7 @@ signals:
* KGameMessage::GameMessageIds couldn't be found.
* @param name The name of the msgid. You have to fill this!
**/
- void signalRequestIdName(int messageid, bool userid, QString& name);
+ void signalRequestIdName(int messageid, bool userid, TQString& name);
protected:
void clearPages();
@@ -113,7 +113,7 @@ protected:
/**
* Remove a player from the list
**/
- void removePlayer(QListBoxItem* item);
+ void removePlayer(TQListBoxItem* item);
/**
* @return Whether messages with this msgid shall be displayed or not
@@ -123,10 +123,10 @@ protected:
protected slots:
/**
* Update the data of the player specified in item
- * @param item The @ref QListBoxItem of the player to be updated. Note
+ * @param item The @ref TQListBoxItem of the player to be updated. Note
* that the text of this item MUST be the ID of the player
**/
- void slotUpdatePlayerData(QListBoxItem* item);
+ void slotUpdatePlayerData(TQListBoxItem* item);
void slotShowId();
void slotHideId();
diff --git a/libkdegames/kgame/dialogs/kgamedialog.cpp b/libkdegames/kgame/dialogs/kgamedialog.cpp
index dc564b8e..c03df4ff 100644
--- a/libkdegames/kgame/dialogs/kgamedialog.cpp
+++ b/libkdegames/kgame/dialogs/kgamedialog.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
#include <klocale.h>
@@ -48,31 +48,31 @@ public:
mGame = 0;
}
- QVBox* mGamePage;
- QVBox* mNetworkPage;
- QVBox* mMsgServerPage;// unused here?
- QVBoxLayout* mTopLayout;
+ TQVBox* mGamePage;
+ TQVBox* mNetworkPage;
+ TQVBox* mMsgServerPage;// unused here?
+ TQVBoxLayout* mTopLayout;
KGameDialogNetworkConfig* mNetworkConfig;
KGameDialogGeneralConfig* mGameConfig;
// a list of all config widgets added to this dialog
- QPtrList<KGameDialogConfig> mConfigWidgets;
+ TQPtrList<KGameDialogConfig> mConfigWidgets;
// just pointers:
KPlayer* mOwner;
KGame* mGame;
};
-KGameDialog::KGameDialog(KGame* g, KPlayer* owner, const QString& title,
- QWidget* parent, bool modal)
+KGameDialog::KGameDialog(KGame* g, KPlayer* owner, const TQString& title,
+ TQWidget* parent, bool modal)
: KDialogBase(Tabbed, title, Ok|Default|Apply,
Ok, parent, 0, modal, true)
{
init(g, owner);
}
-KGameDialog::KGameDialog(KGame* g, KPlayer* owner, const QString& title,
- QWidget* parent, long initConfigs, int chatMsgId, bool modal)
+KGameDialog::KGameDialog(KGame* g, KPlayer* owner, const TQString& title,
+ TQWidget* parent, long initConfigs, int chatMsgId, bool modal)
: KDialogBase(Tabbed, title, Ok|Default|Apply,
Ok, parent, 0, modal, true)
{
@@ -165,7 +165,7 @@ void KGameDialog::addMsgServerConfig(KGameDialogMsgServerConfig* msgConf)
d->mMsgServerPage = addConfigPage(msgConf, i18n("&Message Server"));
}
-void KGameDialog::addChatWidget(KGameDialogChatConfig* chat, QVBox* parent)
+void KGameDialog::addChatWidget(KGameDialogChatConfig* chat, TQVBox* parent)
{
if (!chat) {
return;
@@ -180,7 +180,7 @@ void KGameDialog::addChatWidget(KGameDialogChatConfig* chat, QVBox* parent)
addConfigWidget(chat, parent);
}
-void KGameDialog::addConnectionList(KGameDialogConnectionConfig* c, QVBox* parent)
+void KGameDialog::addConnectionList(KGameDialogConnectionConfig* c, TQVBox* parent)
{
if (!c) {
return;
@@ -195,9 +195,9 @@ void KGameDialog::addConnectionList(KGameDialogConnectionConfig* c, QVBox* paren
addConfigWidget(c, parent);
}
-QVBox *KGameDialog::configPage(ConfigOptions which)
+TQVBox *KGameDialog::configPage(ConfigOptions which)
{
- QVBox *box = 0;
+ TQVBox *box = 0;
switch(which)
{
case NetworkConfig:
@@ -215,18 +215,18 @@ QVBox *KGameDialog::configPage(ConfigOptions which)
return box;
}
-QVBox* KGameDialog::addConfigPage(KGameDialogConfig* widget, const QString& title)
+TQVBox* KGameDialog::addConfigPage(KGameDialogConfig* widget, const TQString& title)
{
if (!widget) {
kdError(11001) << "Cannot add NULL config widget" << endl;
return 0;
}
- QVBox* page = addVBoxPage(title);
+ TQVBox* page = addVBoxPage(title);
addConfigWidget(widget, page);
return page;
}
-void KGameDialog::addConfigWidget(KGameDialogConfig* widget, QWidget* parent)
+void KGameDialog::addConfigWidget(KGameDialogConfig* widget, TQWidget* parent)
{
if (!widget) {
kdError(11001) << "Cannot add NULL config widget" << endl;
@@ -237,9 +237,9 @@ void KGameDialog::addConfigWidget(KGameDialogConfig* widget, QWidget* parent)
return;
}
// kdDebug(11001) << "reparenting widget" << endl;
- widget->reparent(parent, QPoint(0,0));
+ widget->reparent(parent, TQPoint(0,0));
d->mConfigWidgets.append(widget);
- connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(slotRemoveConfigWidget(QObject*)));
+ connect(widget, TQT_SIGNAL(destroyed(TQObject*)), this, TQT_SLOT(slotRemoveConfigWidget(TQObject*)));
if (!d->mGame) {
kdWarning(11001) << "No game has been set!" << endl;
} else {
@@ -278,7 +278,7 @@ void KGameDialog::slotDefault()
void KGameDialog::slotOk()
{
slotApply();
- QDialog::accept();
+ TQDialog::accept();
}
void KGameDialog::setOwner(KPlayer* owner)
@@ -306,9 +306,9 @@ void KGameDialog::setKGame(KGame* g)
}
if (d->mGame) {
setAdmin(d->mGame->isAdmin());
- connect(d->mGame, SIGNAL(destroyed()), this, SLOT(slotUnsetKGame()));
- connect(d->mGame, SIGNAL(signalAdminStatusChanged(bool)),
- this, SLOT(setAdmin(bool)));
+ connect(d->mGame, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotUnsetKGame()));
+ connect(d->mGame, TQT_SIGNAL(signalAdminStatusChanged(bool)),
+ this, TQT_SLOT(setAdmin(bool)));
}
}
@@ -340,7 +340,7 @@ void KGameDialog::submitToKGame()
}
}
-void KGameDialog::slotRemoveConfigWidget(QObject* configWidget)
+void KGameDialog::slotRemoveConfigWidget(TQObject* configWidget)
{
d->mConfigWidgets.removeRef((KGameDialogConfig*)configWidget);
}
diff --git a/libkdegames/kgame/dialogs/kgamedialog.h b/libkdegames/kgame/dialogs/kgamedialog.h
index f7a0c6e5..f3256d8a 100644
--- a/libkdegames/kgame/dialogs/kgamedialog.h
+++ b/libkdegames/kgame/dialogs/kgamedialog.h
@@ -97,8 +97,8 @@ public:
* @param parent The parent of the dialog
* @param modal Whether the dialog is modal or not
**/
- KGameDialog(KGame* g, KPlayer* owner, const QString& title,
- QWidget* parent, bool modal = false);
+ KGameDialog(KGame* g, KPlayer* owner, const TQString& title,
+ TQWidget* parent, bool modal = false);
/**
* Create a KGameDialog with the standard configuration widgets. This
@@ -129,8 +129,8 @@ public:
* @param chatMsgId The ID of Chat messages. See KGameChat. Unused
* if initConfigs = false
**/
- KGameDialog(KGame* g, KPlayer* owner, const QString& title,
- QWidget* parent, long initConfigs = AllConfig,
+ KGameDialog(KGame* g, KPlayer* owner, const TQString& title,
+ TQWidget* parent, long initConfigs = AllConfig,
int chatMsgId = 15432, bool modal = false);
virtual ~KGameDialog();
@@ -175,7 +175,7 @@ public:
* already added config widget. Note that the game page will be used
* if parent is 0.
**/
- void addChatWidget(KGameDialogChatConfig* chat, QVBox* parent = 0);
+ void addChatWidget(KGameDialogChatConfig* chat, TQVBox* parent = 0);
/**
* Add a connection list to the dialog. The list consists of a
@@ -189,7 +189,7 @@ public:
* @param parent The parent of the widget. If 0 the networkConfig
* page is used.
**/
- void addConnectionList(KGameDialogConnectionConfig* c, QVBox* parent = 0);
+ void addConnectionList(KGameDialogConnectionConfig* c, TQVBox* parent = 0);
/**
* Add a new page to the dialog. The page will contain you new config
@@ -201,13 +201,13 @@ public:
* @param title The title of the newly added page.
* @return The newly added page which contains your config widget.
**/
- QVBox* addConfigPage(KGameDialogConfig* widget, const QString& title);
+ TQVBox* addConfigPage(KGameDialogConfig* widget, const TQString& title);
/**
- * @return The QVBox of the given key, The key is from ConfigOptions
+ * @return The TQVBox of the given key, The key is from ConfigOptions
* Note that not all are supported yet
**/
- QVBox *configPage(ConfigOptions which);
+ TQVBox *configPage(ConfigOptions which);
/**
* @return The default netowrk config. Note that this always returns 0 if
@@ -227,7 +227,7 @@ public:
* it to the same page. Just use the returned page of
* addConfigPage.
**/
- void addConfigWidget(KGameDialogConfig* widget, QWidget* parent);
+ void addConfigWidget(KGameDialogConfig* widget, TQWidget* parent);
/**
* Used to add the main network config widget in a new page. Use this to
@@ -275,7 +275,7 @@ protected:
protected slots:
/**
* Called when the user clicks on Ok. Calls slotApply and
- * QDialog::accept()
+ * TQDialog::accept()
**/
virtual void slotOk();
@@ -306,9 +306,9 @@ protected slots:
/**
* Remove a config widget from the widget list.
- * @see QObject::destroyed
+ * @see TQObject::destroyed
**/
- void slotRemoveConfigWidget(QObject* configWidget);
+ void slotRemoveConfigWidget(TQObject* configWidget);
private:
void init(KGame*, KPlayer*);
diff --git a/libkdegames/kgame/dialogs/kgamedialogconfig.cpp b/libkdegames/kgame/dialogs/kgamedialogconfig.cpp
index 27f91cd1..44eaa3c7 100644
--- a/libkdegames/kgame/dialogs/kgamedialogconfig.cpp
+++ b/libkdegames/kgame/dialogs/kgamedialogconfig.cpp
@@ -31,13 +31,13 @@
#include <klistbox.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qhgroupbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qvbox.h>
-#include <qptrdict.h>
+#include <tqlayout.h>
+#include <tqhgroupbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqvbox.h>
+#include <tqptrdict.h>
#include "kgamedialogconfig.moc"
@@ -57,7 +57,7 @@ public:
KPlayer* mOwner;
};
-KGameDialogConfig::KGameDialogConfig(QWidget* parent) : QWidget(parent)
+KGameDialogConfig::KGameDialogConfig(TQWidget* parent) : TQWidget(parent)
{
d = new KGameDialogConfigPrivate;
}
@@ -104,42 +104,42 @@ public:
}
- // QPushButton* mInitConnection;
- QHGroupBox* mInitConnection;
- QLabel* mNetworkLabel;
- QPushButton *mDisconnectButton;
+ // TQPushButton* mInitConnection;
+ TQHGroupBox* mInitConnection;
+ TQLabel* mNetworkLabel;
+ TQPushButton *mDisconnectButton;
bool mDefaultServer;
- QString mDefaultHost;
+ TQString mDefaultHost;
unsigned short int mDefaultPort;
KGameConnectWidget *mConnect;
};
-KGameDialogNetworkConfig::KGameDialogNetworkConfig(QWidget* parent)
+KGameDialogNetworkConfig::KGameDialogNetworkConfig(TQWidget* parent)
: KGameDialogConfig(parent)
{
// kdDebug(11001) << k_funcinfo << ": this=" << this << endl;
d = new KGameDialogNetworkConfigPrivate();
- QVBoxLayout* topLayout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "toplayout");
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "toplayout");
- QHBoxLayout *hb = new QHBoxLayout(topLayout, KDialog::spacingHint());
+ TQHBoxLayout *hb = new TQHBoxLayout(topLayout, KDialog::spacingHint());
- d->mNetworkLabel = new QLabel(this);
+ d->mNetworkLabel = new TQLabel(this);
hb->addWidget(d->mNetworkLabel);
- d->mDisconnectButton=new QPushButton(i18n("Disconnect"),this);
- connect(d->mDisconnectButton, SIGNAL(clicked()), this, SLOT(slotExitConnection()));
+ d->mDisconnectButton=new TQPushButton(i18n("Disconnect"),this);
+ connect(d->mDisconnectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotExitConnection()));
hb->addWidget(d->mDisconnectButton);
- d->mInitConnection = new QHGroupBox(i18n("Network Configuration"), this);
+ d->mInitConnection = new TQHGroupBox(i18n("Network Configuration"), this);
topLayout->addWidget(d->mInitConnection);
d->mConnect = new KGameConnectWidget(d->mInitConnection);
- connect(d->mConnect, SIGNAL(signalNetworkSetup()), this, SLOT(slotInitConnection()));
- connect(d->mConnect, SIGNAL(signalServerTypeChanged(int)),
- this, SIGNAL(signalServerTypeChanged(int)));
+ connect(d->mConnect, TQT_SIGNAL(signalNetworkSetup()), this, TQT_SLOT(slotInitConnection()));
+ connect(d->mConnect, TQT_SIGNAL(signalServerTypeChanged(int)),
+ this, TQT_SIGNAL(signalServerTypeChanged(int)));
// Needs to be AFTER the creation of the dialogs
setConnected(false);
@@ -165,7 +165,7 @@ void KGameDialogNetworkConfig::slotInitConnection()
bool connected = false;
bool master = true;
unsigned short int port = d->mConnect->port();
- QString host = d->mConnect->host();
+ TQString host = d->mConnect->host();
if (host.isNull()) {
master = true;
@@ -180,8 +180,8 @@ void KGameDialogNetworkConfig::slotInitConnection()
}
// We need to learn about failed connections
if (game()) {
- connect(game(), SIGNAL(signalConnectionBroken()),
- this, SLOT(slotConnectionBroken()));
+ connect(game(), TQT_SIGNAL(signalConnectionBroken()),
+ this, TQT_SLOT(slotConnectionBroken()));
}
}
setConnected(connected, master);
@@ -225,7 +225,7 @@ void KGameDialogNetworkConfig::setKGame(KGame* g)
setConnected(game()->isNetwork(), game()->isMaster());
}
-void KGameDialogNetworkConfig::setDefaultNetworkInfo(const QString& host, unsigned short int port,bool server)
+void KGameDialogNetworkConfig::setDefaultNetworkInfo(const TQString& host, unsigned short int port,bool server)
{
d->mDefaultPort = port;
d->mDefaultHost = host;
@@ -240,7 +240,7 @@ void KGameDialogNetworkConfig::setDefaultNetworkInfo(const QString& host, unsign
}
}
-void KGameDialogNetworkConfig::setDiscoveryInfo(const QString& type, const QString& name)
+void KGameDialogNetworkConfig::setDiscoveryInfo(const TQString& type, const TQString& name)
{
d->mConnect->setType(type);
d->mConnect->setName(name);
@@ -256,26 +256,26 @@ public:
mName = 0;
}
- QLineEdit* mName;
+ TQLineEdit* mName;
- QVBoxLayout* mTopLayout;
+ TQVBoxLayout* mTopLayout;
};
-KGameDialogGeneralConfig::KGameDialogGeneralConfig(QWidget* parent, bool initializeGUI)
+KGameDialogGeneralConfig::KGameDialogGeneralConfig(TQWidget* parent, bool initializeGUI)
: KGameDialogConfig(parent)
{
// kdDebug(11001) << k_funcinfo << ": this=" << this << endl;
d = new KGameDialogGeneralConfigPrivate;
if (initializeGUI) {
- d->mTopLayout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+ d->mTopLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
d->mTopLayout->setAutoAdd(true);
- QWidget* nameWidget = new QWidget(this);
- QHBoxLayout* l = new QHBoxLayout(nameWidget);
- QLabel* nameLabel = new QLabel(i18n("Your name:"), nameWidget);
+ TQWidget* nameWidget = new TQWidget(this);
+ TQHBoxLayout* l = new TQHBoxLayout(nameWidget);
+ TQLabel* nameLabel = new TQLabel(i18n("Your name:"), nameWidget);
l->addWidget(nameLabel);
- d->mName = new QLineEdit(nameWidget);
+ d->mName = new TQLineEdit(nameWidget);
l->addWidget(d->mName);
}
}
@@ -286,16 +286,16 @@ KGameDialogGeneralConfig::~KGameDialogGeneralConfig()
delete d;
}
-void KGameDialogGeneralConfig::setPlayerName(const QString& name)
+void KGameDialogGeneralConfig::setPlayerName(const TQString& name)
{
if (d->mName) {
d->mName->setText(name);
}
}
-QString KGameDialogGeneralConfig::playerName() const
+TQString KGameDialogGeneralConfig::playerName() const
{
- return d->mName ? d->mName->text() : QString::null;
+ return d->mName ? d->mName->text() : TQString::null;
}
void KGameDialogGeneralConfig::setOwner(KPlayer* p)
@@ -309,8 +309,8 @@ void KGameDialogGeneralConfig::setOwner(KPlayer* p)
// maybe call hide()
return;
}
- connect(owner(), SIGNAL(signalPropertyChanged(KGamePropertyBase*, KPlayer*)),
- this, SLOT(slotPropertyChanged(KGamePropertyBase*, KPlayer*)));
+ connect(owner(), TQT_SIGNAL(signalPropertyChanged(KGamePropertyBase*, KPlayer*)),
+ this, TQT_SLOT(slotPropertyChanged(KGamePropertyBase*, KPlayer*)));
setPlayerName(p->name());
//TODO: connect signalPropertyChanged and check for playername changes!
}
@@ -373,29 +373,29 @@ public:
noMaster = 0;
}
- QVBoxLayout* senderLayout;
- QHBoxLayout* localLayout;
+ TQVBoxLayout* senderLayout;
+ TQHBoxLayout* localLayout;
- QPushButton* changeMaxClients;
- QPushButton* changeAdmin;
- QPushButton* removeClient;
- QLabel* noAdmin;
+ TQPushButton* changeMaxClients;
+ TQPushButton* changeAdmin;
+ TQPushButton* removeClient;
+ TQLabel* noAdmin;
- QLabel* noMaster;
+ TQLabel* noMaster;
};
// TODO: change ADMIN ID, remove CLIENTS, change MAXCLIENTS
// we do everything here with QPushButtons as we want to wait a moment before
// continuing - the message must be sent over network first
-KGameDialogMsgServerConfig::KGameDialogMsgServerConfig(QWidget* parent)
+KGameDialogMsgServerConfig::KGameDialogMsgServerConfig(TQWidget* parent)
: KGameDialogConfig(parent)
{
d = new KGameDialogMsgServerConfigPrivate;
- QVBoxLayout* topLayout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
- d->senderLayout = new QVBoxLayout(topLayout);
- d->localLayout = new QHBoxLayout(topLayout);
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+ d->senderLayout = new TQVBoxLayout(topLayout);
+ d->localLayout = new TQHBoxLayout(topLayout);
}
KGameDialogMsgServerConfig::~KGameDialogMsgServerConfig()
@@ -408,7 +408,7 @@ void KGameDialogMsgServerConfig::setKGame(KGame* g)
{
KGameDialogConfig::setKGame(g);
//TODO display the ID of the admin if we aren't
- // connect(g, SIGNAL(signalAdminChanged(int)), this, SLOT(slotChangeIsAdmin(int)));//TODO
+ // connect(g, TQT_SIGNAL(signalAdminChanged(int)), this, TQT_SLOT(slotChangeIsAdmin(int)));//TODO
if (!game()) {
// we cannot do anything without a KGame object!
setAdmin(false);
@@ -430,17 +430,17 @@ void KGameDialogMsgServerConfig::slotChangeMaxClients()
return;
}
int max;
-// edit->setText(QString::number()); // current max clients! //TODO
+// edit->setText(TQString::number()); // current max clients! //TODO
- QDialog* dialog = new QDialog();
+ TQDialog* dialog = new TQDialog();
dialog->setCaption(i18n("Maximal Number of Clients"));
- QHBoxLayout* l = new QHBoxLayout(dialog, KDialog::marginHint(), KDialog::spacingHint());
+ TQHBoxLayout* l = new TQHBoxLayout(dialog, KDialog::marginHint(), KDialog::spacingHint());
l->setAutoAdd(true);
- (void) new QLabel(i18n("Maximal number of clients (-1 = infinite):"), dialog);
- QLineEdit* edit = new QLineEdit(dialog);//TODO: use KIntNumInput
-// edit->setText(QString::number(max)); // current max clients! //TODO
- if (dialog->exec() == QDialog::Accepted) {
+ (void) new TQLabel(i18n("Maximal number of clients (-1 = infinite):"), dialog);
+ TQLineEdit* edit = new TQLineEdit(dialog);//TODO: use KIntNumInput
+// edit->setText(TQString::number(max)); // current max clients! //TODO
+ if (dialog->exec() == TQDialog::Accepted) {
bool ok;
max = edit->text().toInt(&ok);
if (ok) {
@@ -487,12 +487,12 @@ void KGameDialogMsgServerConfig::setAdmin(bool a)
delete d->noAdmin;
d->noAdmin = 0;
}
- d->changeMaxClients = new QPushButton(i18n("Change Maximal Number of Clients"), this);
- connect(d->changeMaxClients, SIGNAL(pressed()), this, SLOT(slotChangeMaxClients()));
- d->changeAdmin = new QPushButton(i18n("Change Admin"), this);
- connect(d->changeAdmin, SIGNAL(pressed()), this, SLOT(slotChangeAdmin()));
- d->removeClient = new QPushButton(i18n("Remove Client with All Players"), this);
- connect(d->removeClient, SIGNAL(pressed()), this, SLOT(slotRemoveClient()));
+ d->changeMaxClients = new TQPushButton(i18n("Change Maximal Number of Clients"), this);
+ connect(d->changeMaxClients, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotChangeMaxClients()));
+ d->changeAdmin = new TQPushButton(i18n("Change Admin"), this);
+ connect(d->changeAdmin, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotChangeAdmin()));
+ d->removeClient = new TQPushButton(i18n("Remove Client with All Players"), this);
+ connect(d->removeClient, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotRemoveClient()));
d->senderLayout->addWidget(d->changeMaxClients);
d->senderLayout->addWidget(d->changeAdmin);
d->senderLayout->addWidget(d->removeClient);
@@ -509,7 +509,7 @@ void KGameDialogMsgServerConfig::setAdmin(bool a)
delete d->removeClient;
d->removeClient = 0;
}
- d->noAdmin = new QLabel(i18n("Only the admin can configure the message server!"), this);
+ d->noAdmin = new TQLabel(i18n("Only the admin can configure the message server!"), this);
d->senderLayout->addWidget(d->noAdmin);
}
}
@@ -520,7 +520,7 @@ void KGameDialogMsgServerConfig::setHasMsgServer(bool has)
if (!has) {
// delete all inputs
if (!d->noMaster) {
- d->noMaster = new QLabel(i18n("You don't own the message server"), this);
+ d->noMaster = new TQLabel(i18n("You don't own the message server"), this);
d->localLayout->addWidget(d->noMaster);
}
return;
@@ -547,13 +547,13 @@ public:
KGameChat* mChat;
};
-KGameDialogChatConfig::KGameDialogChatConfig(int chatMsgId, QWidget* parent)
+KGameDialogChatConfig::KGameDialogChatConfig(int chatMsgId, TQWidget* parent)
: KGameDialogConfig(parent)
{
d = new KGameDialogChatConfigPrivate;
- QVBoxLayout* topLayout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
topLayout->setAutoAdd(true);
- QHGroupBox* b = new QHGroupBox(i18n("Chat"), this);
+ TQHGroupBox* b = new TQHGroupBox(i18n("Chat"), this);
d->mChat = new KGameChat(0, chatMsgId, b);
}
@@ -595,18 +595,18 @@ public:
mPlayerBox = 0;
}
- QPtrDict<KPlayer> mItem2Player;
+ TQPtrDict<KPlayer> mItem2Player;
KListBox* mPlayerBox;
};
-KGameDialogConnectionConfig::KGameDialogConnectionConfig(QWidget* parent)
+KGameDialogConnectionConfig::KGameDialogConnectionConfig(TQWidget* parent)
: KGameDialogConfig(parent)
{
//TODO: prevent player to ban himself
d = new KGameDialogConnectionConfigPrivate;
- QVBoxLayout* topLayout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
topLayout->setAutoAdd(true);
- QHGroupBox* b = new QHGroupBox(i18n("Connected Players"), this);
+ TQHGroupBox* b = new TQHGroupBox(i18n("Connected Players"), this);
d->mPlayerBox = new KListBox(b);
setMinimumHeight(100);
}
@@ -627,10 +627,10 @@ void KGameDialogConnectionConfig::setKGame(KGame* g)
slotClearPlayers();
if (game()) {
// react to changes in KGame::playerList()
- connect(game(), SIGNAL(signalPlayerJoinedGame(KPlayer*)),
- this, SLOT(slotPlayerJoinedGame(KPlayer*)));
- connect(game(), SIGNAL(signalPlayerLeftGame(KPlayer*)),
- this, SLOT(slotPlayerLeftGame(KPlayer*)));
+ connect(game(), TQT_SIGNAL(signalPlayerJoinedGame(KPlayer*)),
+ this, TQT_SLOT(slotPlayerJoinedGame(KPlayer*)));
+ connect(game(), TQT_SIGNAL(signalPlayerLeftGame(KPlayer*)),
+ this, TQT_SLOT(slotPlayerLeftGame(KPlayer*)));
KGame::KGamePlayerList l = *game()->playerList();
for (KPlayer* p = l.first(); p; p = l.next()) {
@@ -650,21 +650,21 @@ void KGameDialogConnectionConfig::setAdmin(bool a)
return;
}
if (admin()) {
- disconnect(game(), SIGNAL(executed(QListBoxItem*)), this, 0);
+ disconnect(game(), TQT_SIGNAL(executed(TQListBoxItem*)), this, 0);
}
KGameDialogConfig::setAdmin(a);
if (admin()) {
- connect(d->mPlayerBox, SIGNAL(executed(QListBoxItem*)), this,
- SLOT(slotKickPlayerOut(QListBoxItem*)));
+ connect(d->mPlayerBox, TQT_SIGNAL(executed(TQListBoxItem*)), this,
+ TQT_SLOT(slotKickPlayerOut(TQListBoxItem*)));
}
}
-QListBoxItem* KGameDialogConnectionConfig::item(KPlayer* p) const
+TQListBoxItem* KGameDialogConnectionConfig::item(KPlayer* p) const
{
- QPtrDictIterator<KPlayer> it(d->mItem2Player);
+ TQPtrDictIterator<KPlayer> it(d->mItem2Player);
while (it.current()) {
if (it.current() == p) {
- return (QListBoxItem*)it.currentKey();
+ return (TQListBoxItem*)it.currentKey();
}
++it;
}
@@ -673,7 +673,7 @@ QListBoxItem* KGameDialogConnectionConfig::item(KPlayer* p) const
void KGameDialogConnectionConfig::slotClearPlayers()
{
- QPtrDictIterator<KPlayer> it(d->mItem2Player);
+ TQPtrDictIterator<KPlayer> it(d->mItem2Player);
while (it.current()) {
slotPlayerLeftGame(it.current());
++it;
@@ -700,12 +700,12 @@ void KGameDialogConnectionConfig::slotPlayerJoinedGame(KPlayer* p)
return;
}
kdDebug(11001) << k_funcinfo << ": add player " << p->id() << endl;
- QListBoxText* t = new QListBoxText(p->name());
+ TQListBoxText* t = new TQListBoxText(p->name());
d->mItem2Player.insert(t, p);
d->mPlayerBox->insertItem(t);
- connect(p, SIGNAL(signalPropertyChanged(KGamePropertyBase*, KPlayer*)),
- this, SLOT(slotPropertyChanged(KGamePropertyBase*, KPlayer*)));
+ connect(p, TQT_SIGNAL(signalPropertyChanged(KGamePropertyBase*, KPlayer*)),
+ this, TQT_SLOT(slotPropertyChanged(KGamePropertyBase*, KPlayer*)));
}
@@ -722,7 +722,7 @@ void KGameDialogConnectionConfig::slotPlayerLeftGame(KPlayer* p)
}
-void KGameDialogConnectionConfig::slotKickPlayerOut(QListBoxItem* item)
+void KGameDialogConnectionConfig::slotKickPlayerOut(TQListBoxItem* item)
{
kdDebug(11001) << "kick player out" << endl;
KPlayer* p = d->mItem2Player[item];
@@ -744,7 +744,7 @@ void KGameDialogConnectionConfig::slotKickPlayerOut(QListBoxItem* item)
}
if (KMessageBox::questionYesNo(this, i18n("Do you want to ban player \"%1\" from the game?").arg(
- p->name()), QString::null, i18n("Ban Player"), i18n("Do Not Ban")) == KMessageBox::Yes) {
+ p->name()), TQString::null, i18n("Ban Player"), i18n("Do Not Ban")) == KMessageBox::Yes) {
kdDebug(11001) << "will remove player " << p << endl;
game()->removePlayer(p);
// d->mPlayerBox->removeItem(d->mPlayerBox->index(item)); // should be done by signalPlayerLeftGame
@@ -756,15 +756,15 @@ void KGameDialogConnectionConfig::slotKickPlayerOut(QListBoxItem* item)
void KGameDialogConnectionConfig::slotPropertyChanged(KGamePropertyBase* prop, KPlayer* player)
{
if(prop->id() == KGamePropertyBase::IdName) {
- QListBoxText* old = 0;
- QPtrDictIterator<KPlayer> it(d->mItem2Player);
+ TQListBoxText* old = 0;
+ TQPtrDictIterator<KPlayer> it(d->mItem2Player);
while (it.current() && !old) {
if (it.current() == player) {
- old = (QListBoxText*)it.currentKey();
+ old = (TQListBoxText*)it.currentKey();
}
++it;
}
- QListBoxText* t = new QListBoxText(player->name());
+ TQListBoxText* t = new TQListBoxText(player->name());
d->mPlayerBox->changeItem(t, d->mPlayerBox->index(old));
d->mItem2Player.remove(old);
d->mItem2Player.insert(t, player);
diff --git a/libkdegames/kgame/dialogs/kgamedialogconfig.h b/libkdegames/kgame/dialogs/kgamedialogconfig.h
index b7d30b23..e1b592af 100644
--- a/libkdegames/kgame/dialogs/kgamedialogconfig.h
+++ b/libkdegames/kgame/dialogs/kgamedialogconfig.h
@@ -28,7 +28,7 @@
#ifndef __KGAMEDIALOGCONFIG_H__
#define __KGAMEDIALOGCONFIG_H__
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdemacros.h>
class QGridLayout;
@@ -52,7 +52,7 @@ class KDE_EXPORT KGameDialogConfig : public QWidget
{
Q_OBJECT
public:
- KGameDialogConfig(QWidget* parent = 0);
+ KGameDialogConfig(TQWidget* parent = 0);
virtual ~KGameDialogConfig();
/**
@@ -137,7 +137,7 @@ private:
*
* It currently contains a line edit for the name of the player only. You can
* add widgets by using the KGameDialogGeneralConfig as parent parameter as it
- * uses QLayout::autoAdd == true.
+ * uses TQLayout::autoAdd == true.
* @author Andreas Beckermann <b_mann@gmx.de>
**/
class KGameDialogGeneralConfigPrivate;
@@ -151,7 +151,7 @@ public:
*
* If you just want to add more widgets you can just create your widgets
* with the KGameDialogGeneralConfig as parent as it uses
- * QLayout::setAutoAdd(true).
+ * TQLayout::setAutoAdd(true).
*
* @param parent Parent widget for this dialog.
* @param initializeGUI If you really don't want to use the
@@ -160,7 +160,7 @@ public:
* will exist anymore.
*
**/
- KGameDialogGeneralConfig(QWidget* parent = 0, bool initializeGUI = true);
+ KGameDialogGeneralConfig(TQWidget* parent = 0, bool initializeGUI = true);
virtual ~KGameDialogGeneralConfig();
/**
@@ -199,9 +199,9 @@ protected slots:
void slotPropertyChanged(KGamePropertyBase*, KPlayer*);
protected:
- void setPlayerName(const QString& name);
+ void setPlayerName(const TQString& name);
- QString playerName() const;
+ TQString playerName() const;
private:
KGameDialogGeneralConfigPrivate* d;
@@ -212,7 +212,7 @@ class KDE_EXPORT KGameDialogNetworkConfig : public KGameDialogConfig
{
Q_OBJECT
public:
- KGameDialogNetworkConfig(QWidget* parent = 0);
+ KGameDialogNetworkConfig(TQWidget* parent = 0);
virtual ~KGameDialogNetworkConfig();
@@ -238,7 +238,7 @@ public:
* @param port The default port to connect to / listen on
* @param host The default host to connect to
**/
- void setDefaultNetworkInfo(const QString& host, unsigned short int port,bool server=true);
+ void setDefaultNetworkInfo(const TQString& host, unsigned short int port,bool server=true);
/**
* Set service type that will be published or browsed for and game name that will be displayed in
@@ -248,7 +248,7 @@ public:
* @param type Service type (something like _kwin4._tcp). It should be unique for application.
* @since 3.4
**/
- void setDiscoveryInfo(const QString& type, const QString& name=QString::null);
+ void setDiscoveryInfo(const TQString& type, const TQString& name=TQString::null);
signals:
/**
@@ -278,7 +278,7 @@ class KGameDialogMsgServerConfig : public KGameDialogConfig
{
Q_OBJECT
public:
- KGameDialogMsgServerConfig(QWidget* parent = 0);
+ KGameDialogMsgServerConfig(TQWidget* parent = 0);
virtual ~KGameDialogMsgServerConfig();
virtual void submitToKGame(KGame*, KPlayer*) {}
@@ -311,7 +311,7 @@ class KGameDialogChatConfig : public KGameDialogConfig
{
Q_OBJECT
public:
- KGameDialogChatConfig(int chatMsgId, QWidget* parent = 0);
+ KGameDialogChatConfig(int chatMsgId, TQWidget* parent = 0);
virtual ~KGameDialogChatConfig();
virtual void setKGame(KGame* g);
@@ -332,7 +332,7 @@ class KGameDialogConnectionConfig : public KGameDialogConfig
{
Q_OBJECT
public:
- KGameDialogConnectionConfig(QWidget* parent = 0);
+ KGameDialogConnectionConfig(TQWidget* parent = 0);
virtual ~KGameDialogConnectionConfig();
virtual void setKGame(KGame* g);
@@ -344,12 +344,12 @@ public:
protected:
/**
* @param p A player
- * @return The QListBoxItem that belongs to the player @p p
+ * @return The TQListBoxItem that belongs to the player @p p
**/
- QListBoxItem* item(KPlayer* p) const;
+ TQListBoxItem* item(KPlayer* p) const;
protected slots:
- void slotKickPlayerOut(QListBoxItem* item);
+ void slotKickPlayerOut(TQListBoxItem* item);
void slotPropertyChanged(KGamePropertyBase* prop, KPlayer* p);
void slotPlayerLeftGame(KPlayer* p);
void slotPlayerJoinedGame(KPlayer* p);
diff --git a/libkdegames/kgame/dialogs/kgameerrordialog.cpp b/libkdegames/kgame/dialogs/kgameerrordialog.cpp
index 1750892c..7c3b0509 100644
--- a/libkdegames/kgame/dialogs/kgameerrordialog.cpp
+++ b/libkdegames/kgame/dialogs/kgameerrordialog.cpp
@@ -37,7 +37,7 @@ public:
const KGame* mGame;
};
-KGameErrorDialog::KGameErrorDialog(QWidget* parent) : QObject(parent)
+KGameErrorDialog::KGameErrorDialog(TQWidget* parent) : TQObject(parent)
{
d = new KGameErrorDialogPrivate;
}
@@ -52,15 +52,15 @@ void KGameErrorDialog::setKGame(const KGame* g)
slotUnsetKGame();
d->mGame = g;
- connect(d->mGame, SIGNAL(destroyed()), this, SLOT(slotUnsetKGame()));
+ connect(d->mGame, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotUnsetKGame()));
// the error signals:
- connect(d->mGame, SIGNAL(signalNetworkErrorMessage(int, QString)),
- this, SLOT(slotError(int, QString)));
- connect(d->mGame, SIGNAL(signalConnectionBroken()),
- this, SLOT(slotServerConnectionLost()));
- connect(d->mGame, SIGNAL(signalClientDisconnected(Q_UINT32,bool)),
- this, SLOT(slotClientConnectionLost(Q_UINT32,bool)));
+ connect(d->mGame, TQT_SIGNAL(signalNetworkErrorMessage(int, TQString)),
+ this, TQT_SLOT(slotError(int, TQString)));
+ connect(d->mGame, TQT_SIGNAL(signalConnectionBroken()),
+ this, TQT_SLOT(slotServerConnectionLost()));
+ connect(d->mGame, TQT_SIGNAL(signalClientDisconnected(Q_UINT32,bool)),
+ this, TQT_SLOT(slotClientConnectionLost(Q_UINT32,bool)));
}
void KGameErrorDialog::slotUnsetKGame()
@@ -71,51 +71,51 @@ void KGameErrorDialog::slotUnsetKGame()
d->mGame = 0;
}
-void KGameErrorDialog::error(const QString& errorText, QWidget* parent)
+void KGameErrorDialog::error(const TQString& errorText, TQWidget* parent)
{ KMessageBox::error(parent, errorText); }
void KGameErrorDialog::slotServerConnectionLost()
{
// TODO: add IP/port of the server
- QString message = i18n("Connection to the server has been lost!");
- error(message, (QWidget*)parent());
+ TQString message = i18n("Connection to the server has been lost!");
+ error(message, (TQWidget*)parent());
}
void KGameErrorDialog::slotClientConnectionLost(Q_UINT32 /*id*/,bool)
{
//TODO: add IP/port of the client
- QString message;
+ TQString message;
// if (c) {
// message = i18n("Connection to client has been lost!\nID: %1\nIP: %2").arg(c->id()).arg(c->IP());
// } else {
// message = i18n("Connection to client has been lost!");
// }
message = i18n("Connection to client has been lost!");
- error(message, (QWidget*)parent());
+ error(message, (TQWidget*)parent());
}
-void KGameErrorDialog::slotError(int errorNo, QString text)
+void KGameErrorDialog::slotError(int errorNo, TQString text)
{
- QString message = i18n("Received a network error!\nError number: %1\nError message: %2").arg(errorNo).arg(text);
- error(message, (QWidget*)parent());
+ TQString message = i18n("Received a network error!\nError number: %1\nError message: %2").arg(errorNo).arg(text);
+ error(message, (TQWidget*)parent());
}
-void KGameErrorDialog::connectionError(QString s)
+void KGameErrorDialog::connectionError(TQString s)
{
- QString message;
+ TQString message;
if (s.isNull()) {
message = i18n("No connection could be created.");
} else {
message = i18n("No connection could be created.\nThe error message was:\n%1").arg(s);
}
- error(message, (QWidget*)parent());
+ error(message, (TQWidget*)parent());
}
// should become the real dialog - currently we just use messageboxes
// -> maybe unused forever
-KGameErrorMessageDialog::KGameErrorMessageDialog(QWidget* parent)
+KGameErrorMessageDialog::KGameErrorMessageDialog(TQWidget* parent)
: KDialogBase(Plain, i18n("Error"), Ok, Ok, parent, 0, true, true)
{
}
diff --git a/libkdegames/kgame/dialogs/kgameerrordialog.h b/libkdegames/kgame/dialogs/kgameerrordialog.h
index c1dbd1ca..3883399b 100644
--- a/libkdegames/kgame/dialogs/kgameerrordialog.h
+++ b/libkdegames/kgame/dialogs/kgameerrordialog.h
@@ -40,7 +40,7 @@ class KGameErrorDialog : public QObject
{
Q_OBJECT
public:
- KGameErrorDialog(QWidget* parent);
+ KGameErrorDialog(TQWidget* parent);
~KGameErrorDialog();
/**
@@ -55,12 +55,12 @@ public:
* KGame couldn't establish a connection. Use this if
* KGame::initConnection returns false
* @param s A string that describes the error further (like port is
- * already in use). Will be ignored if QString::null
+ * already in use). Will be ignored if TQString::null
**/
- void connectionError(QString s = QString::null);
+ void connectionError(TQString s = TQString::null);
public slots:
- void slotError(int error, QString text);
+ void slotError(int error, TQString text);
/**
* The connection to the @ref KMessageServer has been lost
@@ -87,7 +87,7 @@ public slots:
void slotUnsetKGame();
protected:
- void error(const QString& errorText, QWidget* parent = 0);
+ void error(const TQString& errorText, TQWidget* parent = 0);
private:
KGameErrorDialogPrivate* d;
@@ -104,7 +104,7 @@ class KGameErrorMessageDialog : public KDialogBase
{
Q_OBJECT
public:
- KGameErrorMessageDialog(QWidget* parent);
+ KGameErrorMessageDialog(TQWidget* parent);
~KGameErrorMessageDialog();
private: