Skip to content

Commit 7f80fc2

Browse files
committed
Connection style wizard page
1 parent 393cd81 commit 7f80fc2

File tree

8 files changed

+143
-5
lines changed

8 files changed

+143
-5
lines changed

src/Interface/Application/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ SET(Interface_Application_HEADERS
102102
SET(Interface_Application_FORMS
103103
DeveloperConsole.ui
104104
Module.ui
105-
#ModuleMini.ui
105+
ConnectionStyleWizardPage.ui
106106
ModuleLogWindow.ui
107107
NoteEditor.ui
108108
Preferences.ui
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>ConnectionStyleWizardPage</class>
4+
<widget class="QWizardPage" name="ConnectionStyleWizardPage">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>630</width>
10+
<height>221</height>
11+
</rect>
12+
</property>
13+
<property name="windowTitle">
14+
<string/>
15+
</property>
16+
<property name="title">
17+
<string>Connection style</string>
18+
</property>
19+
<property name="subTitle">
20+
<string>Choose a connection draw style:</string>
21+
</property>
22+
<layout class="QGridLayout" name="gridLayout_2">
23+
<item row="0" column="0">
24+
<widget class="QRadioButton" name="manhattanRadioButton_">
25+
<property name="text">
26+
<string>Manhattan</string>
27+
</property>
28+
</widget>
29+
</item>
30+
<item row="0" column="1">
31+
<widget class="QRadioButton" name="euclideanRadioButton_">
32+
<property name="text">
33+
<string>Euclidean</string>
34+
</property>
35+
</widget>
36+
</item>
37+
<item row="0" column="2">
38+
<widget class="QRadioButton" name="cubicRadioButton_">
39+
<property name="text">
40+
<string>Cubic</string>
41+
</property>
42+
</widget>
43+
</item>
44+
<item row="1" column="0">
45+
<widget class="QLabel" name="manhattanLabel_">
46+
<property name="sizePolicy">
47+
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
48+
<horstretch>0</horstretch>
49+
<verstretch>0</verstretch>
50+
</sizepolicy>
51+
</property>
52+
<property name="minimumSize">
53+
<size>
54+
<width>200</width>
55+
<height>180</height>
56+
</size>
57+
</property>
58+
<property name="text">
59+
<string/>
60+
</property>
61+
</widget>
62+
</item>
63+
<item row="1" column="1">
64+
<widget class="QLabel" name="euclideanLabel_">
65+
<property name="sizePolicy">
66+
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
67+
<horstretch>0</horstretch>
68+
<verstretch>0</verstretch>
69+
</sizepolicy>
70+
</property>
71+
<property name="minimumSize">
72+
<size>
73+
<width>200</width>
74+
<height>180</height>
75+
</size>
76+
</property>
77+
<property name="text">
78+
<string/>
79+
</property>
80+
</widget>
81+
</item>
82+
<item row="1" column="2">
83+
<widget class="QLabel" name="cubicLabel_">
84+
<property name="sizePolicy">
85+
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
86+
<horstretch>0</horstretch>
87+
<verstretch>0</verstretch>
88+
</sizepolicy>
89+
</property>
90+
<property name="minimumSize">
91+
<size>
92+
<width>200</width>
93+
<height>180</height>
94+
</size>
95+
</property>
96+
<property name="text">
97+
<string/>
98+
</property>
99+
</widget>
100+
</item>
101+
</layout>
102+
</widget>
103+
<resources/>
104+
<connections/>
105+
</ui>

src/Interface/Application/MainWindowCollaborators.cc

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
#include <Interface/Application/MainWindowCollaborators.h>
3131
#include <Interface/Application/SCIRunMainWindow.h>
3232
#include <Core/Logging/Log.h>
33+
#include "ui_ConnectionStyleWizardPage.h"
34+
#include <Interface/Application/ui_ConnectionStyleWizardPage.h>
3335

3436
using namespace SCIRun::Gui;
3537
using namespace SCIRun::Core::Logging;
@@ -161,12 +163,14 @@ void WidgetDisablingService::temporarilyEnableService()
161163

162164
NewUserWizard::NewUserWizard(QWidget* parent) : QWizard(parent)
163165
{
164-
setWindowTitle("SCIRun Tutorial");
166+
setWindowTitle("SCIRun Initial Setup");
165167
//setPixmap(WatermarkPixmap, QPixmap(":/general/Resources/scirun_5_0_alpha.png"));
166168
//setPixmap(BackgroundPixmap, QPixmap(":/general/Resources/scirun_5_0_alpha.png"));
169+
setOption(NoCancelButton);
167170

168171
addPage(createIntroPage());
169172
addPage(createPathSettingPage());
173+
addPage(createConnectionChoicePage());
170174
addPage(createLicensePage());
171175
}
172176

@@ -189,17 +193,17 @@ class PathSettingPage : public QWizardPage
189193
}
190194
};
191195

