summaryrefslogtreecommitdiffstats
path: root/kgoldrunner/src/kgrgame.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
commit838baf3f99ec5ab81b063eb5449a3381d860f377 (patch)
treedd31abcfde08ca92e4623b8f50b3d762a87c997a /kgoldrunner/src/kgrgame.h
parent2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff)
downloadtdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.tar.gz
tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.zip
TQt4 port kdegames
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1236074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kgoldrunner/src/kgrgame.h')
-rw-r--r--kgoldrunner/src/kgrgame.h37
1 files changed, 19 insertions, 18 deletions
diff --git a/kgoldrunner/src/kgrgame.h b/kgoldrunner/src/kgrgame.h
index 18003e3c..5637329c 100644
--- a/kgoldrunner/src/kgrgame.h
+++ b/kgoldrunner/src/kgrgame.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2003 by Ian Wadham and Marco Kr�ger *
+ * Copyright (C) 2003 by Ian Wadham and Marco Kr�ger *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -10,14 +10,14 @@
#ifndef KGRGAME_H
#define KGRGAME_H
-// Macros to smooth out the differences between Qt 1 and Qt 2 classes.
+// Macros to smooth out the differences between TQt 1 and TQt 2 classes.
//
// "myStr" converts a TQString object to a C language "char*" character string.
// "myChar" extracts a C language character (type "char") from a TQString object.
// "endData" checks for an end-of-file condition.
//
#define myStr latin1
-#define myChar(i) at((i)).latin1()
+#define myChar(i) tqat((i)).latin1()
#define endData atEnd
#include <tqobject.h>
@@ -47,9 +47,10 @@ class KGrHero;
class KGrEnemy;
class KGrCollection;
-class KGrGame : public QObject
+class KGrGame : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KGrGame (KGrCanvas * theView, TQString theSystemDir, TQString theUserDir);
~KGrGame();
@@ -67,7 +68,7 @@ public:
bool saveOK (bool exiting); // Check if edits were saved.
- QString getTitle(); // Collection - Level NNN, Name.
+ TQString getTitle(); // Collection - Level NNN, Name.
void setEditObj (char newEditObj); // Set object for editor to paint.
@@ -136,16 +137,16 @@ private:
private:
KGrCanvas * view; // Where the game is displayed.
- QString systemDataDir; // System games are stored here.
- QString userDataDir; // User games are stored here.
+ TQString systemDataDir; // System games are stored here.
+ TQString userDataDir; // User games are stored here.
KGrObject * playfield[30][22]; // Array of playfield objects.
char editObjArray[30][22]; // Character-code equivalent.
char lastSaveArray[30][22]; // Copy for use in "saveOK()".
int level; // Current play/edit level.
- QString levelName; // Level name (optional).
- QString levelHint; // Level hint (optional).
+ TQString levelName; // Level name (optional).
+ TQString levelHint; // Level hint (optional).
long lives; // Lives remaining.
long score; // Current score.
@@ -157,7 +158,7 @@ private:
#ifdef QT3
TQPtrList<KGrEnemy> enemies; // The list of enemies.
#else
- QList<KGrEnemy> enemies; // The list of enemies.
+ TQList<KGrEnemy> enemies; // The list of enemies.
#endif
int enemyCount; // How many enemies.
KGrEnemy * enemy; // One of the enemies.
@@ -229,7 +230,7 @@ private:
bool reNumberLevels (int, int, int, int);
bool ownerOK (Owner o);
- // Pixmaps for repainting objects as they are edited.
+ // Pixmaps for tqrepainting objects as they are edited.
TQPixmap digpix[10];
TQPixmap brickbg, fbrickbg;
TQPixmap freebg, nuggetbg, polebg, betonbg, ladderbg, hladderbg;
@@ -249,7 +250,7 @@ private:
#ifdef QT3
TQPtrList<KGrCollection> collections; // List of ALL collections.
#else
- QList<KGrCollection> collections; // List of ALL collections.
+ TQList<KGrCollection> collections; // List of ALL collections.
#endif
KGrCollection * collection; // Collection currently in use.
@@ -264,17 +265,17 @@ private:
/********************** WORD-WRAPPED MESSAGE BOX ************************/
/******************************************************************************/
- void myMessage (TQWidget * parent, TQString title, TQString contents);
+ void myMessage (TQWidget * tqparent, TQString title, TQString contents);
};
/******************************************************************************/
/********************** CLASS TO DISPLAY THUMBNAIL ***********************/
/******************************************************************************/
-class KGrThumbNail : public QFrame
+class KGrThumbNail : public TQFrame
{
public:
- KGrThumbNail (TQWidget *parent = 0, const char *name = 0);
+ KGrThumbNail (TQWidget *tqparent = 0, const char *name = 0);
void setFilePath (TQString &, TQLabel *); // Set filepath and name field.
static TQColor backgroundColor;
@@ -299,11 +300,11 @@ public:
KGrCollection (Owner o, const TQString & n, const TQString & p,
const char s, int nl, const TQString & a);
Owner owner; // Collection owner: "System" or "User".
- QString name; // Collection name.
- QString prefix; // Collection's filename prefix.
+ TQString name; // Collection name.
+ TQString prefix; // Collection's filename prefix.
char settings; // Collection rules: KGoldrunner or Traditional.
int nLevels; // Number of levels in the collection.
- QString about; // Optional text about the collection.
+ TQString about; // Optional text about the collection.
};
#endif