summaryrefslogtreecommitdiffstats
path: root/kbackgammon/kbgboard.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 /kbackgammon/kbgboard.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 'kbackgammon/kbgboard.h')
-rw-r--r--kbackgammon/kbgboard.h76
1 files changed, 42 insertions, 34 deletions
diff --git a/kbackgammon/kbgboard.h b/kbackgammon/kbgboard.h
index 54ad506c..04cac55f 100644
--- a/kbackgammon/kbgboard.h
+++ b/kbackgammon/kbgboard.h
@@ -64,9 +64,9 @@
/*
* Just some internal constants and classes
*/
-const int US = KBgStatus::US;
-const int THEM = KBgStatus::THEM;
-const int BOTH = KBgStatus::BOTH;
+const int US = KBgtqStatus::US;
+const int THEM = KBgtqStatus::THEM;
+const int BOTH = KBgtqStatus::BOTH;
const int HOME_US_LEFT = 101;
const int HOME_US_RIGHT = 102;
@@ -87,7 +87,7 @@ class KBgBoardMove;
class KBgBoardHome;
class KBgBoardBar;
class KBgBoardField;
-class KBgBoardQDice;
+class KBgBoardTQDice;
/**
@@ -95,9 +95,10 @@ class KBgBoardQDice;
*
* This class handles all game operations of the client.
*/
-class KBgBoard : public QWidget
+class KBgBoard : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
friend class KBgBoardCell;
friend class KBgBoardHome;
@@ -109,7 +110,7 @@ class KBgBoard : public QWidget
/**
* Constructor and destructor. Parameter as usual.
*/
- KBgBoard(TQWidget *parent = 0, const char *name = 0,
+ KBgBoard(TQWidget *tqparent = 0, const char *name = 0,
TQPopupMenu *menu = 0);
virtual ~KBgBoard();
@@ -180,7 +181,7 @@ class KBgBoard : public QWidget
* This function has to be reimplemented to provide a minimum size for
* the playing area.
*/
- TQSize minimumSizeHint() const;
+ TQSize tqminimumSizeHint() const;
public slots:
/**
@@ -194,7 +195,7 @@ public slots:
* Overwritten resize event handler.
*
* We overwrite the handler to make sure that all the cells are
- * repainted as well.
+ * tqrepainted as well.
*/
virtual void resizeEvent(TQResizeEvent *);
@@ -210,10 +211,10 @@ public slots:
/**
* This is the most important public member. It takes
- * a board status - s. the KBgBoardStatus class -
+ * a board status - s. the KBgBoardtqStatus class -
* and sets the board accordingly.
*/
- void setState(const KBgStatus &);
+ void setState(const KBgtqStatus &);
/**
* Set the context menu
@@ -223,7 +224,7 @@ public slots:
/**
* Get the current state of the board.
*/
- KBgStatus *getState(KBgStatus *st) const;
+ KBgtqStatus *getState(KBgtqStatus *st) const;
/**
* Sets the edit mode of the board. In that mode the board can be
@@ -291,7 +292,7 @@ public slots:
/* ************************************************** */
protected:
- virtual TQSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
TQColor baseColors[2];
TQFont boardFont;
@@ -458,21 +459,22 @@ protected:
* on a backgammon board. It has a bunch of virtual functions that
* are overloaded in the derived classes.
*/
-class KBgBoardCell : public QLabel
+class KBgBoardCell : public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor and destructor
*/
- KBgBoardCell(TQWidget * parent, int numID);
+ KBgBoardCell(TQWidget * tqparent, int numID);
virtual ~KBgBoardCell();
/**
* sets the number and color of checkers on this cell
- * takes care of repainting
+ * takes care of tqrepainting
*/
virtual void cellUpdate(const int p, const bool cubechanged = false) = 0;
@@ -533,7 +535,7 @@ protected:
virtual void drawContents(TQPainter *);
/**
- * Status numbers that store the current board status.
+ * tqStatus numbers that store the current board status.
*/
int mouseButton;
int direction;
@@ -550,7 +552,7 @@ protected:
int cellID;
/**
- * Indicates whether this cell needs to repaint itself after
+ * Indicates whether this cell needs to tqrepaint itself after
* the board has been processed.
*/
bool stateChanged;
@@ -558,7 +560,7 @@ protected:
/**
* the board and the pieces are one unit (none makes
- * sense without the other). So the pieces know and access their parent.
+ * sense without the other). So the pieces know and access their tqparent.
*/
KBgBoard *board;
void checkAndMakeShortMove(TQMouseEvent *e, int m);
@@ -615,11 +617,12 @@ protected:
class KBgBoardHome : public KBgBoardCell
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* sets the number and color of checkers on this cell
- * takes care of repainting
+ * takes care of tqrepainting
*/
virtual void cellUpdate(const int p, const bool cubechanged = false);
@@ -632,7 +635,7 @@ class KBgBoardHome : public KBgBoardCell
/**
* Constructor and destructor
*/
- KBgBoardHome( TQWidget * parent, int numID);
+ KBgBoardHome( TQWidget * tqparent, int numID);
virtual ~KBgBoardHome();
/**
@@ -664,7 +667,7 @@ class KBgBoardHome : public KBgBoardCell
private:
/**
- * Save old dice to avoid repainting
+ * Save old dice to avoid tqrepainting
*/
int savedDice[2];
@@ -677,11 +680,12 @@ class KBgBoardHome : public KBgBoardCell
class KBgBoardBar : public KBgBoardCell
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* sets the number and color of checkers on this cell
- * takes care of repainting
+ * takes care of tqrepainting
*/
virtual void cellUpdate(const int p, const bool cubechanged = false);
@@ -694,7 +698,7 @@ class KBgBoardBar : public KBgBoardCell
/**
* Constructor
*/
- KBgBoardBar( TQWidget * parent, int numID );
+ KBgBoardBar( TQWidget * tqparent, int numID );
/**
* Destructor
@@ -724,17 +728,18 @@ class KBgBoardBar : public KBgBoardCell
class KBgBoardField : public KBgBoardCell
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor and destructor
*/
- KBgBoardField( TQWidget * parent, int numID);
+ KBgBoardField( TQWidget * tqparent, int numID);
virtual ~KBgBoardField();
/**
* sets the number and color of checkers on this cell
- * takes care of repainting
+ * takes care of tqrepainting
*/
virtual void cellUpdate(const int p, const bool cubechanged = false);
@@ -816,22 +821,23 @@ class KBgBoardMove
*
* A very simple dialog with two SpinBoxes and two buttons.
*/
-class KBgBoardQDice : public QDialog
+class KBgBoardTQDice : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor and destructor
*/
- KBgBoardQDice(const char *name = 0);
- virtual ~KBgBoardQDice();
+ KBgBoardTQDice(const char *name = 0);
+ virtual ~KBgBoardTQDice();
protected:
/**
- * Spin boxes and buttons are children
+ * Spin boxes and buttons are tqchildren
*/
TQSpinBox *sb[2];
TQPushButton *ok;
@@ -849,22 +855,23 @@ public slots:
/**
* Simple dialog that allows to query the user for the cube value.
*/
-class KBgBoardQCube : public QDialog
+class KBgBoardTQCube : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor and destructor
*/
- KBgBoardQCube(int val, bool us, bool them);
- virtual ~KBgBoardQCube();
+ KBgBoardTQCube(int val, bool us, bool them);
+ virtual ~KBgBoardTQCube();
protected:
/**
- * Spin boxes and buttons are children
+ * Spin boxes and buttons are tqchildren
*/
TQComboBox *cb[2];
TQPushButton *ok;
@@ -897,13 +904,14 @@ protected slots:
class KBgBoardSetup : public KBgBoard
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
*/
- KBgBoardSetup(TQWidget *parent = 0, const char *name = 0,
+ KBgBoardSetup(TQWidget *tqparent = 0, const char *name = 0,
TQPopupMenu *menu = 0);
/**