kgoldrunner
KGrTheme Class Reference
#include <kgrtheme.h>
Detailed Description
KGrTheme handles KGoldrunner theme management.Definition at line 31 of file kgrtheme.h.
Public Types | |
| enum | TileType { EmptyTile = 0, HiddenLadderTile, FalseBrickTile, HeroTile, EnemyTile, GoldTile, BarTile, LadderTile, ConcreteTile, BrickTile, BrickAnimation1Tile, BrickAnimation2Tile, BrickAnimation3Tile, BrickAnimation4Tile, BrickAnimation5Tile, BrickAnimation6Tile, BrickAnimation7Tile, BrickAnimation8Tile, BrickAnimation9Tile, TileTypeCount } |
Public Member Functions | |
| QPixmap | background (unsigned int width, unsigned int height, unsigned int variant) |
| int | backgroundCount () |
| QColor | borderColor () |
| QList< QPixmap > | displayTiles (unsigned int size) |
| QList< QPixmap > | enemy (unsigned int size) |
| int | firstTile (TileType t) |
| QList< QPixmap > | frameTiles (unsigned int size) |
| QList< QPixmap > | hero (unsigned int size) |
| bool | isBorderRequired () const |
| KGrTheme (const QString &systemDataDir) | |
| bool | load (const QString &themeFilepath) |
| QColor | textColor () |
| int | tileCount (TileType t) |
| QList< QPixmap > | tiles (unsigned int size) |
| ~KGrTheme () | |
Member Enumeration Documentation
| enum KGrTheme::TileType |
- Enumerator:
Definition at line 34 of file kgrtheme.h.
Constructor & Destructor Documentation
| KGrTheme::KGrTheme | ( | const QString & | systemDataDir | ) |
Default constructor.
- Parameters:
-
[in] systemDataDir The system data dir is used to calculate the theme data directory.
Definition at line 28 of file kgrtheme.cpp.
| KGrTheme::~KGrTheme | ( | ) |
Member Function Documentation
| QPixmap KGrTheme::background | ( | unsigned int | width, | |
| unsigned int | height, | |||
| unsigned int | variant | |||
| ) |
Prepares an image with the background, given the desired width and height and background variant.
- Parameters:
-
[in] variant The background variant you wish to use. Valid values are between 0 and backgroundCount(). [in] width The desired width of the background. [in] height The desired height of the background.
Definition at line 125 of file kgrtheme.cpp.
| int KGrTheme::backgroundCount | ( | ) | [inline] |
| QColor KGrTheme::borderColor | ( | ) | [inline] |
Given the tile size, returns the list of themed display tiles (Frame/decoration around score/level).
- Parameters:
-
[in] size The tile size. An empty list is returned when the theme does not provide a themed display area.
Definition at line 252 of file kgrtheme.cpp.
Given the tile size, returns the list of enemy frames.
- Parameters:
-
[in] size The tile size.
Definition at line 162 of file kgrtheme.cpp.
| int KGrTheme::firstTile | ( | TileType | t | ) | [inline] |
Definition at line 131 of file kgrtheme.h.
Given the tile size, returns the list of themed frame tiles.
- Parameters:
-
[in] size The tile size. An empty list is returned when the theme does not provide a themed frame area.
Definition at line 261 of file kgrtheme.cpp.
Given the tile size, returns the list of hero frames.
- Parameters:
-
[in] size The tile size
Definition at line 150 of file kgrtheme.cpp.
| bool KGrTheme::isBorderRequired | ( | ) | const [inline] |
Is a border required for this theme?
- Returns:
- true if a border is required for this theme.
Definition at line 123 of file kgrtheme.h.
| bool KGrTheme::load | ( | const QString & | themeFilepath | ) |
| QColor KGrTheme::textColor | ( | ) | [inline] |
| int KGrTheme::tileCount | ( | TileType | t | ) | [inline] |
Definition at line 130 of file kgrtheme.h.
Given the tile size, returns the list of themed tiles.
- Parameters:
-
[in] size The tile size
Definition at line 177 of file kgrtheme.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference