kblackbox
#include <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) |
QSvgRenderer * | svgRenderer () |
qreal | width (const KBBScalableGraphicWidget::itemType itemType) |
int | zValue (const KBBScalableGraphicWidget::itemType itemType) |
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.
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.
QSvgRenderer * 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:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:44:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.