/***************************************************************************
- * 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 *
#ifndef _SETTINGSPAGE_H_
#define _SETTINGSPAGE_H_
-//! Interface that needs to be implemented by pages of the settings dialog.
-class SettingsPage {
+#include <QWidget>
+
+//! 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