Skip to content

Commit 9c466e6

Browse files
committed
Append to last commit
1 parent 1d71b1d commit 9c466e6

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

src/Interface/Application/MainWindowCollaborators.cc

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
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

3637
using namespace SCIRun::Gui;
3738
using 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+
178191
QWizardPage* 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+
266284
class ConnectionStyleWizardPage : public QWizardPage, public Ui::ConnectionStyleWizardPage
267285
{
268286
public:
@@ -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

Comments
 (0)