00001 #ifndef SCORE_H
00002 #define SCORE_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <QObject>
00026
00027 class ScoreSprite;
00028
00029
00034 class Score : public QObject
00035 {
00036 Q_OBJECT
00037
00038 public:
00042 Score(QObject* parent = 0);
00043
00048 void setLevel(int level, int no) {mLevel[no] = level; update();}
00049
00054 void setPlayerName(QString name,int no) {mName[no] = name;update();}
00055
00059 void setTurn(int no) {mTurn = no;update();}
00060
00065 void setWins(int amount, int no) {mWin[no] = amount; update();}
00066
00071 void setLosses(int amount, int no) {mLoss[no] = amount; update();}
00072
00077 void setRemis(int amount, int no) {mRemis[no] = amount; update();}
00078
00083 void setBreaks(int amount, int no) {mBrk[no] = amount; update();}
00084
00089 void setPlayedBy(int type, int no) {mInputDevice[no] = type; update();}
00090
00095 void setDisplay(ScoreSprite* s);
00096
00097 protected:
00100 void update();
00101
00102 private:
00103
00104 ScoreSprite* mDisplay;
00105
00106
00107 QString mName[2];
00108
00109
00110 int mLevel[2];
00111
00112
00113 int mTurn;
00114
00115
00116 int mWin[2];
00117
00118
00119 int mRemis[2];
00120
00121
00122 int mLoss[2];
00123
00124
00125 int mBrk[2];
00126
00127
00128 int mInputDevice[2];
00129 };
00130
00131 #endif
00132