From 503fddb48f2229ecc6ed6930a99c4d740ff979e5 Mon Sep 17 00:00:00 2001
From: gregory guy
Date: Mon, 17 Aug 2020 20:03:11 +0200
Subject: Second step, convert to tqt3 libraries.
Signed-off-by: gregory guy
---
acinclude.m4 | 44 ++--
aclocal.m4 | 44 ++--
configure | 54 ++---
doc/de/kpacman-2.html | 2 +-
doc/en/index.docbook | 12 +-
kpacman-api/Kpacman.html | 6 +-
kpacman-api/full-list-Kpacman.html | 406 ++++++++++++++++++-------------------
kpacman-api/hier.html | 2 +-
kpacman-api/kpacman_h.html | 6 +-
kpacman/bitfont.cpp | 14 +-
kpacman/bitfont.h | 16 +-
kpacman/board.cpp | 34 ++--
kpacman/board.h | 16 +-
kpacman/colors.h | 28 +--
kpacman/keys.cpp | 68 +++----
kpacman/keys.h | 20 +-
kpacman/kpacman.cpp | 30 +--
kpacman/kpacman.h | 20 +-
kpacman/kpacmanview.cpp | 22 +-
kpacman/kpacmanview.h | 16 +-
kpacman/monster.h | 4 +-
kpacman/pacman.h | 4 +-
kpacman/painter.cpp | 174 ++++++++--------
kpacman/painter.h | 156 +++++++-------
kpacman/referee.cpp | 152 +++++++-------
kpacman/referee.h | 88 ++++----
kpacman/score.cpp | 126 ++++++------
kpacman/score.h | 50 ++---
kpacman/status.cpp | 70 +++----
kpacman/status.h | 50 ++---
po/es.gmo | Bin 5455 -> 5458 bytes
po/es.po | 10 +-
32 files changed, 872 insertions(+), 872 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index dfde28b..5ca38c0 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1043,19 +1043,19 @@ AC_DEFUN(KDE_PRINT_QT_PROGRAM,
AC_REQUIRE([KDE_USE_QT])
cat > conftest.$ac_ext <
-#include
+#include
+#include
EOF
if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <
-#include
-#include
+#include
+#include
+#include
EOF
if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <> conftest.$ac_ext <
-#include
+#include
+#include
#include
EOF
fi
@@ -1144,20 +1144,20 @@ fi
if test -z "$3"; then
if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; then
- kde_qt_verstring="QT_VERSION >= 0x030100"
+ kde_qt_verstring="TQT_VERSION >= 0x030100"
else
- kde_qt_verstring="QT_VERSION >= 300"
+ kde_qt_verstring="TQT_VERSION >= 300"
fi
fi
if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then
- kde_qt_verstring="QT_VERSION >= 222"
+ kde_qt_verstring="TQT_VERSION >= 222"
else
- kde_qt_verstring="QT_VERSION >= 200"
+ kde_qt_verstring="TQT_VERSION >= 200"
fi
fi
if test $kde_qtver = 1; then
- kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
+ kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200"
fi
else
kde_qt_verstring=$3
@@ -1263,7 +1263,7 @@ AC_ARG_ENABLE(
USING_QT_MT=""
dnl ------------------------------------------------------------------------
-dnl If we not get --disable-qt-mt then adjust some vars for the host.
+dnl If we not get --disable-tqt-mt then adjust some vars for the host.
dnl ------------------------------------------------------------------------
KDE_MT_LDFLAGS=
@@ -1326,7 +1326,7 @@ dnl ------------------------------------------------------------
fi
dnl ------------------------------------------------------------------------
-dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
+dnl If we got --enable-tqt-mt then adjust the Qt library name for the host.
dnl ------------------------------------------------------------------------
if test "x$kde_use_qt_mt" = "xyes"; then
@@ -1397,9 +1397,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi
if test "$kde_qtver" != "1"; then
- kde_qt_header=qstyle.h
+ kde_qt_header=ntqstyle.h
else
- kde_qt_header=qglobal.h
+ kde_qt_header=ntqglobal.h
fi
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
@@ -1896,7 +1896,7 @@ AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
AC_TRY_LINK([
- #include
+ #include
],
[
QDomDocument doc;
@@ -2436,7 +2436,7 @@ LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK(
-[#include ],
+[#include ],
[
int argc;
char** argv;
@@ -4270,7 +4270,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl
[
#include
-#include
+#include
int main() {
QString t = "hallo";
t.fill('t');
@@ -5070,7 +5070,7 @@ if test "${with_qt_dir+set}" = set; then
kde_qtdir="$with_qt_dir"
fi
-AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html ], QTDOCDIR)
+AC_FIND_FILE(ntqsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html ], QTDOCDIR)
AC_MSG_RESULT($QTDOCDIR)
AC_SUBST(QTDOCDIR)
@@ -5091,7 +5091,7 @@ AC_SUBST(DOXYGEN_PROJECT_NAME)
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
KDE_HAS_DOXYGEN=no
-if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
+if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/ntqsql.html; then
KDE_HAS_DOXYGEN=yes
fi
AC_SUBST(KDE_HAS_DOXYGEN)
diff --git a/aclocal.m4 b/aclocal.m4
index b99dd24..0628e4a 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1055,19 +1055,19 @@ AC_DEFUN(KDE_PRINT_QT_PROGRAM,
AC_REQUIRE([KDE_USE_QT])
cat > conftest.$ac_ext <
-#include
+#include
+#include
EOF
if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <
-#include
-#include
+#include
+#include
+#include
EOF
if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <> conftest.$ac_ext <
-#include
+#include
+#include
#include
EOF
fi
@@ -1156,20 +1156,20 @@ fi
if test -z "$3"; then
if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; then
- kde_qt_verstring="QT_VERSION >= 0x030100"
+ kde_qt_verstring="TQT_VERSION >= 0x030100"
else
- kde_qt_verstring="QT_VERSION >= 300"
+ kde_qt_verstring="TQT_VERSION >= 300"
fi
fi
if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then
- kde_qt_verstring="QT_VERSION >= 222"
+ kde_qt_verstring="TQT_VERSION >= 222"
else
- kde_qt_verstring="QT_VERSION >= 200"
+ kde_qt_verstring="TQT_VERSION >= 200"
fi
fi
if test $kde_qtver = 1; then
- kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
+ kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200"
fi
else
kde_qt_verstring=$3
@@ -1275,7 +1275,7 @@ AC_ARG_ENABLE(
USING_QT_MT=""
dnl ------------------------------------------------------------------------
-dnl If we not get --disable-qt-mt then adjust some vars for the host.
+dnl If we not get --disable-tqt-mt then adjust some vars for the host.
dnl ------------------------------------------------------------------------
KDE_MT_LDFLAGS=
@@ -1338,7 +1338,7 @@ dnl ------------------------------------------------------------
fi
dnl ------------------------------------------------------------------------
-dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
+dnl If we got --enable-tqt-mt then adjust the Qt library name for the host.
dnl ------------------------------------------------------------------------
if test "x$kde_use_qt_mt" = "xyes"; then
@@ -1409,9 +1409,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi
if test "$kde_qtver" != "1"; then
- kde_qt_header=qstyle.h
+ kde_qt_header=ntqstyle.h
else
- kde_qt_header=qglobal.h
+ kde_qt_header=ntqglobal.h
fi
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
@@ -1908,7 +1908,7 @@ AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
AC_TRY_LINK([
- #include
+ #include
],
[
QDomDocument doc;
@@ -2448,7 +2448,7 @@ LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK(
-[#include ],
+[#include ],
[
int argc;
char** argv;
@@ -4282,7 +4282,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl
[
#include
-#include
+#include
int main() {
QString t = "hallo";
t.fill('t');
@@ -5082,7 +5082,7 @@ if test "${with_qt_dir+set}" = set; then
kde_qtdir="$with_qt_dir"
fi
-AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html ], QTDOCDIR)
+AC_FIND_FILE(ntqsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html ], QTDOCDIR)
AC_MSG_RESULT($QTDOCDIR)
AC_SUBST(QTDOCDIR)
@@ -5103,7 +5103,7 @@ AC_SUBST(DOXYGEN_PROJECT_NAME)
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
KDE_HAS_DOXYGEN=no
-if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
+if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/ntqsql.html; then
KDE_HAS_DOXYGEN=yes
fi
AC_SUBST(KDE_HAS_DOXYGEN)
diff --git a/configure b/configure
index 357a3a6..742f249 100755
--- a/configure
+++ b/configure
@@ -683,7 +683,7 @@ do
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ -q | -quiet | --quiet | --tquie | --tqui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
@@ -1212,7 +1212,7 @@ do
do
case $ac_arg in
-no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ -q | -quiet | --quiet | --tquie | --tqui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
@@ -16853,20 +16853,20 @@ fi
if test -z ""; then
if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; then
- kde_qt_verstring="QT_VERSION >= 0x030100"
+ kde_qt_verstring="TQT_VERSION >= 0x030100"
else
- kde_qt_verstring="QT_VERSION >= 300"
+ kde_qt_verstring="TQT_VERSION >= 300"
fi
fi
if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then
- kde_qt_verstring="QT_VERSION >= 222"
+ kde_qt_verstring="TQT_VERSION >= 222"
else
- kde_qt_verstring="QT_VERSION >= 200"
+ kde_qt_verstring="TQT_VERSION >= 200"
fi
fi
if test $kde_qtver = 1; then
- kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
+ kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200"
fi
else
kde_qt_verstring=
@@ -22137,9 +22137,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi
if test "$kde_qtver" != "1"; then
- kde_qt_header=qstyle.h
+ kde_qt_header=ntqstyle.h
else
- kde_qt_header=qglobal.h
+ kde_qt_header=ntqglobal.h
fi
@@ -22202,19 +22202,19 @@ LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
cat > conftest.$ac_ext <
-#include
+#include
+#include
EOF
if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <
-#include
-#include
+#include
+#include
+#include
EOF
if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <> conftest.$ac_ext <
-#include
+#include
+#include
#include
EOF
fi
@@ -22371,19 +22371,19 @@ export LIBRARY_PATH
cat > conftest.$ac_ext <
-#include
+#include
+#include
EOF
if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <
-#include
-#include
+#include
+#include
+#include
EOF
if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <> conftest.$ac_ext <
-#include
+#include
+#include
#include
EOF
fi
@@ -22788,7 +22788,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include
+#include
int
main ()
{
@@ -24875,7 +24875,7 @@ Try \`$0 --help' for more information." >&2;}
$ac_shift
CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ -q | -quiet | --quiet | --tquie | --tqui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
diff --git a/doc/de/kpacman-2.html b/doc/de/kpacman-2.html
index 3a00f9b..c051b53 100644
--- a/doc/de/kpacman-2.html
+++ b/doc/de/kpacman-2.html
@@ -35,7 +35,7 @@ Sie finden KPacman auf 2.2 Anforderungen
Um KPacman erfolgreich compileren zu können, benötigen Sie die
Version 1.0 der KDE Libraries oder spätere und die Version 1.33 der
-Qt Libraries oder spätere. Alle benötigten Libraries für
+TQt Libraries oder spätere. Alle benötigten Libraries für
Ihr spefizisches System finden Sie auf ftp://ftp.kde.org/pub/kde/stable/latest/distribution
und ftp::/ftp.kde.org/pub/qt.
diff --git a/doc/en/index.docbook b/doc/en/index.docbook
index b01b1fd..be93a99 100644
--- a/doc/en/index.docbook
+++ b/doc/en/index.docbook
@@ -156,17 +156,17 @@ patent issues. -->
It slices! It dices! and it comes with a free toaster!
-The Squiggle Tool
+The Stquiggle Tool
-
+
-
+
- Squiggle
+ Stquiggle
- is used to draw squiggly lines all over
+ is used to draw stquiggly lines all over
the &kpacman; main window. It's not a bug, it's a feature!
@@ -302,7 +302,7 @@ Program copyright 1997 John Q. Hacker jqh@kde.org
Contributors:
-Konqui the KDE Dragon konqui@kde.org
+Kontqui the KDE Dragon konqui@kde.org
Tux the Linux Penguin tux@linux.org
diff --git a/kpacman-api/Kpacman.html b/kpacman-api/Kpacman.html
index 5f5efe7..5127d4b 100644
--- a/kpacman-api/Kpacman.html
+++ b/kpacman-api/Kpacman.html
@@ -22,7 +22,7 @@
@@ -32,7 +32,7 @@
Hierarchy |
Index |
-Public Methods
- Kpacman (QWidget* parent=0, const char *name=0)
+
Public Methods
- Kpacman (TQWidget* parent=0, const char *name=0)
- ~Kpacman ()
@@ -44,7 +44,7 @@
(at your option) any later version. *
*
*************************************************************************
- Kpacman (QWidget* parent=0, const char *name=0)
+ Kpacman (TQWidget* parent=0, const char *name=0)
| Kpacman |
diff --git a/kpacman-api/full-list-Kpacman.html b/kpacman-api/full-list-Kpacman.html
index 8cb6544..12b336a 100644
--- a/kpacman-api/full-list-Kpacman.html
+++ b/kpacman-api/full-list-Kpacman.html
@@ -26,209 +26,209 @@
Index |
|
diff --git a/kpacman-api/hier.html b/kpacman-api/hier.html
index 5b6341d..2698a4a 100644
--- a/kpacman-api/hier.html
+++ b/kpacman-api/hier.html
@@ -25,7 +25,7 @@
Hierarchy |
Index |
-- QWidget (qt)
+
diff --git a/kpacman-api/kpacman_h.html b/kpacman-api/kpacman_h.html
index e6cd156..ecd4846 100644
--- a/kpacman-api/kpacman_h.html
+++ b/kpacman-api/kpacman_h.html
@@ -51,15 +51,15 @@
#endif
#include
-#include
+#include
/** Kpacman is the base class of the project */
-class Kpacman : public QWidget
+class Kpacman : public TQWidget
{
Q_OBJECT
public:
/** construtor */
- Kpacman(QWidget* parent=0, const char *name=0);
+ Kpacman(TQWidget* parent=0, const char *name=0);
/** destructor */
~Kpacman();
};
diff --git a/kpacman/bitfont.cpp b/kpacman/bitfont.cpp
index 40581c8..91b4baa 100644
--- a/kpacman/bitfont.cpp
+++ b/kpacman/bitfont.cpp
@@ -1,6 +1,6 @@
#include "bitfont.h"
-Bitfont::Bitfont(QString fontname, uchar firstChar, uchar lastChar)
+Bitfont::Bitfont(TQString fontname, uchar firstChar, uchar lastChar)
{
if (!fontname.isEmpty())
font.load(fontname);
@@ -16,15 +16,15 @@ Bitfont::Bitfont(QString fontname, uchar firstChar, uchar lastChar)
}
}
-QRect Bitfont::rect(QString str)
+TQRect Bitfont::rect(TQString str)
{
- return QRect(0, 0, str.length()*fontWidth, fontHeight);
+ return TQRect(0, 0, str.length()*fontWidth, fontHeight);
}
-QPixmap Bitfont::text(QString str, QColor fg, QColor bg)
+TQPixmap Bitfont::text(TQString str, TQColor fg, TQColor bg)
{
- QPixmap FG(str.length()*fontWidth, fontHeight);
- QBitmap MASK(str.length()*fontWidth, fontHeight, TRUE);
+ TQPixmap FG(str.length()*fontWidth, fontHeight);
+ TQBitmap MASK(str.length()*fontWidth, fontHeight, TRUE);
const uchar *s = (const uchar *) str.data();
for (uint i = 0; i < str.length(); i++) {
@@ -42,7 +42,7 @@ QPixmap Bitfont::text(QString str, QColor fg, QColor bg)
FG.setMask(MASK);
if (bg.isValid()) {
- QPixmap BG(str.length()*fontWidth, fontHeight);
+ TQPixmap BG(str.length()*fontWidth, fontHeight);
BG.fill(bg);
bitBlt(&BG, 0, 0, &FG);
return BG;
diff --git a/kpacman/bitfont.h b/kpacman/bitfont.h
index c12aa0f..5976a51 100644
--- a/kpacman/bitfont.h
+++ b/kpacman/bitfont.h
@@ -1,26 +1,26 @@
#ifndef BITFONT_H
#define BITFONT_H
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
#include "colors.h"
class Bitfont
{
public:
- Bitfont(QString fontname, uchar firstChar, uchar lastChar);
+ Bitfont(TQString fontname, uchar firstChar, uchar lastChar);
- QPixmap text(QString str, QColor fg = BLACK, QColor bg = QColor());
- QRect rect(QString str);
+ TQPixmap text(TQString str, TQColor fg = BLACK, TQColor bg = TQColor());
+ TQRect rect(TQString str);
int width();
int height();
uchar firstChar();
uchar lastChar();
private:
- QBitmap font;
+ TQBitmap font;
int fontWidth;
int fontHeight;
uchar fontFirstChar;
diff --git a/kpacman/board.cpp b/kpacman/board.cpp
index 5a30994..1f98f7f 100644
--- a/kpacman/board.cpp
+++ b/kpacman/board.cpp
@@ -1,16 +1,16 @@
#include
#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
#include "board.h"
#include "bitmaps.h"
-Board::Board(int size) : QArray (size)
+Board::Board(int size) : TQArray (size)
{
sz = size; // set size of board
@@ -20,7 +20,7 @@ Board::Board(int size) : QArray (size)
init(None); // initialize varibales
}
-void Board::init(Image image, QString levelName)
+void Board::init(Image image, TQString levelName)
{
prisonEntry = OUT;
prisonExit = OUT;
@@ -49,28 +49,28 @@ void Board::init(Image image, QString levelName)
if (mapName == levelName)
image = File;
else {
- QFile levelFile(levelName);
+ TQFile levelFile(levelName);
if (!levelFile.open(IO_ReadOnly)) {
- QString msg = i18n("The levelmap could not be constructed.\n\n"
+ TQString msg = i18n("The levelmap could not be constructed.\n\n"
"The file '@LEVELNAME@' does not exist,\n"
"or could not be opened for reading.");
- msg.replace(QRegExp("@LEVELNAME@"), levelName);
- // QMessageBox::information(0, i18n("Initialization Error"), msg);
+ msg.replace(TQRegExp("@LEVELNAME@"), levelName);
+ // TQMessageBox::information(0, i18n("Initialization Error"), msg);
printf("%s\n", msg.data());
} else {
map.fill(' ', BoardHeight*BoardWidth);
int height = 0;
- QTextStream levelStream(&levelFile);
+ TQTextStream levelStream(&levelFile);
while (!levelStream.eof() && height < BoardHeight) {
- QString line = levelStream.readLine();
+ TQString line = levelStream.readLine();
- if (line.find(QRegExp("^ *;")) == -1) {
+ if (line.find(TQRegExp("^ *;")) == -1) {
- line.replace(QRegExp(";.*"), ""); // strip off comments
- line.replace(QRegExp("\" *$"), ""); // strip off trailing "
- line.replace(QRegExp("^ *\""), ""); // strip off leading "
+ line.replace(TQRegExp(";.*"), ""); // strip off comments
+ line.replace(TQRegExp("\" *$"), ""); // strip off trailing "
+ line.replace(TQRegExp("^ *\""), ""); // strip off leading "
map.replace(height*BoardWidth,
(line.length() > BoardWidth) ? BoardWidth : line.length(),
diff --git a/kpacman/board.h b/kpacman/board.h
index fffde95..061cbd8 100644
--- a/kpacman/board.h
+++ b/kpacman/board.h
@@ -1,10 +1,10 @@
#ifndef BOARD_H
#define BOARD_H
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
#define OUT -1
@@ -37,12 +37,12 @@ enum Image { None, Intro, Demo, Level, File };
#define pacmanBit 0x0040
#define monsterBit 0x0100
-class Board : public QArray
+class Board : public TQArray
{
public:
Board (int size);
~Board() {};
- void init(Image image, QString levelName=0);
+ void init(Image image, TQString levelName=0);
void setup(const uchar *buf);
void set(int pos, Square sq, int m = 0);
@@ -78,8 +78,8 @@ private:
bool inBounds(int pos);
int sz; // size of board
- QString map;
- QString mapName; // Filename of the latest loaded map
+ TQString map;
+ TQString mapName; // Filename of the latest loaded map
int prisonEntry; // position of prisonentry
int prisonExit; // position of prisonexit
diff --git a/kpacman/colors.h b/kpacman/colors.h
index 6abf385..dd32b18 100644
--- a/kpacman/colors.h
+++ b/kpacman/colors.h
@@ -1,21 +1,21 @@
#ifndef COLORS_H
#define COLORS_H
-#include
+#include
-#define BLACK QColor(Qt::black)
-#define RED QColor(Qt::red)
-#define BROWN QColor(0xde, 0x95, 0x41)
-#define PINK QColor(0xff, 0xba, 0xde)
-#define CYAN QColor(0x00, 0xff, 0xde)
-#define LIGHTBLUE QColor(0x41, 0xba, 0xde)
-#define ORANGE QColor(0xff, 0xba, 0x41)
-#define YELLOW QColor(Qt::yellow)
-#define BLUE QColor(0x20, 0x20, 0xde)
-#define GREEN QColor(Qt::green)
-#define LIGHTGREEN QColor(0x41, 0xba, 0x94)
-#define FLESH QColor(0xff, 0xba, 0x94)
-#define WHITE QColor(0xd8, 0xdc, 0xd8)
+#define BLACK TQColor(TQt::black)
+#define RED TQColor(TQt::red)
+#define BROWN TQColor(0xde, 0x95, 0x41)
+#define PINK TQColor(0xff, 0xba, 0xde)
+#define CYAN TQColor(0x00, 0xff, 0xde)
+#define LIGHTBLUE TQColor(0x41, 0xba, 0xde)
+#define ORANGE TQColor(0xff, 0xba, 0x41)
+#define YELLOW TQColor(TQt::yellow)
+#define BLUE TQColor(0x20, 0x20, 0xde)
+#define GREEN TQColor(TQt::green)
+#define LIGHTGREEN TQColor(0x41, 0xba, 0x94)
+#define FLESH TQColor(0xff, 0xba, 0x94)
+#define WHITE TQColor(0xd8, 0xdc, 0xd8)
#endif // COLORS_H
diff --git a/kpacman/keys.cpp b/kpacman/keys.cpp
index a3c2c81..8dc5648 100644
--- a/kpacman/keys.cpp
+++ b/kpacman/keys.cpp
@@ -6,42 +6,42 @@
#include
#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-Keys::Keys( QWidget *parent, const char *name)
- : QDialog( parent, name, TRUE )
+#include
+#include
+#include
+#include
+#include
+#include
+
+Keys::Keys( TQWidget *parent, const char *name)
+ : TQDialog( parent, name, TRUE )
{
KStandardDirs *dirs = KGlobal::dirs();
- QPushButton *okButton = new QPushButton(this);
+ TQPushButton *okButton = new TQPushButton(this);
okButton->setText(i18n("Ok"));
okButton->setFixedSize(okButton->size());
connect( okButton, SIGNAL(clicked()),this, SLOT(ok()) );
okButton->move(20,210);
- QPushButton *defaultButton = new QPushButton(this);
+ TQPushButton *defaultButton = new TQPushButton(this);
defaultButton->setText(i18n("Defaults"));
defaultButton->setFixedSize(defaultButton->size());
connect( defaultButton, SIGNAL(clicked()),this, SLOT(defaults()) );
defaultButton->move(140,210);
- QPushButton *cancelButton = new QPushButton(this);
+ TQPushButton *cancelButton = new TQPushButton(this);
cancelButton->setText(i18n("Cancel"));
cancelButton->setFixedSize(cancelButton->size());
connect( cancelButton, SIGNAL(clicked()),this, SLOT(reject()) );
cancelButton->move(260,210);
- QFrame *separator = new QFrame(this);
- separator->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ TQFrame *separator = new TQFrame(this);
+ separator->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
separator->setGeometry( 20, 190, 340, 4 );
for ( int x = 0; x < 4; x++) {
- QLabel *l = new QLabel(this);
+ TQLabel *l = new TQLabel(this);
l->setAlignment(AlignCenter);
labels[x] = l;
}
@@ -51,32 +51,32 @@ Keys::Keys( QWidget *parent, const char *name)
labels[2]->setGeometry( 20, 92, 100, 20 );
labels[3]->setGeometry(265, 92, 100, 20 );
- QString pixPath;
+ TQString pixPath;
- QPushButton *up = new QPushButton(this);
+ TQPushButton *up = new TQPushButton(this);
pixPath = dirs->findResource("appdata", "pics/up.xpm");
- up->setPixmap( QPixmap(pixPath));
+ up->setPixmap( TQPixmap(pixPath));
up->setFixedSize(up->pixmap()->size());
connect( up, SIGNAL(clicked()),this, SLOT(butUp()) );
up->move(180, 50);
- QPushButton *down = new QPushButton(this);
+ TQPushButton *down = new TQPushButton(this);
pixPath = dirs->findResource("appdata", "pics/down.xpm");
- down->setPixmap( QPixmap(pixPath));
+ down->setPixmap( TQPixmap(pixPath));
down->setFixedSize(down->pixmap()->size());
connect( down, SIGNAL(clicked()),this, SLOT(butDown()) );
down->move(180, 130);
- QPushButton *left = new QPushButton(this);
+ TQPushButton *left = new TQPushButton(this);
pixPath = dirs->findResource("appdata", "pics/left.xpm");
- left->setPixmap( QPixmap(pixPath));
+ left->setPixmap( TQPixmap(pixPath));
left->setFixedSize(left->pixmap()->size());
connect( left, SIGNAL(clicked()),this, SLOT(butLeft()) );
left->move(140, 90);
- QPushButton *right = new QPushButton(this);
+ TQPushButton *right = new TQPushButton(this);
pixPath = dirs->findResource("appdata", "pics/right.xpm");
- right->setPixmap( QPixmap(pixPath));
+ right->setPixmap( TQPixmap(pixPath));
right->setFixedSize(right->pixmap()->size());
connect( right, SIGNAL(clicked()),this, SLOT(butRight()) );
right->move(220, 90);
@@ -88,10 +88,10 @@ Keys::Keys( QWidget *parent, const char *name)
init();
}
-void Keys::keyPressEvent( QKeyEvent *e )
+void Keys::keyPressEvent( TQKeyEvent *e )
{
uint kCode = e->key() & ~(SHIFT | CTRL | ALT);
- QString string = KAccel::keyToString(kCode);
+ TQString string = KAccel::keyToString(kCode);
if (lab != 0) {
if ( string.isNull() )
@@ -131,17 +131,17 @@ void Keys::getKey(int i)
focusIn(labels[i]);
}
-void Keys::focusOut(QLabel *l)
+void Keys::focusOut(TQLabel *l)
{
- l->setFrameStyle( QFrame::NoFrame );
+ l->setFrameStyle( TQFrame::NoFrame );
l->setBackgroundColor(backgroundColor());
l->repaint();
}
-void Keys::focusIn(QLabel *l)
+void Keys::focusIn(TQLabel *l)
{
lab = l;
- lab->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ lab->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
lab->setBackgroundColor(white);
lab->repaint();
}
@@ -161,19 +161,19 @@ void Keys::defaults()
void Keys::init()
{
- QString up("Up");
+ TQString up("Up");
up = kapp->config()->readEntry("upKey", (const char*) up);
labels[0]->setText(up);
- QString down("Down");
+ TQString down("Down");
down = kapp->config()->readEntry("downKey", (const char*) down);
labels[1]->setText(down);
- QString left("Left");
+ TQString left("Left");
left = kapp->config()->readEntry("leftKey", (const char*) left);
labels[2]->setText(left);
- QString right("Right");
+ TQString right("Right");
right = kapp->config()->readEntry("rightKey", (const char*) right);
labels[3]->setText(right);
}
diff --git a/kpacman/keys.h b/kpacman/keys.h
index 955afea..ca27d99 100644
--- a/kpacman/keys.h
+++ b/kpacman/keys.h
@@ -7,17 +7,17 @@
#include
-#include
-#include
-#include
+#include
+#include
+#include
#include
-class Keys : public QDialog
+class Keys : public TQDialog
{
Q_OBJECT
public:
- Keys( QWidget *parent=0, const char *name=0 );
+ Keys( TQWidget *parent=0, const char *name=0 );
private slots:
void butRight();
@@ -27,19 +27,19 @@ private slots:
void getKey(int);
void defaults();
- void focusIn(QLabel *);
- void focusOut(QLabel *);
+ void focusIn(TQLabel *);
+ void focusOut(TQLabel *);
void ok();
protected:
- void keyPressEvent( QKeyEvent * );
+ void keyPressEvent( TQKeyEvent * );
private:
void init();
- QLabel *labels[4];
- QLabel *lab;
+ TQLabel *labels[4];
+ TQLabel *lab;
};
#endif // KEYS_H
diff --git a/kpacman/kpacman.cpp b/kpacman/kpacman.cpp
index 5479861..7ee12c3 100644
--- a/kpacman/kpacman.cpp
+++ b/kpacman/kpacman.cpp
@@ -15,11 +15,11 @@
* *
***************************************************************************/
-// include files for Qt
-#include
-#include
-#include
-#include
+// include files for TQt
+#include
+#include
+#include
+#include
// include files for KDE
#include
@@ -32,7 +32,7 @@
#define ID_STATUS_MSG 1
-KpacmanApp::KpacmanApp(QWidget *, const char *name) : KMainWindow(0, name)
+KpacmanApp::KpacmanApp(TQWidget *, const char *name) : KMainWindow(0, name)
{
config=kapp->config();
@@ -171,7 +171,7 @@ void KpacmanApp::readOptions()
toolBarPos = (KToolBar::BarPosition) config->readNumEntry("ToolBarPos", KToolBar::Top);
toolBar("mainToolBar")->setBarPos(toolBarPos);
- QSize size = config->readSizeEntry("Geometry");
+ TQSize size = config->readSizeEntry("Geometry");
if (!size.isEmpty())
{
resize(size);
@@ -185,9 +185,9 @@ void KpacmanApp::readOptions()
void KpacmanApp::readSchemes()
{
- QString saveGroup = config->group();
- QString group;
- QString description;
+ TQString saveGroup = config->group();
+ TQString group;
+ TQString description;
int modeCount = config->readNumEntry("ModeCount", -1);
int schemeCount = config->readNumEntry("SchemeCount");
@@ -196,20 +196,20 @@ void KpacmanApp::readSchemes()
schemeID.resize(schemeCount);
schemeMode.resize(schemeCount);
- schemesPopup = new QList;
+ schemesPopup = new TQList;
schemesPopup->setAutoDelete(true);
modesPopup = selectGraphicScheme->popupMenu();
connect(modesPopup, SIGNAL(activated(int)), this, SLOT(slotSchemeActivated(int)));
if (schemeCount == 0 || scheme == -1) {
- QMessageBox::warning(this, i18n("Configuration Error"),
+ TQMessageBox::warning(this, i18n("Configuration Error"),
i18n("There are no schemes defined,\n"
"or no scheme is selected."));
return;
}
- // create submenus (QPopupMenu) for graphic-modes
+ // create submenus (TQPopupMenu) for graphic-modes
for (int m = 0; m < modeCount; m++) {
group.sprintf("Mode %d", m);
config->setGroup(group);
@@ -446,7 +446,7 @@ void KpacmanApp::slotKeyBindings()
///////////////////////////////////////////////////////////////////
// configure key bindings
Keys *keys = new Keys();
- if (keys->exec() == QDialog::Accepted) {
+ if (keys->exec() == TQDialog::Accepted) {
view->referee->initKeys();
view->score->initKeys();
}
@@ -465,7 +465,7 @@ void KpacmanApp::slotGameFinished()
slotStatusMsg(i18n("Ready."));
}
-void KpacmanApp::slotStatusMsg(const QString &text)
+void KpacmanApp::slotStatusMsg(const TQString &text)
{
///////////////////////////////////////////////////////////////////
// change status message permanently
diff --git a/kpacman/kpacman.h b/kpacman/kpacman.h
index 527d344..04210af 100644
--- a/kpacman/kpacman.h
+++ b/kpacman/kpacman.h
@@ -23,10 +23,10 @@
#include
#endif
-// include files for Qt
-#include
-#include
-#include
+// include files for TQt
+#include
+#include
+#include
//include files for KDE
#include
@@ -58,7 +58,7 @@ class KpacmanApp : public KMainWindow
public:
/** constructor of KpacmanApp, calls all init functions to create the application.
*/
- KpacmanApp(QWidget *parent = 0, const char *name = 0);
+ KpacmanApp(TQWidget *parent = 0, const char *name = 0);
virtual ~KpacmanApp();
protected:
@@ -134,7 +134,7 @@ class KpacmanApp : public KMainWindow
/** changes the statusbar contents for the standard label permanently, used to indicate current actions.
* @param text the text that is displayed in the statusbar
*/
- void slotStatusMsg(const QString &text);
+ void slotStatusMsg(const TQString &text);
/** configure keysbindings dialog
*/
void slotKeyBindings();
@@ -170,13 +170,13 @@ class KpacmanApp : public KMainWindow
int mode;
KPopupMenu *modesPopup; // KAction main scheme selection menu
- QList *schemesPopup; // submenus for selecting scheme
+ TQList *schemesPopup; // submenus for selecting scheme
// ID's of the menuitem(s) for finding/selecting scheme by id
- QArray modeID;
- QArray schemeID;
+ TQArray modeID;
+ TQArray schemeID;
- QArray schemeMode; // mode(group) of the schemes, -1 if no group
+ TQArray schemeMode; // mode(group) of the schemes, -1 if no group
bool highscoresChecked; // highscores display active
bool focusedPause; // Pause caused by focusEvents
diff --git a/kpacman/kpacmanview.cpp b/kpacman/kpacmanview.cpp
index 73d3f44..b1931ec 100644
--- a/kpacman/kpacmanview.cpp
+++ b/kpacman/kpacmanview.cpp
@@ -15,8 +15,8 @@
* *
***************************************************************************/
-// include files for Qt
-#include
+// include files for TQt
+#include
// include files for KDE
#include
@@ -30,7 +30,7 @@
#include "referee.h"
#include "status.h"
-KpacmanView::KpacmanView( QWidget *parent, const char *name) : QWidget( parent, name )
+KpacmanView::KpacmanView( TQWidget *parent, const char *name) : TQWidget( parent, name )
{
bitfont = NULL;
fontName = "";
@@ -52,7 +52,7 @@ KpacmanView::~KpacmanView()
void KpacmanView::confMisc(bool defGroup)
{
KStandardDirs *dirs = KGlobal::dirs();
- QString findPath;
+ TQString findPath;
if (defGroup || kapp->config()->hasKey("Font")) {
fontName = kapp->config()->readEntry("Font");
@@ -73,9 +73,9 @@ void KpacmanView::confMisc(bool defGroup)
void KpacmanView::confScheme()
{
- QString lastFontName = fontName;
- QString oldgroup = kapp->config()->group();
- QString newgroup;
+ TQString lastFontName = fontName;
+ TQString oldgroup = kapp->config()->group();
+ TQString newgroup;
// if not set, read mode and scheme from the configfile
if (mode == -1 && scheme == -1) {
@@ -115,11 +115,11 @@ void KpacmanView::confScheme()
bitfont = new Bitfont(fontName, bitfontFirstChar, bitfontLastChar);
if (bitfont->width() == 0 || bitfont->height() == 0) {
- QString msg = i18n("The bitfont could not be contructed.\n\n"
+ TQString msg = i18n("The bitfont could not be contructed.\n\n"
"The file '@FONTNAME@' does not exist,\n"
"or is of an unknown format.");
- msg.replace(QRegExp("@FONTNAME@"), fontName);
- // QMessageBox::critical(this, i18n("Initialization Error"), msg);
+ msg.replace(TQRegExp("@FONTNAME@"), fontName);
+ // TQMessageBox::critical(this, i18n("Initialization Error"), msg);
printf("%s\n", msg.data());
}
}
@@ -147,7 +147,7 @@ void KpacmanView::setScheme(int Scheme, int Mode)
status->repaint(FALSE);
}
-void KpacmanView::resizeEvent( QResizeEvent * )
+void KpacmanView::resizeEvent( TQResizeEvent * )
{
referee->setGeometry(0, bitfont->height()*3, referee->width(), referee->height());
referee->setBackgroundColor(BLACK);
diff --git a/kpacman/kpacmanview.h b/kpacman/kpacmanview.h
index e7025e1..9108bc9 100644
--- a/kpacman/kpacmanview.h
+++ b/kpacman/kpacmanview.h
@@ -22,9 +22,9 @@
#include
#endif
-//include files for Qt
-#include
-#include
+//include files for TQt
+#include
+#include
// application specific includes
#include "score.h"
@@ -33,14 +33,14 @@
#include "painter.h"
/** The KpacmanView class provides the view widget for the KpacmanApp instance.
- * The View instance inherits QWidget as a base class and represents the view object of a KTMainWindow.
+ * The View instance inherits TQWidget as a base class and represents the view object of a KTMainWindow.
*/
-class KpacmanView : public QWidget
+class KpacmanView : public TQWidget
{
Q_OBJECT
public:
/** Constructor for the main view */
- KpacmanView ( QWidget *parent = 0, const char *name = 0);
+ KpacmanView ( TQWidget *parent = 0, const char *name = 0);
/** Destructor for the main view */
virtual ~KpacmanView();
@@ -52,14 +52,14 @@ public:
protected:
void confScheme();
void confMisc(bool defGroup=TRUE);
- void resizeEvent( QResizeEvent * );
+ void resizeEvent( TQResizeEvent * );
private:
Bitfont *bitfont;
uchar bitfontFirstChar;
uchar bitfontLastChar;
- QString fontName;
+ TQString fontName;
int scheme;
int mode;
diff --git a/kpacman/monster.h b/kpacman/monster.h
index b5d7f36..4f508b0 100644
--- a/kpacman/monster.h
+++ b/kpacman/monster.h
@@ -2,8 +2,8 @@
#define MONSTER_H
#include
-#include
-#include
+#include
+#include
#include "board.h"
diff --git a/kpacman/pacman.h b/kpacman/pacman.h
index e81fdd2..b951ee4 100644
--- a/kpacman/pacman.h
+++ b/kpacman/pacman.h
@@ -2,8 +2,8 @@
#define PACMAN_H
#include
-#include
-#include
+#include
+#include
#include "board.h"
diff --git a/kpacman/painter.cpp b/kpacman/painter.cpp
index 93a3782..9060620 100644
--- a/kpacman/painter.cpp
+++ b/kpacman/painter.cpp
@@ -2,20 +2,20 @@
#include
#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
+#include
-#include
-#include
+#include
+#include
#include "painter.h"
#include "board.h"
-Painter::Painter( Board *b, QWidget *parent, int Scheme, int Mode, Bitfont *font)
+Painter::Painter( Board *b, TQWidget *parent, int Scheme, int Mode, Bitfont *font)
{
w = parent;
board = b;
@@ -53,24 +53,24 @@ Painter::Painter( Board *b, QWidget *parent, int Scheme, int Mode, Bitfont *font
confScheme();
}
-QList *Painter::loadPixmap(QWidget *parent, QString pixmapName,
- QList *pixmaps)
+TQList *Painter::loadPixmap(TQWidget *parent, TQString pixmapName,
+ TQList *pixmaps)
{
if (pixmaps == NULL) {
- pixmaps = new QList;
+ pixmaps = new TQList;
pixmaps->setAutoDelete(TRUE);
}
if (!pixmaps->isEmpty())
pixmaps->clear();
- QPixmap PIXMAP(pixmapName);
+ TQPixmap PIXMAP(pixmapName);
if (PIXMAP.isNull() || PIXMAP.mask() == NULL) {
- QString msg = i18n("The pixmap could not be contructed.\n\n"
+ TQString msg = i18n("The pixmap could not be contructed.\n\n"
"The file '@PIXMAPNAME@' does not exist,\n"
"or is of an unknown format.");
- msg.replace(QRegExp("@PIXMAPNAME@"), pixmapName);
- // QMessageBox::critical(parent, i18n("Initialization Error"), msg);
+ msg.replace(TQRegExp("@PIXMAPNAME@"), pixmapName);
+ // TQMessageBox::critical(parent, i18n("Initialization Error"), msg);
printf("%s\n", msg.data());
return 0;
}
@@ -78,28 +78,28 @@ QList *Painter::loadPixmap(QWidget *parent, QString pixmapName,
int height = PIXMAP.height();
int width = (height == 0) ? 0 : PIXMAP.width()/(PIXMAP.width()/height);
- QBitmap BITMAP;
- QBitmap MASK;
+ TQBitmap BITMAP;
+ TQBitmap MASK;
BITMAP = *PIXMAP.mask();
MASK.resize(width, height);
for (int x = 0; x < PIXMAP.width()/width; x++) {
- QPixmap *pixmap = new QPixmap(width, height);
+ TQPixmap *pixmap = new TQPixmap(width, height);
pixmaps->append(pixmap);
- bitBlt(pixmap, 0, 0, &PIXMAP, x*width, 0, width, height, QPixmap::CopyROP, TRUE);
- bitBlt(&MASK, 0, 0, &BITMAP, x*width, 0, width, height, QPixmap::CopyROP, TRUE);
+ bitBlt(pixmap, 0, 0, &PIXMAP, x*width, 0, width, height, TQPixmap::CopyROP, TRUE);
+ bitBlt(&MASK, 0, 0, &BITMAP, x*width, 0, width, height, TQPixmap::CopyROP, TRUE);
pixmap->setMask(MASK);
}
return pixmaps;
}
-QList *Painter::textPixmap(QStrList &str, QList *pixmaps,
- QColor fg, QColor bg)
+TQList *Painter::textPixmap(TQStrList &str, TQList *pixmaps,
+ TQColor fg, TQColor bg)
{
if (pixmaps == NULL) {
- pixmaps = new QList;
+ pixmaps = new TQList;
pixmaps->setAutoDelete(TRUE);
}
@@ -107,25 +107,25 @@ QList *Painter::textPixmap(QStrList &str, QList *pixmaps,
pixmaps->clear();
for (uint s = 0; s < str.count(); s++) {
- QPixmap *pixmap = new QPixmap(bitfont->text(str.at(s), fg, bg));
+ TQPixmap *pixmap = new TQPixmap(bitfont->text(str.at(s), fg, bg));
pixmaps->append(pixmap);
}
return pixmaps;
}
-QList *Painter::textPixmap(QString str, QList *pixmaps,
- QColor fg, QColor bg)
+TQList *Painter::textPixmap(TQString str, TQList *pixmaps,
+ TQColor fg, TQColor bg)
{
if (pixmaps == NULL) {
- pixmaps = new QList;
+ pixmaps = new TQList;
pixmaps->setAutoDelete(TRUE);
}
if (!pixmaps->isEmpty())
pixmaps->clear();
- QPixmap *pixmap = new QPixmap(bitfont->text(str, fg, bg));
+ TQPixmap *pixmap = new TQPixmap(bitfont->text(str, fg, bg));
pixmaps->append(pixmap);
return pixmaps;
@@ -134,18 +134,18 @@ QList *Painter::textPixmap(QString str, QList *pixmaps,
/* Return the point of the upperleft pixel of the block representing that position
* on the board.
*/
-QPoint Painter::point(int pos)
+TQPoint Painter::point(int pos)
{
- return QPoint((board->x(pos)-1)*BlockWidth, (board->y(pos)-1)*BlockHeight);
+ return TQPoint((board->x(pos)-1)*BlockWidth, (board->y(pos)-1)*BlockHeight);
}
-QRect Painter::rect(int pos, PixMap pix, uint i)
+TQRect Painter::rect(int pos, PixMap pix, uint i)
{
if (pos == OUT)
- return QRect();
+ return TQRect();
- QPixmap *PIXMAP = NULL;
+ TQPixmap *PIXMAP = NULL;
switch (pix) {
case PacmanPix : PIXMAP = pacmanPix->
at(checkRange(i, pacmanPix->count()-1));
@@ -178,36 +178,36 @@ QRect Painter::rect(int pos, PixMap pix, uint i)
at(checkRange(i, wallPix->count()-1));
}
if (PIXMAP == NULL)
- return QRect();
+ return TQRect();
- QRect rect = PIXMAP->rect();
- QPoint point = this->point(pos);
- rect.moveCenter(QPoint(point.x()-1, point.y()-1));
+ TQRect rect = PIXMAP->rect();
+ TQPoint point = this->point(pos);
+ rect.moveCenter(TQPoint(point.x()-1, point.y()-1));
return rect;
}
-QRect Painter::rect(int pos, QString str, int align)
+TQRect Painter::rect(int pos, TQString str, int align)
{
if (pos == OUT) // return an empty rect if the position
- return QRect(); // is invalid
- QPoint point = this->point(pos);
- QRect rect = bitfont->rect(str);
+ return TQRect(); // is invalid
+ TQPoint point = this->point(pos);
+ TQRect rect = bitfont->rect(str);
- rect.moveCenter(QPoint(point.x()-1, point.y()-1));
+ rect.moveCenter(TQPoint(point.x()-1, point.y()-1));
int dx = 0;
int dy = 0;
- if (align & QLabel::AlignLeft || align & QLabel::AlignRight) {
+ if (align & TQLabel::AlignLeft || align & TQLabel::AlignRight) {
dx = (str.length()-1) * (bitfont->width()/2);
- if (align & QLabel::AlignRight)
+ if (align & TQLabel::AlignRight)
dx *= -1;
}
- if (align & QLabel::AlignTop || align & QLabel::AlignBottom) {
+ if (align & TQLabel::AlignTop || align & TQLabel::AlignBottom) {
dy = bitfont->height()/2;
- if (align & QLabel::AlignBottom)
+ if (align & TQLabel::AlignBottom)
dy *= -1;
}
@@ -217,9 +217,9 @@ QRect Painter::rect(int pos, QString str, int align)
return rect;
}
-QRect Painter::rect(QRect r1, QRect r2)
+TQRect Painter::rect(TQRect r1, TQRect r2)
{
- QRect rect;
+ TQRect rect;
rect.setLeft(r1.left() < r2.left() ? r1.left() : r2.left());
rect.setTop(r1.top() < r2.top() ? r1.top() : r2.top());
rect.setRight(r1.right() > r2.right() ? r1.right() : r2.right());
@@ -232,7 +232,7 @@ void Painter::erase(int pos, PixMap pix, uint i)
{
if (pos == OUT)
return;
- QRect rect = this->rect(pos, pix, i);
+ TQRect rect = this->rect(pos, pix, i);
bitBlt(&roomPix, rect.x(), rect.y(), &backPix,
rect.x(), rect.y(), rect.width(), rect.height());
}
@@ -255,7 +255,7 @@ int Painter::maxPixmaps(PixMap pix)
}
}
-void Painter::draw(QPoint point, DrawWidget where, QPixmap pix)
+void Painter::draw(TQPoint point, DrawWidget where, TQPixmap pix)
{
switch (where) {
case Widget : bitBlt(w, point.x(), point.y(), &pix);
@@ -267,14 +267,14 @@ void Painter::draw(QPoint point, DrawWidget where, QPixmap pix)
}
}
-void Painter::draw(QRect rect, DrawWidget where, QPixmap pix)
+void Painter::draw(TQRect rect, DrawWidget where, TQPixmap pix)
{
- draw(QPoint(rect.x(), rect.y()), where, pix);
+ draw(TQPoint(rect.x(), rect.y()), where, pix);
}
void Painter::draw(int pos, DrawWidget where, PixMap pix, uint i)
{
- QPixmap *PIXMAP = NULL;
+ TQPixmap *PIXMAP = NULL;
switch (pix) {
case PacmanPix : PIXMAP = pacmanPix->
at(checkRange(i, pacmanPix->count()-1));
@@ -306,9 +306,9 @@ void Painter::draw(int pos, DrawWidget where, PixMap pix, uint i)
if (PIXMAP == NULL)
return;
- QRect rect = PIXMAP->rect();
- QPoint point = this->point(pos);
- rect.moveCenter(QPoint(point.x()-1, point.y()-1));
+ TQRect rect = PIXMAP->rect();
+ TQPoint point = this->point(pos);
+ rect.moveCenter(TQPoint(point.x()-1, point.y()-1));
switch (where) {
case Widget : bitBlt(w, rect.x(), rect.y(), PIXMAP);
@@ -320,13 +320,13 @@ void Painter::draw(int pos, DrawWidget where, PixMap pix, uint i)
}
}
-QPixmap Painter::draw(int pos, DrawWidget where,
- QString str, QColor fg, QColor bg, int align)
+TQPixmap Painter::draw(int pos, DrawWidget where,
+ TQString str, TQColor fg, TQColor bg, int align)
{
- QPixmap TEXT = bitfont->text(str, fg, bg);
+ TQPixmap TEXT = bitfont->text(str, fg, bg);
- QRect rect = this->rect(pos, str, align);
- QPixmap SAVE = QPixmap(rect.width(), rect.height());
+ TQRect rect = this->rect(pos, str, align);
+ TQPixmap SAVE = TQPixmap(rect.width(), rect.height());
switch (where) {
case Widget : bitBlt(&SAVE, 0, 0, w, rect.x(), rect.y());
@@ -343,12 +343,12 @@ QPixmap Painter::draw(int pos, DrawWidget where,
return SAVE;
}
-QRect Painter::draw(int col, int row, DrawWidget where,
- QString str, QColor fg, QColor bg, int align)
+TQRect Painter::draw(int col, int row, DrawWidget where,
+ TQString str, TQColor fg, TQColor bg, int align)
{
- QPixmap TEXT = bitfont->text(str, fg, bg);
+ TQPixmap TEXT = bitfont->text(str, fg, bg);
- QRect rect = this->rect(row*BoardWidth+col, str, align);
+ TQRect rect = this->rect(row*BoardWidth+col, str, align);
draw(rect, where, TEXT);
return rect;
@@ -545,7 +545,7 @@ void Painter::drawBrick(int pos)
default : border = -1;
}
if (border != -1 && border < (int) wallPix->count()) {
- QRect rect = this->rect(pos, WallPix);
+ TQRect rect = this->rect(pos, WallPix);
bitBlt(&roomPix, rect.x(), rect.y(), wallPix->at((uint) border));
}
}
@@ -618,7 +618,7 @@ void Painter::drawPrison(int pos)
}
if (border != -1 && border < (int) prisonPix->count()) {
- QRect rect = this->rect(pos, PrisonPix);
+ TQRect rect = this->rect(pos, PrisonPix);
bitBlt(&roomPix, rect.x(), rect.y(), prisonPix->at((uint) border));
}
}
@@ -626,22 +626,22 @@ void Painter::drawPrison(int pos)
void Painter::drawPoint(int pos)
{
if (!pointPix->isEmpty()) {
- QRect rect = this->rect(pos, PointPix);
+ TQRect rect = this->rect(pos, PointPix);
bitBlt(&roomPix, rect.x(), rect.y(), pointPix->at(0));
}
}
-QString Painter::decodeHexOctString(QString s)
+TQString Painter::decodeHexOctString(TQString s)
{
- QString value;
- QString valids;
+ TQString value;
+ TQString valids;
int pos, xpos = 0, opos = 0;
int v, len, leadin;
const char *ptr;
uchar c;
- while (((xpos = s.find(QRegExp("\\\\x[0-9a-fA-F]+"), xpos)) != -1) ||
- ((opos = s.find(QRegExp("\\\\[0-7]+"), opos)) != -1)) {
+ while (((xpos = s.find(TQRegExp("\\\\x[0-9a-fA-F]+"), xpos)) != -1) ||
+ ((opos = s.find(TQRegExp("\\\\[0-7]+"), opos)) != -1)) {
if (xpos != -1) {
valids = "0123456789abcdef";
leadin = 2;
@@ -669,12 +669,12 @@ QString Painter::decodeHexOctString(QString s)
return s;
}
-void Painter::fillScoreString(QStrList &list, QArray &values)
+void Painter::fillScoreString(TQStrList &list, TQArray &values)
{
if( !list.isEmpty())
list.clear();
- QString s;
+ TQString s;
for (uint i = 0; i < values.size(); i++) {
@@ -697,12 +697,12 @@ void Painter::fillScoreString(QStrList &list, QArray &values)
}
}
-void Painter::fillArray(QArray &array, QString values, int max)
+void Painter::fillArray(TQArray &array, TQString values, int max)
{
array.resize(max);
int last = 0;
bool ok;
- QString value;
+ TQString value;
for (uint i = 0; i < array.size(); i++) {
if (values.find(',') < 0 && values.length() > 0) {
@@ -721,13 +721,13 @@ void Painter::fillArray(QArray &array, QString values, int max)
}
}
-void Painter::fillStrList(QStrList &list, QString values, int max)
+void Painter::fillStrList(TQStrList &list, TQString values, int max)
{
if (!list.isEmpty())
list.clear();
- QString last = "";
- QString value;
+ TQString last = "";
+ TQString value;
for (uint i = 0; i < (uint) max; i++) {
if (values.find(',') < 0 && values.length() > 0) {
@@ -744,16 +744,16 @@ void Painter::fillStrList(QStrList &list, QString values, int max)
}
}
-void Painter::fillPixmapName(QStrList &pixmapName)
+void Painter::fillPixmapName(TQStrList &pixmapName)
{
- QStrList list = pixmapName;
+ TQStrList list = pixmapName;
if (!pixmapName.isEmpty())
pixmapName.clear();
- QString pixmap;
+ TQString pixmap;
- QFileInfo fileInfo;
+ TQFileInfo fileInfo;
for (uint i = 0; i < list.count(); i++) {
pixmap = list.at(i);
@@ -843,8 +843,8 @@ void Painter::confScoring(bool defGroup)
void Painter::confScheme()
{
- QString oldgroup = kapp->config()->group();
- QString newgroup;
+ TQString oldgroup = kapp->config()->group();
+ TQString newgroup;
// if not set, read mode and scheme from the configfile
if (mode == -1 && scheme == -1) {
diff --git a/kpacman/painter.h b/kpacman/painter.h
index 7e63b96..ebd5bba 100644
--- a/kpacman/painter.h
+++ b/kpacman/painter.h
@@ -4,13 +4,13 @@
#include
#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
#include "board.h"
#include "bitfont.h"
@@ -24,23 +24,23 @@ enum DrawWidget { Widget, RoomPix, BackPix };
class Painter
{
public:
- Painter (Board *, QWidget *parent=0, int scheme=-1, int mode=-1,Bitfont *font=0);
- QPixmap levelPix() { return roomPix; }
+ Painter (Board *, TQWidget *parent=0, int scheme=-1, int mode=-1,Bitfont *font=0);
+ TQPixmap levelPix() { return roomPix; }
void setScheme(int scheme=-1, int mode=-1, Bitfont *font=0);
void setLevel(int level=0);
- QRect rect(int pos, PixMap pix, uint i = 0);
- QRect rect(int pos, QString str, int align = QLabel::AlignCenter );
- QRect rect(QRect r1, QRect r2);
+ TQRect rect(int pos, PixMap pix, uint i = 0);
+ TQRect rect(int pos, TQString str, int align = TQLabel::AlignCenter );
+ TQRect rect(TQRect r1, TQRect r2);
- void draw(QPoint point, DrawWidget where, QPixmap pix);
- void draw(QRect rect, DrawWidget where, QPixmap pix);
+ void draw(TQPoint point, DrawWidget where, TQPixmap pix);
+ void draw(TQRect rect, DrawWidget where, TQPixmap pix);
void draw(int pos, DrawWidget where, PixMap pix, uint i = 0);
- QPixmap draw(int pos, DrawWidget where, QString str,
- QColor fg, QColor bg = QColor(), int align = QLabel::AlignCenter);
- QRect draw(int col, int row, DrawWidget where, QString str,
- QColor fg, QColor bg = QColor(), int align = QLabel::AlignCenter);
+ TQPixmap draw(int pos, DrawWidget where, TQString str,
+ TQColor fg, TQColor bg = TQColor(), int align = TQLabel::AlignCenter);
+ TQRect draw(int col, int row, DrawWidget where, TQString str,
+ TQColor fg, TQColor bg = TQColor(), int align = TQLabel::AlignCenter);
void drawBrick(int pos);
void drawPrison(int pos);
@@ -51,12 +51,12 @@ public:
int maxPixmaps(PixMap pix);
protected:
- QString decodeHexOctString(QString str);
+ TQString decodeHexOctString(TQString str);
- void fillScoreString(QStrList &, QArray &);
- void fillArray(QArray &, QString, int);
- void fillStrList(QStrList &, QString, int);
- void fillPixmapName(QStrList &);
+ void fillScoreString(TQStrList &, TQArray &);
+ void fillArray(TQArray &, TQString, int);
+ void fillStrList(TQStrList &, TQString, int);
+ void fillPixmapName(TQStrList &);
void confScheme();
void confLevels(bool defGroup=TRUE);
@@ -68,71 +68,71 @@ protected:
void initbackPixmaps();
private:
- QWidget *w;
+ TQWidget *w;
Board *board;
Bitfont *bitfont;
int BlockWidth;
int BlockHeight;
- QArray fruitScore;
- QStrList fruitScoreString;
- QArray monsterScore;
- QStrList monsterScoreString;
-
- QString pixmapDirectory;
-
- QStrList pointPixmapName;
- QStrList wallPixmapName;
- QStrList prisonPixmapName;
- QStrList energizerPixmapName;
- QStrList fruitPixmapName;
- QStrList pacmanPixmapName;
- QStrList dyingPixmapName;
- QStrList eyesPixmapName;
- QStrList monsterPixmapName;
- QStrList fruitScorePixmapName;
- QStrList monsterScorePixmapName;
-
- QString lastPointPixmapName;
- QString lastWallPixmapName;
- QString lastPrisonPixmapName;
- QString lastEnergizerPixmapName;
- QString lastFruitPixmapName;
- QString lastPacmanPixmapName;
- QString lastDyingPixmapName;
- QString lastEyesPixmapName;
- QString lastMonsterPixmapName;
- QString lastFruitScorePixmapName;
- QString lastMonsterScorePixmapName;
-
- QList *loadPixmap(QWidget *parent, QString pixmapName,
- QList *pixmaps=0);
- QList *textPixmap(QStrList &, QList *pixmaps=0,
- QColor fg = BLACK, QColor bg = QColor());
- QList *textPixmap(QString str, QList *pixmaps=0,
- QColor fg = BLACK, QColor bg = QColor());
-
- QPoint point(int pos);
+ TQArray fruitScore;
+ TQStrList fruitScoreString;
+ TQArray monsterScore;
+ TQStrList monsterScoreString;
+
+ TQString pixmapDirectory;
+
+ TQStrList pointPixmapName;
+ TQStrList wallPixmapName;
+ TQStrList prisonPixmapName;
+ TQStrList energizerPixmapName;
+ TQStrList fruitPixmapName;
+ TQStrList pacmanPixmapName;
+ TQStrList dyingPixmapName;
+ TQStrList eyesPixmapName;
+ TQStrList monsterPixmapName;
+ TQStrList fruitScorePixmapName;
+ TQStrList monsterScorePixmapName;
+
+ TQString lastPointPixmapName;
+ TQString lastWallPixmapName;
+ TQString lastPrisonPixmapName;
+ TQString lastEnergizerPixmapName;
+ TQString lastFruitPixmapName;
+ TQString lastPacmanPixmapName;
+ TQString lastDyingPixmapName;
+ TQString lastEyesPixmapName;
+ TQString lastMonsterPixmapName;
+ TQString lastFruitScorePixmapName;
+ TQString lastMonsterScorePixmapName;
+
+ TQList *loadPixmap(TQWidget *parent, TQString pixmapName,
+ TQList *pixmaps=0);
+ TQList *textPixmap(TQStrList &, TQList *pixmaps=0,
+ TQColor fg = BLACK, TQColor bg = TQColor());
+ TQList *textPixmap(TQString str, TQList *pixmaps=0,
+ TQColor fg = BLACK, TQColor bg = TQColor());
+
+ TQPoint point(int pos);
int checkRange(int value, int max, int min=0);
- QList *wallPix;
- QList *prisonPix;
- QList *pointPix;
- QList *energizerPix;
- QList *fruitPix;
- QList *pacmanPix;
- QList *dyingPix;
- QList *eyesPix;
- QList *monsterPix;
- QList *fruitScorePix;
- QList *monsterScorePix;
-
- QPixmap roomPix;
- QPixmap backPix;
+ TQList *wallPix;
+ TQList *prisonPix;
+ TQList *pointPix;
+ TQList *energizerPix;
+ TQList *fruitPix;
+ TQList *pacmanPix;
+ TQList *dyingPix;
+ TQList *eyesPix;
+ TQList *monsterPix;
+ TQList *fruitScorePix;
+ TQList *monsterScorePix;
+
+ TQPixmap roomPix;
+ TQPixmap backPix;
bool plainColor;
- QColor backgroundColor;
+ TQColor backgroundColor;
int maxLevel;
int level;
diff --git a/kpacman/referee.cpp b/kpacman/referee.cpp
index 55f03f8..bc8660b 100644
--- a/kpacman/referee.cpp
+++ b/kpacman/referee.cpp
@@ -4,13 +4,13 @@
#include
-#include
+#include
#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
#include
#include "board.h"
@@ -19,15 +19,15 @@
#include "fruit.h"
#include "painter.h"
-Referee::Referee( QWidget *parent, const char *name, int Scheme, int Mode, Bitfont *font)
- : QWidget( parent, name )
+Referee::Referee( TQWidget *parent, const char *name, int Scheme, int Mode, Bitfont *font)
+ : TQWidget( parent, name )
{
gameState.resize(12);
gameTimer = 0;
energizerTimer = 0;
focusedPause = false;
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
initKeys();
@@ -44,23 +44,23 @@ Referee::Referee( QWidget *parent, const char *name, int Scheme, int Mode, Bitfo
fruit = new Fruit(board);
- monsters = new QList;
+ monsters = new TQList;
monsters->setAutoDelete(TRUE);
- monsterRect = new QList;
+ monsterRect = new TQList;
monsterRect->setAutoDelete(TRUE);
- energizers = new QList;
+ energizers = new TQList;
energizers->setAutoDelete(TRUE);
- energizerRect = new QList;
+ energizerRect = new TQList;
energizerRect->setAutoDelete(TRUE);
pacmanRect.setRect(0, 0, 0, 0);
fruitRect.setRect(0, 0, 0, 0);
- QTime midnight( 0, 0, 0 );
- srand( midnight.secsTo(QTime::currentTime()) );
+ TQTime midnight( 0, 0, 0 );
+ srand( midnight.secsTo(TQTime::currentTime()) );
lifes = 0;
points = 0;
@@ -71,15 +71,15 @@ Referee::Referee( QWidget *parent, const char *name, int Scheme, int Mode, Bitfo
intro();
}
-void Referee::paintEvent( QPaintEvent *e)
+void Referee::paintEvent( TQPaintEvent *e)
{
if (gameState.testBit(HallOfFame))
return;
- QRect rect = e->rect();
+ TQRect rect = e->rect();
if (!rect.isEmpty()) {
- QPixmap p = pix->levelPix();
+ TQPixmap p = pix->levelPix();
bitBlt(this, rect.x(), rect.y(),
&p, rect.x(), rect.y(), rect.width(), rect.height());
}
@@ -159,12 +159,12 @@ void Referee::paintEvent( QPaintEvent *e)
pix->draw((BoardWidth*BoardHeight)/2-BoardWidth, Widget, i18n("PAUSED"), RED, BLACK);
}
-void Referee::timerEvent( QTimerEvent *e )
+void Referee::timerEvent( TQTimerEvent *e )
{
if (gameState.testBit(HallOfFame))
return;
- QRect lastRect;
+ TQRect lastRect;
int lastPix;
bool moved = FALSE;
int eated = 0;
@@ -407,24 +407,24 @@ void Referee::repaintFigures()
void Referee::initKeys()
{
- QString up("Up");
+ TQString up("Up");
up = kapp->config()->readEntry("upKey", (const char*) up);
UpKey = KAccel::stringToKey(up);
- QString down("Down");
+ TQString down("Down");
down = kapp->config()->readEntry("downKey", (const char*) down);
DownKey = KAccel::stringToKey(down);
- QString left("Left");
+ TQString left("Left");
left = kapp->config()->readEntry("leftKey", (const char*) left);
LeftKey = KAccel::stringToKey(left);
- QString right("Right");
+ TQString right("Right");
right = kapp->config()->readEntry("rightKey", (const char*) right);
RightKey = KAccel::stringToKey(right);
}
-void Referee::fillArray(QArray &array, QString values, int max)
+void Referee::fillArray(TQArray &array, TQString values, int max)
{
if (max < 0)
max = values.contains(',')+1;
@@ -432,7 +432,7 @@ void Referee::fillArray(QArray &array, QString values, int max)
array.resize(max);
int last = 0;
bool ok;
- QString value;
+ TQString value;
for (uint i = 0; i < array.size(); i++) {
if (values.find(',') < 0 && values.length() > 0) {
@@ -451,13 +451,13 @@ void Referee::fillArray(QArray &array, QString values, int max)
}
}
-void Referee::fillStrList(QStrList &list, QString values, int max)
+void Referee::fillStrList(TQStrList &list, TQString values, int max)
{
if (!list.isEmpty())
list.clear();
- QString last = "";
- QString value;
+ TQString last = "";
+ TQString value;
for (uint i = 0; i < (uint) max; i++) {
if (values.find(',') < 0 && values.length() > 0) {
@@ -477,14 +477,14 @@ void Referee::fillStrList(QStrList &list, QString values, int max)
void Referee::fillMapName()
{
- QStrList list = mapName;
+ TQStrList list = mapName;
if (!mapName.isEmpty())
mapName.clear();
- QString map;
+ TQString map;
- QFileInfo fileInfo;
+ TQFileInfo fileInfo;
for (uint i = 0; i < list.count(); i++) {
map = list.at(i);
@@ -610,8 +610,8 @@ void Referee::confScoring(bool defGroup)
void Referee::confScheme()
{
- QString oldgroup = kapp->config()->group();
- QString newgroup;
+ TQString oldgroup = kapp->config()->group();
+ TQString newgroup;
// if not set, read mode and scheme from the configfile
if (mode == -1 && scheme == -1) {
@@ -701,7 +701,7 @@ void Referee::setScheme(int Scheme, int Mode, Bitfont *font)
repaint();
}
-void Referee::keyPressEvent( QKeyEvent *k )
+void Referee::keyPressEvent( TQKeyEvent *k )
{
if (gameState.testBit(Paused) || gameState.testBit(HallOfFame) ||
gameState.testBit(Demonstration) || gameState.testBit(Dying) ||
@@ -770,13 +770,13 @@ void Referee::eaten()
pix->rect(pacman->position(), MonsterScorePix, monstersEaten-1)));
if (--timerCount > 0)
- QTimer::singleShot( monsterScoreDurMS, this, SLOT(eaten()));
+ TQTimer::singleShot( monsterScoreDurMS, this, SLOT(eaten()));
else {
for (Monster *m = monsters->first(); m != 0; m = monsters->next())
if (m && m->direction() == X && !gameState.testBit(Introducing))
m->setDirection(N);
if (monstersEaten != 4 || !gameState.testBit(Introducing))
- QTimer::singleShot( monsterScoreDurMS, this, SLOT(start()));
+ TQTimer::singleShot( monsterScoreDurMS, this, SLOT(start()));
}
}
@@ -869,43 +869,43 @@ void Referee::introMonster(int id)
void Referee::introPaint(int t)
{
- QString pts;
+ TQString pts;
switch (t) {
- case 0 : repaint(pix->draw(16, 6, RoomPix, i18n("CHARACTER"), WHITE, QColor(), AlignLeft), FALSE);
- repaint(pix->draw(36, 6, RoomPix, i18n("/"), WHITE, QColor(), AlignLeft), FALSE);
- repaint(pix->draw(40, 6, RoomPix, i18n("NICKNAME"), WHITE, QColor(), AlignLeft), FALSE);
+ case 0 : repaint(pix->draw(16, 6, RoomPix, i18n("CHARACTER"), WHITE, TQColor(), AlignLeft), FALSE);
+ repaint(pix->draw(36, 6, RoomPix, i18n("/"), WHITE, TQColor(), AlignLeft), FALSE);
+ repaint(pix->draw(40, 6, RoomPix, i18n("NICKNAME"), WHITE, TQColor(), AlignLeft), FALSE);
break;
case 1 : introMonster(0);
break;
- case 2 : repaint(pix->draw(16, 10, RoomPix, i18n("-SHADOW"), RED, QColor(), AlignLeft), FALSE);
+ case 2 : repaint(pix->draw(16, 10, RoomPix, i18n("-SHADOW"), RED, TQColor(), AlignLeft), FALSE);
break;
- case 3 : repaint(pix->draw(38, 10, RoomPix, i18n("\"BLINKY\""), RED, QColor(), AlignLeft), FALSE);
+ case 3 : repaint(pix->draw(38, 10, RoomPix, i18n("\"BLINKY\""), RED, TQColor(), AlignLeft), FALSE);
break;
case 4 : introMonster(1);
break;
- case 5 : repaint(pix->draw(16, 16, RoomPix, i18n("-SPEEDY"), PINK, QColor(), AlignLeft), FALSE);
+ case 5 : repaint(pix->draw(16, 16, RoomPix, i18n("-SPEEDY"), PINK, TQColor(), AlignLeft), FALSE);
break;
- case 6 : repaint(pix->draw(38, 16, RoomPix, i18n("\"PINKY\""), PINK, QColor(), AlignLeft), FALSE);
+ case 6 : repaint(pix->draw(38, 16, RoomPix, i18n("\"PINKY\""), PINK, TQColor(), AlignLeft), FALSE);
break;
case 7 : introMonster(2);
break;
- case 8 : repaint(pix->draw(16, 22, RoomPix, i18n("-BASHFUL"), CYAN, QColor(), AlignLeft), FALSE);
+ case 8 : repaint(pix->draw(16, 22, RoomPix, i18n("-BASHFUL"), CYAN, TQColor(), AlignLeft), FALSE);
break;
- case 9 : repaint(pix->draw(38, 22, RoomPix, i18n("\"INKY\""), CYAN, QColor(), AlignLeft), FALSE);
+ case 9 : repaint(pix->draw(38, 22, RoomPix, i18n("\"INKY\""), CYAN, TQColor(), AlignLeft), FALSE);
break;
case 10 : introMonster(3);
break;
- case 11 : repaint(pix->draw(16, 28, RoomPix, i18n("-POKEY"), ORANGE, QColor(), AlignLeft), FALSE);
+ case 11 : repaint(pix->draw(16, 28, RoomPix, i18n("-POKEY"), ORANGE, TQColor(), AlignLeft), FALSE);
break;
- case 12 : repaint(pix->draw(38, 28, RoomPix, i18n("\"CLYDE\""), ORANGE, QColor(), AlignLeft), FALSE);
+ case 12 : repaint(pix->draw(38, 28, RoomPix, i18n("\"CLYDE\""), ORANGE, TQColor(), AlignLeft), FALSE);
break;
case 13 : pts.sprintf("%d", pointScore);
- repaint(pix->draw(28, 44, RoomPix, pts.data(), WHITE, QColor(), AlignRight), FALSE);
- repaint(pix->draw(31, 44, RoomPix, "\x1C\x1D\x1E", WHITE, QColor(), AlignLeft), FALSE);
+ repaint(pix->draw(28, 44, RoomPix, pts.data(), WHITE, TQColor(), AlignRight), FALSE);
+ repaint(pix->draw(31, 44, RoomPix, "\x1C\x1D\x1E", WHITE, TQColor(), AlignLeft), FALSE);
pts.sprintf("%d", energizerScore);
- repaint(pix->draw(28, 48, RoomPix, pts.data(), WHITE, QColor(), AlignRight), FALSE);
- repaint(pix->draw(31, 48, RoomPix, "\x1C\x1D\x1E", WHITE, QColor(), AlignLeft), FALSE);
+ repaint(pix->draw(28, 48, RoomPix, pts.data(), WHITE, TQColor(), AlignRight), FALSE);
+ repaint(pix->draw(31, 48, RoomPix, "\x1C\x1D\x1E", WHITE, TQColor(), AlignLeft), FALSE);
break;
case 14 : // "@ 1980 MIDWAY MFG.CO."
repaint(pix->draw(30, 58, RoomPix, "© 1998-2003 J.THÖNNISSEN", PINK), FALSE);
@@ -918,14 +918,14 @@ void Referee::introPlay()
if (!gameState.testBit(Introducing) || gameState.testBit(Ready))
return;
if (gameState.testBit(Paused) || gameState.testBit(HallOfFame)) {
- QTimer::singleShot(afterPauseMS, this, SLOT(introPlay()));
+ TQTimer::singleShot(afterPauseMS, this, SLOT(introPlay()));
return;
}
if (!gameState.testBit(Init)) {
if (monstersEaten == 4) {
stop();
- QTimer::singleShot(introPostAnimationMS, this, SLOT(demo()));
+ TQTimer::singleShot(introPostAnimationMS, this, SLOT(demo()));
}
if (pacman->direction() == W) {
int id = -1;
@@ -984,7 +984,7 @@ void Referee::introPlay()
}
if (timerCount++ < 15)
- QTimer::singleShot(introAnimationMS, this, SLOT(introPlay()));
+ TQTimer::singleShot(introAnimationMS, this, SLOT(introPlay()));
}
void Referee::demo()
@@ -993,7 +993,7 @@ void Referee::demo()
return;
if (gameState.testBit(Paused) || gameState.testBit(HallOfFame)) {
- QTimer::singleShot(afterPauseMS, this, SLOT(demo()));
+ TQTimer::singleShot(afterPauseMS, this, SLOT(demo()));
return;
}
@@ -1020,7 +1020,7 @@ void Referee::demo()
repaint();
timerCount = 0;
- QTimer::singleShot(playerDurMS, this, SLOT(start()));
+ TQTimer::singleShot(playerDurMS, this, SLOT(start()));
}
void Referee::play()
@@ -1061,13 +1061,13 @@ void Referee::play()
repaint(pix->rect(board->position(fruithome), i18n("READY!")), FALSE);
timerCount = 0;
- QTimer::singleShot(playerDurMS, this, SLOT(ready()));
+ TQTimer::singleShot(playerDurMS, this, SLOT(ready()));
}
void Referee::ready()
{
if (gameState.testBit(Paused) || gameState.testBit(HallOfFame)) {
- QTimer::singleShot(afterPauseMS, this, SLOT(ready()));
+ TQTimer::singleShot(afterPauseMS, this, SLOT(ready()));
return;
}
@@ -1077,7 +1077,7 @@ void Referee::ready()
gameState.clearBit(Init);
repaint(pix->rect(board->position(monsterhome, 0), i18n("PLAYER ONE")), FALSE);
repaintFigures();
- QTimer::singleShot(playerDurMS, this, SLOT(ready()));
+ TQTimer::singleShot(playerDurMS, this, SLOT(ready()));
return;
}
@@ -1089,7 +1089,7 @@ void Referee::ready()
gameState.setBit(Ready);
gameState.clearBit(Init);
repaint(pix->rect(board->position(fruithome), i18n("READY!")), FALSE);
- QTimer::singleShot(readyDurMS, this, SLOT(ready()));
+ TQTimer::singleShot(readyDurMS, this, SLOT(ready()));
}
}
@@ -1104,7 +1104,7 @@ void Referee::levelUp()
repaint(pix->rect(pacman->position(), PacmanPix));
timerCount = 0;
- QTimer::singleShot(levelUpPreAnimationMS, this, SLOT(levelUpPlay()));
+ TQTimer::singleShot(levelUpPreAnimationMS, this, SLOT(levelUpPlay()));
}
void Referee::levelUpPlay()
@@ -1113,7 +1113,7 @@ void Referee::levelUpPlay()
return;
if (gameState.testBit(Paused) || gameState.testBit(HallOfFame)) {
- QTimer::singleShot(afterPauseMS, this, SLOT(levelUpPlay()));
+ TQTimer::singleShot(afterPauseMS, this, SLOT(levelUpPlay()));
return;
}
@@ -1128,7 +1128,7 @@ void Referee::levelUpPlay()
}
if (timerCount++ < 2) {
- QTimer::singleShot(levelUpAnimationMS, this, SLOT(levelUpPlay()));
+ TQTimer::singleShot(levelUpAnimationMS, this, SLOT(levelUpPlay()));
return;
}
@@ -1162,7 +1162,7 @@ void Referee::start()
return;
if (gameState.testBit(Paused) || gameState.testBit(HallOfFame)) {
- QTimer::singleShot(afterPauseMS, this, SLOT(start()));
+ TQTimer::singleShot(afterPauseMS, this, SLOT(start()));
return;
}
@@ -1212,11 +1212,11 @@ void Referee::killed()
for (Monster *m = monsters->first(); m != 0; m = monsters->next())
if (m)
m->setDirection(X);
- QTimer::singleShot(dyingPreAnimationMS, this, SLOT(killed()));
+ TQTimer::singleShot(dyingPreAnimationMS, this, SLOT(killed()));
} else {
stop();
if (gameState.testBit(Paused) || gameState.testBit(HallOfFame)) {
- QTimer::singleShot(afterPauseMS, this, SLOT(killed()));
+ TQTimer::singleShot(afterPauseMS, this, SLOT(killed()));
return;
}
@@ -1234,16 +1234,16 @@ void Referee::killedPlay()
if (!gameState.testBit(Dying) || gameState.testBit(Ready))
return;
if (gameState.testBit(Paused) || gameState.testBit(HallOfFame)) {
- QTimer::singleShot(afterPauseMS, this, SLOT(killedPlay()));
+ TQTimer::singleShot(afterPauseMS, this, SLOT(killedPlay()));
return;
}
if (timerCount <= pix->maxPixmaps(DyingPix)) {
repaint(pix->rect(pacman->position(), PacmanPix), FALSE);
if (timerCount >= pix->maxPixmaps(DyingPix)-1 || timerCount == 0)
- QTimer::singleShot(dyingPostAnimationMS, this, SLOT(killedPlay()));
+ TQTimer::singleShot(dyingPostAnimationMS, this, SLOT(killedPlay()));
else
- QTimer::singleShot(dyingAnimationMS, this, SLOT(killedPlay()));
+ TQTimer::singleShot(dyingAnimationMS, this, SLOT(killedPlay()));
timerCount++;
} else {
gameState.clearBit(Dying);
@@ -1256,7 +1256,7 @@ void Referee::killedPlay()
repaint(pix->rect(board->position(energizer, e), EnergizerPix), FALSE);
}
repaint(pix->rect(board->position(fruithome), i18n("GAME OVER")), FALSE);
- QTimer::singleShot(gameOverDurMS, this, SLOT(hallOfFame()));
+ TQTimer::singleShot(gameOverDurMS, this, SLOT(hallOfFame()));
} else {
gameState.clearBit(Init);
initPacman();
@@ -1311,7 +1311,7 @@ void Referee::initMonsters()
for (int id = 0; id < (gameState.testBit(Introducing) ? 4 : board->monsters()); id++) {
Monster *m = new Monster(board, id);
monsters->append(m);
- QRect *r = new QRect();
+ TQRect *r = new TQRect();
monsterRect->append(r);
if (!gameState.testBit(Introducing)) {
m->setFreedom(board->position(prisonexit));
@@ -1343,7 +1343,7 @@ void Referee::initEnergizers()
for (int id = 0; id < (gameState.testBit(Introducing) ? 2 : board->energizers()); id++) {
Energizer *e = new Energizer(board);
energizers->append(e);
- QRect *r = new QRect();
+ TQRect *r = new TQRect();
energizerRect->append(r);
if (!gameState.testBit(Introducing)) {
e->setPosition(board->position(energizer, id));
@@ -1370,7 +1370,7 @@ void Referee::setFocusInContinue(bool FocusInContinue)
focusInContinue = FocusInContinue;
}
-void Referee::focusInEvent(QFocusEvent *)
+void Referee::focusInEvent(TQFocusEvent *)
{
if (focusInContinue && focusedPause &&
gameState.testBit(Paused) && gameState.testBit(Playing)) {
@@ -1380,7 +1380,7 @@ void Referee::focusInEvent(QFocusEvent *)
}
}
-void Referee::focusOutEvent(QFocusEvent *)
+void Referee::focusOutEvent(TQFocusEvent *)
{
if (focusOutPause && !focusedPause &&
!gameState.testBit(Paused) && gameState.testBit(Playing)) {
diff --git a/kpacman/referee.h b/kpacman/referee.h
index 376b5c2..3cb2b59 100644
--- a/kpacman/referee.h
+++ b/kpacman/referee.h
@@ -6,11 +6,11 @@
#endif
#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
#include "board.h"
#include "pacman.h"
@@ -24,11 +24,11 @@ enum { Init, Introducing, Playing, Demonstration, Paused, Player, Ready,
Scoring, LevelDone, Dying, GameOver, HallOfFame };
-class Referee : public QWidget
+class Referee : public TQWidget
{
Q_OBJECT
public:
- Referee (QWidget *parent=0, const char *name=0, int scheme=-1, int mode=-1, Bitfont *font=0);
+ Referee (TQWidget *parent=0, const char *name=0, int scheme=-1, int mode=-1, Bitfont *font=0);
void setSkill(int);
void setRoom(int);
@@ -72,15 +72,15 @@ signals:
void forcedGameHighscores();
protected:
- void timerEvent(QTimerEvent *);
- void paintEvent(QPaintEvent *);
- void keyPressEvent(QKeyEvent *);
+ void timerEvent(TQTimerEvent *);
+ void paintEvent(TQPaintEvent *);
+ void keyPressEvent(TQKeyEvent *);
- void focusOutEvent(QFocusEvent *);
- void focusInEvent(QFocusEvent *);
+ void focusOutEvent(TQFocusEvent *);
+ void focusInEvent(TQFocusEvent *);
- void fillArray(QArray &, QString, int);
- void fillStrList(QStrList &, QString, int);
+ void fillArray(TQArray &, TQString, int);
+ void fillStrList(TQStrList &, TQString, int);
void fillMapName();
void confScheme();
@@ -90,33 +90,33 @@ protected:
void confScoring(bool defGroup=TRUE);
private:
- QBitArray gameState;
+ TQBitArray gameState;
int timerCount;
int maxLevel;
int scheme;
int mode;
- QString pixmapDirectory;
- QString mapDirectory;
- QStrList mapName;
-
- QArray speed;
- QArray