• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegames API Reference
  • KDE Home
  • Contact Us
 

kblackbox

Public Member Functions | List of all members
KBBThemeManager Class Reference

#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
&svgzFileNamePath 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
&itemTypeType 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
&itemTypeType 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
&itemTypeType 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
&itemTypeType 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
&itemTypeType 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
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kblackbox

Skip menu "kblackbox"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdegames API Reference

Skip menu "kdegames API Reference"
  • granatier
  • kapman
  • kblackbox
  • kgoldrunner
  • kigo
  • kmahjongg
  • KShisen
  • ksquares
  • libkdegames
  •   highscore
  •   libkdegamesprivate
  •     kgame
  • libkmahjongg
  • palapeli
  •   libpala

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal