summaryrefslogtreecommitdiffstats
path: root/libksirtet
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
commit838baf3f99ec5ab81b063eb5449a3381d860f377 (patch)
treedd31abcfde08ca92e4623b8f50b3d762a87c997a /libksirtet
parent2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff)
downloadtdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.tar.gz
tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.zip
TQt4 port kdegames
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1236074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libksirtet')
-rw-r--r--libksirtet/base/board.cpp12
-rw-r--r--libksirtet/base/board.h10
-rw-r--r--libksirtet/base/factory.h4
-rw-r--r--libksirtet/base/field.cpp30
-rw-r--r--libksirtet/base/field.h4
-rw-r--r--libksirtet/base/gtetris.h2
-rw-r--r--libksirtet/base/inter.cpp8
-rw-r--r--libksirtet/base/inter.h4
-rw-r--r--libksirtet/base/kzoommainwindow.cpp10
-rw-r--r--libksirtet/base/kzoommainwindow.h3
-rw-r--r--libksirtet/base/main.cpp16
-rw-r--r--libksirtet/base/main.h1
-rw-r--r--libksirtet/base/piece.h2
-rw-r--r--libksirtet/base/settings.h6
-rw-r--r--libksirtet/common/ai.cpp6
-rw-r--r--libksirtet/common/ai.h6
-rw-r--r--libksirtet/common/board.cpp4
-rw-r--r--libksirtet/common/board.h3
-rw-r--r--libksirtet/common/factory.h2
-rw-r--r--libksirtet/common/field.cpp8
-rw-r--r--libksirtet/common/field.h3
-rw-r--r--libksirtet/common/highscores.cpp10
-rw-r--r--libksirtet/common/inter.cpp10
-rw-r--r--libksirtet/common/inter.h5
-rw-r--r--libksirtet/common/main.cpp12
-rw-r--r--libksirtet/common/main.h1
-rw-r--r--libksirtet/common/misc_ui.cpp46
-rw-r--r--libksirtet/common/misc_ui.h22
-rw-r--r--libksirtet/common/settings.h4
-rw-r--r--libksirtet/common/types.h6
-rw-r--r--libksirtet/lib/defines.cpp10
-rw-r--r--libksirtet/lib/defines.h4
-rw-r--r--libksirtet/lib/internal.cpp2
-rw-r--r--libksirtet/lib/internal.h4
-rw-r--r--libksirtet/lib/keys.cpp14
-rw-r--r--libksirtet/lib/keys.h7
-rw-r--r--libksirtet/lib/meeting.cpp34
-rw-r--r--libksirtet/lib/meeting.h11
-rw-r--r--libksirtet/lib/miscui.cpp8
-rw-r--r--libksirtet/lib/miscui.h10
-rw-r--r--libksirtet/lib/mp_board.h7
-rw-r--r--libksirtet/lib/mp_interface.cpp20
-rw-r--r--libksirtet/lib/mp_interface.h5
-rw-r--r--libksirtet/lib/mp_option.h9
-rw-r--r--libksirtet/lib/mp_simple_board.h5
-rw-r--r--libksirtet/lib/mp_simple_interface.cpp6
-rw-r--r--libksirtet/lib/mp_simple_interface.h3
-rw-r--r--libksirtet/lib/mp_simple_types.cpp4
-rw-r--r--libksirtet/lib/pline.cpp28
-rw-r--r--libksirtet/lib/pline.h21
-rw-r--r--libksirtet/lib/smanager.cpp6
-rw-r--r--libksirtet/lib/smanager.h2
-rw-r--r--libksirtet/lib/socket.cpp4
-rw-r--r--libksirtet/lib/socket.h2
-rw-r--r--libksirtet/lib/types.cpp51
-rw-r--r--libksirtet/lib/types.h6
-rw-r--r--libksirtet/lib/wizard.cpp26
-rw-r--r--libksirtet/lib/wizard.h3
58 files changed, 305 insertions, 267 deletions
diff --git a/libksirtet/base/board.cpp b/libksirtet/base/board.cpp
index 12193e31..0a6d37f1 100644
--- a/libksirtet/base/board.cpp
+++ b/libksirtet/base/board.cpp
@@ -12,11 +12,11 @@
using namespace KGrid2D;
//-----------------------------------------------------------------------------
-FixedCanvasView::FixedCanvasView(TQWidget *parent, const char *name)
- : TQCanvasView(parent, name, WNoAutoErase)
+FixedCanvasView::FixedCanvasView(TQWidget *tqparent, const char *name)
+ : TQCanvasView(tqparent, name, WNoAutoErase)
{}
-TQSize FixedCanvasView::sizeHint() const
+TQSize FixedCanvasView::tqsizeHint() const
{
if ( canvas()==0 ) return TQSize();
return canvas()->size() + 2 * TQSize(frameWidth(), frameWidth());
@@ -24,7 +24,7 @@ TQSize FixedCanvasView::sizeHint() const
void FixedCanvasView::adjustSize()
{
- setFixedSize(sizeHint());
+ setFixedSize(tqsizeHint());
}
//-----------------------------------------------------------------------------
@@ -35,8 +35,8 @@ const BaseBoard::DirectionData BaseBoard::DIRECTION_DATA[Nb_Direction] = {
{ SquareBase::Up, Down }
};
-BaseBoard::BaseBoard(bool graphic, TQWidget *parent)
-: FixedCanvasView(parent, "board"),
+BaseBoard::BaseBoard(bool graphic, TQWidget *tqparent)
+: FixedCanvasView(tqparent, "board"),
GenericTetris(bfactory->bbi.width, bfactory->bbi.height,
bfactory->bbi.withPieces, graphic),
state(GameOver), timer(this), sequences(0), main(0), _next(0),
diff --git a/libksirtet/base/board.h b/libksirtet/base/board.h
index 7be2a4ec..e65206f8 100644
--- a/libksirtet/base/board.h
+++ b/libksirtet/base/board.h
@@ -12,13 +12,14 @@ class SequenceArray;
class BlockInfo;
//-----------------------------------------------------------------------------
-class KDE_EXPORT FixedCanvasView : public QCanvasView
+class KDE_EXPORT FixedCanvasView : public TQCanvasView
{
Q_OBJECT
+ TQ_OBJECT
public:
- FixedCanvasView(TQWidget *parent = 0, const char *name = 0);
+ FixedCanvasView(TQWidget *tqparent = 0, const char *name = 0);
- virtual TQSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
public slots:
virtual void adjustSize();
@@ -28,6 +29,7 @@ public slots:
class KDE_EXPORT BaseBoard : public FixedCanvasView, public GenericTetris
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Direction { Left = 1, Right = 2, Up = 4, Down = 8, Nb_Direction = 4 };
private:
@@ -38,7 +40,7 @@ class KDE_EXPORT BaseBoard : public FixedCanvasView, public GenericTetris
static const DirectionData DIRECTION_DATA[Nb_Direction];
public:
- BaseBoard(bool graphic, TQWidget *parent);
+ BaseBoard(bool graphic, TQWidget *tqparent);
virtual ~BaseBoard();
void copy(const GenericTetris &);
diff --git a/libksirtet/base/factory.h b/libksirtet/base/factory.h
index b772adb7..7df5574d 100644
--- a/libksirtet/base/factory.h
+++ b/libksirtet/base/factory.h
@@ -43,8 +43,8 @@ class KDE_EXPORT BaseFactory
const MainData &mainData;
const BaseBoardInfo &bbi;
- virtual BaseBoard *createBoard(bool graphic, TQWidget *parent) = 0;
- virtual BaseInterface *createInterface(TQWidget *parent) = 0;
+ virtual BaseBoard *createBoard(bool graphic, TQWidget *tqparent) = 0;
+ virtual BaseInterface *createInterface(TQWidget *tqparent) = 0;
virtual TQWidget *createAppearanceConfig();
virtual TQWidget *createColorConfig();
diff --git a/libksirtet/base/field.cpp b/libksirtet/base/field.cpp
index fae20266..6e35faf5 100644
--- a/libksirtet/base/field.cpp
+++ b/libksirtet/base/field.cpp
@@ -41,9 +41,9 @@ void BaseField::init(bool AI, bool multiplayer, bool server, bool first,
_flags.multiplayer = multiplayer;
_flags.server = server;
_flags.first = first;
- TQString text = (AI ? i18n("%1\n(AI player)").arg(name)
- : (multiplayer ? i18n("%1\n(Human player)").arg(name)
- : TQString::null));
+ TQString text = (AI ? i18n("%1\n(AI player)").tqarg(name)
+ : (multiplayer ? i18n("%1\n(Human player)").tqarg(name)
+ : TQString()));
if ( first && !server ) text += i18n("\nWaiting for server");
setMessage(text, (first && server ? StartButton : NoButton));
showScore->resetColor();
@@ -79,11 +79,11 @@ void BaseField::setMessage(const TQString &label, ButtonType type)
_boardLayout->addStretch(3);
if ( !label.isEmpty() ) {
TQString str = (isArcade() ? i18n("Arcade game") + '\n'
- : TQString::null) + label;
+ : TQString()) + label;
_label = new TQLabel(str, board);
- _label->setAlignment(Qt::AlignCenter);
+ _label->tqsetAlignment(TQt::AlignCenter);
_label->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
- _boardLayout->addWidget(_label, 0, Qt::AlignCenter);
+ _boardLayout->addWidget(_label, 0, TQt::AlignCenter);
_label->show();
}
_boardLayout->addStretch(1);
@@ -93,8 +93,8 @@ void BaseField::setMessage(const TQString &label, ButtonType type)
const char *slot = (type==ResumeButton ? TQT_SLOT(pause())
: TQT_SLOT(start()));
_button->connect(_button, TQT_SIGNAL(clicked()),
- _widget->parent(), slot);
- _boardLayout->addWidget(_button, 0, Qt::AlignCenter);
+ _widget->tqparent(), slot);
+ _boardLayout->addWidget(_button, 0, TQt::AlignCenter);
_button->show();
}
_boardLayout->addStretch(3);
@@ -123,22 +123,22 @@ void BaseField::stop(bool gameover)
{
board->stop();
ButtonType button = StartButton;
- TQString msg = (gameover ? i18n("Game over") : TQString::null);
+ TQString msg = (gameover ? i18n("Game over") : TQString());
if ( board->isArcade() && board->arcadeStageDone() ) {
if ( board->arcadeStage()==bfactory->bbi.nbArcadeStages )
msg = i18n("The End");
else {
- msg = i18n("Stage #%1 done").arg(board->arcadeStage());
+ msg = i18n("Stage #%1 done").tqarg(board->arcadeStage());
button = ProceedButton;
}
}
setMessage(msg, button);
}
-void BaseField::gameOver(const KExtHighscore::Score &score, TQWidget *parent)
+void BaseField::gameOver(const KExtHighscore::Score &score, TQWidget *tqparent)
{
- KNotifyClient::event(parent->winId(), "game over", i18n("Game Over"));
- KExtHighscore::submitScore(score, parent);
+ KNotifyClient::event(tqparent->winId(), "game over", i18n("Game Over"));
+ KExtHighscore::submitScore(score, tqparent);
}
void BaseField::scoreUpdated()
@@ -147,8 +147,8 @@ void BaseField::scoreUpdated()
if (_flags.multiplayer) return;
TQColor color;
- if ( _firstScore<currentScore() ) color = Qt::red;
- else if ( _lastScore<currentScore() ) color = Qt::blue;
+ if ( _firstScore<currentScore() ) color = TQt::red;
+ else if ( _lastScore<currentScore() ) color = TQt::blue;
showScore->setColor(color);
}
diff --git a/libksirtet/base/field.h b/libksirtet/base/field.h
index e9366f4c..a60173bb 100644
--- a/libksirtet/base/field.h
+++ b/libksirtet/base/field.h
@@ -22,7 +22,7 @@ class KDE_EXPORT BaseField
virtual ~BaseField() {}
virtual KExtHighscore::Score currentScore() const = 0;
- static void gameOver(const KExtHighscore::Score &, TQWidget *parent);
+ static void gameOver(const KExtHighscore::Score &, TQWidget *tqparent);
virtual void setArcade();
bool isArcade() const;
@@ -60,7 +60,7 @@ class KDE_EXPORT BaseField
bool hasButton() const { return _flags.server && _flags.first; }
void setMessage(const TQString &label, ButtonType);
- void hideMessage() { setMessage(TQString::null, NB_BUTTON_TYPE); }
+ void hideMessage() { setMessage(TQString(), NB_BUTTON_TYPE); }
};
#endif
diff --git a/libksirtet/base/gtetris.h b/libksirtet/base/gtetris.h
index b0f990b9..1546741d 100644
--- a/libksirtet/base/gtetris.h
+++ b/libksirtet/base/gtetris.h
@@ -81,7 +81,7 @@
**
** Do whatever you want with this code (i.e. the files gtetris.h,
** gtetris.cpp, tpiece.h and tpiece.cpp). It is basically a weekend hack
-** and it would bring joy to my heart if anyone in any way would find
+** and it would bring joy to my heart if anyone in any way would tqfind
** it useful.
**
** Nostalgia, comments and/or praise can be sent to: [email protected]
diff --git a/libksirtet/base/inter.cpp b/libksirtet/base/inter.cpp
index 658e7c47..c573ef78 100644
--- a/libksirtet/base/inter.cpp
+++ b/libksirtet/base/inter.cpp
@@ -3,13 +3,13 @@
#include <kexthighscore.h>
-void BaseInterface::showHighscores(TQWidget *parent)
+void BaseInterface::showHighscores(TQWidget *tqparent)
{
if ( !_isPaused() ) _pause();
- _showHighscores(parent);
+ _showHighscores(tqparent);
}
-void BaseInterface::_showHighscores(TQWidget *parent)
+void BaseInterface::_showHighscores(TQWidget *tqparent)
{
- KExtHighscore::show(parent);
+ KExtHighscore::show(tqparent);
}
diff --git a/libksirtet/base/inter.h b/libksirtet/base/inter.h
index 3bf394db..21c81db0 100644
--- a/libksirtet/base/inter.h
+++ b/libksirtet/base/inter.h
@@ -14,10 +14,10 @@ public:
virtual void _pause() = 0;
virtual bool _isPaused() const = 0;
- void showHighscores(TQWidget *parent);
+ void showHighscores(TQWidget *tqparent);
protected:
- virtual void _showHighscores(TQWidget *parent);
+ virtual void _showHighscores(TQWidget *tqparent);
};
#endif
diff --git a/libksirtet/base/kzoommainwindow.cpp b/libksirtet/base/kzoommainwindow.cpp
index 4e1b85a5..1d0f5319 100644
--- a/libksirtet/base/kzoommainwindow.cpp
+++ b/libksirtet/base/kzoommainwindow.cpp
@@ -30,11 +30,11 @@ KZoomMainWindow::KZoomMainWindow(uint min, uint max, uint step, const char *name
{
installEventFilter(this);
- _zoomInAction = KStdAction::zoomIn(this, TQT_SLOT(zoomIn()), actionCollection());
+ _zoomInAction = KStdAction::zoomIn(TQT_TQOBJECT(this), TQT_SLOT(zoomIn()), actionCollection());
_zoomOutAction =
- KStdAction::zoomOut(this, TQT_SLOT(zoomOut()), actionCollection());
+ KStdAction::zoomOut(TQT_TQOBJECT(this), TQT_SLOT(zoomOut()), actionCollection());
_menu =
- KStdAction::showMenubar(this, TQT_SLOT(toggleMenubar()), actionCollection());
+ KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(toggleMenubar()), actionCollection());
}
void KZoomMainWindow::init(const char *popupName)
@@ -58,7 +58,7 @@ void KZoomMainWindow::init(const char *popupName)
void KZoomMainWindow::addWidget(TQWidget *widget)
{
widget->adjustSize();
- TQWidget *tlw = widget->topLevelWidget();
+ TQWidget *tlw = widget->tqtopLevelWidget();
KZoomMainWindow *zm =
static_cast<KZoomMainWindow *>(tlw->qt_cast("KZoomMainWindow"));
Q_ASSERT(zm);
@@ -74,7 +74,7 @@ void KZoomMainWindow::widgetDestroyed()
bool KZoomMainWindow::eventFilter(TQObject *o, TQEvent *e)
{
if ( e->type()==TQEvent::LayoutHint )
- setFixedSize(minimumSize()); // because K/QMainWindow
+ setFixedSize(tqminimumSize()); // because K/TQMainWindow
// does not manage fixed central widget
// with hidden menubar...
return KMainWindow::eventFilter(o, e);
diff --git a/libksirtet/base/kzoommainwindow.h b/libksirtet/base/kzoommainwindow.h
index fd213fd7..18e85ddb 100644
--- a/libksirtet/base/kzoommainwindow.h
+++ b/libksirtet/base/kzoommainwindow.h
@@ -44,6 +44,7 @@ class KToggleAction;
class KDE_EXPORT KZoomMainWindow : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor. */
KZoomMainWindow(uint minZoom, uint maxZoom, uint zoomStep,
@@ -51,7 +52,7 @@ public:
/** Add a widget to be managed i.e. the adjustSize() method of the
* widget is called whenever the zoom is changed.
- * This function assumes that the topLevelWidget() is the KZoomMainWindow.
+ * This function assumes that the tqtopLevelWidget() is the KZoomMainWindow.
*/
static void addWidget(TQWidget *widget);
diff --git a/libksirtet/base/main.cpp b/libksirtet/base/main.cpp
index e09a9c50..cbfc433a 100644
--- a/libksirtet/base/main.cpp
+++ b/libksirtet/base/main.cpp
@@ -24,20 +24,20 @@ BaseMainWindow::BaseMainWindow()
KNotifyClient::startDaemon();
// File & Popup
- KStdGameAction::gameNew(this, TQT_SLOT(start()), actionCollection());
- _pause = KStdGameAction::pause(this, TQT_SLOT(pause()), actionCollection());
+ KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(start()), actionCollection());
+ _pause = KStdGameAction::pause(TQT_TQOBJECT(this), TQT_SLOT(pause()), actionCollection());
_pause->setEnabled(false);
- KStdGameAction::highscores(this, TQT_SLOT(showHighscores()),
+ KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(showHighscores()),
actionCollection());
- KStdGameAction::quit(qApp, TQT_SLOT(quit()), actionCollection());
+ KStdGameAction::quit(TQT_TQOBJECT(tqApp), TQT_SLOT(quit()), actionCollection());
// Settings
- KStdAction::preferences(this, TQT_SLOT(configureSettings()),
+ KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(configureSettings()),
actionCollection());
- KStdAction::keyBindings(this, TQT_SLOT(configureKeys()), actionCollection());
- KStdAction::configureNotifications(this, TQT_SLOT(configureNotifications()),
+ KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(configureKeys()), actionCollection());
+ KStdAction::configureNotifications(TQT_TQOBJECT(this), TQT_SLOT(configureNotifications()),
actionCollection());
- KStdGameAction::configureHighscores(this, TQT_SLOT(configureHighscores()),
+ KStdGameAction::configureHighscores(TQT_TQOBJECT(this), TQT_SLOT(configureHighscores()),
actionCollection());
_inter = bfactory->createInterface(this);
diff --git a/libksirtet/base/main.h b/libksirtet/base/main.h
index cd165963..153f38ce 100644
--- a/libksirtet/base/main.h
+++ b/libksirtet/base/main.h
@@ -13,6 +13,7 @@ class KConfigDialog;
class KDE_EXPORT BaseMainWindow : public KZoomMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
BaseMainWindow();
virtual ~BaseMainWindow();
diff --git a/libksirtet/base/piece.h b/libksirtet/base/piece.h
index 6cdd667c..accbf1ee 100644
--- a/libksirtet/base/piece.h
+++ b/libksirtet/base/piece.h
@@ -69,7 +69,7 @@ class SequenceArray : public TQMemArray<TQCanvasPixmapArray *>
};
//-----------------------------------------------------------------------------
-class BlockInfo : public QCanvas
+class BlockInfo : public TQCanvas
{
public:
BlockInfo(const SequenceArray &);
diff --git a/libksirtet/base/settings.h b/libksirtet/base/settings.h
index d32415c6..75f89404 100644
--- a/libksirtet/base/settings.h
+++ b/libksirtet/base/settings.h
@@ -8,9 +8,10 @@ class TQGridLayout;
//-----------------------------------------------------------------------------
-class BaseAppearanceConfig : public QWidget
+class BaseAppearanceConfig : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
BaseAppearanceConfig();
@@ -20,9 +21,10 @@ protected:
};
//-----------------------------------------------------------------------------
-class ColorConfig : public QWidget
+class ColorConfig : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
ColorConfig();
diff --git a/libksirtet/common/ai.cpp b/libksirtet/common/ai.cpp
index 78f9d5af..3960291e 100644
--- a/libksirtet/common/ai.cpp
+++ b/libksirtet/common/ai.cpp
@@ -222,7 +222,7 @@ double AI::points() const
for (uint i=0; i<_elements.size(); i++) {
if ( _elements[i].coefficient==0.0 ) continue;
double v = _elements[i].data->function(*main, *board);
- if ( _elements[i].data->triggered && qRound(v)<_elements[i].trigger )
+ if ( _elements[i].data->triggered && tqRound(v)<_elements[i].trigger )
continue;
pts += _elements[i].coefficient * v;
}
@@ -343,14 +343,14 @@ TQCString AIConfig::coefficientKey(const char *name)
double AIConfig::coefficient(const AI::Data &data)
{
- KConfigSkeletonItem *item = CommonPrefs::self()->findItem( TQString("Coefficient_%1").arg(data.name) );
+ KConfigSkeletonItem *item = CommonPrefs::self()->findItem( TQString("Coefficient_%1").tqarg(data.name) );
assert(item);
return item->property().toDouble();
}
int AIConfig::trigger(const AI::Data &data)
{
- KConfigSkeletonItem *item = CommonPrefs::self()->findItem( TQString("Trigger_%1").arg(data.name) );
+ KConfigSkeletonItem *item = CommonPrefs::self()->findItem( TQString("Trigger_%1").tqarg(data.name) );
assert(item);
return item->property().toInt();
}
diff --git a/libksirtet/common/ai.h b/libksirtet/common/ai.h
index b25a1d90..2211cd3d 100644
--- a/libksirtet/common/ai.h
+++ b/libksirtet/common/ai.h
@@ -38,9 +38,10 @@ class LIBKSIRTET_EXPORT AIPiece
};
//-----------------------------------------------------------------------------
-class LIBKSIRTET_EXPORT AI : public QObject
+class LIBKSIRTET_EXPORT AI : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
struct Data {
const char *name, *label, *whatsthis;
@@ -103,9 +104,10 @@ class LIBKSIRTET_EXPORT AI : public QObject
};
//-----------------------------------------------------------------------------
-class LIBKSIRTET_EXPORT AIConfig : public QWidget
+class LIBKSIRTET_EXPORT AIConfig : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
AIConfig(const TQValueVector<AI::Element> &elements);
diff --git a/libksirtet/common/board.cpp b/libksirtet/common/board.cpp
index 7a0802ad..93851b87 100644
--- a/libksirtet/common/board.cpp
+++ b/libksirtet/common/board.cpp
@@ -11,8 +11,8 @@
#include "commonprefs.h"
-Board::Board(bool graphic, GiftPool *gp, TQWidget *parent)
- : BaseBoard(graphic, parent),
+Board::Board(bool graphic, GiftPool *gp, TQWidget *tqparent)
+ : BaseBoard(graphic, tqparent),
_giftPool(gp), aiEngine(0)
{}
diff --git a/libksirtet/common/board.h b/libksirtet/common/board.h
index 7b9f0b3a..5f38df9e 100644
--- a/libksirtet/common/board.h
+++ b/libksirtet/common/board.h
@@ -11,8 +11,9 @@ class AI;
class LIBKSIRTET_EXPORT Board : public BaseBoard
{
Q_OBJECT
+ TQ_OBJECT
public:
- Board(bool graphic, GiftPool *, TQWidget *parent);
+ Board(bool graphic, GiftPool *, TQWidget *tqparent);
virtual ~Board();
void setType(bool computer);
diff --git a/libksirtet/common/factory.h b/libksirtet/common/factory.h
index 2d02dcb2..5cd0cdbf 100644
--- a/libksirtet/common/factory.h
+++ b/libksirtet/common/factory.h
@@ -25,7 +25,7 @@ class LIBKSIRTET_EXPORT CommonFactory : public BaseFactory
const CommonBoardInfo &cbi;
- virtual BaseField *createField(TQWidget *parent) = 0;
+ virtual BaseField *createField(TQWidget *tqparent) = 0;
virtual AI *createAI() = 0;
TQWidget *createAIConfig();
diff --git a/libksirtet/common/field.cpp b/libksirtet/common/field.cpp
index 4c00ba4e..ea6a3ffc 100644
--- a/libksirtet/common/field.cpp
+++ b/libksirtet/common/field.cpp
@@ -19,8 +19,8 @@
#include "commonprefs.h"
-Field::Field(TQWidget *parent)
-: MPSimpleBoard(parent), BaseField(this)
+Field::Field(TQWidget *tqparent)
+: MPSimpleBoard(tqparent), BaseField(this)
{
// column 1
// score LCD
@@ -39,7 +39,7 @@ Field::Field(TQWidget *parent)
// level progress
levelLabel = new TQLabel(this);
- levelLabel->setAlignment(AlignCenter);
+ levelLabel->tqsetAlignment(AlignCenter);
lcds->addWidget(levelLabel, 5, 0);
toLevel = new KProgress(this);
toLevel->setTextEnabled(true);
@@ -77,7 +77,7 @@ Field::Field(TQWidget *parent)
vbl->addStretch(1);
labShowNext = new TQLabel(i18n("Next Tile"), this);
- labShowNext->setAlignment(AlignCenter);
+ labShowNext->tqsetAlignment(AlignCenter);
vbl->addWidget(labShowNext, 0);
showNext = new ShowNextPiece(board, this);
_snRootPixmap = new KCanvasRootPixmap(showNext);
diff --git a/libksirtet/common/field.h b/libksirtet/common/field.h
index ce0168e6..69d11bfb 100644
--- a/libksirtet/common/field.h
+++ b/libksirtet/common/field.h
@@ -18,8 +18,9 @@ class KGameLCDClock;
class LIBKSIRTET_EXPORT Field : public MPSimpleBoard, public BaseField
{
Q_OBJECT
+ TQ_OBJECT
public:
- Field(TQWidget *parent);
+ Field(TQWidget *tqparent);
public slots:
void moveLeft();
diff --git a/libksirtet/common/highscores.cpp b/libksirtet/common/highscores.cpp
index 459b35af..fb1642c0 100644
--- a/libksirtet/common/highscores.cpp
+++ b/libksirtet/common/highscores.cpp
@@ -11,10 +11,10 @@ using namespace KExtHighscore;
CommonHighscores::CommonHighscores()
{
- Item *item = new Item((uint)1, i18n("Level"), Qt::AlignRight);
+ Item *item = new Item((uint)1, i18n("Level"), TQt::AlignRight);
addScoreItem("level", item);
item = new Item((uint)0, i18n(bfactory->mainData.removedLabel),
- Qt::AlignRight);
+ TQt::AlignRight);
addScoreItem("removed", item);
}
@@ -23,13 +23,13 @@ void CommonHighscores::convertLegacy(uint)
KConfigGroupSaver cg(kapp->config(), "High Scores");
for (uint i=0; i<10; i++) {
TQString name
- = cg.config()->readEntry(TQString("name%1").arg(i), TQString::null);
+ = cg.config()->readEntry(TQString("name%1").tqarg(i), TQString());
if ( name.isNull() ) break;
if ( name.isEmpty() ) name = i18n("anonymous");
uint score
- = cg.config()->readUnsignedNumEntry(TQString("score%1").arg(i), 0);
+ = cg.config()->readUnsignedNumEntry(TQString("score%1").tqarg(i), 0);
uint level
- = cg.config()->readUnsignedNumEntry(TQString("level%1").arg(i), 1);
+ = cg.config()->readUnsignedNumEntry(TQString("level%1").tqarg(i), 1);
Score s(Won);
s.setScore(score);
s.setData("name", name);
diff --git a/libksirtet/common/inter.cpp b/libksirtet/common/inter.cpp
index c5630108..e81f7347 100644
--- a/libksirtet/common/inter.cpp
+++ b/libksirtet/common/inter.cpp
@@ -33,8 +33,8 @@ const int Interface::KEYCODE_TWO[Nb_Actions] = {
Key_F, Key_G, Key_D, Key_Space, Key_E, Key_C, SHIFT+Key_F, SHIFT+Key_G
};
-Interface::Interface(const MPGameInfo &gi, TQWidget *parent)
- : MPSimpleInterface(gi, Nb_Actions, ACTION_DATA, parent)
+Interface::Interface(const MPGameInfo &gi, TQWidget *tqparent)
+ : MPSimpleInterface(gi, Nb_Actions, ACTION_DATA, tqparent)
{
setDefaultKeycodes(1, 0, KEYCODE_ONE);
setDefaultKeycodes(2, 0, KEYCODE_TWO);
@@ -91,10 +91,10 @@ void Interface::_sendPlayData()
}
}
-void Interface::_showHighscores(TQWidget *parent)
+void Interface::_showHighscores(TQWidget *tqparent)
{
- if ( !server() || nbPlayers()!=1 ) _scores.show(parent);
- else BaseInterface::_showHighscores(parent);
+ if ( !server() || nbPlayers()!=1 ) _scores.show(tqparent);
+ else BaseInterface::_showHighscores(tqparent);
}
void Interface::_showGameOverData()
diff --git a/libksirtet/common/inter.h b/libksirtet/common/inter.h
index 02041afa..fb8a8349 100644
--- a/libksirtet/common/inter.h
+++ b/libksirtet/common/inter.h
@@ -15,8 +15,9 @@ class Field;
class LIBKSIRTET_EXPORT Interface : public MPSimpleInterface, public BaseInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
- Interface(const MPGameInfo &, TQWidget *parent);
+ Interface(const MPGameInfo &, TQWidget *tqparent);
signals:
void settingsChanged();
@@ -27,7 +28,7 @@ public slots:
void settingsChangedSlot() { emit settingsChanged(); }
protected:
- void _showHighscores(TQWidget *parent);
+ void _showHighscores(TQWidget *tqparent);
private:
TQMemArray<ClientPlayData> _data;
diff --git a/libksirtet/common/main.cpp b/libksirtet/common/main.cpp
index e7674846..8856a726 100644
--- a/libksirtet/common/main.cpp
+++ b/libksirtet/common/main.cpp
@@ -20,22 +20,22 @@ void MainWindow::init()
{
Interface *inter = static_cast<Interface *>(_inter);
inter->normalGame();
- setFocusPolicy(StrongFocus);
+ setFocusPolicy(TQ_StrongFocus);
// Modes
bool ama = ( bfactory->bbi.nbArcadeStages!=0 );
TQString s = (ama ? i18n("&Single Human (Normal)") : i18n("&Single Human"));
- (void)new KAction(s, 0, inter, TQT_SLOT(normalGame()),
+ (void)new KAction(s, 0, TQT_TQOBJECT(inter), TQT_SLOT(normalGame()),
actionCollection(), "mp_single_human");
if (ama) (void)new KAction(i18n("&Single Human (Arcade)"), 0,
- inter, TQT_SLOT(arcadeGame()),
+ TQT_TQOBJECT(inter), TQT_SLOT(arcadeGame()),
actionCollection(), "mp_arcade");
- (void)new KAction(i18n("Human vs &Human"), 0, inter, TQT_SLOT(humanVsHuman()),
+ (void)new KAction(i18n("Human vs &Human"), 0, TQT_TQOBJECT(inter), TQT_SLOT(humanVsHuman()),
actionCollection(), "mp_human_vs_human");
(void)new KAction(i18n("Human vs &Computer"), 0,
- inter, TQT_SLOT(humanVsComputer()),
+ TQT_TQOBJECT(inter), TQT_SLOT(humanVsComputer()),
actionCollection(), "mp_human_vs_computer");
- (void)new KAction(i18n("&More..."), 0, inter, TQT_SLOT(dialog()),
+ (void)new KAction(i18n("&More..."), 0, TQT_TQOBJECT(inter), TQT_SLOT(dialog()),
actionCollection(), "mp_more");
buildGUI(inter);
diff --git a/libksirtet/common/main.h b/libksirtet/common/main.h
index a98fc6f1..a1534a95 100644
--- a/libksirtet/common/main.h
+++ b/libksirtet/common/main.h
@@ -8,6 +8,7 @@
class LIBKSIRTET_EXPORT MainWindow : public BaseMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
MainWindow() {}
diff --git a/libksirtet/common/misc_ui.cpp b/libksirtet/common/misc_ui.cpp
index cf802e25..6e9cffec 100644
--- a/libksirtet/common/misc_ui.cpp
+++ b/libksirtet/common/misc_ui.cpp
@@ -24,8 +24,8 @@ const uint LED_HEIGHT = 15;
const uint LED_SPACING = 5;
/*****************************************************************************/
-ShowNextPiece::ShowNextPiece(BaseBoard *board, TQWidget *parent)
- : FixedCanvasView(parent, "show_next_piece")
+ShowNextPiece::ShowNextPiece(BaseBoard *board, TQWidget *tqparent)
+ : FixedCanvasView(tqparent, "show_next_piece")
{
setCanvas(board->next());
setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
@@ -33,15 +33,15 @@ ShowNextPiece::ShowNextPiece(BaseBoard *board, TQWidget *parent)
}
/*****************************************************************************/
-Shadow::Shadow(BaseBoard *board, TQWidget *parent)
- : TQWidget(parent, "shadow"), _xOffset(board->frameWidth()),
+Shadow::Shadow(BaseBoard *board, TQWidget *tqparent)
+ : TQWidget(tqparent, "shadow"), _xOffset(board->frameWidth()),
_board(board), _show(false)
{
KZoomMainWindow::addWidget(this);
connect(board, TQT_SIGNAL(updatePieceConfigSignal()), TQT_SLOT(update()));
}
-TQSize Shadow::sizeHint() const
+TQSize Shadow::tqsizeHint() const
{
return TQSize(_xOffset + _board->matrix().width() * BasePrefs::blockSize(),
SHADOW_HEIGHT);
@@ -78,19 +78,19 @@ void Shadow::paintEvent(TQPaintEvent *)
/*****************************************************************************/
-class Led : public QWidget
+class Led : public TQWidget
{
public:
- Led(const TQColor &c, TQWidget *parent)
- : TQWidget(parent), col(c), _on(FALSE) {}
+ Led(const TQColor &c, TQWidget *tqparent)
+ : TQWidget(tqparent), col(c), _on(FALSE) {}
TQSizePolicy sizePolicy() const
{ return TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); }
- TQSize sizeHint() const { return TQSize(LED_WIDTH, LED_HEIGHT); }
+ TQSize tqsizeHint() const { return TQSize(LED_WIDTH, LED_HEIGHT); }
- void on() { if (!_on) { _on = TRUE; repaint(); } }
- void off() { if (_on) {_on = FALSE; repaint(); } }
- void setColor(const TQColor &c) { if (c!=col) { col = c; repaint(); } }
+ void on() { if (!_on) { _on = TRUE; tqrepaint(); } }
+ void off() { if (_on) {_on = FALSE; tqrepaint(); } }
+ void setColor(const TQColor &c) { if (c!=col) { col = c; tqrepaint(); } }
protected:
void paintEvent(TQPaintEvent *) {
@@ -105,8 +105,8 @@ class Led : public QWidget
bool _on;
};
-GiftPool::GiftPool(TQWidget *parent)
- : TQHBox(parent, "gift_pool"), nb(0), ready(false)
+GiftPool::GiftPool(TQWidget *tqparent)
+ : TQHBox(tqparent, "gift_pool"), nb(0), ready(false)
{
setSpacing(LED_SPACING);
leds.resize(cfactory->cbi.nbGiftLeds);
@@ -114,9 +114,9 @@ GiftPool::GiftPool(TQWidget *parent)
leds.insert(i, new Led(yellow, this));
}
-TQSize GiftPool::sizeHint() const
+TQSize GiftPool::tqsizeHint() const
{
- TQSize s = (leds.size() ? leds[0]->sizeHint() : TQSize());
+ TQSize s = (leds.size() ? leds[0]->tqsizeHint() : TQSize());
return TQSize((s.width()+LED_SPACING)*leds.size()-LED_SPACING, s.height());
}
@@ -131,9 +131,9 @@ void GiftPool::put(uint n)
if ( nb==0 && !ready )
TQTimer::singleShot(cfactory->cbi.giftPoolTimeout,
this, TQT_SLOT(timeout()));
- uint e = QMIN(nb+n, leds.size());
+ uint e = TQMIN(nb+n, leds.size());
for (uint i=nb; i<e; i++) leds[i]->on();
- uint f = QMIN(nb+n-e, leds.size());
+ uint f = TQMIN(nb+n-e, leds.size());
for (uint i=0; i<f; i++) leds[i]->setColor(red);
nb += n;
}
@@ -161,7 +161,7 @@ uint GiftPool::take()
void GiftPool::reset()
{
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
ready = false;
nb = 0;
for (uint i=0; i<leds.size(); i++) {
@@ -171,10 +171,10 @@ void GiftPool::reset()
}
//-----------------------------------------------------------------------------
-PlayerProgress::PlayerProgress(BaseBoard *board, TQWidget *parent,
+PlayerProgress::PlayerProgress(BaseBoard *board, TQWidget *tqparent,
const char *name)
- : KGameProgress(0, board->matrix().height(), 0, KGameProgress::Vertical,
- parent, name), _board(board)
+ : KGameProgress(0, board->matrix().height(), 0, Qt::Vertical,
+ tqparent, name), _board(board)
{
setBackgroundColor(lightGray);
setTextEnabled(false);
@@ -182,7 +182,7 @@ PlayerProgress::PlayerProgress(BaseBoard *board, TQWidget *parent,
KZoomMainWindow::addWidget(this);
}
-TQSize PlayerProgress::sizeHint() const
+TQSize PlayerProgress::tqsizeHint() const
{
return TQSize(10, _board->matrix().height() * BasePrefs::blockSize())
+ 2 * TQSize(frameWidth(), frameWidth());
diff --git a/libksirtet/common/misc_ui.h b/libksirtet/common/misc_ui.h
index 38544a02..61b87b96 100644
--- a/libksirtet/common/misc_ui.h
+++ b/libksirtet/common/misc_ui.h
@@ -14,18 +14,20 @@
class LIBKSIRTET_EXPORT ShowNextPiece : public FixedCanvasView
{
Q_OBJECT
+ TQ_OBJECT
public:
- ShowNextPiece(BaseBoard *, TQWidget *parent);
+ ShowNextPiece(BaseBoard *, TQWidget *tqparent);
};
/*****************************************************************************/
-class LIBKSIRTET_EXPORT Shadow : public QWidget
+class LIBKSIRTET_EXPORT Shadow : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- Shadow(BaseBoard *, TQWidget *parent);
+ Shadow(BaseBoard *, TQWidget *tqparent);
- virtual TQSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
virtual TQSizePolicy sizePolicy() const;
void setDisplay(bool show);
@@ -40,13 +42,14 @@ class LIBKSIRTET_EXPORT Shadow : public QWidget
/*****************************************************************************/
class Led;
-class LIBKSIRTET_EXPORT GiftPool : public QHBox
+class LIBKSIRTET_EXPORT GiftPool : public TQHBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- GiftPool(TQWidget *parent);
+ GiftPool(TQWidget *tqparent);
- virtual TQSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
virtual TQSizePolicy sizePolicy() const;
void reset();
@@ -68,10 +71,11 @@ class LIBKSIRTET_EXPORT GiftPool : public QHBox
class LIBKSIRTET_EXPORT PlayerProgress : public KGameProgress
{
Q_OBJECT
+ TQ_OBJECT
public:
- PlayerProgress(BaseBoard *board, TQWidget *parent = 0, const char *name = 0);
+ PlayerProgress(BaseBoard *board, TQWidget *tqparent = 0, const char *name = 0);
- virtual TQSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
virtual TQSizePolicy sizePolicy() const;
private:
diff --git a/libksirtet/common/settings.h b/libksirtet/common/settings.h
index 2a554e8d..a33c2b12 100644
--- a/libksirtet/common/settings.h
+++ b/libksirtet/common/settings.h
@@ -10,14 +10,16 @@
class LIBKSIRTET_EXPORT AppearanceConfig : public BaseAppearanceConfig
{
Q_OBJECT
+ TQ_OBJECT
public:
AppearanceConfig();
};
//-----------------------------------------------------------------------------
-class LIBKSIRTET_EXPORT GameConfig : public QWidget
+class LIBKSIRTET_EXPORT GameConfig : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
GameConfig();
diff --git a/libksirtet/common/types.h b/libksirtet/common/types.h
index 5b85f302..702f8a70 100644
--- a/libksirtet/common/types.h
+++ b/libksirtet/common/types.h
@@ -6,11 +6,11 @@
#include "lib/libksirtet_export.h"
-struct ClientPlayData { Q_UINT8 height, gift, end; };
+struct ClientPlayData { TQ_UINT8 height, gift, end; };
LIBKSIRTET_EXPORT TQDataStream &operator <<(TQDataStream &s, const ClientPlayData &d);
LIBKSIRTET_EXPORT TQDataStream &operator >>(TQDataStream &s, ClientPlayData &d);
-struct ServerPlayData { Q_UINT8 prevHeight, nextHeight, gift; };
+struct ServerPlayData { TQ_UINT8 prevHeight, nextHeight, gift; };
LIBKSIRTET_EXPORT TQDataStream &operator <<(TQDataStream &s, const ServerPlayData &d);
LIBKSIRTET_EXPORT TQDataStream &operator >>(TQDataStream &s, ServerPlayData &d);
@@ -18,7 +18,7 @@ class ServerInitData
{
public:
TQString prevName, nextName, name;
- Q_UINT32 initLevel, seed;
+ TQ_UINT32 initLevel, seed;
};
LIBKSIRTET_EXPORT TQDataStream &operator <<(TQDataStream &s, const ServerInitData &d);
LIBKSIRTET_EXPORT TQDataStream &operator >>(TQDataStream &s, ServerInitData &d);
diff --git a/libksirtet/lib/defines.cpp b/libksirtet/lib/defines.cpp
index baf91083..3b3ec229 100644
--- a/libksirtet/lib/defines.cpp
+++ b/libksirtet/lib/defines.cpp
@@ -2,12 +2,12 @@
#include <klocale.h>
-void errorBox(const TQString &msg1, const TQString &msg2, TQWidget *parent)
+void errorBox(const TQString &msg1, const TQString &msg2, TQWidget *tqparent)
{
TQString str;
if ( msg2.isNull() ) str = msg1;
- else str = i18n("%1:\n%2").arg(msg1).arg(msg2);
- KMessageBox::error(parent, str);
+ else str = i18n("%1:\n%2").tqarg(msg1).tqarg(msg2);
+ KMessageBox::error(tqparent, str);
}
TQString socketError(const KExtendedSocket *socket)
@@ -16,9 +16,9 @@ TQString socketError(const KExtendedSocket *socket)
}
bool checkSocket(int res, const KExtendedSocket *socket,
- const TQString &msg, TQWidget *parent)
+ const TQString &msg, TQWidget *tqparent)
{
if ( res==0 ) return false;
- errorBox(msg, socketError(socket), parent);
+ errorBox(msg, socketError(socket), tqparent);
return true;
}
diff --git a/libksirtet/lib/defines.h b/libksirtet/lib/defines.h
index a6728a38..db936b10 100644
--- a/libksirtet/lib/defines.h
+++ b/libksirtet/lib/defines.h
@@ -16,10 +16,10 @@
#define MP_SERVER_ADDRESS "Server address"
#define MP_PORT "Port"
-void errorBox(const TQString &msg1, const TQString &msg2, TQWidget *parent);
+void errorBox(const TQString &msg1, const TQString &msg2, TQWidget *tqparent);
TQString socketError(const KExtendedSocket *socket);
bool checkSocket(int res, const KExtendedSocket *,
- const TQString &msg, TQWidget *parent);
+ const TQString &msg, TQWidget *tqparent);
#define R_ERROR_BOX(msg1, msg2) { \
errorBox(msg1, msg2, this); \
diff --git a/libksirtet/lib/internal.cpp b/libksirtet/lib/internal.cpp
index f8b34085..1622a2fa 100644
--- a/libksirtet/lib/internal.cpp
+++ b/libksirtet/lib/internal.cpp
@@ -111,7 +111,7 @@ TQString Network::playerName(uint i) const
if ( i<(l+ll) ) return remotes[k].names[i-l];
l += ll;
}
- return TQString::null; // dummy
+ return TQString(); // dummy
}
IOBuffer *Network::ioBuffer(uint i) const
diff --git a/libksirtet/lib/internal.h b/libksirtet/lib/internal.h
index cc74fbc4..038656eb 100644
--- a/libksirtet/lib/internal.h
+++ b/libksirtet/lib/internal.h
@@ -59,6 +59,7 @@ class Server
class Network : public TQObject, public Local
{
Q_OBJECT
+ TQ_OBJECT
public:
Network(MPInterface *_interface, TQValueList<MPInterface::Data> &_boards,
@@ -93,6 +94,7 @@ class Network : public TQObject, public Local
class LocalServer : public TQObject, public Local, public Server
{
Q_OBJECT
+ TQ_OBJECT
public:
LocalServer(MPInterface *_interface,
@@ -112,6 +114,7 @@ class LocalServer : public TQObject, public Local, public Server
class NetworkServer : public Network, public Server
{
Q_OBJECT
+ TQ_OBJECT
public:
NetworkServer(MPInterface *_interface,
@@ -137,6 +140,7 @@ class NetworkServer : public Network, public Server
class Client : public Network
{
Q_OBJECT
+ TQ_OBJECT
public:
Client(MPInterface *_interface, TQValueList<MPInterface::Data> &_boards,
diff --git a/libksirtet/lib/keys.cpp b/libksirtet/lib/keys.cpp
index 8433503f..fadb8e5f 100644
--- a/libksirtet/lib/keys.cpp
+++ b/libksirtet/lib/keys.cpp
@@ -7,8 +7,8 @@
KeyData::KeyData(uint maxNb, uint nbActions, const ActionData *data,
- TQObject *parent)
- : TQObject(parent), _maxNb(maxNb)
+ TQObject *tqparent)
+ : TQObject(tqparent), _maxNb(maxNb)
{
_data.duplicate(data, nbActions);
@@ -46,10 +46,10 @@ void KeyData::createActionCollection(uint index, TQWidget *receiver)
_cols[index] = new KActionCollection(receiver, this);
for (uint k=0; k<_data.size(); k++) {
TQString label = i18n(_data[k].label);
- TQString name = TQString("%2 %3").arg(index+1).arg(_data[k].name);
+ TQString name = TQString("%2 %3").tqarg(index+1).tqarg(_data[k].name);
const char *slot = (_data[k].slotRelease ? 0 : _data[k].slot);
KAction *a = new KAction(label, _keycodes[_cols.size()-1][index][k],
- receiver, slot, _cols[index], name.utf8());
+ TQT_TQOBJECT(receiver), slot, _cols[index], name.utf8());
a->setEnabled(false);
if ( slot==0 ) {
SpecialData data;
@@ -68,7 +68,7 @@ void KeyData::setEnabled(uint index, bool enabled)
{
for (uint k=0; k<_cols[index]->count(); k++) {
TQMap<KAction *, SpecialData>::Iterator it =
- _specActions.find(_cols[index]->action(k));
+ _specActions.tqfind(_cols[index]->action(k));
if ( it==_specActions.end() )
_cols[index]->action(k)->setEnabled(enabled);
else (*it).enabled = enabled;
@@ -78,8 +78,8 @@ void KeyData::setEnabled(uint index, bool enabled)
void KeyData::addKeys(KKeyDialog &d)
{
for (uint i=0; i<_cols.size(); i++)
- d.insert(_cols[i], i18n("Shortcuts for player #%1/%2").arg(i+1)
- .arg(_cols.size()));
+ d.insert(_cols[i], i18n("Shortcuts for player #%1/%2").tqarg(i+1)
+ .tqarg(_cols.size()));
}
void KeyData::save()
diff --git a/libksirtet/lib/keys.h b/libksirtet/lib/keys.h
index 62bb818c..16e25118 100644
--- a/libksirtet/lib/keys.h
+++ b/libksirtet/lib/keys.h
@@ -7,12 +7,13 @@
#include "mp_interface.h"
-class KeyData : public QObject
+class KeyData : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KeyData(uint maxNb, uint nbActions, const ActionData *,
- TQObject *parent);
+ TQObject *tqparent);
void setKeycodes(uint nb, uint i, const int *keycodes);
void setCurrentNb(uint nb);
@@ -36,7 +37,7 @@ class KeyData : public QObject
TQMap<KAction *, SpecialData> _specActions;
TQString group() const
- { return TQString("Keys (%1 humans)").arg(_cols.size()); }
+ { return TQString("Keys (%1 humans)").tqarg(_cols.size()); }
};
#endif // KEYS_H
diff --git a/libksirtet/lib/meeting.cpp b/libksirtet/lib/meeting.cpp
index 71df0e4d..8730fb96 100644
--- a/libksirtet/lib/meeting.cpp
+++ b/libksirtet/lib/meeting.cpp
@@ -14,16 +14,16 @@
NetMeeting::NetMeeting(const cId &_id, Socket *socket,
MPOptionWidget *option,
- bool _server, TQWidget *parent, const char * name)
+ bool _server, TQWidget *tqparent, const char * name)
: KDialogBase(Plain, i18n("Network Meeting"),
(_server ? Ok|Cancel|Help : Cancel|Help),
- (_server ? Ok : Cancel), parent, name),
+ (_server ? Ok : Cancel), tqparent, name),
server(_server), ow(option), id(_id), socketRemoved(FALSE)
{
sm.append(socket, SocketManager::ReadWrite);
sm[0]->notifier()->setEnabled(TRUE);
-/* top layout */
+/* top tqlayout */
TQVBoxLayout *top = new TQVBoxLayout(plainPage(), spacingHint());
top->setResizeMode(TQLayout::Fixed);
@@ -37,7 +37,7 @@ NetMeeting::NetMeeting(const cId &_id, Socket *socket,
top->addWidget(wl);
labWait = new TQLabel(i18n("Waiting for clients"), plainPage());
- labWait->setAlignment(AlignCenter);
+ labWait->tqsetAlignment(AlignCenter);
top->addWidget(labWait);
// options widget
@@ -68,7 +68,7 @@ void NetMeeting::appendLine(const MeetingLineData &pld, bool server)
if (pld.own) connect(pl, TQT_SIGNAL(textChanged(const TQString &)),
TQT_SLOT(textChanged(const TQString &)));
else message(i18n("A new client has just arrived (#%1)")
- .arg(wl->size()+1));
+ .tqarg(wl->size()+1));
pl->setData(pld.ed);
connect(pl, TQT_SIGNAL(typeChanged(MeetingCheckBox::Type)),
TQT_SLOT(typeChanged(MeetingCheckBox::Type)));
@@ -136,7 +136,7 @@ void NetMeeting::cleanReject(const TQString &str)
// Read incoming data
void NetMeeting::readNotifier(int fd)
{
- int i = sm.find(fd);
+ int i = sm.tqfind(fd);
Q_ASSERT( i!=-1 );
switch ( sm[i]->read() ) {
case -1: readError(i); break;
@@ -213,8 +213,8 @@ void NetMeeting::message(const TQString &str)
/** ServerNetMeeting *********************************************************/
ServerNetMeeting::ServerNetMeeting(const cId &id,
const RemoteHostData &r, MPOptionWidget *option,
- TQPtrList<RemoteHostData> &arhd, TQWidget *parent, const char * name)
-: NetMeeting(id, r.socket, option, TRUE, parent, name), rhd(arhd)
+ TQPtrList<RemoteHostData> &arhd, TQWidget *tqparent, const char * name)
+: NetMeeting(id, r.socket, option, TRUE, tqparent, name), rhd(arhd)
{
connect(sm[0]->notifier(), TQT_SIGNAL(activated(int)), TQT_SLOT(newHost(int)));
players.append(Accepted); // server
@@ -241,7 +241,7 @@ void ServerNetMeeting::writeToAll(uint i)
void ServerNetMeeting::netError(uint i, const TQString &type)
{
Q_ASSERT( i!=0 );
- disconnectHost(i, i18n("%1 client #%2: disconnect it").arg(type).arg(i));
+ disconnectHost(i, i18n("%1 client #%2: disconnect it").tqarg(type).tqarg(i));
}
void ServerNetMeeting::disconnectHost(uint i, const TQString &str)
@@ -265,7 +265,7 @@ void ServerNetMeeting::newHost(int)
int res = sm[0]->accept(s);
if ( res!=0 ) {
message(i18n("Failed to accept incoming client:\n%1")
- .arg(socketError(s)));
+ .tqarg(socketError(s)));
return;
}
players.append(NewPlayer);
@@ -301,7 +301,7 @@ void ServerNetMeeting::idFlag(uint i)
void ServerNetMeeting::endFlag(uint i)
{
- disconnectHost(i, i18n("Client #%1 has left").arg(i));
+ disconnectHost(i, i18n("Client #%1 has left").tqarg(i));
}
void ServerNetMeeting::newFlag(uint i)
@@ -421,7 +421,7 @@ void ServerNetMeeting::accept()
// send play message to client (Play flag
// + bool [accepted/rejected])
- sm[0]->writingStream() << PlayFlag << (Q_UINT8)willPlay;
+ sm[0]->writingStream() << PlayFlag << (TQ_UINT8)willPlay;
// if write failed and the client is not playing : silently
// put it aside ...
if ( !sm[0]->write() && willPlay ) {
@@ -448,8 +448,8 @@ void ServerNetMeeting::optionsChanged()
/** ClientNetMeeting *********************************************************/
ClientNetMeeting::ClientNetMeeting(const cId &id,
const RemoteHostData &rhd, MPOptionWidget *option,
- TQWidget *parent, const char * name)
-: NetMeeting(id, rhd.socket, option, FALSE, parent, name), bds(rhd.bds)
+ TQWidget *tqparent, const char * name)
+: NetMeeting(id, rhd.socket, option, FALSE, tqparent, name), bds(rhd.bds)
{
connect(sm[0]->notifier(), TQT_SIGNAL(activated(int)),
TQT_SLOT(readNotifier(int)));
@@ -462,7 +462,7 @@ ClientNetMeeting::ClientNetMeeting(const cId &id,
void ClientNetMeeting::netError(uint, const TQString &str)
{
- cleanReject(i18n("%1 server: aborting connection.").arg(str));
+ cleanReject(i18n("%1 server: aborting connection.").tqarg(str));
}
void ClientNetMeeting::writeToAll(uint)
@@ -529,7 +529,7 @@ void ClientNetMeeting::delFlag(uint)
sm[0]->readingStream() >> k;
CHECK_READ(0);
removeLine(k-1);
- message(i18n("Client %1 has left").arg(k));
+ message(i18n("Client %1 has left").tqarg(k));
}
void ClientNetMeeting::textChanged(const TQString &text)
@@ -549,7 +549,7 @@ void ClientNetMeeting::typeChanged(MeetingCheckBox::Type type)
void ClientNetMeeting::playFlag(uint)
{
// receive accept or reject (bool)
- Q_UINT8 i;
+ TQ_UINT8 i;
sm[0]->readingStream() >> i;
CHECK_READ(0);
sm[0]->notifier()->setEnabled(false);
diff --git a/libksirtet/lib/meeting.h b/libksirtet/lib/meeting.h
index 1e9ba267..cc8356fc 100644
--- a/libksirtet/lib/meeting.h
+++ b/libksirtet/lib/meeting.h
@@ -13,12 +13,13 @@ class MPOptionWidget;
class NetMeeting : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
// "gameName" and "gameId" are TQByteArray because they are
// used for ID comparing between games.
NetMeeting(const cId &id, Socket *, MPOptionWidget *option, bool server,
- TQWidget *parent = 0, const char * name = 0);
+ TQWidget *tqparent = 0, const char * name = 0);
virtual ~NetMeeting();
protected slots:
@@ -44,7 +45,7 @@ class NetMeeting : public KDialogBase
void setType(const TypeInfo &ti);
void setText(const TextInfo &ti);
- void cleanReject(const TQString &str = TQString::null);
+ void cleanReject(const TQString &str = TQString());
bool checkState(uint i, PlayerState s);
bool checkAndSetState(uint i, PlayerState os, PlayerState ns);
bool ready() const;
@@ -77,12 +78,13 @@ class NetMeeting : public KDialogBase
class ServerNetMeeting : public NetMeeting
{
Q_OBJECT
+ TQ_OBJECT
public:
ServerNetMeeting(const cId &id,
const RemoteHostData &rhd, MPOptionWidget *options,
TQPtrList<RemoteHostData> &arhd,
- TQWidget *parent = 0, const char * name = 0);
+ TQWidget *tqparent = 0, const char * name = 0);
private slots:
void newHost(int);
@@ -108,11 +110,12 @@ class ServerNetMeeting : public NetMeeting
class ClientNetMeeting : public NetMeeting
{
Q_OBJECT
+ TQ_OBJECT
public:
ClientNetMeeting(const cId &id,
const RemoteHostData &rhd, MPOptionWidget *options,
- TQWidget *parent = 0, const char * name = 0);
+ TQWidget *tqparent = 0, const char * name = 0);
private slots:
void textChanged(const TQString &text);
diff --git a/libksirtet/lib/miscui.cpp b/libksirtet/lib/miscui.cpp
index dde70adb..7bc8e48b 100644
--- a/libksirtet/lib/miscui.cpp
+++ b/libksirtet/lib/miscui.cpp
@@ -8,8 +8,8 @@
//-----------------------------------------------------------------------------
MeetingCheckBox::MeetingCheckBox(Type type, bool owner, bool server,
- TQWidget *parent)
- : TQWidget(parent, "meeting_check_box")
+ TQWidget *tqparent)
+ : TQWidget(tqparent, "meeting_check_box")
{
TQVBoxLayout *vbox = new TQVBoxLayout(this);
@@ -46,8 +46,8 @@ void MeetingCheckBox::changedSlot()
//-----------------------------------------------------------------------------
PlayerComboBox::PlayerComboBox(Type type, bool canBeEmpty, bool acceptAI,
- TQWidget *parent)
- : TQComboBox(parent, "player_combo_box")
+ TQWidget *tqparent)
+ : TQComboBox(tqparent, "player_combo_box")
{
insertItem(i18n("Human"));
if (acceptAI) insertItem(i18n("AI"));
diff --git a/libksirtet/lib/miscui.h b/libksirtet/lib/miscui.h
index fb40e0ec..3bc7fd32 100644
--- a/libksirtet/lib/miscui.h
+++ b/libksirtet/lib/miscui.h
@@ -6,12 +6,13 @@
//-----------------------------------------------------------------------------
-class MeetingCheckBox : public QWidget
+class MeetingCheckBox : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Type { Ready, NotReady, Excluded };
- MeetingCheckBox(Type, bool owner, bool server, TQWidget *parent);
+ MeetingCheckBox(Type, bool owner, bool server, TQWidget *tqparent);
void setType(Type);
Type type() const;
@@ -27,12 +28,13 @@ class MeetingCheckBox : public QWidget
};
//-----------------------------------------------------------------------------
-class PlayerComboBox : public QComboBox
+class PlayerComboBox : public TQComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Type { Human = 0, AI, None };
- PlayerComboBox(Type, bool canBeNone, bool acceptAI, TQWidget *parent);
+ PlayerComboBox(Type, bool canBeNone, bool acceptAI, TQWidget *tqparent);
Type type() const { return (Type)currentItem(); }
diff --git a/libksirtet/lib/mp_board.h b/libksirtet/lib/mp_board.h
index 5e84825c..2578e927 100644
--- a/libksirtet/lib/mp_board.h
+++ b/libksirtet/lib/mp_board.h
@@ -7,13 +7,14 @@
* The MP_Board class is the base widget from which each individual
* board should inheritate ; you must implement its virtual methods.
*/
-class MPBoard : public QWidget
+class MPBoard : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- MPBoard(TQWidget *parent, const char *name=0)
- : TQWidget(parent, name) {}
+ MPBoard(TQWidget *tqparent, const char *name=0)
+ : TQWidget(tqparent, name) {}
virtual ~MPBoard() {}
/**
diff --git a/libksirtet/lib/mp_interface.cpp b/libksirtet/lib/mp_interface.cpp
index cfe06cd0..6683ba00 100644
--- a/libksirtet/lib/mp_interface.cpp
+++ b/libksirtet/lib/mp_interface.cpp
@@ -21,15 +21,15 @@
/*****************************************************************************/
MPInterface::MPInterface(const MPGameInfo &_gameInfo,
uint nbActions, const ActionData *data,
- TQWidget *parent, const char *name)
-: TQWidget(parent, name), internal(0), gameInfo(_gameInfo), nbLocalHumans(0)
+ TQWidget *tqparent, const char *name)
+: TQWidget(tqparent, name), internal(0), gameInfo(_gameInfo), nbLocalHumans(0)
{
Q_ASSERT( gameInfo.maxNbLocalPlayers>=1 );
hbl = new TQHBoxLayout(this, 0, 5);
hbl->setResizeMode( TQLayout::Fixed );
- _keyData = new KeyData(gameInfo.maxNbLocalPlayers, nbActions, data, this);
+ _keyData = new KeyData(gameInfo.maxNbLocalPlayers, nbActions, data, TQT_TQOBJECT(this));
}
MPInterface::~MPInterface()
@@ -98,16 +98,16 @@ void MPInterface::specialLocalGame(uint nbHumans, uint nbAIs)
KConfigGroupSaver cg(kapp->config(), MP_GROUP);
for (uint i=0; i<(nbHumans+nbAIs); i++) {
bd.type = (i<nbHumans ? PlayerComboBox::Human : PlayerComboBox::AI);
- bd.name = TQString::null;
+ bd.name = TQString();
t = (PlayerComboBox::Type)
- cg.config()->readNumEntry(TQString(MP_PLAYER_TYPE).arg(i),
+ cg.config()->readNumEntry(TQString(MP_PLAYER_TYPE).tqarg(i),
PlayerComboBox::None);
if ( bd.type==t )
- bd.name = cg.config()->readEntry(TQString(MP_PLAYER_NAME).arg(i),
- TQString::null);
+ bd.name = cg.config()->readEntry(TQString(MP_PLAYER_NAME).tqarg(i),
+ TQString());
if ( bd.name.isNull() )
- bd.name = (i<nbHumans ? i18n("Human %1").arg(i+1)
- : i18n("AI %1").arg(i-nbHumans+1));
+ bd.name = (i<nbHumans ? i18n("Human %1").tqarg(i+1)
+ : i18n("AI %1").tqarg(i-nbHumans+1));
cd.rhd.bds += bd;
}
cd.server = TRUE;
@@ -252,7 +252,7 @@ void MPInterface::immediateWrite()
void MPInterface::hostDisconnected(uint, const TQString &msg)
{
- errorBox(msg, TQString::null, this);
+ errorBox(msg, TQString(), this);
if ( !disconnected ) { // to avoid multiple calls
disconnected = TRUE;
diff --git a/libksirtet/lib/mp_interface.h b/libksirtet/lib/mp_interface.h
index dbd26869..ea70736f 100644
--- a/libksirtet/lib/mp_interface.h
+++ b/libksirtet/lib/mp_interface.h
@@ -73,16 +73,17 @@ typedef struct {
* easily with threads but I have no experience with thread programming
* and not all people have thread libraries and a thread-safe system.
*/
-class MPInterface : public QWidget
+class MPInterface : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor which takes a MPGameInfo struct as parameter.
*/
MPInterface(const MPGameInfo &gameInfo,
uint nbActions, const ActionData *data,
- TQWidget *parent = 0, const char *name = 0);
+ TQWidget *tqparent = 0, const char *name = 0);
virtual ~MPInterface();
public slots:
diff --git a/libksirtet/lib/mp_option.h b/libksirtet/lib/mp_option.h
index 2db2eacf..3d7468b5 100644
--- a/libksirtet/lib/mp_option.h
+++ b/libksirtet/lib/mp_option.h
@@ -28,17 +28,18 @@
* changed. In addition you'll need to implement the method @ref #saveData
* to save the configuration in the config file ; so that it will be available
* for the initialisation of @ref LocalBoard.
- * It seems a good idea that the widget have the same layout
+ * It seems a good idea that the widget have the same tqlayout
* on both (server and client) sides but with the inner widgets all disabled
* on the client side.
*/
-class MPOptionWidget : public QWidget
+class MPOptionWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- MPOptionWidget(bool Server, TQWidget *parent = 0, const char *name = 0)
- : TQWidget(parent, name), server(Server) {}
+ MPOptionWidget(bool Server, TQWidget *tqparent = 0, const char *name = 0)
+ : TQWidget(tqparent, name), server(Server) {}
virtual ~MPOptionWidget() {}
bool isServer() const { return server; }
diff --git a/libksirtet/lib/mp_simple_board.h b/libksirtet/lib/mp_simple_board.h
index d9a681f7..24a7654f 100644
--- a/libksirtet/lib/mp_simple_board.h
+++ b/libksirtet/lib/mp_simple_board.h
@@ -9,10 +9,11 @@
class KDE_EXPORT MPSimpleBoard : public MPBoard
{
Q_OBJECT
+ TQ_OBJECT
public:
- MPSimpleBoard(TQWidget *parent = 0, const char *name = 0)
- : MPBoard(parent, name) {}
+ MPSimpleBoard(TQWidget *tqparent = 0, const char *name = 0)
+ : MPBoard(tqparent, name) {}
virtual ~MPSimpleBoard() {}
void init(bool AI, bool multiplayers, bool server, bool first,
diff --git a/libksirtet/lib/mp_simple_interface.cpp b/libksirtet/lib/mp_simple_interface.cpp
index 1b83be40..e863b069 100644
--- a/libksirtet/lib/mp_simple_interface.cpp
+++ b/libksirtet/lib/mp_simple_interface.cpp
@@ -9,12 +9,12 @@
#define PAUSE_ACTION \
- ((KToggleAction *)((KMainWindow *)topLevelWidget())->action("game_pause"))
+ ((KToggleAction *)((KMainWindow *)tqtopLevelWidget())->action("game_pause"))
MPSimpleInterface::MPSimpleInterface(const MPGameInfo &gi,
uint nbActions, const ActionData *data,
- TQWidget *parent, const char *name)
-: MPInterface(gi, nbActions, data, parent, name), state(SS_Standby)
+ TQWidget *tqparent, const char *name)
+: MPInterface(gi, nbActions, data, tqparent, name), state(SS_Standby)
{}
void MPSimpleInterface::init()
diff --git a/libksirtet/lib/mp_simple_interface.h b/libksirtet/lib/mp_simple_interface.h
index d366dafd..04cb014c 100644
--- a/libksirtet/lib/mp_simple_interface.h
+++ b/libksirtet/lib/mp_simple_interface.h
@@ -7,11 +7,12 @@
class MPSimpleInterface : public MPInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
MPSimpleInterface(const MPGameInfo &gi,
uint nbActions, const ActionData *data,
- TQWidget *parent = 0, const char *name = 0);
+ TQWidget *tqparent = 0, const char *name = 0);
bool isPaused() const { return state==SS_Pause; }
diff --git a/libksirtet/lib/mp_simple_types.cpp b/libksirtet/lib/mp_simple_types.cpp
index c2a9dc27..142c1d15 100644
--- a/libksirtet/lib/mp_simple_types.cpp
+++ b/libksirtet/lib/mp_simple_types.cpp
@@ -1,6 +1,6 @@
#include "mp_simple_types.h"
TQDataStream &operator <<(TQDataStream &s, const EnumClass &ec)
- { s << (Q_UINT8)ec.f; return s; }
+ { s << (TQ_UINT8)ec.f; return s; }
TQDataStream &operator >>(TQDataStream &s, EnumClass &ec)
- { Q_UINT8 t; s >> t; ec.f = (int)t; return s; }
+ { TQ_UINT8 t; s >> t; ec.f = (int)t; return s; }
diff --git a/libksirtet/lib/pline.cpp b/libksirtet/lib/pline.cpp
index 86fde398..94e9c50e 100644
--- a/libksirtet/lib/pline.cpp
+++ b/libksirtet/lib/pline.cpp
@@ -9,12 +9,12 @@
#define THIN_BORDER 4
MeetingLine::MeetingLine(bool isOwner, bool serverIsReader, bool serverLine,
- TQWidget *parent, const char *name)
-: TQFrame(parent, name)
+ TQWidget *tqparent, const char *name)
+: TQFrame(tqparent, name)
{
setFrameStyle(Panel | (serverLine ? Raised : Plain));
- // Top layout
+ // Top tqlayout
hbl = new TQHBoxLayout(this, THIN_BORDER + frameWidth());
/* TriCheckBox */
@@ -26,7 +26,7 @@ MeetingLine::MeetingLine(bool isOwner, bool serverIsReader, bool serverLine,
/* Name */
lname = new TQLabel(" ", this);
- lname->setAlignment(AlignCenter);
+ lname->tqsetAlignment(AlignCenter);
lname->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
lname->setLineWidth(2);
lname->setMidLineWidth(3);
@@ -34,7 +34,7 @@ MeetingLine::MeetingLine(bool isOwner, bool serverIsReader, bool serverLine,
f.setBold(TRUE);
lname->setFont(f);
lname->setFixedSize(lname->fontMetrics().maxWidth()*NAME_MAX_LENGTH,
- lname->sizeHint().height());
+ lname->tqsizeHint().height());
hbl->addWidget(lname);
hbl->addStretch(1);
@@ -51,7 +51,7 @@ MeetingLine::MeetingLine(bool isOwner, bool serverIsReader, bool serverLine,
qle->setMaxLength(TALKER_MAX_LENGTH);
qle->setFont( TQFont("fixed", 12, TQFont::Bold) );
qle->setFixedSize(qle->fontMetrics().maxWidth()*TALKER_MAX_LENGTH,
- qle->sizeHint().height());
+ qle->tqsizeHint().height());
connect(qle, TQT_SIGNAL(textChanged(const TQString &)),
TQT_SLOT(_textChanged(const TQString &)));
qle->setEnabled(isOwner);
@@ -66,8 +66,8 @@ void MeetingLine::setData(const ExtData &ed)
if ( bds[i].type==PlayerComboBox::Human ) nbh++;
else if ( bds[i].type==PlayerComboBox::AI ) nba++;
}
- labH->setText(i18n("Hu=%1").arg(nbh));
- labAI->setText(i18n("AI=%1").arg(nba));
+ labH->setText(i18n("Hu=%1").tqarg(nbh));
+ labAI->setText(i18n("AI=%1").tqarg(nba));
lname->setText(bds[0].name);
setType(ed.type);
setText(ed.text);
@@ -84,12 +84,12 @@ void MeetingLine::data(ExtData &ed) const
PlayerLine::PlayerLine(PlayerComboBox::Type type, const TQString &txt,
bool humanSetting, bool AISetting,
bool canBeEmpty, bool acceptAI,
- TQWidget *parent, const char *name)
-: TQFrame(parent, name), hs(humanSetting), as(AISetting)
+ TQWidget *tqparent, const char *name)
+: TQFrame(tqparent, name), hs(humanSetting), as(AISetting)
{
setFrameStyle(Panel | Raised);
- // Top layout
+ // Top tqlayout
TQHBoxLayout *hbl;
hbl = new TQHBoxLayout(this, THIN_BORDER + frameWidth());
@@ -102,7 +102,7 @@ PlayerLine::PlayerLine(PlayerComboBox::Type type, const TQString &txt,
edit = new TQLineEdit(txt, this);
edit->setMaxLength(NAME_MAX_LENGTH);
edit->setFixedSize(edit->fontMetrics().maxWidth()*(NAME_MAX_LENGTH+2),
- edit->sizeHint().height());
+ edit->tqsizeHint().height());
hbl->addWidget(edit);
/* settings button */
@@ -128,8 +128,8 @@ void PlayerLine::setSlot()
}
/*****************************************************************************/
-GWidgetList::GWidgetList(uint interval, TQWidget *parent, const char * name)
- : TQWidget(parent, name), vbl(this, interval)
+GWidgetList::GWidgetList(uint interval, TQWidget *tqparent, const char * name)
+ : TQWidget(tqparent, name), vbl(this, interval)
{
widgets.setAutoDelete(TRUE);
}
diff --git a/libksirtet/lib/pline.h b/libksirtet/lib/pline.h
index d9969264..9cef8d29 100644
--- a/libksirtet/lib/pline.h
+++ b/libksirtet/lib/pline.h
@@ -13,13 +13,14 @@
class TQPushButton;
/** Internal class : display a "player line" in netmeeting. */
-class MeetingLine : public QFrame
+class MeetingLine : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
MeetingLine(bool isOwner, bool readerIsServer, bool serverLine,
- TQWidget *parent, const char *name = 0);
+ TQWidget *tqparent, const char *name = 0);
MeetingCheckBox::Type type() const { return tcb->type(); }
void setType(MeetingCheckBox::Type type) { tcb->setType(type); }
@@ -48,15 +49,16 @@ class MeetingLine : public QFrame
TQLineEdit *qle;
};
-class PlayerLine : public QFrame
+class PlayerLine : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
PlayerLine(PlayerComboBox::Type type, const TQString &txt,
bool humanSetting, bool AISetting,
bool canBeEmpty, bool acceptAI,
- TQWidget *parent = 0, const char *name = 0);
+ TQWidget *tqparent = 0, const char *name = 0);
PlayerComboBox::Type type() const { return pcb->type(); }
TQString name() const { return edit->text(); }
@@ -78,18 +80,19 @@ class PlayerLine : public QFrame
};
/** Internal class : scrolable list of widgets. */
-class GWidgetList : public QWidget
+class GWidgetList : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- GWidgetList(uint interval, TQWidget *parent = 0, const char * name = 0);
+ GWidgetList(uint interval, TQWidget *tqparent = 0, const char * name = 0);
void remove(uint i);
uint size() const { return widgets.count(); }
protected:
- /** The widget must be created with this widget as parent. */
+ /** The widget must be created with this widget as tqparent. */
void append(TQWidget *);
TQWidget *widget(uint i) { return widgets.at(i); }
@@ -102,8 +105,8 @@ template <class Type>
class WidgetList : public GWidgetList
{
public:
- WidgetList(uint interval, TQWidget *parent=0, const char *name=0)
- : GWidgetList(interval, parent, name) {}
+ WidgetList(uint interval, TQWidget *tqparent=0, const char *name=0)
+ : GWidgetList(interval, tqparent, name) {}
void append(Type *w) { GWidgetList::append(w); }
Type *widget(uint i) { return (Type *)GWidgetList::widget(i); }
diff --git a/libksirtet/lib/smanager.cpp b/libksirtet/lib/smanager.cpp
index f6588546..ba2afd89 100644
--- a/libksirtet/lib/smanager.cpp
+++ b/libksirtet/lib/smanager.cpp
@@ -31,7 +31,7 @@ void SocketManager::clean()
sockets.resize(0);
}
-int SocketManager::find(int fd)
+int SocketManager::tqfind(int fd)
{
for(uint i=0; i<sockets.size(); i++)
if ( sockets[i]->fd()==fd ) return i;
@@ -44,7 +44,7 @@ uint SocketManager::append(Socket *socket, SocketProperty sp)
sockets.resize(s+1);
sockets[s] = socket;
- max_fd = QMAX(max_fd, socket->fd());
+ max_fd = TQMAX(max_fd, socket->fd());
if ( sp==ReadWrite || sp==ReadOnly ) FD_SET(socket->fd(), &read_set);
if ( sp==ReadWrite || sp==WriteOnly ) {
@@ -65,7 +65,7 @@ void SocketManager::remove(uint i, bool del)
max_fd = 0;
for(uint j=0; j<s; j++)
- max_fd = QMAX(max_fd, sockets[j]->fd());
+ max_fd = TQMAX(max_fd, sockets[j]->fd());
int fd = so->fd();
if ( FD_ISSET(fd, &read_set) ) FD_CLR(fd, &read_set);
diff --git a/libksirtet/lib/smanager.h b/libksirtet/lib/smanager.h
index 59dd0edb..8541934e 100644
--- a/libksirtet/lib/smanager.h
+++ b/libksirtet/lib/smanager.h
@@ -40,7 +40,7 @@ class SocketManager
Socket *operator [](uint i) { return sockets[i]; }
/** @return the index of the socket (-1 if not present). */
- int find(int fd);
+ int tqfind(int fd);
/**
* Append a socket at the end of the array of sockets.
diff --git a/libksirtet/lib/socket.cpp b/libksirtet/lib/socket.cpp
index 6defc94b..7dd74f74 100644
--- a/libksirtet/lib/socket.cpp
+++ b/libksirtet/lib/socket.cpp
@@ -21,13 +21,13 @@
#endif
Socket::Socket(KExtendedSocket *s, bool createNotifier,
- TQObject *parent, const char *name)
+ TQObject *tqparent, const char *name)
: _socket(s), _notifier(0)
{
Q_ASSERT(s);
if (createNotifier) {
_notifier = new TQSocketNotifier(s->fd(), TQSocketNotifier::Read,
- parent, name);
+ tqparent, name);
_notifier->setEnabled(FALSE);
}
}
diff --git a/libksirtet/lib/socket.h b/libksirtet/lib/socket.h
index 01dac726..75538670 100644
--- a/libksirtet/lib/socket.h
+++ b/libksirtet/lib/socket.h
@@ -12,7 +12,7 @@ class Socket
{
public:
Socket(KExtendedSocket *, bool createNotifier = FALSE,
- TQObject *parent = 0, const char *name = 0);
+ TQObject *tqparent = 0, const char *name = 0);
/** close the socket */
~Socket();
diff --git a/libksirtet/lib/types.cpp b/libksirtet/lib/types.cpp
index ad3dbc9b..86f7bfba 100644
--- a/libksirtet/lib/types.cpp
+++ b/libksirtet/lib/types.cpp
@@ -20,30 +20,30 @@ TQString cId::errorMessage(const cId &id) const
TQString str = i18n("\nServer: \"%1\"\nClient: \"%2\"");
switch (state) {
- case Accepted: return TQString::null;
+ case Accepted: return TQString();
case LibIdClash:
return i18n("The MultiPlayer library of the server is incompatible")
- + str.arg(libId).arg(id.libId);
+ + str.tqarg(libId).tqarg(id.libId);
case GameNameClash:
return i18n("Trying to connect a server for another game type")
- + str.arg(gameName).arg(id.gameName);
+ + str.tqarg(gameName).tqarg(id.gameName);
case GameIdClash:
return i18n("The server game version is incompatible")
- + str.arg(gameId).arg(id.gameId);
+ + str.tqarg(gameId).tqarg(id.gameId);
}
Q_ASSERT(0);
- return TQString::null;
+ return TQString();
}
TQDataStream &operator << (TQDataStream &s, const cId &id)
{
- s << id.libId << id.gameName << id.gameId << (Q_UINT8)id.state;
+ s << id.libId << id.gameName << id.gameId << (TQ_UINT8)id.state;
return s;
}
TQDataStream &operator >> (TQDataStream &s, cId &id)
{
- Q_UINT8 state;
+ TQ_UINT8 state;
s >> id.libId >> id.gameName >> id.gameId >> state;
id.state = (cId::State)state;
return s;
@@ -52,13 +52,13 @@ TQDataStream &operator >> (TQDataStream &s, cId &id)
//-----------------------------------------------------------------------------
TQDataStream &operator << (TQDataStream &s, const MeetingMsgFlag &f)
{
- s << (Q_UINT8)f;
+ s << (TQ_UINT8)f;
return s;
}
TQDataStream &operator >> (TQDataStream &s, MeetingMsgFlag &f)
{
- Q_UINT8 i;
+ TQ_UINT8 i;
s >> i; f = (MeetingMsgFlag)i;
return s;
}
@@ -66,13 +66,13 @@ TQDataStream &operator >> (TQDataStream &s, MeetingMsgFlag &f)
//-----------------------------------------------------------------------------
TQDataStream &operator << (TQDataStream &s, const TextInfo &ti)
{
- s << (Q_UINT32)ti.i << ti.text;
+ s << (TQ_UINT32)ti.i << ti.text;
return s;
}
TQDataStream &operator >> (TQDataStream &s, TextInfo &ti)
{
- Q_UINT32 i;
+ TQ_UINT32 i;
s >> i >> ti.text; ti.i = i;
return s;
}
@@ -80,13 +80,13 @@ TQDataStream &operator >> (TQDataStream &s, TextInfo &ti)
//-----------------------------------------------------------------------------
TQDataStream &operator << (TQDataStream &s, const MeetingCheckBox::Type &t)
{
- s << (Q_UINT8)t;
+ s << (TQ_UINT8)t;
return s;
}
TQDataStream &operator >> (TQDataStream &s, MeetingCheckBox::Type &t)
{
- Q_UINT8 i;
+ TQ_UINT8 i;
s >> i; t = (MeetingCheckBox::Type)i;
return s;
}
@@ -94,13 +94,13 @@ TQDataStream &operator >> (TQDataStream &s, MeetingCheckBox::Type &t)
//-----------------------------------------------------------------------------
TQDataStream &operator << (TQDataStream &s, const TypeInfo &ti)
{
- s << (Q_UINT32)ti.i << ti.type;
+ s << (TQ_UINT32)ti.i << ti.type;
return s;
}
TQDataStream &operator >> (TQDataStream &s, TypeInfo &ti)
{
- Q_UINT32 i;
+ TQ_UINT32 i;
s >> i >> ti.type; ti.i = i;
return s;
}
@@ -108,13 +108,13 @@ TQDataStream &operator >> (TQDataStream &s, TypeInfo &ti)
//-----------------------------------------------------------------------------
TQDataStream &operator << (TQDataStream &s, const BoardData &bd)
{
- s << (Q_UINT8)bd.type << bd.name;
+ s << (TQ_UINT8)bd.type << bd.name;
return s;
}
TQDataStream &operator >> (TQDataStream &s, BoardData &bd)
{
- Q_UINT8 i;
+ TQ_UINT8 i;
s >> i >> bd.name;
bd.type = (PlayerComboBox::Type)i;
return s;
@@ -136,13 +136,14 @@ TQDataStream &operator >> (TQDataStream &s, ExtData &ed)
//-----------------------------------------------------------------------------
TQDataStream &operator << (TQDataStream &s, const MeetingLineData &pld)
{
- s << pld.ed << (Q_UINT8)pld.own;
+ s << pld.ed;
+ s << (TQ_UINT8)pld.own;
return s;
}
TQDataStream &operator >> (TQDataStream &s, MeetingLineData &pld)
{
- Q_UINT8 b;
+ TQ_UINT8 b;
s >> pld.ed >> b; pld.own = b;
return s;
}
@@ -150,13 +151,13 @@ TQDataStream &operator >> (TQDataStream &s, MeetingLineData &pld)
//-----------------------------------------------------------------------------
TQDataStream &operator << (TQDataStream &s, const MetaFlag &f)
{
- s << (Q_UINT8)f;
+ s << (TQ_UINT8)f;
return s;
}
TQDataStream &operator >> (TQDataStream &s, MetaFlag &f)
{
- Q_UINT8 i;
+ TQ_UINT8 i;
s >> i; f = (MetaFlag)i;
return s;
}
@@ -168,25 +169,25 @@ Stream::Stream(int _mode)
{
setDevice(&buf);
Q_ASSERT( _mode==IO_ReadOnly || _mode==IO_WriteOnly );
- buf.open(_mode);
+ buf.open((TQIODevice_OpenModeFlag)_mode);
}
void Stream::clear()
{
buf.close();
- buf.open(mode | IO_Truncate);
+ buf.open((TQIODevice_OpenModeFlag)(mode | IO_Truncate));
}
void Stream::setArray(TQByteArray a)
{
buf.close();
buf.setBuffer(a);
- buf.open(mode);
+ buf.open((TQIODevice_OpenModeFlag)mode);
}
bool ReadingStream::readOk()
{
- return ( buf.status()==IO_Ok );
+ return ( TQT_TQIODEVICE(&buf)->status()==IO_Ok );
}
void ReadingStream::clearRead()
diff --git a/libksirtet/lib/types.h b/libksirtet/lib/types.h
index ee5867fa..3e294073 100644
--- a/libksirtet/lib/types.h
+++ b/libksirtet/lib/types.h
@@ -126,7 +126,7 @@ TQDataStream &operator << (TQDataStream &s, const MetaFlag &f);
TQDataStream &operator >> (TQDataStream &s, MetaFlag &f);
/** Internal class : encapsulate read/write TQBuffer. */
-class Stream : public QDataStream
+class Stream : public TQDataStream
{
public:
Stream(int mode);
@@ -134,8 +134,8 @@ class Stream : public QDataStream
void clear();
void setArray(TQByteArray a);
- TQByteArray buffer() const { return buf.buffer(); }
- uint size() const { return buf.buffer().size(); }
+ TQByteArray buffer() /*const*/ { return buf.buffer(); }
+ uint size() /*const*/ { return buf.buffer().size(); }
protected:
TQBuffer buf;
diff --git a/libksirtet/lib/wizard.cpp b/libksirtet/lib/wizard.cpp
index 19d9de34..a059cfa2 100644
--- a/libksirtet/lib/wizard.cpp
+++ b/libksirtet/lib/wizard.cpp
@@ -32,8 +32,8 @@
#define MAX_USER_PORT 65535
MPWizard::MPWizard(const MPGameInfo &gi, ConnectionData &_cd,
- TQWidget *parent, const char *name)
-: KWizard(parent, name, TRUE), cd(_cd)
+ TQWidget *tqparent, const char *name)
+: KWizard(tqparent, name, TRUE), cd(_cd)
{
// setupTypePage(); // #### REMOVE NETWORK GAMES UNTIL FIXED
type = Local;
@@ -81,10 +81,10 @@ void MPWizard::setupLocalPage(const MPGameInfo &gi)
localPage->setMargin(KDialogBase::marginHint());
wl = new WidgetList<PlayerLine>(5, localPage);
- TQSignalMapper *husm = new TQSignalMapper(this);
+ TQSignalMapper *husm = new TQSignalMapper(TQT_TQOBJECT(this));
if (gi.humanSettingSlot) connect(husm, TQT_SIGNAL(mapped(int)),
gi.humanSettingSlot);
- TQSignalMapper *aism = new TQSignalMapper(this);
+ TQSignalMapper *aism = new TQSignalMapper(TQT_TQOBJECT(this));
if (gi.AISettingSlot) connect(aism, TQT_SIGNAL(mapped(int)), gi.AISettingSlot);
KConfigGroupSaver cg(kapp->config(), MP_GROUP);
@@ -94,17 +94,17 @@ void MPWizard::setupLocalPage(const MPGameInfo &gi)
Q_ASSERT( gi.maxNbLocalPlayers>0 );
for (uint i=0; i<gi.maxNbLocalPlayers; i++) {
type = (PlayerComboBox::Type)
- cg.config()->readNumEntry(TQString(MP_PLAYER_TYPE).arg(i),
+ cg.config()->readNumEntry(TQString(MP_PLAYER_TYPE).tqarg(i),
(i==0 ? PlayerComboBox::Human : PlayerComboBox::None));
- n = cg.config()->readEntry(TQString(MP_PLAYER_NAME).arg(i),
- i18n("Player #%1").arg(i));
+ n = cg.config()->readEntry(TQString(MP_PLAYER_NAME).tqarg(i),
+ i18n("Player #%1").tqarg(i));
pl = new PlayerLine(type, n, gi.humanSettingSlot, gi.AISettingSlot,
i!=0, gi.AIAllowed, wl);
connect(pl, TQT_SIGNAL(typeChanged(int)), TQT_SLOT(lineTypeChanged(int)));
- husm->setMapping(pl, i);
+ husm->setMapping(TQT_TQOBJECT(pl), i);
connect(pl, TQT_SIGNAL(setHuman()), husm, TQT_SLOT(map()));
- aism->setMapping(pl, i);
+ aism->setMapping(TQT_TQOBJECT(pl), i);
connect(pl, TQT_SIGNAL(setAI()), aism, TQT_SLOT(map()));
wl->append(pl);
}
@@ -122,7 +122,7 @@ void MPWizard::setupLocalPage(const MPGameInfo &gi)
TQString MPWizard::name(uint i) const
{
TQString s = wl->widget(i)->name();
- if ( s.length()==0 ) s = i18n("Player #%1").arg(i);
+ if ( s.length()==0 ) s = i18n("Player #%1").tqarg(i);
return s;
}
@@ -177,7 +177,7 @@ void MPWizard::accept()
// do lookup
int res = socket->lookup();
if ( checkSocket(res, socket, i18n("Error looking up for \"%1\"")
- .arg(host), this) ) {
+ .tqarg(host), this) ) {
delete socket;
return;
}
@@ -206,9 +206,9 @@ void MPWizard::accept()
cg.config()->writeEntry(MP_GAMETYPE, (int)type);
for (uint i=0; i<wl->size(); i++) {
- cg.config()->writeEntry(TQString(MP_PLAYER_TYPE).arg(i),
+ cg.config()->writeEntry(TQString(MP_PLAYER_TYPE).tqarg(i),
(int)wl->widget(i)->type());
- cg.config()->writeEntry(TQString(MP_PLAYER_NAME).arg(i), name(i));
+ cg.config()->writeEntry(TQString(MP_PLAYER_NAME).tqarg(i), name(i));
}
KWizard::accept();
diff --git a/libksirtet/lib/wizard.h b/libksirtet/lib/wizard.h
index fd90a3b8..42623ec7 100644
--- a/libksirtet/lib/wizard.h
+++ b/libksirtet/lib/wizard.h
@@ -19,10 +19,11 @@ class ConnectionData;
class MPWizard : public KWizard
{
Q_OBJECT
+ TQ_OBJECT
public:
MPWizard(const MPGameInfo &gi, ConnectionData &cd,
- TQWidget *parent = 0, const char *name = 0);
+ TQWidget *tqparent = 0, const char *name = 0);
void showPage(TQWidget *page);