X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fsettingspage.cpp;h=b98c9b8d0811052a488920c62e1a4c67544c5910;hb=a65f42197839da536975b3e2858eedcef420035f;hp=bb9d9344e74f63a26b746047636eacb6cdcbfc03;hpb=6dbccb6a28b1f72347548b31f68031d4cabb594d;p=quassel.git diff --git a/src/uisupport/settingspage.cpp b/src/uisupport/settingspage.cpp index bb9d9344..b98c9b8d 100644 --- a/src/uisupport/settingspage.cpp +++ b/src/uisupport/settingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2019 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -25,6 +25,8 @@ #include #include +#include "fontselector.h" + #include "uisettings.h" SettingsPage::SettingsPage(const QString &category, const QString &title, QWidget *parent) @@ -85,6 +87,18 @@ bool SettingsPage::hasChanged(QSpinBox *box) { return box->property("storedValue").toInt() != box->value(); } + + +void SettingsPage::load(FontSelector *box, QFont value) +{ + box->setProperty("storedValue", value); + box->setSelectedFont(value); +} + + +bool SettingsPage::hasChanged(FontSelector *box) +{ + return box->property("storedValue").value() != box->selectedFont(); }