granatier
#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
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.
|
virtual |
Definition at line 52 of file arenasettings.cpp.
Member Function Documentation
Possible keys:
- Name
- Author
- Description
- AuthorEmail
- Parameters
-
key the 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.
|
virtual |
- Returns
- the full path of the svg file which is specified in "FileName" key
Definition at line 155 of file arenasettings.cpp.
|
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
-
file the 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.
|
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.
- 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:
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.