summaryrefslogtreecommitdiffstats
path: root/knights/board_2d.h
diff options
context:
space:
mode:
Diffstat (limited to 'knights/board_2d.h')
-rw-r--r--knights/board_2d.h43
1 files changed, 22 insertions, 21 deletions
diff --git a/knights/board_2d.h b/knights/board_2d.h
index f2291e2..43a820a 100644
--- a/knights/board_2d.h
+++ b/knights/board_2d.h
@@ -19,8 +19,8 @@
#define BOARD_2D_H
#include <board_base.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
/**
*@author The Knights Team
@@ -33,30 +33,31 @@ typedef struct sprite
int POSITION_Origin;
int POSITION_Destination;
int POSITION_TargetTaken;
- QPoint POINT_Origin;
- QPoint POINT_Current;
- QPoint POINT_LastUpdate;
- QPoint POINT_Destination;
- QPixmap PIXMAP_Sprite;
- QPixmap PIXMAP_FlipFrame;
+ TQPoint POINT_Origin;
+ TQPoint POINT_Current;
+ TQPoint POINT_LastUpdate;
+ TQPoint POINT_Destination;
+ TQPixmap PIXMAP_Sprite;
+ TQPixmap PIXMAP_FlipFrame;
};
-typedef QPtrList<sprite> SpriteList;
+typedef TQPtrList<sprite> SpriteList;
class KnightsPixCache;
class board_2d : public board_base
{
Q_OBJECT
+ TQ_OBJECT
public:
- board_2d(QWidget *parent=0, const char *name=0, resource *Rsrc=0, logic *Lgc=0);
+ board_2d(TQWidget *tqparent=0, const char *name=0, resource *Rsrc=0, logic *Lgc=0);
~board_2d();
virtual void drawMove( const ChessMove &chessMove, const bool &reverse=FALSE );
virtual void setPremovePositions( const int&, const int& );
virtual void redrawLights( void );
- void paintEvent( QPaintEvent *event );
- void mouseReleaseEvent( QMouseEvent *event );
- void mousePressEvent( QMouseEvent *event );
- void mouseMoveEvent( QMouseEvent *event );
+ void paintEvent( TQPaintEvent *event );
+ void mouseReleaseEvent( TQMouseEvent *event );
+ void mousePressEvent( TQMouseEvent *event );
+ void mouseMoveEvent( TQMouseEvent *event );
public slots:
virtual void resizeBoard( void );
@@ -65,13 +66,13 @@ class board_2d : public board_base
virtual void commit( void );
protected:
- void drawCoords( QPixmap *pic, const int &pos );
- QPoint coords( const int&, const int&);
- int position( const QPoint& );
+ void drawCoords( TQPixmap *pic, const int &pos );
+ TQPoint coords( const int&, const int&);
+ int position( const TQPoint& );
void drawSprites( void );
- QPixmap getChessman( const int &pos );
+ TQPixmap getChessman( const int &pos );
bool isSprite( const int &pos );
- void myBlit( const QPoint &dp, const QPaintDevice *src, const QRect &sr );
+ void myBlit( const TQPoint &dp, const TQPaintDevice *src, const TQRect &sr );
protected slots:
void updateSprites( void );
@@ -80,8 +81,8 @@ class board_2d : public board_base
SpriteList sprites;
sprite *DragSprite;
KnightsPixCache *cache;
- QPixmap myself;
- QPoint pressPoint;
+ TQPixmap myself;
+ TQPoint pressPoint;
bool orientation;
bool lastMoveWasDrag;
bool init;