Game file definition allows to browse this file in configuration box. More...
#include <gamefile.h>
Public Types | |
enum | ExecType { Client = 0x1, Server = 0x2, Offline = 0x4, Cso = Client | Server | Offline, CreateGame = Server | Offline } |
Executable types recognised by Doomseeker. More... | |
Public Member Functions | |
GameFile (const GameFile &other) | |
const QString & | configName () const |
Setting name where path will be stored in plugin's IniSection. More... | |
int | executable () const |
Executable bit flags mod that compares to ExecType. More... | |
const QString & | fileName () const |
Name of the file on disk. More... | |
bool | isSameFile (const QString &otherFileName) |
Guesses by file name if this is the same file. More... | |
bool | isValid () const |
A valid file has configName(). More... | |
const QString & | niceName () const |
Descriptive name, ie. "client executable", "server executable", etc. More... | |
GameFile & | operator= (const GameFile &other) |
QStringList & | searchSuffixes () const |
Path suffixes that help in automatically finding this file. More... | |
GameFile & | setConfigName (const QString &name) |
GameFile & | setExecutable (int flags) |
GameFile & | setFileName (const QString &name) |
GameFile & | setNiceName (const QString &name) |
GameFile & | setSearchSuffixes (const QStringList &suffixes) |
Game file definition allows to browse this file in configuration box.
There are some standard values for configName() property:
Apart from these, the configName can be anything you want and anything your plugin needs. Remember however that choosing a distinct name is important to avoid collisions with any future standard names.
There are three types of executables recognised by Doomseeker: isClientExecutable(), isServerExecutable() and isOfflineExecutable(). One executable can be all of these at the same time or the game might have separate executables for each mode. Setting one of these to true also implies isExecutable(). If plugin doesn't specify its own list of GameFile then Doomseeker will assume some defaults depending on plugin's EP_ClientOnly flag. The defaults are as follows:
This class follows Builder pattern. All setters return reference to the called object so that you can chain them together.
Definition at line 72 of file gamefile.h.
const QString & GameFile::configName | ( | ) | const |
Setting name where path will be stored in plugin's IniSection.
Definition at line 60 of file gamefile.cpp.
int GameFile::executable | ( | ) | const |
Executable bit flags mod that compares to ExecType.
Definition at line 82 of file gamefile.cpp.
const QString & GameFile::fileName | ( | ) | const |
Name of the file on disk.
Platform specific extensions (.exe) are unnecessary.
Definition at line 71 of file gamefile.cpp.
bool GameFile::isSameFile | ( | const QString & | otherFileName | ) |
Guesses by file name if this is the same file.
Definition at line 93 of file gamefile.cpp.
bool GameFile::isValid | ( | ) | const |
A valid file has configName().
Definition at line 108 of file gamefile.cpp.
const QString & GameFile::niceName | ( | ) | const |
Descriptive name, ie. "client executable", "server executable", etc.
Definition at line 113 of file gamefile.cpp.
QStringList & GameFile::searchSuffixes | ( | ) | const |
Path suffixes that help in automatically finding this file.
Definition at line 124 of file gamefile.cpp.