X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fsettingspage.cpp;h=c815d98f6e5ac511dc34dad86a0e70a70126e5cc;hb=26b9300ccab24e526a9f43bef95a2a70f59161df;hp=e752ec72efa45f60278fd901c5b6b93aaac732cd;hpb=6579cd49c867ce3fb6c99127851a881ea82d1b1b;p=quassel.git diff --git a/src/uisupport/settingspage.cpp b/src/uisupport/settingspage.cpp index e752ec72..c815d98f 100644 --- a/src/uisupport/settingspage.cpp +++ b/src/uisupport/settingspage.cpp @@ -20,6 +20,9 @@ #include "settingspage.h" +#include +#include + SettingsPage::SettingsPage(const QString &category, const QString &title, QWidget *parent) : QWidget(parent), _category(category), @@ -35,3 +38,11 @@ void SettingsPage::setChangedState(bool hasChanged) { } } +void SettingsPage::load(QCheckBox *box, bool checked) { + box->setProperty("StoredValue", checked); + box->setChecked(checked); +} + +bool SettingsPage::hasChanged(QCheckBox *box) { + return box->property("StoredValue").toBool() == box->isChecked(); +}