Add a tools settings page and show the tools there.

No editing possible yet.
This commit is contained in:
con
2011-01-06 18:26:09 +01:00
parent b9f9cf3d79
commit d768008d60
12 changed files with 604 additions and 21 deletions

View File

@@ -446,6 +446,15 @@ void SettingsDialog::ensureAllCategoryWidgets()
ensureCategoryWidget(category);
}
void SettingsDialog::disconnectTabWidgets()
{
foreach (Category *category, m_model->categories()) {
if (category->tabWidget)
disconnect(category->tabWidget, SIGNAL(currentChanged(int)),
this, SLOT(currentTabChanged(int)));
}
}
void SettingsDialog::updateEnabledTabs(Category *category, const QString &searchText)
{
for (int i = 0; i < category->pages.size(); ++i) {
@@ -497,6 +506,7 @@ void SettingsDialog::filter(const QString &text)
void SettingsDialog::accept()
{
disconnectTabWidgets();
m_applied = true;
foreach (IOptionsPage *page, m_visitedPages)
page->apply();
@@ -507,6 +517,7 @@ void SettingsDialog::accept()
void SettingsDialog::reject()
{
disconnectTabWidgets();
foreach (IOptionsPage *page, m_pages)
page->finish();
done(QDialog::Rejected);