summaryrefslogtreecommitdiffstats
path: root/kbackgammon/kbgboard.h
diff options
context:
space:
mode:
Diffstat (limited to 'kbackgammon/kbgboard.h')
-rw-r--r--kbackgammon/kbgboard.h158
1 files changed, 79 insertions, 79 deletions
diff --git a/kbackgammon/kbgboard.h b/kbackgammon/kbgboard.h
index e2f35f68..54ad506c 100644
--- a/kbackgammon/kbgboard.h
+++ b/kbackgammon/kbgboard.h
@@ -39,23 +39,23 @@
#include <config.h>
#endif
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qdialog.h>
-#include <qstring.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qbitmap.h>
-#include <qregexp.h>
-#include <qradiobutton.h>
-#include <qwidget.h>
-#include <qptrlist.h>
-#include <qtimer.h>
-#include <qlabel.h>
-#include <qcursor.h>
-#include <qpopupmenu.h>
-#include <qcombobox.h>
+#include <tqspinbox.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqdialog.h>
+#include <tqstring.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqbitmap.h>
+#include <tqregexp.h>
+#include <tqradiobutton.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
+#include <tqcursor.h>
+#include <tqpopupmenu.h>
+#include <tqcombobox.h>
#include <kdialogbase.h>
#include <kfontdialog.h>
@@ -109,8 +109,8 @@ class KBgBoard : public QWidget
/**
* Constructor and destructor. Parameter as usual.
*/
- KBgBoard(QWidget *parent = 0, const char *name = 0,
- QPopupMenu *menu = 0);
+ KBgBoard(TQWidget *parent = 0, const char *name = 0,
+ TQPopupMenu *menu = 0);
virtual ~KBgBoard();
/**
@@ -141,14 +141,14 @@ class KBgBoard : public QWidget
* Sets the background color and passes the info to the
* child widgets
*/
- virtual void setBackgroundColor(const QColor &col);
+ virtual void setBackgroundColor(const TQColor &col);
/**
* Prints the baord along with some basic info onto the
* painetr p. It is assumed that this painter is a postscript
* printer. Hence the plot is black/white only.
*/
- void print(QPainter *p);
+ void print(TQPainter *p);
/**
* Get whose turn it is - US, THEM or 0
@@ -174,13 +174,13 @@ class KBgBoard : public QWidget
* Get the font the board cells should use for the display of
* numbers and cube value.
*/
- QFont getFont() const;
+ TQFont getFont() const;
/**
* This function has to be reimplemented to provide a minimum size for
* the playing area.
*/
- QSize minimumSizeHint() const;
+ TQSize minimumSizeHint() const;
public slots:
/**
@@ -196,7 +196,7 @@ public slots:
* We overwrite the handler to make sure that all the cells are
* repainted as well.
*/
- virtual void resizeEvent(QResizeEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
/**
* Undo the last move.
@@ -218,7 +218,7 @@ public slots:
/**
* Set the context menu
*/
- void setContextMenu(QPopupMenu *menu);
+ void setContextMenu(TQPopupMenu *menu);
/**
* Get the current state of the board.
@@ -235,7 +235,7 @@ public slots:
* Allows the users of the board classe to set the font to be used
* on the board. Note that the fontsize is dynamically set
*/
- void setFont(const QFont& f);
+ void setFont(const TQFont& f);
/**
* Write the current configuration to the application's data base
@@ -253,7 +253,7 @@ public slots:
* The text identifies the current game status - could be put
* into the main window caption
*/
- void statText(const QString &msg);
+ void statText(const TQString &msg);
/**
* The cells connect to this signal and it tells them that it is
@@ -276,7 +276,7 @@ public slots:
* Once the moves are all made, build a server command and send
* them out.
*/
- void currentMove(QString *s);
+ void currentMove(TQString *s);
/* ************************************************** */
/* ************************************************** */
@@ -291,10 +291,10 @@ public slots:
/* ************************************************** */
protected:
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
- QColor baseColors[2];
- QFont boardFont;
+ TQColor baseColors[2];
+ TQFont boardFont;
KBgBoardCell* cells[30];
bool computePipCount;
@@ -382,26 +382,26 @@ protected:
* Draws a piece on the painter p, with the upper left corner
* of the enclosing rectangle being (x,y)
*/
- void drawCircle(QPainter *p, int x, int y, int pcs, int diam,
+ void drawCircle(TQPainter *p, int x, int y, int pcs, int diam,
int col, bool upper, bool outer) const;
/**
* Draws an anti-aliased checker on the painter p.
*/
- void drawChecker(QPainter *p, int x, int y, int pcs, int diam,
+ void drawChecker(TQPainter *p, int x, int y, int pcs, int diam,
int col, bool upper) const;
/**
* Draws a simple 2-color checker on the painter p. This is intended
* for printing.
*/
- void drawSimpleChecker(QPainter *p, int x, int y, int pcs,
+ void drawSimpleChecker(TQPainter *p, int x, int y, int pcs,
int diam) const;
/**
* Given a position on the board, return the cell under the mouse pointer
*/
- KBgBoardCell* getCellByPos(const QPoint& p) const;
+ KBgBoardCell* getCellByPos(const TQPoint& p) const;
/**
* Name says it all, doesn't it?
@@ -411,7 +411,7 @@ protected:
/**
* Temporary replace the cursor, saves the old one
*/
- void replaceCursor(const QCursor& c);
+ void replaceCursor(const TQCursor& c);
/**
* Restore the previously stored cursor.
@@ -421,7 +421,7 @@ protected:
/**
* Given the sign of p, return the current base color
*/
- QColor getCheckerColor(int p) const;
+ TQColor getCheckerColor(int p) const;
/**
* Small utility function for makeMove - just for readability
@@ -431,9 +431,9 @@ protected:
/**
* Private data members - no description needed
*/
- QPopupMenu *contextMenu;
- QPtrList<KBgBoardMove> moveHistory;
- QPtrList<KBgBoardMove> redoHistory;
+ TQPopupMenu *contextMenu;
+ TQPtrList<KBgBoardMove> moveHistory;
+ TQPtrList<KBgBoardMove> redoHistory;
int direction, color;
int hasmoved;
bool allowmoving, editMode;
@@ -448,7 +448,7 @@ protected:
bool cubechanged;
bool maydouble[2];
int shortMoveMode;
- QCursor *savedCursor;
+ TQCursor *savedCursor;
};
/**
@@ -467,7 +467,7 @@ class KBgBoardCell : public QLabel
/**
* Constructor and destructor
*/
- KBgBoardCell(QWidget * parent, int numID);
+ KBgBoardCell(TQWidget * parent, int numID);
virtual ~KBgBoardCell();
/**
@@ -479,7 +479,7 @@ class KBgBoardCell : public QLabel
/**
* Draws the content of the cell on the painter *p
*/
- virtual void paintCell(QPainter *p, int xo = 0, int yo = 0,
+ virtual void paintCell(TQPainter *p, int xo = 0, int yo = 0,
double sf = 1.0) const;
/**
@@ -492,10 +492,10 @@ protected:
/**
* Draw vertical lines around the board.
*/
- void drawVertBorder(QPainter *p, int xo, int yo, double sf = 1.0) const;
- void drawOverlappingCheckers(QPainter *p, int xo, int yo,
+ void drawVertBorder(TQPainter *p, int xo, int yo, double sf = 1.0) const;
+ void drawOverlappingCheckers(TQPainter *p, int xo, int yo,
double sf = 1.0) const;
- void drawCube(QPainter *p, int who, int xo, int yo, double sf = 1.0) const;
+ void drawCube(TQPainter *p, int who, int xo, int yo, double sf = 1.0) const;
/**
* Puts a piece of color on a field
@@ -530,7 +530,7 @@ protected:
/**
* Overwrite how a cell draws itself
*/
- virtual void drawContents(QPainter *);
+ virtual void drawContents(TQPainter *);
/**
* Status numbers that store the current board status.
@@ -561,17 +561,17 @@ protected:
* sense without the other). So the pieces know and access their parent.
*/
KBgBoard *board;
- void checkAndMakeShortMove(QMouseEvent *e, int m);
+ void checkAndMakeShortMove(TQMouseEvent *e, int m);
/**
* Returns the bounding rectangle of the cube on this cell
*/
- QRect cubeRect( int who, bool big, double sf = 1.0 ) const;
+ TQRect cubeRect( int who, bool big, double sf = 1.0 ) const;
/**
* Returns the bounding rectangle of the dice i on this cell
*/
- QRect diceRect(int i, bool big, double sf = 1.0, double scale = 0.45) const;
+ TQRect diceRect(int i, bool big, double sf = 1.0, double scale = 0.45) const;
bool dragInProgress;
protected slots:
@@ -588,8 +588,8 @@ protected:
/**
* Possibly initiate a drag.
*/
- virtual void mouseMoveEvent( QMouseEvent * );
- virtual void mousePressEvent(QMouseEvent *e);
+ virtual void mouseMoveEvent( TQMouseEvent * );
+ virtual void mousePressEvent(TQMouseEvent *e);
/**
* Make the shortes possible move away from this cell
@@ -600,12 +600,12 @@ protected:
/**
* Catch a single left click and perhapes make a move.
*/
- virtual void mouseReleaseEvent( QMouseEvent *e );
+ virtual void mouseReleaseEvent( TQMouseEvent *e );
/**
* Catch a double left click and perhapes make a move.
*/
- virtual void mouseDoubleClickEvent( QMouseEvent *e );
+ virtual void mouseDoubleClickEvent( TQMouseEvent *e );
};
/**
@@ -626,13 +626,13 @@ class KBgBoardHome : public KBgBoardCell
/*
* Draws the content of the cell on the painter *p
*/
- virtual void paintCell(QPainter *p, int xo = 0, int yo = 0,
+ virtual void paintCell(TQPainter *p, int xo = 0, int yo = 0,
double sf = 1.0) const;
/**
* Constructor and destructor
*/
- KBgBoardHome( QWidget * parent, int numID);
+ KBgBoardHome( TQWidget * parent, int numID);
virtual ~KBgBoardHome();
/**
@@ -649,17 +649,17 @@ class KBgBoardHome : public KBgBoardCell
/**
* Get the double clicks
*/
- virtual void mouseDoubleClickEvent( QMouseEvent *e );
+ virtual void mouseDoubleClickEvent( TQMouseEvent *e );
/**
* The homes contain dice and cube. This draws them.
*/
- void drawDiceAndCube(QPainter *p, int who, int xo, int yo,
+ void drawDiceAndCube(TQPainter *p, int who, int xo, int yo,
double sf) const;
- void drawDiceFrame(QPainter *p, int col, int num, int xo, int yo,
+ void drawDiceFrame(TQPainter *p, int col, int num, int xo, int yo,
bool big, double sf) const;
- void drawDiceFace(QPainter *p, int col, int num, int who, int xo,
+ void drawDiceFace(TQPainter *p, int col, int num, int who, int xo,
int yo, double sf) const;
private:
@@ -688,13 +688,13 @@ class KBgBoardBar : public KBgBoardCell
/**
* Draws the content of the cell on the painter *p
*/
- virtual void paintCell(QPainter *p, int xo = 0, int yo = 0,
+ virtual void paintCell(TQPainter *p, int xo = 0, int yo = 0,
double sf = 1.0) const;
/**
* Constructor
*/
- KBgBoardBar( QWidget * parent, int numID );
+ KBgBoardBar( TQWidget * parent, int numID );
/**
* Destructor
@@ -714,7 +714,7 @@ class KBgBoardBar : public KBgBoardCell
/**
* Get the double clicks
*/
- virtual void mouseDoubleClickEvent(QMouseEvent *e);
+ virtual void mouseDoubleClickEvent(TQMouseEvent *e);
};
/**
@@ -729,7 +729,7 @@ class KBgBoardField : public KBgBoardCell
/**
* Constructor and destructor
*/
- KBgBoardField( QWidget * parent, int numID);
+ KBgBoardField( TQWidget * parent, int numID);
virtual ~KBgBoardField();
/**
@@ -741,7 +741,7 @@ class KBgBoardField : public KBgBoardCell
/**
* Draws the content of the cell on the painter *p
*/
- virtual void paintCell(QPainter *p, int xo = 0, int yo = 0,
+ virtual void paintCell(TQPainter *p, int xo = 0, int yo = 0,
double sf = 1.0) const;
/**
@@ -833,9 +833,9 @@ protected:
/**
* Spin boxes and buttons are children
*/
- QSpinBox *sb[2];
- QPushButton *ok;
- QPushButton *cancel;
+ TQSpinBox *sb[2];
+ TQPushButton *ok;
+ TQPushButton *cancel;
public slots:
@@ -866,9 +866,9 @@ protected:
/**
* Spin boxes and buttons are children
*/
- QComboBox *cb[2];
- QPushButton *ok;
- QPushButton *cancel;
+ TQComboBox *cb[2];
+ TQPushButton *ok;
+ TQPushButton *cancel;
public slots:
@@ -892,7 +892,7 @@ protected slots:
/**
* Extension of the KBgBoard class that can add itself
- * to a QTabDialog for configuration.
+ * to a TQTabDialog for configuration.
*/
class KBgBoardSetup : public KBgBoard
{
@@ -903,8 +903,8 @@ public:
/**
* Constructor
*/
- KBgBoardSetup(QWidget *parent = 0, const char *name = 0,
- QPopupMenu *menu = 0);
+ KBgBoardSetup(TQWidget *parent = 0, const char *name = 0,
+ TQPopupMenu *menu = 0);
/**
* Lets the board put its setup pages into the notebook nb
@@ -952,16 +952,16 @@ private:
*/
KFontChooser *kf;
- QRadioButton *rbMove[3];
+ TQRadioButton *rbMove[3];
- QColor saveBackgroundColor;
- QColor saveBaseColors[2];
+ TQColor saveBackgroundColor;
+ TQColor saveBaseColors[2];
/**
* Need these to change their colors
*/
- QPushButton *pbc_1, *pbc_2, *pbc_3;
- QCheckBox *cbp;
+ TQPushButton *pbc_1, *pbc_2, *pbc_3;
+ TQCheckBox *cbp;
};
#endif // KBGBOARD_H