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

kgoldrunner

kgrtheme.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                          kgrtheme.h  -  description
00003                              -------------------
00004     begin                : Wed Jan 23 2002
00005     Copyright 2002 Marco Krüger <grisuji@gmx.de>
00006     Copyright 2002 Ian Wadham <ianw2@optusnet.com.au>
00007     Copyright 2007 Luciano Montanaro <mikelima@cirulla.net>
00008  ***************************************************************************/
00009 
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 
00019 #ifndef KGRTHEME_H
00020 #define KGRTHEME_H
00021 
00022 #include <QString>
00023 #include <QColor>
00024 #include <QImage>
00025 #include <KSvgRenderer>
00026 
00030 class KGrTheme
00031 {
00032 public:
00033     KGrTheme(const QString &systemDataDir);
00034 
00038     bool load(const QString & themeFilepath);
00039     
00043     QList<QPixmap> tiles(unsigned int size);
00044     
00048     QList<QPixmap> hero(unsigned int size);
00049     
00053     QList<QPixmap> enemy(unsigned int size);
00054     
00059     QImage background(unsigned int width, unsigned int height,
00060             unsigned int variant);
00061     
00062     bool isBorderRequired() const { return themeDrawBorder; }
00063     
00067     bool isWithBackground() const { return numBackgrounds > 0; }
00068 
00072     bool multipleBackgrounds() const { return numBackgrounds > 1; }
00073     
00077     QColor borderColor() { return m_borderColor; }
00078     
00082     QColor textColor() { return m_textColor; }
00083 
00084 private:
00085     KSvgRenderer svgSet;
00086     KSvgRenderer svgActors;
00087     QColor m_borderColor, m_textColor;  // Border colours.
00088 
00089     QString themeDataDir;
00090     QString m_themeFilepath;
00091     short themeDrawBorder;
00092     QPixmap svgTile (QImage &image, QPainter &painter, const QString &name);
00093     QList<QPixmap> svgFrames (const QString & elementPattern,
00094                 unsigned int size, int nFrames);
00095 
00096     enum GraphicsType { NONE, SVG, PNG };
00097     GraphicsType tileGraphics;
00098     GraphicsType backgroundGraphics;
00099     GraphicsType runnerGraphics;
00100     int numBackgrounds;
00101     bool hasPanelTiles;
00102 };
00103 
00104 #endif // KGRTHEME_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