CreateServerDialogPage Class Referenceabstract

Base class to be used by plugins to define custom pages in Create Game dialog. More...

#include <createserverdialogpage.h>

+ Inheritance diagram for CreateServerDialogPage:

Public Member Functions

 CreateServerDialogPage (CreateServerDialog *pParentDialog, const QString &name)
 
virtual void fillInGameCreateParams (GameCreateParams &params)=0
 Fills in GameCreateParams structure with the page's contents.
 
virtual bool loadConfig (Ini &ini)=0
 Loads variables that are stored in the config into the GUI.
 
const QString & name () const
 
virtual bool saveConfig (Ini &ini)=0
 Saves variables defined by this page to a config.
 
virtual bool validate ()
 Validates contents of the page before fillInGameCreateParams().
 

Protected Member Functions

QDialog * parentDialog ()
 

Detailed Description

Base class to be used by plugins to define custom pages in Create Game dialog.

Definition at line 39 of file createserverdialogpage.h.

Member Function Documentation

virtual void CreateServerDialogPage::fillInGameCreateParams ( GameCreateParams params)
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().

virtual bool CreateServerDialogPage::loadConfig ( Ini ini)
pure virtual

Loads variables that are stored in the config into the GUI.

This config is saved by Doomseeker when it calls saveConfig() method.

Returns
Return true on success.
virtual bool CreateServerDialogPage::saveConfig ( Ini ini)
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.

Returns
Return true on success.
bool CreateServerDialogPage::validate ( )
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.

Returns
Return true on validation success or false on failure.

Definition at line 59 of file createserverdialogpage.cpp.


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