summaryrefslogtreecommitdiffstats
path: root/libkdegames
diff options
context:
space:
mode:
Diffstat (limited to 'libkdegames')
-rwxr-xr-xlibkdegames/carddecks/convertpysols104
-rw-r--r--libkdegames/highscore/kconfigrawbackend.cpp2
-rw-r--r--libkdegames/highscore/kconfigrawbackend.h1
-rw-r--r--libkdegames/highscore/kexthighscore.cpp18
-rw-r--r--libkdegames/highscore/kexthighscore.h8
-rw-r--r--libkdegames/highscore/kexthighscore_gui.cpp48
-rw-r--r--libkdegames/highscore/kexthighscore_gui.h26
-rw-r--r--libkdegames/highscore/kexthighscore_internal.cpp50
-rw-r--r--libkdegames/highscore/kexthighscore_internal.h18
-rw-r--r--libkdegames/highscore/kexthighscore_item.cpp18
-rw-r--r--libkdegames/highscore/kexthighscore_item.h12
-rw-r--r--libkdegames/highscore/kexthighscore_tab.cpp30
-rw-r--r--libkdegames/highscore/kexthighscore_tab.h16
-rw-r--r--libkdegames/highscore/khighscore.cpp30
-rw-r--r--libkdegames/highscore/khighscore.h21
-rw-r--r--libkdegames/highscore/kscoredialog.cpp48
-rw-r--r--libkdegames/highscore/kscoredialog.h7
-rw-r--r--libkdegames/kcanvasrootpixmap.cpp2
-rw-r--r--libkdegames/kcanvasrootpixmap.h1
-rw-r--r--libkdegames/kcarddialog.cpp114
-rw-r--r--libkdegames/kcarddialog.h9
-rw-r--r--libkdegames/kchat.cpp2
-rw-r--r--libkdegames/kchat.h5
-rw-r--r--libkdegames/kchatbase.cpp40
-rw-r--r--libkdegames/kchatbase.h45
-rw-r--r--libkdegames/kchatdialog.cpp34
-rw-r--r--libkdegames/kchatdialog.h5
-rw-r--r--libkdegames/kgame/COMPAT6
-rw-r--r--libkdegames/kgame/DESIGN2
-rw-r--r--libkdegames/kgame/dialogs/kgameconnectdialog.cpp14
-rw-r--r--libkdegames/kgame/dialogs/kgameconnectdialog.h22
-rw-r--r--libkdegames/kgame/dialogs/kgamedebugdialog.cpp48
-rw-r--r--libkdegames/kgame/dialogs/kgamedebugdialog.h7
-rw-r--r--libkdegames/kgame/dialogs/kgamedialog.cpp34
-rw-r--r--libkdegames/kgame/dialogs/kgamedialog.h25
-rw-r--r--libkdegames/kgame/dialogs/kgamedialogconfig.cpp40
-rw-r--r--libkdegames/kgame/dialogs/kgamedialogconfig.h32
-rw-r--r--libkdegames/kgame/dialogs/kgameerrordialog.cpp30
-rw-r--r--libkdegames/kgame/dialogs/kgameerrordialog.h16
-rw-r--r--libkdegames/kgame/kgame.cpp110
-rw-r--r--libkdegames/kgame/kgame.h53
-rw-r--r--libkdegames/kgame/kgamechat.cpp28
-rw-r--r--libkdegames/kgame/kgamechat.h13
-rw-r--r--libkdegames/kgame/kgameerror.cpp22
-rw-r--r--libkdegames/kgame/kgameio.cpp58
-rw-r--r--libkdegames/kgame/kgameio.h29
-rw-r--r--libkdegames/kgame/kgamemessage.cpp32
-rw-r--r--libkdegames/kgame/kgamemessage.h16
-rw-r--r--libkdegames/kgame/kgamenetwork.cpp78
-rw-r--r--libkdegames/kgame/kgamenetwork.h49
-rw-r--r--libkdegames/kgame/kgameprocess.cpp16
-rw-r--r--libkdegames/kgame/kgameprocess.h13
-rw-r--r--libkdegames/kgame/kgameproperty.cpp12
-rw-r--r--libkdegames/kgame/kgameproperty.h42
-rw-r--r--libkdegames/kgame/kgamepropertyhandler.cpp34
-rw-r--r--libkdegames/kgame/kgamepropertyhandler.h23
-rw-r--r--libkdegames/kgame/kgamepropertylist.h2
-rw-r--r--libkdegames/kgame/kgamesequence.h3
-rw-r--r--libkdegames/kgame/kmessageclient.cpp58
-rw-r--r--libkdegames/kgame/kmessageclient.h45
-rw-r--r--libkdegames/kgame/kmessageio.cpp48
-rw-r--r--libkdegames/kgame/kmessageio.h45
-rw-r--r--libkdegames/kgame/kmessageserver.cpp102
-rw-r--r--libkdegames/kgame/kmessageserver.h112
-rw-r--r--libkdegames/kgame/kplayer.cpp26
-rw-r--r--libkdegames/kgame/kplayer.h17
-rw-r--r--libkdegames/kgame/messages.txt2
-rw-r--r--libkdegames/kgamelcd.cpp26
-rw-r--r--libkdegames/kgamelcd.h25
-rw-r--r--libkdegames/kgameprogress.cpp52
-rw-r--r--libkdegames/kgameprogress.h35
-rw-r--r--libkdegames/kgrid2d.h12
-rw-r--r--libkdegames/kstdgameaction.cpp114
-rw-r--r--libkdegames/kstdgameaction.h52
74 files changed, 1225 insertions, 1169 deletions
diff --git a/libkdegames/carddecks/convertpysols b/libkdegames/carddecks/convertpysols
index 5ed10b25..f2434475 100755
--- a/libkdegames/carddecks/convertpysols
+++ b/libkdegames/carddecks/convertpysols
@@ -2,68 +2,68 @@
cd $1
-convert -format png -geometry "72x96" 01c.gif 1.png
-convert -format png -geometry "72x96" 01s.gif 2.png
-convert -format png -geometry "72x96" 01h.gif 3.png
-convert -format png -geometry "72x96" 01d.gif 4.png
+convert -format png -tqgeometry "72x96" 01c.gif 1.png
+convert -format png -tqgeometry "72x96" 01s.gif 2.png
+convert -format png -tqgeometry "72x96" 01h.gif 3.png
+convert -format png -tqgeometry "72x96" 01d.gif 4.png
-convert -format png -geometry "72x96" 13c.gif 5.png
-convert -format png -geometry "72x96" 13s.gif 6.png
-convert -format png -geometry "72x96" 13h.gif 7.png
-convert -format png -geometry "72x96" 13d.gif 8.png
+convert -format png -tqgeometry "72x96" 13c.gif 5.png
+convert -format png -tqgeometry "72x96" 13s.gif 6.png
+convert -format png -tqgeometry "72x96" 13h.gif 7.png
+convert -format png -tqgeometry "72x96" 13d.gif 8.png
-convert -format png -geometry "72x96" 12c.gif 9.png
-convert -format png -geometry "72x96" 12s.gif 10.png
-convert -format png -geometry "72x96" 12h.gif 11.png
-convert -format png -geometry "72x96" 12d.gif 12.png
+convert -format png -tqgeometry "72x96" 12c.gif 9.png
+convert -format png -tqgeometry "72x96" 12s.gif 10.png
+convert -format png -tqgeometry "72x96" 12h.gif 11.png
+convert -format png -tqgeometry "72x96" 12d.gif 12.png
-convert -format png -geometry "72x96" 11c.gif 13.png
-convert -format png -geometry "72x96" 11s.gif 14.png
-convert -format png -geometry "72x96" 11h.gif 15.png
-convert -format png -geometry "72x96" 11d.gif 16.png
+convert -format png -tqgeometry "72x96" 11c.gif 13.png
+convert -format png -tqgeometry "72x96" 11s.gif 14.png
+convert -format png -tqgeometry "72x96" 11h.gif 15.png
+convert -format png -tqgeometry "72x96" 11d.gif 16.png
-convert -format png -geometry "72x96" 10c.gif 17.png
-convert -format png -geometry "72x96" 10s.gif 18.png
-convert -format png -geometry "72x96" 10h.gif 19.png
-convert -format png -geometry "72x96" 10d.gif 20.png
+convert -format png -tqgeometry "72x96" 10c.gif 17.png
+convert -format png -tqgeometry "72x96" 10s.gif 18.png
+convert -format png -tqgeometry "72x96" 10h.gif 19.png
+convert -format png -tqgeometry "72x96" 10d.gif 20.png
-convert -format png -geometry "72x96" 09c.gif 21.png
-convert -format png -geometry "72x96" 09s.gif 22.png
-convert -format png -geometry "72x96" 09h.gif 23.png
-convert -format png -geometry "72x96" 09d.gif 24.png
+convert -format png -tqgeometry "72x96" 09c.gif 21.png
+convert -format png -tqgeometry "72x96" 09s.gif 22.png
+convert -format png -tqgeometry "72x96" 09h.gif 23.png
+convert -format png -tqgeometry "72x96" 09d.gif 24.png
-convert -format png -geometry "72x96" 08c.gif 25.png
-convert -format png -geometry "72x96" 08s.gif 26.png
-convert -format png -geometry "72x96" 08h.gif 27.png
-convert -format png -geometry "72x96" 08d.gif 28.png
+convert -format png -tqgeometry "72x96" 08c.gif 25.png
+convert -format png -tqgeometry "72x96" 08s.gif 26.png
+convert -format png -tqgeometry "72x96" 08h.gif 27.png
+convert -format png -tqgeometry "72x96" 08d.gif 28.png
-convert -format png -geometry "72x96" 07c.gif 29.png
-convert -format png -geometry "72x96" 07s.gif 30.png
-convert -format png -geometry "72x96" 07h.gif 31.png
-convert -format png -geometry "72x96" 07d.gif 32.png
+convert -format png -tqgeometry "72x96" 07c.gif 29.png
+convert -format png -tqgeometry "72x96" 07s.gif 30.png
+convert -format png -tqgeometry "72x96" 07h.gif 31.png
+convert -format png -tqgeometry "72x96" 07d.gif 32.png
-convert -format png -geometry "72x96" 06c.gif 33.png
-convert -format png -geometry "72x96" 06s.gif 34.png
-convert -format png -geometry "72x96" 06h.gif 35.png
-convert -format png -geometry "72x96" 06d.gif 36.png
+convert -format png -tqgeometry "72x96" 06c.gif 33.png
+convert -format png -tqgeometry "72x96" 06s.gif 34.png
+convert -format png -tqgeometry "72x96" 06h.gif 35.png
+convert -format png -tqgeometry "72x96" 06d.gif 36.png
-convert -format png -geometry "72x96" 05c.gif 37.png
-convert -format png -geometry "72x96" 05s.gif 38.png
-convert -format png -geometry "72x96" 05h.gif 39.png
-convert -format png -geometry "72x96" 05d.gif 40.png
+convert -format png -tqgeometry "72x96" 05c.gif 37.png
+convert -format png -tqgeometry "72x96" 05s.gif 38.png
+convert -format png -tqgeometry "72x96" 05h.gif 39.png
+convert -format png -tqgeometry "72x96" 05d.gif 40.png
-convert -format png -geometry "72x96" 04c.gif 41.png
-convert -format png -geometry "72x96" 04s.gif 42.png
-convert -format png -geometry "72x96" 04h.gif 43.png
-convert -format png -geometry "72x96" 04d.gif 44.png
+convert -format png -tqgeometry "72x96" 04c.gif 41.png
+convert -format png -tqgeometry "72x96" 04s.gif 42.png
+convert -format png -tqgeometry "72x96" 04h.gif 43.png
+convert -format png -tqgeometry "72x96" 04d.gif 44.png
-convert -format png -geometry "72x96" 03c.gif 45.png
-convert -format png -geometry "72x96" 03s.gif 46.png
-convert -format png -geometry "72x96" 03h.gif 47.png
-convert -format png -geometry "72x96" 03d.gif 48.png
+convert -format png -tqgeometry "72x96" 03c.gif 45.png
+convert -format png -tqgeometry "72x96" 03s.gif 46.png
+convert -format png -tqgeometry "72x96" 03h.gif 47.png
+convert -format png -tqgeometry "72x96" 03d.gif 48.png
-convert -format png -geometry "72x96" 02c.gif 49.png
-convert -format png -geometry "72x96" 02s.gif 50.png
-convert -format png -geometry "72x96" 02h.gif 51.png
-convert -format png -geometry "72x96" 02d.gif 52.png
+convert -format png -tqgeometry "72x96" 02c.gif 49.png
+convert -format png -tqgeometry "72x96" 02s.gif 50.png
+convert -format png -tqgeometry "72x96" 02h.gif 51.png
+convert -format png -tqgeometry "72x96" 02d.gif 52.png
diff --git a/libkdegames/highscore/kconfigrawbackend.cpp b/libkdegames/highscore/kconfigrawbackend.cpp
index 29ffa845..c2643056 100644
--- a/libkdegames/highscore/kconfigrawbackend.cpp
+++ b/libkdegames/highscore/kconfigrawbackend.cpp
@@ -25,7 +25,7 @@
KConfigRawBackEnd::KConfigRawBackEnd(KConfigBase *_config, int fd)
- : KConfigINIBackEnd(_config, TQString::null, "config", false),
+ : KConfigINIBackEnd(_config, TQString(), "config", false),
_fd(fd), _stream(0)
{
_file.open(IO_ReadOnly, _fd);
diff --git a/libkdegames/highscore/kconfigrawbackend.h b/libkdegames/highscore/kconfigrawbackend.h
index 0c5fde03..6a1ea4b9 100644
--- a/libkdegames/highscore/kconfigrawbackend.h
+++ b/libkdegames/highscore/kconfigrawbackend.h
@@ -48,6 +48,7 @@ private:
class KRawConfig : public KSimpleConfig
{
Q_OBJECT
+ TQ_OBJECT
public:
KRawConfig(int fd, bool readOnly)
: KSimpleConfig(new KConfigRawBackEnd(this, fd), readOnly) {}
diff --git a/libkdegames/highscore/kexthighscore.cpp b/libkdegames/highscore/kexthighscore.cpp
index 585dafd4..22fa4a85 100644
--- a/libkdegames/highscore/kexthighscore.cpp
+++ b/libkdegames/highscore/kexthighscore.cpp
@@ -44,19 +44,19 @@ void setGameType(uint type)
internal->setGameType(type);
}
-bool configure(TQWidget *parent)
+bool configure(TQWidget *tqparent)
{
internal->checkFirst();
- ConfigDialog *cd = new ConfigDialog(parent);
+ ConfigDialog *cd = new ConfigDialog(tqparent);
cd->exec();
bool saved = cd->hasBeenSaved();
delete cd;
return saved;
}
-void show(TQWidget *parent, int rank)
+void show(TQWidget *tqparent, int rank)
{
- HighscoresDialog *hd = new HighscoresDialog(rank, parent);
+ HighscoresDialog *hd = new HighscoresDialog(rank, tqparent);
hd->exec();
delete hd;
}
@@ -208,19 +208,19 @@ Item *Manager::createItem(ItemType type)
Item *item = 0;
switch (type) {
case ScoreDefault:
- item = new Item((uint)0, i18n("Score"), Qt::AlignRight);
+ item = new Item((uint)0, i18n("Score"), TQt::AlignRight);
break;
case MeanScoreDefault:
- item = new Item((double)0, i18n("Mean Score"), Qt::AlignRight);
+ item = new Item((double)0, i18n("Mean Score"), TQt::AlignRight);
item->setPrettyFormat(Item::OneDecimal);
item->setPrettySpecial(Item::DefaultNotDefined);
break;
case BestScoreDefault:
- item = new Item((uint)0, i18n("Best Score"), Qt::AlignRight);
+ item = new Item((uint)0, i18n("Best Score"), TQt::AlignRight);
item->setPrettySpecial(Item::DefaultNotDefined);
break;
case ElapsedTime:
- item = new Item((uint)0, i18n("Elapsed Time"), Qt::AlignRight);
+ item = new Item((uint)0, i18n("Elapsed Time"), TQt::AlignRight);
item->setPrettyFormat(Item::MinuteTime);
item->setPrettySpecial(Item::ZeroNotDefined);
break;
@@ -272,7 +272,7 @@ TQString Manager::gameTypeLabel(uint gameType, LabelType type) const
case I18N: break;
case WW: return "normal";
}
- return TQString::null;
+ return TQString();
}
void Manager::addToQueryURL(KURL &url, const TQString &item,
diff --git a/libkdegames/highscore/kexthighscore.h b/libkdegames/highscore/kexthighscore.h
index 5809a896..575ab592 100644
--- a/libkdegames/highscore/kexthighscore.h
+++ b/libkdegames/highscore/kexthighscore.h
@@ -51,17 +51,17 @@ KDE_EXPORT void setGameType(uint gameType);
* Configure the highscores.
* @return true if the configuration has been modified and saved
*/
-KDE_EXPORT bool configure(TQWidget *parent);
+KDE_EXPORT bool configure(TQWidget *tqparent);
/**
* Show the highscores lists.
*/
-KDE_EXPORT void show(TQWidget *parent);
+KDE_EXPORT void show(TQWidget *tqparent);
/**
* Submit a score. See @ref Manager for usage example.
*
- * @param widget a widget used as parent for error message box.
+ * @param widget a widget used as tqparent for error message box.
*/
KDE_EXPORT void submitScore(const Score &score, TQWidget *widget);
@@ -111,7 +111,7 @@ KDE_EXPORT Score firstScore();
* You can replace the score item (for e.g. displaying it differently) with
* setScoreItem or add an item with addScoreItem.
*
- * The players list contains :
+ * The players list tqcontains :
* <ul>
* <li> the player name (as defined by the user in the configuration
* dialog) </li>
diff --git a/libkdegames/highscore/kexthighscore_gui.cpp b/libkdegames/highscore/kexthighscore_gui.cpp
index 3786f529..9aa28e89 100644
--- a/libkdegames/highscore/kexthighscore_gui.cpp
+++ b/libkdegames/highscore/kexthighscore_gui.cpp
@@ -58,8 +58,8 @@ void ShowItem::paintCell(TQPainter *p, const TQColorGroup &cg,
}
//-----------------------------------------------------------------------------
-ScoresList::ScoresList(TQWidget *parent)
- : KListView(parent)
+ScoresList::ScoresList(TQWidget *tqparent)
+ : KListView(tqparent)
{
setSelectionMode(TQListView::NoSelection);
setItemMargin(3);
@@ -92,15 +92,15 @@ void ScoresList::addLineItem(const ItemArray &items,
if (line) line->setText(k, itemText(container, index));
else {
addColumn( container.item()->label() );
- setColumnAlignment(k, container.item()->alignment());
+ setColumnAlignment(k, container.item()->tqalignment());
}
k++;
}
}
//-----------------------------------------------------------------------------
-HighscoresList::HighscoresList(TQWidget *parent)
- : ScoresList(parent)
+HighscoresList::HighscoresList(TQWidget *tqparent)
+ : ScoresList(tqparent)
{}
TQString HighscoresList::itemText(const ItemContainer &item, uint row) const
@@ -120,8 +120,8 @@ void HighscoresList::load(const ItemArray &items, int highlight)
}
//-----------------------------------------------------------------------------
-HighscoresWidget::HighscoresWidget(TQWidget *parent)
- : TQWidget(parent, "show_highscores_widget"),
+HighscoresWidget::HighscoresWidget(TQWidget *tqparent)
+ : TQWidget(tqparent, "show_highscores_widget"),
_scoresUrl(0), _playersUrl(0), _statsTab(0), _histoTab(0)
{
const ScoreInfos &s = internal->scoreInfos();
@@ -197,10 +197,10 @@ void HighscoresWidget::load(int rank)
}
//-----------------------------------------------------------------------------
-HighscoresDialog::HighscoresDialog(int rank, TQWidget *parent)
+HighscoresDialog::HighscoresDialog(int rank, TQWidget *tqparent)
: KDialogBase(internal->nbGameTypes()>1 ? TreeList : Plain,
i18n("Highscores"), Close|User1|User2, Close,
- parent, "show_highscores", true, true,
+ tqparent, "show_highscores", true, true,
KGuiItem(i18n("Configure..."), "configure"),
KGuiItem(i18n("Export..."))), _rank(rank), _tab(0)
{
@@ -210,7 +210,7 @@ HighscoresDialog::HighscoresDialog(int rank, TQWidget *parent)
for (uint i=0; i<internal->nbGameTypes(); i++) {
TQString title = internal->manager.gameTypeLabel(i, Manager::I18N);
TQString icon = internal->manager.gameTypeLabel(i, Manager::Icon);
- TQWidget *w = addVBoxPage(title, TQString::null,
+ TQWidget *w = addVBoxPage(title, TQString(),
BarIcon(icon, KIcon::SizeLarge));
if ( i==internal->gameType() ) createPage(w);
}
@@ -251,7 +251,7 @@ void HighscoresDialog::slotUser1()
void HighscoresDialog::slotUser2()
{
- KURL url = KFileDialog::getSaveURL(TQString::null, TQString::null, this);
+ KURL url = KFileDialog::getSaveURL(TQString(), TQString(), this);
if ( url.isEmpty() ) return;
if ( KIO::NetAccess::exists(url, true, this) ) {
KGuiItem gi = KStdGuiItem::save();
@@ -270,8 +270,8 @@ void HighscoresDialog::slotUser2()
//-----------------------------------------------------------------------------
LastMultipleScoresList::LastMultipleScoresList(
- const TQValueVector<Score> &scores, TQWidget *parent)
- : ScoresList(parent), _scores(scores)
+ const TQValueVector<Score> &scores, TQWidget *tqparent)
+ : ScoresList(tqparent), _scores(scores)
{
const ScoreInfos &s = internal->scoreInfos();
addHeader(s);
@@ -289,7 +289,7 @@ void LastMultipleScoresList::addLineItem(const ItemArray &si,
if (line) line->setText(i, itemText(*container, index));
else {
addColumn( container->item()->label() );
- setColumnAlignment(i, container->item()->alignment());
+ setColumnAlignment(i, container->item()->tqalignment());
}
}
}
@@ -299,7 +299,7 @@ TQString LastMultipleScoresList::itemText(const ItemContainer &item,
{
TQString name = item.name();
if ( name=="rank" )
- return (_scores[row].type()==Won ? i18n("Winner") : TQString::null);
+ return (_scores[row].type()==Won ? i18n("Winner") : TQString());
TQVariant v = _scores[row].data(name);
if ( name=="name" ) return v.toString();
return item.item()->pretty(row, v);
@@ -307,8 +307,8 @@ TQString LastMultipleScoresList::itemText(const ItemContainer &item,
//-----------------------------------------------------------------------------
TotalMultipleScoresList::TotalMultipleScoresList(
- const TQValueVector<Score> &scores, TQWidget *parent)
- : ScoresList(parent), _scores(scores)
+ const TQValueVector<Score> &scores, TQWidget *tqparent)
+ : ScoresList(tqparent), _scores(scores)
{
const ScoreInfos &s = internal->scoreInfos();
addHeader(s);
@@ -333,7 +333,7 @@ void TotalMultipleScoresList::addLineItem(const ItemArray &si,
TQString label =
(i==2 ? i18n("Won Games") : container->item()->label());
addColumn(label);
- setColumnAlignment(i, container->item()->alignment());
+ setColumnAlignment(i, container->item()->tqalignment());
}
}
}
@@ -352,10 +352,10 @@ TQString TotalMultipleScoresList::itemText(const ItemContainer &item,
//-----------------------------------------------------------------------------
-ConfigDialog::ConfigDialog(TQWidget *parent)
+ConfigDialog::ConfigDialog(TQWidget *tqparent)
: KDialogBase(Swallow, i18n("Configure Highscores"),
Ok|Apply|Cancel, Cancel,
- parent, "configure_highscores", true, true),
+ tqparent, "configure_highscores", true, true),
_saved(false), _WWHEnabled(0)
{
TQWidget *page = 0;
@@ -456,7 +456,7 @@ void ConfigDialog::removeSlot()
i18n("This will permanently remove your "
"registration key. You will not be able to use "
"the currently registered nickname anymore."),
- TQString::null, gi);
+ TQString(), gi);
if ( res==KMessageBox::Continue ) {
internal->playerInfos().removeKey();
_registeredName->clear();
@@ -471,7 +471,7 @@ void ConfigDialog::load()
{
internal->hsConfig().readCurrentConfig();
const PlayerInfos &infos = internal->playerInfos();
- _nickname->setText(infos.isAnonymous() ? TQString::null : infos.name());
+ _nickname->setText(infos.isAnonymous() ? TQString() : infos.name());
_comment->setText(infos.comment());
if (_WWHEnabled) {
_WWHEnabled->setChecked(infos.isWWEnabled());
@@ -516,9 +516,9 @@ bool ConfigDialog::save()
}
//-----------------------------------------------------------------------------
-AskNameDialog::AskNameDialog(TQWidget *parent)
+AskNameDialog::AskNameDialog(TQWidget *tqparent)
: KDialogBase(Plain, i18n("Enter Your Nickname"), Ok | Cancel, Ok,
- parent, "ask_name_dialog")
+ tqparent, "ask_name_dialog")
{
internal->hsConfig().readCurrentConfig();
diff --git a/libkdegames/highscore/kexthighscore_gui.h b/libkdegames/highscore/kexthighscore_gui.h
index 2a142856..fc2d3912 100644
--- a/libkdegames/highscore/kexthighscore_gui.h
+++ b/libkdegames/highscore/kexthighscore_gui.h
@@ -58,8 +58,9 @@ class ShowItem : public KListViewItem
class ScoresList : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- ScoresList(TQWidget *parent);
+ ScoresList(TQWidget *tqparent);
void addHeader(const ItemArray &);
@@ -76,8 +77,9 @@ class ScoresList : public KListView
class HighscoresList : public ScoresList
{
Q_OBJECT
+ TQ_OBJECT
public:
- HighscoresList(TQWidget *parent);
+ HighscoresList(TQWidget *tqparent);
void load(const ItemArray &, int highlight);
@@ -85,11 +87,12 @@ class HighscoresList : public ScoresList
TQString itemText(const ItemContainer &, uint row) const;
};
-class HighscoresWidget : public QWidget
+class HighscoresWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- HighscoresWidget(TQWidget *parent);
+ HighscoresWidget(TQWidget *tqparent);
void load(int rank);
@@ -113,8 +116,9 @@ class HighscoresWidget : public QWidget
class HighscoresDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- HighscoresDialog(int rank, TQWidget *parent);
+ HighscoresDialog(int rank, TQWidget *tqparent);
private slots:
void slotUser1();
@@ -132,8 +136,9 @@ class HighscoresDialog : public KDialogBase
class LastMultipleScoresList : public ScoresList
{
Q_OBJECT
+ TQ_OBJECT
public:
- LastMultipleScoresList(const TQValueVector<Score> &, TQWidget *parent);
+ LastMultipleScoresList(const TQValueVector<Score> &, TQWidget *tqparent);
private:
void addLineItem(const ItemArray &, uint index, TQListViewItem *line);
@@ -146,8 +151,9 @@ private:
class TotalMultipleScoresList : public ScoresList
{
Q_OBJECT
+ TQ_OBJECT
public:
- TotalMultipleScoresList(const TQValueVector<Score> &, TQWidget *parent);
+ TotalMultipleScoresList(const TQValueVector<Score> &, TQWidget *tqparent);
private:
void addLineItem(const ItemArray &, uint index, TQListViewItem *line);
@@ -161,8 +167,9 @@ private:
class ConfigDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigDialog(TQWidget *parent);
+ ConfigDialog(TQWidget *tqparent);
bool hasBeenSaved() const { return _saved; }
@@ -188,8 +195,9 @@ class ConfigDialog : public KDialogBase
class AskNameDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- AskNameDialog(TQWidget *parent);
+ AskNameDialog(TQWidget *tqparent);
TQString name() const { return _edit->text(); }
bool dontAskAgain() const { return _checkbox->isChecked(); }
diff --git a/libkdegames/highscore/kexthighscore_internal.cpp b/libkdegames/highscore/kexthighscore_internal.cpp
index 3c73c3aa..a1dfd747 100644
--- a/libkdegames/highscore/kexthighscore_internal.cpp
+++ b/libkdegames/highscore/kexthighscore_internal.cpp
@@ -160,8 +160,8 @@ void ItemArray::_setItem(uint i, const TQString &name, Item *item,
{
at(i)->setItem(item);
at(i)->setName(name);
- at(i)->setGroup(stored ? _group : TQString::null);
- at(i)->setSubGroup(canHaveSubGroup ? _subGroup : TQString::null);
+ at(i)->setGroup(stored ? _group : TQString());
+ at(i)->setSubGroup(canHaveSubGroup ? _subGroup : TQString());
}
void ItemArray::setGroup(const TQString &group)
@@ -262,14 +262,14 @@ PlayerInfos::PlayerInfos()
// standard items
addItem("name", new NameItem);
- Item *it = new Item((uint)0, i18n("Games Count"),Qt::AlignRight);
+ Item *it = new Item((uint)0, i18n("Games Count"),TQt::AlignRight);
addItem("nb games", it, true, true);
it = Manager::createItem(Manager::MeanScoreDefault);
addItem("mean score", it, true, true);
it = Manager::createItem(Manager::BestScoreDefault);
addItem("best score", it, true, true);
addItem("date", new DateItem, true, true);
- it = new Item(TQString::null, i18n("Comment"), Qt::AlignLeft);
+ it = new Item(TQString(), i18n("Comment"), TQt::AlignLeft);
addItem("comment", it);
// statistics items
@@ -314,13 +314,13 @@ PlayerInfos::PlayerInfos()
#ifdef HIGHSCORE_DIRECTORY
if (_oldLocalPlayer) { // player already exists in local config file
// copy player data
- TQString prefix = TQString("%1_").arg(_oldLocalId+1);
+ TQString prefix = TQString("%1_").tqarg(_oldLocalId+1);
TQMap<TQString, TQString> entries =
cg.config()->entryMap("KHighscore_players");
TQMap<TQString, TQString>::const_iterator it;
for (it=entries.begin(); it!=entries.end(); ++it) {
TQString key = it.key();
- if ( key.find(prefix)==0 ) {
+ if ( key.tqfind(prefix)==0 ) {
TQString name = key.right(key.length()-prefix.length());
if ( name!="name" || !isNameUsed(it.data()) )
internal->hsConfig().writeEntry(_id+1, name, it.data());
@@ -364,7 +364,7 @@ uint PlayerInfos::nbEntries() const
TQString PlayerInfos::key() const
{
ConfigGroup cg;
- return cg.config()->readEntry(HS_KEY, TQString::null);
+ return cg.config()->readEntry(HS_KEY, TQString());
}
bool PlayerInfos::isWWEnabled() const
@@ -378,8 +378,8 @@ TQString PlayerInfos::histoName(uint i) const
const TQMemArray<uint> &sh = _histogram;
Q_ASSERT( i<sh.size() || (_bound || i==sh.size()) );
if ( i==sh.size() )
- return TQString("nb scores greater than %1").arg(sh[sh.size()-1]);
- return TQString("nb scores less than %1").arg(sh[i]);
+ return TQString("nb scores greater than %1").tqarg(sh[sh.size()-1]);
+ return TQString("nb scores less than %1").tqarg(sh[i]);
}
uint PlayerInfos::histoSize() const
@@ -484,7 +484,7 @@ void PlayerInfos::modifySettings(const TQString &newName,
TQString PlayerInfos::registeredName() const
{
ConfigGroup cg;
- return cg.config()->readEntry(HS_REGISTERED_NAME, TQString::null);
+ return cg.config()->readEntry(HS_REGISTERED_NAME, TQString());
}
void PlayerInfos::removeKey()
@@ -497,10 +497,10 @@ void PlayerInfos::removeKey()
TQString sk;
do {
i++;
- sk = str.arg(HS_KEY).arg(i);
- } while ( !cg.config()->readEntry(sk, TQString::null).isEmpty() );
+ sk = str.tqarg(HS_KEY).tqarg(i);
+ } while ( !cg.config()->readEntry(sk, TQString()).isEmpty() );
cg.config()->writeEntry(sk, key());
- cg.config()->writeEntry(str.arg(HS_REGISTERED_NAME).arg(i),
+ cg.config()->writeEntry(str.tqarg(HS_REGISTERED_NAME).tqarg(i),
registeredName());
// clear current key/nickname
@@ -602,15 +602,15 @@ const char *DUMMY_STRINGS[] = {
const char *UNABLE_TO_CONTACT =
I18N_NOOP("Unable to contact world-wide highscore server");
-bool ManagerPrivate::doQuery(const KURL &url, TQWidget *parent,
+bool ManagerPrivate::doQuery(const KURL &url, TQWidget *tqparent,
TQDomNamedNodeMap *map)
{
KIO::http_update_cache(url, true, 0); // remove cache !
TQString tmpFile;
- if ( !KIO::NetAccess::download(url, tmpFile, parent) ) {
- TQString details = i18n("Server URL: %1").arg(url.host());
- KMessageBox::detailedSorry(parent, i18n(UNABLE_TO_CONTACT), details);
+ if ( !KIO::NetAccess::download(url, tmpFile, tqparent) ) {
+ TQString details = i18n("Server URL: %1").tqarg(url.host());
+ KMessageBox::detailedSorry(tqparent, i18n(UNABLE_TO_CONTACT), details);
return false;
}
@@ -618,7 +618,7 @@ bool ManagerPrivate::doQuery(const KURL &url, TQWidget *parent,
if ( !file.open(IO_ReadOnly) ) {
KIO::NetAccess::removeTempFile(tmpFile);
TQString details = i18n("Unable to open temporary file.");
- KMessageBox::detailedSorry(parent, i18n(UNABLE_TO_CONTACT), details);
+ KMessageBox::detailedSorry(tqparent, i18n(UNABLE_TO_CONTACT), details);
return false;
}
@@ -641,26 +641,26 @@ bool ManagerPrivate::doQuery(const KURL &url, TQWidget *parent,
TQString msg = i18n(attr.value().latin1());
TQString caption = i18n("Message from world-wide highscores "
"server");
- KMessageBox::sorry(parent, msg, caption);
+ KMessageBox::sorry(tqparent, msg, caption);
return false;
}
}
}
TQString msg = i18n("Invalid answer from world-wide highscores server.");
- TQString details = i18n("Raw message: %1").arg(content);
- KMessageBox::detailedSorry(parent, msg, details);
+ TQString details = i18n("Raw message: %1").tqarg(content);
+ KMessageBox::detailedSorry(tqparent, msg, details);
return false;
}
bool ManagerPrivate::getFromQuery(const TQDomNamedNodeMap &map,
const TQString &name, TQString &value,
- TQWidget *parent)
+ TQWidget *tqparent)
{
TQDomAttr attr = map.namedItem(name).toAttr();
if ( attr.isNull() ) {
- KMessageBox::sorry(parent,
+ KMessageBox::sorry(tqparent,
i18n("Invalid answer from world-wide "
- "highscores server (missing item: %1).").arg(name));
+ "highscores server (missing item: %1).").tqarg(name));
return false;
}
value = attr.value();
@@ -780,7 +780,7 @@ int ManagerPrivate::submitScore(const Score &ascore,
Score score = ascore;
score.setData("id", _playerInfos->id() + 1);
- score.setData("date", TQDateTime::currentDateTime());
+ score.setData("date", TQDateTime::tqcurrentDateTime());
// ask new name if anonymous and winner
const char *dontAskAgainName = "highscore_ask_name_dialog";
diff --git a/libkdegames/highscore/kexthighscore_internal.h b/libkdegames/highscore/kexthighscore_internal.h
index ff70c5cd..e0aa8ca5 100644
--- a/libkdegames/highscore/kexthighscore_internal.h
+++ b/libkdegames/highscore/kexthighscore_internal.h
@@ -46,7 +46,7 @@ class RankItem : public Item
{
public:
RankItem()
- : Item((uint)0, i18n("Rank"), Qt::AlignRight) {}
+ : Item((uint)0, i18n("Rank"), TQt::AlignRight) {}
TQVariant read(uint rank, const TQVariant &) const { return rank; }
TQString pretty(uint rank, const TQVariant &) const
@@ -57,7 +57,7 @@ class NameItem : public Item
{
public:
NameItem()
- : Item(TQString::null, i18n("Name"), Qt::AlignLeft) {
+ : Item(TQString(), i18n("Name"), TQt::AlignLeft) {
setPrettySpecial(Anonymous);
}
};
@@ -66,7 +66,7 @@ class DateItem : public Item
{
public:
DateItem()
- : Item(TQDateTime(), i18n("Date"), Qt::AlignRight) {
+ : Item(TQDateTime(), i18n("Date"), TQt::AlignRight) {
setPrettyFormat(DateTime);
}
};
@@ -75,7 +75,7 @@ class SuccessPercentageItem : public Item
{
public:
SuccessPercentageItem()
- : Item((double)-1, i18n("Success"), Qt::AlignRight) {
+ : Item((double)-1, i18n("Success"), TQt::AlignRight) {
setPrettyFormat(Percentage);
setPrettySpecial(NegativeNotDefined);
}
@@ -176,7 +176,7 @@ class ScoreInfos : public ItemArray
class ConfigGroup : public KConfigGroupSaver
{
public:
- ConfigGroup(const TQString &group = TQString::null)
+ ConfigGroup(const TQString &group = TQString())
: KConfigGroupSaver(kapp->config(), group) {}
};
@@ -243,7 +243,7 @@ class ManagerPrivate
PlayerInfos &playerInfos() { return *_playerInfos; }
KHighscore &hsConfig() { return *_hsConfig; }
enum QueryType { Submit, Register, Change, Players, Scores };
- KURL queryURL(QueryType type, const TQString &newName=TQString::null) const;
+ KURL queryURL(QueryType type, const TQString &newName=TQString()) const;
void exportHighscores(TQTextStream &);
@@ -264,11 +264,11 @@ class ManagerPrivate
// return -1 if not a local best score
int rank(const Score &score) const;
- bool submitWorldWide(const Score &score, TQWidget *parent) const;
- static bool doQuery(const KURL &url, TQWidget *parent,
+ bool submitWorldWide(const Score &score, TQWidget *tqparent) const;
+ static bool doQuery(const KURL &url, TQWidget *tqparent,
TQDomNamedNodeMap *map = 0);
static bool getFromQuery(const TQDomNamedNodeMap &map, const TQString &name,
- TQString &value, TQWidget *parent);
+ TQString &value, TQWidget *tqparent);
void convertToGlobal();
};
diff --git a/libkdegames/highscore/kexthighscore_item.cpp b/libkdegames/highscore/kexthighscore_item.cpp
index fa6c7e2c..44fe64fa 100644
--- a/libkdegames/highscore/kexthighscore_item.cpp
+++ b/libkdegames/highscore/kexthighscore_item.cpp
@@ -33,8 +33,8 @@ namespace KExtHighscore
{
//-----------------------------------------------------------------------------
-Item::Item(const TQVariant &def, const TQString &label, int alignment)
- : _default(def), _label(label), _alignment(alignment),
+Item::Item(const TQVariant &def, const TQString &label, int tqalignment)
+ : _default(def), _label(label), _tqalignment(tqalignment),
_format(NoFormat), _special(NoSpecial)
{}
@@ -154,13 +154,13 @@ Score::~Score()
const TQVariant &Score::data(const TQString &name) const
{
- Q_ASSERT( _data.contains(name) );
+ Q_ASSERT( _data.tqcontains(name) );
return _data[name];
}
void Score::setData(const TQString &name, const TQVariant &value)
{
- Q_ASSERT( _data.contains(name) );
+ Q_ASSERT( _data.tqcontains(name) );
Q_ASSERT( _data[name].type()==value.type() );
_data[name] = value;
}
@@ -178,14 +178,14 @@ bool Score::operator <(const Score &score)
TQDataStream &operator <<(TQDataStream &s, const Score &score)
{
- s << (Q_UINT8)score.type();
+ s << (TQ_UINT8)score.type();
s << score._data;
return s;
}
TQDataStream &operator >>(TQDataStream &s, Score &score)
{
- Q_UINT8 type;
+ TQ_UINT8 type;
s >> type;
score._type = (ScoreType)type;
s >> score._data;
@@ -238,7 +238,7 @@ void MultiplayerScores::addScore(uint i, const Score &score)
_scores[i]._data["nb won games"] = won;
}
-void MultiplayerScores::show(TQWidget *parent)
+void MultiplayerScores::show(TQWidget *tqparent)
{
// check consistency
if ( _nbGames.size()<2 ) kdWarning(11002) << "less than 2 players" << endl;
@@ -271,7 +271,7 @@ void MultiplayerScores::show(TQWidget *parent)
// show the scores
KDialogBase dialog(KDialogBase::Plain, i18n("Multiplayers Scores"),
KDialogBase::Close, KDialogBase::Close,
- parent, "show_multiplayers_score", true, true);
+ tqparent, "show_multiplayers_score", true, true);
TQHBoxLayout *hbox = new TQHBoxLayout(dialog.plainPage(),
KDialog::marginHint(), KDialog::spacingHint());
@@ -287,7 +287,7 @@ void MultiplayerScores::show(TQWidget *parent)
vbox = new TQVBox(dialog.plainPage());
hbox->addWidget(vbox);
(void)new TQLabel(i18n("Scores for the last %1 games:")
- .arg(_nbGames[0]), vbox);
+ .tqarg(_nbGames[0]), vbox);
(void)new TotalMultipleScoresList(ordered, vbox);
}
diff --git a/libkdegames/highscore/kexthighscore_item.h b/libkdegames/highscore/kexthighscore_item.h
index 490908d7..d5faa380 100644
--- a/libkdegames/highscore/kexthighscore_item.h
+++ b/libkdegames/highscore/kexthighscore_item.h
@@ -79,10 +79,10 @@ class KDE_EXPORT Item
* Be sure to cast the value to the required type (for e.g. with uint).
* @param label the label corresponding to the item. If empty, the item
* is not shown.
- * @param alignment the alignment of the item.
+ * @param tqalignment the tqalignment of the item.
*/
Item(const TQVariant &def = TQVariant::Invalid,
- const TQString &label = TQString::null, int alignment = Qt::AlignRight);
+ const TQString &label = TQString(), int tqalignment = TQt::AlignRight);
virtual ~Item();
@@ -114,9 +114,9 @@ class KDE_EXPORT Item
TQString label() const { return _label; }
/**
- * @return the alignment.
+ * @return the tqalignment.
*/
- int alignment() const { return _alignment; }
+ int tqalignment() const { return _tqalignment; }
/**
* Set default value.
@@ -149,7 +149,7 @@ class KDE_EXPORT Item
private:
TQVariant _default;
TQString _label;
- int _alignment;
+ int _tqalignment;
Format _format;
Special _special;
@@ -294,7 +294,7 @@ class KDE_EXPORT MultiplayerScores
/**
* Show scores.
*/
- void show(TQWidget *parent);
+ void show(TQWidget *tqparent);
private:
TQValueVector<uint> _nbGames;
diff --git a/libkdegames/highscore/kexthighscore_tab.cpp b/libkdegames/highscore/kexthighscore_tab.cpp
index 3b2b5852..8c41227c 100644
--- a/libkdegames/highscore/kexthighscore_tab.cpp
+++ b/libkdegames/highscore/kexthighscore_tab.cpp
@@ -39,8 +39,8 @@ namespace KExtHighscore
{
//-----------------------------------------------------------------------------
-PlayersCombo::PlayersCombo(TQWidget *parent, const char *name)
- : TQComboBox(parent, name)
+PlayersCombo::PlayersCombo(TQWidget *tqparent, const char *name)
+ : TQComboBox(tqparent, name)
{
const PlayerInfos &p = internal->playerInfos();
for (uint i = 0; i<p.nbEntries(); i++)
@@ -65,8 +65,8 @@ void PlayersCombo::load()
}
//-----------------------------------------------------------------------------
-AdditionalTab::AdditionalTab(TQWidget *parent, const char *name)
- : TQWidget(parent, name)
+AdditionalTab::AdditionalTab(TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
{
TQVBoxLayout *top = new TQVBoxLayout(this, KDialogBase::marginHint(),
KDialogBase::spacingHint());
@@ -96,8 +96,8 @@ void AdditionalTab::allSelected()
TQString AdditionalTab::percent(uint n, uint total, bool withBraces)
{
- if ( n==0 || total==0 ) return TQString::null;
- TQString s = TQString("%1%").arg(100.0 * n / total, 0, 'f', 1);
+ if ( n==0 || total==0 ) return TQString();
+ TQString s = TQString("%1%").tqarg(100.0 * n / total, 0, 'f', 1);
return (withBraces ? TQString("(") + s + ")" : s);
}
@@ -116,11 +116,11 @@ const char *StatisticsTab::TREND_LABELS[Nb_Trends] = {
I18N_NOOP("Current:"), I18N_NOOP("Max won:"), I18N_NOOP("Max lost:")
};
-StatisticsTab::StatisticsTab(TQWidget *parent)
- : AdditionalTab(parent, "statistics_tab")
+StatisticsTab::StatisticsTab(TQWidget *tqparent)
+ : AdditionalTab(tqparent, "statistics_tab")
{
// construct GUI
- TQVBoxLayout *top = static_cast<TQVBoxLayout *>(layout());
+ TQVBoxLayout *top = static_cast<TQVBoxLayout *>(tqlayout());
TQHBoxLayout *hbox = new TQHBoxLayout(top);
TQVBoxLayout *vbox = new TQVBoxLayout(hbox);
@@ -184,7 +184,7 @@ void StatisticsTab::load()
TQString StatisticsTab::percent(const Data &d, Count count) const
{
- if ( count==Total ) return TQString::null;
+ if ( count==Total ) return TQString();
return AdditionalTab::percent(d.count[count], d.count[Total], true);
}
@@ -205,11 +205,11 @@ void StatisticsTab::display(uint i)
}
//-----------------------------------------------------------------------------
-HistogramTab::HistogramTab(TQWidget *parent)
- : AdditionalTab(parent, "histogram_tab")
+HistogramTab::HistogramTab(TQWidget *tqparent)
+ : AdditionalTab(tqparent, "histogram_tab")
{
// construct GUI
- TQVBoxLayout *top = static_cast<TQVBoxLayout *>(layout());
+ TQVBoxLayout *top = static_cast<TQVBoxLayout *>(tqlayout());
_list = new KListView(this);
_list->setSelectionMode(TQListView::NoSelection);
@@ -225,7 +225,7 @@ HistogramTab::HistogramTab(TQWidget *parent)
_list->addColumn(i18n("Count"));
_list->addColumn(i18n("Percent"));
for (uint i=0; i<4; i++) _list->setColumnAlignment(i, AlignRight);
- _list->addColumn(TQString::null);
+ _list->addColumn(TQString());
const Item *sitem = internal->scoreInfos().item("score")->item();
const PlayerInfos &pi = internal->playerInfos();
@@ -270,7 +270,7 @@ void HistogramTab::display(uint i)
uint nb = _counts[i*s + k];
item->setText(2, TQString::number(nb));
item->setText(3, percent(nb, _data[i]));
- uint width = (_data[i]==0 ? 0 : qRound(150.0 * nb / _data[i]));
+ uint width = (_data[i]==0 ? 0 : tqRound(150.0 * nb / _data[i]));
TQPixmap pixmap(width, 10);
pixmap.fill(blue);
item->setPixmap(4, pixmap);
diff --git a/libkdegames/highscore/kexthighscore_tab.h b/libkdegames/highscore/kexthighscore_tab.h
index 4303209d..dc0d7536 100644
--- a/libkdegames/highscore/kexthighscore_tab.h
+++ b/libkdegames/highscore/kexthighscore_tab.h
@@ -31,11 +31,12 @@ namespace KExtHighscore
{
//-----------------------------------------------------------------------------
-class PlayersCombo : public QComboBox
+class PlayersCombo : public TQComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- PlayersCombo(TQWidget *parent = 0, const char *name = 0);
+ PlayersCombo(TQWidget *tqparent = 0, const char *name = 0);
void load();
@@ -49,11 +50,12 @@ class PlayersCombo : public QComboBox
};
//-----------------------------------------------------------------------------
-class AdditionalTab : public QWidget
+class AdditionalTab : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- AdditionalTab(TQWidget *parent, const char *name);
+ AdditionalTab(TQWidget *tqparent, const char *name);
virtual void load();
@@ -74,8 +76,9 @@ class AdditionalTab : public QWidget
class StatisticsTab : public AdditionalTab
{
Q_OBJECT
+ TQ_OBJECT
public:
- StatisticsTab(TQWidget *parent);
+ StatisticsTab(TQWidget *tqparent);
void load();
@@ -99,8 +102,9 @@ class StatisticsTab : public AdditionalTab
class HistogramTab : public AdditionalTab
{
Q_OBJECT
+ TQ_OBJECT
public:
- HistogramTab(TQWidget *parent);
+ HistogramTab(TQWidget *tqparent);
void load();
diff --git a/libkdegames/highscore/khighscore.cpp b/libkdegames/highscore/khighscore.cpp
index 26bb47c3..dd10f2ab 100644
--- a/libkdegames/highscore/khighscore.cpp
+++ b/libkdegames/highscore/khighscore.cpp
@@ -56,14 +56,14 @@ static KStaticDeleter<KFileLock> lockSD;
static KStaticDeleter<KRawConfig> configSD;
-KHighscore::KHighscore(TQObject* parent)
- : TQObject(parent)
+KHighscore::KHighscore(TQObject* tqparent)
+ : TQObject(tqparent)
{
init(true);
}
-KHighscore::KHighscore(bool forceLocal, TQObject* parent)
- : TQObject(parent)
+KHighscore::KHighscore(bool forceLocal, TQObject* tqparent)
+ : TQObject(tqparent)
{
init(forceLocal);
}
@@ -96,7 +96,7 @@ void KHighscore::init(const char *appname)
{
#ifdef HIGHSCORE_DIRECTORY
const TQString filename = TQString::fromLocal8Bit("%1/%2.scores")
- .arg(HIGHSCORE_DIRECTORY).arg(appname);
+ .tqarg(HIGHSCORE_DIRECTORY).tqarg(appname);
int fd = open(filename.local8Bit(), O_RDWR);
if ( fd<0 ) kdFatal(11002) << "cannot open global highscore file \""
<< filename << "\"" << endl;
@@ -132,7 +132,7 @@ bool KHighscore::lockForWriting(TQWidget *widget)
if ( !first ) {
KGuiItem item = KStdGuiItem::cont();
item.setText(i18n("Retry"));
- int res = KMessageBox::warningContinueCancel(widget, i18n("Cannot access the highscore file. Another user is probably currently writing to it."), TQString::null, item, "ask_lock_global_highscore_file");
+ int res = KMessageBox::warningContinueCancel(widget, i18n("Cannot access the highscore file. Another user is probably currently writing to it."), TQString(), item, "ask_lock_global_highscore_file");
if ( res==KMessageBox::Cancel ) break;
} else sleep(1);
first = false;
@@ -169,7 +169,7 @@ void KHighscore::writeEntry(int entry, const TQString& key, const TQVariant& val
{
Q_ASSERT( isLocked() );
KConfigGroupSaver cg(config(), group());
- TQString confKey = TQString("%1_%2").arg(entry).arg(key);
+ TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key);
cg.config()->writeEntry(confKey, value);
}
@@ -177,7 +177,7 @@ void KHighscore::writeEntry(int entry, const TQString& key, int value)
{
Q_ASSERT( isLocked() );
KConfigGroupSaver cg(config(), group());
- TQString confKey = TQString("%1_%2").arg(entry).arg(key);
+ TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key);
cg.config()->writeEntry(confKey, value);
}
@@ -185,35 +185,35 @@ void KHighscore::writeEntry(int entry, const TQString& key, const TQString &valu
{
Q_ASSERT (isLocked() );
KConfigGroupSaver cg(config(), group());
- TQString confKey = TQString("%1_%2").arg(entry).arg(key);
+ TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key);
cg.config()->writeEntry(confKey, value);
}
TQVariant KHighscore::readPropertyEntry(int entry, const TQString& key, const TQVariant& pDefault) const
{
KConfigGroupSaver cg(config(), group());
- TQString confKey = TQString("%1_%2").arg(entry).arg(key);
+ TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key);
return cg.config()->readPropertyEntry(confKey, pDefault);
}
TQString KHighscore::readEntry(int entry, const TQString& key, const TQString& pDefault) const
{
KConfigGroupSaver cg(config(), group());
- TQString confKey = TQString("%1_%2").arg(entry).arg(key);
+ TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key);
return cg.config()->readEntry(confKey, pDefault);
}
int KHighscore::readNumEntry(int entry, const TQString& key, int pDefault) const
{
KConfigGroupSaver cg(config(), group());
- TQString confKey = TQString("%1_%2").arg(entry).arg(key);
+ TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key);
return cg.config()->readNumEntry(confKey, pDefault);
}
bool KHighscore::hasEntry(int entry, const TQString& key) const
{
KConfigGroupSaver cg(config(), group());
- TQString confKey = TQString("%1_%2").arg(entry).arg(key);
+ TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key);
return cg.config()->hasKey(confKey);
}
@@ -246,9 +246,9 @@ const TQString& KHighscore::highscoreGroup() const
TQString KHighscore::group() const
{
if ( highscoreGroup().isNull() )
- return (d->global ? TQString::null : GROUP);
+ return (d->global ? TQString() : GROUP);
return (d->global ? highscoreGroup()
- : TQString("%1_%2").arg(GROUP).arg(highscoreGroup()));
+ : TQString("%1_%2").tqarg(GROUP).tqarg(highscoreGroup()));
}
bool KHighscore::hasTable() const
diff --git a/libkdegames/highscore/khighscore.h b/libkdegames/highscore/khighscore.h
index 42c9fcda..ba7a4bd0 100644
--- a/libkdegames/highscore/khighscore.h
+++ b/libkdegames/highscore/khighscore.h
@@ -67,7 +67,7 @@ class KHighscorePrivate;
* single player, so the "best times" of a player. To write highscores for a
* specific player in a specific level you will have to use a more complex way:
* \code
- * TQString group = TQString("%1_%2").arg(player).arg(level);
+ * TQString group = TQString("%1_%2").tqarg(player).tqarg(level);
* table->setGroup(group);
* writeHighscore(table, player, level);
* \endcode
@@ -81,15 +81,16 @@ class KHighscorePrivate;
* Easy, what?
* @author Andreas Beckermann <b_mann@gmx.de>
**/
-class KDE_EXPORT KHighscore : public QObject
+class KDE_EXPORT KHighscore : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/** @obsolete
* Constructor. The highscore file is forced to be local to support
* games using the old behaviour.
*/
- KHighscore(TQObject* parent = 0);
+ KHighscore(TQObject* tqparent = 0);
/**
* Constructor.
@@ -97,10 +98,10 @@ public:
* @param forceLocal if true, the local highscore file is used even
* when the configuration has been set to use a system-wide file. This
* is convenient for converting highscores from legacy applications.
- * @param parent parent widget for this widget
+ * @param tqparent tqparent widget for this widget
* @since 3.2
*/
- KHighscore(bool forceLocal, TQObject *parent);
+ KHighscore(bool forceLocal, TQObject *tqparent);
/**
* Read the current state of the highscore file. Remember that when
@@ -132,7 +133,7 @@ public:
* If the config file cannot be locked,
* the method waits for 1 second and, if it failed again, displays
* a message box asking for retry or cancel.
- * @param widget used as the parent of the message box.
+ * @param widget used as the tqparent of the message box.
*
* @return false on error or if the config file is locked by another
* process. In such case, the config stays read-only.
@@ -193,7 +194,7 @@ public:
* @return The value of this entry+key pair or pDefault if the entry+key
* pair doesn't exist
**/
- TQString readEntry(int entry, const TQString& key, const TQString& pDefault = TQString::null) const;
+ TQString readEntry(int entry, const TQString& key, const TQString& pDefault = TQString()) const;
/**
* Read a numeric value.
@@ -273,15 +274,15 @@ public:
* Set the new highscore group. The group is being prefixed with
* "KHighscore_" in the table.
* @param groupname The new groupname. E.g. use "easy" for the easy
- * level of your game. If you use TQString::null (the default) the
+ * level of your game. If you use TQString() (the default) the
* default group is used.
**/
- void setHighscoreGroup(const TQString& groupname = TQString::null);
+ void setHighscoreGroup(const TQString& groupname = TQString());
/**
* @return The currently used group. This doesn't contain the prefix
* ("KHighscore_") but the same as setHighscoreGroup uses. The
- * default is TQString::null
+ * default is TQString()
**/
const TQString& highscoreGroup() const;
diff --git a/libkdegames/highscore/kscoredialog.cpp b/libkdegames/highscore/kscoredialog.cpp
index 7bed0c6b..0a3710f4 100644
--- a/libkdegames/highscore/kscoredialog.cpp
+++ b/libkdegames/highscore/kscoredialog.cpp
@@ -44,7 +44,7 @@ class KScoreDialog::KScoreDialogPrivate
public:
TQPtrList<FieldInfo> scores;
TQWidget *page;
- TQGridLayout *layout;
+ TQGridLayout *tqlayout;
TQLineEdit *edit;
TQPtrVector<TQWidgetStack> stack;
TQPtrVector<TQLabel> labels;
@@ -64,8 +64,8 @@ public:
};
-KScoreDialog::KScoreDialog(int fields, TQWidget *parent, const char *oname)
- : KDialogBase(parent, oname, true, i18n("High Scores"), Ok, Ok, true)
+KScoreDialog::KScoreDialog(int fields, TQWidget *tqparent, const char *oname)
+ : KDialogBase(tqparent, oname, true, i18n("High Scores"), Ok, Ok, true)
{
d = new KScoreDialogPrivate();
d->edit = 0;
@@ -126,36 +126,36 @@ void KScoreDialog::setupDialog()
d->col[field] = d->nrCols++;
}
- d->layout = new TQGridLayout(d->page, 15, d->nrCols, marginHint() + 20, spacingHint());
- d->layout->addRowSpacing(4, 15);
+ d->tqlayout = new TQGridLayout(d->page, 15, d->nrCols, marginHint() + 20, spacingHint());
+ d->tqlayout->addRowSpacing(4, 15);
d->commentLabel = new TQLabel(d->page);
- d->commentLabel->setAlignment(AlignVCenter | AlignHCenter);
- d->layout->addMultiCellWidget(d->commentLabel, 1, 1, 0, d->nrCols-1);
+ d->commentLabel->tqsetAlignment(AlignVCenter | AlignHCenter);
+ d->tqlayout->addMultiCellWidget(d->commentLabel, 1, 1, 0, d->nrCols-1);
TQFont bold = font();
bold.setBold(true);
TQLabel *label;
- d->layout->addColSpacing(0, 50);
+ d->tqlayout->addColSpacing(0, 50);
label = new TQLabel(i18n("Rank"), d->page);
- d->layout->addWidget(label, 3, 0);
+ d->tqlayout->addWidget(label, 3, 0);
label->setFont(bold);
for(int field = 1; field < d->fields; field = field * 2)
{
if (d->fields & field)
{
- d->layout->addColSpacing(d->col[field], 50);
+ d->tqlayout->addColSpacing(d->col[field], 50);
label = new TQLabel(d->header[field], d->page);
- d->layout->addWidget(label, 3, d->col[field], field <= Name ? AlignLeft : AlignRight);
+ d->tqlayout->addWidget(label, 3, d->col[field], field <= Name ? AlignLeft : AlignRight);
label->setFont(bold);
}
}
- KSeparator *sep = new KSeparator(Horizontal, d->page);
- d->layout->addMultiCellWidget(sep, 4, 4, 0, d->nrCols-1);
+ KSeparator *sep = new KSeparator(Qt::Horizontal, d->page);
+ d->tqlayout->addMultiCellWidget(sep, 4, 4, 0, d->nrCols-1);
d->labels.resize(d->nrCols * 10);
d->stack.resize(10);
@@ -164,14 +164,14 @@ void KScoreDialog::setupDialog()
for (int i = 1; i <= 10; ++i) {
TQLabel *label;
num.setNum(i);
- label = new TQLabel(i18n("#%1").arg(num), d->page);
+ label = new TQLabel(i18n("#%1").tqarg(num), d->page);
d->labels.insert((i-1)*d->nrCols + 0, label);
- d->layout->addWidget(label, i+4, 0);
+ d->tqlayout->addWidget(label, i+4, 0);
if (d->fields & Name)
{
TQWidgetStack *stack = new TQWidgetStack(d->page);
d->stack.insert(i-1, stack);
- d->layout->addWidget(stack, i+4, d->col[Name]);
+ d->tqlayout->addWidget(stack, i+4, d->col[Name]);
label = new TQLabel(d->page);
d->labels.insert((i-1)*d->nrCols + d->col[Name], label);
stack->addWidget(label);
@@ -183,7 +183,7 @@ void KScoreDialog::setupDialog()
{
label = new TQLabel(d->page);
d->labels.insert((i-1)*d->nrCols + d->col[field], label);
- d->layout->addWidget(label, i+4, d->col[field], AlignRight);
+ d->tqlayout->addWidget(label, i+4, d->col[field], AlignRight);
}
}
}
@@ -202,17 +202,17 @@ void KScoreDialog::aboutToShow()
{
d->commentLabel->setMinimumSize(TQSize(1,1));
d->commentLabel->hide();
- d->layout->addRowSpacing(0, -15);
- d->layout->addRowSpacing(2, -15);
+ d->tqlayout->addRowSpacing(0, -15);
+ d->tqlayout->addRowSpacing(2, -15);
}
else
{
- d->commentLabel->setMinimumSize(d->commentLabel->sizeHint());
+ d->commentLabel->setMinimumSize(d->commentLabel->tqsizeHint());
d->commentLabel->show();
- d->layout->addRowSpacing(0, -10);
- d->layout->addRowSpacing(2, 10);
+ d->tqlayout->addRowSpacing(0, -10);
+ d->tqlayout->addRowSpacing(2, 10);
}
- d->comment = TQString::null;
+ d->comment = TQString();
TQFont normal = font();
TQFont bold = normal;
@@ -267,7 +267,7 @@ void KScoreDialog::aboutToShow()
}
}
d->latest = -1;
- setFixedSize(minimumSizeHint());
+ setFixedSize(tqminimumSizeHint());
}
void KScoreDialog::loadScores()
diff --git a/libkdegames/highscore/kscoredialog.h b/libkdegames/highscore/kscoredialog.h
index d5a7eac0..35a593b3 100644
--- a/libkdegames/highscore/kscoredialog.h
+++ b/libkdegames/highscore/kscoredialog.h
@@ -39,6 +39,7 @@ class TQWidgetStack;
*/
class KDE_EXPORT KScoreDialog : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
enum Fields { Name = 1 << 0,
@@ -56,10 +57,10 @@ public:
/**
* @param fields Which fields should be listed.
- * @param parent passed to parent TQWidget constructor
- * @param name passed to parent TQWidget constructor
+ * @param tqparent passed to tqparent TQWidget constructor
+ * @param name passed to tqparent TQWidget constructor
*/
- KScoreDialog(int fields, TQWidget *parent=0, const char *name=0);
+ KScoreDialog(int fields, TQWidget *tqparent=0, const char *name=0);
~KScoreDialog();
diff --git a/libkdegames/kcanvasrootpixmap.cpp b/libkdegames/kcanvasrootpixmap.cpp
index 5e036740..20440458 100644
--- a/libkdegames/kcanvasrootpixmap.cpp
+++ b/libkdegames/kcanvasrootpixmap.cpp
@@ -33,7 +33,7 @@ KCanvasRootPixmap::KCanvasRootPixmap(TQCanvasView *view, const char *name)
void KCanvasRootPixmap::backgroundUpdatedSlot(const TQPixmap &pixmap)
{
if ( _view && _view->canvas() )
- _view->canvas()->setBackgroundPixmap(pixmap);
+ _view->canvas()->tqsetBackgroundPixmap(pixmap);
}
#include "kcanvasrootpixmap.moc"
diff --git a/libkdegames/kcanvasrootpixmap.h b/libkdegames/kcanvasrootpixmap.h
index 6aedef16..91dfa8bd 100644
--- a/libkdegames/kcanvasrootpixmap.h
+++ b/libkdegames/kcanvasrootpixmap.h
@@ -40,6 +40,7 @@ class TQCanvasView;
class KDE_EXPORT KCanvasRootPixmap : public KRootPixmap
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/libkdegames/kcarddialog.cpp b/libkdegames/kcarddialog.cpp
index 73011c9a..89e48e42 100644
--- a/libkdegames/kcarddialog.cpp
+++ b/libkdegames/kcarddialog.cpp
@@ -41,9 +41,9 @@
#include <tqpushbutton.h>
#include <kdebug.h>
-#define KCARD_DEFAULTDECK TQString::fromLatin1("deck0.png")
-#define KCARD_DEFAULTCARD TQString::fromLatin1("11.png")
-#define KCARD_DEFAULTCARDDIR TQString::fromLatin1("cards-default/")
+#define KCARD_DEFAULTDECK TQString::tqfromLatin1("deck0.png")
+#define KCARD_DEFAULTCARD TQString::tqfromLatin1("11.png")
+#define KCARD_DEFAULTCARDDIR TQString::tqfromLatin1("cards-default/")
// values for the resize slider
#define SLIDER_MIN 400
@@ -51,19 +51,19 @@
// KConfig entries
#define CONF_GROUP "KCardDialog"
-#define CONF_RANDOMDECK TQString::fromLatin1("RandomDeck")
-#define CONF_DECK TQString::fromLatin1("Deck")
-#define CONF_CARDDIR TQString::fromLatin1("CardDir")
-#define CONF_RANDOMCARDDIR TQString::fromLatin1("RandomCardDir")
-#define CONF_USEGLOBALDECK TQString::fromLatin1("GlobalDeck")
-#define CONF_USEGLOBALCARDDIR TQString::fromLatin1("GlobalCardDir")
-#define CONF_SCALE TQString::fromLatin1("Scale")
+#define CONF_RANDOMDECK TQString::tqfromLatin1("RandomDeck")
+#define CONF_DECK TQString::tqfromLatin1("Deck")
+#define CONF_CARDDIR TQString::tqfromLatin1("CardDir")
+#define CONF_RANDOMCARDDIR TQString::tqfromLatin1("RandomCardDir")
+#define CONF_USEGLOBALDECK TQString::tqfromLatin1("GlobalDeck")
+#define CONF_USEGLOBALCARDDIR TQString::tqfromLatin1("GlobalCardDir")
+#define CONF_SCALE TQString::tqfromLatin1("Scale")
-#define CONF_GLOBAL_GROUP TQString::fromLatin1("KCardDialog Settings")
-#define CONF_GLOBAL_DECK TQString::fromLatin1("GlobalDeck")
-#define CONF_GLOBAL_CARDDIR TQString::fromLatin1("GlobalCardDir")
-#define CONF_GLOBAL_RANDOMDECK TQString::fromLatin1("GlobalRandomDeck")
-#define CONF_GLOBAL_RANDOMCARDDIR TQString::fromLatin1("GlobalRandomCardDir")
+#define CONF_GLOBAL_GROUP TQString::tqfromLatin1("KCardDialog Settings")
+#define CONF_GLOBAL_DECK TQString::tqfromLatin1("GlobalDeck")
+#define CONF_GLOBAL_CARDDIR TQString::tqfromLatin1("GlobalCardDir")
+#define CONF_GLOBAL_RANDOMDECK TQString::tqfromLatin1("GlobalRandomDeck")
+#define CONF_GLOBAL_RANDOMCARDDIR TQString::tqfromLatin1("GlobalRandomCardDir")
class KCardDialogPrivate
@@ -128,9 +128,9 @@ int KCardDialog::getCardDeck(TQString &pDeck, TQString &pCardDir, TQWidget *pPar
// TODO check for global cards/decks!!!!
pDeck=dlg.deck();
pCardDir=dlg.cardDir();
- if (!pCardDir.isNull() && pCardDir.right(1)!=TQString::fromLatin1("/"))
+ if (!pCardDir.isNull() && pCardDir.right(1)!=TQString::tqfromLatin1("/"))
{
- pCardDir+=TQString::fromLatin1("/");
+ pCardDir+=TQString::tqfromLatin1("/");
}
if (pRandomDeck)
{
@@ -218,7 +218,7 @@ void KCardDialog::getConfigCardDeck(KConfig* conf, TQString &pDeck, TQString &pC
TQString KCardDialog::getDefaultDeck()
{
KCardDialog::init();
- return locate("cards", TQString::fromLatin1("decks/") + KCARD_DEFAULTDECK);
+ return locate("cards", TQString::tqfromLatin1("decks/") + KCARD_DEFAULTDECK);
}
TQString KCardDialog::getDefaultCardDir()
@@ -234,14 +234,14 @@ TQString KCardDialog::getCardPath(const TQString &carddir, int index)
KCardDialog::init();
TQString entry = carddir + TQString::number(index);
- if (KStandardDirs::exists(entry + TQString::fromLatin1(".png")))
- return entry + TQString::fromLatin1(".png");
+ if (KStandardDirs::exists(entry + TQString::tqfromLatin1(".png")))
+ return entry + TQString::tqfromLatin1(".png");
// rather theoretical
- if (KStandardDirs::exists(entry + TQString::fromLatin1(".xpm")))
- return entry + TQString::fromLatin1(".xpm");
+ if (KStandardDirs::exists(entry + TQString::tqfromLatin1(".xpm")))
+ return entry + TQString::tqfromLatin1(".xpm");
- return TQString::null;
+ return TQString();
}
const TQString& KCardDialog::deck() const { return d->cDeck; }
@@ -271,11 +271,11 @@ void KCardDialog::setupDialog(bool showResizeBox)
if (! (flags() & NoDeck))
{
- TQHBoxLayout* layout = new TQHBoxLayout(cardLayout);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(cardLayout);
// Deck iconview
- TQGroupBox* grp1 = new TQGroupBox(1, Horizontal, i18n("Choose Backside"), plainPage());
- layout->addWidget(grp1);
+ TQGroupBox* grp1 = new TQGroupBox(1,Qt::Horizontal, i18n("Choose Backside"), plainPage());
+ tqlayout->addWidget(grp1);
d->deckIconView = new KIconView(grp1,"decks");
d->deckIconView->setSpacing(8);
@@ -293,13 +293,13 @@ void KCardDialog::setupDialog(bool showResizeBox)
d->deckIconView->showToolTips();
// deck select
- TQVBoxLayout* l = new TQVBoxLayout(layout);
+ TQVBoxLayout* l = new TQVBoxLayout(tqlayout);
TQGroupBox* grp3 = new TQGroupBox(i18n("Backside"), plainPage());
grp3->setFixedSize(100, 130);
l->addWidget(grp3, 0, AlignTop|AlignHCenter);
d->deckLabel = new TQLabel(grp3);
d->deckLabel->setText(i18n("empty"));
- d->deckLabel->setAlignment(AlignHCenter|AlignVCenter);
+ d->deckLabel->tqsetAlignment(AlignHCenter|AlignVCenter);
d->deckLabel->setGeometry(10, 20, 80, 90);
d->randomDeck = new TQCheckBox(plainPage());
@@ -325,9 +325,9 @@ void KCardDialog::setupDialog(bool showResizeBox)
if (! (flags() & NoCards))
{
// Cards iconview
- TQHBoxLayout* layout = new TQHBoxLayout(cardLayout);
- TQGroupBox* grp2 = new TQGroupBox(1, Horizontal, i18n("Choose Frontside"), plainPage());
- layout->addWidget(grp2);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(cardLayout);
+ TQGroupBox* grp2 = new TQGroupBox(1,Qt::Horizontal, i18n("Choose Frontside"), plainPage());
+ tqlayout->addWidget(grp2);
d->cardIconView =new KIconView(grp2,"cards");
/*
@@ -343,13 +343,13 @@ void KCardDialog::setupDialog(bool showResizeBox)
d->cardIconView->showToolTips();
// Card select
- TQVBoxLayout* l = new TQVBoxLayout(layout);
+ TQVBoxLayout* l = new TQVBoxLayout(tqlayout);
TQGroupBox* grp4 = new TQGroupBox(i18n("Frontside"), plainPage());
grp4->setFixedSize(100, 130);
l->addWidget(grp4, 0, AlignTop|AlignHCenter);
d->cardLabel = new TQLabel(grp4);
d->cardLabel->setText(i18n("empty"));
- d->cardLabel->setAlignment(AlignHCenter|AlignVCenter);
+ d->cardLabel->tqsetAlignment(AlignHCenter|AlignVCenter);
d->cardLabel->setGeometry(10, 20, 80, 90 );
d->randomCardDir = new TQCheckBox(plainPage());
@@ -422,16 +422,16 @@ void KCardDialog::setupDialog(bool showResizeBox)
// large. This is desired behaviour as i don't want to make the box even
// larger but i want the complete pixmap to be displayed. the dialog is not
// resized if you make the pixmap smaller again.
- TQVBoxLayout* layout = new TQVBoxLayout(topLayout);
- TQGroupBox* grp = new TQGroupBox(1, Horizontal, i18n("Resize Cards"), plainPage());
- layout->setResizeMode(TQLayout::Fixed);
- layout->addWidget(grp);
+ TQVBoxLayout* tqlayout = new TQVBoxLayout(topLayout);
+ TQGroupBox* grp = new TQGroupBox(1,Qt::Horizontal, i18n("Resize Cards"), plainPage());
+ tqlayout->setResizeMode(TQLayout::Fixed);
+ tqlayout->addWidget(grp);
TQWidget* box = new TQWidget(grp);
TQHBoxLayout* hbox = new TQHBoxLayout(box, 0, spacingHint());
TQVBoxLayout* boxLayout = new TQVBoxLayout(hbox);
hbox->addStretch(0);
- d->scaleSlider = new TQSlider(1, SLIDER_MAX, 1, (-1000+SLIDER_MIN+SLIDER_MAX), Horizontal, box);
+ d->scaleSlider = new TQSlider(1, SLIDER_MAX, 1, (-1000+SLIDER_MIN+SLIDER_MAX),Qt::Horizontal, box);
d->scaleSlider->setMinValue(SLIDER_MIN);
connect(d->scaleSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotCardResized(int)));
boxLayout->addWidget(d->scaleSlider, 0, AlignLeft);
@@ -465,8 +465,8 @@ void KCardDialog::insertCardIcons()
for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
{
KSimpleConfig cfg(*it);
- cfg.setGroup(TQString::fromLatin1("KDE Backdeck"));
- TQString path = (*it).left((*it).findRev('/') + 1);
+ cfg.setGroup(TQString::tqfromLatin1("KDE Backdeck"));
+ TQString path = (*it).left((*it).tqfindRev('/') + 1);
assert(path[path.length() - 1] == '/');
TQPixmap pixmap(path + cfg.readEntry("Preview", "12c.png"));
@@ -507,7 +507,7 @@ void KCardDialog::insertDeckIcons()
// pixmap=pixmap.xForm(m);
- cfg.setGroup(TQString::fromLatin1("KDE Cards"));
+ cfg.setGroup(TQString::tqfromLatin1("KDE Cards"));
TQString name=cfg.readEntry("Name", i18n("unnamed"));
TQIconViewItem *item= new TQIconViewItem(d->deckIconView,name, pixmap);
@@ -528,8 +528,8 @@ KCardDialog::~KCardDialog()
// Create the dialog
-KCardDialog::KCardDialog( TQWidget *parent, const char *name, CardFlags mFlags)
- : KDialogBase( Plain, i18n("Carddeck Selection"), Ok|Cancel, Ok, parent, name, true, true)
+KCardDialog::KCardDialog( TQWidget *tqparent, const char *name, CardFlags mFlags)
+ : KDialogBase( Plain, i18n("Carddeck Selection"), Ok|Cancel, Ok, tqparent, name, true, true)
{
KCardDialog::init();
@@ -562,13 +562,13 @@ void KCardDialog::slotCardClicked(TQIconViewItem *item)
TQString KCardDialog::getDeckName(const TQString &desktop)
{
TQString entry = desktop.left(desktop.length() - strlen(".desktop"));
- if (KStandardDirs::exists(entry + TQString::fromLatin1(".png")))
- return entry + TQString::fromLatin1(".png");
+ if (KStandardDirs::exists(entry + TQString::tqfromLatin1(".png")))
+ return entry + TQString::tqfromLatin1(".png");
// rather theoretical
- if (KStandardDirs::exists(entry + TQString::fromLatin1(".xpm")))
- return entry + TQString::fromLatin1(".xpm");
- return TQString::null;
+ if (KStandardDirs::exists(entry + TQString::tqfromLatin1(".xpm")))
+ return entry + TQString::tqfromLatin1(".xpm");
+ return TQString();
}
TQString KCardDialog::getRandomDeck()
@@ -577,7 +577,7 @@ TQString KCardDialog::getRandomDeck()
TQStringList list = KGlobal::dirs()->findAllResources("cards", "decks/*.desktop");
if (list.isEmpty())
- return TQString::null;
+ return TQString();
int d = KApplication::random() % list.count();
return getDeckName(*list.at(d));
@@ -589,7 +589,7 @@ TQString KCardDialog::getRandomCardDir()
TQStringList list = KGlobal::dirs()->findAllResources("cards", "card*/index.desktop");
if (list.isEmpty())
- return TQString::null;
+ return TQString();
int d = KApplication::random() % list.count();
TQString entry = *list.at(d);
@@ -634,8 +634,8 @@ void KCardDialog::slotRandomCardDirToggled(bool on)
if (on) {
d->cardLabel->setText("random");
setCardDir(getRandomCardDir());
- if (cardDir().length()>0 && cardDir().right(1)!=TQString::fromLatin1("/")) {
- setCardDir(cardDir() + TQString::fromLatin1("/"));
+ if (cardDir().length()>0 && cardDir().right(1)!=TQString::tqfromLatin1("/")) {
+ setCardDir(cardDir() + TQString::tqfromLatin1("/"));
}
} else {
d->cardLabel->setText("empty");
@@ -742,7 +742,7 @@ void KCardDialog::saveConfig(KConfig* conf)
void KCardDialog::slotSetGlobalDeck()
{
- KSimpleConfig* conf = new KSimpleConfig(TQString::fromLatin1("kdeglobals"), false);
+ KSimpleConfig* conf = new KSimpleConfig(TQString::tqfromLatin1("kdeglobals"), false);
conf->setGroup(CONF_GLOBAL_GROUP);
conf->writeEntry(CONF_GLOBAL_DECK, deck());
@@ -753,7 +753,7 @@ void KCardDialog::slotSetGlobalDeck()
void KCardDialog::slotSetGlobalCardDir()
{
- KSimpleConfig* conf = new KSimpleConfig(TQString::fromLatin1("kdeglobals"), false);
+ KSimpleConfig* conf = new KSimpleConfig(TQString::tqfromLatin1("kdeglobals"), false);
conf->setGroup(CONF_GLOBAL_GROUP);
conf->writePathEntry(CONF_GLOBAL_CARDDIR, cardDir());
@@ -764,7 +764,7 @@ void KCardDialog::slotSetGlobalCardDir()
void KCardDialog::getGlobalDeck(TQString& deck, bool& random)
{
- KSimpleConfig* conf = new KSimpleConfig(TQString::fromLatin1("kdeglobals"), true);
+ KSimpleConfig* conf = new KSimpleConfig(TQString::tqfromLatin1("kdeglobals"), true);
conf->setGroup(CONF_GLOBAL_GROUP);
if (!conf->hasKey(CONF_GLOBAL_DECK) || conf->readBoolEntry(CONF_GLOBAL_RANDOMDECK, false)) {
@@ -780,7 +780,7 @@ void KCardDialog::getGlobalDeck(TQString& deck, bool& random)
void KCardDialog::getGlobalCardDir(TQString& dir, bool& random)
{
- KSimpleConfig* conf = new KSimpleConfig(TQString::fromLatin1("kdeglobals"), true);
+ KSimpleConfig* conf = new KSimpleConfig(TQString::tqfromLatin1("kdeglobals"), true);
conf->setGroup(CONF_GLOBAL_GROUP);
if (!conf->hasKey(CONF_GLOBAL_CARDDIR) || conf->readBoolEntry(CONF_GLOBAL_RANDOMCARDDIR, false)) {
@@ -799,7 +799,7 @@ void KCardDialog::init()
static bool _inited = false;
if (_inited)
return;
- KGlobal::dirs()->addResourceType("cards", KStandardDirs::kde_default("data") + TQString::fromLatin1("carddecks/"));
+ KGlobal::dirs()->addResourceType("cards", KStandardDirs::kde_default("data") + TQString::tqfromLatin1("carddecks/"));
KGlobal::locale()->insertCatalogue("libkdegames");
_inited = true;
diff --git a/libkdegames/kcarddialog.h b/libkdegames/kcarddialog.h
index 7cdc82b6..e0681f5b 100644
--- a/libkdegames/kcarddialog.h
+++ b/libkdegames/kcarddialog.h
@@ -90,6 +90,7 @@ class KCardDialogPrivate;
class KDE_EXPORT KCardDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -103,11 +104,11 @@ public:
/**
* Constructs a card deck selection dialog.
*
- * @param parent The parent widget of the dialog, if any.
+ * @param tqparent The tqparent widget of the dialog, if any.
* @param name The name of the dialog.
* @param flags Specifies whether the dialog is modal or not.
*/
- KCardDialog (TQWidget* parent = NULL,const char* name = NULL,
+ KCardDialog (TQWidget* tqparent = NULL,const char* name = NULL,
CardFlags flags = Both);
/**
* Destructs a card deck selection dialog.
@@ -125,7 +126,7 @@ public:
* @param carddir a reference to the directory name used as front of the
* cards. The directory contains the card images as 1.png to 52.png
*
- * @param parent an optional pointer to the parent window of the dialog
+ * @param tqparent an optional pointer to the tqparent window of the dialog
*
* @param flags what to show
*
@@ -153,7 +154,7 @@ public:
*
* @return TQDialog::result().
*/
- static int getCardDeck(TQString &deck,TQString &carddir, TQWidget *parent=0,
+ static int getCardDeck(TQString &deck,TQString &carddir, TQWidget *tqparent=0,
CardFlags flags=Both, bool* randomDeck=0,
bool* randomCardDir=0, double* scale=0, KConfig* conf=0);
diff --git a/libkdegames/kchat.cpp b/libkdegames/kchat.cpp
index 2a9c3913..71471497 100644
--- a/libkdegames/kchat.cpp
+++ b/libkdegames/kchat.cpp
@@ -36,7 +36,7 @@ public:
int mFromId;
};
-KChat::KChat(TQWidget* parent, bool twoPlayerGame) : KChatBase(parent, twoPlayerGame)
+KChat::KChat(TQWidget* tqparent, bool twoPlayerGame) : KChatBase(tqparent, twoPlayerGame)
{
init();
}
diff --git a/libkdegames/kchat.h b/libkdegames/kchat.h
index 5eabb9d3..a28578c7 100644
--- a/libkdegames/kchat.h
+++ b/libkdegames/kchat.h
@@ -36,14 +36,15 @@ class KChatPrivate;
class KDE_EXPORT KChat : public KChatBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
- * @param parent The parent widget for this widget.
+ * @param tqparent The tqparent widget for this widget.
* @param twoPlayerGame If true the combo box where the player can
* choose to send to a single player or to all players will not be added
* as you will hardly need it in 2-player games.
**/
- KChat(TQWidget* parent, bool twoPlayerGame = false);
+ KChat(TQWidget* tqparent, bool twoPlayerGame = false);
virtual ~KChat();
diff --git a/libkdegames/kchatbase.cpp b/libkdegames/kchatbase.cpp
index 421e0224..182f96a9 100644
--- a/libkdegames/kchatbase.cpp
+++ b/libkdegames/kchatbase.cpp
@@ -73,14 +73,14 @@ void KChatBaseText::init()
void KChatBaseText::setName(const TQString& n)
{
// d->mName = n;
- d->mName = TQString("%1: ").arg(n);
- setText(TQString("%1: %2").arg(name()).arg(message())); // esp. for sorting
+ d->mName = TQString("%1: ").tqarg(n);
+ setText(TQString("%1: %2").tqarg(name()).tqarg(message())); // esp. for sorting
}
void KChatBaseText::setMessage(const TQString& m)
{
d->mMessage = m;
- setText(TQString("%1: %2").arg(name()).arg(message())); // esp. for sorting
+ setText(TQString("%1: %2").tqarg(name()).tqarg(message())); // esp. for sorting
}
const TQString& KChatBaseText::name() const
@@ -135,7 +135,7 @@ int KChatBaseText::width(TQListBox* lb) const
w += TQFontMetrics(messageFont()).width(message());
}
// int w = lb ? lb->fontMetrics().width( text() ) + 6 : 0; // QT orig
- return QMAX(w, TQApplication::globalStrut().width());
+ return TQMAX(w, TQApplication::globalStrut().width());
}
int KChatBaseText::height(TQListBox* lb) const
@@ -151,7 +151,7 @@ int KChatBaseText::height(TQListBox* lb) const
}
}
// int h = lb ? lb->fontMetrics().lineSpacing() + 2 : 0; // QT orig
- return QMAX(h, TQApplication::globalStrut().height());
+ return TQMAX(h, TQApplication::globalStrut().height());
}
@@ -182,7 +182,7 @@ public:
TQFont mSystemMessageFont;
};
-KChatBase::KChatBase(TQWidget* parent, bool noComboBox) : TQFrame(parent)
+KChatBase::KChatBase(TQWidget* tqparent, bool noComboBox) : TQFrame(tqparent)
{
init(noComboBox);
}
@@ -211,7 +211,7 @@ void KChatBase::init(bool noComboBox)
l->addWidget(d->mBox);
d->mBox->setVScrollBarMode(TQScrollView::AlwaysOn);
d->mBox->setHScrollBarMode(TQScrollView::AlwaysOff);
- d->mBox->setFocusPolicy(TQWidget::NoFocus);
+ d->mBox->setFocusPolicy(TQ_NoFocus);
// d->mBox->setSelectionMode(TQListBox::NoSelection);
d->mBox->setSelectionMode(TQListBox::Single);
@@ -236,7 +236,7 @@ void KChatBase::init(bool noComboBox)
setMaxItems(-1); // unlimited
if (kapp) {
- // kapp might be NULL as well - in case we are in Qt designer.
+ // kapp might be NULL as well - in case we are in TQt designer.
readConfig();
}
}
@@ -262,7 +262,7 @@ bool KChatBase::insertSendingEntry(const TQString& text, int id, int index)
kdWarning(11000) << "KChatBase: Cannot add an entry to the combo box" << endl;
return false;
}
- if (d->mIndex2Id.findIndex(id) != -1) {
+ if (d->mIndex2Id.tqfindIndex(id) != -1) {
kdError(11000) << "KChatBase: Cannot add more than one entry with the same ID! " << endl;
kdError(11000) << "KChatBase: Text="<<text<<endl;
return false;
@@ -324,13 +324,13 @@ void KChatBase::setSendingEntry(int id)
int KChatBase::findIndex(int id) const
{
- return d->mIndex2Id.findIndex(id);
+ return d->mIndex2Id.tqfindIndex(id);
}
int KChatBase::nextId() const
{
int i = SendToAll + 1;
- while (d->mIndex2Id.findIndex(i) != -1) {
+ while (d->mIndex2Id.tqfindIndex(i) != -1) {
i++;
}
return i;
@@ -349,26 +349,26 @@ void KChatBase::addItem(const TQListBoxItem* text)
void KChatBase::addMessage(const TQString& fromName, const TQString& text)
{
//maybe "%1 says: %2" or so
- addItem(layoutMessage(fromName, text));
+ addItem(tqlayoutMessage(fromName, text));
}
void KChatBase::addSystemMessage(const TQString& fromName, const TQString& text)
{
- addItem(layoutSystemMessage(fromName, text));
+ addItem(tqlayoutSystemMessage(fromName, text));
}
-TQListBoxItem* KChatBase::layoutMessage(const TQString& fromName, const TQString& text)
+TQListBoxItem* KChatBase::tqlayoutMessage(const TQString& fromName, const TQString& text)
{
//TODO: KChatBaseConfigure? - e.g. color
TQListBoxItem* message;
if (text.startsWith("/me ")) {
- // replace "/me" by a nice star. leave one space after the star
+ // tqreplace "/me" by a nice star. leave one space after the star
TQPixmap pix;
- pix.load(locate("data", TQString::fromLatin1("kdegames/pics/star.png")));
+ pix.load(locate("data", TQString::tqfromLatin1("kdegames/pics/star.png")));
//TODO KChatBasePixmap? Should change the font here!
- message = (TQListBoxItem*)new TQListBoxPixmap(pix, i18n("%1 %2").arg(fromName).arg(text.mid(3)));
+ message = (TQListBoxItem*)new TQListBoxPixmap(pix, i18n("%1 %2").tqarg(fromName).tqarg(text.mid(3)));
} else {
// the text is not edited in any way. just return an item
KChatBaseText* m = new KChatBaseText(fromName, text);
@@ -379,12 +379,12 @@ TQListBoxItem* KChatBase::layoutMessage(const TQString& fromName, const TQString
return message;
}
-TQListBoxItem* KChatBase::layoutSystemMessage(const TQString& fromName, const TQString& text)
+TQListBoxItem* KChatBase::tqlayoutSystemMessage(const TQString& fromName, const TQString& text)
{
//TODO: KChatBaseConfigure? - e.g. color
// no need to check for /me etc.
- KChatBaseText* m = new KChatBaseText(i18n("--- %1").arg(fromName), text);
+ KChatBaseText* m = new KChatBaseText(i18n("--- %1").tqarg(fromName), text);
m->setNameFont(&d->mSystemNameFont);
m->setMessageFont(&d->mSystemMessageFont);
return (TQListBoxItem*)m;
@@ -406,7 +406,7 @@ void KChatBase::slotReturnPressed(const TQString& text)
TQString KChatBase::comboBoxItem(const TQString& name) const
{ // TODO: such a function for "send to all" and "send to my group"
- return i18n("Send to %1").arg(name);
+ return i18n("Send to %1").tqarg(name);
}
void KChatBase::slotClear()
diff --git a/libkdegames/kchatbase.h b/libkdegames/kchatbase.h
index 7dc5ff59..5e97b80c 100644
--- a/libkdegames/kchatbase.h
+++ b/libkdegames/kchatbase.h
@@ -46,7 +46,7 @@ class KChatBaseTextPrivate;
* will probably some kind of KChatBaseDialog which offers the user the ability
* to configure things like color and font on the fly.
**/
-class KChatBaseText : public QListBoxText
+class KChatBaseText : public TQListBoxText
{
public:
@@ -171,8 +171,8 @@ class KChatBasePrivate;
*
* To add a message just call addMessage with the nickname of the player
* who sent the message and the message itself. If you don't want to use
- * layoutMessage by any reason you can also call addItem directly. But you
- * should better replace layoutMessage instead.
+ * tqlayoutMessage by any reason you can also call addItem directly. But you
+ * should better replace tqlayoutMessage instead.
*
* You probably don't want to use the abstract class KChatBase directly but use
* one of the derived classess KChat or KGameChat. The latter is the
@@ -181,17 +181,18 @@ class KChatBasePrivate;
*
* @author Andreas Beckermann <b_mann@gmx.de>
**/
-class KDE_EXPORT KChatBase : public QFrame
+class KDE_EXPORT KChatBase : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
- * @param parent The parent widget for this widget.
+ * @param tqparent The tqparent widget for this widget.
* @param noComboBox If true then the combo box where the player can
* choose where to send messages to (either globally or just to some
* players) will not be added.
**/
- KChatBase(TQWidget* parent, bool noComboBox = false);
+ KChatBase(TQWidget* tqparent, bool noComboBox = false);
/**
* Destruct the KChatBase object
@@ -313,35 +314,35 @@ public:
/**
* Same as setNameFont but applies only to system messages.
- * @see layoutSystemMessage
+ * @see tqlayoutSystemMessage
**/
void setSystemNameFont(const TQFont& font);
/**
* Same as setMessageFont but applies only to system messages.
- * @see layoutSystemMessage
+ * @see tqlayoutSystemMessage
**/
void setSystemMessageFont(const TQFont& font);
/**
* Same as setBothFont but applies only to system messages.
- * @see layoutSystemMessage
+ * @see tqlayoutSystemMessage
**/
void setSystemBothFont(const TQFont& font);
/**
* This font should be used for the name (the "from: " part) of a
- * message. layoutMessage uses this to set the font using
+ * message. tqlayoutMessage uses this to set the font using
* KChatBaseText::setNameFont but if you want to overwrite
- * layoutMessage you should do this yourself.
+ * tqlayoutMessage you should do this yourself.
* @return The font that is used for the name part of the message.
**/
const TQFont& nameFont() const;
/**
- * This font should be used for a message. layoutMessage sets the
+ * This font should be used for a message. tqlayoutMessage sets the
* font of a message using KChatBaseText::setMessageFont but if ypu
- * replace layoutMessage with your own function you should use
+ * replace tqlayoutMessage with your own function you should use
* messageFont() yourself.
* @return The font that is used for a message
**/
@@ -349,13 +350,13 @@ public:
/**
* Same as systemNameFont but applies only to system messages.
- * @see layoutSystemMessage
+ * @see tqlayoutSystemMessage
**/
const TQFont& systemNameFont() const;
/**
* Same as systemMessageFont but applies only to system messages.
- * @see layoutSystemMessage
+ * @see tqlayoutSystemMessage
**/
const TQFont& systemMessageFont() const;
@@ -405,7 +406,7 @@ public slots:
* Maybe you want to replace this with a function that creates a nicer text
* than "fromName: text"
*
- * Update: the function layoutMessage is called by this now. This
+ * Update: the function tqlayoutMessage is called by this now. This
* means that you will get user defined outlook on the messages :-)
* @param fromName The player who sent this message
* @param text The text to be added
@@ -414,7 +415,7 @@ public slots:
/**
* This works just like addMessage but adds a system message.
- * layoutSystemMessage is used to generate the displayed item. System
+ * tqlayoutSystemMessage is used to generate the displayed item. System
* messages will have a different look than player messages.
*
* You may wish to use this to display status information from your game.
@@ -470,7 +471,7 @@ protected:
/**
* Replace to customise the combo box.
*
- * Default: i18n("Send to %1).arg(name)
+ * Default: i18n("Send to %1).tqarg(name)
* @param name The name of the player
* @return The string as it will be shown in the combo box
**/
@@ -478,20 +479,20 @@ protected:
/**
* Create a TQListBoxItem for this message. This function is not yet
- * written usefully - currently just a QListBoxTex object is
+ * written usefully - currently just a TQListBoxTex object is
* created which shows the message in this format: "fromName: text".
* This should fit most peoples needs but needs further improvements.
**/
- virtual TQListBoxItem* layoutMessage(const TQString& fromName, const TQString& text);
+ virtual TQListBoxItem* tqlayoutMessage(const TQString& fromName, const TQString& text);
/**
* Create a TQListBoxItem for this message. This does the same as
- * layoutMessage but generates a system message. You might want to
+ * tqlayoutMessage but generates a system message. You might want to
* use such a message to display e.g. status information from your game.
*
* The default implementation just prepends "--- ".
**/
- virtual TQListBoxItem* layoutSystemMessage(const TQString& fromName, const TQString& text);
+ virtual TQListBoxItem* tqlayoutSystemMessage(const TQString& fromName, const TQString& text);
private slots:
/**
diff --git a/libkdegames/kchatdialog.cpp b/libkdegames/kchatdialog.cpp
index 9cfbefff..58c90e69 100644
--- a/libkdegames/kchatdialog.cpp
+++ b/libkdegames/kchatdialog.cpp
@@ -55,17 +55,17 @@ class KChatDialogPrivate
KChatBase* mChat;
};
-KChatDialog::KChatDialog(KChatBase* chat, TQWidget* parent, bool modal)
-// : KDialogBase(Tabbed, i18n("Configure Chat"), Ok|Default|Apply|Cancel, Ok, parent, 0, modal, true)
- : KDialogBase(Plain, i18n("Configure Chat"), Ok|Default|Apply|Cancel, Ok, parent, 0, modal, true)
+KChatDialog::KChatDialog(KChatBase* chat, TQWidget* tqparent, bool modal)
+// : KDialogBase(Tabbed, i18n("Configure Chat"), Ok|Default|Apply|Cancel, Ok, tqparent, 0, modal, true)
+ : KDialogBase(Plain, i18n("Configure Chat"), Ok|Default|Apply|Cancel, Ok, tqparent, 0, modal, true)
{
init();
plugChatWidget(chat);
}
-KChatDialog::KChatDialog(TQWidget* parent, bool modal)
-// : KDialogBase(Tabbed, i18n("Configure Chat"), Ok|Default|Apply|Cancel, Ok, parent, 0, modal, true)
- : KDialogBase(Plain, i18n("Configure Chat"), Ok|Default|Apply|Cancel, Ok, parent, 0, modal, true)
+KChatDialog::KChatDialog(TQWidget* tqparent, bool modal)
+// : KDialogBase(Tabbed, i18n("Configure Chat"), Ok|Default|Apply|Cancel, Ok, tqparent, 0, modal, true)
+ : KDialogBase(Plain, i18n("Configure Chat"), Ok|Default|Apply|Cancel, Ok, tqparent, 0, modal, true)
{
init();
}
@@ -80,42 +80,42 @@ void KChatDialog::init()
d = new KChatDialogPrivate;
// d->mTextPage = addPage(i18n("&Messages"));// not a good name - game Messages?
d->mTextPage = plainPage();
- TQGridLayout* layout = new TQGridLayout(d->mTextPage, 7, 2, KDialog::marginHint(), KDialog::spacingHint());
+ TQGridLayout* tqlayout = new TQGridLayout(d->mTextPage, 7, 2, KDialog::marginHint(), KDialog::spacingHint());
// General fonts
TQPushButton* nameFont = new TQPushButton(i18n("Name Font..."), d->mTextPage);
connect(nameFont, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotGetNameFont()));
- layout->addWidget(nameFont, 0, 0);
+ tqlayout->addWidget(nameFont, 0, 0);
TQPushButton* textFont = new TQPushButton(i18n("Text Font..."), d->mTextPage);
connect(textFont, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotGetTextFont()));
- layout->addWidget(textFont, 0, 1);
+ tqlayout->addWidget(textFont, 0, 1);
TQFrame* messagePreview = new TQFrame(d->mTextPage);
messagePreview->setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken);
TQHBoxLayout* messageLayout = new TQHBoxLayout(messagePreview);
- layout->addMultiCellWidget(messagePreview, 1, 1, 0, 1);
+ tqlayout->addMultiCellWidget(messagePreview, 1, 1, 0, 1);
d->mNamePreview = new TQLabel(i18n("Player: "), messagePreview);
messageLayout->addWidget(d->mNamePreview, 0);
d->mTextPreview = new TQLabel(i18n("This is a player message"), messagePreview);
messageLayout->addWidget(d->mTextPreview, 1);
- layout->addRowSpacing(2, 10);
+ tqlayout->addRowSpacing(2, 10);
// System Message fonts
TQLabel* systemMessages = new TQLabel(i18n("System Messages - Messages directly sent from the game"), d->mTextPage);
- layout->addMultiCellWidget(systemMessages, 3, 3, 0, 1);
+ tqlayout->addMultiCellWidget(systemMessages, 3, 3, 0, 1);
TQPushButton* systemNameFont = new TQPushButton(i18n("Name Font..."), d->mTextPage);
connect(systemNameFont, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotGetSystemNameFont()));
- layout->addWidget(systemNameFont, 4, 0);
+ tqlayout->addWidget(systemNameFont, 4, 0);
TQPushButton* systemTextFont = new TQPushButton(i18n("Text Font..."), d->mTextPage);
connect(systemTextFont, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotGetSystemTextFont()));
- layout->addWidget(systemTextFont, 4, 1);
+ tqlayout->addWidget(systemTextFont, 4, 1);
TQFrame* systemMessagePreview = new TQFrame(d->mTextPage);
systemMessagePreview->setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken);
TQHBoxLayout* systemMessageLayout = new TQHBoxLayout(systemMessagePreview);
- layout->addMultiCellWidget(systemMessagePreview, 5, 5, 0, 1);
+ tqlayout->addMultiCellWidget(systemMessagePreview, 5, 5, 0, 1);
d->mSystemNamePreview = new TQLabel(i18n("--- Game: "), systemMessagePreview);
systemMessageLayout->addWidget(d->mSystemNamePreview, 0);
@@ -124,10 +124,10 @@ void KChatDialog::init()
// message count
TQLabel* maxMessages = new TQLabel(i18n("Maximal number of messages (-1 = unlimited):"), d->mTextPage);
- layout->addWidget(maxMessages, 6, 0);
+ tqlayout->addWidget(maxMessages, 6, 0);
d->mMaxMessages = new TQLineEdit(d->mTextPage);
d->mMaxMessages->setText(TQString::number(-1));
- layout->addWidget(d->mMaxMessages, 6, 1);
+ tqlayout->addWidget(d->mMaxMessages, 6, 1);
}
void KChatDialog::slotGetNameFont()
diff --git a/libkdegames/kchatdialog.h b/libkdegames/kchatdialog.h
index 853dd94a..5e5ff70d 100644
--- a/libkdegames/kchatdialog.h
+++ b/libkdegames/kchatdialog.h
@@ -30,18 +30,19 @@ class KChatDialogPrivate;
class KDE_EXPORT KChatDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Construct a KChatDialog widget
**/
- KChatDialog(TQWidget* parent, bool modal = false);
+ KChatDialog(TQWidget* tqparent, bool modal = false);
/**
* Construct a KChatDialog widget which automatically configures the
* @ref KChatBase widget. You probably want to use this as you don't
* have to care about the configuration stuff yourself.
**/
- KChatDialog(KChatBase* chatWidget, TQWidget* parent, bool modal = false);
+ KChatDialog(KChatBase* chatWidget, TQWidget* tqparent, bool modal = false);
/**
* Destruct the dialog
diff --git a/libkdegames/kgame/COMPAT b/libkdegames/kgame/COMPAT
index 146d3a88..4551c679 100644
--- a/libkdegames/kgame/COMPAT
+++ b/libkdegames/kgame/COMPAT
@@ -10,7 +10,7 @@
KGameIO::signalPrepareMove(..., bool*): don't know why this was
necessary but it didn't work anymore...
16.09.2001: KGamePropertyHandler uses bool* for the sent parameter now. This is
- because QT3 obviously doesn't honor referneces in signals/slots.
+ because QT3 obviously doesn't honor referneces in Q_SIGNALS/Q_SLOTS.
This might even be a QT bug. Bad situation - we use references
everywhere in KGame... hope nothing else is affecterd by this
problem (signalPrepareMove was fixed already by me)
@@ -38,7 +38,7 @@
too!
The API stays the same.
11.10.2001 KGameDialogGeneralConfig now doesn't provide setMin/maxPlayers()
- anymore. The game should manage this internally. layout() is
+ anymore. The game should manage this internally. tqlayout() is
obsolete as well
18.10.2001 KPlayer::signalNetworkData contained QDataStream& instead of const
QByteArray& parameter (oops!). This is fixed now. All apps which
@@ -47,7 +47,7 @@
KPlayer::sendProperty() and related functions contain a "int msgid"
parameter. This is the id() of the property handler. This parameter
enables us to easily add any number of property handler to a game
- just by connecting it to existing send slots and call
+ just by connecting it to existing send Q_SLOTS and call
processMessage() in slotNetworkData()
03.11.2001 KPlayer::signalNetworkData now emits msgid-KGameMessage::IdUser just
like KGame::signalNetworkData does
diff --git a/libkdegames/kgame/DESIGN b/libkdegames/kgame/DESIGN
index b1c48146..cd737e3a 100644
--- a/libkdegames/kgame/DESIGN
+++ b/libkdegames/kgame/DESIGN
@@ -359,7 +359,7 @@ KDialogBase::addVBoxPage() (for example).
5.1.1 Debug KGame
-----------------
The first page, "Debug KGame" shows on the left most or even all status values of
-KGame. That contains e.g. minPlayers(), isAdmin(), gameStatus(), ...
+KGame. That contains e.g. minPlayers(), isAdmin(), gametqStatus(), ...
The right side is probably the more important one. It lists *all* KGameProperties
which have been inserted to this KGame object (only to this KGame object - not
the ones that have been added to the players!). Most of the status variables of
diff --git a/libkdegames/kgame/dialogs/kgameconnectdialog.cpp b/libkdegames/kgame/dialogs/kgameconnectdialog.cpp
index 575b3090..f0e0c606 100644
--- a/libkdegames/kgame/dialogs/kgameconnectdialog.cpp
+++ b/libkdegames/kgame/dialogs/kgameconnectdialog.cpp
@@ -56,7 +56,7 @@ class KGameConnectWidgetPrivate
TQString mType;
};
-KGameConnectWidget::KGameConnectWidget(TQWidget* parent) : TQWidget(parent)
+KGameConnectWidget::KGameConnectWidget(TQWidget* tqparent) : TQWidget(tqparent)
{
d = new KGameConnectWidgetPrivate;
@@ -165,7 +165,7 @@ TQString KGameConnectWidget::host() const
if (d->mHost->isEnabled()) {
return d->mHost->text();
} else {
- return TQString::null;
+ return TQString();
}
}
@@ -212,9 +212,9 @@ class KGameConnectDialogPrivate
KGameConnectWidget* mConnect;
};
-// buttonmask =Ok|Cancel
-KGameConnectDialog::KGameConnectDialog(TQWidget* parent,int buttonmask) : KDialogBase(Plain,
- i18n("Network Game"),buttonmask , Ok, parent, 0, true, buttonmask!=0)
+// buttontqmask =Ok|Cancel
+KGameConnectDialog::KGameConnectDialog(TQWidget* tqparent,int buttontqmask) : KDialogBase(Plain,
+ i18n("Network Game"),buttontqmask , Ok, tqparent, 0, true, buttontqmask!=0)
{
d = new KGameConnectDialogPrivate;
TQVBoxLayout* vb = new TQVBoxLayout(plainPage(), spacingHint());
@@ -228,9 +228,9 @@ KGameConnectDialog::~KGameConnectDialog()
}
int KGameConnectDialog::initConnection( unsigned short int& port,
- TQString& host, TQWidget* parent, bool server)
+ TQString& host, TQWidget* tqparent, bool server)
{
- KGameConnectDialog d(parent);
+ KGameConnectDialog d(tqparent);
d.setHost(host);
d.setPort(port);
if (server) {
diff --git a/libkdegames/kgame/dialogs/kgameconnectdialog.h b/libkdegames/kgame/dialogs/kgameconnectdialog.h
index fdb0be4f..ad4ff7d1 100644
--- a/libkdegames/kgame/dialogs/kgameconnectdialog.h
+++ b/libkdegames/kgame/dialogs/kgameconnectdialog.h
@@ -26,11 +26,12 @@
class KGameConnectDialogPrivate;
class KGameConnectWidgetPrivate;
-class KGameConnectWidget : public QWidget
+class KGameConnectWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KGameConnectWidget(TQWidget* parent);
+ KGameConnectWidget(TQWidget* tqparent);
virtual ~KGameConnectWidget();
/**
@@ -39,7 +40,7 @@ public:
void setHost(const TQString& host);
/**
- * @return The host to connect to or TQString::null if the user wants to
+ * @return The host to connect to or TQString() if the user wants to
* be the MASTER
**/
TQString host() const;
@@ -108,16 +109,17 @@ private:
* @short Dialog to ask for host and port
*
* This Dialog is used to create a game. You call initConnection(port,
- * TQString::null, parent, true) to create a network game (as a server)
- * or initConnection(port, host, parent) to join a network game.
+ * TQString(), tqparent, true) to create a network game (as a server)
+ * or initConnection(port, host, tqparent) to join a network game.
*
* @author Andreas Beckermann <b_mann@gmx.de>
**/
class KGameConnectDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KGameConnectDialog(TQWidget* parent = 0,int buttonmask=Ok|Cancel);
+ KGameConnectDialog(TQWidget* tqparent = 0,int buttontqmask=Ok|Cancel);
virtual ~KGameConnectDialog();
/**
@@ -125,12 +127,12 @@ 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
- * TQString::null if server game is chosen
- * @param parent The parent of the dialog
+ * TQString() if server game is chosen
+ * @param tqparent The tqparent 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, TQString& host, TQWidget* parent, bool server = false);
+ static int initConnection(unsigned short int& port, TQString& host, TQWidget* tqparent, bool server = false);
/**
* @param host The host to connect to by default
@@ -138,7 +140,7 @@ public:
void setHost(const TQString& host);
/**
- * @return The host to connect to or TQString::null if the user wants to
+ * @return The host to connect to or TQString() if the user wants to
* be the MASTER
**/
TQString host() const;
diff --git a/libkdegames/kgame/dialogs/kgamedebugdialog.cpp b/libkdegames/kgame/dialogs/kgamedebugdialog.cpp
index 09a35e56..06987aad 100644
--- a/libkdegames/kgame/dialogs/kgamedebugdialog.cpp
+++ b/libkdegames/kgame/dialogs/kgamedebugdialog.cpp
@@ -56,7 +56,7 @@ public:
mGameMaster = 0;
mGameAdmin = 0;
mGameOffering = 0;
- mGameStatus = 0;
+ mGametqStatus = 0;
mGameRunning = 0;
mGameMaxPlayers = 0;
mGameMinPlayers = 0;
@@ -93,7 +93,7 @@ public:
TQListViewItem* mGameMaster;
TQListViewItem* mGameAdmin;
TQListViewItem* mGameOffering;
- TQListViewItem* mGameStatus;
+ TQListViewItem* mGametqStatus;
TQListViewItem* mGameRunning;
TQListViewItem* mGameMaxPlayers;
TQListViewItem* mGameMinPlayers;
@@ -120,9 +120,9 @@ public:
KListBox* mHideIdList;
};
-KGameDebugDialog::KGameDebugDialog(KGame* g, TQWidget* parent, bool modal) :
+KGameDebugDialog::KGameDebugDialog(KGame* g, TQWidget* tqparent, bool modal) :
KDialogBase(Tabbed, i18n("KGame Debug Dialog"), Close, Close,
- parent, 0, modal, true)
+ tqparent, 0, modal, true)
{
d = new KGameDebugDialogPrivate;
@@ -142,18 +142,18 @@ void KGameDebugDialog::initGamePage()
{
d->mGamePage = addPage(i18n("Debug &KGame"));
TQVBoxLayout* topLayout = new TQVBoxLayout(d->mGamePage, marginHint(), spacingHint());
- TQHBoxLayout* layout = new TQHBoxLayout(topLayout);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(topLayout);
KListView* v = new KListView(d->mGamePage);
v->addColumn(i18n("Data"));
v->addColumn(i18n("Value"));
- layout->addWidget(v);
+ tqlayout->addWidget(v);
d->mGameProperties = new KListView(d->mGamePage);
d->mGameProperties->addColumn(i18n("Property"));
d->mGameProperties->addColumn(i18n("Value"));
d->mGameProperties->addColumn(i18n("Policy"));
- layout->addWidget(d->mGameProperties);
+ tqlayout->addWidget(d->mGameProperties);
TQPushButton* b = new TQPushButton(i18n("Update"), d->mGamePage);
connect(b, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotUpdateGameData()));
@@ -166,7 +166,7 @@ void KGameDebugDialog::initGamePage()
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->mGametqStatus = new TQListViewItem(v, i18n("Game tqStatus"));
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"));
@@ -177,19 +177,19 @@ void KGameDebugDialog::initPlayerPage()
{
d->mPlayerPage = addPage(i18n("Debug &Players"));
TQVBoxLayout* topLayout = new TQVBoxLayout(d->mPlayerPage, marginHint(), spacingHint());
- TQHBoxLayout* layout = new TQHBoxLayout(topLayout);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(topLayout);
//TODO: connect to the KGame signals for joined/removed players!!!
- TQVBoxLayout* listLayout = new TQVBoxLayout(layout);
+ TQVBoxLayout* listLayout = new TQVBoxLayout(tqlayout);
TQLabel* listLabel = new TQLabel(i18n("Available Players"), d->mPlayerPage);
listLayout->addWidget(listLabel);
d->mPlayerList = new KListBox(d->mPlayerPage);
connect(d->mPlayerList, TQT_SIGNAL(executed(TQListBoxItem*)), this, TQT_SLOT(slotUpdatePlayerData(TQListBoxItem*)));
listLayout->addWidget(d->mPlayerList);
- d->mPlayerList->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding));
+ d->mPlayerList->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding));
KListView* v = new KListView(d->mPlayerPage);
- layout->addWidget(v);
+ tqlayout->addWidget(v);
v->addColumn(i18n("Data"));
v->addColumn(i18n("Value"));
@@ -197,7 +197,7 @@ void KGameDebugDialog::initPlayerPage()
d->mPlayerProperties->addColumn(i18n("Property"));
d->mPlayerProperties->addColumn(i18n("Value"));
d->mPlayerProperties->addColumn(i18n("Policy"));
- layout->addWidget(d->mPlayerProperties);
+ tqlayout->addWidget(d->mPlayerProperties);
TQPushButton* b = new TQPushButton(i18n("Update"), d->mPlayerPage);
connect(b, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotUpdatePlayerList()));
@@ -220,9 +220,9 @@ void KGameDebugDialog::initPlayerPage()
void KGameDebugDialog::initMessagePage()
{
d->mMessagePage = addPage(i18n("Debug &Messages"));
- TQGridLayout* layout = new TQGridLayout(d->mMessagePage, 11, 7, marginHint(), spacingHint());
+ TQGridLayout* tqlayout = new TQGridLayout(d->mMessagePage, 11, 7, marginHint(), spacingHint());
d->mMessageList = new KListView(d->mMessagePage);
- layout->addMultiCellWidget(d->mMessageList, 0, 9, 0, 3);
+ tqlayout->addMultiCellWidget(d->mMessageList, 0, 9, 0, 3);
d->mMessageList->addColumn(i18n("Time"));
d->mMessageList->addColumn(i18n("ID"));
d->mMessageList->addColumn(i18n("Receiver"));
@@ -231,20 +231,20 @@ void KGameDebugDialog::initMessagePage()
TQPushButton* hide = new TQPushButton(i18n("&>>"), d->mMessagePage);
connect(hide, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotHideId()));
- layout->addWidget(hide, 4, 4);
+ tqlayout->addWidget(hide, 4, 4);
TQPushButton* show = new TQPushButton(i18n("&<<"), d->mMessagePage);
connect(show, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotShowId()));
- layout->addWidget(show, 6, 4);
+ tqlayout->addWidget(show, 6, 4);
TQLabel* l = new TQLabel(i18n("Do not show IDs:"), d->mMessagePage);
- layout->addMultiCellWidget(l, 0, 0, 5, 6);
+ tqlayout->addMultiCellWidget(l, 0, 0, 5, 6);
d->mHideIdList = new KListBox(d->mMessagePage);
- layout->addMultiCellWidget(d->mHideIdList, 1, 8, 5, 6);
+ tqlayout->addMultiCellWidget(d->mHideIdList, 1, 8, 5, 6);
TQPushButton* clear = new KPushButton(KStdGuiItem::clear(), d->mMessagePage);
connect(clear, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotClearMessages()));
- layout->addMultiCellWidget(clear, 10, 10, 0, 6);
+ tqlayout->addMultiCellWidget(clear, 10, 10, 0, 6);
//TODO: "show all but..." and "show nothing but..."
}
@@ -274,7 +274,7 @@ void KGameDebugDialog::clearGameData()
d->mGameMaster->setText(1, "");
d->mGameAdmin->setText(1, "");
d->mGameOffering->setText(1, "");
- d->mGameStatus->setText(1, "");
+ d->mGametqStatus->setText(1, "");
d->mGameRunning->setText(1, "");
d->mGameMaxPlayers->setText(1, "");
d->mGameMinPlayers->setText(1, "");
@@ -320,7 +320,7 @@ void KGameDebugDialog::slotUpdateGameData()
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, TQString::number(d->mGame->gameStatus()));
+ d->mGametqStatus->setText(1, TQString::number(d->mGame->gametqStatus()));
d->mGameRunning->setText(1, d->mGame->isRunning() ? i18n("True") : i18n("False"));
d->mGameMaxPlayers->setText(1, TQString::number(d->mGame->maxPlayers()));
d->mGameMinPlayers->setText(1, TQString::number(d->mGame->minPlayers()));
@@ -441,7 +441,7 @@ void KGameDebugDialog::setKGame(const KGame* g)
slotUpdateGameData();
- connect(d->mGame, TQT_SIGNAL(signalMessageUpdate(int, Q_UINT32, Q_UINT32)), this, TQT_SLOT(slotMessageUpdate(int, Q_UINT32, Q_UINT32)));
+ connect(d->mGame, TQT_SIGNAL(signalMessageUpdate(int, TQ_UINT32, TQ_UINT32)), this, TQT_SLOT(slotMessageUpdate(int, TQ_UINT32, TQ_UINT32)));
}
}
@@ -481,7 +481,7 @@ void KGameDebugDialog::removePlayer(TQListBoxItem* i)
delete i;
}
-void KGameDebugDialog::slotMessageUpdate(int msgid, Q_UINT32 receiver, Q_UINT32 sender)
+void KGameDebugDialog::slotMessageUpdate(int msgid, TQ_UINT32 receiver, TQ_UINT32 sender)
{
if (!showId(msgid)) {
return;
diff --git a/libkdegames/kgame/dialogs/kgamedebugdialog.h b/libkdegames/kgame/dialogs/kgamedebugdialog.h
index 57f20c34..924037ff 100644
--- a/libkdegames/kgame/dialogs/kgamedebugdialog.h
+++ b/libkdegames/kgame/dialogs/kgamedebugdialog.h
@@ -34,8 +34,9 @@ class KGameDebugDialogPrivate;
class KDE_EXPORT KGameDebugDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KGameDebugDialog(KGame* g, TQWidget* parent, bool modal = false);
+ KGameDebugDialog(KGame* g, TQWidget* tqparent, bool modal = false);
~KGameDebugDialog();
/**
@@ -77,7 +78,7 @@ public slots:
signals:
/**
- * This signal is emitted when the "debug messages" page couldn't find
+ * This signal is emitted when the "debug messages" page couldn't tqfind
* the name of a message id. This is usually the case for user-defined
* messages. KGameDebugDialog asks you to give the msgid a name.
* @param messageid The ID of the message. As given to @ref
@@ -134,7 +135,7 @@ protected slots:
/**
* A message has been received - see @ref KGame::signalMessageUpdate
**/
- void slotMessageUpdate(int msgid, Q_UINT32 receiver, Q_UINT32 sender);
+ void slotMessageUpdate(int msgid, TQ_UINT32 receiver, TQ_UINT32 sender);
private:
void initGamePage();
diff --git a/libkdegames/kgame/dialogs/kgamedialog.cpp b/libkdegames/kgame/dialogs/kgamedialog.cpp
index c03df4ff..f589333e 100644
--- a/libkdegames/kgame/dialogs/kgamedialog.cpp
+++ b/libkdegames/kgame/dialogs/kgamedialog.cpp
@@ -64,17 +64,17 @@ public:
};
KGameDialog::KGameDialog(KGame* g, KPlayer* owner, const TQString& title,
- TQWidget* parent, bool modal)
+ TQWidget* tqparent, bool modal)
: KDialogBase(Tabbed, title, Ok|Default|Apply,
- Ok, parent, 0, modal, true)
+ Ok, tqparent, 0, modal, true)
{
init(g, owner);
}
KGameDialog::KGameDialog(KGame* g, KPlayer* owner, const TQString& title,
- TQWidget* parent, long initConfigs, int chatMsgId, bool modal)
+ TQWidget* tqparent, long initConfigs, int chatMsgId, bool modal)
: KDialogBase(Tabbed, title, Ok|Default|Apply,
- Ok, parent, 0, modal, true)
+ Ok, tqparent, 0, modal, true)
{
init(g, owner);
if ((ConfigOptions)initConfigs!=NoConfig) {
@@ -165,34 +165,34 @@ void KGameDialog::addMsgServerConfig(KGameDialogMsgServerConfig* msgConf)
d->mMsgServerPage = addConfigPage(msgConf, i18n("&Message Server"));
}
-void KGameDialog::addChatWidget(KGameDialogChatConfig* chat, TQVBox* parent)
+void KGameDialog::addChatWidget(KGameDialogChatConfig* chat, TQVBox* tqparent)
{
if (!chat) {
return;
}
- if (!parent) {
- parent = d->mGamePage;
+ if (!tqparent) {
+ tqparent = d->mGamePage;
}
- if (!parent) {
+ if (!tqparent) {
kdError(11001) << "cannot add chat widget without page" << endl;
return;
}
- addConfigWidget(chat, parent);
+ addConfigWidget(chat, tqparent);
}
-void KGameDialog::addConnectionList(KGameDialogConnectionConfig* c, TQVBox* parent)
+void KGameDialog::addConnectionList(KGameDialogConnectionConfig* c, TQVBox* tqparent)
{
if (!c) {
return;
}
- if (!parent) {
- parent = d->mNetworkPage;
+ if (!tqparent) {
+ tqparent = d->mNetworkPage;
}
- if (!parent) {
+ if (!tqparent) {
kdError(11001) << "Cannot add connection list without page" << endl;
return;
}
- addConfigWidget(c, parent);
+ addConfigWidget(c, tqparent);
}
TQVBox *KGameDialog::configPage(ConfigOptions which)
@@ -226,18 +226,18 @@ TQVBox* KGameDialog::addConfigPage(KGameDialogConfig* widget, const TQString& ti
return page;
}
-void KGameDialog::addConfigWidget(KGameDialogConfig* widget, TQWidget* parent)
+void KGameDialog::addConfigWidget(KGameDialogConfig* widget, TQWidget* tqparent)
{
if (!widget) {
kdError(11001) << "Cannot add NULL config widget" << endl;
return;
}
- if (!parent) {
+ if (!tqparent) {
kdError(11001) << "Cannot reparent to NULL widget" << endl;
return;
}
// kdDebug(11001) << "reparenting widget" << endl;
- widget->reparent(parent, TQPoint(0,0));
+ widget->reparent(tqparent, TQPoint(0,0));
d->mConfigWidgets.append(widget);
connect(widget, TQT_SIGNAL(destroyed(TQObject*)), this, TQT_SLOT(slotRemoveConfigWidget(TQObject*)));
if (!d->mGame) {
diff --git a/libkdegames/kgame/dialogs/kgamedialog.h b/libkdegames/kgame/dialogs/kgamedialog.h
index 709f71c6..cb731993 100644
--- a/libkdegames/kgame/dialogs/kgamedialog.h
+++ b/libkdegames/kgame/dialogs/kgamedialog.h
@@ -74,6 +74,7 @@ class KGameDialogPrivate;
class KDE_EXPORT KGameDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum ConfigOptions
@@ -94,11 +95,11 @@ public:
* @param owner The KPlayer object who is responsible for this
* dialog, aka "the local player"
* @param title The title of the dialog - see KDialog::setCaption
- * @param parent The parent of the dialog
+ * @param tqparent The tqparent of the dialog
* @param modal Whether the dialog is modal or not
**/
KGameDialog(KGame* g, KPlayer* owner, const TQString& title,
- TQWidget* parent, bool modal = false);
+ TQWidget* tqparent, bool modal = false);
/**
* Create a KGameDialog with the standard configuration widgets. This
@@ -121,7 +122,7 @@ public:
* @param owner The KPlayer object who is responsible for this
* dialog, aka "the local player"
* @param title The title of the dialog - see KDialog::setCaption
- * @param parent The parent of the dialog
+ * @param tqparent The tqparent of the dialog
* @param modal Whether the dialog is modal or not
* @param initConfigs whether the default KGameDialogConfig widgets
* shall be created using initDefaultDialog. Use false if you want
@@ -130,7 +131,7 @@ public:
* if initConfigs = false
**/
KGameDialog(KGame* g, KPlayer* owner, const TQString& title,
- TQWidget* parent, long initConfigs = AllConfig,
+ TQWidget* tqparent, long initConfigs = AllConfig,
int chatMsgId = 15432, bool modal = false);
virtual ~KGameDialog();
@@ -168,14 +169,14 @@ public:
virtual void submitToKGame();
/**
- * Adds a KGameChat to the dialog. If no parent is specified the
+ * Adds a KGameChat to the dialog. If no tqparent is specified the
* game page will be used.
* @param chat The chat widget
- * @param parent The parent of the chat widget. This MUST be an
+ * @param tqparent The tqparent of the chat widget. This MUST be an
* already added config widget. Note that the game page will be used
- * if parent is 0.
+ * if tqparent is 0.
**/
- void addChatWidget(KGameDialogChatConfig* chat, TQVBox* parent = 0);
+ void addChatWidget(KGameDialogChatConfig* chat, TQVBox* tqparent = 0);
/**
* Add a connection list to the dialog. The list consists of a
@@ -186,10 +187,10 @@ public:
* This is another not-really-config-config-widget. It just displays the
* connections and lets you ban players.
* @param c The KGameDialogConnectionConfig object
- * @param parent The parent of the widget. If 0 the networkConfig
+ * @param tqparent The tqparent of the widget. If 0 the networkConfig
* page is used.
**/
- void addConnectionList(KGameDialogConnectionConfig* c, TQVBox* parent = 0);
+ void addConnectionList(KGameDialogConnectionConfig* c, TQVBox* tqparent = 0);
/**
* Add a new page to the dialog. The page will contain you new config
@@ -222,12 +223,12 @@ public:
KGameDialogGeneralConfig* gameConfig() const;
/**
- * Add a config widget to the specified parent. Usually you call
+ * Add a config widget to the specified tqparent. Usually you call
* addConfigPage for one widget and addConfigWidget for another to add
* it to the same page. Just use the returned page of
* addConfigPage.
**/
- void addConfigWidget(KGameDialogConfig* widget, TQWidget* parent);
+ void addConfigWidget(KGameDialogConfig* widget, TQWidget* tqparent);
/**
* Used to add the main network config widget in a new page. Use this to
diff --git a/libkdegames/kgame/dialogs/kgamedialogconfig.cpp b/libkdegames/kgame/dialogs/kgamedialogconfig.cpp
index 44eaa3c7..af0172ef 100644
--- a/libkdegames/kgame/dialogs/kgamedialogconfig.cpp
+++ b/libkdegames/kgame/dialogs/kgamedialogconfig.cpp
@@ -57,7 +57,7 @@ public:
KPlayer* mOwner;
};
-KGameDialogConfig::KGameDialogConfig(TQWidget* parent) : TQWidget(parent)
+KGameDialogConfig::KGameDialogConfig(TQWidget* tqparent) : TQWidget(tqparent)
{
d = new KGameDialogConfigPrivate;
}
@@ -116,13 +116,13 @@ public:
};
-KGameDialogNetworkConfig::KGameDialogNetworkConfig(TQWidget* parent)
- : KGameDialogConfig(parent)
+KGameDialogNetworkConfig::KGameDialogNetworkConfig(TQWidget* tqparent)
+ : KGameDialogConfig(tqparent)
{
// kdDebug(11001) << k_funcinfo << ": this=" << this << endl;
d = new KGameDialogNetworkConfigPrivate();
- TQVBoxLayout* topLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "toplayout");
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "toptqlayout");
TQHBoxLayout *hb = new TQHBoxLayout(topLayout, KDialog::spacingHint());
@@ -261,8 +261,8 @@ public:
TQVBoxLayout* mTopLayout;
};
-KGameDialogGeneralConfig::KGameDialogGeneralConfig(TQWidget* parent, bool initializeGUI)
- : KGameDialogConfig(parent)
+KGameDialogGeneralConfig::KGameDialogGeneralConfig(TQWidget* tqparent, bool initializeGUI)
+ : KGameDialogConfig(tqparent)
{
// kdDebug(11001) << k_funcinfo << ": this=" << this << endl;
d = new KGameDialogGeneralConfigPrivate;
@@ -295,7 +295,7 @@ void KGameDialogGeneralConfig::setPlayerName(const TQString& name)
TQString KGameDialogGeneralConfig::playerName() const
{
- return d->mName ? d->mName->text() : TQString::null;
+ return d->mName ? d->mName->text() : TQString();
}
void KGameDialogGeneralConfig::setOwner(KPlayer* p)
@@ -386,10 +386,10 @@ public:
// TODO: change ADMIN ID, remove CLIENTS, change MAXCLIENTS
-// we do everything here with QPushButtons as we want to wait a moment before
+// we do everything here with TQPushButtons as we want to wait a moment before
// continuing - the message must be sent over network first
-KGameDialogMsgServerConfig::KGameDialogMsgServerConfig(TQWidget* parent)
- : KGameDialogConfig(parent)
+KGameDialogMsgServerConfig::KGameDialogMsgServerConfig(TQWidget* tqparent)
+ : KGameDialogConfig(tqparent)
{
d = new KGameDialogMsgServerConfigPrivate;
@@ -465,12 +465,12 @@ void KGameDialogMsgServerConfig::slotChangeAdmin()
return;
}
//TODO
- Q_UINT32 newAdmin = 0;
+ TQ_UINT32 newAdmin = 0;
// newAdmin = ;
game()->electAdmin(newAdmin);
}
-void KGameDialogMsgServerConfig::removeClient(Q_UINT32 /*id*/)
+void KGameDialogMsgServerConfig::removeClient(TQ_UINT32 /*id*/)
{
//TODO
}
@@ -531,7 +531,7 @@ void KGameDialogMsgServerConfig::setHasMsgServer(bool has)
}
//TODO
// list all connections, data (max clients) and so on
- // cannot be done above (together with QPushButtons) as it is possible that
+ // cannot be done above (together with TQPushButtons) as it is possible that
// this client is ADMIN but not MASTER (i.e. doesn't own the messageserver)
}
@@ -547,8 +547,8 @@ public:
KGameChat* mChat;
};
-KGameDialogChatConfig::KGameDialogChatConfig(int chatMsgId, TQWidget* parent)
- : KGameDialogConfig(parent)
+KGameDialogChatConfig::KGameDialogChatConfig(int chatMsgId, TQWidget* tqparent)
+ : KGameDialogConfig(tqparent)
{
d = new KGameDialogChatConfigPrivate;
TQVBoxLayout* topLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
@@ -599,8 +599,8 @@ public:
KListBox* mPlayerBox;
};
-KGameDialogConnectionConfig::KGameDialogConnectionConfig(TQWidget* parent)
- : KGameDialogConfig(parent)
+KGameDialogConnectionConfig::KGameDialogConnectionConfig(TQWidget* tqparent)
+ : KGameDialogConfig(tqparent)
{
//TODO: prevent player to ban himself
d = new KGameDialogConnectionConfigPrivate;
@@ -714,7 +714,7 @@ void KGameDialogConnectionConfig::slotPlayerLeftGame(KPlayer* p)
// disconnect first
this->disconnect(p);
if (!item(p)) {
- kdError(11001) << k_funcinfo << ": cannot find " << p->id()
+ kdError(11001) << k_funcinfo << ": cannot tqfind " << p->id()
<< " in list" << endl;
return;
}
@@ -743,8 +743,8 @@ void KGameDialogConnectionConfig::slotKickPlayerOut(TQListBoxItem* item)
return;
}
- if (KMessageBox::questionYesNo(this, i18n("Do you want to ban player \"%1\" from the game?").arg(
- p->name()), TQString::null, i18n("Ban Player"), i18n("Do Not Ban")) == KMessageBox::Yes) {
+ if (KMessageBox::questionYesNo(this, i18n("Do you want to ban player \"%1\" from the game?").tqarg(
+ p->name()), TQString(), 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
diff --git a/libkdegames/kgame/dialogs/kgamedialogconfig.h b/libkdegames/kgame/dialogs/kgamedialogconfig.h
index 911c63aa..7c42d05d 100644
--- a/libkdegames/kgame/dialogs/kgamedialogconfig.h
+++ b/libkdegames/kgame/dialogs/kgamedialogconfig.h
@@ -48,11 +48,12 @@ class KGameDialogConfigPrivate;
* @short Base class for configuration widgets
* @author Andreas Beckermann <b_mann@gmx.de>
**/
-class KDE_EXPORT KGameDialogConfig : public QWidget
+class KDE_EXPORT KGameDialogConfig : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KGameDialogConfig(TQWidget* parent = 0);
+ KGameDialogConfig(TQWidget* tqparent = 0);
virtual ~KGameDialogConfig();
/**
@@ -136,7 +137,7 @@ private:
* The main game configuration widget.
*
* 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
+ * add widgets by using the KGameDialogGeneralConfig as tqparent parameter as it
* uses TQLayout::autoAdd == true.
* @author Andreas Beckermann <b_mann@gmx.de>
**/
@@ -144,23 +145,24 @@ class KGameDialogGeneralConfigPrivate;
class KGameDialogGeneralConfig : public KGameDialogConfig
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Construct a KGameDialogGeneralConfig. Currently it contains a line
* edit widget to change the player name only.
*
* If you just want to add more widgets you can just create your widgets
- * with the KGameDialogGeneralConfig as parent as it uses
+ * with the KGameDialogGeneralConfig as tqparent as it uses
* TQLayout::setAutoAdd(true).
*
- * @param parent Parent widget for this dialog.
+ * @param tqparent Parent widget for this dialog.
* @param initializeGUI If you really don't want to use the
- * predefined widget and/or layout use FALSE here. Note that then none
+ * predefined widget and/or tqlayout use FALSE here. Note that then none
* of the predefined widgets (currently only the name of the player)
* will exist anymore.
*
**/
- KGameDialogGeneralConfig(TQWidget* parent = 0, bool initializeGUI = true);
+ KGameDialogGeneralConfig(TQWidget* tqparent = 0, bool initializeGUI = true);
virtual ~KGameDialogGeneralConfig();
/**
@@ -211,8 +213,9 @@ class KGameDialogNetworkConfigPrivate;
class KDE_EXPORT KGameDialogNetworkConfig : public KGameDialogConfig
{
Q_OBJECT
+ TQ_OBJECT
public:
- KGameDialogNetworkConfig(TQWidget* parent = 0);
+ KGameDialogNetworkConfig(TQWidget* tqparent = 0);
virtual ~KGameDialogNetworkConfig();
@@ -248,7 +251,7 @@ public:
* @param type Service type (something like _kwin4._tcp). It should be unique for application.
* @since 3.4
**/
- void setDiscoveryInfo(const TQString& type, const TQString& name=TQString::null);
+ void setDiscoveryInfo(const TQString& type, const TQString& name=TQString());
signals:
/**
@@ -277,8 +280,9 @@ class KGameDialogMsgServerConfigPrivate;
class KGameDialogMsgServerConfig : public KGameDialogConfig
{
Q_OBJECT
+ TQ_OBJECT
public:
- KGameDialogMsgServerConfig(TQWidget* parent = 0);
+ KGameDialogMsgServerConfig(TQWidget* tqparent = 0);
virtual ~KGameDialogMsgServerConfig();
virtual void submitToKGame(KGame*, KPlayer*) {}
@@ -294,7 +298,7 @@ protected slots:
void slotRemoveClient();
protected:
- void removeClient(Q_UINT32 id);
+ void removeClient(TQ_UINT32 id);
private:
KGameDialogMsgServerConfigPrivate* d;
@@ -310,8 +314,9 @@ class KGameDialogChatConfigPrivate;
class KGameDialogChatConfig : public KGameDialogConfig
{
Q_OBJECT
+ TQ_OBJECT
public:
- KGameDialogChatConfig(int chatMsgId, TQWidget* parent = 0);
+ KGameDialogChatConfig(int chatMsgId, TQWidget* tqparent = 0);
virtual ~KGameDialogChatConfig();
virtual void setKGame(KGame* g);
@@ -331,8 +336,9 @@ class KGameDialogConnectionConfigPrivate;
class KGameDialogConnectionConfig : public KGameDialogConfig
{
Q_OBJECT
+ TQ_OBJECT
public:
- KGameDialogConnectionConfig(TQWidget* parent = 0);
+ KGameDialogConnectionConfig(TQWidget* tqparent = 0);
virtual ~KGameDialogConnectionConfig();
virtual void setKGame(KGame* g);
diff --git a/libkdegames/kgame/dialogs/kgameerrordialog.cpp b/libkdegames/kgame/dialogs/kgameerrordialog.cpp
index 7c3b0509..d5df6ba3 100644
--- a/libkdegames/kgame/dialogs/kgameerrordialog.cpp
+++ b/libkdegames/kgame/dialogs/kgameerrordialog.cpp
@@ -37,7 +37,7 @@ public:
const KGame* mGame;
};
-KGameErrorDialog::KGameErrorDialog(TQWidget* parent) : TQObject(parent)
+KGameErrorDialog::KGameErrorDialog(TQWidget* tqparent) : TQObject(tqparent)
{
d = new KGameErrorDialogPrivate;
}
@@ -59,8 +59,8 @@ void KGameErrorDialog::setKGame(const KGame* g)
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)));
+ connect(d->mGame, TQT_SIGNAL(signalClientDisconnected(TQ_UINT32,bool)),
+ this, TQT_SLOT(slotClientConnectionLost(TQ_UINT32,bool)));
}
void KGameErrorDialog::slotUnsetKGame()
@@ -71,33 +71,33 @@ void KGameErrorDialog::slotUnsetKGame()
d->mGame = 0;
}
-void KGameErrorDialog::error(const TQString& errorText, TQWidget* parent)
-{ KMessageBox::error(parent, errorText); }
+void KGameErrorDialog::error(const TQString& errorText, TQWidget* tqparent)
+{ KMessageBox::error(tqparent, errorText); }
void KGameErrorDialog::slotServerConnectionLost()
{
// TODO: add IP/port of the server
TQString message = i18n("Connection to the server has been lost!");
- error(message, (TQWidget*)parent());
+ error(message, (TQWidget*)tqparent());
}
-void KGameErrorDialog::slotClientConnectionLost(Q_UINT32 /*id*/,bool)
+void KGameErrorDialog::slotClientConnectionLost(TQ_UINT32 /*id*/,bool)
{
//TODO: add IP/port of the client
TQString message;
// if (c) {
-// message = i18n("Connection to client has been lost!\nID: %1\nIP: %2").arg(c->id()).arg(c->IP());
+// message = i18n("Connection to client has been lost!\nID: %1\nIP: %2").tqarg(c->id()).tqarg(c->IP());
// } else {
// message = i18n("Connection to client has been lost!");
// }
message = i18n("Connection to client has been lost!");
- error(message, (TQWidget*)parent());
+ error(message, (TQWidget*)tqparent());
}
void KGameErrorDialog::slotError(int errorNo, TQString text)
{
- TQString message = i18n("Received a network error!\nError number: %1\nError message: %2").arg(errorNo).arg(text);
- error(message, (TQWidget*)parent());
+ TQString message = i18n("Received a network error!\nError number: %1\nError message: %2").tqarg(errorNo).tqarg(text);
+ error(message, (TQWidget*)tqparent());
}
void KGameErrorDialog::connectionError(TQString s)
@@ -106,17 +106,17 @@ void KGameErrorDialog::connectionError(TQString s)
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);
+ message = i18n("No connection could be created.\nThe error message was:\n%1").tqarg(s);
}
- error(message, (TQWidget*)parent());
+ error(message, (TQWidget*)tqparent());
}
// should become the real dialog - currently we just use messageboxes
// -> maybe unused forever
-KGameErrorMessageDialog::KGameErrorMessageDialog(TQWidget* parent)
- : KDialogBase(Plain, i18n("Error"), Ok, Ok, parent, 0, true, true)
+KGameErrorMessageDialog::KGameErrorMessageDialog(TQWidget* tqparent)
+ : KDialogBase(Plain, i18n("Error"), Ok, Ok, tqparent, 0, true, true)
{
}
diff --git a/libkdegames/kgame/dialogs/kgameerrordialog.h b/libkdegames/kgame/dialogs/kgameerrordialog.h
index 3883399b..b8d34c1a 100644
--- a/libkdegames/kgame/dialogs/kgameerrordialog.h
+++ b/libkdegames/kgame/dialogs/kgameerrordialog.h
@@ -36,11 +36,12 @@ class KGameErrorDialogPrivate;
* @short Error handling for KGame
* @author Andreas Beckermann <b_mann@gmx.de>
**/
-class KGameErrorDialog : public QObject
+class KGameErrorDialog : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KGameErrorDialog(TQWidget* parent);
+ KGameErrorDialog(TQWidget* tqparent);
~KGameErrorDialog();
/**
@@ -55,9 +56,9 @@ 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 TQString::null
+ * already in use). Will be ignored if TQString()
**/
- void connectionError(TQString s = TQString::null);
+ void connectionError(TQString s = TQString());
public slots:
void slotError(int error, TQString text);
@@ -74,7 +75,7 @@ public slots:
*
* See @ref KGameNetwork::signalClientDisconnected
**/
- void slotClientConnectionLost(Q_UINT32 clientID,bool broken);
+ void slotClientConnectionLost(TQ_UINT32 clientID,bool broken);
/**
* Unsets a @ref KGame which has been set using @ref setKGame before.
@@ -87,7 +88,7 @@ public slots:
void slotUnsetKGame();
protected:
- void error(const TQString& errorText, TQWidget* parent = 0);
+ void error(const TQString& errorText, TQWidget* tqparent = 0);
private:
KGameErrorDialogPrivate* d;
@@ -103,8 +104,9 @@ private:
class KGameErrorMessageDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KGameErrorMessageDialog(TQWidget* parent);
+ KGameErrorMessageDialog(TQWidget* tqparent);
~KGameErrorMessageDialog();
private:
diff --git a/libkdegames/kgame/kgame.cpp b/libkdegames/kgame/kgame.cpp
index ff215837..42a21580 100644
--- a/libkdegames/kgame/kgame.cpp
+++ b/libkdegames/kgame/kgame.cpp
@@ -75,13 +75,13 @@ public:
//KGamePropertys
KGamePropertyInt mMaxPlayer;
KGamePropertyUInt mMinPlayer;
- KGamePropertyInt mGameStatus; // Game running?
+ KGamePropertyInt mGametqStatus; // Game running?
TQValueList<int> mInactiveIdList;
};
// ------------------- GAME CLASS --------------------------
-KGame::KGame(int cookie,TQObject* parent) : KGameNetwork(cookie,parent)
+KGame::KGame(int cookie,TQObject* tqparent) : KGameNetwork(cookie,tqparent)
{
kdDebug(11001) << k_funcinfo << " - " << this << ", sizeof(KGame)=" << sizeof(KGame) << endl;
d = new KGamePrivate;
@@ -95,16 +95,16 @@ KGame::KGame(int cookie,TQObject* parent) : KGameNetwork(cookie,parent)
d->mMaxPlayer.setLocal(-1); // Infinite
d->mMinPlayer.registerData(KGamePropertyBase::IdMinPlayer, this, i18n("MinPlayers"));
d->mMinPlayer.setLocal(0); // Always ok
- d->mGameStatus.registerData(KGamePropertyBase::IdGameStatus, this, i18n("GameStatus"));
- d->mGameStatus.setLocal(Init);
+ d->mGametqStatus.registerData(KGamePropertyBase::IdGametqStatus, this, i18n("GametqStatus"));
+ d->mGametqStatus.setLocal(Init);
// d->mUniquePlayerNumber = 0;
d->mRandom = new KRandomSequence;
d->mRandom->setSeed(0);
- connect(this, TQT_SIGNAL(signalClientConnected(Q_UINT32)),
- this, TQT_SLOT(slotClientConnected(Q_UINT32)));
- connect(this, TQT_SIGNAL(signalClientDisconnected(Q_UINT32,bool)),
- this, TQT_SLOT(slotClientDisconnected(Q_UINT32,bool)));
+ connect(this, TQT_SIGNAL(signalClientConnected(TQ_UINT32)),
+ this, TQT_SLOT(slotClientConnected(TQ_UINT32)));
+ connect(this, TQT_SIGNAL(signalClientDisconnected(TQ_UINT32,bool)),
+ this, TQT_SLOT(slotClientDisconnected(TQ_UINT32,bool)));
connect(this, TQT_SIGNAL(signalConnectionBroken()),
this, TQT_SLOT(slotServerDisconnected()));
@@ -184,7 +184,7 @@ bool KGame::loadgame(TQDataStream &stream, bool network,bool resetgame)
// Load Game Data
// internal data
- Q_INT32 c;
+ TQ_INT32 c;
stream >> c; // cookie
if (c!=cookie())
@@ -241,7 +241,7 @@ bool KGame::loadgame(TQDataStream &stream, bool network,bool resetgame)
systemAddPlayer(newplayer);
}
- Q_INT16 cookie;
+ TQ_INT16 cookie;
stream >> cookie;
if (cookie==KGAME_LOAD_COOKIE) {
kdDebug(11001) << " Game loaded propertly"<<endl;
@@ -289,7 +289,7 @@ bool KGame::savegame(TQDataStream &stream,bool /*network*/,bool saveplayers)
// Save Game Data
// internal variables
- Q_INT32 c=cookie();
+ TQ_INT32 c=cookie();
stream << c;
uint p=(uint)policy();
@@ -314,7 +314,7 @@ bool KGame::savegame(TQDataStream &stream,bool /*network*/,bool saveplayers)
stream << (uint)0; // no players saved
}
- stream << (Q_INT16)KGAME_LOAD_COOKIE;
+ stream << (TQ_INT16)KGAME_LOAD_COOKIE;
emit signalSave(stream);
return true;
@@ -323,9 +323,9 @@ bool KGame::savegame(TQDataStream &stream,bool /*network*/,bool saveplayers)
void KGame::savePlayer(TQDataStream &stream,KPlayer* p)
{
// this could be in KGameMessage as well
- stream << (Q_INT32)p->rtti();
- stream << (Q_INT32)p->id();
- stream << (Q_INT32)p->calcIOValue();
+ stream << (TQ_INT32)p->rtti();
+ stream << (TQ_INT32)p->id();
+ stream << (TQ_INT32)p->calcIOValue();
p->save(stream);
}
@@ -336,7 +336,7 @@ void KGame::savePlayers(TQDataStream &stream, KGamePlayerList *list)
list=playerList();
}
- Q_INT32 cnt=list->count();
+ TQ_INT32 cnt=list->count();
kdDebug(11001) << "Saving KGame " << cnt << " KPlayer objects " << endl;
stream << cnt;
KPlayer *player;
@@ -353,7 +353,7 @@ KPlayer *KGame::createPlayer(int /*rtti*/,int /*io*/,bool /*isvirtual*/)
}
KPlayer *KGame::loadPlayer(TQDataStream& stream,bool isvirtual)
{
- Q_INT32 rtti,id,iovalue;
+ TQ_INT32 rtti,id,iovalue;
stream >> rtti >> id >> iovalue;
KPlayer *newplayer=findPlayer(id);
if (!newplayer)
@@ -383,7 +383,7 @@ KPlayer *KGame::loadPlayer(TQDataStream& stream,bool isvirtual)
// ----------------- Player handling -----------------------
-KPlayer * KGame::findPlayer(Q_UINT32 id) const
+KPlayer * KGame::findPlayer(TQ_UINT32 id) const
{
for (TQPtrListIterator<KPlayer> it(d->mPlayerList); it.current(); ++it)
{
@@ -507,7 +507,7 @@ void KGame::playerDeleted(KPlayer *player)
}
}
-bool KGame::removePlayer(KPlayer * player, Q_UINT32 receiver)
+bool KGame::removePlayer(KPlayer * player, TQ_UINT32 receiver)
{//transmit to all clients, or to receiver only
if (!player)
{
@@ -542,10 +542,10 @@ void KGame::systemRemovePlayer(KPlayer* player,bool deleteit)
kdWarning(11001) << "player " << player << "(" << player->id() << ") Could not be found!" << endl;
}
- if (gameStatus()==(int)Run && playerCount()<minPlayers())
+ if (gametqStatus()==(int)Run && playerCount()<minPlayers())
{
kdWarning(11001) << k_funcinfo ": not enough players, PAUSING game\n" << endl;
- setGameStatus(Pause);
+ setGametqStatus(Pause);
}
}
@@ -680,11 +680,11 @@ int KGame::maxPlayers() const
uint KGame::playerCount() const
{ return d->mPlayerList.count(); }
-int KGame::gameStatus() const
-{ return d->mGameStatus.value(); }
+int KGame::gametqStatus() const
+{ return d->mGametqStatus.value(); }
bool KGame::isRunning() const
-{ return d->mGameStatus.value() == Run; }
+{ return d->mGametqStatus.value() == Run; }
KGamePropertyHandler* KGame::dataHandler() const
{ return d->mProperties; }
@@ -706,7 +706,7 @@ KRandomSequence* KGame::random() const
{ return d->mRandom; }
-bool KGame::sendPlayerInput(TQDataStream &msg, KPlayer *player, Q_UINT32 sender)
+bool KGame::sendPlayerInput(TQDataStream &msg, KPlayer *player, TQ_UINT32 sender)
{
if (!player)
{
@@ -724,7 +724,7 @@ bool KGame::sendPlayerInput(TQDataStream &msg, KPlayer *player, Q_UINT32 sender)
return true;
}
-bool KGame::systemPlayerInput(TQDataStream &msg, KPlayer *player, Q_UINT32 sender)
+bool KGame::systemPlayerInput(TQDataStream &msg, KPlayer *player, TQ_UINT32 sender)
{
if (!player)
{
@@ -772,7 +772,7 @@ KPlayer * KGame::playerInputFinished(KPlayer *player)
{
player->setTurn(false);
}
- setGameStatus(End);
+ setGametqStatus(End);
emit signalGameOver(gameOver,player,this);
}
else if (!player->asyncInput())
@@ -829,7 +829,7 @@ KPlayer *KGame::nextPlayer(KPlayer *last,bool exclusive)
return 0;
}
-void KGame::setGameStatus(int status)
+void KGame::setGametqStatus(int status)
{
kdDebug(11001) << k_funcinfo << ": GAMESTATUS CHANGED to" << status << endl;
if (status==(int)Run && playerCount()<minPlayers())
@@ -837,10 +837,10 @@ void KGame::setGameStatus(int status)
kdDebug(11001) << k_funcinfo << ": not enough players, pausing game\n" << endl;
status=Pause;
}
- d->mGameStatus = status;
+ d->mGametqStatus = status;
}
-void KGame::networkTransmission(TQDataStream &stream, int msgid, Q_UINT32 receiver, Q_UINT32 sender, Q_UINT32 /*clientID*/)
+void KGame::networkTransmission(TQDataStream &stream, int msgid, TQ_UINT32 receiver, TQ_UINT32 sender, TQ_UINT32 /*clientID*/)
{//clientID is unused
// message targets a playerobject. If we find it we forward the message to the
// player. Otherwise we proceed here and hope the best that the user processes
@@ -884,8 +884,8 @@ void KGame::networkTransmission(TQDataStream &stream, int msgid, Q_UINT32 receiv
{
case KGameMessage::IdSetupGame: // Client: First step in setup game
{
- Q_INT16 v;
- Q_INT32 c;
+ TQ_INT16 v;
+ TQ_INT32 c;
stream >> v >> c;
kdDebug(11001) << " ===================> (Client) " << k_funcinfo << ": Got IdSetupGame ================== " << endl;
kdDebug(11001) << "our game id is " << gameId() << " Lib version=" << v << " App Cookie=" << c << endl;
@@ -1043,10 +1043,10 @@ void KGame::networkTransmission(TQDataStream &stream, int msgid, Q_UINT32 receiv
// called by the IdSetupGameContinue Message - MASTER SIDE
// Here the master needs to decide which players can take part at the game
// and which will be deactivated
-void KGame::setupGameContinue(TQDataStream& stream, Q_UINT32 sender)
+void KGame::setupGameContinue(TQDataStream& stream, TQ_UINT32 sender)
{
KPlayer *player;
- Q_INT32 cnt;
+ TQ_INT32 cnt;
int i;
stream >> cnt;
@@ -1093,7 +1093,7 @@ void KGame::setupGameContinue(TQDataStream& stream, Q_UINT32 sender)
for ( player=newPlayerList.first(); player != 0; player=newPlayerList.next() )
{
// Already in the list
- if (inactivateIds.find(player->id())!=inactivateIds.end())
+ if (inactivateIds.tqfind(player->id())!=inactivateIds.end())
{
continue;
}
@@ -1109,7 +1109,7 @@ void KGame::setupGameContinue(TQDataStream& stream, Q_UINT32 sender)
for ( player=d->mPlayerList.first(); player != 0; player=d->mPlayerList.next() )
{
// Already in the list
- if (inactivateIds.find(player->id())!=inactivateIds.end())
+ if (inactivateIds.tqfind(player->id())!=inactivateIds.end())
{
continue;
}
@@ -1171,9 +1171,9 @@ void KGame::setupGameContinue(TQDataStream& stream, Q_UINT32 sender)
// Now send out the player list which the client can activate
for ( player=newPlayerList.first(); player != 0; player=newPlayerList.next() )
{
- kdDebug(11001) << " newplayerlist contains " << player->id() << endl;
+ kdDebug(11001) << " newplayerlist tqcontains " << player->id() << endl;
// Only activate what is not in the list
- if (inactivateIds.find(player->id())!=inactivateIds.end())
+ if (inactivateIds.tqfind(player->id())!=inactivateIds.end())
{
continue;
}
@@ -1195,14 +1195,14 @@ void KGame::setupGameContinue(TQDataStream& stream, Q_UINT32 sender)
// called by the IdSetupGame Message - CLIENT SIDE
// Client needs to prepare for network transfer
-void KGame::setupGame(Q_UINT32 sender)
+void KGame::setupGame(TQ_UINT32 sender)
{
TQByteArray bufferS;
TQDataStream streamS(bufferS,IO_WriteOnly);
// Deactivate all players
KGamePlayerList mTmpList(d->mPlayerList); // we need copy otherwise the removal crashes
- Q_INT32 cnt=mTmpList.count();
+ TQ_INT32 cnt=mTmpList.count();
kdDebug(11001) << "Client: playerlistcount=" << d->mPlayerList.count() << " tmplistcout=" << cnt << endl;
streamS << cnt;
@@ -1244,14 +1244,14 @@ void KGame::Debug()
kdDebug(11001) << "------------------- KGAME -------------------------" << endl;
kdDebug(11001) << "this: " << this << endl;
kdDebug(11001) << "uniquePlayer " << d->mUniquePlayerNumber << endl;
- kdDebug(11001) << "gameStatus " << gameStatus() << endl;
+ kdDebug(11001) << "gametqStatus " << gametqStatus() << endl;
kdDebug(11001) << "MaxPlayers : " << maxPlayers() << endl;
kdDebug(11001) << "NoOfPlayers : " << playerCount() << endl;
kdDebug(11001) << "NoOfInactive: " << d->mInactivePlayerList.count() << endl;
kdDebug(11001) << "---------------------------------------------------" << endl;
}
-void KGame::slotClientConnected(Q_UINT32 clientID)
+void KGame::slotClientConnected(TQ_UINT32 clientID)
{
if (isAdmin())
{
@@ -1264,7 +1264,7 @@ void KGame::slotServerDisconnected() // Client side
kdDebug(11001) << "======= SERVER DISCONNECT ======="<<endl;
kdDebug(11001) << "+++ (CLIENT)++++++++" << k_funcinfo << ": our GameID="<<gameId() << endl;
- int oldgamestatus=gameStatus();
+ int oldgamestatus=gametqStatus();
KPlayer *player;
KGamePlayerList removeList;
@@ -1322,11 +1322,11 @@ void KGame::slotServerDisconnected() // Client side
emit signalClientLeftGame(0,oldgamestatus,this);
}
-void KGame::slotClientDisconnected(Q_UINT32 clientID,bool /*broken*/) // server side
+void KGame::slotClientDisconnected(TQ_UINT32 clientID,bool /*broken*/) // server side
{
kdDebug(11001) << "++++(SERVER)+++++++" << k_funcinfo << " clientId=" << clientID << endl;
- int oldgamestatus=gameStatus();
+ int oldgamestatus=gametqStatus();
KPlayer *player;
KGamePlayerList removeList;
@@ -1373,7 +1373,7 @@ void KGame::slotClientDisconnected(Q_UINT32 clientID,bool /*broken*/) // server
// we send the number of players (including type) as well as game status and
// properties to the client. After the initialization has been completed both
// clients should have the same status (ie players, properties, etc)
-void KGame::negotiateNetworkGame(Q_UINT32 clientID)
+void KGame::negotiateNetworkGame(TQ_UINT32 clientID)
{
kdDebug(11001) << "===========================" << k_funcinfo << ": clientID=" << clientID << " =========================== "<< endl;
if (!isAdmin())
@@ -1386,17 +1386,17 @@ void KGame::negotiateNetworkGame(Q_UINT32 clientID)
TQDataStream streamGS(buffer,IO_WriteOnly);
// write Game setup specific data
- //streamGS << (Q_INT32)maxPlayers();
- //streamGS << (Q_INT32)minPlayers();
+ //streamGS << (TQ_INT32)maxPlayers();
+ //streamGS << (TQ_INT32)minPlayers();
// send to the newly connected client *only*
- Q_INT16 v=KGameMessage::version();
- Q_INT32 c=cookie();
+ TQ_INT16 v=KGameMessage::version();
+ TQ_INT32 c=cookie();
streamGS << v << c;
sendSystemMessage(streamGS, KGameMessage::IdSetupGame, clientID);
}
-bool KGame::sendGroupMessage(const TQByteArray &msg, int msgid, Q_UINT32 sender, const TQString& group)
+bool KGame::sendGroupMessage(const TQByteArray &msg, int msgid, TQ_UINT32 sender, const TQString& group)
{
// AB: group must not be i18n'ed!! we should better use an id for group and use
// a groupName() for the name // FIXME
@@ -1411,10 +1411,10 @@ bool KGame::sendGroupMessage(const TQByteArray &msg, int msgid, Q_UINT32 sender,
return true;
}
-bool KGame::sendGroupMessage(const TQDataStream &msg, int msgid, Q_UINT32 sender, const TQString& group)
+bool KGame::sendGroupMessage(const TQDataStream &msg, int msgid, TQ_UINT32 sender, const TQString& group)
{ return sendGroupMessage(((TQBuffer*)msg.device())->buffer(), msgid, sender, group); }
-bool KGame::sendGroupMessage(const TQString& msg, int msgid, Q_UINT32 sender, const TQString& group)
+bool KGame::sendGroupMessage(const TQString& msg, int msgid, TQ_UINT32 sender, const TQString& group)
{
TQByteArray buffer;
TQDataStream stream(buffer, IO_WriteOnly);
@@ -1425,7 +1425,7 @@ bool KGame::sendGroupMessage(const TQString& msg, int msgid, Q_UINT32 sender, co
bool KGame::addProperty(KGamePropertyBase* data)
{ return dataHandler()->addProperty(data); }
-bool KGame::sendPlayerProperty(int msgid, TQDataStream& s, Q_UINT32 playerId)
+bool KGame::sendPlayerProperty(int msgid, TQDataStream& s, TQ_UINT32 playerId)
{ return sendSystemMessage(s, msgid, playerId); }
void KGame::sendProperty(int msgid, TQDataStream& stream, bool* sent)
@@ -1443,7 +1443,7 @@ void KGame::emitSignal(KGamePropertyBase *me)
}
KGamePropertyBase* KGame::findProperty(int id) const
-{ return d->mProperties->find(id); }
+{ return d->mProperties->tqfind(id); }
KGame::GamePolicy KGame::policy() const
{
diff --git a/libkdegames/kgame/kgame.h b/libkdegames/kgame/kgame.h
index 85a8356c..af278d5a 100644
--- a/libkdegames/kgame/kgame.h
+++ b/libkdegames/kgame/kgame.h
@@ -62,6 +62,7 @@ class KGamePrivate;
class KDE_EXPORT KGame : public KGameNetwork
{
Q_OBJECT
+ TQ_OBJECT
public:
typedef TQPtrList<KPlayer> KGamePlayerList;
@@ -100,7 +101,7 @@ public:
* game in load/save and network operations. Change this between
* games.
*/
- KGame(int cookie=42,TQObject* parent=0);
+ KGame(int cookie=42,TQObject* tqparent=0);
/**
* Destructs the game
@@ -117,7 +118,7 @@ public:
* The KGame e.g. sets the status to Pause when you have
* less player than the minimum amount
*/
- enum GameStatus
+ enum GametqStatus
{
Init = 0,
Run = 1,
@@ -126,7 +127,7 @@ public:
Abort = 4,
SystemPause = 5,
Intro = 6,
- UserStatus = 7
+ UsertqStatus = 7
};
// Properties
@@ -178,7 +179,7 @@ public:
* @param id Player id
* @return player object
*/
- KPlayer *findPlayer(Q_UINT32 id) const;
+ KPlayer *findPlayer(TQ_UINT32 id) const;
/**
* Set a new @ref KGameSequence to control player management. By default
@@ -282,7 +283,7 @@ public:
* Called by KPlayer to send a player input to the
* KMessageServer.
**/
- virtual bool sendPlayerInput(TQDataStream &msg,KPlayer *player,Q_UINT32 sender=0);
+ virtual bool sendPlayerInput(TQDataStream &msg,KPlayer *player,TQ_UINT32 sender=0);
/**
* Called when a player input arrives from KMessageServer.
@@ -294,7 +295,7 @@ public:
*
* For documentation see playerInput.
**/
- virtual bool systemPlayerInput(TQDataStream &msg,KPlayer *player,Q_UINT32 sender=0);
+ virtual bool systemPlayerInput(TQDataStream &msg,KPlayer *player,TQ_UINT32 sender=0);
/**
* This virtual function is called if the KGame needs to create a new player.
@@ -386,14 +387,14 @@ public:
*
* @return game status
*/
- int gameStatus() const;
+ int gametqStatus() const;
/**
* sets the game status
*
* @param status the new status
*/
- void setGameStatus(int status);
+ void setGametqStatus(int status);
/**
* docu: see KPlayer
@@ -403,7 +404,7 @@ public:
/**
* This is called by KPlayer::sendProperty only! Internal function!
**/
- bool sendPlayerProperty(int msgid, TQDataStream& s, Q_UINT32 playerId);
+ bool sendPlayerProperty(int msgid, TQDataStream& s, TQ_UINT32 playerId);
/**
* This function allows to find the pointer to a player
@@ -432,13 +433,13 @@ public:
* @param msg the message which will be send. See messages.txt for contents
* @param msgid an id for this message
* @param sender the id of the sender
- * @param group the group of the receivers
+ * @param group the group of the tqreceivers
* @return true if worked
*/
- bool sendGroupMessage(const TQByteArray& msg, int msgid, Q_UINT32 sender, const TQString& group);
- bool sendGroupMessage(const TQDataStream &msg, int msgid, Q_UINT32 sender, const TQString& group);
- bool sendGroupMessage(int msg, int msgid, Q_UINT32 sender, const TQString& group);
- bool sendGroupMessage(const TQString& msg, int msgid, Q_UINT32 sender, const TQString& group);
+ bool sendGroupMessage(const TQByteArray& msg, int msgid, TQ_UINT32 sender, const TQString& group);
+ bool sendGroupMessage(const TQDataStream &msg, int msgid, TQ_UINT32 sender, const TQString& group);
+ bool sendGroupMessage(int msg, int msgid, TQ_UINT32 sender, const TQString& group);
+ bool sendGroupMessage(const TQString& msg, int msgid, TQ_UINT32 sender, const TQString& group);
/**
* This will either forward an incoming message to a specified player
@@ -458,7 +459,7 @@ public:
* @param sender
* @param clientID the client from which we received the transmission - hardly used
**/
- virtual void networkTransmission(TQDataStream &stream, int msgid, Q_UINT32 receiver, Q_UINT32 sender, Q_UINT32 clientID);
+ virtual void networkTransmission(TQDataStream &stream, int msgid, TQ_UINT32 receiver, TQ_UINT32 sender, TQ_UINT32 clientID);
/**
* Returns a pointer to the KGame property handler
@@ -487,7 +488,7 @@ protected slots:
* Calls negotiateNetworkGame()
* See KGameNetwork::signalClientConnected
**/
- void slotClientConnected(Q_UINT32 clientId);
+ void slotClientConnected(TQ_UINT32 clientId);
/**
* This slot is called whenever the connection to a client is lost (ie the
@@ -496,7 +497,7 @@ protected slots:
* @param clientId The client the connection has been lost to
* @param broken (ignore this - not used)
**/
- void slotClientDisconnected(Q_UINT32 clientId,bool broken);
+ void slotClientDisconnected(TQ_UINT32 clientId,bool broken);
/**
* This slot is called whenever the connection to the server is lost (ie the
@@ -593,14 +594,14 @@ signals:
* own methods and has to syncronise them over the network.
* Reaction to this is usually a call to a KGame function.
*/
- void signalNetworkData(int msgid,const TQByteArray& buffer, Q_UINT32 receiver, Q_UINT32 sender);
+ void signalNetworkData(int msgid,const TQByteArray& buffer, TQ_UINT32 receiver, TQ_UINT32 sender);
/**
* We got an network message. this can be used to notify us that something
* changed. What changed can be seen in the message id. Whether this is
* the best possible method to do this is unclear...
*/
- void signalMessageUpdate(int msgid,Q_UINT32 receiver,Q_UINT32 sender);
+ void signalMessageUpdate(int msgid,TQ_UINT32 receiver,TQ_UINT32 sender);
/**
* a player left the game because of a broken connection or so!
@@ -649,7 +650,7 @@ signals:
* @param clientid - The id of the new client
* @param me - our game pointer
*/
- void signalClientJoinedGame(Q_UINT32 clientid,KGame *me);
+ void signalClientJoinedGame(TQ_UINT32 clientid,KGame *me);
/**
* This signal is emitted after a network partner left the
@@ -688,7 +689,7 @@ protected:
* \code
* bool MyClass::playerInput(TQDataStream &msg,KPlayer *player)
* {
- * Q_INT32 move;
+ * TQ_INT32 move;
* msg >> move;
* kdDebug() << " Player " << player->id() << " moved to " << move <<
* endl;
@@ -839,7 +840,7 @@ protected:
* Only the ADMIN is allowed to call this.
* @param clientID The ID of the message client which has connected
**/
- virtual void negotiateNetworkGame(Q_UINT32 clientID);
+ virtual void negotiateNetworkGame(TQ_UINT32 clientID);
/**
* syncronise the random numbers with all network clients
@@ -896,24 +897,24 @@ private:
* ever need this. It it internally used to initialize a newly connected
* client.
**/
- //void addPlayer(KPlayer* newplayer, Q_UINT32 receiver);
+ //void addPlayer(KPlayer* newplayer, TQ_UINT32 receiver);
/**
* Just the same as the public one except receiver:
* @param receiver 0 for broadcast, otherwise the receiver. Should only be
* used in special circumstances and not outside KGame.
**/
- bool removePlayer(KPlayer * player, Q_UINT32 receiver);
+ bool removePlayer(KPlayer * player, TQ_UINT32 receiver);
/**
* Helping function - game negotiation
**/
- void setupGame(Q_UINT32 sender);
+ void setupGame(TQ_UINT32 sender);
/**
* Helping function - game negotiation
**/
- void setupGameContinue(TQDataStream& msg, Q_UINT32 sender);
+ void setupGameContinue(TQDataStream& msg, TQ_UINT32 sender);
/**
* Removes a player from all lists, removes the @ref KGame pointer from the
diff --git a/libkdegames/kgame/kgamechat.cpp b/libkdegames/kgame/kgamechat.cpp
index ddc1bd66..29d80807 100644
--- a/libkdegames/kgame/kgamechat.cpp
+++ b/libkdegames/kgame/kgamechat.cpp
@@ -57,18 +57,18 @@ public:
int mToMyGroup; // just as the above - but for the group, not for players
};
-KGameChat::KGameChat(KGame* g, int msgid, TQWidget* parent) : KChatBase(parent)
+KGameChat::KGameChat(KGame* g, int msgid, TQWidget* tqparent) : KChatBase(tqparent)
{
init(g, msgid);
}
-KGameChat::KGameChat(KGame* g, int msgid, KPlayer* fromPlayer, TQWidget* parent) : KChatBase(parent)
+KGameChat::KGameChat(KGame* g, int msgid, KPlayer* fromPlayer, TQWidget* tqparent) : KChatBase(tqparent)
{
init(g, msgid);
setFromPlayer(fromPlayer);
}
-KGameChat::KGameChat(TQWidget* parent) : KChatBase(parent)
+KGameChat::KGameChat(TQWidget* tqparent) : KChatBase(tqparent)
{
init(0, -1);
}
@@ -92,7 +92,7 @@ void KGameChat::addMessage(int fromId, const TQString& text)
{
if (!d->mGame) {
kdWarning(11001) << "no KGame object has been set" << endl;
- addMessage(i18n("Player %1").arg(fromId), text);
+ addMessage(i18n("Player %1").tqarg(fromId), text);
} else {
KPlayer* p = d->mGame->findPlayer(fromId);
if (p) {
@@ -162,10 +162,10 @@ bool KGameChat::isToGroupMessage(int id) const
bool KGameChat::isToPlayerMessage(int id) const
{
-return d->mSendId2PlayerId.contains(id); }
+return d->mSendId2PlayerId.tqcontains(id); }
TQString KGameChat::sendToPlayerEntry(const TQString& name) const
-{ return i18n("Send to %1").arg(name); }
+{ return i18n("Send to %1").tqarg(name); }
int KGameChat::playerId(int id) const
{
@@ -188,7 +188,7 @@ int KGameChat::sendingId(int playerId) const
}
const TQString& KGameChat::fromName() const
-{ return d->mFromPlayer ? d->mFromPlayer->name() : TQString::null; }
+{ return d->mFromPlayer ? d->mFromPlayer->name() : TQString(); }
bool KGameChat::hasPlayer(int id) const
{
@@ -211,7 +211,7 @@ void KGameChat::setFromPlayer(KPlayer* p)
removeSendingEntry(d->mToMyGroup);
}
d->mToMyGroup = nextId();
- addSendingEntry(i18n("Send to My Group (\"%1\")").arg(p->group()), d->mToMyGroup);
+ addSendingEntry(i18n("Send to My Group (\"%1\")").tqarg(p->group()), d->mToMyGroup);
}
d->mFromPlayer = p;
kdDebug(11001) << k_funcinfo << " player=" << p << endl;
@@ -231,8 +231,8 @@ void KGameChat::setKGame(KGame* g)
this, TQT_SLOT(slotAddPlayer(KPlayer*)));
connect(d->mGame, TQT_SIGNAL(signalPlayerLeftGame(KPlayer*)),
this, TQT_SLOT(slotRemovePlayer(KPlayer*)));
- connect(d->mGame, TQT_SIGNAL(signalNetworkData(int, const TQByteArray&, Q_UINT32, Q_UINT32)),
- this, TQT_SLOT(slotReceiveMessage(int, const TQByteArray&, Q_UINT32, Q_UINT32)));
+ connect(d->mGame, TQT_SIGNAL(signalNetworkData(int, const TQByteArray&, TQ_UINT32, TQ_UINT32)),
+ this, TQT_SLOT(slotReceiveMessage(int, const TQByteArray&, TQ_UINT32, TQ_UINT32)));
connect(d->mGame, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotUnsetKGame()));
TQPtrList<KPlayer> playerList = *d->mGame->playerList();
@@ -283,8 +283,8 @@ void KGameChat::slotAddPlayer(KPlayer* p)
d->mSendId2PlayerId.insert(sendingId, p->id());
connect(p, TQT_SIGNAL(signalPropertyChanged(KGamePropertyBase*, KPlayer*)),
this, TQT_SLOT(slotPropertyChanged(KGamePropertyBase*, KPlayer*)));
- connect(p, TQT_SIGNAL(signalNetworkData(int, const TQByteArray&, Q_UINT32, KPlayer*)),
- this, TQT_SLOT(slotReceivePrivateMessage(int, const TQByteArray&, Q_UINT32, KPlayer*)));
+ connect(p, TQT_SIGNAL(signalNetworkData(int, const TQByteArray&, TQ_UINT32, KPlayer*)),
+ this, TQT_SLOT(slotReceivePrivateMessage(int, const TQByteArray&, TQ_UINT32, KPlayer*)));
}
void KGameChat::slotRemovePlayer(KPlayer* p)
@@ -317,7 +317,7 @@ void KGameChat::slotPropertyChanged(KGamePropertyBase* prop, KPlayer* player)
}
}
-void KGameChat::slotReceivePrivateMessage(int msgid, const TQByteArray& buffer, Q_UINT32 sender, KPlayer* me)
+void KGameChat::slotReceivePrivateMessage(int msgid, const TQByteArray& buffer, TQ_UINT32 sender, KPlayer* me)
{
if (!me || me != fromPlayer()) {
kdDebug() << k_funcinfo << "nope - not for us!" << endl;
@@ -326,7 +326,7 @@ void KGameChat::slotReceivePrivateMessage(int msgid, const TQByteArray& buffer,
slotReceiveMessage(msgid, buffer, me->id(), sender);
}
-void KGameChat::slotReceiveMessage(int msgid, const TQByteArray& buffer, Q_UINT32 , Q_UINT32 sender)
+void KGameChat::slotReceiveMessage(int msgid, const TQByteArray& buffer, TQ_UINT32 , TQ_UINT32 sender)
{
TQDataStream msg(buffer, IO_ReadOnly);
if (msgid != messageId()) {
diff --git a/libkdegames/kgame/kgamechat.h b/libkdegames/kgame/kgamechat.h
index effcca22..f0d8310d 100644
--- a/libkdegames/kgame/kgamechat.h
+++ b/libkdegames/kgame/kgamechat.h
@@ -43,20 +43,21 @@ class KGameChatPrivate;
class KDE_EXPORT KGameChat : public KChatBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Construct a @ref KGame chat widget on @p game that used @p msgid for
* the chat message. The @p fromPlayer is the local player (see @ref
* setFromPlayer).
**/
- KGameChat(KGame* game, int msgid, KPlayer* fromPlayer, TQWidget * parent);
+ KGameChat(KGame* game, int msgid, KPlayer* fromPlayer, TQWidget * tqparent);
/**
* @overload
* To make use of this widget you need to call @ref setFromPlayer
* manually.
**/
- KGameChat(KGame* game, int msgId, TQWidget* parent);
+ KGameChat(KGame* game, int msgId, TQWidget* tqparent);
/**
* @overload
@@ -64,7 +65,7 @@ public:
* setGame, setFromPlayer and setMessageId manually.
* @since 3.2
**/
- KGameChat(TQWidget* parent);
+ KGameChat(TQWidget* tqparent);
virtual ~KGameChat();
@@ -102,7 +103,7 @@ public:
/**
* Change the message id of the chat widget. It is recommended that you
* don't use this but prefer the constructor instead, but in certain
- * situations (such as using this widget in Qt designer) it may be
+ * situations (such as using this widget in TQt designer) it may be
* useful to change the message id.
*
* See also @ref messageId
@@ -121,7 +122,7 @@ public slots:
virtual void addMessage(const TQString& fromName, const TQString& text) { KChatBase::addMessage(fromName, text);}
virtual void addMessage(int fromId, const TQString& text);
- void slotReceiveMessage(int, const TQByteArray&, Q_UINT32 receiver, Q_UINT32 sender);
+ void slotReceiveMessage(int, const TQByteArray&, TQ_UINT32 receiver, TQ_UINT32 sender);
protected:
/**
@@ -208,7 +209,7 @@ protected slots:
* gets forwarded to slotReceiveMessage if @p me equals
* fromPlayer.
**/
- void slotReceivePrivateMessage(int msgid, const TQByteArray& buffer, Q_UINT32 sender, KPlayer* me);
+ void slotReceivePrivateMessage(int msgid, const TQByteArray& buffer, TQ_UINT32 sender, KPlayer* me);
protected:
virtual void returnPressed(const TQString& text);
diff --git a/libkdegames/kgame/kgameerror.cpp b/libkdegames/kgame/kgameerror.cpp
index eb98a797..ef6145fb 100644
--- a/libkdegames/kgame/kgameerror.cpp
+++ b/libkdegames/kgame/kgameerror.cpp
@@ -30,8 +30,8 @@ TQByteArray KGameError::errVersion(int remoteVersion)
{
TQByteArray b;
TQDataStream s(b, IO_WriteOnly);
- s << (Q_INT32)KGameMessage::version();
- s << (Q_INT32)remoteVersion;
+ s << (TQ_INT32)KGameMessage::version();
+ s << (TQ_INT32)remoteVersion;
return b;
}
@@ -39,8 +39,8 @@ TQByteArray KGameError::errCookie(int localCookie, int remoteCookie)
{
TQByteArray b;
TQDataStream s(b, IO_WriteOnly);
- s << (Q_INT32)localCookie;
- s << (Q_INT32)remoteCookie;
+ s << (TQ_INT32)localCookie;
+ s << (TQ_INT32)remoteCookie;
return b;
}
@@ -56,24 +56,24 @@ TQString KGameError::errorText(int errorCode, TQDataStream& s)
switch (errorCode) {
case Cookie:
{
- Q_INT32 cookie1;
- Q_INT32 cookie2;
+ TQ_INT32 cookie1;
+ TQ_INT32 cookie2;
s >> cookie1;
s >> cookie2;
- text = i18n("Cookie mismatch!\nExpected Cookie: %1\nReceived Cookie: %2").arg(cookie1).arg(cookie2);
+ text = i18n("Cookie mismatch!\nExpected Cookie: %1\nReceived Cookie: %2").tqarg(cookie1).tqarg(cookie2);
break;
}
case Version:
{
- Q_INT32 version1;
- Q_INT32 version2;
+ TQ_INT32 version1;
+ TQ_INT32 version2;
s >> version1;
s >> version2;
- text = i18n("KGame Version mismatch!\nExpected Version: %1\nReceived Version: %2\n").arg(version1).arg(version2);
+ text = i18n("KGame Version mismatch!\nExpected Version: %1\nReceived Version: %2\n").tqarg(version1).tqarg(version2);
break;
}
default:
- text = i18n("Unknown error code %1").arg(errorCode);
+ text = i18n("Unknown error code %1").tqarg(errorCode);
}
return text;
}
diff --git a/libkdegames/kgame/kgameio.cpp b/libkdegames/kgame/kgameio.cpp
index 7183d5d3..a408c0cd 100644
--- a/libkdegames/kgame/kgameio.cpp
+++ b/libkdegames/kgame/kgameio.cpp
@@ -82,7 +82,7 @@ void KGameIO::notifyTurn(bool b)
if (sendit)
{
TQDataStream ostream(buffer,IO_ReadOnly);
- Q_UINT32 sender = player()->id(); // force correct sender
+ TQ_UINT32 sender = player()->id(); // force correct sender
kdDebug(11001) << "Prepare turn sendInput" << endl;
sendInput(ostream, true, sender);
}
@@ -97,7 +97,7 @@ KGame* KGameIO::game() const
return player()->game();
}
-bool KGameIO::sendInput(TQDataStream& s, bool transmit, Q_UINT32 sender)
+bool KGameIO::sendInput(TQDataStream& s, bool transmit, TQ_UINT32 sender)
{
if (!player())
{
@@ -117,21 +117,21 @@ void KGameIO::Debug()
// ----------------------- Key IO ---------------------------
-KGameKeyIO::KGameKeyIO(TQWidget *parent)
+KGameKeyIO::KGameKeyIO(TQWidget *tqparent)
: KGameIO()
{
- if (parent)
+ if (tqparent)
{
kdDebug(11001) << "Key Event filter installed" << endl;
- parent->installEventFilter(this);
+ tqparent->installEventFilter(this);
}
}
KGameKeyIO::~KGameKeyIO()
{
- if (parent())
+ if (tqparent())
{
- parent()->removeEventFilter(this);
+ tqparent()->removeEventFilter(this);
}
}
@@ -167,22 +167,22 @@ bool KGameKeyIO::eventFilter( TQObject *o, TQEvent *e )
// ----------------------- Mouse IO ---------------------------
-KGameMouseIO::KGameMouseIO(TQWidget *parent,bool trackmouse)
+KGameMouseIO::KGameMouseIO(TQWidget *tqparent,bool trackmouse)
: KGameIO()
{
- if (parent)
+ if (tqparent)
{
kdDebug(11001) << "Mouse Event filter installed tracking=" << trackmouse << endl;
- parent->installEventFilter(this);
- parent->setMouseTracking(trackmouse);
+ tqparent->installEventFilter(this);
+ tqparent->setMouseTracking(trackmouse);
}
}
KGameMouseIO::~KGameMouseIO()
{
- if (parent())
+ if (tqparent())
{
- parent()->removeEventFilter(this);
+ tqparent()->removeEventFilter(this);
}
}
@@ -193,9 +193,9 @@ int KGameMouseIO::rtti() const
void KGameMouseIO::setMouseTracking(bool b)
{
- if (parent())
+ if (tqparent())
{
- ((TQWidget*)parent())->setMouseTracking(b);
+ ((TQWidget*)tqparent())->setMouseTracking(b);
}
}
@@ -266,10 +266,10 @@ KGameProcessIO::KGameProcessIO(const TQString& name)
//kdDebug(11001) << "================= KMEssage SetSErver ==================== " << endl;
//d->mMessageClient->setServer(d->mMessageServer);
kdDebug(11001) << "================= KMEssage: Connect ==================== " << endl;
- //connect(d->mMessageClient, TQT_SIGNAL(broadcastReceived(const TQByteArray&, Q_UINT32)),
- // this, TQT_SLOT(clientMessage(const TQByteArray&, Q_UINT32)));
- //connect(d->mMessageClient, TQT_SIGNAL(forwardReceived(const TQByteArray&, Q_UINT32, const TQValueList <Q_UINT32> &)),
- // this, TQT_SLOT(clientMessage(const TQByteArray&, Q_UINT32, const TQValueList <Q_UINT32> &)));
+ //connect(d->mMessageClient, TQT_SIGNAL(broadcastReceived(const TQByteArray&, TQ_UINT32)),
+ // this, TQT_SLOT(clientMessage(const TQByteArray&, TQ_UINT32)));
+ //connect(d->mMessageClient, TQT_SIGNAL(forwardReceived(const TQByteArray&, TQ_UINT32, const TQValueList <TQ_UINT32> &)),
+ // this, TQT_SLOT(clientMessage(const TQByteArray&, TQ_UINT32, const TQValueList <TQ_UINT32> &)));
connect(d->mProcessIO, TQT_SIGNAL(received(const TQByteArray&)),
this, TQT_SLOT(receivedMessage(const TQByteArray&)));
//kdDebug(11001) << "Our client is id="<<d->mMessageClient->id() << endl;
@@ -302,7 +302,7 @@ void KGameProcessIO::initIO(KPlayer *p)
// Send 'hello' to process
TQByteArray buffer;
TQDataStream stream(buffer, IO_WriteOnly);
- Q_INT16 id = p->userId();
+ TQ_INT16 id = p->userId();
stream << id;
bool sendit=true;
@@ -311,7 +311,7 @@ void KGameProcessIO::initIO(KPlayer *p)
emit signalIOAdded(this,stream,p,&sendit);
if (sendit )
{
- Q_UINT32 sender = p->id();
+ TQ_UINT32 sender = p->id();
kdDebug(11001) << "Sending IOAdded to process player !!!!!!!!!!!!!! " << endl;
sendSystemMessage(stream, KGameMessage::IdIOAdded, 0, sender);
}
@@ -328,27 +328,27 @@ void KGameProcessIO::notifyTurn(bool b)
bool sendit=true;
TQByteArray buffer;
TQDataStream stream(buffer,IO_WriteOnly);
- stream << (Q_INT8)b;
+ stream << (TQ_INT8)b;
emit signalPrepareTurn(stream,b,this,&sendit);
if (sendit)
{
- Q_UINT32 sender=player()->id();
+ TQ_UINT32 sender=player()->id();
kdDebug(11001) << "Sending Turn to process player !!!!!!!!!!!!!! " << endl;
sendSystemMessage(stream, KGameMessage::IdTurn, 0, sender);
}
}
-void KGameProcessIO::sendSystemMessage(TQDataStream &stream,int msgid, Q_UINT32 receiver, Q_UINT32 sender)
+void KGameProcessIO::sendSystemMessage(TQDataStream &stream,int msgid, TQ_UINT32 receiver, TQ_UINT32 sender)
{
sendAllMessages(stream, msgid, receiver, sender, false);
}
-void KGameProcessIO::sendMessage(TQDataStream &stream,int msgid, Q_UINT32 receiver, Q_UINT32 sender)
+void KGameProcessIO::sendMessage(TQDataStream &stream,int msgid, TQ_UINT32 receiver, TQ_UINT32 sender)
{
sendAllMessages(stream, msgid, receiver, sender, true);
}
-void KGameProcessIO::sendAllMessages(TQDataStream &stream,int msgid, Q_UINT32 receiver, Q_UINT32 sender, bool usermsg)
+void KGameProcessIO::sendAllMessages(TQDataStream &stream,int msgid, TQ_UINT32 receiver, TQ_UINT32 sender, bool usermsg)
{
kdDebug(11001) << "==============> KGameProcessIO::sendMessage (usermsg="<<usermsg<<")" << endl;
// if (!player()) return ;
@@ -377,13 +377,13 @@ void KGameProcessIO::sendAllMessages(TQDataStream &stream,int msgid, Q_UINT32 re
}
}
-//void KGameProcessIO::clientMessage(const TQByteArray& receiveBuffer, Q_UINT32 clientID, const TQValueList <Q_UINT32> &recv)
+//void KGameProcessIO::clientMessage(const TQByteArray& receiveBuffer, TQ_UINT32 clientID, const TQValueList <TQ_UINT32> &recv)
void KGameProcessIO::receivedMessage(const TQByteArray& receiveBuffer)
{
TQDataStream stream(receiveBuffer,IO_ReadOnly);
int msgid;
- Q_UINT32 sender;
- Q_UINT32 receiver;
+ TQ_UINT32 sender;
+ TQ_UINT32 receiver;
KGameMessage::extractHeader(stream,sender,receiver,msgid);
kdDebug(11001) << "************* Got process message sender =" << sender
diff --git a/libkdegames/kgame/kgameio.h b/libkdegames/kgame/kgameio.h
index 82b84740..2f4b89ab 100644
--- a/libkdegames/kgame/kgameio.h
+++ b/libkdegames/kgame/kgameio.h
@@ -52,9 +52,10 @@ class KProcess;
*
* @author Martin Heni <martin@heni-online.de>
*/
-class KDE_EXPORT KGameIO : public QObject
+class KDE_EXPORT KGameIO : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -128,7 +129,7 @@ public:
/**
* Send an input message using @ref KPlayer::forwardInput
**/
- bool sendInput(TQDataStream& stream, bool transmit = true, Q_UINT32 sender = 0);
+ bool sendInput(TQDataStream& stream, bool transmit = true, TQ_UINT32 sender = 0);
signals:
/**
@@ -177,6 +178,7 @@ private:
class KDE_EXPORT KGameKeyIO : public KGameIO
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -185,7 +187,7 @@ public:
* handler signalKeyEvent and can be used to generate
* a valid move for the player.
* Note the widget you pass to the constructor must be
- * the main window of your application, e.g. view->parentWidget()
+ * the main window of your application, e.g. view->tqparentWidget()
* as QT does not forward your keyevents otherwise. This means
* that this might be a different widget comapred to the one you
* use for mouse inputs!
@@ -197,9 +199,9 @@ public:
* this,TQT_SLOT(slotKeyInput(KGameIO *,TQDataStream &,TQKeyEvent *,bool *)));
* \endcode
*
- * @param parent The parents widget whose keyboard events * should be grabbed
+ * @param tqparent The tqparents widget whose keyboard events * should be grabbed
*/
- KGameKeyIO(TQWidget *parent);
+ KGameKeyIO(TQWidget *tqparent);
virtual ~KGameKeyIO();
/**
@@ -221,7 +223,7 @@ signals:
* Example:
* \code
* KPlayer *player=input->player(); // Get the player
- * Q_INT32 key=e->key();
+ * TQ_INT32 key=e->key();
* stream << key;
* eatevent=true;
* \endcode
@@ -248,6 +250,7 @@ protected:
class KDE_EXPORT KGameMouseIO : public KGameIO
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -262,10 +265,10 @@ public:
* this,TQT_SLOT(slotMouseInput(KGameIO *,TQDataStream &,TQMouseEvent *,bool *)));
* \endcode
*
- * @param parent The widget whose events should be captured
+ * @param tqparent The widget whose events should be captured
* @param trackmouse enables mouse tracking (gives mouse move events)
*/
- KGameMouseIO(TQWidget *parent,bool trackmouse=false);
+ KGameMouseIO(TQWidget *tqparent,bool trackmouse=false);
virtual ~KGameMouseIO();
/**
@@ -291,7 +294,7 @@ signals:
* Example:
* \code
* KPlayer *player=input->player(); // Get the player
- * Q_INT32 button=e->button();
+ * TQ_INT32 button=e->button();
* stream << button;
* eatevent=true;
* \endcode
@@ -323,6 +326,7 @@ protected:
class KDE_EXPORT KGameProcessIO : public KGameIO
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -364,7 +368,7 @@ public:
* @param receiver - not used
* @param sender - who send the message
*/
- void sendMessage(TQDataStream &stream,int msgid, Q_UINT32 receiver, Q_UINT32 sender);
+ void sendMessage(TQDataStream &stream,int msgid, TQ_UINT32 receiver, TQ_UINT32 sender);
/**
* Send a system message to the process. This is analogous to the sendMessage
@@ -376,7 +380,7 @@ public:
* @param receiver - not used
* @param sender - who send the message
*/
- void sendSystemMessage(TQDataStream &stream, int msgid, Q_UINT32 receiver, Q_UINT32 sender);
+ void sendSystemMessage(TQDataStream &stream, int msgid, TQ_UINT32 receiver, TQ_UINT32 sender);
/**
* Init this device by setting the player and e.g. sending an
@@ -403,7 +407,7 @@ public:
/**
* Internal ~ombined function for all message handling
**/
- void sendAllMessages(TQDataStream &stream,int msgid, Q_UINT32 receiver, Q_UINT32 sender, bool usermsg);
+ void sendAllMessages(TQDataStream &stream,int msgid, TQ_UINT32 receiver, TQ_UINT32 sender, bool usermsg);
protected slots:
/**
@@ -477,6 +481,7 @@ private:
class KDE_EXPORT KGameComputerIO : public KGameIO
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/libkdegames/kgame/kgamemessage.cpp b/libkdegames/kgame/kgamemessage.cpp
index 228708e9..9f5e4694 100644
--- a/libkdegames/kgame/kgamemessage.cpp
+++ b/libkdegames/kgame/kgamemessage.cpp
@@ -27,7 +27,7 @@
#define MESSAGE_VERSION 2
-Q_UINT32 KGameMessage::createPlayerId(int oldplayerid,Q_UINT32 gameid)
+TQ_UINT32 KGameMessage::createPlayerId(int oldplayerid,TQ_UINT32 gameid)
{
int p;
p = oldplayerid & 0x3ff; // remove game id
@@ -35,17 +35,17 @@ Q_UINT32 KGameMessage::createPlayerId(int oldplayerid,Q_UINT32 gameid)
return p;
}
-int KGameMessage::rawPlayerId(Q_UINT32 playerid)
+int KGameMessage::rawPlayerId(TQ_UINT32 playerid)
{
return playerid & 0x03ff;
}
-Q_UINT32 KGameMessage::rawGameId(Q_UINT32 playerid)
+TQ_UINT32 KGameMessage::rawGameId(TQ_UINT32 playerid)
{
return (playerid & 0xfc00) >> 10;
}
-bool KGameMessage::isPlayer(Q_UINT32 msgid)
+bool KGameMessage::isPlayer(TQ_UINT32 msgid)
{
if (msgid & 0xfc00) {
return true;
@@ -54,32 +54,32 @@ bool KGameMessage::isPlayer(Q_UINT32 msgid)
}
}
-bool KGameMessage::isGame(Q_UINT32 msgid)
+bool KGameMessage::isGame(TQ_UINT32 msgid)
{
return !isPlayer(msgid);
}
-void KGameMessage::createHeader(TQDataStream &msg,Q_UINT32 sender,Q_UINT32 receiver,int msgid)
+void KGameMessage::createHeader(TQDataStream &msg,TQ_UINT32 sender,TQ_UINT32 receiver,int msgid)
{
- msg << (Q_INT16)sender << (Q_INT16)receiver << (Q_INT16)msgid;
+ msg << (TQ_INT16)sender << (TQ_INT16)receiver << (TQ_INT16)msgid;
}
-void KGameMessage::extractHeader(TQDataStream &msg,Q_UINT32 &sender,Q_UINT32 &receiver,int &msgid)
+void KGameMessage::extractHeader(TQDataStream &msg,TQ_UINT32 &sender,TQ_UINT32 &receiver,int &msgid)
{
- Q_INT16 d3,d4,d5;
+ TQ_INT16 d3,d4,d5;
msg >> d3 >> d4 >> d5;
sender=d3;receiver=d4;msgid=d5;
}
void KGameMessage::createPropertyHeader(TQDataStream &msg,int id)
{
- msg << (Q_INT16)id;
+ msg << (TQ_INT16)id;
}
void KGameMessage::extractPropertyHeader(TQDataStream &msg,int &id)
{
- Q_INT16 d1;
+ TQ_INT16 d1;
msg >> d1;
id=d1;
}
@@ -87,14 +87,14 @@ void KGameMessage::extractPropertyHeader(TQDataStream &msg,int &id)
void KGameMessage::createPropertyCommand(TQDataStream &msg,int cmdid,int pid,int cmd)
{
createPropertyHeader(msg,cmdid);
- msg << (Q_INT16)pid ;
- msg << (Q_INT8)cmd ;
+ msg << (TQ_INT16)pid ;
+ msg << (TQ_INT8)cmd ;
}
void KGameMessage::extractPropertyCommand(TQDataStream &msg,int &pid,int &cmd)
{
- Q_INT16 d1;
- Q_INT8 d2;
+ TQ_INT16 d1;
+ TQ_INT8 d2;
msg >> d1 >> d2;
pid=d1;
cmd=d2;
@@ -151,6 +151,6 @@ TQString KGameMessage::messageId2Text(int msgid)
return i18n("Player ID");
case KGameMessage::IdUser: // IdUser must be unknown for use, too!
default:
- return TQString::null;
+ return TQString();
}
}
diff --git a/libkdegames/kgame/kgamemessage.h b/libkdegames/kgame/kgamemessage.h
index d671a948..f4029895 100644
--- a/libkdegames/kgame/kgamemessage.h
+++ b/libkdegames/kgame/kgamemessage.h
@@ -41,7 +41,7 @@ class KDE_EXPORT KGameMessage
* @param gameid The game id (<64). 0 For broadcast.
* @return the new player id
*/
- static Q_UINT32 createPlayerId(int player, Q_UINT32 game);
+ static TQ_UINT32 createPlayerId(int player, TQ_UINT32 game);
/**
* Returns the raw playerid, that is, a id which does not
@@ -51,7 +51,7 @@ class KDE_EXPORT KGameMessage
* @param the player id
* @return the raw player id
**/
- static int rawPlayerId(Q_UINT32 playerid);
+ static int rawPlayerId(TQ_UINT32 playerid);
/**
* Returns the raw game id, that is, the game id the player
@@ -60,7 +60,7 @@ class KDE_EXPORT KGameMessage
* @param the player id
* @return the raw game id
**/
- static Q_UINT32 rawGameId(Q_UINT32 playerid);
+ static TQ_UINT32 rawGameId(TQ_UINT32 playerid);
/**
* Checks whether a message receiver/sender is a player
@@ -68,7 +68,7 @@ class KDE_EXPORT KGameMessage
* @param id The ID of the sender/receiver
* @return true/false
*/
- static bool isPlayer(Q_UINT32 id);
+ static bool isPlayer(TQ_UINT32 id);
/**
* Checks whether the sender/receiver of a message is a game
@@ -76,7 +76,7 @@ class KDE_EXPORT KGameMessage
* @param id The ID of the sender/receiver
* @return true/false
*/
- static bool isGame(Q_UINT32 id);
+ static bool isGame(TQ_UINT32 id);
/**
* Creates a message header given cookie,sender,receiver,...
@@ -85,14 +85,14 @@ class KDE_EXPORT KGameMessage
* (message length and magic cookie). If you don't need them remove them
* with @ref dropExternalHeader
*/
- static void createHeader(TQDataStream &msg, Q_UINT32 sender, Q_UINT32 receiver, int msgid);
+ static void createHeader(TQDataStream &msg, TQ_UINT32 sender, TQ_UINT32 receiver, int msgid);
/**
* Retrieves the information like cookie,sender,receiver,... from a message header
*
* Note that it could be necessary to call @ref dropExternalHeader first
*/
- static void extractHeader(TQDataStream &msg,Q_UINT32 &sender, Q_UINT32 &receiver, int &msgid);
+ static void extractHeader(TQDataStream &msg,TQ_UINT32 &sender, TQ_UINT32 &receiver, int &msgid);
/**
* Creates a property header given the property id
@@ -124,7 +124,7 @@ class KDE_EXPORT KGameMessage
* suitable string for it. This string can't be used to identify a message
* (as it is i18n'ed) but it can make debugging more easy. See also @ref
* KGameDebugDialog.
- * @return Either a i18n'ed string (the name of the id) or TQString::null if
+ * @return Either a i18n'ed string (the name of the id) or TQString() if
* the msgid is unknown
**/
static TQString messageId2Text(int msgid);
diff --git a/libkdegames/kgame/kgamenetwork.cpp b/libkdegames/kgame/kgamenetwork.cpp
index 92669834..2fe901b3 100644
--- a/libkdegames/kgame/kgamenetwork.cpp
+++ b/libkdegames/kgame/kgamenetwork.cpp
@@ -50,7 +50,7 @@ public:
public:
KMessageClient* mMessageClient;
KMessageServer* mMessageServer;
- Q_UINT32 mDisconnectId; // Stores gameId() over a disconnect process
+ TQ_UINT32 mDisconnectId; // Stores gameId() over a disconnect process
DNSSD::PublicService* mService;
TQString mType;
TQString mName;
@@ -59,10 +59,10 @@ public:
};
// ------------------- NETWORK GAME ------------------------
-KGameNetwork::KGameNetwork(int c, TQObject* parent) : TQObject(parent, 0)
+KGameNetwork::KGameNetwork(int c, TQObject* tqparent) : TQObject(tqparent, 0)
{
d = new KGameNetworkPrivate;
- d->mCookie = (Q_INT16)c;
+ d->mCookie = (TQ_INT16)c;
// Init the game as a local game, i.e.
// create your own KMessageServer and a KMessageClient connected to it.
@@ -83,7 +83,7 @@ KGameNetwork::~KGameNetwork()
bool KGameNetwork::isNetwork() const
{ return isOfferingConnections() || d->mMessageClient->isNetwork();}
-Q_UINT32 KGameNetwork::gameId() const
+TQ_UINT32 KGameNetwork::gameId() const
{
//return d->mMessageClient->id() ;
// Return stored id in the case of disconnect. In any other
@@ -120,25 +120,25 @@ void KGameNetwork::setMaster()
}
if (!d->mMessageClient) {
d->mMessageClient = new KMessageClient (this);
- connect (d->mMessageClient, TQT_SIGNAL(broadcastReceived(const TQByteArray&, Q_UINT32)),
- this, TQT_SLOT(receiveNetworkTransmission(const TQByteArray&, Q_UINT32)));
+ connect (d->mMessageClient, TQT_SIGNAL(broadcastReceived(const TQByteArray&, TQ_UINT32)),
+ this, TQT_SLOT(receiveNetworkTransmission(const TQByteArray&, TQ_UINT32)));
connect (d->mMessageClient, TQT_SIGNAL(connectionBroken()),
this, TQT_SIGNAL(signalConnectionBroken()));
- connect (d->mMessageClient, TQT_SIGNAL(aboutToDisconnect(Q_UINT32)),
- this, TQT_SLOT(aboutToLoseConnection(Q_UINT32)));
+ connect (d->mMessageClient, TQT_SIGNAL(aboutToDisconnect(TQ_UINT32)),
+ this, TQT_SLOT(aboutToLoseConnection(TQ_UINT32)));
connect (d->mMessageClient, TQT_SIGNAL(connectionBroken()),
this, TQT_SLOT(slotResetConnection()));
connect (d->mMessageClient, TQT_SIGNAL(adminStatusChanged(bool)),
this, TQT_SLOT(slotAdminStatusChanged(bool)));
- connect (d->mMessageClient, TQT_SIGNAL(eventClientConnected(Q_UINT32)),
- this, TQT_SIGNAL(signalClientConnected(Q_UINT32)));
- connect (d->mMessageClient, TQT_SIGNAL(eventClientDisconnected(Q_UINT32, bool)),
- this, TQT_SIGNAL(signalClientDisconnected(Q_UINT32, bool)));
+ connect (d->mMessageClient, TQT_SIGNAL(eventClientConnected(TQ_UINT32)),
+ this, TQT_SIGNAL(signalClientConnected(TQ_UINT32)));
+ connect (d->mMessageClient, TQT_SIGNAL(eventClientDisconnected(TQ_UINT32, bool)),
+ this, TQT_SIGNAL(signalClientDisconnected(TQ_UINT32, bool)));
// broacast and direct messages are treated equally on receive.
- connect (d->mMessageClient, TQT_SIGNAL(forwardReceived(const TQByteArray&, Q_UINT32, const TQValueList<Q_UINT32>&)),
- d->mMessageClient, TQT_SIGNAL(broadcastReceived(const TQByteArray&, Q_UINT32)));
+ connect (d->mMessageClient, TQT_SIGNAL(forwardReceived(const TQByteArray&, TQ_UINT32, const TQValueList<TQ_UINT32>&)),
+ d->mMessageClient, TQT_SIGNAL(broadcastReceived(const TQByteArray&, TQ_UINT32)));
} else {
// should be no problem but still has to be tested
@@ -171,7 +171,7 @@ void KGameNetwork::tryStopPublishing()
if (d->mService) d->mService->stop();
}
-bool KGameNetwork::offerConnections(Q_UINT16 port)
+bool KGameNetwork::offerConnections(TQ_UINT16 port)
{
kdDebug (11001) << k_funcinfo << "on port " << port << endl;
if (!isMaster()) {
@@ -201,7 +201,7 @@ bool KGameNetwork::offerConnections(Q_UINT16 port)
return true;
}
-bool KGameNetwork::connectToServer (const TQString& host, Q_UINT16 port)
+bool KGameNetwork::connectToServer (const TQString& host, TQ_UINT16 port)
{
if (host.isEmpty()) {
kdError(11001) << k_funcinfo << "No hostname given" << endl;
@@ -239,7 +239,7 @@ bool KGameNetwork::connectToServer (const TQString& host, Q_UINT16 port)
return true;
}
-Q_UINT16 KGameNetwork::port() const
+TQ_UINT16 KGameNetwork::port() const
{
if (isNetwork()) {
if (isOfferingConnections()) {
@@ -276,8 +276,8 @@ void KGameNetwork::disconnect()
kdDebug(11001) << k_funcinfo << endl;
stopServerConnection();
if (d->mMessageServer) {
- TQValueList <Q_UINT32> list=d->mMessageServer->clientIDs();
- TQValueList<Q_UINT32>::Iterator it;
+ TQValueList <TQ_UINT32> list=d->mMessageServer->clientIDs();
+ TQValueList<TQ_UINT32>::Iterator it;
for( it = list.begin(); it != list.end(); ++it )
{
kdDebug(11001) << "Client id=" << (*it) << endl;
@@ -320,7 +320,7 @@ void KGameNetwork::disconnect()
kdDebug(11001) << k_funcinfo << "DONE" << endl;
}
-void KGameNetwork::aboutToLoseConnection(Q_UINT32 clientID)
+void KGameNetwork::aboutToLoseConnection(TQ_UINT32 clientID)
{
kdDebug(11001) << "Storing client id of connection "<<clientID<<endl;
d->mDisconnectId = clientID;
@@ -332,7 +332,7 @@ void KGameNetwork::slotResetConnection()
d->mDisconnectId = 0;
}
-void KGameNetwork::electAdmin(Q_UINT32 clientID)
+void KGameNetwork::electAdmin(TQ_UINT32 clientID)
{
if (!isAdmin()) {
kdWarning(11001) << k_funcinfo << "only ADMIN is allowed to call this!" << endl;
@@ -340,7 +340,7 @@ void KGameNetwork::electAdmin(Q_UINT32 clientID)
}
TQByteArray buffer;
TQDataStream stream(buffer,IO_WriteOnly);
- stream << static_cast<Q_UINT32>( KMessageServer::REQ_ADMIN_CHANGE );
+ stream << static_cast<TQ_UINT32>( KMessageServer::RETQ_ADMIN_CHANGE );
stream << clientID;
d->mMessageClient->sendServerMessage(buffer);
}
@@ -353,8 +353,8 @@ void KGameNetwork::setMaxClients(int max)
}
TQByteArray buffer;
TQDataStream stream(buffer,IO_WriteOnly);
- stream << static_cast<Q_UINT32>( KMessageServer::REQ_MAX_NUM_CLIENTS );
- stream << (Q_INT32)max;
+ stream << static_cast<TQ_UINT32>( KMessageServer::RETQ_MAX_NUM_CLIENTS );
+ stream << (TQ_INT32)max;
d->mMessageClient->sendServerMessage(buffer);
}
@@ -374,7 +374,7 @@ void KGameNetwork::unlock()
// --------------------- send messages ---------------------------
-bool KGameNetwork::sendSystemMessage(int data, int msgid, Q_UINT32 receiver, Q_UINT32 sender)
+bool KGameNetwork::sendSystemMessage(int data, int msgid, TQ_UINT32 receiver, TQ_UINT32 sender)
{
TQByteArray buffer;
TQDataStream stream(buffer,IO_WriteOnly);
@@ -382,7 +382,7 @@ bool KGameNetwork::sendSystemMessage(int data, int msgid, Q_UINT32 receiver, Q_U
return sendSystemMessage(buffer,msgid,receiver,sender);
}
-bool KGameNetwork::sendSystemMessage(const TQString &msg, int msgid, Q_UINT32 receiver, Q_UINT32 sender)
+bool KGameNetwork::sendSystemMessage(const TQString &msg, int msgid, TQ_UINT32 receiver, TQ_UINT32 sender)
{
TQByteArray buffer;
TQDataStream stream(buffer, IO_WriteOnly);
@@ -390,10 +390,10 @@ bool KGameNetwork::sendSystemMessage(const TQString &msg, int msgid, Q_UINT32 re
return sendSystemMessage(buffer, msgid, receiver, sender);
}
-bool KGameNetwork::sendSystemMessage(const TQDataStream &msg, int msgid, Q_UINT32 receiver, Q_UINT32 sender)
+bool KGameNetwork::sendSystemMessage(const TQDataStream &msg, int msgid, TQ_UINT32 receiver, TQ_UINT32 sender)
{ return sendSystemMessage(((TQBuffer*)msg.device())->buffer(), msgid, receiver, sender); }
-bool KGameNetwork::sendSystemMessage(const TQByteArray& data, int msgid, Q_UINT32 receiver, Q_UINT32 sender)
+bool KGameNetwork::sendSystemMessage(const TQByteArray& data, int msgid, TQ_UINT32 receiver, TQ_UINT32 sender)
{
TQByteArray buffer;
TQDataStream stream(buffer,IO_WriteOnly);
@@ -401,7 +401,7 @@ bool KGameNetwork::sendSystemMessage(const TQByteArray& data, int msgid, Q_UINT3
sender = gameId();
}
- Q_UINT32 receiverClient = KGameMessage::rawGameId(receiver); // KGame::gameId()
+ TQ_UINT32 receiverClient = KGameMessage::rawGameId(receiver); // KGame::gameId()
int receiverPlayer = KGameMessage::rawPlayerId(receiver); // KPlayer::id()
KGameMessage::createHeader(stream, sender, receiver, msgid);
@@ -435,35 +435,35 @@ bool KGameNetwork::sendSystemMessage(const TQByteArray& data, int msgid, Q_UINT3
return true;
}
-bool KGameNetwork::sendMessage(int data, int msgid, Q_UINT32 receiver, Q_UINT32 sender)
+bool KGameNetwork::sendMessage(int data, int msgid, TQ_UINT32 receiver, TQ_UINT32 sender)
{ return sendSystemMessage(data,msgid+KGameMessage::IdUser,receiver,sender); }
-bool KGameNetwork::sendMessage(const TQString &msg, int msgid, Q_UINT32 receiver, Q_UINT32 sender)
+bool KGameNetwork::sendMessage(const TQString &msg, int msgid, TQ_UINT32 receiver, TQ_UINT32 sender)
{ return sendSystemMessage(msg,msgid+KGameMessage::IdUser,receiver,sender); }
-bool KGameNetwork::sendMessage(const TQDataStream &msg, int msgid, Q_UINT32 receiver, Q_UINT32 sender)
+bool KGameNetwork::sendMessage(const TQDataStream &msg, int msgid, TQ_UINT32 receiver, TQ_UINT32 sender)
{ return sendSystemMessage(msg, msgid+KGameMessage::IdUser, receiver, sender); }
-bool KGameNetwork::sendMessage(const TQByteArray &msg, int msgid, Q_UINT32 receiver, Q_UINT32 sender)
+bool KGameNetwork::sendMessage(const TQByteArray &msg, int msgid, TQ_UINT32 receiver, TQ_UINT32 sender)
{ return sendSystemMessage(msg, msgid+KGameMessage::IdUser, receiver, sender); }
-void KGameNetwork::sendError(int error,const TQByteArray& message, Q_UINT32 receiver, Q_UINT32 sender)
+void KGameNetwork::sendError(int error,const TQByteArray& message, TQ_UINT32 receiver, TQ_UINT32 sender)
{
TQByteArray buffer;
TQDataStream stream(buffer,IO_WriteOnly);
- stream << (Q_INT32) error;
+ stream << (TQ_INT32) error;
stream.writeRawBytes(message.data(), message.size());
sendSystemMessage(stream,KGameMessage::IdError,receiver,sender);
}
// ----------------- receive messages from the network
-void KGameNetwork::receiveNetworkTransmission(const TQByteArray& receiveBuffer, Q_UINT32 clientID)
+void KGameNetwork::receiveNetworkTransmission(const TQByteArray& receiveBuffer, TQ_UINT32 clientID)
{
TQDataStream stream(receiveBuffer, IO_ReadOnly);
int msgid;
- Q_UINT32 sender; // the id of the KGame/KPlayer who sent the message
- Q_UINT32 receiver; // the id of the KGame/KPlayer the message is for
+ TQ_UINT32 sender; // the id of the KGame/KPlayer who sent the message
+ TQ_UINT32 receiver; // the id of the KGame/KPlayer the message is for
KGameMessage::extractHeader(stream, sender, receiver, msgid);
// kdDebug(11001) << k_funcinfo << "id=" << msgid << " sender=" << sender << " recv=" << receiver << endl;
@@ -481,7 +481,7 @@ void KGameNetwork::receiveNetworkTransmission(const TQByteArray& receiveBuffer,
else if (msgid==KGameMessage::IdError)
{
TQString text;
- Q_INT32 error;
+ TQ_INT32 error;
stream >> error;
kdDebug(11001) << k_funcinfo << "Got IdError " << error << endl;
text = KGameError::errorText(error, stream);
diff --git a/libkdegames/kgame/kgamenetwork.h b/libkdegames/kgame/kgamenetwork.h
index 47276d06..1766ac90 100644
--- a/libkdegames/kgame/kgamenetwork.h
+++ b/libkdegames/kgame/kgamenetwork.h
@@ -43,15 +43,16 @@ class KGameNetworkPrivate;
* @author Martin Heni <martin@heni-online.de>
* @version $Id$
*/
-class KDE_EXPORT KGameNetwork : public QObject
+class KDE_EXPORT KGameNetwork : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Create a KGameNetwork object
*/
- KGameNetwork(int cookie=42,TQObject* parent=0);
+ KGameNetwork(int cookie=42,TQObject* tqparent=0);
virtual ~KGameNetwork();
/**
@@ -96,7 +97,7 @@ public:
*
* @return int id
**/
- Q_UINT32 gameId() const;
+ TQ_UINT32 gameId() const;
/**
* Inits a network game as network MASTER. Note that if the
@@ -108,7 +109,7 @@ public:
* @param port The port on which the service is offered
* @return true if it worked
**/
- bool offerConnections (Q_UINT16 port);
+ bool offerConnections (TQ_UINT16 port);
/**
* Announces game MASTER on network using DNS-SD. Clients then can discover it using
@@ -120,7 +121,7 @@ public:
* set hostname will be used. In case of name conflict -2, -3 and so on will be added to name.
* @since 3.4
**/
- void setDiscoveryInfo(const TQString& type, const TQString& name=TQString::null);
+ void setDiscoveryInfo(const TQString& type, const TQString& name=TQString());
/**
* Inits a network game as a network CLIENT
@@ -130,7 +131,7 @@ public:
*
* @return true if connected
**/
- bool connectToServer(const TQString& host, Q_UINT16 port);
+ bool connectToServer(const TQString& host, TQ_UINT16 port);
/**
* @since 3.2
@@ -138,7 +139,7 @@ public:
* or the port we are connected to if connectToServer was called.
* Otherwise 0.
**/
- Q_UINT16 port() const;
+ TQ_UINT16 port() const;
/**
* @since 3.2
@@ -189,22 +190,22 @@ public:
* @return true if worked
*/
// AB: TODO: doc on how "receiver" and "sender" should be created!
- bool sendSystemMessage(const TQByteArray& buffer, int msgid, Q_UINT32 receiver=0, Q_UINT32 sender=0);
+ bool sendSystemMessage(const TQByteArray& buffer, int msgid, TQ_UINT32 receiver=0, TQ_UINT32 sender=0);
/**
* @overload
**/
- bool sendSystemMessage(int data, int msgid, Q_UINT32 receiver=0, Q_UINT32 sender=0);
+ bool sendSystemMessage(int data, int msgid, TQ_UINT32 receiver=0, TQ_UINT32 sender=0);
/**
* @overload
**/
- bool sendSystemMessage(const TQDataStream &msg, int msgid, Q_UINT32 receiver=0, Q_UINT32 sender=0);
+ bool sendSystemMessage(const TQDataStream &msg, int msgid, TQ_UINT32 receiver=0, TQ_UINT32 sender=0);
/**
* @overload
**/
- bool sendSystemMessage(const TQString& msg, int msgid, Q_UINT32 receiver=0, Q_UINT32 sender=0);
+ bool sendSystemMessage(const TQString& msg, int msgid, TQ_UINT32 receiver=0, TQ_UINT32 sender=0);
/**
* Sends a network message
@@ -217,7 +218,7 @@ public:
* the correct value for you. You might want to use this if you send a
* message from a specific player.
**/
- void sendError(int error, const TQByteArray& message, Q_UINT32 receiver=0, Q_UINT32 sender=0);
+ void sendError(int error, const TQByteArray& message, TQ_UINT32 receiver=0, TQ_UINT32 sender=0);
/**
* Are we still offer offering server connections - only for game MASTER
@@ -265,29 +266,29 @@ public:
* @return true if worked
**/
// AB: TODO: doc on how "receiver" and "sender" should be created!
- bool sendMessage(const TQByteArray& buffer, int msgid, Q_UINT32 receiver=0, Q_UINT32 sender=0);
+ bool sendMessage(const TQByteArray& buffer, int msgid, TQ_UINT32 receiver=0, TQ_UINT32 sender=0);
/**
* This is an overloaded member function, provided for convenience.
**/
- bool sendMessage(const TQDataStream &msg, int msgid, Q_UINT32 receiver=0, Q_UINT32 sender=0);
+ bool sendMessage(const TQDataStream &msg, int msgid, TQ_UINT32 receiver=0, TQ_UINT32 sender=0);
/**
* This is an overloaded member function, provided for convenience.
**/
- bool sendMessage(const TQString& msg, int msgid, Q_UINT32 receiver=0, Q_UINT32 sender=0);
+ bool sendMessage(const TQString& msg, int msgid, TQ_UINT32 receiver=0, TQ_UINT32 sender=0);
/**
* This is an overloaded member function, provided for convenience.
**/
- bool sendMessage(int data, int msgid, Q_UINT32 receiver=0, Q_UINT32 sender=0);
+ bool sendMessage(int data, int msgid, TQ_UINT32 receiver=0, TQ_UINT32 sender=0);
/**
* Called by ReceiveNetworkTransmission(). Will be overwritten by
* KGame and handle the incoming message.
**/
- virtual void networkTransmission(TQDataStream&, int, Q_UINT32, Q_UINT32, Q_UINT32 clientID) = 0;
+ virtual void networkTransmission(TQDataStream&, int, TQ_UINT32, TQ_UINT32, TQ_UINT32 clientID) = 0;
/**
@@ -304,7 +305,7 @@ public:
* @param clientID the ID of the new ADMIN (note: this is the _client_ID
* which has nothing to do with the player IDs. See KMessageServer)
**/
- void electAdmin(Q_UINT32 clientID);
+ void electAdmin(TQ_UINT32 clientID);
/**
* Don't use this unless you really know what youre doing! You might
@@ -321,13 +322,13 @@ public:
* experience some strange behaviour if you use the message server directly!
*
* @return a pointer to the message server if this is the MASTER KGame
- * object. Note that it might be possible that no KGame object contains
+ * object. Note that it might be possible that no KGame object tqcontains
* the KMessageServer at all! It might even run stand alone!
**/
KMessageServer* messageServer() const;
/**
- * You should call this before doing thigs like, e.g. qApp->processEvents().
+ * You should call this before doing thigs like, e.g. tqApp->processEvents().
* Don't forget to call unlock once you are done!
*
* @see KMessageClient::lock
@@ -362,7 +363,7 @@ signals:
*
* @param clientID the ID of the newly connected client
**/
- void signalClientConnected(Q_UINT32 clientID);
+ void signalClientConnected(TQ_UINT32 clientID);
/**
* This signal is emitted whenever the KMessageServer sends us a message
@@ -375,7 +376,7 @@ signals:
* @param broken true if the connection was lost because of a network error, false
* if the connection was closed by the message server admin.
*/
- void signalClientDisconnected(Q_UINT32 clientID, bool broken);
+ void signalClientDisconnected(TQ_UINT32 clientID, bool broken);
/**
* This client gets or loses the admin status.
@@ -401,7 +402,7 @@ protected slots:
* If it is valid, the pure virtual method networkTransmission() is called.
* (This one is overwritten in KGame.)
**/
- void receiveNetworkTransmission(const TQByteArray& a, Q_UINT32 clientID);
+ void receiveNetworkTransmission(const TQByteArray& a, TQ_UINT32 clientID);
/**
* This KGame object receives or loses the admin status.
@@ -413,7 +414,7 @@ protected slots:
* Called when the network connection is about to terminate. Is used
* to store the network parameter like the game id
*/
- void aboutToLoseConnection(Q_UINT32 id);
+ void aboutToLoseConnection(TQ_UINT32 id);
/**
* Called when the network connection is terminated. Used to clean
diff --git a/libkdegames/kgame/kgameprocess.cpp b/libkdegames/kgame/kgameprocess.cpp
index ffbf0936..9dcc66c0 100644
--- a/libkdegames/kgame/kgameprocess.cpp
+++ b/libkdegames/kgame/kgameprocess.cpp
@@ -52,8 +52,8 @@ KGameProcess::KGameProcess() : TQObject(0,0)
mMessageIO=new KMessageFilePipe(this,&rFile,&wFile);
// mMessageClient=new KMessageClient(this);
// mMessageClient->setServer(mMessageIO);
-// connect (mMessageClient, TQT_SIGNAL(broadcastReceived(const TQByteArray&, Q_UINT32)),
-// this, TQT_SLOT(receivedMessage(const TQByteArray&, Q_UINT32)));
+// connect (mMessageClient, TQT_SIGNAL(broadcastReceived(const TQByteArray&, TQ_UINT32)),
+// this, TQT_SLOT(receivedMessage(const TQByteArray&, TQ_UINT32)));
connect (mMessageIO, TQT_SIGNAL(received(const TQByteArray&)),
this, TQT_SLOT(receivedMessage(const TQByteArray&)));
fprintf(stderr,"KGameProcess::constructor %p %p\n",&rFile,&wFile);
@@ -88,7 +88,7 @@ bool KGameProcess::exec(int argc, char *argv[])
// TQByteArray buffer;
// TQDataStream wstream(buffer,IO_WriteOnly);
// then stream data into the stream and call this function
-void KGameProcess::sendSystemMessage(TQDataStream &stream,int msgid,Q_UINT32 receiver)
+void KGameProcess::sendSystemMessage(TQDataStream &stream,int msgid,TQ_UINT32 receiver)
{
fprintf(stderr,"KGameProcess::sendMessage id=%d recv=%d",msgid,receiver);
TQByteArray a;
@@ -107,7 +107,7 @@ void KGameProcess::sendSystemMessage(TQDataStream &stream,int msgid,Q_UINT32 rec
if (mMessageIO) mMessageIO->send(a);
}
-void KGameProcess::sendMessage(TQDataStream &stream,int msgid,Q_UINT32 receiver)
+void KGameProcess::sendMessage(TQDataStream &stream,int msgid,TQ_UINT32 receiver)
{
sendSystemMessage(stream,msgid+KGameMessage::IdUser,receiver);
}
@@ -133,19 +133,19 @@ void KGameProcess::receivedMessage(const TQByteArray& receiveBuffer)
{
TQDataStream stream(receiveBuffer, IO_ReadOnly);
int msgid;
- Q_UINT32 sender;
- Q_UINT32 receiver;
+ TQ_UINT32 sender;
+ TQ_UINT32 receiver;
KGameMessage::extractHeader(stream, sender, receiver, msgid);
fprintf(stderr,"------ receiveNetworkTransmission(): id=%d sender=%d,recv=%d\n",msgid,sender,receiver);
switch(msgid)
{
case KGameMessage::IdTurn:
- Q_INT8 b;
+ TQ_INT8 b;
stream >> b;
emit signalTurn(stream,(bool)b);
break;
case KGameMessage::IdIOAdded:
- Q_INT16 id;
+ TQ_INT16 id;
stream >> id;
emit signalInit(stream,(int)id);
break;
diff --git a/libkdegames/kgame/kgameprocess.h b/libkdegames/kgame/kgameprocess.h
index ac6389be..b7e2d145 100644
--- a/libkdegames/kgame/kgameprocess.h
+++ b/libkdegames/kgame/kgameprocess.h
@@ -37,11 +37,12 @@ class KMessageFilePipe;
* This is the process class used on the computer player
* side to communicate with its counterpart KProcessIO class.
* Using these two classes will give fully transparent communication
- * via QDataStreams.
+ * via TQDataStreams.
*/
-class KDE_EXPORT KGameProcess: public QObject
+class KDE_EXPORT KGameProcess: public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -107,7 +108,7 @@ class KDE_EXPORT KGameProcess: public QObject
* @param msgid the message id for the message
* @param receiver unused
*/
- void sendMessage(TQDataStream &stream,int msgid,Q_UINT32 receiver=0);
+ void sendMessage(TQDataStream &stream,int msgid,TQ_UINT32 receiver=0);
/**
* Sends a system message to the corresonding KGameIO device.
@@ -128,7 +129,7 @@ class KDE_EXPORT KGameProcess: public QObject
* @param msgid the message id for the message
* @param receiver unused
*/
- void sendSystemMessage(TQDataStream &stream,int msgid,Q_UINT32 receiver=0);
+ void sendSystemMessage(TQDataStream &stream,int msgid,TQ_UINT32 receiver=0);
/**
* Returns a pointer to a KRandomSequence. You can generate
@@ -164,7 +165,7 @@ class KDE_EXPORT KGameProcess: public QObject
* \code
* void Computer::slotCommand(int &msgid,TQDataStream &in,TQDataStream &out)
* {
- * Q_INT32 data,move;
+ * TQ_INT32 data,move;
* in >> data;
* // compute move ...
* move=data*2;
@@ -200,7 +201,7 @@ class KDE_EXPORT KGameProcess: public QObject
* {
* // Create a move - the format is yours to decide
* // It arrives exactly as this in the kgame inputMove function!!
- * Q_INT8 x1,y1,pl;
+ * TQ_INT8 x1,y1,pl;
* pl=-1;
* x1=proc.random()->getLong(8);
* y1=proc.random()->getLong(8);
diff --git a/libkdegames/kgame/kgameproperty.cpp b/libkdegames/kgame/kgameproperty.cpp
index 3b8c3109..e7d35410 100644
--- a/libkdegames/kgame/kgameproperty.cpp
+++ b/libkdegames/kgame/kgameproperty.cpp
@@ -29,16 +29,16 @@
#define KPLAYERHANDLER_LOAD_COOKIE 6239
-KGamePropertyBase::KGamePropertyBase(int id, KGame* parent)
+KGamePropertyBase::KGamePropertyBase(int id, KGame* tqparent)
{
init();
- registerData(id, parent);
+ registerData(id, tqparent);
}
-KGamePropertyBase::KGamePropertyBase(int id, KPlayer* parent)
+KGamePropertyBase::KGamePropertyBase(int id, KPlayer* tqparent)
{
init();
- registerData(id, parent);
+ registerData(id, tqparent);
}
KGamePropertyBase::KGamePropertyBase(int id, KGamePropertyHandler* owner)
@@ -173,7 +173,7 @@ void KGamePropertyBase::setLock(bool l)
TQDataStream s(b, IO_WriteOnly);
KGameMessage::createPropertyCommand(s, IdCommand, id(), CmdLock);
- s << (Q_INT8)l;
+ s << (TQ_INT8)l;
if (mOwner) {
mOwner->sendProperty(s);
} else {
@@ -198,7 +198,7 @@ void KGamePropertyBase::command(TQDataStream& s, int cmd, bool isSender)
case CmdLock:
{
if (!isSender) {
- Q_INT8 locked;
+ TQ_INT8 locked;
s >> locked;
mFlags.bits.locked = (bool)locked ;
break;
diff --git a/libkdegames/kgame/kgameproperty.h b/libkdegames/kgame/kgameproperty.h
index 04474603..03fcae87 100644
--- a/libkdegames/kgame/kgameproperty.h
+++ b/libkdegames/kgame/kgameproperty.h
@@ -51,7 +51,7 @@ public:
IdName=5,
//KGame
- IdGameStatus=6,
+ IdGametqStatus=6,
IdMaxPlayer=7,
IdMinPlayer=8,
@@ -66,7 +66,7 @@ public:
};
/**
- * Commands for advanced properties (Q_INT8)
+ * Commands for advanced properties (TQ_INT8)
**/
enum PropertyCommandIds
{
@@ -117,7 +117,7 @@ public:
/**
* Constructs a KGamePropertyBase object and calls registerData.
- * @param id The id of this property. MUST be UNIQUE! Used to send and
+ * @param id The id of this property. MUST be UNITQUE! Used to send and
* receive changes in the property of the playere automatically via
* network.
* @param owner The owner of the object. Must be a KGamePropertyHandler which manages
@@ -125,8 +125,8 @@ public:
**/
KGamePropertyBase(int id, KGamePropertyHandler* owner);
- KGamePropertyBase(int id, KGame* parent);
- KGamePropertyBase(int id, KPlayer* parent);
+ KGamePropertyBase(int id, KGame* tqparent);
+ KGamePropertyBase(int id, KPlayer* tqparent);
/**
* Creates a KGamePropertyBase object without an owner. Remember to call
@@ -238,7 +238,7 @@ public:
int id() const { return mId; }
/**
- * @return a type_info of the data this property contains. This is used
+ * @return a type_info of the data this property tqcontains. This is used
* e.g. by KGameDebugDialog
**/
virtual const type_info* typeinfo() { return &typeid(this); }
@@ -344,7 +344,7 @@ protected:
bool sendProperty(const TQByteArray& b);
/**
- * Causes the parent object to emit a signal on value change
+ * Causes the tqparent object to emit a signal on value change
**/
void emitSignal();
@@ -359,7 +359,7 @@ protected:
struct {
// unsigned char dosave : 1; // do save this property
// unsigned char delaytransmit : 1; // do not send immediately on
- // change but a KPlayer:QTimer
+ // change but a KPlayer:TQTimer
// sends it later on - fast
// changing variables
unsigned char emitsignal : 1; // KPlayer notifies on variable change (true)
@@ -403,7 +403,7 @@ private:
* <li> A Mixture (very dirty)
* </ul>
* I repeat: we do <em>not</em> recommend the third option ("a mixture"). Unless
- * you have a good reason for this you will probably introduce some hard to find
+ * you have a good reason for this you will probably introduce some hard to tqfind
* (and to fix) bugs.
*
* @section Always consistent (clean):
@@ -413,7 +413,7 @@ private:
* property. This is achieved by using send to change the value of the
* property. send needs a running KMessageServer and therefore
* <em>MUST</em> be plugged into a KGamePropertyHandler using either
- * registerData or the constructor. The parent of the dataHandler must be able
+ * registerData or the constructor. The tqparent of the dataHandler must be able
* to send messages (see above: the message server must be running). If you use
* send to change the value of a property you won't see the effect
* immediately: The new value is first transferred to the message server which
@@ -488,7 +488,7 @@ private:
* which result in inconsistent properties (like "game running" on client A but
* "game ended/paused" on client B). But note that there is a very good reason
* for the existence of these different concepts of KGameProperty. I have
- * myself experienced such a "strange error" and it took me several days to find
+ * myself experienced such a "strange error" and it took me several days to tqfind
* the reason until I could fix it. So I personally recommend the "clean" way.
* On the other hand if you want to port a non-network game to a network game
* you will probably start with "dirty" properties as it is you will not have to
@@ -546,16 +546,16 @@ private:
* };
* TQDataStream& operator<<(TQDataStream& stream, Card& card)
* {
- * Q_INT16 type = card.type;
- * Q_INT16 suite = card.suite;
+ * TQ_INT16 type = card.type;
+ * TQ_INT16 suite = card.suite;
* s << type;
* s << suite;
* return s;
* }
* TQDataStream& operator>>(TQDataStream& stream, Card& card)
* {
- * Q_INT16 type;
- * Q_INT16 suite;
+ * TQ_INT16 type;
+ * TQ_INT16 suite;
* s >> type;
* s >> suite;
* card.type = (int)type;
@@ -585,15 +585,15 @@ public:
* Constructs a KGameProperty object. A KGameProperty object will transmit
* any changes to the KMessageServer and then to all clients in the
* game (including the one that has sent the new value)
- * @param id The id of this property. <em>MUST be UNIQUE</em>! Used to send and
+ * @param id The id of this property. <em>MUST be UNITQUE</em>! Used to send and
* receive changes in the property of the playere automatically via
* network.
- * @param owner The parent of the object. Must be a KGame which manages
+ * @param owner The tqparent of the object. Must be a KGame which manages
* the changes made to this object, i.e. which will send the new data.
* Note that in contrast to most KDE/QT classes KGameProperty objects
* are <em>not</em> deleted automatically!
**/
-// TODO: ID: Very ugly - better use something like parent()->propertyId() or so which assigns a free id automatically.
+// TODO: ID: Very ugly - better use something like tqparent()->propertyId() or so which assigns a free id automatically.
KGameProperty(int id, KGamePropertyHandler* owner) : KGamePropertyBase(id, owner) { init(); }
/**
@@ -651,7 +651,7 @@ public:
* \endcode
* as myProperty has not yet been set when doSomething is being called.
*
- * You are informed about a value change by a singal from the parent of
+ * You are informed about a value change by a singal from the tqparent of
* the property which can be deactivated by setEmittingSignal because of
* performance (you probably don't have to deactivate it - except you
* want to write a real-time game like Command&Conquer with a lot of
@@ -842,7 +842,7 @@ private:
typedef KGameProperty<int> KGamePropertyInt;
typedef KGameProperty<unsigned int> KGamePropertyUInt;
-typedef KGameProperty<TQString> KGamePropertyQString;
-typedef KGameProperty<Q_INT8> KGamePropertyBool;
+typedef KGameProperty<TQString> KGamePropertyTQString;
+typedef KGameProperty<TQ_INT8> KGamePropertyBool;
#endif
diff --git a/libkdegames/kgame/kgamepropertyhandler.cpp b/libkdegames/kgame/kgamepropertyhandler.cpp
index f395fc66..32e831d8 100644
--- a/libkdegames/kgame/kgamepropertyhandler.cpp
+++ b/libkdegames/kgame/kgamepropertyhandler.cpp
@@ -51,13 +51,13 @@ public:
TQPtrQueue<KGamePropertyBase> mSignalQueue;
};
-KGamePropertyHandler::KGamePropertyHandler(int id, const TQObject* receiver, const char * sendf, const char *emitf, TQObject* parent) : TQObject(parent)
+KGamePropertyHandler::KGamePropertyHandler(int id, const TQObject* receiver, const char * sendf, const char *emitf, TQObject* tqparent) : TQObject(tqparent)
{
init();
registerHandler(id,receiver,sendf,emitf);
}
-KGamePropertyHandler::KGamePropertyHandler(TQObject* parent) : TQObject(parent)
+KGamePropertyHandler::KGamePropertyHandler(TQObject* tqparent) : TQObject(tqparent)
{
init();
}
@@ -117,7 +117,7 @@ bool KGamePropertyHandler::processMessage(TQDataStream &stream, int id, bool isS
int cmd;
KGameMessage::extractPropertyCommand(stream, propertyId, cmd);
//kdDebug(11001) << k_funcinfo << ": Got COMMAND for id= "<<propertyId <<endl;
- p = d->mIdDict.find(propertyId);
+ p = d->mIdDict.tqfind(propertyId);
if (p) {
if (!isSender || p->policy()==KGamePropertyBase::PolicyClean) {
p->command(stream, cmd, isSender);
@@ -127,7 +127,7 @@ bool KGamePropertyHandler::processMessage(TQDataStream &stream, int id, bool isS
}
return true;
}
- p = d->mIdDict.find(propertyId);
+ p = d->mIdDict.tqfind(propertyId);
if (p) {
//kdDebug(11001) << k_funcinfo << ": Loading " << propertyId << endl;
if (!isSender || p->policy()==KGamePropertyBase::PolicyClean) {
@@ -151,7 +151,7 @@ bool KGamePropertyHandler::removeProperty(KGamePropertyBase* data)
bool KGamePropertyHandler::addProperty(KGamePropertyBase* data, TQString name)
{
//kdDebug(11001) << k_funcinfo << ": " << data->id() << endl;
- if (d->mIdDict.find(data->id())) {
+ if (d->mIdDict.tqfind(data->id())) {
// this id already exists
kdError(11001) << " -> cannot add property " << data->id() << endl;
return false;
@@ -172,15 +172,15 @@ bool KGamePropertyHandler::addProperty(KGamePropertyBase* data, TQString name)
TQString KGamePropertyHandler::propertyName(int id) const
{
TQString s;
- if (d->mIdDict.find(id)) {
- if (d->mNameMap.contains(id)) {
- s = i18n("%1 (%2)").arg(d->mNameMap[id]).arg(id);
+ if (d->mIdDict.tqfind(id)) {
+ if (d->mNameMap.tqcontains(id)) {
+ s = i18n("%1 (%2)").tqarg(d->mNameMap[id]).tqarg(id);
} else {
- s = i18n("Unnamed - ID: %1").arg(id);
+ s = i18n("Unnamed - ID: %1").tqarg(id);
}
} else {
// Should _never_ happen
- s = i18n("%1 unregistered").arg(id);
+ s = i18n("%1 unregistered").tqarg(id);
}
return s;
}
@@ -195,7 +195,7 @@ bool KGamePropertyHandler::load(TQDataStream &stream)
for (i = 0; i < count; i++) {
processMessage(stream, id(),false);
}
- Q_INT16 cookie;
+ TQ_INT16 cookie;
stream >> cookie;
if (cookie == KPLAYERHANDLER_LOAD_COOKIE) {
kdDebug(11001) << " KGamePropertyHandler loaded propertly"<<endl;
@@ -220,7 +220,7 @@ bool KGamePropertyHandler::save(TQDataStream &stream)
}
++it;
}
- stream << (Q_INT16)KPLAYERHANDLER_LOAD_COOKIE;
+ stream << (TQ_INT16)KPLAYERHANDLER_LOAD_COOKIE;
return true;
}
@@ -326,9 +326,9 @@ bool KGamePropertyHandler::sendProperty(TQDataStream &s)
return sent;
}
-KGamePropertyBase *KGamePropertyHandler::find(int id)
+KGamePropertyBase *KGamePropertyHandler::tqfind(int id)
{
- return d->mIdDict.find(id);
+ return d->mIdDict.tqfind(id);
}
void KGamePropertyHandler::clear()
@@ -338,7 +338,7 @@ void KGamePropertyHandler::clear()
while (it.toFirst()) {
KGamePropertyBase* p = it.toFirst();
p->unregisterData();
- if (d->mIdDict.find(p->id())) {
+ if (d->mIdDict.tqfind(p->id())) {
// shouldn't happen - but if mOwner in KGamePropertyBase is NULL
// this might be possible
removeProperty(p);
@@ -371,8 +371,8 @@ TQString KGamePropertyHandler::propertyValue(KGamePropertyBase* prop)
} else if (*t == typeid(unsigned long int)) {
value = TQString::number(((KGameProperty<unsigned long int> *)prop)->value());
} else if (*t == typeid(TQString)) {
- value = ((KGamePropertyQString*)prop)->value();
- } else if (*t == typeid(Q_INT8)) {
+ value = ((KGamePropertyTQString*)prop)->value();
+ } else if (*t == typeid(TQ_INT8)) {
value = ((KGamePropertyBool*)prop)->value() ? i18n("True") : i18n("False");
} else {
emit signalRequestValue(prop, value);
diff --git a/libkdegames/kgame/kgamepropertyhandler.h b/libkdegames/kgame/kgamepropertyhandler.h
index 29a57cf1..7388b510 100644
--- a/libkdegames/kgame/kgamepropertyhandler.h
+++ b/libkdegames/kgame/kgamepropertyhandler.h
@@ -43,8 +43,8 @@ class KGamePropertyHandlerPrivate; // wow - what a name ;-)
* to care about the KGamePropertHandler. KGame and KPlayer implement
* all features of KGamePropertyHandler so you will rather use it there.
*
- * You have to use the KGamePropertyHandler as parent for all KGameProperty
- * objects but you can also use KPlayer or KGame as parent - then
+ * You have to use the KGamePropertyHandler as tqparent for all KGameProperty
+ * objects but you can also use KPlayer or KGame as tqparent - then
* KPlayer::dataHandler or KGame::dataHandler will be used.
*
* Every KGamePropertyHandler must have - just like every KGameProperty -
@@ -69,9 +69,10 @@ class KGamePropertyHandlerPrivate; // wow - what a name ;-)
* multiplied.
*
**/
-class KDE_EXPORT KGamePropertyHandler : public QObject
+class KDE_EXPORT KGamePropertyHandler : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -80,18 +81,18 @@ public:
* You have to call registerHandler before you can use this
* handler!
**/
- KGamePropertyHandler(TQObject* parent = 0);
+ KGamePropertyHandler(TQObject* tqparent = 0);
/**
* Construct a registered handler.
*
* @see registerHandler
**/
- KGamePropertyHandler(int id, const TQObject* receiver, const char* sendf, const char* emitf, TQObject* parent = 0);
+ KGamePropertyHandler(int id, const TQObject* receiver, const char* sendf, const char* emitf, TQObject* tqparent = 0);
~KGamePropertyHandler();
/**
- * Register the handler with a parent. This is to use
+ * Register the handler with a tqparent. This is to use
* if the constructor without arguments has been chosen.
* Otherwise you need not call this.
*
@@ -105,7 +106,7 @@ public:
/**
* Main message process function. This has to be called by
- * the parent's message event handler. If the id of the message
+ * the tqparent's message event handler. If the id of the message
* agrees with the id of the handler, the message is extracted
* and processed. Otherwise false is returned.
* Example:
@@ -169,7 +170,7 @@ public:
/**
* called by a property to send itself into the
* datastream. This call is simply forwarded to
- * the parent object
+ * the tqparent object
**/
bool sendProperty(TQDataStream &s);
@@ -178,7 +179,7 @@ public:
/**
* called by a property to emit a signal
* This call is simply forwarded to
- * the parent object
+ * the tqparent object
**/
void emitSignal(KGamePropertyBase *data);
@@ -194,7 +195,7 @@ public:
* @param id The ID of the property. See KGamePropertyBase::id
* @return The KGameProperty this ID is assigned to
**/
- KGamePropertyBase *find(int id);
+ KGamePropertyBase *tqfind(int id);
/**
* Clear the KGamePropertyHandler. Note that the properties are
@@ -315,7 +316,7 @@ signals:
/**
* This signal is emitted when a property needs to be sent. Only the
- * parent has to react to this.
+ * tqparent has to react to this.
* @param msgid The id of the handler
* @param sent set this to true if the property was sent successfully -
* otherwise don't touch
diff --git a/libkdegames/kgame/kgamepropertylist.h b/libkdegames/kgame/kgamepropertylist.h
index df8eb604..af380b0a 100644
--- a/libkdegames/kgame/kgamepropertylist.h
+++ b/libkdegames/kgame/kgamepropertylist.h
@@ -139,7 +139,7 @@ public:
void remove( const type& d )
{
- Iterator it=find(d);
+ Iterator it=tqfind(d);
remove(it);
}
diff --git a/libkdegames/kgame/kgamesequence.h b/libkdegames/kgame/kgamesequence.h
index 19699d6b..8047c642 100644
--- a/libkdegames/kgame/kgamesequence.h
+++ b/libkdegames/kgame/kgamesequence.h
@@ -39,9 +39,10 @@ class KGame;
* @short Round/move management class
* @author Andreas Beckermann <b_mann@gmx.de>
**/
-class KGameSequence : public QObject
+class KGameSequence : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KGameSequence();
virtual ~KGameSequence();
diff --git a/libkdegames/kgame/kmessageclient.cpp b/libkdegames/kgame/kmessageclient.cpp
index e490a084..03a39df9 100644
--- a/libkdegames/kgame/kmessageclient.cpp
+++ b/libkdegames/kgame/kmessageclient.cpp
@@ -40,16 +40,16 @@ public:
delete connection;
}
- Q_UINT32 adminID;
- TQValueList <Q_UINT32> clientList;
+ TQ_UINT32 adminID;
+ TQValueList <TQ_UINT32> clientList;
KMessageIO *connection;
bool isLocked;
TQValueList <TQByteArray> delayedMessages;
};
-KMessageClient::KMessageClient (TQObject *parent, const char *name)
- : TQObject (parent, name)
+KMessageClient::KMessageClient (TQObject *tqparent, const char *name)
+ : TQObject (tqparent, name)
{
d = new KMessageClientPrivate ();
d->isLocked = false;
@@ -63,7 +63,7 @@ KMessageClient::~KMessageClient ()
// -- setServer stuff
-void KMessageClient::setServer (const TQString &host, Q_UINT16 port)
+void KMessageClient::setServer (const TQString &host, TQ_UINT16 port)
{
setServer (new KMessageSocket (host, port));
}
@@ -95,7 +95,7 @@ void KMessageClient::setServer (KMessageIO *connection)
// -- id stuff
-Q_UINT32 KMessageClient::id () const
+TQ_UINT32 KMessageClient::id () const
{
return (d->connection) ? d->connection->id () : 0;
}
@@ -105,12 +105,12 @@ bool KMessageClient::isAdmin () const
return id() != 0 && id() == adminId();
}
-Q_UINT32 KMessageClient::adminId () const
+TQ_UINT32 KMessageClient::adminId () const
{
return d->adminID;
}
-const TQValueList <Q_UINT32> &KMessageClient::clientList() const
+const TQValueList <TQ_UINT32> &KMessageClient::clientList() const
{
return d->clientList;
}
@@ -125,14 +125,14 @@ bool KMessageClient::isNetwork () const
return isConnected() ? d->connection->isNetwork() : false;
}
-Q_UINT16 KMessageClient::peerPort () const
+TQ_UINT16 KMessageClient::peerPort () const
{
return d->connection ? d->connection->peerPort() : 0;
}
TQString KMessageClient::peerName () const
{
- return d->connection ? d->connection->peerName() : TQString::fromLatin1("localhost");
+ return d->connection ? d->connection->peerName() : TQString::tqfromLatin1("localhost");
}
// --------------------- Sending messages
@@ -154,26 +154,26 @@ void KMessageClient::sendBroadcast (const TQByteArray &msg)
buffer.open (IO_WriteOnly);
TQDataStream stream (&buffer);
- stream << static_cast<Q_UINT32> ( KMessageServer::REQ_BROADCAST );
- buffer.TQIODevice::writeBlock (msg);
+ stream << static_cast<TQ_UINT32> ( KMessageServer::RETQ_BROADCAST );
+ TQT_TQIODEVICE(&buffer)->writeBlock (msg);
sendServerMessage (sendBuffer);
}
-void KMessageClient::sendForward (const TQByteArray &msg, const TQValueList <Q_UINT32> &clients)
+void KMessageClient::sendForward (const TQByteArray &msg, const TQValueList <TQ_UINT32> &clients)
{
TQByteArray sendBuffer;
TQBuffer buffer (sendBuffer);
buffer.open (IO_WriteOnly);
TQDataStream stream (&buffer);
- stream << static_cast<Q_UINT32>( KMessageServer::REQ_FORWARD ) << clients;
- buffer.TQIODevice::writeBlock (msg);
+ stream << static_cast<TQ_UINT32>( KMessageServer::RETQ_FORWARD ) << clients;
+ TQT_TQIODEVICE(&buffer)->writeBlock (msg);
sendServerMessage (sendBuffer);
}
-void KMessageClient::sendForward (const TQByteArray &msg, Q_UINT32 client)
+void KMessageClient::sendForward (const TQByteArray &msg, TQ_UINT32 client)
{
- sendForward (msg, TQValueList <Q_UINT32> () << client);
+ sendForward (msg, TQValueList <TQ_UINT32> () << client);
}
@@ -213,13 +213,13 @@ void KMessageClient::processMessage (const TQByteArray &msg)
bool unknown = false;
- Q_UINT32 messageID;
+ TQ_UINT32 messageID;
in_stream >> messageID;
switch (messageID)
{
case KMessageServer::MSG_BROADCAST:
{
- Q_UINT32 clientID;
+ TQ_UINT32 clientID;
in_stream >> clientID;
emit broadcastReceived (in_buffer.readAll(), clientID);
}
@@ -227,17 +227,17 @@ void KMessageClient::processMessage (const TQByteArray &msg)
case KMessageServer::MSG_FORWARD:
{
- Q_UINT32 clientID;
- TQValueList <Q_UINT32> receivers;
- in_stream >> clientID >> receivers;
- emit forwardReceived (in_buffer.readAll(), clientID, receivers);
+ TQ_UINT32 clientID;
+ TQValueList <TQ_UINT32> tqreceivers;
+ in_stream >> clientID >> tqreceivers;
+ emit forwardReceived (in_buffer.readAll(), clientID, tqreceivers);
}
break;
case KMessageServer::ANS_CLIENT_ID:
{
bool old_admin = isAdmin();
- Q_UINT32 clientID;
+ TQ_UINT32 clientID;
in_stream >> clientID;
d->connection->setId (clientID);
if (old_admin != isAdmin())
@@ -262,10 +262,10 @@ void KMessageClient::processMessage (const TQByteArray &msg)
case KMessageServer::EVNT_CLIENT_CONNECTED:
{
- Q_UINT32 id;
+ TQ_UINT32 id;
in_stream >> id;
- if (d->clientList.contains (id))
+ if (d->clientList.tqcontains (id))
kdWarning (11001) << k_funcinfo << ": Adding a client that already existed!" << endl;
else
d->clientList.append (id);
@@ -276,11 +276,11 @@ void KMessageClient::processMessage (const TQByteArray &msg)
case KMessageServer::EVNT_CLIENT_DISCONNECTED:
{
- Q_UINT32 id;
- Q_INT8 broken;
+ TQ_UINT32 id;
+ TQ_INT8 broken;
in_stream >> id >> broken;
- if (!d->clientList.contains (id))
+ if (!d->clientList.tqcontains (id))
kdWarning (11001) << k_funcinfo << ": Removing a client that doesn't exist!" << endl;
else
d->clientList.remove (id);
diff --git a/libkdegames/kgame/kmessageclient.h b/libkdegames/kgame/kmessageclient.h
index 71ab7a1e..f81d7a69 100644
--- a/libkdegames/kgame/kmessageclient.h
+++ b/libkdegames/kgame/kmessageclient.h
@@ -47,9 +47,10 @@ class KMessageClientPrivate;
In that case the messages must be of the format specified in KMessageServer.
@author Burkhard Lehner <Burkhard.Lehner@gmx.de>
*/
-class KMessageClient : public QObject
+class KMessageClient : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -58,7 +59,7 @@ public:
Creates an unconnected KMessageClient object. Use setServer() later to connect to a
KMessageServer object.
*/
- KMessageClient (TQObject *parent = 0, const char *name = 0);
+ KMessageClient (TQObject *tqparent = 0, const char *name = 0);
/**
Destructor.
@@ -73,7 +74,7 @@ public:
NOTE: As long as the object is not yet connected to the server, and as long as the server
hasn't sent the client ID, this method returns 0.
*/
- Q_UINT32 id () const;
+ TQ_UINT32 id () const;
/**
@return Whether or not this client is the server admin.
@@ -90,12 +91,12 @@ public:
/**
@return The ID of the admin client on the message server.
*/
- Q_UINT32 adminId() const;
+ TQ_UINT32 adminId() const;
/**
@return The list of the IDs of all the message clients connected to the message server.
*/
- const TQValueList <Q_UINT32> &clientList() const;
+ const TQValueList <TQ_UINT32> &clientList() const;
/**
Connects the client to (another) server.
@@ -108,7 +109,7 @@ public:
be resolved to an IP or just an IP
@param port The port to connect to
*/
- void setServer (const TQString &host, Q_UINT16 port);
+ void setServer (const TQString &host, TQ_UINT16 port);
/**
Connects the client to (another) server.
@@ -168,7 +169,7 @@ public:
connected to. See also KMessageIO::peerPort and TQSocket::peerPort.
@since 3.2
*/
- Q_UINT16 peerPort () const;
+ TQ_UINT16 peerPort () const;
/**
@since 3.2
@@ -218,11 +219,11 @@ public:
@param clients A list of clients the message should be sent to
*/
//AB: processForward doesn't exist!! is processIncomingMessage meant?
- void sendForward (const TQByteArray &msg, const TQValueList <Q_UINT32> &clients);
+ void sendForward (const TQByteArray &msg, const TQValueList <TQ_UINT32> &clients);
/**
Sends a message to a single client. This is a convenieance method. It calls
- sendForward (const TQByteArray &msg, const TQValueList &ltQ_UINT32> &clients)
+ sendForward (const TQByteArray &msg, const TQValueList &ltTQ_UINT32> &clients)
with a list containing only one client ID.
To send a message to the admin of the KMessageServer, you can use 0 as clientID,
@@ -230,7 +231,7 @@ public:
@param msg The message to be sent to the client
@param client The id of the client the message shall be sent to
*/
- void sendForward (const TQByteArray &msg, Q_UINT32 client);
+ void sendForward (const TQByteArray &msg, TQ_UINT32 client);
/**
Once this function is called no message will be received anymore.
@@ -263,7 +264,7 @@ signals:
to ignore broadcast messages that were sent by yourself:
\code
- void myObject::myBroadcastSlot (const TQByteArray &msg, Q_UINT32 senderID)
+ void myObject::myBroadcastSlot (const TQByteArray &msg, TQ_UINT32 senderID)
{
if (senderID == ((KMessageClient *)sender())->id())
return;
@@ -273,7 +274,7 @@ signals:
@param msg The message that has been sent to us
@param senderID The ID of the client which sent the message
*/
- void broadcastReceived (const TQByteArray &msg, Q_UINT32 senderID);
+ void broadcastReceived (const TQByteArray &msg, TQ_UINT32 senderID);
/**
This signal is emitted when the client receives a forward message from the
@@ -283,27 +284,27 @@ signals:
senderID contains the ID of the client that sent the broadcast message. You can
use this e.g. to send a reply message to only that client.
- receivers contains the list of the clients that got the message. (If this list
+ tqreceivers contains the list of the clients that got the message. (If this list
only contains one number, this will be your client ID, and it was exclusivly
sent to you.)
If you don't want to distinguish between broadcast and forward messages and
treat them the same, you can connect forwardReceived signal to the
- broadcastReceived signal. (Yes, that's possible! You can connect a Qt signal to
- a Qt signal, and the second one can have less parameters.)
+ broadcastReceived signal. (Yes, that's possible! You can connect a TQt signal to
+ a TQt signal, and the second one can have less parameters.)
\code
KMessageClient *client = new KMessageClient ();
- connect (client, TQT_SIGNAL (forwardReceived (const TQByteArray &, Q_UINT32, const TQValueList <Q_UINT32>&)),
- client, TQT_SIGNAL (broadcastReceived (const TQByteArray &, Q_UINT32)));
+ connect (client, TQT_SIGNAL (forwardReceived (const TQByteArray &, TQ_UINT32, const TQValueList <TQ_UINT32>&)),
+ client, TQT_SIGNAL (broadcastReceived (const TQByteArray &, TQ_UINT32)));
\endcode
Then connect the broadcast signal to your slot that analyzes the message.
@param msg The message that has been sent to us
@param senderID The ID of the client which sent the message
- @param receivers All clients which receive this message
+ @param tqreceivers All clients which receive this message
*/
- void forwardReceived (const TQByteArray &msg, Q_UINT32 senderID, const TQValueList <Q_UINT32> &receivers);
+ void forwardReceived (const TQByteArray &msg, TQ_UINT32 senderID, const TQValueList <TQ_UINT32> &tqreceivers);
/**
This signal is emitted when the connection to the KMessageServer is broken.
@@ -320,7 +321,7 @@ signals:
This signal is emitted right before the client disconnects. It can be used
to this store the id of the client which is about to be lost.
*/
- void aboutToDisconnect(Q_UINT32 id);
+ void aboutToDisconnect(TQ_UINT32 id);
/**
This signal is emitted when this client becomes the admin client or when it loses
@@ -336,7 +337,7 @@ signals:
This should usually only be done in one client, e.g. the admin client.
@param clientID The ID of the client that has newly connectd.
*/
- void eventClientConnected (Q_UINT32 clientID);
+ void eventClientConnected (TQ_UINT32 clientID);
/**
This signal is emitted when the server has lost the
@@ -345,7 +346,7 @@ signals:
@param clientID The ID of the client that has disconnected
@param broken true if it was disconnected because of a network error
*/
- void eventClientDisconnected (Q_UINT32 clientID, bool broken);
+ void eventClientDisconnected (TQ_UINT32 clientID, bool broken);
/**
This signal is emitted on every message that came from the server. You can connect to this
diff --git a/libkdegames/kgame/kmessageio.cpp b/libkdegames/kgame/kmessageio.cpp
index 7057a621..ec33b159 100644
--- a/libkdegames/kgame/kmessageio.cpp
+++ b/libkdegames/kgame/kmessageio.cpp
@@ -29,54 +29,54 @@
// ----------------------- KMessageIO -------------------------
-KMessageIO::KMessageIO (TQObject *parent, const char *name)
- : TQObject (parent, name), m_id (0)
+KMessageIO::KMessageIO (TQObject *tqparent, const char *name)
+ : TQObject (tqparent, name), m_id (0)
{}
KMessageIO::~KMessageIO ()
{}
-void KMessageIO::setId (Q_UINT32 id)
+void KMessageIO::setId (TQ_UINT32 id)
{
m_id = id;
}
-Q_UINT32 KMessageIO::id ()
+TQ_UINT32 KMessageIO::id ()
{
return m_id;
}
// ----------------------KMessageSocket -----------------------
-KMessageSocket::KMessageSocket (TQString host, Q_UINT16 port, TQObject *parent,
+KMessageSocket::KMessageSocket (TQString host, TQ_UINT16 port, TQObject *tqparent,
const char *name)
- : KMessageIO (parent, name)
+ : KMessageIO (tqparent, name)
{
mSocket = new TQSocket ();
mSocket->connectToHost (host, port);
initSocket ();
}
-KMessageSocket::KMessageSocket (TQHostAddress host, Q_UINT16 port, TQObject
-*parent, const char *name)
- : KMessageIO (parent, name)
+KMessageSocket::KMessageSocket (TQHostAddress host, TQ_UINT16 port, TQObject
+*tqparent, const char *name)
+ : KMessageIO (tqparent, name)
{
mSocket = new TQSocket ();
mSocket->connectToHost (host.toString(), port);
initSocket ();
}
-KMessageSocket::KMessageSocket (TQSocket *socket, TQObject *parent, const char
+KMessageSocket::KMessageSocket (TQSocket *socket, TQObject *tqparent, const char
*name)
- : KMessageIO (parent, name)
+ : KMessageIO (tqparent, name)
{
mSocket = socket;
initSocket ();
}
-KMessageSocket::KMessageSocket (int socketFD, TQObject *parent, const char
+KMessageSocket::KMessageSocket (int socketFD, TQObject *tqparent, const char
*name)
- : KMessageIO (parent, name)
+ : KMessageIO (tqparent, name)
{
mSocket = new TQSocket ();
mSocket->setSocket (socketFD);
@@ -96,8 +96,8 @@ bool KMessageSocket::isConnected () const
void KMessageSocket::send (const TQByteArray &msg)
{
TQDataStream str (mSocket);
- str << Q_UINT8 ('M'); // magic number for begin of message
- str.writeBytes (msg.data(), msg.size()); // writes the length (as Q_UINT32) and the data
+ str << TQ_UINT8 ('M'); // magic number for begin of message
+ str.writeBytes (msg.data(), msg.size()); // writes the length (as TQ_UINT32) and the data
}
void KMessageSocket::processNewData ()
@@ -121,7 +121,7 @@ void KMessageSocket::processNewData ()
// Read the magic number first. If something unexpected is found,
// start over again, ignoring the data that was read up to then.
- Q_UINT8 v;
+ TQ_UINT8 v;
str >> v;
if (v != 'M')
{
@@ -135,7 +135,7 @@ void KMessageSocket::processNewData ()
else
{
// Data not completely read => wait for more
- if (mSocket->bytesAvailable() < (Q_ULONG) mNextBlockLength)
+ if (mSocket->bytesAvailable() < (TQ_ULONG) mNextBlockLength)
{
isRecursive = false;
return;
@@ -165,7 +165,7 @@ void KMessageSocket::initSocket ()
isRecursive = false;
}
-Q_UINT16 KMessageSocket::peerPort () const
+TQ_UINT16 KMessageSocket::peerPort () const
{
return mSocket->peerPort();
}
@@ -177,9 +177,9 @@ TQString KMessageSocket::peerName () const
// ----------------------KMessageDirect -----------------------
-KMessageDirect::KMessageDirect (KMessageDirect *partner, TQObject *parent,
+KMessageDirect::KMessageDirect (KMessageDirect *partner, TQObject *tqparent,
const char *name)
- : KMessageIO (parent, name), mPartner (0)
+ : KMessageIO (tqparent, name), mPartner (0)
{
// 0 as first parameter leaves the object unconnected
if (!partner)
@@ -238,14 +238,14 @@ KMessageProcess::~KMessageProcess()
// Maybe todo: delete mSendBuffer
}
}
-KMessageProcess::KMessageProcess(TQObject *parent, TQString file) : KMessageIO(parent,0)
+KMessageProcess::KMessageProcess(TQObject *tqparent, TQString file) : KMessageIO(tqparent,0)
{
// Start process
kdDebug(11001) << "@@@KMessageProcess::Start process" << endl;
mProcessName=file;
mProcess=new KProcess;
int id=0;
- *mProcess << mProcessName << TQString("%1").arg(id);
+ *mProcess << mProcessName << TQString("%1").tqarg(id);
kdDebug(11001) << "@@@KMessageProcess::Init:Id= " << id << endl;
kdDebug(11001) << "@@@KMessgeProcess::Init:Processname: " << mProcessName << endl;
connect(mProcess, TQT_SIGNAL(receivedStdout(KProcess *, char *, int )),
@@ -397,7 +397,7 @@ void KMessageProcess::slotProcessExited(KProcess * /*p*/)
// ----------------------- KMessageFilePipe ---------------------------
-KMessageFilePipe::KMessageFilePipe(TQObject *parent,TQFile *readfile,TQFile *writefile) : KMessageIO(parent,0)
+KMessageFilePipe::KMessageFilePipe(TQObject *tqparent,TQFile *readfile,TQFile *writefile) : KMessageIO(tqparent,0)
{
mReadFile=readfile;
mWriteFile=writefile;
@@ -430,7 +430,7 @@ void KMessageFilePipe::send(const TQByteArray &msg)
mWriteFile->writeBlock(buffer);
mWriteFile->flush();
/*
- fprintf(stderr,"+++ KMessageFilePipe:: SEND(%d to parent) realsize=%d\n",msg.size(),buffer.size());
+ fprintf(stderr,"+++ KMessageFilePipe:: SEND(%d to tqparent) realsize=%d\n",msg.size(),buffer.size());
for (int i=0;i<buffer.size();i++) fprintf(stderr,"%02x ",buffer[i]);fprintf(stderr,"\n");
fflush(stderr);
*/
diff --git a/libkdegames/kgame/kmessageio.h b/libkdegames/kgame/kmessageio.h
index 5a102e11..7d4bc92a 100644
--- a/libkdegames/kgame/kmessageio.h
+++ b/libkdegames/kgame/kmessageio.h
@@ -53,15 +53,16 @@ class KProcess;
sides must be within the same process).
*/
-class KMessageIO : public QObject
+class KMessageIO : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* The usual TQObject constructor, does nothing else.
**/
- KMessageIO (TQObject *parent = 0, const char *name = 0);
+ KMessageIO (TQObject *tqparent = 0, const char *name = 0);
/**
* The usual destructor, does nothing special.
@@ -105,24 +106,24 @@ public:
have the same ID number. You have to do so yourself, KMessageIO doesn't
change this value on its own!
*/
- void setId (Q_UINT32 id);
+ void setId (TQ_UINT32 id);
/**
Queries the ID of this object.
*/
- Q_UINT32 id ();
+ TQ_UINT32 id ();
/**
@since 3.2
@return 0 in the default implementation. Reimplemented in @ref KMessageSocket.
*/
- virtual Q_UINT16 peerPort () const { return 0; }
+ virtual TQ_UINT16 peerPort () const { return 0; }
/**
@since 3.2
@return "localhost" in the default implementation. Reimplemented in @ref KMessageSocket
*/
- virtual TQString peerName () const { return TQString::fromLatin1("localhost"); }
+ virtual TQString peerName () const { return TQString::tqfromLatin1("localhost"); }
signals:
@@ -157,7 +158,7 @@ public slots:
virtual void send (const TQByteArray &msg) = 0;
protected:
- Q_UINT32 m_id;
+ TQ_UINT32 m_id;
};
@@ -169,6 +170,7 @@ protected:
class KMessageSocket : public KMessageIO
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -181,7 +183,7 @@ public:
If the connection could not be established (e.g. unknown host or no server
socket at this port), the signal /e connectionBroken is emitted.
*/
- KMessageSocket (TQString host, Q_UINT16 port, TQObject *parent = 0,
+ KMessageSocket (TQString host, TQ_UINT16 port, TQObject *tqparent = 0,
const char *name = 0);
/**
@@ -192,7 +194,7 @@ public:
If the connection could not be established (e.g. unknown host or no server
socket at this port), the signal /e connectionBroken is emitted.
*/
- KMessageSocket (TQHostAddress host, Q_UINT16 port, TQObject *parent = 0,
+ KMessageSocket (TQHostAddress host, TQ_UINT16 port, TQObject *tqparent = 0,
const char *name = 0);
/**
@@ -203,10 +205,10 @@ public:
Note: The /e socket object is then owned by the /e KMessageSocket object.
So don't use it otherwise any more and don't delete it. It is deleted
- together with this KMessageSocket object. (Use 0 as parent for the QSocket
+ together with this KMessageSocket object. (Use 0 as tqparent for the TQSocket
object t ensure it is not deleted.)
*/
- KMessageSocket (TQSocket *socket, TQObject *parent = 0, const char *name = 0);
+ KMessageSocket (TQSocket *socket, TQObject *tqparent = 0, const char *name = 0);
/**
Uses the socket specified by the socket descriptor socketFD to do the
@@ -219,7 +221,7 @@ public:
manipulate the socket afterwards, especially don't close it. The socket is
automatically closed when KMessageSocket is deleted.
*/
- KMessageSocket (int socketFD, TQObject *parent = 0, const char *name = 0);
+ KMessageSocket (int socketFD, TQObject *tqparent = 0, const char *name = 0);
/**
Destructor, closes the socket.
@@ -235,7 +237,7 @@ public:
@since 3.2
@return The port that this object is connected to. See TQSocket::peerPort
*/
- virtual Q_UINT16 peerPort () const;
+ virtual TQ_UINT16 peerPort () const;
/**
@since 3.2
@@ -268,9 +270,9 @@ protected:
void initSocket ();
TQSocket *mSocket;
bool mAwaitingHeader;
- Q_UINT32 mNextBlockLength;
+ TQ_UINT32 mNextBlockLength;
- bool isRecursive; // workaround for "bug" in TQSocket, Qt 2.2.3 or older
+ bool isRecursive; // workaround for "bug" in TQSocket, TQt 2.2.3 or older
};
@@ -295,6 +297,7 @@ protected:
class KMessageDirect : public KMessageIO
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -304,7 +307,7 @@ public:
If that object is already connected, the object remains unconnected.
*/
- KMessageDirect (KMessageDirect *partner = 0, TQObject *parent = 0, const char
+ KMessageDirect (KMessageDirect *partner = 0, TQObject *tqparent = 0, const char
*name = 0);
/**
@@ -347,10 +350,11 @@ protected:
class KMessageProcess : public KMessageIO
{
- Q_OBJECT
+ Q_OBJECT
+ TQ_OBJECT
public:
- KMessageProcess(TQObject *parent, TQString file);
+ KMessageProcess(TQObject *tqparent, TQString file);
~KMessageProcess();
bool isConnected() const;
void send (const TQByteArray &msg);
@@ -385,10 +389,11 @@ class KMessageProcess : public KMessageIO
class KMessageFilePipe : public KMessageIO
{
- Q_OBJECT
+ Q_OBJECT
+ TQ_OBJECT
public:
- KMessageFilePipe(TQObject *parent,TQFile *readFile,TQFile *writeFile);
+ KMessageFilePipe(TQObject *tqparent,TQFile *readFile,TQFile *writeFile);
~KMessageFilePipe();
bool isConnected() const;
void send (const TQByteArray &msg);
diff --git a/libkdegames/kgame/kmessageserver.cpp b/libkdegames/kgame/kmessageserver.cpp
index 618a6079..69609002 100644
--- a/libkdegames/kgame/kmessageserver.cpp
+++ b/libkdegames/kgame/kmessageserver.cpp
@@ -31,8 +31,8 @@
// --------------- internal class KMessageServerSocket
-KMessageServerSocket::KMessageServerSocket (Q_UINT16 port, TQObject *parent)
- : TQServerSocket (port, 0, parent)
+KMessageServerSocket::KMessageServerSocket (TQ_UINT16 port, TQObject *tqparent)
+ : TQServerSocket (port, 0, tqparent)
{
}
@@ -50,10 +50,10 @@ void KMessageServerSocket::newConnection (int socket)
class MessageBuffer
{
public:
- MessageBuffer (Q_UINT32 clientID, const TQByteArray &messageData)
+ MessageBuffer (TQ_UINT32 clientID, const TQByteArray &messageData)
: id (clientID), data (messageData) { }
~MessageBuffer () {}
- Q_UINT32 id;
+ TQ_UINT32 id;
TQByteArray data;
};
@@ -71,9 +71,9 @@ public:
int mMaxClients;
int mGameId;
- Q_UINT16 mCookie;
- Q_UINT32 mUniqueClientNumber;
- Q_UINT32 mAdminID;
+ TQ_UINT16 mCookie;
+ TQ_UINT32 mUniqueClientNumber;
+ TQ_UINT32 mAdminID;
KMessageServerSocket* mServerSocket;
@@ -86,8 +86,8 @@ public:
// ------------------ KMessageServer
-KMessageServer::KMessageServer (Q_UINT16 cookie,TQObject* parent)
- : TQObject(parent, 0)
+KMessageServer::KMessageServer (TQ_UINT16 cookie,TQObject* tqparent)
+ : TQObject(tqparent, 0)
{
d = new KMessageServerPrivate;
d->mIsRecursive=false;
@@ -115,7 +115,7 @@ KMessageServer::~KMessageServer()
//------------------------------------- TCP/IP server stuff
-bool KMessageServer::initNetwork (Q_UINT16 port)
+bool KMessageServer::initNetwork (TQ_UINT16 port)
{
kdDebug(11001) << k_funcinfo << endl;
@@ -143,7 +143,7 @@ bool KMessageServer::initNetwork (Q_UINT16 port)
return true;
}
-Q_UINT16 KMessageServer::serverPort () const
+TQ_UINT16 KMessageServer::serverPort () const
{
if (d->mServerSocket)
return d->mServerSocket->port();
@@ -190,18 +190,18 @@ void KMessageServer::addClient (KMessageIO* client)
// Tell everyone about the new guest
// Note: The new client doesn't get this message!
- TQDataStream (msg, IO_WriteOnly) << Q_UINT32 (EVNT_CLIENT_CONNECTED) << client->id();
+ TQDataStream (msg, IO_WriteOnly) << TQ_UINT32 (EVNT_CLIENT_CONNECTED) << client->id();
broadcastMessage (msg);
// add to our list
d->mClientList.append (client);
// tell it its ID
- TQDataStream (msg, IO_WriteOnly) << Q_UINT32 (ANS_CLIENT_ID) << client->id();
+ TQDataStream (msg, IO_WriteOnly) << TQ_UINT32 (ANS_CLIENT_ID) << client->id();
client->send (msg);
// Give it the complete list of client IDs
- TQDataStream (msg, IO_WriteOnly) << Q_UINT32 (ANS_CLIENT_LIST) << clientIDs();
+ TQDataStream (msg, IO_WriteOnly) << TQ_UINT32 (ANS_CLIENT_LIST) << clientIDs();
client->send (msg);
@@ -213,7 +213,7 @@ void KMessageServer::addClient (KMessageIO* client)
else
{
// otherwise tell it who is the admin
- TQDataStream (msg, IO_WriteOnly) << Q_UINT32 (ANS_ADMIN_ID) << adminID();
+ TQDataStream (msg, IO_WriteOnly) << TQ_UINT32 (ANS_ADMIN_ID) << adminID();
client->send (msg);
}
@@ -222,7 +222,7 @@ void KMessageServer::addClient (KMessageIO* client)
void KMessageServer::removeClient (KMessageIO* client, bool broken)
{
- Q_UINT32 clientID = client->id();
+ TQ_UINT32 clientID = client->id();
if (!d->mClientList.removeRef (client))
{
kdError(11001) << k_funcinfo << ": Deleting client that wasn't added before!" << endl;
@@ -231,7 +231,7 @@ void KMessageServer::removeClient (KMessageIO* client, bool broken)
// tell everyone about the removed client
TQByteArray msg;
- TQDataStream (msg, IO_WriteOnly) << Q_UINT32 (EVNT_CLIENT_DISCONNECTED) << client->id() << (Q_INT8)broken;
+ TQDataStream (msg, IO_WriteOnly) << TQ_UINT32 (EVNT_CLIENT_DISCONNECTED) << client->id() << (TQ_INT8)broken;
broadcastMessage (msg);
// If it was the admin, select a new admin.
@@ -280,15 +280,15 @@ int KMessageServer::clientCount() const
return d->mClientList.count();
}
-TQValueList <Q_UINT32> KMessageServer::clientIDs () const
+TQValueList <TQ_UINT32> KMessageServer::clientIDs () const
{
- TQValueList <Q_UINT32> list;
+ TQValueList <TQ_UINT32> list;
for (TQPtrListIterator <KMessageIO> iter (d->mClientList); *iter; ++iter)
list.append ((*iter)->id());
return list;
}
-KMessageIO* KMessageServer::findClient (Q_UINT32 no) const
+KMessageIO* KMessageServer::findClient (TQ_UINT32 no) const
{
if (no == 0)
no = d->mAdminID;
@@ -303,12 +303,12 @@ KMessageIO* KMessageServer::findClient (Q_UINT32 no) const
return 0;
}
-Q_UINT32 KMessageServer::adminID () const
+TQ_UINT32 KMessageServer::adminID () const
{
return d->mAdminID;
}
-void KMessageServer::setAdmin (Q_UINT32 adminID)
+void KMessageServer::setAdmin (TQ_UINT32 adminID)
{
// Trying to set the the client that is already admin => nothing to do
if (adminID == d->mAdminID)
@@ -323,7 +323,7 @@ void KMessageServer::setAdmin (Q_UINT32 adminID)
d->mAdminID = adminID;
TQByteArray msg;
- TQDataStream (msg, IO_WriteOnly) << Q_UINT32 (ANS_ADMIN_ID) << adminID;
+ TQDataStream (msg, IO_WriteOnly) << TQ_UINT32 (ANS_ADMIN_ID) << adminID;
// Tell everyone about the new master
broadcastMessage (msg);
@@ -332,7 +332,7 @@ void KMessageServer::setAdmin (Q_UINT32 adminID)
//------------------------------------------- ID stuff
-Q_UINT32 KMessageServer::uniqueClientNumber() const
+TQ_UINT32 KMessageServer::uniqueClientNumber() const
{
return d->mUniqueClientNumber++;
}
@@ -345,16 +345,16 @@ void KMessageServer::broadcastMessage (const TQByteArray &msg)
(*iter)->send (msg);
}
-void KMessageServer::sendMessage (Q_UINT32 id, const TQByteArray &msg)
+void KMessageServer::sendMessage (TQ_UINT32 id, const TQByteArray &msg)
{
KMessageIO *client = findClient (id);
if (client)
client->send (msg);
}
-void KMessageServer::sendMessage (const TQValueList <Q_UINT32> &ids, const TQByteArray &msg)
+void KMessageServer::sendMessage (const TQValueList <TQ_UINT32> &ids, const TQByteArray &msg)
{
- for (TQValueListConstIterator <Q_UINT32> iter = ids.begin(); iter != ids.end(); ++iter)
+ for (TQValueListConstIterator <TQ_UINT32> iter = ids.begin(); iter != ids.end(); ++iter)
sendMessage (*iter, msg);
}
@@ -367,7 +367,7 @@ void KMessageServer::getReceivedMessage (const TQByteArray &msg)
}
//kdDebug(11001) << k_funcinfo << ": size=" << msg.size() << endl;
KMessageIO *client = (KMessageIO *) sender();
- Q_UINT32 clientID = client->id();
+ TQ_UINT32 clientID = client->id();
//TQByteArray *ta=new TQByteArray;
//ta->duplicate(msg);
@@ -395,7 +395,7 @@ void KMessageServer::processOneMessage ()
MessageBuffer *msg_buf = d->mMessageQueue.head();
- Q_UINT32 clientID = msg_buf->id;
+ TQ_UINT32 clientID = msg_buf->id;
TQBuffer in_buffer (msg_buf->data);
in_buffer.open (IO_ReadOnly);
TQDataStream in_stream (&in_buffer);
@@ -408,56 +408,56 @@ void KMessageServer::processOneMessage ()
bool unknown = false;
TQByteArray ttt=in_buffer.buffer();
- Q_UINT32 messageID;
+ TQ_UINT32 messageID;
in_stream >> messageID;
//kdDebug(11001) << k_funcinfo << ": got message with messageID=" << messageID << endl;
switch (messageID)
{
- case REQ_BROADCAST:
- out_stream << Q_UINT32 (MSG_BROADCAST) << clientID;
+ case RETQ_BROADCAST:
+ out_stream << TQ_UINT32 (MSG_BROADCAST) << clientID;
// FIXME, compiler bug?
- // this should be okay, since TQBuffer is subclass of QIODevice! :
+ // this should be okay, since TQBuffer is subclass of TQIODevice! :
// out_buffer.writeBlock (in_buffer.readAll());
- out_buffer.TQIODevice::writeBlock (in_buffer.readAll());
+ TQT_TQIODEVICE(&out_buffer)->writeBlock (in_buffer.readAll());
broadcastMessage (out_msg);
break;
- case REQ_FORWARD:
+ case RETQ_FORWARD:
{
- TQValueList <Q_UINT32> clients;
+ TQValueList <TQ_UINT32> clients;
in_stream >> clients;
- out_stream << Q_UINT32 (MSG_FORWARD) << clientID << clients;
+ out_stream << TQ_UINT32 (MSG_FORWARD) << clientID << clients;
// see above!
- out_buffer.TQIODevice::writeBlock (in_buffer.readAll());
+ TQT_TQIODEVICE(&out_buffer)->writeBlock (in_buffer.readAll());
sendMessage (clients, out_msg);
}
break;
- case REQ_CLIENT_ID:
- out_stream << Q_UINT32 (ANS_CLIENT_ID) << clientID;
+ case RETQ_CLIENT_ID:
+ out_stream << TQ_UINT32 (ANS_CLIENT_ID) << clientID;
sendMessage (clientID, out_msg);
break;
- case REQ_ADMIN_ID:
- out_stream << Q_UINT32 (ANS_ADMIN_ID) << d->mAdminID;
+ case RETQ_ADMIN_ID:
+ out_stream << TQ_UINT32 (ANS_ADMIN_ID) << d->mAdminID;
sendMessage (clientID, out_msg);
break;
- case REQ_ADMIN_CHANGE:
+ case RETQ_ADMIN_CHANGE:
if (clientID == d->mAdminID)
{
- Q_UINT32 newAdmin;
+ TQ_UINT32 newAdmin;
in_stream >> newAdmin;
setAdmin (newAdmin);
}
break;
- case REQ_REMOVE_CLIENT:
+ case RETQ_REMOVE_CLIENT:
if (clientID == d->mAdminID)
{
- TQValueList <Q_UINT32> client_list;
+ TQValueList <TQ_UINT32> client_list;
in_stream >> client_list;
- for (TQValueListIterator <Q_UINT32> iter = client_list.begin(); iter != client_list.end(); ++iter)
+ for (TQValueListIterator <TQ_UINT32> iter = client_list.begin(); iter != client_list.end(); ++iter)
{
KMessageIO *client = findClient (*iter);
if (client)
@@ -468,18 +468,18 @@ void KMessageServer::processOneMessage ()
}
break;
- case REQ_MAX_NUM_CLIENTS:
+ case RETQ_MAX_NUM_CLIENTS:
if (clientID == d->mAdminID)
{
- Q_INT32 maximum_clients;
+ TQ_INT32 maximum_clients;
in_stream >> maximum_clients;
setMaxClients (maximum_clients);
}
break;
- case REQ_CLIENT_LIST:
+ case RETQ_CLIENT_LIST:
{
- out_stream << Q_UINT32 (ANS_CLIENT_LIST) << clientIDs();
+ out_stream << TQ_UINT32 (ANS_CLIENT_LIST) << clientIDs();
sendMessage (clientID, out_msg);
}
break;
diff --git a/libkdegames/kgame/kmessageserver.h b/libkdegames/kgame/kmessageserver.h
index 3d0b1055..3a416a6b 100644
--- a/libkdegames/kgame/kmessageserver.h
+++ b/libkdegames/kgame/kmessageserver.h
@@ -73,53 +73,53 @@ class KMessageServerPrivate;
Here is a list of the messages the KMessageServer understands:
&lt;&lt; means, the value is inserted into the TQByteArray using TQDataStream. The
- messageIDs (REQ_BROADCAST, ...) are of type Q_UINT32.
+ messageIDs (RETQ_BROADCAST, ...) are of type TQ_UINT32.
- - TQByteArray << static_cast&lt;Q_UINT32>( REQ_BROADCAST ) << raw_data
+ - TQByteArray << static_cast&lt;TQ_UINT32>( RETQ_BROADCAST ) << raw_data
When the server receives this message, it sends the following message to
ALL connected clients (a broadcast), where the raw_data is left unchanged:
- TQByteArray << static_cast &lt;Q_UINT32>( MSG_BROADCAST ) << clientID << raw_data
- Q_UINT32 clientID; // the ID of the client that sent the broadcast request
+ TQByteArray << static_cast &lt;TQ_UINT32>( MSG_BROADCAST ) << clientID << raw_data
+ TQ_UINT32 clientID; // the ID of the client that sent the broadcast request
- - TQByteArray << static_cast&lt;Q_UINT32>( REQ_FORWARD ) << client_list << raw_data
- TQValueList &lt;Q_UINT32> client_list; // list of receivers
+ - TQByteArray << static_cast&lt;TQ_UINT32>( RETQ_FORWARD ) << client_list << raw_data
+ TQValueList &lt;TQ_UINT32> client_list; // list of tqreceivers
When the server receives this message, it sends the following message to
the clients in client_list:
- TQByteArray << static_cast&lt;Q_UINT32>( MSG_FORWARD ) << senderID << client_list << raw_data
- Q_UINT32 senderID; // the sender of the forward request
- TQValueList &lt;Q_UINT32> client_list; // a copy of the receiver list
+ TQByteArray << static_cast&lt;TQ_UINT32>( MSG_FORWARD ) << senderID << client_list << raw_data
+ TQ_UINT32 senderID; // the sender of the forward request
+ TQValueList &lt;TQ_UINT32> client_list; // a copy of the receiver list
Note: Every client receives the message as many times as he is in the client_list.
Note: Since the client_list is sent to all the clients, every client can see who else
- got the message. If you want to prevent this, send a single REQ_FORWARD
+ got the message. If you want to prevent this, send a single RETQ_FORWARD
message for every receiver.
- - TQByteArray << static_cast&lt;Q_UINT32>( REQ_CLIENT_ID )
+ - TQByteArray << static_cast&lt;TQ_UINT32>( RETQ_CLIENT_ID )
When the server receives this message, it sends the following message to
the asking client:
- TQByteArray << static_cast&lt;Q_UINT32>( ANS_CLIENT_ID ) << clientID
- Q_UINT32 clientID; // The ID of the client who asked for it
+ TQByteArray << static_cast&lt;TQ_UINT32>( ANS_CLIENT_ID ) << clientID
+ TQ_UINT32 clientID; // The ID of the client who asked for it
Note: This answer is also automatically sent to a new connected client, so that he
can store his ID. The ID of a client doesn't change during his lifetime, and is
unique for this KMessageServer.
- - TQByteArray << static_cast&lt;Q_UINT32>( REQ_ADMIN_ID )
+ - TQByteArray << static_cast&lt;TQ_UINT32>( RETQ_ADMIN_ID )
When the server receives this message, it sends the following message to
the asking client:
TQByteArray << ANS_ADMIN_ID << adminID
- Q_UINT32 adminID; // The ID of the admin
+ TQ_UINT32 adminID; // The ID of the admin
Note: This answer is also automatically sent to a new connected client, so that he
can see if he is the admin or not. It will also be sent to all connected clients
- when a new admin is set (see REQ_ADMIN_CHANGE).
+ when a new admin is set (see RETQ_ADMIN_CHANGE).
- - TQByteArray << static_cast&lt;Q_UINT32>( REQ_ADMIN_CHANGE ) << new_admin
- Q_UINT32 new_admin; // the ID of the new admin, or 0 for no admin
+ - TQByteArray << static_cast&lt;TQ_UINT32>( RETQ_ADMIN_CHANGE ) << new_admin
+ TQ_UINT32 new_admin; // the ID of the new admin, or 0 for no admin
When the server receives this message, it sets the admin to the new ID. If no client
with that ID exists, nothing happens. With new_admin == 0 no client is a admin.
@@ -127,8 +127,8 @@ class KMessageServerPrivate;
Note: The server sends a ANS_ADMIN_ID message to every connected client.
- - TQByteArray << static_cast&lt;Q_UINT32>( REQ_REMOVE_CLIENT ) << client_list
- TQValueList &lt;Q_UINT32> client_list; // The list of clients to be removed
+ - TQByteArray << static_cast&lt;TQ_UINT32>( RETQ_REMOVE_CLIENT ) << client_list
+ TQValueList &lt;TQ_UINT32> client_list; // The list of clients to be removed
When the server receives this message, it removes the clients with the ids stored in
client_list, disconnecting the connection to them.
@@ -137,22 +137,22 @@ class KMessageServerPrivate;
Note: If one of the clients is the admin himself, he will also be deleted.
Another client (if any left) will become the new admin.
- - TQByteArray << static_cast&lt;Q_UINT32>( REQ_MAX_NUM_CLIENTS ) << maximum_clients
- Q_INT32 maximum_clients; // The maximum of clients connected, or infinite if -1
+ - TQByteArray << static_cast&lt;TQ_UINT32>( RETQ_MAX_NUM_CLIENTS ) << maximum_clients
+ TQ_INT32 maximum_clients; // The maximum of clients connected, or infinite if -1
When the server receives this message, it limits the number of clients to the number given,
or sets it unlimited for maximum_clients == -1.
ONLY THE ADMIN CAN USE THIS MESSAGE!
Note: If there are already more clients, they are not affected. It only prevents new Clients
- to be added. To assure this limit, remove clients afterwards (REQ_REMOVE_CLIENT)
+ to be added. To assure this limit, remove clients afterwards (RETQ_REMOVE_CLIENT)
- - TQByteArray << static_cast&lt;Q_UINT32>( REQ_CLIENT_LIST )
+ - TQByteArray << static_cast&lt;TQ_UINT32>( RETQ_CLIENT_LIST )
When the server receives this message, it answers by sending a list of IDs of all the clients
that are connected at the moment. So it sends the following message to the asking client:
- TQByteArray << static_cast&lt;Q_UINT32>( ANS_CLIENT_LIST ) << clientList
- TQValueList &lt;Q_UINT32> clientList; // The IDs of the connected clients
+ TQByteArray << static_cast&lt;TQ_UINT32>( ANS_CLIENT_LIST ) << clientList
+ TQValueList &lt;TQ_UINT32> clientList; // The IDs of the connected clients
Note: This message is also sent to every new connected client, so that he knows the other
clients.
@@ -160,36 +160,37 @@ class KMessageServerPrivate;
There are two more messages that are sent from the server to the every client automatically
when a new client connects or a connection to a client is lost:
- TQByteArray << static_cast&lt;Q_UINT32>( EVNT_CLIENT_CONNECTED ) << clientID;
- Q_UINT32 clientID; // the ID of the new connected client
+ TQByteArray << static_cast&lt;TQ_UINT32>( EVNT_CLIENT_CONNECTED ) << clientID;
+ TQ_UINT32 clientID; // the ID of the new connected client
- TQByteArray << static_cast&lt;Q_UINT32>( EVNT_CLIENT_DISCONNECTED ) << clientID;
- Q_UINT32 clientID; // the ID of the client that lost the connection
- Q_UINT8 broken; // 1 if the network connection was closed, 0 if it was disconnected
+ TQByteArray << static_cast&lt;TQ_UINT32>( EVNT_CLIENT_DISCONNECTED ) << clientID;
+ TQ_UINT32 clientID; // the ID of the client that lost the connection
+ TQ_UINT8 broken; // 1 if the network connection was closed, 0 if it was disconnected
// on purpose
@author Andreas Beckermann <b_mann@gmx.de>, Burkhard Lehner <Burkhard.Lehner@gmx.de>
@version $Id$
*/
-class KMessageServer : public QObject
+class KMessageServer : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
MessageIDs for messages from a client to the message server.
*/
enum {
- REQ_BROADCAST = 1,
- REQ_FORWARD,
- REQ_CLIENT_ID,
- REQ_ADMIN_ID,
- REQ_ADMIN_CHANGE,
- REQ_REMOVE_CLIENT,
- REQ_MAX_NUM_CLIENTS,
- REQ_CLIENT_LIST,
- REQ_MAX_REQ = 0xffff };
+ RETQ_BROADCAST = 1,
+ RETQ_FORWARD,
+ RETQ_CLIENT_ID,
+ RETQ_ADMIN_ID,
+ RETQ_ADMIN_CHANGE,
+ RETQ_REMOVE_CLIENT,
+ RETQ_MAX_NUM_CLIENTS,
+ RETQ_CLIENT_LIST,
+ RETQ_MAX_REQ = 0xffff };
/**
* MessageIDs for messages from the message server to a client.
@@ -208,7 +209,7 @@ public:
/**
* Create a KGameNetwork object
**/
- KMessageServer(Q_UINT16 cookie = 42, TQObject* parent = 0);
+ KMessageServer(TQ_UINT16 cookie = 42, TQObject* tqparent = 0);
~KMessageServer();
@@ -226,7 +227,7 @@ public:
* system pick a free port
* @return true if it worked
*/
- bool initNetwork (Q_UINT16 port = 0);
+ bool initNetwork (TQ_UINT16 port = 0);
/**
* Returns the TCP/IP port number we are listening to for incoming connections.
@@ -234,7 +235,7 @@ public:
* especially necessary if you used 0 as port number in initNetwork().
* @return the port number
**/
- Q_UINT16 serverPort () const;
+ TQ_UINT16 serverPort () const;
/**
* Stops listening for connections. The already running connections are
@@ -325,14 +326,14 @@ public:
/**
* returns a list of the unique IDs of all clients.
**/
- TQValueList <Q_UINT32> clientIDs() const;
+ TQValueList <TQ_UINT32> clientIDs() const;
/**
* Find the @ref KMessageIO object to the given client number.
* @param no the client number to look for, or 0 to look for the admin
* @return address of the client, or 0 if no client with that number exists
**/
- KMessageIO *findClient (Q_UINT32 no) const;
+ KMessageIO *findClient (TQ_UINT32 no) const;
/**
* Returns the clientID of the admin, if there is a admin, 0 otherwise.
@@ -340,14 +341,14 @@ public:
* NOTE: Most often you don't need to know that id, since you can
* use clientID 0 to specify the admin.
**/
- Q_UINT32 adminID() const;
+ TQ_UINT32 adminID() const;
/**
* Sets the admin to a new client with the given ID.
* The old admin (if existed) and the new admin will get the ANS_ADMIN message.
* If you use 0 as new adminID, no client will be admin.
**/
- void setAdmin (Q_UINT32 adminID);
+ void setAdmin (TQ_UINT32 adminID);
//------------------------------ ID stuff
@@ -385,7 +386,7 @@ public:
* @ref findClient (id)->send(msg) manually, but this method checks for
* errors.
**/
- virtual void sendMessage (Q_UINT32 id, const TQByteArray &msg);
+ virtual void sendMessage (TQ_UINT32 id, const TQByteArray &msg);
/**
* Sends a message to a list of clients. Their ID is given in ids. If
@@ -394,7 +395,7 @@ public:
* This is just a convenience method. You could also iterate over the
* list of IDs.
**/
- virtual void sendMessage (const TQValueList <Q_UINT32> &ids, const TQByteArray &msg);
+ virtual void sendMessage (const TQValueList <TQ_UINT32> &ids, const TQByteArray &msg);
protected slots:
/**
@@ -448,7 +449,7 @@ signals:
* @param clientID the ID of the KMessageIO object that received the message
* @param unknown true, if the message type is not known by the KMessageServer
**/
- void messageReceived (const TQByteArray &data, Q_UINT32 clientID, bool &unknown);
+ void messageReceived (const TQByteArray &data, TQ_UINT32 clientID, bool &unknown);
protected:
/**
@@ -456,7 +457,7 @@ protected:
* incremented after every call so if you need the id twice you have to save
* it anywhere. It's currently used to initialize newly connected clints only.
**/
- Q_UINT32 uniqueClientNumber() const;
+ TQ_UINT32 uniqueClientNumber() const;
private:
KMessageServerPrivate* d;
@@ -468,17 +469,18 @@ private:
connections.
NOTE: This has to be here in the header file, because it is a subclass from
- TQObject and has to go through the moc.
+ TQObject and has to go through the tqmoc.
@short An internal class for KServerSocket
@author Burkhard Lehner <Burkhard.Lehner@gmx.de>
*/
-class KMessageServerSocket : public QServerSocket
+class KMessageServerSocket : public TQServerSocket
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMessageServerSocket (Q_UINT16 port, TQObject *parent = 0);
+ KMessageServerSocket (TQ_UINT16 port, TQObject *tqparent = 0);
~KMessageServerSocket ();
void newConnection (int socket);
diff --git a/libkdegames/kgame/kplayer.cpp b/libkdegames/kgame/kplayer.cpp
index fdde20d9..adc893ff 100644
--- a/libkdegames/kgame/kplayer.cpp
+++ b/libkdegames/kgame/kplayer.cpp
@@ -46,7 +46,7 @@ public:
mNetworkPlayer = 0;
}
- Q_UINT32 mId;
+ TQ_UINT32 mId;
bool mVirtual; // virtual player
int mPriority; // tag for replacement
@@ -55,8 +55,8 @@ public:
KGamePropertyHandler mProperties;
// Playerdata
- KGamePropertyQString mName;
- KGamePropertyQString mGroup;
+ KGamePropertyTQString mName;
+ KGamePropertyTQString mGroup;
};
KPlayer::KPlayer() : TQObject(0,0)
@@ -125,7 +125,7 @@ KPlayer::~KPlayer()
// kdDebug(11001) << k_funcinfo << " done" << endl;
}
-bool KPlayer::forwardMessage(TQDataStream &msg,int msgid,Q_UINT32 receiver,Q_UINT32 sender)
+bool KPlayer::forwardMessage(TQDataStream &msg,int msgid,TQ_UINT32 receiver,TQ_UINT32 sender)
{
if (!isActive())
{
@@ -139,7 +139,7 @@ bool KPlayer::forwardMessage(TQDataStream &msg,int msgid,Q_UINT32 receiver,Q_UIN
return game()->sendSystemMessage(msg,msgid,receiver,sender);
}
-bool KPlayer::forwardInput(TQDataStream &msg,bool transmit,Q_UINT32 sender)
+bool KPlayer::forwardInput(TQDataStream &msg,bool transmit,TQ_UINT32 sender)
{
if (!isActive())
{
@@ -173,7 +173,7 @@ bool KPlayer::forwardInput(TQDataStream &msg,bool transmit,Q_UINT32 sender)
}
}
-void KPlayer::setId(Q_UINT32 newid)
+void KPlayer::setId(TQ_UINT32 newid)
{
// Needs to be after the sendProcess
d->mId=newid;
@@ -192,7 +192,7 @@ void KPlayer::setName(const TQString& name)
const TQString& KPlayer::name() const
{ return d->mName.value(); }
-Q_UINT32 KPlayer::id() const
+TQ_UINT32 KPlayer::id() const
{ return d->mId; }
KGamePropertyHandler * KPlayer::dataHandler()
@@ -313,7 +313,7 @@ bool KPlayer::setTurn(bool b, bool exclusive)
bool KPlayer::load(TQDataStream &stream)
{
- Q_INT32 id,priority;
+ TQ_INT32 id,priority;
stream >> id >> priority;
setId(id);
setNetworkPriority(priority);
@@ -322,7 +322,7 @@ bool KPlayer::load(TQDataStream &stream)
//FIXME: maybe set all properties setEmitSignal(false) before?
d->mProperties.load(stream);
- Q_INT16 cookie;
+ TQ_INT16 cookie;
stream >> cookie;
if (cookie==KPLAYER_LOAD_COOKIE)
{
@@ -339,18 +339,18 @@ bool KPlayer::load(TQDataStream &stream)
bool KPlayer::save(TQDataStream &stream)
{
- stream << (Q_INT32)id() << (Q_INT32)networkPriority();
+ stream << (TQ_INT32)id() << (TQ_INT32)networkPriority();
d->mProperties.save(stream);
- stream << (Q_INT16)KPLAYER_LOAD_COOKIE;
+ stream << (TQ_INT16)KPLAYER_LOAD_COOKIE;
//emit signalSave(stream);
return true;
}
-void KPlayer::networkTransmission(TQDataStream &stream,int msgid,Q_UINT32 sender)
+void KPlayer::networkTransmission(TQDataStream &stream,int msgid,TQ_UINT32 sender)
{
//kdDebug(11001) << k_funcinfo ": msgid=" << msgid << " sender=" << sender << " we are=" << id() << endl;
// PlayerProperties processed
@@ -388,7 +388,7 @@ void KPlayer::networkTransmission(TQDataStream &stream,int msgid,Q_UINT32 sender
KGamePropertyBase* KPlayer::findProperty(int id) const
{
- return d->mProperties.find(id);
+ return d->mProperties.tqfind(id);
}
bool KPlayer::addProperty(KGamePropertyBase* data)
diff --git a/libkdegames/kgame/kplayer.h b/libkdegames/kgame/kplayer.h
index a2d78929..7ad23abc 100644
--- a/libkdegames/kgame/kplayer.h
+++ b/libkdegames/kgame/kplayer.h
@@ -58,7 +58,7 @@ class KPlayerPrivate;
* you gain a *very* big advantage: you can exchange a KGameIO whenever you
* want! You can e.g. remove the KGameIO of a local (human) player and just
* replace it by a computerIO on the fly! So from that point on all playerInputs
- * are done by the computerIO instead of the human player. You also can replace
+ * are done by the computerIO instead of the human player. You also can tqreplace
* all network players by computer players when the network connection is broken
* or a player wants to quit.
* So remember: use KGameIO whenever possible! A KPlayer should just
@@ -66,9 +66,10 @@ class KPlayerPrivate;
* functions which are shared by all of your KGameIOs.
*
*/
-class KDE_EXPORT KPlayer : public QObject
+class KDE_EXPORT KPlayer : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
typedef TQPtrList<KGameIO> KGameIOList;
@@ -184,14 +185,14 @@ public:
*
* @return the player id
*/
- Q_UINT32 id() const;
+ TQ_UINT32 id() const;
/* Set the players id. This is done automatically by
* the game object when adding a new player!
*
* @param i the player id
*/
- void setId(Q_UINT32 i);
+ void setId(TQ_UINT32 i);
/**
* Returns the user defined id of the player
@@ -333,12 +334,12 @@ public:
* KGame::playerInput() (if player=false, ie the message *was* sent through
* KGame::sendPlayerInput).
*/
- virtual bool forwardInput(TQDataStream &msg,bool transmit=true, Q_UINT32 sender=0);
+ virtual bool forwardInput(TQDataStream &msg,bool transmit=true, TQ_UINT32 sender=0);
/**
* Forwards Message to the game object..internal use only
*/
- virtual bool forwardMessage(TQDataStream &msg,int msgid,Q_UINT32 receiver=0,Q_UINT32 sender=0);
+ virtual bool forwardMessage(TQDataStream &msg,int msgid,TQ_UINT32 receiver=0,TQ_UINT32 sender=0);
// Game logic
/**
@@ -390,7 +391,7 @@ public:
* @param stream The message itself
* @param sender
**/
- void networkTransmission(TQDataStream &stream,int msgid,Q_UINT32 sender);
+ void networkTransmission(TQDataStream &stream,int msgid,TQ_UINT32 sender);
/**
* Searches for a property of the player given its id.
@@ -430,7 +431,7 @@ signals:
* means probably a user message. Connecting to this signal
* allowed to process it.
*/
- void signalNetworkData(int msgid, const TQByteArray& buffer, Q_UINT32 sender, KPlayer *me);
+ void signalNetworkData(int msgid, const TQByteArray& buffer, TQ_UINT32 sender, KPlayer *me);
/**
* This signal is emmited if a player property changes its value and
diff --git a/libkdegames/kgame/messages.txt b/libkdegames/kgame/messages.txt
index 151196d5..a2b58880 100644
--- a/libkdegames/kgame/messages.txt
+++ b/libkdegames/kgame/messages.txt
@@ -82,7 +82,7 @@ IdRemovePlayer Q_INT16 playerid
IdError Q_INT32 errorcode
QString errortext
-IdGameStatus Q_INT32 status
+IdGametqStatus Q_INT32 status
IdPlayerProperty Q_INT16 propertyId
user defined -> the property
diff --git a/libkdegames/kgamelcd.cpp b/libkdegames/kgamelcd.cpp
index c87930b5..cc6aa5a8 100644
--- a/libkdegames/kgamelcd.cpp
+++ b/libkdegames/kgamelcd.cpp
@@ -28,8 +28,8 @@
//-----------------------------------------------------------------------------
-KGameLCD::KGameLCD(uint nbDigits, TQWidget *parent, const char *name)
- : TQLCDNumber(nbDigits, parent, name), _htime(800)
+KGameLCD::KGameLCD(uint nbDigits, TQWidget *tqparent, const char *name)
+ : TQLCDNumber(nbDigits, tqparent, name), _htime(800)
{
const TQPalette &p = palette();
_fgColor = p.color(TQPalette::Active, TQColorGroup::Foreground);
@@ -110,8 +110,8 @@ void KGameLCD::highlight(bool light)
}
//-----------------------------------------------------------------------------
-KGameLCDClock::KGameLCDClock(TQWidget *parent, const char *name)
-: KGameLCD(5, parent, name)
+KGameLCDClock::KGameLCDClock(TQWidget *tqparent, const char *name)
+: KGameLCD(5, tqparent, name)
{
_timerClock = new TQTimer(this);
connect(_timerClock, TQT_SIGNAL(timeout()), TQT_SLOT(timeoutClock()));
@@ -191,17 +191,17 @@ public:
TQValueVector<TQLabel *> _leadings;
};
-KGameLCDList::KGameLCDList(const TQString &title, TQWidget *parent,
+KGameLCDList::KGameLCDList(const TQString &title, TQWidget *tqparent,
const char *name)
- : TQWidget(parent, name)
+ : TQWidget(tqparent, name)
{
init(title);
}
-KGameLCDList::KGameLCDList(TQWidget *parent, const char *name)
- : TQWidget(parent, name)
+KGameLCDList::KGameLCDList(TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
{
- init(TQString::null);
+ init(TQString());
}
KGameLCDList::~KGameLCDList()
@@ -217,13 +217,13 @@ void KGameLCDList::init(const TQString &title)
top->setColStretch(1, 1);
_title = new TQLabel(title, this);
- _title->setAlignment(AlignCenter);
+ _title->tqsetAlignment(AlignCenter);
top->addMultiCellWidget(_title, 0, 0, 0, 1, AlignCenter);
}
void KGameLCDList::append(TQLCDNumber *lcd)
{
- append(TQString::null, lcd);
+ append(TQString(), lcd);
}
void KGameLCDList::append(const TQString &leading, TQLCDNumber *lcd)
@@ -232,11 +232,11 @@ void KGameLCDList::append(const TQString &leading, TQLCDNumber *lcd)
TQLabel *label = 0;
if ( !leading.isEmpty() ) {
label = new TQLabel(leading, this);
- static_cast<TQGridLayout *>(layout())->addWidget(label, i+1, 0);
+ static_cast<TQGridLayout *>(tqlayout())->addWidget(label, i+1, 0);
}
d->_leadings.push_back(label);
_lcds.push_back(lcd);
- static_cast<TQGridLayout *>(layout())->addWidget(lcd, i+1, 1);
+ static_cast<TQGridLayout *>(tqlayout())->addWidget(lcd, i+1, 1);
}
void KGameLCDList::clear()
diff --git a/libkdegames/kgamelcd.h b/libkdegames/kgamelcd.h
index 214af1f5..543cfef5 100644
--- a/libkdegames/kgamelcd.h
+++ b/libkdegames/kgamelcd.h
@@ -39,11 +39,12 @@ class TQTimer;
*
* @since 3.2
*/
-class KDE_EXPORT KGameLCD : public QLCDNumber
+class KDE_EXPORT KGameLCD : public TQLCDNumber
{
Q_OBJECT
+ TQ_OBJECT
public:
- KGameLCD(uint nbDigits, TQWidget *parent = 0, const char *name = 0);
+ KGameLCD(uint nbDigits, TQWidget *tqparent = 0, const char *name = 0);
~KGameLCD();
@@ -86,7 +87,7 @@ public:
public slots:
/**
- * Highlight the LCD with the QColorGourp::HighlightedText color
+ * Highlight the LCD with the TQColorGourp::HighlightedText color
* for a small time (setHighlightTime).
*/
void highlight();
@@ -126,8 +127,9 @@ private:
class KDE_EXPORT KGameLCDClock : public KGameLCD
{
Q_OBJECT
+ TQ_OBJECT
public:
- KGameLCDClock(TQWidget *parent = 0, const char *name = 0);
+ KGameLCDClock(TQWidget *tqparent = 0, const char *name = 0);
~KGameLCDClock();
@@ -182,37 +184,38 @@ private:
//-----------------------------------------------------------------------------
/**
- * This widget holds a list of @ref TQLCDNumber arranged in a vertical layout.
+ * This widget holds a list of @ref TQLCDNumber arranged in a vertical tqlayout.
* It also shows a label at the top of the list.
*
* @since 3.2
*/
-class KDE_EXPORT KGameLCDList : public QWidget
+class KDE_EXPORT KGameLCDList : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
*
* @param title is the content of the top label.
- * @param parent passed to the TQWidget constructor
+ * @param tqparent passed to the TQWidget constructor
* @param name passed to the TQWidget constructor
*/
KGameLCDList(const TQString &title,
- TQWidget *parent = 0, const char *name = 0);
- KGameLCDList(TQWidget *parent = 0, const char *name = 0);
+ TQWidget *tqparent = 0, const char *name = 0);
+ KGameLCDList(TQWidget *tqparent = 0, const char *name = 0);
~KGameLCDList();
/**
* Append a TQLCDNumber at the bottom of the list.
- * The TQLCDNumber should have the KGameLCDList as parent.
+ * The TQLCDNumber should have the KGameLCDList as tqparent.
*/
void append(TQLCDNumber *lcd);
/**
* Append a TQLCDNumber at the bottom of the list.
- * The TQLCDNumber should have the KGameLCDList as parent.
+ * The TQLCDNumber should have the KGameLCDList as tqparent.
*/
void append(const TQString &leading, TQLCDNumber *lcd);
diff --git a/libkdegames/kgameprogress.cpp b/libkdegames/kgameprogress.cpp
index c9f122fb..7ed1728f 100644
--- a/libkdegames/kgameprogress.cpp
+++ b/libkdegames/kgameprogress.cpp
@@ -29,16 +29,16 @@
#include <kapplication.h>
-KGameProgress::KGameProgress(TQWidget *parent, const char *name)
- : TQFrame(parent, name),
+KGameProgress::KGameProgress(TQWidget *tqparent, const char *name)
+ : TQFrame(tqparent, name),
TQRangeControl(0, 100, 1, 10, 0),
- orient(Horizontal)
+ orient(Qt::Horizontal)
{
initialize();
}
-KGameProgress::KGameProgress(Orientation orientation, TQWidget *parent, const char *name)
- : TQFrame(parent, name),
+KGameProgress::KGameProgress(Qt::Orientation orientation, TQWidget *tqparent, const char *name)
+ : TQFrame(tqparent, name),
TQRangeControl(0, 100, 1, 10, 0),
orient(orientation)
{
@@ -46,8 +46,8 @@ KGameProgress::KGameProgress(Orientation orientation, TQWidget *parent, const ch
}
KGameProgress::KGameProgress(int minValue, int maxValue, int value,
- Orientation orientation, TQWidget *parent, const char *name)
- : TQFrame(parent, name),
+ Qt::Orientation orientation, TQWidget *tqparent, const char *name)
+ : TQFrame(tqparent, name),
TQRangeControl(minValue, maxValue, 1, 10, value),
orient(orientation)
{
@@ -79,11 +79,11 @@ void KGameProgress::initialize()
void KGameProgress::paletteChange()
{
TQPalette p = kapp->palette();
- const TQColorGroup &colorGroup = p.active();
+ const TQColorGroup &tqcolorGroup = p.active();
if (!use_supplied_bar_color)
- bar_color = colorGroup.highlight();
- bar_text_color = colorGroup.highlightedText();
- text_color = colorGroup.text();
+ bar_color = tqcolorGroup.highlight();
+ bar_text_color = tqcolorGroup.highlightedText();
+ text_color = tqcolorGroup.text();
setPalette(p);
adjustStyle();
@@ -118,7 +118,7 @@ void KGameProgress::setBarStyle(BarStyle style)
}
}
-void KGameProgress::setOrientation(Orientation orientation)
+void KGameProgress::setOrientation(Qt::Orientation orientation)
{
if (orient != orientation) {
orient = orientation;
@@ -151,11 +151,11 @@ bool KGameProgress::textEnabled() const
return text_enabled;
}
-TQSize KGameProgress::sizeHint() const
+TQSize KGameProgress::tqsizeHint() const
{
TQSize s( size() );
- if(orientation() == KGameProgress::Vertical) {
+ if(orientation() == Qt::Vertical) {
s.setWidth(24);
} else {
s.setHeight(24);
@@ -164,14 +164,14 @@ TQSize KGameProgress::sizeHint() const
return s;
}
-TQSize KGameProgress::minimumSizeHint() const
+TQSize KGameProgress::tqminimumSizeHint() const
{
- return sizeHint();
+ return tqsizeHint();
}
TQSizePolicy KGameProgress::sizePolicy() const
{
- if ( orientation()==KGameProgress::Vertical )
+ if ( orientation()==Qt::Vertical )
return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Expanding );
else
return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed );
@@ -196,13 +196,13 @@ int KGameProgress::recalcValue(int range)
void KGameProgress::valueChange()
{
- repaint(contentsRect(), FALSE);
+ tqrepaint(contentsRect(), FALSE);
emit percentageChanged(recalcValue(100));
}
void KGameProgress::rangeChange()
{
- repaint(contentsRect(), FALSE);
+ tqrepaint(contentsRect(), FALSE);
emit percentageChanged(recalcValue(100));
}
@@ -213,7 +213,7 @@ void KGameProgress::styleChange(TQStyle&)
void KGameProgress::adjustStyle()
{
- switch (style().styleHint(TQStyle::SH_GUIStyle)) {
+ switch (tqstyle().tqstyleHint(TQStyle::SH_GUIStyle)) {
case WindowsStyle:
setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
break;
@@ -242,9 +242,9 @@ void KGameProgress::drawText(TQPainter *p)
// the current value and the maximum value respectively.
TQString s(format_);
- s.replace(TQRegExp(TQString::fromLatin1("%p")), TQString::number(recalcValue(100)));
- s.replace(TQRegExp(TQString::fromLatin1("%v")), TQString::number(value()));
- s.replace(TQRegExp(TQString::fromLatin1("%m")), TQString::number(maxValue()));
+ s.tqreplace(TQRegExp(TQString::tqfromLatin1("%p")), TQString::number(recalcValue(100)));
+ s.tqreplace(TQRegExp(TQString::tqfromLatin1("%v")), TQString::number(value()));
+ s.tqreplace(TQRegExp(TQString::tqfromLatin1("%m")), TQString::number(maxValue()));
p->setPen(text_color);
TQFont font = p->font();
@@ -271,7 +271,7 @@ void KGameProgress::drawContents(TQPainter *p)
switch (bar_style) {
case Solid:
- if (orient == Horizontal) {
+ if (orient ==Qt::Horizontal) {
fr.setWidth(recalcValue(cr.width()));
er.setLeft(fr.right() + 1);
} else {
@@ -289,7 +289,7 @@ void KGameProgress::drawContents(TQPainter *p)
case Blocked:
const int margin = 2;
int max, num, dx, dy;
- if (orient == Horizontal) {
+ if (orient ==Qt::Horizontal) {
fr.setHeight(cr.height() - 2 * margin);
fr.setWidth((int)(0.67 * fr.height()));
fr.moveTopLeft(TQPoint(cr.left() + margin, cr.top() + margin));
@@ -315,7 +315,7 @@ void KGameProgress::drawContents(TQPainter *p)
}
if (num != max) {
- if (orient == Horizontal)
+ if (orient ==Qt::Horizontal)
er.setLeft(fr.right() + 1);
else
er.setBottom(fr.bottom() + 1);
diff --git a/libkdegames/kgameprogress.h b/libkdegames/kgameprogress.h
index d4cebe7b..087fc27b 100644
--- a/libkdegames/kgameprogress.h
+++ b/libkdegames/kgameprogress.h
@@ -47,16 +47,17 @@
* @author Martynas Kunigelis
* @version $Id$
*/
-class KDE_EXPORT KGameProgress : public TQFrame, public QRangeControl
+class KDE_EXPORT KGameProgress : public TQFrame, public TQRangeControl
{
Q_OBJECT
+ TQ_OBJECT
Q_ENUMS( BarStyle )
- Q_PROPERTY( int value READ value WRITE setValue)
- Q_PROPERTY( BarStyle barStyle READ barStyle WRITE setBarStyle )
- Q_PROPERTY( TQColor barColor READ barColor WRITE setBarColor )
- Q_PROPERTY( TQPixmap barPixmap READ barPixmap WRITE setBarPixmap )
- Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
- Q_PROPERTY( bool textEnabled READ textEnabled WRITE setTextEnabled )
+ TQ_PROPERTY( int value READ value WRITE setValue)
+ TQ_PROPERTY( BarStyle barStyle READ barStyle WRITE setBarStyle )
+ TQ_PROPERTY( TQColor barColor READ barColor WRITE setBarColor )
+ TQ_PROPERTY( TQPixmap barPixmap READ barPixmap WRITE setBarPixmap )
+ TQ_PROPERTY( Qt::Orientation orientation READ orientation WRITE setOrientation )
+ TQ_PROPERTY( bool textEnabled READ textEnabled WRITE setTextEnabled )
public:
/**
@@ -70,18 +71,18 @@ public:
/**
* Construct a horizontal progress bar.
*/
- KGameProgress(TQWidget *parent=0, const char *name=0);
+ KGameProgress(TQWidget *tqparent=0, const char *name=0);
/**
* Construct a progress bar with orientation @p orient.
*/
- KGameProgress(Orientation orient, TQWidget *parent=0, const char *name=0);
+ KGameProgress(Qt::Orientation orient, TQWidget *tqparent=0, const char *name=0);
/**
* Construct a progress bar with minimum, maximum and initial values.
*/
- KGameProgress(int minValue, int maxValue, int value, Orientation,
- TQWidget *parent=0, const char *name=0);
+ KGameProgress(int minValue, int maxValue, int value, Qt::Orientation,
+ TQWidget *tqparent=0, const char *name=0);
/**
* Destruct the progress bar.
@@ -108,9 +109,9 @@ public:
/**
* Set the orientation of the progress bar.
*
- * Allowed values are @p Horizontal and @p Vertical.
+ * Allowed values are @pQt::Horizontal and @pQt::Vertical.
*/
- void setOrientation(Orientation);
+ void setOrientation(Qt::Orientation);
/**
* If this is set to @p true, the progress text will be displayed.
@@ -149,7 +150,7 @@ public:
*
* @see setOrientation()
*/
- Orientation orientation() const;
+ Qt::Orientation orientation() const;
/**
* Returns @p true if progress text will be displayed,
@@ -161,11 +162,11 @@ public:
/**
*/
- virtual TQSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
/**
*/
- virtual TQSize minimumSizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
/**
*/
@@ -239,7 +240,7 @@ private:
TQColor text_color;
TQRect fr;
BarStyle bar_style;
- Orientation orient;
+ Qt::Orientation orient;
bool text_enabled;
TQString format_;
void initialize();
diff --git a/libkdegames/kgrid2d.h b/libkdegames/kgrid2d.h
index 22a3c19d..833db8ec 100644
--- a/libkdegames/kgrid2d.h
+++ b/libkdegames/kgrid2d.h
@@ -36,7 +36,7 @@ namespace KGrid2D
* This type represents coordinates on a bidimensionnal grid.
* @since 3.2
*/
- typedef QPair<int, int> Coord;
+ typedef TQPair<int, int> Coord;
/**
* This type represents a list of @ref Coord.
@@ -206,14 +206,14 @@ class Generic
template <class Type>
TQDataStream &operator <<(TQDataStream &s, const KGrid2D::Generic<Type> &m) {
- s << (Q_UINT32)m.width() << (Q_UINT32)m.height();
+ s << (TQ_UINT32)m.width() << (TQ_UINT32)m.height();
for (uint i=0; i<m.size(); i++) s << m[i];
return s;
}
template <class Type>
TQDataStream &operator >>(TQDataStream &s, KGrid2D::Generic<Type> &m) {
- Q_UINT32 w, h;
+ TQ_UINT32 w, h;
s >> w >> h;
m.resize(w, h);
for (uint i=0; i<m.size(); i++) s >> m[i];
@@ -498,9 +498,9 @@ class Hexagonal : public Generic<Type>, public HexagonalBase
CoordList n = neighbours(*it, insideOnly);
CoordList::const_iterator it2;
for (it2=n.begin(); it2!=n.end(); ++it2)
- if ( center.find(*it2)==center.end()
- && ring.find(*it2)==ring.end()
- && newRing.find(*it2)==newRing.end() )
+ if ( center.tqfind(*it2)==center.end()
+ && ring.tqfind(*it2)==ring.end()
+ && newRing.tqfind(*it2)==newRing.end() )
newRing.append(*it2);
center.append(*it);
}
diff --git a/libkdegames/kstdgameaction.cpp b/libkdegames/kstdgameaction.cpp
index f37af6cb..4eb54bba 100644
--- a/libkdegames/kstdgameaction.cpp
+++ b/libkdegames/kstdgameaction.cpp
@@ -33,10 +33,10 @@ KStdGameAction::~KStdGameAction()
{}
KAction *KStdGameAction::action(StdGameAction act_enum, const TQObject *recvr,
- const char *slot, KActionCollection *parent,
+ const char *slot, KActionCollection *tqparent,
const char *name)
{
- return create( act_enum, name, recvr, slot, parent );
+ return create( act_enum, name, recvr, slot, tqparent );
}
const char* KStdGameAction::stdName(StdGameAction act_enum)
@@ -64,18 +64,18 @@ const KStdGameActionInfo g_rgActionInfo[] = {
{ KStdGameAction::Save, KStdAccel::Save, 0, "game_save", I18N_NOOP("&Save"), 0, "filesave" },
{ KStdGameAction::SaveAs, KStdAccel::AccelNone, 0, "game_save_as", I18N_NOOP("Save &As..."), 0, "filesaveas" },
{ KStdGameAction::End, KStdAccel::End, 0, "game_end", I18N_NOOP("&End Game"), 0, "fileclose" },
- { KStdGameAction::Pause, KStdAccel::AccelNone, Qt::Key_P, "game_pause", I18N_NOOP("Pa&use"), 0, "player_pause" },
- { KStdGameAction::Highscores, KStdAccel::AccelNone, Qt::CTRL+Qt::Key_H, "game_highscores", I18N_NOOP("Show &Highscores"), 0, "highscore" },
+ { KStdGameAction::Pause, KStdAccel::AccelNone, TQt::Key_P, "game_pause", I18N_NOOP("Pa&use"), 0, "player_pause" },
+ { KStdGameAction::Highscores, KStdAccel::AccelNone, TQt::CTRL+TQt::Key_H, "game_highscores", I18N_NOOP("Show &Highscores"), 0, "highscore" },
{ KStdGameAction::Print, KStdAccel::Print, 0, "game_print", I18N_NOOP("&Print..."), 0, "fileprint" },
{ KStdGameAction::Quit, KStdAccel::Quit, 0, "game_quit", I18N_NOOP("&Quit"), 0, "exit" },
// "move" menu
{ KStdGameAction::Repeat, KStdAccel::AccelNone, 0, "move_repeat", I18N_NOOP("Repeat"), 0, 0 },
{ KStdGameAction::Undo, KStdAccel::Undo, 0, "move_undo", I18N_NOOP("Und&o"), 0, "undo" },
{ KStdGameAction::Redo, KStdAccel::Redo, 0, "move_redo", I18N_NOOP("Re&do"), 0, "redo" },
- { KStdGameAction::Roll, KStdAccel::AccelNone, Qt::CTRL+Qt::Key_R, "move_roll", I18N_NOOP("&Roll Dice"), 0, "roll" },
+ { KStdGameAction::Roll, KStdAccel::AccelNone, TQt::CTRL+TQt::Key_R, "move_roll", I18N_NOOP("&Roll Dice"), 0, "roll" },
{ KStdGameAction::EndTurn, KStdAccel::AccelNone, 0, "move_end_turn", I18N_NOOP("End Turn"), 0, "endturn" },
- { KStdGameAction::Hint, KStdAccel::AccelNone, Qt::Key_H, "move_hint", I18N_NOOP("&Hint"), 0, "idea" },
- { KStdGameAction::Demo, KStdAccel::AccelNone, Qt::Key_D, "move_demo", I18N_NOOP("&Demo"), 0, "1rightarrow" },
+ { KStdGameAction::Hint, KStdAccel::AccelNone, TQt::Key_H, "move_hint", I18N_NOOP("&Hint"), 0, "idea" },
+ { KStdGameAction::Demo, KStdAccel::AccelNone, TQt::Key_D, "move_demo", I18N_NOOP("&Demo"), 0, "1rightarrow" },
{ KStdGameAction::Solve, KStdAccel::AccelNone, 0, "move_solve", I18N_NOOP("&Solve"), 0, "wizard" },
// "settings" menu
{ KStdGameAction::ChooseGameType, KStdAccel::AccelNone, 0, "options_choose_game_type", I18N_NOOP("Choose Game &Type"), 0, 0 },
@@ -97,11 +97,11 @@ static const KStdGameActionInfo* infoPtr( KStdGameAction::StdGameAction id )
KAction* KStdGameAction::create(StdGameAction id, const char *name,
const TQObject *recvr, const char *slot,
- KActionCollection* parent )
+ KActionCollection* tqparent )
{
KAction* pAction = 0;
const KStdGameActionInfo* pInfo = infoPtr( id );
- kdDebug(125) << "KStdGameAction::create( " << id << "=" << (pInfo ? pInfo->psName : (const char*)0) << ", " << parent << ", " << name << " )" << endl;
+ kdDebug(125) << "KStdGameAction::create( " << id << "=" << (pInfo ? pInfo->psName : (const char*)0) << ", " << tqparent << ", " << name << " )" << endl;
if( pInfo ) {
TQString sLabel = i18n(pInfo->psLabel);
KShortcut cut = (pInfo->globalAccel==KStdAccel::AccelNone
@@ -111,20 +111,20 @@ KAction* KStdGameAction::create(StdGameAction id, const char *name,
switch( id ) {
case LoadRecent:
pAction =
- new KRecentFilesAction(sLabel, cut, recvr, slot, parent, n);
+ new KRecentFilesAction(sLabel, cut, recvr, slot, tqparent, n);
break;
case Pause:
case Demo:
pAction = new KToggleAction( sLabel, pInfo->psIconName, cut,
- recvr, slot, parent, n);
+ recvr, slot, tqparent, n);
break;
case ChooseGameType:
pAction = new KSelectAction( sLabel, pInfo->psIconName, cut,
- recvr, slot, parent, n);
+ recvr, slot, tqparent, n);
break;
default:
pAction = new KAction( sLabel, pInfo->psIconName, cut,
- recvr, slot, parent, n);
+ recvr, slot, tqparent, n);
break;
}
}
@@ -138,72 +138,72 @@ const char* KStdGameAction::name( StdGameAction id )
}
KAction *KStdGameAction::gameNew(const TQObject *recvr, const char *slot,
- KActionCollection *parent, const char *name )
-{ return KStdGameAction::create(New, name, recvr, slot, parent); }
+ KActionCollection *tqparent, const char *name )
+{ return KStdGameAction::create(New, name, recvr, slot, tqparent); }
KAction *KStdGameAction::load(const TQObject *recvr, const char *slot,
- KActionCollection *parent, const char *name )
-{ return KStdGameAction::create(Load, name, recvr, slot, parent); }
+ KActionCollection *tqparent, const char *name )
+{ return KStdGameAction::create(Load, name, recvr, slot, tqparent); }
KRecentFilesAction *KStdGameAction::loadRecent(const TQObject *recvr, const char *slot,
- KActionCollection *parent, const char *name )
-{ return static_cast<KRecentFilesAction *>(KStdGameAction::create(LoadRecent, name, recvr, slot, parent)); }
+ KActionCollection *tqparent, const char *name )
+{ return static_cast<KRecentFilesAction *>(KStdGameAction::create(LoadRecent, name, recvr, slot, tqparent)); }
KAction *KStdGameAction::save(const TQObject *recvr, const char *slot,
- KActionCollection *parent, const char *name )
-{ return KStdGameAction::create(Save, name, recvr, slot, parent); }
+ KActionCollection *tqparent, const char *name )
+{ return KStdGameAction::create(Save, name, recvr, slot, tqparent); }
KAction *KStdGameAction::saveAs(const TQObject *recvr, const char *slot,
- KActionCollection *parent, const char *name )
-{ return KStdGameAction::create(SaveAs, name, recvr, slot, parent); }
+ KActionCollection *tqparent, const char *name )
+{ return KStdGameAction::create(SaveAs, name, recvr, slot, tqparent); }
KAction *KStdGameAction::end(const TQObject *recvr, const char *slot,
- KActionCollection *parent, const char *name )
-{ return KStdGameAction::create(End, name, recvr, slot, parent); }
+ KActionCollection *tqparent, const char *name )
+{ return KStdGameAction::create(End, name, recvr, slot, tqparent); }
KToggleAction *KStdGameAction::pause(const TQObject *recvr, const char *slot,
- KActionCollection *parent, const char *name )
-{ return static_cast<KToggleAction *>(KStdGameAction::create(Pause, name, recvr, slot, parent)); }
+ KActionCollection *tqparent, const char *name )
+{ return static_cast<KToggleAction *>(KStdGameAction::create(Pause, name, recvr, slot, tqparent)); }
KAction *KStdGameAction::highscores(const TQObject *recvr, const char *slot,
- KActionCollection *parent, const char *name )
-{ return KStdGameAction::create(Highscores, name, recvr, slot, parent); }
+ KActionCollection *tqparent, const char *name )
+{ return KStdGameAction::create(Highscores, name, recvr, slot, tqparent); }
KAction *KStdGameAction::print(const TQObject *recvr, const char *slot,
- KActionCollection *parent, const char *name )
-{ return KStdGameAction::create(Print, name, recvr, slot, parent); }
+ KActionCollection *tqparent, const char *name )
+{ return KStdGameAction::create(Print, name, recvr, slot, tqparent); }
KAction *KStdGameAction::quit(const TQObject *recvr, const char *slot,
- KActionCollection *parent, const char *name )
-{ return KStdGameAction::create(Quit, name, recvr, slot, parent); }
+ KActionCollection *tqparent, const char *name )
+{ return KStdGameAction::create(Quit, name, recvr, slot, tqparent); }
KAction *KStdGameAction::repeat(const TQObject *recvr, const char *slot,
- KActionCollection *parent, const char *name )
-{ return KStdGameAction::create(Repeat, name, recvr, slot, parent); }
+ KActionCollection *tqparent, const char *name )
+{ return KStdGameAction::create(Repeat, name, recvr, slot, tqparent); }
KAction *KStdGameAction::undo(const TQObject *recvr, const char *slot,
- KActionCollection *parent, const char *name )
-{ return KStdGameAction::create(Undo, name, recvr, slot, parent); }
+ KActionCollection *tqparent, const char *name )
+{ return KStdGameAction::create(Undo, name, recvr, slot, tqparent); }
KAction *KStdGameAction::redo(const TQObject *recvr, const char *slot,
- KActionCollection *parent, const char *name )
-{ return KStdGameAction::create(Redo, name, recvr, slot, parent); }
+ KActionCollection *tqparent, const char *name )
+{ return KStdGameAction::create(Redo, name, recvr, slot, tqparent); }
KAction *KStdGameAction::roll(const TQObject *recvr, const char *slot,
- KActionCollection *parent, const char *name )
-{ return KStdGameAction::create(Roll, name, recvr, slot, parent); }
+ KActionCollection *tqparent, const char *name )
+{ return KStdGameAction::create(Roll, name, recvr, slot, tqparent); }
KAction *KStdGameAction::endTurn(const TQObject *recvr, const char *slot,
- KActionCollection *parent, const char *name )
-{ return KStdGameAction::create(EndTurn, name, recvr, slot, parent); }
+ KActionCollection *tqparent, const char *name )
+{ return KStdGameAction::create(EndTurn, name, recvr, slot, tqparent); }
KAction *KStdGameAction::carddecks(const TQObject *recvr, const char *slot,
- KActionCollection *parent, const char *name )
-{ return KStdGameAction::create(Carddecks, name, recvr, slot, parent); }
+ KActionCollection *tqparent, const char *name )
+{ return KStdGameAction::create(Carddecks, name, recvr, slot, tqparent); }
KAction *KStdGameAction::configureHighscores(const TQObject*recvr, const char *slot,
- KActionCollection *parent, const char *name)
-{ return KStdGameAction::create(ConfigureHighscores, name, recvr, slot, parent); }
+ KActionCollection *tqparent, const char *name)
+{ return KStdGameAction::create(ConfigureHighscores, name, recvr, slot, tqparent); }
KAction *KStdGameAction::hint(const TQObject*recvr, const char *slot,
- KActionCollection *parent, const char *name)
-{ return KStdGameAction::create(Hint, name, recvr, slot, parent); }
+ KActionCollection *tqparent, const char *name)
+{ return KStdGameAction::create(Hint, name, recvr, slot, tqparent); }
KToggleAction *KStdGameAction::demo(const TQObject*recvr, const char *slot,
- KActionCollection *parent, const char *name)
-{ return static_cast<KToggleAction *>(KStdGameAction::create(Demo, name, recvr, slot, parent)); }
+ KActionCollection *tqparent, const char *name)
+{ return static_cast<KToggleAction *>(KStdGameAction::create(Demo, name, recvr, slot, tqparent)); }
KAction *KStdGameAction::solve(const TQObject*recvr, const char *slot,
- KActionCollection *parent, const char *name)
-{ return KStdGameAction::create(Solve, name, recvr, slot, parent); }
+ KActionCollection *tqparent, const char *name)
+{ return KStdGameAction::create(Solve, name, recvr, slot, tqparent); }
KSelectAction *KStdGameAction::chooseGameType(const TQObject*recvr, const char *slot,
- KActionCollection *parent, const char *name)
-{ return static_cast<KSelectAction *>(KStdGameAction::create(ChooseGameType, name, recvr, slot, parent)); }
+ KActionCollection *tqparent, const char *name)
+{ return static_cast<KSelectAction *>(KStdGameAction::create(ChooseGameType, name, recvr, slot, tqparent)); }
KAction *KStdGameAction::restart(const TQObject*recvr, const char *slot,
- KActionCollection *parent, const char *name)
-{ return KStdGameAction::create(Restart, name, recvr, slot, parent); }
+ KActionCollection *tqparent, const char *name)
+{ return KStdGameAction::create(Restart, name, recvr, slot, tqparent); }
diff --git a/libkdegames/kstdgameaction.h b/libkdegames/kstdgameaction.h
index 3ef24dc2..cae5d81c 100644
--- a/libkdegames/kstdgameaction.h
+++ b/libkdegames/kstdgameaction.h
@@ -79,15 +79,15 @@ public:
*/
static KAction* create( StdGameAction id, const char *name,
const TQObject *recvr, const char *slot,
- KActionCollection* parent );
+ KActionCollection* tqparent );
/**
* @since 3.2
*/
static KAction* create( StdGameAction id,
const TQObject *recvr, const char *slot,
- KActionCollection* parent )
- { return create( id, 0, recvr, slot, parent ); }
+ KActionCollection* tqparent )
+ { return create( id, 0, recvr, slot, tqparent ); }
/**
@@ -96,7 +96,7 @@ public:
* @deprecated
*/
static KAction *action(StdGameAction act_enum, const TQObject *recvr = 0,
- const char *slot = 0, KActionCollection *parent = 0,
+ const char *slot = 0, KActionCollection *tqparent = 0,
const char *name = 0L );
/**
@@ -115,43 +115,43 @@ public:
* Start a new game
**/
static KAction *gameNew(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* Load a previousely saved game
*/
static KAction *load(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* Load a recently loaded game.
*/
static KRecentFilesAction *loadRecent(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* Save the current game.
*/
static KAction *save(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* Save the current game under a different filename.
*/
static KAction *saveAs(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* Pause the game
**/
static KToggleAction *pause(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* Show the highscores.
*/
static KAction *highscores(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
@@ -159,20 +159,20 @@ public:
* entry.
*/
static KAction *end(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* Print the current screen? Game? Whatever - hardly used in games but there
* is at least one example (ktuberling)
*/
static KAction *print(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* Quit the game.
*/
static KAction *quit(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
@@ -180,81 +180,81 @@ public:
* Repeat the last move.
**/
static KAction *repeat(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* Undo the last move
**/
static KAction *undo(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* Redo the last move (which has been undone)
**/
static KAction *redo(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* Roll die or dice
**/
static KAction *roll(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* End the current turn (not the game). Usually to let the next player
* start
**/
static KAction *endTurn(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* Display configure carddecks dialog.
*/
static KAction *carddecks(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* Display configure highscores dialog.
* @since 3.2
*/
static KAction *configureHighscores(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* Give an advice/hint.
* @since 3.2
*/
static KAction *hint(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* Show a demo.
* @since 3.2
*/
static KToggleAction *demo(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* Solve the game.
* @since 3.2
*/
static KAction *solve(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* Choose game type.
* @since 3.2
*/
static KSelectAction *chooseGameType(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
/**
* Restart game.
* @since 3.2
*/
static KAction *restart(const TQObject *recvr = 0, const char *slot = 0,
- KActionCollection *parent = 0, const char *name = 0L );
+ KActionCollection *tqparent = 0, const char *name = 0L );
};