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

kblackbox

KBBThemeManager Class Reference

#include <kbbthememanager.h>

List of all members.


Detailed Description

Theme manager of the scalable graphic widget.

This class manages the graphic theme of the central widget. Graphics elements of the game are mainly SVG items. Some dynamic elements (like laser rays) are not SVG items but their theme attributes are nonetheless saved in the SVG file.

See also:
value;

Definition at line 51 of file kbbthememanager.h.


Public Member Functions

 KBBThemeManager (const QString &svgzFileName)
QColor color (const KBBScalableGraphicWidget::itemType itemType)
QString elementId (const KBBScalableGraphicWidget::itemType itemType)
Qt::PenStyle style (const KBBScalableGraphicWidget::itemType itemType)
KSvgRenderer * svgRenderer ()
qreal width (const KBBScalableGraphicWidget::itemType itemType)
int zValue (const KBBScalableGraphicWidget::itemType itemType)

Constructor & Destructor Documentation

KBBThemeManager::KBBThemeManager ( const QString &  svgzFileName  ) 

Constructor.

The constructor opens the SVGZ file, creates the SVG renderer and gets the DOM root node.

Parameters:
&svgzFileName Path to the SVGZ file

Definition at line 49 of file kbbthememanager.cpp.


Member Function Documentation

QColor KBBThemeManager::color ( const KBBScalableGraphicWidget::itemType  itemType  ) 

Get the color of the item.

Parameters:
&itemType Type of the considered item
Returns:
The color

Definition at line 75 of file kbbthememanager.cpp.

QString KBBThemeManager::elementId ( const KBBScalableGraphicWidget::itemType  itemType  ) 

Get the XML "id" value of the item.

In the SVG file, each graphic element has an ID that is saved in the attribute "id" of every XML node. This methode maps the item type with its XML "id" value.

Parameters:
&itemType Type of the considered item
Returns:
The XML attribute "id" of the item

Definition at line 81 of file kbbthememanager.cpp.

Qt::PenStyle KBBThemeManager::style ( const KBBScalableGraphicWidget::itemType  itemType  ) 

Get the pen style of the item.

Parameters:
&itemType Type of the considered item
Returns:
Qt::DotLine except if the style value "stroke-dasharray" is "none". In that case: Qt::SolidLine

Definition at line 176 of file kbbthememanager.cpp.

KSvgRenderer * KBBThemeManager::svgRenderer (  ) 

Get the shared SVG renderer.

Returns:
The SVG renderer

Definition at line 185 of file kbbthememanager.cpp.

qreal KBBThemeManager::width ( const KBBScalableGraphicWidget::itemType  itemType  ) 

Get the width of the item.

Parameters:
&itemType Type of the considered item
Returns:
The stroke width

Definition at line 191 of file kbbthememanager.cpp.

int KBBThemeManager::zValue ( const KBBScalableGraphicWidget::itemType  itemType  ) 

Get the relative height of the item.

Items are stacked horizontally. It's important to know what item is over or unter what other item.

Parameters:
&itemType Type of the considered item
Returns:
item relative height

Definition at line 197 of file kbbthememanager.cpp.


The documentation for this class was generated from the following files:
  • kbbthememanager.h
  • kbbthememanager.cpp

kblackbox

Skip menu "kblackbox"
  • 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