ConfigurationBaseBox Class Referenceabstract

Base class for configuration pages. More...

#include <configurationbasebox.h>

+ Inheritance diagram for ConfigurationBaseBox:

Signals

void appearanceChanged ()
 Emit to tell Doomseeker to redraw certain widgets. More...
 

Public Member Functions

 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...
 
virtual QIcon icon () const =0
 Reimplement this to return a displayable icon for the ConfigurationBaseBox. More...
 
virtual QString name () const =0
 Reimplement this to return a list-displayable name for this ConfigurationBaseBox. 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...
 
virtual QString title () const
 Page title, by default returns the same string as name(). More...
 

Protected Member Functions

virtual void readSettings ()=0
 Reimplement this to read settings from config into widgets. More...
 
virtual void saveSettings ()=0
 Reimplement this to write settings to config from widgets. More...
 

Detailed Description

Base class for configuration pages.

Subclassed pages contain actual widgets allowing user input in order to configure program's modules. Specific settings are read and saved through virtual methods: saveSettings() and readSettings().

Plugins should rather inherit from EngineConfigurationBaseBox as this provides some default, common behavior, like executable path or custom program parameters configuration.

Definition at line 43 of file configurationbasebox.h.

Member Function Documentation

bool ConfigurationBaseBox::allowSave ( )

Does this page allow to save the new settings?

See Also
setAllowSave()

Definition at line 46 of file configurationbasebox.cpp.

void ConfigurationBaseBox::appearanceChanged ( )
signal

Emit to tell Doomseeker to redraw certain widgets.

This will send a request to Doomseeker to redraw some graphics. This should be emitted if settings on current page change program's appearance so that program can redraw affected widgets.

bool ConfigurationBaseBox::areSettingsAlreadyRead ( )

true if settings for this page have already been loaded at least once.

Definition at line 51 of file configurationbasebox.cpp.

virtual QIcon ConfigurationBaseBox::icon ( ) const
pure 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.

Implemented in EngineConfigurationBaseBox, CFGCustomServers, CFGFilePaths, CFGIRCNetworks, CFGServerPasswords, CFGWadAlias, CFGWadseekerSites, CFGAppearance, CFGIP2Country, CFGQuery, CFGIRCSounds, CFGAutoUpdates, CFGWadseekerAppearance, CFGWadseekerGeneral, CFGWadseekerIdgames, CfgChatLogsPage, and CFGIRCAppearance.

void ConfigurationBaseBox::read ( )

Read configuration from persistence to page contents.

Definition at line 56 of file configurationbasebox.cpp.

virtual void ConfigurationBaseBox::readSettings ( )
protectedpure virtual
bool ConfigurationBaseBox::save ( )

Save configuration from page contents to persistence.

Returns
true if save completes successfully, false on error.

Definition at line 62 of file configurationbasebox.cpp.

virtual void ConfigurationBaseBox::saveSettings ( )
protectedpure virtual
void ConfigurationBaseBox::setAllowSave ( bool  b)

Change whether settings on this page can be stored in persisting configuration.

Definition at line 75 of file configurationbasebox.cpp.

QString ConfigurationBaseBox::title ( ) const
virtual

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