3131#include < Interface/Application/SCIRunMainWindow.h>
3232#include < Core/Logging/Log.h>
3333#include " ui_ConnectionStyleWizardPage.h"
34- #include < Interface/Application/ui_ConnectionStyleWizardPage.h>
34+ #include " ui_OtherSettingsWizardPage.h"
35+ #include < Core/Application/Preferences/Preferences.h>
3536
3637using namespace SCIRun ::Gui;
3738using namespace SCIRun ::Core::Logging;
@@ -171,10 +172,22 @@ NewUserWizard::NewUserWizard(QWidget* parent) : QWizard(parent)
171172 addPage (createIntroPage ());
172173 addPage (createPathSettingPage ());
173174 addPage (createConnectionChoicePage ());
175+ addPage (createOtherSettingsPage ());
174176 addPage (createLicensePage ());
175177 addPage (createDocPage ());
176178}
177179
180+ NewUserWizard::~NewUserWizard ()
181+ {
182+ showPrefs ();
183+ }
184+
185+ void NewUserWizard::showPrefs ()
186+ {
187+ if (showPrefs_)
188+ SCIRunMainWindow::Instance ()->actionPreferences_ ->trigger ();
189+ }
190+
178191QWizardPage* NewUserWizard::createIntroPage ()
179192{
180193 auto page = new QWizardPage;
@@ -263,6 +276,11 @@ void NewUserWizard::updatePathLabel(const QString& dir)
263276 pathWidget_->setText (dir);
264277}
265278
279+ void NewUserWizard::setShowPrefs (int state)
280+ {
281+ showPrefs_ = state != 0 ;
282+ }
283+
266284class ConnectionStyleWizardPage : public QWizardPage , public Ui ::ConnectionStyleWizardPage
267285{
268286public:
@@ -281,3 +299,19 @@ QWizardPage* NewUserWizard::createConnectionChoicePage()
281299{
282300 return new ConnectionStyleWizardPage;
283301}
302+
303+ class OtherSettingsWizardPage : public QWizardPage , public Ui ::OtherSettingsWizardPage
304+ {
305+ public:
306+ explicit OtherSettingsWizardPage (NewUserWizard* wiz)
307+ {
308+ setupUi (this );
309+ // connect(saveBeforeExecuteCheckBox_, SIGNAL(stateChanged(int)), SCIRunMainWindow::Instance(), SLOT(setConnectionPipelineType(int)));
310+ connect (loadPreferencesCheckBox_, SIGNAL (stateChanged (int )), wiz, SLOT (setShowPrefs (int )));
311+ }
312+ };
313+
314+ QWizardPage* NewUserWizard::createOtherSettingsPage ()
315+ {
316+ return new OtherSettingsWizardPage (this );
317+ }
0 commit comments