HostModeTraits Class Reference

#include <hostmodetraits.h>

Public Member Functions

 HostModeTraits (GameCreateParams::HostMode mode=GameCreateParams::Host)
 
bool canChangeAnyGameRules () const
 
bool canChangeGame () const
 
bool canChangeMode () const
 
bool canRecordDemo () const
 
bool canShowCommandLine () const
 
QString cfgName () const
 
bool isCreatingServer () const
 
bool isSettingUpOnlineGame () const
 
 operator GameCreateParams::HostMode () const
 
HostModeTraitsoperator= (GameCreateParams::HostMode mode)
 

Static Public Member Functions

static HostModeTraits fromCfgName (const QString &name)
 

Public Attributes

GameCreateParams::HostMode mode
 

Detailed Description

UI-related feature checker for GameCreateParams::HostMode.

Definition at line 31 of file hostmodetraits.h.

Member Function Documentation

bool HostModeTraits::canChangeGame ( ) const
inline

Is changing the game allowed for this hosting mode?

Definition at line 83 of file hostmodetraits.h.

bool HostModeTraits::canChangeMode ( ) const
inline

Can we switch the UI dynamically from this mode to another?

Definition at line 92 of file hostmodetraits.h.

bool HostModeTraits::canRecordDemo ( ) const
inline

Does this mode allow to setup demo recording?

Definition at line 101 of file hostmodetraits.h.

bool HostModeTraits::canShowCommandLine ( ) const
inline

Can a launch command line be generated in this mode?

Definition at line 109 of file hostmodetraits.h.

QString HostModeTraits::cfgName ( ) const
inline

Map the GameCreateParams::HostMode to a name saveable in a config.

Definition at line 54 of file hostmodetraits.h.

static HostModeTraits HostModeTraits::fromCfgName ( const QString &  name)
inlinestatic

Create HostMode from a config name (cfgName()).

Definition at line 43 of file hostmodetraits.h.

bool HostModeTraits::isCreatingServer ( ) const
inline

Are we launching a brand-new game server?

Definition at line 117 of file hostmodetraits.h.

bool HostModeTraits::isSettingUpOnlineGame ( ) const
inline

Are we setting up an online game (our own server or an existing one)?

Definition at line 125 of file hostmodetraits.h.


The documentation for this class was generated from the following file: