Skip to content

Commit c57774d

Browse files
committed
Working on dialog code
1 parent f75385f commit c57774d

File tree

4 files changed

+131
-2
lines changed

4 files changed

+131
-2
lines changed

src/Interface/Modules/Visualization/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
SET(Interface_Modules_Visualization_FORMS
3131
CreateBasicColorMap.ui
32+
GenerateStreamLines.ui
3233
MatrixAsVectorField.ui
3334
ShowField.ui
3435
ShowString.ui
@@ -37,6 +38,7 @@ SET(Interface_Modules_Visualization_FORMS
3738

3839
SET(Interface_Modules_Visualization_HEADERS
3940
CreateBasicColorMapDialog.h
41+
GenerateStreamLinesDialog.h
4042
MatrixAsVectorFieldDialog.h
4143
share.h
4244
ShowFieldDialog.h
@@ -46,6 +48,7 @@ SET(Interface_Modules_Visualization_HEADERS
4648

4749
SET(Interface_Modules_Visualization_SOURCES
4850
CreateBasicColorMapDialog.cc
51+
GenerateStreamLinesDialog.cc
4952
MatrixAsVectorFieldDialog.cc
5053
ShowFieldDialog.cc
5154
ShowStringDialog.cc
@@ -64,6 +67,7 @@ SCIRUN_ADD_LIBRARY(Interface_Modules_Visualization
6467

6568
TARGET_LINK_LIBRARIES(Interface_Modules_Visualization
6669
Modules_Visualization
70+
Core_Algorithms_Legacy_Field
6771
Interface_Modules_Base
6872
${SCI_BOOST_LIBRARY}
6973
${QT_LIBRARIES}

src/Interface/Modules/Visualization/GenerateStreamLines.ui

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,12 @@
153153
<item row="11" column="1">
154154
<widget class="QLabel" name="label_6">
155155
<property name="text">
156-
<string>Choose one:</string>
156+
<string>Value:</string>
157157
</property>
158158
</widget>
159159
</item>
160160
<item row="12" column="1">
161-
<widget class="QComboBox" name="choiceComboBox_">
161+
<widget class="QComboBox" name="valueComboBox_">
162162
<property name="currentIndex">
163163
<number>1</number>
164164
</property>
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
For more information, please see: http://software.sci.utah.edu
3+
4+
The MIT License
5+
6+
Copyright (c) 2012 Scientific Computing and Imaging Institute,
7+
University of Utah.
8+
9+
License for the specific language governing rights and limitations under
10+
Permission is hereby granted, free of charge, to any person obtaining a
11+
copy of this software and associated documentation files (the "Software"),
12+
to deal in the Software without restriction, including without limitation
13+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
14+
and/or sell copies of the Software, and to permit persons to whom the
15+
Software is furnished to do so, subject to the following conditions:
16+
17+
The above copyright notice and this permission notice shall be included
18+
in all copies or substantial portions of the Software.
19+
20+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26+
DEALINGS IN THE SOFTWARE.
27+
*/
28+
29+
#include <Interface/Modules/Visualization/GenerateStreamLinesDialog.h>
30+
31+
using namespace SCIRun::Gui;
32+
using namespace SCIRun::Dataflow::Networks;
33+
using namespace SCIRun::Core::Algorithms::Field;
34+
35+
GenerateStreamLinesDialog::GenerateStreamLinesDialog(const std::string& name, ModuleStateHandle state,
36+
QWidget* parent /* = 0 */)
37+
: ModuleDialogGeneric(state, parent)
38+
{
39+
setupUi(this);
40+
setWindowTitle(QString::fromStdString(name));
41+
fixSize();
42+
43+
streamlineMethod_.insert(StringPair("Direct entry", "single"));
44+
streamlineMethod_.insert(StringPair("Slider", "slider"));
45+
streamlineMethod_.insert(StringPair("L-curve", "lcurve"));
46+
streamlineMethod_.insert(StringPair("L-curve", "lcurve"));
47+
streamlineMethod_.insert(StringPair("L-curve", "lcurve"));
48+
49+
streamlineDirection_.insert(StringPair("Negative", "single"));
50+
streamlineDirection_.insert(StringPair("Both", "slider"));
51+
streamlineDirection_.insert(StringPair("Positive", "lcurve"));
52+
53+
streamlineValue_.insert(StringPair("Direct entry", "single"));
54+
streamlineValue_.insert(StringPair("Slider", "slider"));
55+
streamlineValue_.insert(StringPair("L-curve", "lcurve"));
56+
streamlineValue_.insert(StringPair("Direct entry", "single"));
57+
streamlineValue_.insert(StringPair("Slider", "slider"));
58+
streamlineValue_.insert(StringPair("L-curve", "lcurve"));
59+
60+
addSpinBoxManager(maxStepsSpinBox_, Parameters::StreamlineMaxSteps);
61+
addDoubleSpinBoxManager(toleranceDoubleSpinBox_, Parameters::StreamlineTolerance);
62+
addDoubleSpinBoxManager(stepSizeDoubleSpinBox_, Parameters::StreamlineStepSize);
63+
addComboBoxManager(directionComboBox_, Parameters::StreamlineDirection, lambdaMethod_);
64+
addComboBoxManager(valueComboBox_, Parameters::StreamlineValue, lambdaMethod_);
65+
addComboBoxManager(methodComboBox_, Parameters::StreamlineMethod, lambdaMethod_);
66+
addCheckboxManager(autoParameterCheckBox_, Parameters::AutoParameters);
67+
addCheckboxManager(filterColinearCheckBox_, Parameters::RemoveColinearPoints);
68+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
For more information, please see: http://software.sci.utah.edu
3+
4+
The MIT License
5+
6+
Copyright (c) 2012 Scientific Computing and Imaging Institute,
7+
University of Utah.
8+
9+
License for the specific language governing rights and limitations under
10+
Permission is hereby granted, free of charge, to any person obtaining a
11+
copy of this software and associated documentation files (the "Software"),
12+
to deal in the Software without restriction, including without limitation
13+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
14+
and/or sell copies of the Software, and to permit persons to whom the
15+
Software is furnished to do so, subject to the following conditions:
16+
17+
The above copyright notice and this permission notice shall be included
18+
in all copies or substantial portions of the Software.
19+
20+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26+
DEALINGS IN THE SOFTWARE.
27+
*/
28+
29+
#ifndef INTERFACE_MODULES_GENERATESTREAMLINES_H
30+
#define INTERFACE_MODULES_GENERATESTREAMLINES_H
31+
32+
#include "Interface/Modules/Visualization/ui_GenerateStreamLines.h"
33+
#include <Interface/Modules/Base/ModuleDialogGeneric.h>
34+
#include <Interface/Modules/Visualization/share.h>
35+
36+
namespace SCIRun {
37+
namespace Gui {
38+
39+
class SCISHARE GenerateStreamLinesDialog : public ModuleDialogGeneric,
40+
public Ui::GenerateStreamLines
41+
{
42+
Q_OBJECT
43+
44+
public:
45+
GenerateStreamLinesDialog(const std::string& name,
46+
SCIRun::Dataflow::Networks::ModuleStateHandle state,
47+
QWidget* parent = 0);
48+
49+
virtual void pull();
50+
private:
51+
GuiStringTranslationMap streamlineMethod_, streamlineDirection_, streamlineValue_;
52+
};
53+
54+
}
55+
}
56+
57+
#endif

0 commit comments

Comments
 (0)