Base class to be used by plugins to define custom pages in Create Game dialog. More...
#include <createserverdialogpage.h>
Public Member Functions | |
CreateServerDialogPage (CreateServerDialog *pParentDialog, const QString &name) | |
virtual void | fillInGameCreateParams (GameCreateParams ¶ms)=0 |
Fills in GameCreateParams structure with the page's contents. More... | |
virtual bool | loadConfig (Ini &ini)=0 |
Loads variables that are stored in the config into the GUI. More... | |
const QString & | name () const |
virtual bool | saveConfig (Ini &ini)=0 |
Saves variables defined by this page to a config. More... | |
virtual bool | validate () |
Validates contents of the page before fillInGameCreateParams(). More... | |
Protected Member Functions | |
QDialog * | parentDialog () |
Base class to be used by plugins to define custom pages in Create Game dialog.
Definition at line 39 of file createserverdialogpage.h.
|
pure virtual |
Fills in GameCreateParams structure with the page's contents.
The page is free to modify the params structure as it pleases. Touching most of the fields should not be necessary, however, as Doomseeker already provides common facilities for setting most of the parameters. Any behavior in this method should do fine by sticking to GameCreateParams::addOption() and GameCreateParams::customParameters().
|
pure virtual |
Loads variables that are stored in the config into the GUI.
This config is saved by Doomseeker when it calls saveConfig() method.
|
pure virtual |
Saves variables defined by this page to a config.
This config is loaded by Doomseeker when it calls loadConfig() method. Please remember that the config should be saved as best as possible even if validate() returns false.
|
virtual |
Validates contents of the page before fillInGameCreateParams().
Should return true on validation success or false otherwise. During validate() call, the page contents, appearance or behavior can be modified to display to the user what's wrong. Validation is run before the game is run.
No validation is performed before saveConfig() or after loadConfig().
Pages must take care of displaying their own error messages.
Default behavior assumes that no validation is needed and always returns true.
Definition at line 59 of file createserverdialogpage.cpp.