summaryrefslogtreecommitdiffstats
path: root/ktron/tron.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
commit576eb4299a00bc053db35414406f46372a0f70f2 (patch)
tree4c030922d533821db464af566188e7d40cc8848c /ktron/tron.h
parent0718336b6017d1a4fc1d626544180a5a2a29ddec (diff)
downloadtdegames-576eb4299a00bc053db35414406f46372a0f70f2.tar.gz
tdegames-576eb4299a00bc053db35414406f46372a0f70f2.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ktron/tron.h')
-rw-r--r--ktron/tron.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/ktron/tron.h b/ktron/tron.h
index ebfc1d56..188604d8 100644
--- a/ktron/tron.h
+++ b/ktron/tron.h
@@ -26,9 +26,9 @@
#include <config.h>
#endif
-#include <qwidget.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <math.h>
#include <krandomsequence.h>
@@ -48,11 +48,11 @@ class Tron : public QWidget
Q_OBJECT
public:
- Tron(QWidget *parent=0, const char *name=0);
+ Tron(TQWidget *parent=0, const char *name=0);
~Tron();
void setActionCollection(KActionCollection*);
void updatePixmap();
- void setBackgroundPix(QPixmap);
+ void setBackgroundPix(TQPixmap);
void setComputerplayer(Player player, bool);
bool isComputer(Player player);
void setVelocity(int);
@@ -80,21 +80,21 @@ protected:
/** bitBltīs the rect that has to be updated from the
* bufferpixmap on the screen and writes eventually text
*/
- void paintEvent(QPaintEvent *);
+ void paintEvent(TQPaintEvent *);
/** resets game and creates a new playingfield */
- void resizeEvent(QResizeEvent *);
- void keyPressEvent(QKeyEvent *);
- void keyReleaseEvent(QKeyEvent *);
+ void resizeEvent(TQResizeEvent *);
+ void keyPressEvent(TQKeyEvent *);
+ void keyReleaseEvent(TQKeyEvent *);
/** pauses game */
- void focusOutEvent(QFocusEvent *);
+ void focusOutEvent(TQFocusEvent *);
private:
/** Stores key shortcuts */
KActionCollection* actionCollection;
/** Drawing buffer */
- QPixmap *pixmap;
+ TQPixmap *pixmap;
/** The playingfield */
- QMemArray<int> *playfield;
+ TQMemArray<int> *playfield;
/** game status flag */
bool gamePaused;
/** game status flag */
@@ -107,11 +107,11 @@ private:
int fieldHeight;
/** Width of the playingfield in number of rects*/
int fieldWidth;
- QTimer *timer;
+ TQTimer *timer;
player players[2];
/** Backgroundpixmap **/
- QPixmap bgPix;
+ TQPixmap bgPix;
/** time in ms between two moves */
int velocity;
@@ -137,7 +137,7 @@ private:
/** paints players at current player coordinates */
void paintPlayers();
/** draws a rect in current TronStyle at position x,y of the playingfield */
- void drawRect(QPainter & p, int x, int y);
+ void drawRect(TQPainter & p, int x, int y);
/** emits gameEnds(Player) and displays the winner by changing color*/
void showWinner(Player winner);