display_intro.h

Go to the documentation of this file.
00001 #ifndef DISPLAY_INTRO_H
00002 #define DISPLAY_INTRO_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 <QGraphicsScene>
00025 #include <QTimer>
00026 
00027 
00028 // KDE includes
00029 #include <kdebug.h>
00030 
00031 // local includes
00032 #include "abstractdisplay.h"
00033 #include "thememanager.h"
00034 #include "deck.h"
00035 
00036 // Forward declaration
00037 
00038 
00041 class DisplayIntro : public AbstractDisplay, public virtual Themable
00042 {
00043   Q_OBJECT
00044 
00045   public:
00047     enum AnimState {Idle, Putting, Turning, Waiting, Clearing, Waiting2};
00048 
00049   
00057     DisplayIntro(Deck* deck, QGraphicsScene* scene, ThemeManager* theme, int advancePeriod, QGraphicsView* parent);
00058 
00062     virtual void changeTheme();
00063 
00066     void start();
00067 
00068 
00069     /* Deal cards - unused.
00070      * @param player The player object
00071      * @param position The position to place the player (0,1)
00072      */
00073     void deal(Player* /*player*/, int /*position*/) {}
00074 
00077     void play(int /*cardNumber*/, int /*playerNumber*/, int /*phase*/) {}
00078 
00081     void turn(int /*cardNumber*/) {}
00082 
00085     void remove(int /*winnerPosition*/, int /*cardNumber*/, int /*delta*/) {}
00086   
00087   public slots:
00091     void convertMousePress(QPoint /*mouse*/, int& /*playerNumber*/, int& /*cardNumber*/) {}
00092 
00095     void loop();
00096 
00097   private:
00098     // Timer for animation loop 
00099     QTimer* mTimer;
00100     // Animation counter 
00101     int mAnimCnt;
00102     // Animation state 
00103     AnimState mState;
00104 };
00105 
00106 #endif

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