EngineConfigurationBaseBox Class Reference

Base for configuration pages for plugins; provides some default behavior. More...

#include <engineconfigurationbasebox.h>

+ Inheritance diagram for EngineConfigurationBaseBox:

Public Member Functions

 EngineConfigurationBaseBox (const EnginePlugin *plugin, IniSection &cfg, QWidget *parent=NULL)
 
QIcon icon () const
 Reimplement this to return a displayable icon for the ConfigurationBaseBox. More...
 
QString name () const
 Reimplement this to return a list-displayable name for this ConfigurationBaseBox. More...
 
const EnginePluginplugin () const
 Parent plugin handled by this page. More...
 
void readSettings ()
 Reimplement this to read settings from config into widgets. More...
 
QString title () const
 Page title, by default returns the same string as name(). More...
 
- Public Member Functions inherited from ConfigurationBaseBox
 ConfigurationBaseBox (QWidget *parent=NULL)
 
bool allowSave ()
 Does this page allow to save the new settings? More...
 
bool areSettingsAlreadyRead ()
 true if settings for this page have already been loaded at least once. More...
 
void read ()
 Read configuration from persistence to page contents. More...
 
bool save ()
 Save configuration from page contents to persistence. More...
 
void setAllowSave (bool b)
 Change whether settings on this page can be stored in persisting configuration. More...
 

Protected Member Functions

void addWidget (QWidget *widget)
 Add a new, custom widget below the standard ones. More...
 
void browseForBinary (QLineEdit *input, const QString &type)
 Open file browse dialog and update "input" when successful. More...
 
void saveSettings ()
 Reimplement this to write settings to config from widgets. More...
 

Additional Inherited Members

- Signals inherited from ConfigurationBaseBox
void appearanceChanged ()
 Emit to tell Doomseeker to redraw certain widgets. More...
 

Detailed Description

Base for configuration pages for plugins; provides some default behavior.

An extension of ConfigurationBaseBox. This class is already prepared to support most common and basic settings which include paths to the game's client and server executables, custom parameters and master server address. Plugins can reimplement this widget to benefit from this default behavior and also extend the page with additional widgets.

New subclassed instances of this configuration page can be created and returned in a reimplementation of the EnginePlugin::configuration() method.

Definition at line 48 of file engineconfigurationbasebox.h.

Constructor & Destructor Documentation

EngineConfigurationBaseBox::EngineConfigurationBaseBox ( const EnginePlugin plugin,
IniSection cfg,
QWidget *  parent = NULL 
)
Parameters
pluginParent plugin handled by this page.
cfgIniSection which handles configuration for this plugin. Usually this should be set to whatever EnginePlugin::data()->pConfig points to.
parentParent widget, most likely configuration dialog box.

Member Function Documentation

void EngineConfigurationBaseBox::addWidget ( QWidget *  widget)
protected

Add a new, custom widget below the standard ones.

Definition at line 81 of file engineconfigurationbasebox.cpp.

void EngineConfigurationBaseBox::browseForBinary ( QLineEdit *  input,
const QString &  type 
)
protected

Open file browse dialog and update "input" when successful.

Parameters
inputA QLineEdit widget which contents are changed when user picks a valid file.
typeName of executable type, displayed in browser's title.

Definition at line 88 of file engineconfigurationbasebox.cpp.

QIcon EngineConfigurationBaseBox::icon ( ) const
virtual

Reimplement this to return a displayable icon for the ConfigurationBaseBox.

If there is no QIcon associated with this box just return a QIcon object with argument-less constructor.

Implements ConfigurationBaseBox.

Definition at line 120 of file engineconfigurationbasebox.cpp.

QString EngineConfigurationBaseBox::name ( ) const
virtual

Reimplement this to return a list-displayable name for this ConfigurationBaseBox.

Implements ConfigurationBaseBox.

Definition at line 133 of file engineconfigurationbasebox.cpp.

const EnginePlugin * EngineConfigurationBaseBox::plugin ( ) const

Parent plugin handled by this page.

Definition at line 138 of file engineconfigurationbasebox.cpp.

void EngineConfigurationBaseBox::readSettings ( )
virtual

Reimplement this to read settings from config into widgets.

Implements ConfigurationBaseBox.

Definition at line 143 of file engineconfigurationbasebox.cpp.

void EngineConfigurationBaseBox::saveSettings ( )
protectedvirtual

Reimplement this to write settings to config from widgets.

Implements ConfigurationBaseBox.

Definition at line 193 of file engineconfigurationbasebox.cpp.

QString EngineConfigurationBaseBox::title ( ) const
virtual

Page title, by default returns the same string as name().

Reimplemented from ConfigurationBaseBox.

Definition at line 211 of file engineconfigurationbasebox.cpp.


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