Skip to content

Commit 72728b9

Browse files
committed
added widget and code for elems
1 parent 0d26897 commit 72728b9

File tree

3 files changed

+57
-7
lines changed

3 files changed

+57
-7
lines changed

src/Interface/Modules/Fields/MapFieldDataOntoElems.ui

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,21 +211,54 @@
211211
</property>
212212
</widget>
213213
</item>
214-
<item row="5" column="0">
214+
<item row="6" column="0">
215215
<widget class="QLabel" name="label_6">
216216
<property name="text">
217217
<string>Maximum Distance:</string>
218218
</property>
219219
</widget>
220220
</item>
221-
<item row="5" column="1">
221+
<item row="6" column="1">
222222
<widget class="QLineEdit" name="maximumDistanceLineEdit_"/>
223223
</item>
224+
<item row="5" column="1">
225+
<widget class="QCheckBox" name="useNanForUnassignedValuesCheckBox_">
226+
<property name="text">
227+
<string>Use Nan</string>
228+
</property>
229+
</widget>
230+
</item>
224231
</layout>
225232
</widget>
226233
</item>
227234
</layout>
228235
</widget>
236+
<tabstops>
237+
<tabstop>quantityComboBox_</tabstop>
238+
<tabstop>interpolationComboBox_</tabstop>
239+
<tabstop>samplePointsComboBox_</tabstop>
240+
<tabstop>sampleMethodComboBox_</tabstop>
241+
<tabstop>outsideValueDoubleSpinBox_</tabstop>
242+
<tabstop>useNanForUnassignedValuesCheckBox_</tabstop>
243+
<tabstop>maximumDistanceLineEdit_</tabstop>
244+
</tabstops>
229245
<resources/>
230-
<connections/>
246+
<connections>
247+
<connection>
248+
<sender>useNanForUnassignedValuesCheckBox_</sender>
249+
<signal>toggled(bool)</signal>
250+
<receiver>outsideValueDoubleSpinBox_</receiver>
251+
<slot>setDisabled(bool)</slot>
252+
<hints>
253+
<hint type="sourcelabel">
254+
<x>263</x>
255+
<y>164</y>
256+
</hint>
257+
<hint type="destinationlabel">
258+
<x>274</x>
259+
<y>149</y>
260+
</hint>
261+
</hints>
262+
</connection>
263+
</connections>
231264
</ui>

src/Interface/Modules/Fields/MapFieldDataOntoElemsDialog.cc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,22 @@ MapFieldDataOntoElemsDialog::MapFieldDataOntoElemsDialog(const std::string& name
4848
addComboBoxManager(samplePointsComboBox_, Parameters::SamplePoints);
4949
addDoubleSpinBoxManager(outsideValueDoubleSpinBox_, Parameters::OutsideValue);
5050
addDoubleLineEditManager(maximumDistanceLineEdit_, Parameters::MaxDistance);
51+
connect(useNanForUnassignedValuesCheckBox_, SIGNAL(stateChanged(int)), this, SLOT(setUseNanForUnassignedValues(int)));
52+
}
53+
54+
void MapFieldDataOntoNodesDialog::pullSpecial()
55+
{
56+
if (IsNan(state_->getValue(Parameters::OutsideValue).toDouble()))
57+
{
58+
useNanForUnassignedValuesCheckBox_->setChecked(true);
59+
}
60+
}
61+
62+
void MapFieldDataOntoNodesDialog::setUseNanForUnassignedValues(int state)
63+
{
64+
if (!pulling_)
65+
{
66+
if (0 != state)
67+
state_->setValue(Parameters::OutsideValue, std::numeric_limits<double>::quiet_NaN());
68+
}
5169
}

src/Interface/Modules/Fields/MapFieldDataOntoNodes.ui

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>405</width>
10-
<height>172</height>
9+
<width>408</width>
10+
<height>204</height>
1111
</rect>
1212
</property>
1313
<property name="sizePolicy">
@@ -127,7 +127,7 @@
127127
<item row="5" column="1">
128128
<widget class="QLineEdit" name="maximumDistanceLineEdit_"/>
129129
</item>
130-
<item row="4" column="1">
130+
<item row="3" column="1">
131131
<widget class="QCheckBox" name="useNanForUnassignedValuesCheckBox_">
132132
<property name="text">
133133
<string>Use NaN</string>
@@ -143,7 +143,6 @@
143143
<tabstop>quantityComboBox_</tabstop>
144144
<tabstop>interpolationComboBox_</tabstop>
145145
<tabstop>outsideValueDoubleSpinBox_</tabstop>
146-
<tabstop>useNanForUnassignedValuesCheckBox_</tabstop>
147146
<tabstop>maximumDistanceLineEdit_</tabstop>
148147
</tabstops>
149148
<resources/>

0 commit comments

Comments
 (0)