X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fsettingspage.h;h=667c908767635b8d3ada0e836c34fbf2ef241485;hp=eaa0d5f789c56c5c0b23814391c0b99f72a0a60e;hb=09e964ea3cd4995374dd7adb33256f3cefd47032;hpb=695758015a80eb8c158a9ac4c0f1c0b547e70df3 diff --git a/src/uisupport/settingspage.h b/src/uisupport/settingspage.h index eaa0d5f7..667c9087 100644 --- a/src/uisupport/settingspage.h +++ b/src/uisupport/settingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 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 * @@ -26,6 +26,7 @@ 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. @@ -74,6 +75,13 @@ public: */ inline virtual bool needsCoreConnection() const { return false; } + /** + * Whether the settingspage should be selectable or not, in a given situation + * Used for pages that should only be visible if certain features are available (or not). + * @return + */ + inline virtual bool isSelectable() const { return true; } + //! The key this settings page stores its values under /** This needs to be overriden to enable automatic loading/saving/hasChanged checking of widgets. * The child widgets' values will be stored in client settings under this key. Every widget that @@ -108,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.