/***************************************************************************
- * Copyright (C) 2005-07 by The Quassel 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 *
connect(ui.buttonBox, SIGNAL(clicked(QAbstractButton *)), this, SLOT(buttonClicked(QAbstractButton *)));
}
+
void SettingsDlg::registerSettingsPage(SettingsPage *sp) {
- QWidget *w = sp->widget();
- w->setParent(this);
- ui.settingsStack->addWidget(w);
+ sp->setParent(this);
+ ui.settingsStack->addWidget(sp);
QTreeWidgetItem *cat;
QList<QTreeWidgetItem *> cats = ui.settingsTree->findItems(sp->category(), Qt::MatchExactly);
cat->setFlags(Qt::ItemIsEnabled);
} else cat = cats[0];
QTreeWidgetItem *p = new QTreeWidgetItem(cat, QStringList(sp->title()));
- pages[QString("%1$%2").arg(sp->category()).arg(sp->title())] = sp;
+ pages[QString("%1$%2").arg(sp->category(), sp->title())] = sp;
}
void SettingsDlg::selectPage(const QString &cat, const QString &title) {
- QWidget *w = pages[QString("%1$%2").arg(cat).arg(title)]->widget();
+ QWidget *w = pages[QString("%1$%2").arg(cat, title)];
Q_ASSERT(w);
ui.settingsStack->setCurrentWidget(w);
}
//SettingsInterface *sp = qobject_cast<SettingsInterface *>(ui.settingsStack->currentWidget());
//if(sp) sp->applyChanges();
}
+