X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fsettingspage.h;h=730418e7e2d2c8485deded47b5fc68c8e6c0c307;hb=8582c2ad5708a1972c85bea1cf8d81ad3ece4814;hp=7fd95ccd8a8b5f1f668b69954347207b15c9047f;hpb=68878dc8366f2f4a0afe132847aad9a51a80cdbf;p=quassel.git diff --git a/src/uisupport/settingspage.h b/src/uisupport/settingspage.h index 7fd95ccd..730418e7 100644 --- a/src/uisupport/settingspage.h +++ b/src/uisupport/settingspage.h @@ -18,14 +18,16 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef _SETTINGSPAGE_H_ -#define _SETTINGSPAGE_H_ +#pragma once + +#include "uisupport-export.h" #include class QCheckBox; class QComboBox; class QSpinBox; +class FontSelector; //! A SettingsPage is a page in the settings dialog. /** The SettingsDlg provides suitable standard buttons, such as Ok, Apply, Cancel, Restore Defaults and Reset. @@ -54,13 +56,12 @@ class QSpinBox; * - QComboBox (currentIndex()) * - QSpinBox (value()) */ -class SettingsPage : public QWidget +class UISUPPORT_EXPORT SettingsPage : public QWidget { Q_OBJECT public: - SettingsPage(const QString &category, const QString &name, QWidget *parent = 0); - virtual ~SettingsPage() {}; + SettingsPage(QString category, QString name, QWidget *parent = nullptr); //! The category of this settings page. inline virtual QString category() const { return _category; } @@ -115,6 +116,8 @@ public: static bool hasChanged(QComboBox *box); static void load(QSpinBox *box, int value); static bool hasChanged(QSpinBox *box); + static void load(FontSelector *box, QFont value); + static bool hasChanged(FontSelector *box); public slots: //! Save settings to permanent storage. @@ -164,6 +167,3 @@ private: bool _changed, _autoWidgetsChanged; QObjectList _autoWidgets; }; - - -#endif