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

granatier

Public Member Functions | List of all members
ArenaSettings Class Reference

#include <ArenaSettings>

Public Member Functions

 ArenaSettings (const QString &arenaGroup=QLatin1String("Arena"))
 
virtual ~ArenaSettings ()
 
virtual QString arenaProperty (const QString &key) const
 
QString fileName () const
 
virtual QString graphics () const
 
virtual bool load (const QString &file)
 
virtual bool loadDefault ()
 
QString path () const
 
QString property (const QString &key) const
 

Detailed Description

Class for loading arena files.

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

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

Author
Mauricio Piacentini

Definition at line 41 of file arenasettings.h.

Constructor & Destructor Documentation

ArenaSettings::ArenaSettings ( const QString &  arenaGroup = QLatin1String("Arena"))

Definition at line 45 of file arenasettings.cpp.

ArenaSettings::~ArenaSettings ( )
virtual

Definition at line 52 of file arenasettings.cpp.

Member Function Documentation

QString ArenaSettings::arenaProperty ( 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 164 of file arenasettings.cpp.

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

Definition at line 146 of file arenasettings.cpp.

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

Definition at line 155 of file arenasettings.cpp.

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

Load a specific arena file.

Note that although arena could be successfully loaded, no check on the validity of arena's XML file contents is done. Application writers will need to perform this check manually

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

Definition at line 64 of file arenasettings.cpp.

bool ArenaSettings::loadDefault ( )
virtual

Load the default arena file.

Called "granatier.desktop"

Returns
true if the arena files and properties could be loaded

Definition at line 56 of file arenasettings.cpp.

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

Definition at line 137 of file arenasettings.cpp.

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

Definition at line 125 of file arenasettings.cpp.


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

KDE's Doxygen guidelines are available online.

granatier

Skip menu "granatier"
  • Main Page
  • Namespace List
  • Namespace Members
  • 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