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

kgoldrunner

KGrTheme Class Reference

#include <kgrtheme.h>

List of all members.


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:
EmptyTile 
HiddenLadderTile 
FalseBrickTile 
HeroTile 
EnemyTile 
GoldTile 
BarTile 
LadderTile 
ConcreteTile 
BrickTile 
BrickAnimation1Tile 
BrickAnimation2Tile 
BrickAnimation3Tile 
BrickAnimation4Tile 
BrickAnimation5Tile 
BrickAnimation6Tile 
BrickAnimation7Tile 
BrickAnimation8Tile 
BrickAnimation9Tile 
TileTypeCount 

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 (  ) 

Default dtor.

Definition at line 43 of file kgrtheme.cpp.


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]

Return the number of background variants in the theme.

Definition at line 128 of file kgrtheme.h.

QColor KGrTheme::borderColor (  )  [inline]

Obtain the theme defined border color.

Definition at line 136 of file kgrtheme.h.

QList< QPixmap > KGrTheme::displayTiles ( unsigned int  size  ) 

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.

QList< QPixmap > KGrTheme::enemy ( unsigned int  size  ) 

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.

QList< QPixmap > KGrTheme::frameTiles ( unsigned int  size  ) 

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.

QList< QPixmap > KGrTheme::hero ( unsigned int  size  ) 

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  ) 

Load a theme given the name of its .desktop file.

Definition at line 50 of file kgrtheme.cpp.

QColor KGrTheme::textColor (  )  [inline]

Obtain the theme defined text color.

Definition at line 141 of file kgrtheme.h.

int KGrTheme::tileCount ( TileType  t  )  [inline]

Definition at line 130 of file kgrtheme.h.

QList< QPixmap > KGrTheme::tiles ( unsigned int  size  ) 

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:
  • kgrtheme.h
  • kgrtheme.cpp

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