192-
193-
194196
QWizardPage* NewUserWizard::createPathSettingPage()
195197
{
196198
pathWidget_ = new QLineEdit("");
197199
pathWidget_->setReadOnly(true);
198200
auto page = new PathSettingPage(pathWidget_);
199201
page->setTitle("Configuring Paths");
200202
page->setSubTitle("Specify the location of SCIRun's data folder. This path is referenced in network files and modules using the code %SCIRUNDATADIR%.");
203+
auto downloadLabel = new QLabel("The data can be downloaded from <a href=\"http://www.sci.utah.edu/download/scirun/\">sci.utah.edu</a>");
201204

202205
auto layout = new QVBoxLayout;
206+
layout->addWidget(downloadLabel);
203207

204208
layout->addWidget(pathWidget_);
205209
auto button = new QPushButton("Set Path...");
@@ -217,8 +221,11 @@ QWizardPage* NewUserWizard::createLicensePage()
217221
auto page = new QWizardPage;
218222
page->setTitle("Applicable Licenses");
219223
QString licenseText(
220-
"<p><a href = \"https://github.com/SCIInstitute/SCIRun/blob/master/src/LICENSE.txt\">SCIRun License"
224+
"<p><a href = \"https://github.com/SCIInstitute/SCIRun/blob/master/src/LICENSE.txt\">SCIRun License</a>"
221225
"<p><a href = \"https://github.com/CIBC-Internal/teem/blob/master/LICENSE.txt\">Teem License</a>"
226+
#if WITH_TETGEN
227+
"<p><a href = \"http://wias-berlin.de/software/tetgen/1.5/FAQ-license.html\">Tetgen License</a>"
228+
#endif
222229
);
223230
auto layout = new QVBoxLayout;
224231
auto licenseLabel = new QLabel(licenseText);
@@ -230,4 +237,26 @@ QWizardPage* NewUserWizard::createLicensePage()
230237
void NewUserWizard::updatePathLabel(const QString& dir)
231238
{
232239
pathWidget_->setText(dir);
240+
}
241+
242+
243+
class ConnectionStyleWizardPage : public QWizardPage, public Ui::ConnectionStyleWizardPage
244+
{
245+
public:
246+
ConnectionStyleWizardPage()
247+
{
248+
setupUi(this);
249+
manhattanLabel_->setPixmap(QPixmap(":/general/Resources/manhattan.png"));
250+
registerField("useManhattan*", manhattanRadioButton_);
251+
euclideanLabel_->setPixmap(QPixmap(":/general/Resources/euclidean.png"));
252+
registerField("useEuclidean*", euclideanRadioButton_);
253+
cubicLabel_->setPixmap(QPixmap(":/general/Resources/cubic.png"));
254+
registerField("useCubic*", cubicRadioButton_);
255+
}
256+
};
257+
258+
QWizardPage* NewUserWizard::createConnectionChoicePage()
259+
{
260+
auto page = new ConnectionStyleWizardPage;
261+
return page;
233262
}

src/Interface/Application/MainWindowCollaborators.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ namespace Gui {
185185
QWizardPage* createIntroPage();
186186
QWizardPage* createPathSettingPage();
187187
QWizardPage* createLicensePage();
188+
QWizardPage* createConnectionChoicePage();
188189
QLineEdit* pathWidget_;
189190
};
190191
}
5.54 KB
Loading
4.6 KB
Loading
4.06 KB
Loading

src/Interface/Application/scirun5.qrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
<file>Resources/copy.png</file>
3333
<file>Resources/paste.png</file>
3434
<file>Resources/download.png</file>
35+
<file>Resources/cubic.png</file>
36+
<file>Resources/euclidean.png</file>
37+
<file>Resources/manhattan.png</file>
3538
<file>Resources/timepiece-512.png</file>
3639
<file>Resources/new/general/folder.png</file>
3740
<file>Resources/new/general/header-divider.png</file>

0 commit comments

Comments
 (0)