GameCVar Class Reference

A general game setting or variable (like fraglimit). More...

#include <serverstructs.h>

Public Member Functions

 GameCVar (const QString &name, const QString &command)
 
 GameCVar (const QString &name, const QString &command, const QVariant &value)
 
 GameCVar (const GameCVar &other)
 
const QString & command () const
 Command-line argument that sets this GameCVar.
 
bool hasValue () const
 Is any value assigned to this GameCVar.
 
bool isValid () const
 'Null' objects are invalid.
 
const QString & name () const
 Nice name to display to user in Create Game dialog and in other widgets.
 
GameCVaroperator= (const GameCVar &other)
 
void setValue (const QVariant &value)
 Assign value() to this GameCVar.
 
const QVariant & value () const
 Passed as the second argument, following command().
 
bool valueBool () const
 
int valueInt () const
 
QString valueString () const
 

Detailed Description

A general game setting or variable (like fraglimit).

This object is safe to copy.

Definition at line 257 of file serverstructs.h.

Member Function Documentation

const QString & GameCVar::command ( ) const

Command-line argument that sets this GameCVar.

When launching a game, this command() is passed as one of the command line arguments and the value() is what follows directly after.

Definition at line 297 of file serverstructs.cpp.

bool GameCVar::hasValue ( ) const

Is any value assigned to this GameCVar.

Definition at line 302 of file serverstructs.cpp.

bool GameCVar::isValid ( ) const

'Null' objects are invalid.

Definition at line 307 of file serverstructs.cpp.

const QString & GameCVar::name ( ) const

Nice name to display to user in Create Game dialog and in other widgets.

Definition at line 312 of file serverstructs.cpp.

void GameCVar::setValue ( const QVariant &  value)

Assign value() to this GameCVar.

Definition at line 317 of file serverstructs.cpp.

const QVariant & GameCVar::value ( ) const

Passed as the second argument, following command().

Definition at line 322 of file serverstructs.cpp.


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