X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fsettingspage.h;h=3ef6d2cc5e16482cf1e4c5c34116a04007b038ca;hp=4a106aa1394bb1564587af3ceda942c95221164a;hb=1545449bce16fa939869d73ed5d4bbd8416d4512;hpb=84b0f5fb3219bcc777f74f609c88011c86873f6c diff --git a/src/uisupport/settingspage.h b/src/uisupport/settingspage.h index 4a106aa1..3ef6d2cc 100644 --- a/src/uisupport/settingspage.h +++ b/src/uisupport/settingspage.h @@ -40,6 +40,9 @@ class QSpinBox; * its key is treated as a global path starting from the root, rather than from settingsKey(). * A second dynamic property \c defaultValue can be defined in child widgets as well. * + * For widgets requiring special ways for storing and saving, define the property settingsKey and leave it empty. In this + * case, the methods saveAutoWidgetValue() and loadAutoWidgetValue() will be called with the widget's objectName as parameter. + * * SettingsPage manages loading, saving, setting to default and setting the changed state for all automatic child widgets. * Derived classes must be sure to call initAutoWidgets() *after* setupUi(); they also need to call the baseclass implementations * of load(), save() and defaults() (preferably at the end of the derived function, since they call setChangedState(false)). @@ -127,6 +130,8 @@ protected slots: protected: void initAutoWidgets(); + virtual QVariant loadAutoWidgetValue(const QString &widgetName); + virtual void saveAutoWidgetValue(const QString &widgetName, const QVariant &value); signals: //! Emitted whenever the widget state changes.