X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsettingspage.h;h=49c4c6be3e0d95336bd56f6ae797bb5bfa8fbfd6;hp=2821c21750471729b7a7e2d4bc4bfd233cdcc2e7;hb=c59b6ec31830539963688a8a596b3aacc0455014;hpb=9fd4619e9aca7d53d7c5df156a0b25956a1bf682 diff --git a/src/qtui/settingspage.h b/src/qtui/settingspage.h index 2821c217..49c4c6be 100644 --- a/src/qtui/settingspage.h +++ b/src/qtui/settingspage.h @@ -1,11 +1,11 @@ /*************************************************************************** - * Copyright (C) 2005-07 by The Quassel IRC Development Team * + * Copyright (C) 2005-07 by the Quassel IRC Team * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * + * (at your option) version 3. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -21,23 +21,28 @@ #ifndef _SETTINGSPAGE_H_ #define _SETTINGSPAGE_H_ -//! Interface that needs to be implemented by pages of the settings dialog. -class SettingsPage { +#include + +//! A SettingsPage is a page in the settings dialog. +class SettingsPage : public QWidget { + Q_OBJECT + public: + SettingsPage(const QString &category, const QString &name, QWidget *parent = 0); virtual ~SettingsPage() {}; - virtual QString category() = 0; - virtual QString title() = 0; - virtual QWidget *widget() = 0; - virtual void saveSettings() = 0; - virtual void loadSettings() = 0; + virtual QString category() const; + virtual QString name() const; - virtual bool hasChanged() = 0; + virtual bool hasChanged() const = 0; + + public slots: + virtual void save() = 0; + virtual void load() = 0; + virtual void defaults() = 0; signals: - void modified(); + void changed(bool hasChanged = true); }; -Q_DECLARE_INTERFACE(SettingsPage, "org.quassel-irc.iface.SettingsPage/1.0"); - #endif