Themable Class Reference

Objects which are connected to the theme manger must inherit from this class. More...

#include <thememanager.h>

Inheritance diagram for Themable:

Inheritance graph
[legend]
Collaboration diagram for Themable:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Themable ()
 Default constructor for the interface.
 Themable (QString id, ThemeManager *thememanager)
 Constructor for the interface given the theme item unique ID string and a reference to the theme manager.
virtual ~Themable ()
 Destructor.
QString id ()
 Retrieve the ID of the object.
ThemeManagerthememanager ()
 Retrieve the associated theme manager of this object.
double getScale ()
 Retrieve the current scale (maximum extension) of the theme.
void setScale (double scale)
 Set teh current scale for the object.
virtual void changeTheme ()=0
 Main theme notification method.

Detailed Description

Objects which are connected to the theme manger must inherit from this class.

Doing so enables the items to be refreshed by the theme manager and allows them to retrieve theme data from a configuration theme file.

Definition at line 39 of file thememanager.h.


Constructor & Destructor Documentation

Themable::Themable  ) 
 

Default constructor for the interface.

Definition at line 418 of file thememanager.cpp.

Themable::Themable QString  id,
ThemeManager thememanager
 

Constructor for the interface given the theme item unique ID string and a reference to the theme manager.

The ID string is used to refer to the group in the configuration file.

Parameters:
id The user defined theme id
thememanager The used theme manager

Definition at line 427 of file thememanager.cpp.

References ThemeManager::registerTheme(), and thememanager().

Here is the call graph for this function:

Themable::~Themable  )  [virtual]
 

Destructor.

Definition at line 438 of file thememanager.cpp.

References ThemeManager::unregisterTheme().

Here is the call graph for this function:


Member Function Documentation

virtual void Themable::changeTheme  )  [pure virtual]
 

Main theme notification method.

This method is called in the Themable object to indicate a theme change. The object needs to overwrite this and respond with a properly scaled redraw.

Implemented in CardSprite, DisplayIntro, DisplayTwo, PixmapSprite, ScoreSprite, and TextSprite.

Referenced by ThemeManager::rescale(), and ThemeManager::updateTheme().

double Themable::getScale  )  [inline]
 

Retrieve the current scale (maximum extension) of the theme.

Returns:
The current scale.

Definition at line 71 of file thememanager.h.

Referenced by CardSprite::calcTargetAndSpeed(), PixmapSprite::changeTheme(), CardSprite::changeTheme(), CardSprite::deltaMove(), PixmapSprite::setPosition(), and CardSprite::setPosition().

QString Themable::id  )  [inline]
 

Retrieve the ID of the object.

Returns:
The ID.

Definition at line 61 of file thememanager.h.

void Themable::setScale double  scale  )  [inline]
 

Set teh current scale for the object.

Parameters:
scale The new scale.

Definition at line 76 of file thememanager.h.

Referenced by TextSprite::changeTheme(), PixmapSprite::changeTheme(), and CardSprite::changeTheme().

ThemeManager* Themable::thememanager  )  [inline]
 

Retrieve the associated theme manager of this object.

Returns:
The theme manager.

Definition at line 66 of file thememanager.h.

Referenced by CardSprite::calcFrame(), TextSprite::changeTheme(), ScoreSprite::changeTheme(), PixmapSprite::changeTheme(), DisplayTwo::changeTheme(), DisplayIntro::changeTheme(), CardSprite::changeTheme(), DisplayTwo::convertMousePress(), DisplayTwo::deal(), PixmapSprite::getDoubleValue(), DisplayIntro::loop(), DisplayTwo::play(), DisplayTwo::remove(), TextSprite::setText(), and Themable().


The documentation for this class was generated from the following files:
Generated on Tue May 1 09:34:40 2007 for LSkat by  doxygen 1.4.6