summaryrefslogtreecommitdiffstats
path: root/kolf/game.h
diff options
context:
space:
mode:
Diffstat (limited to 'kolf/game.h')
-rw-r--r--kolf/game.h364
1 files changed, 182 insertions, 182 deletions
diff --git a/kolf/game.h b/kolf/game.h
index afb13b3c..71698e34 100644
--- a/kolf/game.h
+++ b/kolf/game.h
@@ -10,18 +10,18 @@
#include <math.h>
-#include <qcanvas.h>
-#include <qpainter.h>
-#include <qcolor.h>
-#include <qframe.h>
-#include <qlayout.h>
-#include <qmap.h>
-#include <qpen.h>
-#include <qpoint.h>
-#include <qpointarray.h>
-#include <qrect.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqcanvas.h>
+#include <tqpainter.h>
+#include <tqcolor.h>
+#include <tqframe.h>
+#include <tqlayout.h>
+#include <tqmap.h>
+#include <tqpen.h>
+#include <tqpoint.h>
+#include <tqpointarray.h>
+#include <tqrect.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include "object.h"
#include "config.h"
@@ -55,12 +55,12 @@ public:
void loadState(KConfig *cfg);
int id;
- QPoint spot;
+ TQPoint spot;
BallState state;
bool beginningOfHole;
int score;
};
-class BallStateList : public QValueList<BallStateInfo>
+class BallStateList : public TQValueList<BallStateInfo>
{
public:
int hole;
@@ -75,10 +75,10 @@ public:
Player() : m_ball(new Ball(0)) {};
Ball *ball() const { return m_ball; }
void setBall(Ball *ball) { m_ball = ball; }
- BallStateInfo stateInfo(int hole) const { BallStateInfo ret; ret.spot = QPoint(m_ball->x(), m_ball->y()); ret.state = m_ball->curState(); ret.score = score(hole); ret.beginningOfHole = m_ball->beginningOfHole(); ret.id = m_id; return ret; }
+ BallStateInfo stateInfo(int hole) const { BallStateInfo ret; ret.spot = TQPoint(m_ball->x(), m_ball->y()); ret.state = m_ball->curState(); ret.score = score(hole); ret.beginningOfHole = m_ball->beginningOfHole(); ret.id = m_id; return ret; }
- QValueList<int> scores() const { return m_scores; }
- void setScores(const QValueList<int> &newScores) { m_scores = newScores; }
+ TQValueList<int> scores() const { return m_scores; }
+ void setScores(const TQValueList<int> &newScores) { m_scores = newScores; }
int score(int hole) const { return (*m_scores.at(hole - 1)); }
int lastScore() const { return m_scores.last(); }
int firstScore() const { return m_scores.first(); }
@@ -90,24 +90,24 @@ public:
void addHole() { m_scores.append(0); }
unsigned int numHoles() const { return m_scores.count(); }
- QString name() const { return m_name; }
- void setName(const QString &name) { m_name = name; m_ball->setName(name); }
+ TQString name() const { return m_name; }
+ void setName(const TQString &name) { m_name = name; m_ball->setName(name); }
void setId(int id) { m_id = id; }
int id() const { return m_id; }
private:
Ball *m_ball;
- QValueList<int> m_scores;
- QString m_name;
+ TQValueList<int> m_scores;
+ TQString m_name;
int m_id;
};
-typedef QValueList<Player> PlayerList;
+typedef TQValueList<Player> PlayerList;
class Arrow : public QCanvasLine
{
public:
- Arrow(QCanvas *canvas);
+ Arrow(TQCanvas *canvas);
void setAngle(double newAngle) { m_angle = newAngle; }
double angle() const { return m_angle; }
void setLength(double newLength) { m_length = newLength; }
@@ -115,7 +115,7 @@ public:
void setReversed(bool yes) { m_reversed = yes; }
bool reversed() const { return m_reversed; }
virtual void setVisible(bool);
- virtual void setPen(QPen p);
+ virtual void setPen(TQPen p);
void aboutToDie();
virtual void moveBy(double, double);
void updateSelf();
@@ -125,8 +125,8 @@ private:
double m_angle;
double m_length;
bool m_reversed;
- QCanvasLine *line1;
- QCanvasLine *line2;
+ TQCanvasLine *line1;
+ TQCanvasLine *line2;
};
class RectPoint;
@@ -136,13 +136,13 @@ public:
virtual void newSize(int /*width*/, int /*height*/) {};
};
-class RectPoint : public QCanvasEllipse, public CanvasItem
+class RectPoint : public TQCanvasEllipse, public CanvasItem
{
public:
- RectPoint(QColor color, RectItem *, QCanvas *canvas);
+ RectPoint(TQColor color, RectItem *, TQCanvas *canvas);
void dontMove() { dontmove = true; }
virtual void moveBy(double dx, double dy);
- virtual Config *config(QWidget *parent);
+ virtual Config *config(TQWidget *parent);
virtual bool deleteable() const { return false; }
virtual bool cornerResize() const { return true; }
virtual CanvasItem *itemToDelete() { return dynamic_cast<CanvasItem *>(rect); }
@@ -156,10 +156,10 @@ private:
bool dontmove;
};
-class Ellipse : public QCanvasEllipse, public CanvasItem, public RectItem
+class Ellipse : public TQCanvasEllipse, public CanvasItem, public RectItem
{
public:
- Ellipse(QCanvas *canvas);
+ Ellipse(TQCanvas *canvas);
virtual void advance(int phase);
int changeEvery() const { return m_changeEvery; }
@@ -171,7 +171,7 @@ public:
virtual void aboutToSave();
virtual void savingDone();
- virtual QPtrList<QCanvasItem> moveableItems() const;
+ virtual TQPtrList<TQCanvasItem> moveableItems() const;
virtual void newSize(int width, int height);
virtual void moveBy(double dx, double dy);
@@ -181,7 +181,7 @@ public:
virtual void save(KConfig *cfg);
virtual void load(KConfig *cfg);
- virtual Config *config(QWidget *parent);
+ virtual Config *config(TQWidget *parent);
protected:
RectPoint *point;
@@ -197,7 +197,7 @@ class EllipseConfig : public Config
Q_OBJECT
public:
- EllipseConfig(Ellipse *ellipse, QWidget *);
+ EllipseConfig(Ellipse *ellipse, TQWidget *);
private slots:
void value1Changed(int news);
@@ -206,22 +206,22 @@ private slots:
void check2Changed(bool on);
protected:
- QVBoxLayout *m_vlayout;
+ TQVBoxLayout *m_vlayout;
private:
- QLabel *slow1;
- QLabel *fast1;
- QLabel *slow2;
- QLabel *fast2;
- QSlider *slider1;
- QSlider *slider2;
+ TQLabel *slow1;
+ TQLabel *fast1;
+ TQLabel *slow2;
+ TQLabel *fast2;
+ TQSlider *slider1;
+ TQSlider *slider2;
Ellipse *ellipse;
};
class Puddle : public Ellipse
{
public:
- Puddle(QCanvas *canvas);
+ Puddle(TQCanvas *canvas);
virtual bool collision(Ball *ball, long int id);
virtual int rtti() const { return Rtti_DontPlaceOn; }
};
@@ -229,36 +229,36 @@ class PuddleObj : public Object
{
public:
PuddleObj() { m_name = i18n("Puddle"); m__name = "puddle"; }
- virtual QCanvasItem *newObject(QCanvas *canvas) { return new Puddle(canvas); }
+ virtual TQCanvasItem *newObject(TQCanvas *canvas) { return new Puddle(canvas); }
};
class Sand : public Ellipse
{
public:
- Sand(QCanvas *canvas);
+ Sand(TQCanvas *canvas);
virtual bool collision(Ball *ball, long int id);
};
class SandObj : public Object
{
public:
SandObj() { m_name = i18n("Sand"); m__name = "sand"; }
- virtual QCanvasItem *newObject(QCanvas *canvas) { return new Sand(canvas); }
+ virtual TQCanvasItem *newObject(TQCanvas *canvas) { return new Sand(canvas); }
};
-class Inside : public QCanvasEllipse, public CanvasItem
+class Inside : public TQCanvasEllipse, public CanvasItem
{
public:
- Inside(CanvasItem *item, QCanvas *canvas) : QCanvasEllipse(canvas) { this->item = item; }
+ Inside(CanvasItem *item, TQCanvas *canvas) : TQCanvasEllipse(canvas) { this->item = item; }
virtual bool collision(Ball *ball, long int id) { return item->collision(ball, id); }
protected:
CanvasItem *item;
};
-class Bumper : public QCanvasEllipse, public CanvasItem
+class Bumper : public TQCanvasEllipse, public CanvasItem
{
public:
- Bumper(QCanvas *canvas);
+ Bumper(TQCanvas *canvas);
virtual void advance(int phase);
virtual void aboutToDie();
@@ -268,8 +268,8 @@ public:
virtual bool collision(Ball *ball, long int id);
protected:
- QColor firstColor;
- QColor secondColor;
+ TQColor firstColor;
+ TQColor secondColor;
Inside *inside;
private:
@@ -279,38 +279,38 @@ class BumperObj : public Object
{
public:
BumperObj() { m_name = i18n("Bumper"); m__name = "bumper"; }
- virtual QCanvasItem *newObject(QCanvas *canvas) { return new Bumper(canvas); }
+ virtual TQCanvasItem *newObject(TQCanvas *canvas) { return new Bumper(canvas); }
};
-class Hole : public QCanvasEllipse, public CanvasItem
+class Hole : public TQCanvasEllipse, public CanvasItem
{
public:
- Hole(QColor color, QCanvas *canvas);
+ Hole(TQColor color, TQCanvas *canvas);
virtual bool place(Ball * /*ball*/, bool /*wasCenter*/) { return true; };
virtual bool collision(Ball *ball, long int id);
protected:
- virtual HoleResult result(const QPoint, double, bool *wasCenter);
+ virtual HoleResult result(const TQPoint, double, bool *wasCenter);
};
class Cup : public Hole
{
public:
- Cup(QCanvas *canvas);
+ Cup(TQCanvas *canvas);
virtual bool place(Ball *ball, bool wasCenter);
virtual void save(KConfig *cfg);
virtual bool canBeMovedByOthers() const { return true; }
- virtual void draw(QPainter &painter);
+ virtual void draw(TQPainter &painter);
protected:
- QPixmap pixmap;
+ TQPixmap pixmap;
};
class CupObj : public Object
{
public:
CupObj() { m_name = i18n("Cup"); m__name = "cup"; m_addOnNewHole = true; }
- virtual QCanvasItem *newObject(QCanvas *canvas) { return new Cup(canvas); }
+ virtual TQCanvasItem *newObject(TQCanvas *canvas) { return new Cup(canvas); }
};
class BlackHole;
@@ -319,7 +319,7 @@ class BlackHoleConfig : public Config
Q_OBJECT
public:
- BlackHoleConfig(BlackHole *blackHole, QWidget *parent);
+ BlackHoleConfig(BlackHole *blackHole, TQWidget *parent);
private slots:
void degChanged(int);
@@ -329,22 +329,22 @@ private slots:
private:
BlackHole *blackHole;
};
-class BlackHoleExit : public QCanvasLine, public CanvasItem
+class BlackHoleExit : public TQCanvasLine, public CanvasItem
{
public:
- BlackHoleExit(BlackHole *blackHole, QCanvas *canvas);
+ BlackHoleExit(BlackHole *blackHole, TQCanvas *canvas);
virtual int rtti() const { return Rtti_NoCollision; }
virtual void aboutToDie();
virtual void moveBy(double dx, double dy);
virtual bool deleteable() const { return false; }
virtual bool canBeMovedByOthers() const { return true; }
virtual void editModeChanged(bool editing);
- virtual void setPen(QPen p);
+ virtual void setPen(TQPen p);
virtual void showInfo();
virtual void hideInfo();
void updateArrowAngle();
void updateArrowLength();
- virtual Config *config(QWidget *parent);
+ virtual Config *config(TQWidget *parent);
BlackHole *blackHole;
protected:
@@ -369,12 +369,12 @@ protected:
double m_speed;
Ball *m_ball;
};
-class BlackHole : public QObject, public Hole
+class BlackHole : public TQObject, public Hole
{
Q_OBJECT
public:
- BlackHole(QCanvas *canvas);
+ BlackHole(TQCanvas *canvas);
virtual bool canBeMovedByOthers() const { return true; }
virtual void aboutToDie();
virtual void showInfo();
@@ -382,8 +382,8 @@ public:
virtual bool place(Ball *ball, bool wasCenter);
virtual void save(KConfig *cfg);
virtual void load(KConfig *cfg);
- virtual Config *config(QWidget *parent) { return new BlackHoleConfig(this, parent); }
- virtual QPtrList<QCanvasItem> moveableItems() const;
+ virtual Config *config(TQWidget *parent) { return new BlackHoleConfig(this, parent); }
+ virtual TQPtrList<TQCanvasItem> moveableItems() const;
double minSpeed() const { return m_minSpeed; }
double maxSpeed() const { return m_maxSpeed; }
void setMinSpeed(double news) { m_minSpeed = news; exitItem->updateArrowLength(); }
@@ -411,32 +411,32 @@ protected:
private:
int runs;
- QCanvasLine *infoLine;
- QCanvasEllipse *outside;
+ TQCanvasLine *infoLine;
+ TQCanvasEllipse *outside;
void finishMe();
};
class BlackHoleObj : public Object
{
public:
BlackHoleObj() { m_name = i18n("Black Hole"); m__name = "blackhole"; }
- virtual QCanvasItem *newObject(QCanvas *canvas) { return new BlackHole(canvas); }
+ virtual TQCanvasItem *newObject(TQCanvas *canvas) { return new BlackHole(canvas); }
};
class WallPoint;
-class Wall : public QCanvasLine, public CanvasItem
+class Wall : public TQCanvasLine, public CanvasItem
{
public:
- Wall(QCanvas *canvas);
+ Wall(TQCanvas *canvas);
virtual void aboutToDie();
double dampening;
void setAlwaysShow(bool yes);
virtual void setZ(double newz);
- virtual void setPen(QPen p);
+ virtual void setPen(TQPen p);
virtual bool collision(Ball *ball, long int id);
virtual void save(KConfig *cfg);
virtual void load(KConfig *cfg);
- virtual void selectedItem(QCanvasItem *item);
+ virtual void selectedItem(TQCanvasItem *item);
virtual void editModeChanged(bool changed);
virtual void moveBy(double dx, double dy);
virtual void setVelocity(double vx, double vy);
@@ -444,14 +444,14 @@ public:
// must reimp because we gotta move the end items,
// and we do that in moveBy()
- virtual void setPoints(int xa, int ya, int xb, int yb) { QCanvasLine::setPoints(xa, ya, xb, yb); moveBy(0, 0); }
+ virtual void setPoints(int xa, int ya, int xb, int yb) { TQCanvasLine::setPoints(xa, ya, xb, yb); moveBy(0, 0); }
virtual int rtti() const { return Rtti_Wall; }
- virtual QPtrList<QCanvasItem> moveableItems() const;
+ virtual TQPtrList<TQCanvasItem> moveableItems() const;
virtual void setGame(KolfGame *game);
virtual void setVisible(bool);
- virtual QPointArray areaPoints() const;
+ virtual TQPointArray areaPoints() const;
protected:
WallPoint *startItem;
@@ -463,10 +463,10 @@ private:
friend class WallPoint;
};
-class WallPoint : public QCanvasEllipse, public CanvasItem
+class WallPoint : public TQCanvasEllipse, public CanvasItem
{
public:
- WallPoint(bool start, Wall *wall, QCanvas *canvas);
+ WallPoint(bool start, Wall *wall, TQCanvas *canvas);
void setAlwaysShow(bool yes) { alwaysShow = yes; updateVisible(); }
virtual void editModeChanged(bool changed);
virtual void moveBy(double dx, double dy);
@@ -475,7 +475,7 @@ public:
virtual bool collision(Ball *ball, long int id);
virtual CanvasItem *itemToDelete() { return wall; }
virtual void clean();
- virtual Config *config(QWidget *parent) { return wall->config(parent); }
+ virtual Config *config(TQWidget *parent) { return wall->config(parent); }
void dontMove() { dontmove = true; };
void updateVisible();
@@ -498,13 +498,13 @@ class WallObj : public Object
{
public:
WallObj() { m_name = i18n("Wall"); m__name = "wall"; }
- virtual QCanvasItem *newObject(QCanvas *canvas) { return new Wall(canvas); }
+ virtual TQCanvasItem *newObject(TQCanvas *canvas) { return new Wall(canvas); }
};
-class Putter : public QCanvasLine, public CanvasItem
+class Putter : public TQCanvasLine, public CanvasItem
{
public:
- Putter(QCanvas *canvas);
+ Putter(TQCanvas *canvas);
void go(Direction, Amount amount = Amount_Normal);
void setOrigin(int x, int y);
int curLen() const { return len; }
@@ -525,15 +525,15 @@ public:
void setShowGuideLine(bool yes);
private:
- QPoint midPoint;
+ TQPoint midPoint;
double maxAngle;
double angle;
double oneDegree;
- QMap<Ball *, double> angleMap;
+ TQMap<Ball *, double> angleMap;
int len;
void finishMe();
int putterWidth;
- QCanvasLine *guideLine;
+ TQCanvasLine *guideLine;
bool m_showGuideLine;
};
@@ -543,7 +543,7 @@ class BridgeConfig : public Config
Q_OBJECT
public:
- BridgeConfig(Bridge *bridge, QWidget *);
+ BridgeConfig(Bridge *bridge, TQWidget *);
protected slots:
void topWallChanged(bool);
@@ -552,19 +552,19 @@ protected slots:
void rightWallChanged(bool);
protected:
- QVBoxLayout *m_vlayout;
- QCheckBox *top;
- QCheckBox *bot;
- QCheckBox *left;
- QCheckBox *right;
+ TQVBoxLayout *m_vlayout;
+ TQCheckBox *top;
+ TQCheckBox *bot;
+ TQCheckBox *left;
+ TQCheckBox *right;
private:
Bridge *bridge;
};
-class Bridge : public QCanvasRectangle, public CanvasItem, public RectItem
+class Bridge : public TQCanvasRectangle, public CanvasItem, public RectItem
{
public:
- Bridge(QRect rect, QCanvas *canvas);
+ Bridge(TQRect rect, TQCanvas *canvas);
virtual bool collision(Ball *ball, long int id);
virtual void aboutToDie();
virtual void editModeChanged(bool changed);
@@ -576,12 +576,12 @@ public:
void doSave(KConfig *cfg);
virtual void newSize(int width, int height);
virtual void setGame(KolfGame *game);
- virtual Config *config(QWidget *parent) { return new BridgeConfig(this, parent); }
+ virtual Config *config(TQWidget *parent) { return new BridgeConfig(this, parent); }
void setSize(int width, int height);
- virtual QPtrList<QCanvasItem> moveableItems() const;
+ virtual TQPtrList<TQCanvasItem> moveableItems() const;
- void setWallColor(QColor color);
- QPen wallPen() const { return topWall->pen(); }
+ void setWallColor(TQColor color);
+ TQPen wallPen() const { return topWall->pen(); }
double wallZ() const { return topWall->z(); }
void setWallZ(double);
@@ -606,7 +606,7 @@ class BridgeObj : public Object
{
public:
BridgeObj() { m_name = i18n("Bridge"); m__name = "bridge"; }
- virtual QCanvasItem *newObject(QCanvas *canvas) { return new Bridge(QRect(0, 0, 80, 40), canvas); }
+ virtual TQCanvasItem *newObject(TQCanvas *canvas) { return new Bridge(TQRect(0, 0, 80, 40), canvas); }
};
class Sign;
@@ -615,10 +615,10 @@ class SignConfig : public BridgeConfig
Q_OBJECT
public:
- SignConfig(Sign *sign, QWidget *parent);
+ SignConfig(Sign *sign, TQWidget *parent);
private slots:
- void textChanged(const QString &);
+ void textChanged(const TQString &);
private:
Sign *sign;
@@ -626,31 +626,31 @@ private:
class Sign : public Bridge
{
public:
- Sign(QCanvas *canvas);
- void setText(const QString &text);
- QString text() const { return m_text; }
- virtual void draw(QPainter &painter);
+ Sign(TQCanvas *canvas);
+ void setText(const TQString &text);
+ TQString text() const { return m_text; }
+ virtual void draw(TQPainter &painter);
virtual bool vStrut() const { return false; }
- virtual Config *config(QWidget *parent) { return new SignConfig(this, parent); }
+ virtual Config *config(TQWidget *parent) { return new SignConfig(this, parent); }
virtual void save(KConfig *cfg);
virtual void load(KConfig *cfg);
protected:
- QString m_text;
- QString m_untranslatedText;
+ TQString m_text;
+ TQString m_untranslatedText;
};
class SignObj : public Object
{
public:
SignObj() { m_name = i18n("Sign"); m__name = "sign"; }
- virtual QCanvasItem *newObject(QCanvas *canvas) { return new Sign(canvas); }
+ virtual TQCanvasItem *newObject(TQCanvas *canvas) { return new Sign(canvas); }
};
class Windmill;
class WindmillGuard : public Wall
{
public:
- WindmillGuard(QCanvas *canvas) : Wall(canvas) {};
+ WindmillGuard(TQCanvas *canvas) : Wall(canvas) {};
void setBetween(int newmin, int newmax) { max = newmax; min = newmin; }
virtual void advance(int phase);
@@ -663,7 +663,7 @@ class WindmillConfig : public BridgeConfig
Q_OBJECT
public:
- WindmillConfig(Windmill *windmill, QWidget *parent);
+ WindmillConfig(Windmill *windmill, TQWidget *parent);
private slots:
void speedChanged(int news);
@@ -675,13 +675,13 @@ private:
class Windmill : public Bridge
{
public:
- Windmill(QRect rect, QCanvas *canvas);
+ Windmill(TQRect rect, TQCanvas *canvas);
virtual void aboutToDie();
virtual void newSize(int width, int height);
virtual void save(KConfig *cfg);
virtual void load(KConfig *cfg);
virtual void setGame(KolfGame *game);
- virtual Config *config(QWidget *parent) { return new WindmillConfig(this, parent); }
+ virtual Config *config(TQWidget *parent) { return new WindmillConfig(this, parent); }
void setSize(int width, int height);
virtual void moveBy(double dx, double dy);
void setSpeed(int news);
@@ -701,7 +701,7 @@ class WindmillObj : public Object
{
public:
WindmillObj() { m_name = i18n("Windmill"); m__name = "windmill"; }
- virtual QCanvasItem *newObject(QCanvas *canvas) { return new Windmill(QRect(0, 0, 80, 40), canvas); }
+ virtual TQCanvasItem *newObject(TQCanvas *canvas) { return new Windmill(TQRect(0, 0, 80, 40), canvas); }
};
class HoleInfo;
@@ -710,13 +710,13 @@ class HoleConfig : public Config
Q_OBJECT
public:
- HoleConfig(HoleInfo *holeInfo, QWidget *);
+ HoleConfig(HoleInfo *holeInfo, TQWidget *);
private slots:
- void authorChanged(const QString &);
+ void authorChanged(const TQString &);
void parChanged(int);
void maxStrokesChanged(int);
- void nameChanged(const QString &);
+ void nameChanged(const TQString &);
void borderWallsChanged(bool);
private:
@@ -733,22 +733,22 @@ public:
int lowestMaxStrokes() const { return m_lowestMaxStrokes; }
int maxStrokes() const { return m_maxStrokes; }
bool hasMaxStrokes() const { return m_maxStrokes != m_lowestMaxStrokes; }
- void setAuthor(QString newauthor) { m_author = newauthor; }
- QString author() const { return m_author; }
+ void setAuthor(TQString newauthor) { m_author = newauthor; }
+ TQString author() const { return m_author; }
- void setName(QString newname) { m_name = newname; }
- void setUntranslatedName(QString newname) { m_untranslatedName = newname; }
- QString name() const { return m_name; }
- QString untranslatedName() const { return m_untranslatedName; }
+ void setName(TQString newname) { m_name = newname; }
+ void setUntranslatedName(TQString newname) { m_untranslatedName = newname; }
+ TQString name() const { return m_name; }
+ TQString untranslatedName() const { return m_untranslatedName; }
- virtual Config *config(QWidget *parent) { return new HoleConfig(this, parent); }
+ virtual Config *config(TQWidget *parent) { return new HoleConfig(this, parent); }
void borderWallsChanged(bool yes);
bool borderWalls() const { return m_borderWalls; }
private:
- QString m_author;
- QString m_name;
- QString m_untranslatedName;
+ TQString m_author;
+ TQString m_name;
+ TQString m_untranslatedName;
bool m_borderWalls;
int m_par;
int m_maxStrokes;
@@ -758,7 +758,7 @@ private:
class StrokeCircle : public QCanvasItem
{
public:
- StrokeCircle(QCanvas *canvas);
+ StrokeCircle(TQCanvas *canvas);
void setValue(double v);
double value();
@@ -768,10 +768,10 @@ public:
int thickness() const;
int width() const;
int height() const;
- virtual void draw(QPainter &p);
- virtual QRect boundingRect() const;
- virtual bool collidesWith(const QCanvasItem*) const;
- virtual bool collidesWith(const QCanvasSprite*, const QCanvasPolygonalItem*, const QCanvasRectangle*, const QCanvasEllipse*, const QCanvasText*) const;
+ virtual void draw(TQPainter &p);
+ virtual TQRect boundingRect() const;
+ virtual bool collidesWith(const TQCanvasItem*) const;
+ virtual bool collidesWith(const TQCanvasSprite*, const TQCanvasPolygonalItem*, const TQCanvasRectangle*, const TQCanvasEllipse*, const TQCanvasText*) const;
private:
double dvalue, dmax;
@@ -780,12 +780,12 @@ private:
struct KDE_EXPORT CourseInfo
{
- CourseInfo(const QString &_name, const QString &_untranslatedName, const QString &_author, unsigned int _holes, unsigned int _par) { name = _name; untranslatedName = _untranslatedName, author = _author; holes = _holes; par = _par; }
+ CourseInfo(const TQString &_name, const TQString &_untranslatedName, const TQString &_author, unsigned int _holes, unsigned int _par) { name = _name; untranslatedName = _untranslatedName, author = _author; holes = _holes; par = _par; }
CourseInfo();
- QString name;
- QString untranslatedName;
- QString author;
+ TQString name;
+ TQString untranslatedName;
+ TQString author;
unsigned int holes;
unsigned int par;
};
@@ -795,14 +795,14 @@ class KDE_EXPORT KolfGame : public QCanvasView
Q_OBJECT
public:
- KolfGame(ObjectList *obj, PlayerList *players, QString filename, QWidget *parent=0, const char *name=0 );
+ KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWidget *parent=0, const char *name=0 );
~KolfGame();
void setObjects(ObjectList *obj) { this->obj = obj; }
- void setFilename(const QString &filename);
- QString curFilename() const { return filename; }
+ void setFilename(const TQString &filename);
+ TQString curFilename() const { return filename; }
void emitLargestHole() { emit largestHole(highestHole); }
- QCanvas *canvas() const { return course; }
- void removeItem(QCanvasItem *item) { items.setAutoDelete(false); items.removeRef(item); }
+ TQCanvas *canvas() const { return course; }
+ void removeItem(TQCanvasItem *item) { items.setAutoDelete(false); items.removeRef(item); }
// returns whether it was a cancel
bool askSave(bool);
bool isEditing() const { return editing; }
@@ -815,18 +815,18 @@ public:
void ballMoved();
void updateHighlighter();
void updateCourse() { course->update(); }
- QCanvasItem *curSelectedItem() const { return selectedItem; }
+ TQCanvasItem *curSelectedItem() const { return selectedItem; }
void setBorderWalls(bool);
void setInPlay(bool yes) { inPlay = yes; }
bool isInPlay() { return inPlay; }
bool isInfoShowing() { return m_showInfo; }
void stoppedBall();
- QString courseName() const { return holeInfo.name(); }
+ TQString courseName() const { return holeInfo.name(); }
void hidePutter() { putter->setVisible(false); }
void ignoreEvents(bool ignore) { m_ignoreEvents = ignore; }
static void scoresFromSaved(KConfig *, PlayerList &players);
- static void courseInfo(CourseInfo &info, const QString &filename);
+ static void courseInfo(CourseInfo &info, const TQString &filename);
public slots:
void pause();
@@ -837,13 +837,13 @@ public slots:
void addNewObject(Object *newObj);
void addNewHole();
void switchHole(int);
- void switchHole(const QString &);
+ void switchHole(const TQString &);
void nextHole();
void prevHole();
void firstHole();
void lastHole();
void randHole();
- void playSound(QString file, double vol = 1);
+ void playSound(TQString file, double vol = 1);
void showInfoDlg(bool = false);
void resetHole();
void clearHole();
@@ -865,7 +865,7 @@ signals:
void holesDone();
void newHole(int);
void parChanged(int, int);
- void titleChanged(const QString &);
+ void titleChanged(const TQString &);
void largestHole(int);
void scoreChanged(int, int, int);
void newPlayersTurn(Player *);
@@ -876,10 +876,10 @@ signals:
void editingEnded();
void inPlayStart();
void inPlayEnd();
- void maxStrokesReached(const QString &);
+ void maxStrokesReached(const TQString &);
void currentHole(int);
void modifiedChanged(bool);
- void newStatusText(const QString &);
+ void newStatusText(const TQString &);
private slots:
void shotDone();
@@ -888,45 +888,45 @@ private slots:
void fastTimeout();
void putterTimeout();
void autoSaveTimeout();
- void addItemsToMoveableList(QPtrList<QCanvasItem>);
+ void addItemsToMoveableList(TQPtrList<TQCanvasItem>);
void addItemToFastAdvancersList(CanvasItem *);
void hideInfo();
void emitMax();
protected:
- void mouseMoveEvent(QMouseEvent *e);
- void mousePressEvent(QMouseEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
- void mouseDoubleClickEvent(QMouseEvent *e);
+ void mouseMoveEvent(TQMouseEvent *e);
+ void mousePressEvent(TQMouseEvent *e);
+ void mouseReleaseEvent(TQMouseEvent *e);
+ void mouseDoubleClickEvent(TQMouseEvent *e);
- void handleMousePressEvent(QMouseEvent *e);
- void handleMouseDoubleClickEvent(QMouseEvent *e);
- void handleMouseMoveEvent(QMouseEvent *e);
- void handleMouseReleaseEvent(QMouseEvent *e);
- void keyPressEvent(QKeyEvent *e);
- void keyReleaseEvent(QKeyEvent *e);
+ void handleMousePressEvent(TQMouseEvent *e);
+ void handleMouseDoubleClickEvent(TQMouseEvent *e);
+ void handleMouseMoveEvent(TQMouseEvent *e);
+ void handleMouseReleaseEvent(TQMouseEvent *e);
+ void keyPressEvent(TQKeyEvent *e);
+ void keyReleaseEvent(TQKeyEvent *e);
- QPoint viewportToViewport(const QPoint &p);
+ TQPoint viewportToViewport(const TQPoint &p);
private:
- QCanvas *course;
+ TQCanvas *course;
Putter *putter;
PlayerList *players;
PlayerList::Iterator curPlayer;
Ball *whiteBall;
StrokeCircle *strokeCircle;
- QTimer *timer;
- QTimer *autoSaveTimer;
- QTimer *fastTimer;
- QTimer *putterTimer;
+ TQTimer *timer;
+ TQTimer *autoSaveTimer;
+ TQTimer *fastTimer;
+ TQTimer *putterTimer;
bool regAdv;
ObjectList *obj;
- QPtrList<QCanvasItem> items;
- QPtrList<QCanvasItem> extraMoveable;
- QPtrList<Wall> borderWalls;
+ TQPtrList<TQCanvasItem> items;
+ TQPtrList<TQCanvasItem> extraMoveable;
+ TQPtrList<Wall> borderWalls;
int timerMsec;
int autoSaveMsec;
@@ -952,7 +952,7 @@ private:
int height;
int width;
int margin;
- QColor grass;
+ TQColor grass;
int advancePeriod;
@@ -960,32 +960,32 @@ private:
bool paused;
- QString filename;
+ TQString filename;
bool recalcHighestHole;
void openFile();
bool strict;
bool editing;
- QPoint storedMousePos;
+ TQPoint storedMousePos;
bool moving;
bool dragging;
- QCanvasItem *movingItem;
- QCanvasItem *selectedItem;
- QCanvasRectangle *highlighter;
+ TQCanvasItem *movingItem;
+ TQCanvasItem *selectedItem;
+ TQCanvasRectangle *highlighter;
// sound
KArtsDispatcher artsDispatcher;
KArtsServer artsServer;
- QPtrList<KPlayObject> oldPlayObjects;
+ TQPtrList<KPlayObject> oldPlayObjects;
bool m_sound;
bool soundedOnce;
- QString soundDir;
+ TQString soundDir;
bool m_ignoreEvents;
HoleInfo holeInfo;
- QCanvasText *infoText;
+ TQCanvasText *infoText;
void showInfo();
StateDB stateDB;
@@ -1006,7 +1006,7 @@ private:
KConfig *cfg;
- inline void addBorderWall(QPoint start, QPoint end);
+ inline void addBorderWall(TQPoint start, TQPoint end);
void shotStart();
void startBall(const Vector &vector);
@@ -1017,10 +1017,10 @@ private:
bool m_useMouse;
bool m_useAdvancedPutting;
- QPtrList<CanvasItem> fastAdvancers;
+ TQPtrList<CanvasItem> fastAdvancers;
bool fastAdvancedExist;
- QString playerWhoMaxed;
+ TQString playerWhoMaxed;
};
#endif