Base for configuration pages for plugins; provides some default behavior. More...
#include <engineconfigurationbasebox.h>
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 EnginePlugin * | plugin () 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... | |
![]() | |
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 | |
![]() | |
void | appearanceChanged () |
Emit to tell Doomseeker to redraw certain widgets. More... | |
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.
EngineConfigurationBaseBox::EngineConfigurationBaseBox | ( | const EnginePlugin * | plugin, |
IniSection & | cfg, | ||
QWidget * | parent = NULL |
||
) |
plugin | Parent plugin handled by this page. |
cfg | IniSection which handles configuration for this plugin. Usually this should be set to whatever EnginePlugin::data()->pConfig points to. |
parent | Parent widget, most likely configuration dialog box. |
|
protected |
Add a new, custom widget below the standard ones.
Definition at line 81 of file engineconfigurationbasebox.cpp.
|
protected |
Open file browse dialog and update "input" when successful.
input | A QLineEdit widget which contents are changed when user picks a valid file. |
type | Name of executable type, displayed in browser's title. |
Definition at line 88 of file engineconfigurationbasebox.cpp.
|
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.
|
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.
|
virtual |
Reimplement this to read settings from config into widgets.
Implements ConfigurationBaseBox.
Definition at line 143 of file engineconfigurationbasebox.cpp.
|
protectedvirtual |
Reimplement this to write settings to config from widgets.
Implements ConfigurationBaseBox.
Definition at line 193 of file engineconfigurationbasebox.cpp.
|
virtual |
Page title, by default returns the same string as name().
Reimplemented from ConfigurationBaseBox.
Definition at line 211 of file engineconfigurationbasebox.cpp.