X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fsettingspage.h;h=fe71d739a73a97652424a1cf058deac7165983b4;hp=c158c6b7c03f6c9fb15309ef907de139d3eddb60;hb=3a3e844f9fcfd12235a0086af75ecd503b621ef4;hpb=12028f7dfb31ebf5694f5dae95bfc31bcde83b43 diff --git a/src/uisupport/settingspage.h b/src/uisupport/settingspage.h index c158c6b7..fe71d739 100644 --- a/src/uisupport/settingspage.h +++ b/src/uisupport/settingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2016 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -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,13 @@ 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); + ~SettingsPage() override {}; //! The category of this settings page. inline virtual QString category() const { return _category; } @@ -115,6 +117,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 +168,3 @@ private: bool _changed, _autoWidgetsChanged; QObjectList _autoWidgets; }; - - -#endif