QSettingsDialog
1.0.0
A Qt library to easily create a settings dialog for user configurable settings
|
Defines a simple, synchronous loader. More...
#include <qsettingsloader.h>
Public Member Functions | |
bool | isAsync () const final |
Specifies, whether this loader is async or not. | |
virtual bool | load (QVariant outParam data, bool outParam userEdited)=0 |
Will be called if settings need to be loaded form this loader. More... | |
virtual bool | save (const QVariant &data)=0 |
Will be called to save settings from the dialog to this loader. More... | |
virtual bool | reset ()=0 |
Will be called to reset the data this loader manages. More... | |
Public Member Functions inherited from QSettingsLoader | |
virtual | ~QSettingsLoader () |
Virtual destructor. | |
QSimpleSettingsLoader * | simple () |
Casts this instance to a QSimpleSettingsLoader. Will assert if the conversion fails. | |
QAsyncSettingsLoader * | async () |
Casts this instance to a QAsyncSettingsLoader. Will assert if the conversion fails. | |
Defines a simple, synchronous loader.
The simple loader can be used to manage settings sources that are fast and can be accessed synchronously from the main thread.
For sources that belong to different threads or will take some time to be loaded/saved, please use QAsyncSettingsLoader
Will be called if settings need to be loaded form this loader.
data | [outParam] A reference to the QVariant object to load the data into. (Defaults to QVariant::Invalid ) |
userEdited | [outParam] A reference to a bool to specify whether the value comes from the user or is the default. (Defaults to false ) |
true
, if loading was successful, false
if notThis method will be called from the engine to load settings for the display dialog. The loaded value should be written into data
. You can use the userEdited parameter to activate/deactivate the entry. If loading was successful return true
. If not return false
and an error will be shown to the user and the entry that uses this loader will be diabled.
Implemented in QSettingsSettingsLoader.
|
pure virtual |
Will be called to reset the data this loader manages.
true
, if resetting was successful, false
if notIf resetting was successful return true
. If not return false
and an error will be shown to the user and the entry that uses this loader will be diabled.
Implemented in QSettingsSettingsLoader.
|
pure virtual |
Will be called to save settings from the dialog to this loader.
data | The data to be saved. |
true
, if saving was successful, false
if notIf saving was successful return true
. If not return false
and an error will be shown to the user and the entry that uses this loader will be diabled.
Implemented in QSettingsSettingsLoader.