X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fsettingspage.h;h=7a5bcc6ac641b2c607207bd07ca7de4671f92655;hp=a9f32b8f6efda1ff71ce8a097ced50dc255eb1ac;hb=5992edbbfa5a6e4a3c72b07c6f08a464f87dd432;hpb=6579cd49c867ce3fb6c99127851a881ea82d1b1b diff --git a/src/uisupport/settingspage.h b/src/uisupport/settingspage.h index a9f32b8f..7a5bcc6a 100644 --- a/src/uisupport/settingspage.h +++ b/src/uisupport/settingspage.h @@ -23,6 +23,10 @@ #include +class QCheckBox; +class QComboBox; +class QSpinBox; + //! A SettingsPage is a page in the settings dialog. /** The SettingsDlg provides suitable standard buttons, such as Ok, Apply, Cancel, Restore Defaults and Reset. * Some pages might also be used in standalone dialogs or other containers. A SettingsPage provides suitable @@ -57,7 +61,15 @@ public: * \return false, if the SettingsPage cannot be saved in its current state. */ inline virtual bool aboutToSave() { return true; } - + + //! sets checked state depending on \checked and stores the value for later comparision + static void load(QCheckBox *box, bool checked); + static bool hasChanged(QCheckBox *box); + static void load(QComboBox *box, int index); + static bool hasChanged(QComboBox *box); + static void load(QSpinBox *box, int value); + static bool hasChanged(QSpinBox *box); + public slots: //! Save settings to permanent storage. virtual void save() = 0; @@ -86,4 +98,6 @@ private: bool _changed; }; + + #endif