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

parley

Public Member Functions | List of all members
KGameTheme Class Reference

#include <KGameTheme>

Public Member Functions

 KGameTheme (const QString &themeGroup=QLatin1String("KGameTheme"))
 
virtual ~KGameTheme ()
 
QString fileName () const
 
virtual QString graphics () const
 
virtual bool load (const QString &file)
 
virtual bool loadDefault ()
 
QString path () const
 
QPixmap preview () const
 
QString property (const QString &key) const
 
virtual QString themeProperty (const QString &key) const
 

Detailed Description

Class for loading theme files.

Essentially just a wrapper around a .desktop theme file. Load a file with load() and then access its properties.

For more advanced feaures like dynamic themes or custom game rules, it will likely be necessary to derive from this class

Author
Mauricio Piacentini

Definition at line 42 of file kgametheme.h.

Constructor & Destructor Documentation

KGameTheme::KGameTheme ( const QString &  themeGroup = QLatin1String("KGameTheme"))

Definition at line 47 of file kgametheme.cpp.

KGameTheme::~KGameTheme ( )
virtual

Definition at line 54 of file kgametheme.cpp.

Member Function Documentation

QString KGameTheme::fileName ( ) const
Returns
just the "*.desktop" part

Definition at line 148 of file kgametheme.cpp.

QString KGameTheme::graphics ( ) const
virtual
Returns
the full path of the svg file which is specified in "FileName" key

Definition at line 157 of file kgametheme.cpp.

bool KGameTheme::load ( const QString &  file)
virtual

Load a specific theme file.

Note that although theme could be successfully loaded, no check on the validity of theme's SVG file contents is done. Application writers will need to perform this check manually e.g. by calling KSvgRenderer::isValid()

Parameters
filethe name of the theme file relative to the share/apps/appname directory. e.g. "themes/classic.desktop"
Returns
true if the theme files and properties could be loaded

Definition at line 67 of file kgametheme.cpp.

bool KGameTheme::loadDefault ( )
virtual

Load the default theme file.

Called "default.desktop"

Returns
true if the theme files and properties could be loaded

Definition at line 59 of file kgametheme.cpp.

QString KGameTheme::path ( ) const
Returns
the full path of the .desktop file

Definition at line 139 of file kgametheme.cpp.

QPixmap KGameTheme::preview ( ) const
Returns
a preview pixmap

Definition at line 166 of file kgametheme.cpp.

QString KGameTheme::property ( const QString &  key) const
Returns
a property directly from the .desktop file

Definition at line 128 of file kgametheme.cpp.

QString KGameTheme::themeProperty ( const QString &  key) const
virtual

Possible keys:

  • Name
  • Author
  • Description
  • AuthorEmail
    Parameters
    keythe key of the wanted property
    Returns
    the data related to 'key'

Definition at line 175 of file kgametheme.cpp.


The documentation for this class was generated from the following files:
  • kgametheme.h
  • kgametheme.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

parley

Skip menu "parley"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

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