#include "settingsdlg.h"
+#include "iconloader.h"
+
SettingsDlg::SettingsDlg(QWidget *parent)
: QDialog(parent),
_currentPage(0)
{
ui.setupUi(this);
+ setModal(true);
+ setAttribute(Qt::WA_DeleteOnClose, true);
+ setWindowIcon(SmallIcon("configure"));
updateGeometry();
connect(ui.settingsTree, SIGNAL(itemSelectionChanged()), this, SLOT(itemSelected()));
connect(ui.buttonBox, SIGNAL(clicked(QAbstractButton *)), this, SLOT(buttonClicked(QAbstractButton *)));
+
+ setButtonStates();
}
void SettingsDlg::registerSettingsPage(SettingsPage *sp) {
sp->setParent(ui.settingsStack);
ui.settingsStack->addWidget(sp);
-
+
connect(sp, SIGNAL(changed(bool)), this, SLOT(setButtonStates()));
QTreeWidgetItem *cat;
if(sp != currentPage()) {
ui.pageTitle->setText(sp->title());
+ setWindowTitle(tr("Configure %1").arg(sp->title()));
ui.settingsStack->setCurrentWidget(sp);
_currentPage = sp;
}