Loading src/gui/config/configdialog.cpp +1 −1 Changes for src/gui/config/configdialog.cpp: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -136,7 +136,7 @@ ConfigDialog::saveChanges() foreach (ConfigPage *page, ui.stackPages->pages()) { if (!page->save(errmsg)) { /* Display the offending page */ ui.stackPages->setCurrentWidget(page); ui.stackPages->setCurrentPage(page); /* Show the user what went wrong */ QMessageBox::warning(this, Loading src/gui/config/configpagestack.cpp +11 −0 Changes for src/gui/config/configpagestack.cpp: 11 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ * \version $Id$ */ #include <QAction> #include "configpagestack.h" /** Default constructor. */ Loading @@ -40,6 +41,16 @@ ConfigPageStack::add(ConfigPage *page, QAction *action) insertWidget(count(), page); } /** Sets the current config page and checks its action. */ void ConfigPageStack::setCurrentPage(ConfigPage *page) { foreach (QAction *action, _pages.keys(page)) { action->setChecked(true); } setCurrentWidget(page); } /** Shows the config page associated with the activated action. */ void ConfigPageStack::showPage(QAction *pageAction) Loading src/gui/config/configpagestack.h +2 −0 Changes for src/gui/config/configpagestack.h: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -43,6 +43,8 @@ public: /** Adds a configuration page to the stack. */ void add(ConfigPage *page, QAction *action); /** Sets the current config page and checks its action. */ void setCurrentPage(ConfigPage *page); /** Returns a list of all pages in the stack. */ QList<ConfigPage*> pages() { return _pages.values(); } Loading Loading
src/gui/config/configdialog.cpp +1 −1 Changes for src/gui/config/configdialog.cpp: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -136,7 +136,7 @@ ConfigDialog::saveChanges() foreach (ConfigPage *page, ui.stackPages->pages()) { if (!page->save(errmsg)) { /* Display the offending page */ ui.stackPages->setCurrentWidget(page); ui.stackPages->setCurrentPage(page); /* Show the user what went wrong */ QMessageBox::warning(this, Loading
src/gui/config/configpagestack.cpp +11 −0 Changes for src/gui/config/configpagestack.cpp: 11 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ * \version $Id$ */ #include <QAction> #include "configpagestack.h" /** Default constructor. */ Loading @@ -40,6 +41,16 @@ ConfigPageStack::add(ConfigPage *page, QAction *action) insertWidget(count(), page); } /** Sets the current config page and checks its action. */ void ConfigPageStack::setCurrentPage(ConfigPage *page) { foreach (QAction *action, _pages.keys(page)) { action->setChecked(true); } setCurrentWidget(page); } /** Shows the config page associated with the activated action. */ void ConfigPageStack::showPage(QAction *pageAction) Loading
src/gui/config/configpagestack.h +2 −0 Changes for src/gui/config/configpagestack.h: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -43,6 +43,8 @@ public: /** Adds a configuration page to the stack. */ void add(ConfigPage *page, QAction *action); /** Sets the current config page and checks its action. */ void setCurrentPage(ConfigPage *page); /** Returns a list of all pages in the stack. */ QList<ConfigPage*> pages() { return _pages.values(); } Loading