scoresprite.h

Go to the documentation of this file.
00001 #ifndef SCORE_SPRITE_H
00002 #define SCORE_SPRITE_H
00003 /*
00004    This file is part of the KDE games lskat program
00005    Copyright (c) 2006 Martin Heni <kde@heni-online.de>
00006 
00007    This library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Library General Public
00009    License as published by the Free Software Foundation; either
00010    version 2 of the License, or (at your option) any later version.
00011 
00012    This library is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    Library General Public License for more details.
00016 
00017    You should have received a copy of the GNU Library General Public License
00018    along with this library; see the file COPYING.LIB.  If not, write to
00019    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020    Boston, MA 02110-1301, USA.
00021 */
00022 
00023 // Qt includes
00024 #include <QPointF>
00025 #include <QSizeF>
00026 #include <QGraphicsPixmapItem>
00027 #include <QGraphicsTextItem>
00028 
00029 
00030 // Local includes
00031 #include "thememanager.h"
00032 #include "pixmapsprite.h"
00033 #include "player.h"
00034 
00035 
00038 class ScoreSprite : public PixmapSprite
00039 {
00040 
00041   public:
00049     ScoreSprite(QString id, ThemeManager* theme, int advancePeriod, int no, QGraphicsScene* scene);
00050     
00053     ~ScoreSprite();
00054 
00058     virtual void advance(int phase);
00059 
00063     virtual int type() const {return QGraphicsItem::UserType+10;}
00064 
00068     virtual void changeTheme();
00069 
00073     void setPlayerName(QString s);
00074     
00078     void setPoints(int points);
00079 
00083     void setScore(int score);
00084     
00089     void setGames(int won, int all);
00090 
00094     void setInput(int device);
00095 
00099     void setTrump(int suite);
00100 
00101 
00102   private:
00103     // Text for name of player
00104     QGraphicsTextItem* mName;
00105     
00106     // Text for current points
00107     QGraphicsTextItem* mPoints;
00108 
00109     // Text for score
00110     QGraphicsTextItem* mScore;
00111 
00112     // Text for games
00113     QGraphicsTextItem* mGames;
00114 
00115     // Sprite for the input device
00116     PixmapSprite* mInput;
00117 
00118     // Frame  number of the input device sprite
00119     int mInputFrame;
00120 
00121     // Sprite for the input device
00122     PixmapSprite* mTrump;
00123 
00124     // Frame  number of the input device sprite
00125     int mTrumpFrame;
00126 
00127 };
00128 
00129 #endif

Generated on Tue May 1 09:34:40 2007 for LSkat by  doxygen 1.4.6