• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kgoldrunner

kgrsprite.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                          kgrsprite.h  -  description
00003                              -------------------
00004     begin                : Fri Aug 04 2006
00005     Copyright 2006 Mauricio Piacentini <mauricio@tabuleiro.com>
00006 ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 
00017 #ifndef KGRSPRITE_H
00018 #define KGRSPRITE_H
00019 
00020 #include <kgamecanvas.h>
00021 
00022 #include <QPixmap>
00023 #include <QList>
00024 
00025 
00026 class KGrSprite : public KGameCanvasPixmap
00027 {
00028 public:
00029     explicit KGrSprite (KGameCanvasAbstract* canvas = NULL);
00030     ~KGrSprite();
00031     void move (double x, double y, int frame);
00032     void setZ (qreal z);
00033     void addFrames (QList<QPixmap> * frames, const QPoint & topLeft,
00034                                                 const double scale);
00035     inline QPoint currentLoc() { return m_loc; }
00036     inline void clearFrames() { if (m_frames) m_frames->clear();}
00037     inline int currentFrame(){ return m_frame;}
00038     inline void setScale (double scale){ m_scale=scale;}
00039     inline double scale(){ return m_scale;}
00040 
00041 private:
00042     QList<QPixmap> * m_frames;
00043     double    m_scale;
00044     int m_frame;
00045     QPoint m_loc;       // Location relative to top-left of playfield.
00046     int m_tlX;          // X co-ordinate of top-left.
00047     int m_tlY;          // Y co-ordinate of top-left.
00048 };
00049 
00050 #endif // KGRSPRITE_H

kgoldrunner

Skip menu "kgoldrunner"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

API Reference

Skip menu "API Reference"
  • kblackbox
  • kgoldrunner
  • kmahjongg
  • ksquares
  • libkdegames
  •   highscore
  •   kgame
  •   kggzgames
  •   kggzmod
  •   kggznet
  • libkmahjongg
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal