/***************************************************************************
- * Copyright (C) 2005-08 by the Quassel IRC Team *
+ * Copyright (C) 2005-08 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
SettingsPage::SettingsPage(const QString &category, const QString &title, QWidget *parent) : QWidget(parent),
_category(category), _title(title) {
+ _changed = false;
}
QString SettingsPage::category() const {
return _title;
}
+bool SettingsPage::hasDefaults() const {
+ return false;
+}
+
+void SettingsPage::defaults() {
+
+}
+
+bool SettingsPage::hasChanged() const {
+ return _changed;
+}
+
+bool SettingsPage::aboutToSave() {
+ return true;
+}
+
void SettingsPage::changed() {
- emit changed(true);
+ setChangedState(true);
}
-void SettingsPage::changeState(bool hasChanged) {
- emit changed(hasChanged);
+void SettingsPage::setChangedState(bool hasChanged) {
+ if(hasChanged != _changed) {
+ _changed = hasChanged;
+ emit changed(hasChanged);
+ }
}
+