Skip to content
Snippets Groups Projects
Commit f4144d31 authored by Elliot Oram's avatar Elliot Oram
Browse files

Remove geometry drop down from UI

Refs #13110
parent 6ea05672
No related merge requests found
......@@ -13,8 +13,6 @@ public:
ContainerSubtraction(QWidget *parent = 0);
private slots:
/// Handles the geometry being changed
void handleGeometryChange(int index);
/// Handles a new sample being loaded
void newData(const QString &dataName);
/// Updates the preview mini plot
......
......@@ -111,33 +111,7 @@
<string>Options</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QComboBox" name="cbGeometry">
<item>
<property name="text">
<string>Flat Plate</string>
</property>
</item>
<item>
<property name="text">
<string>Cylinder</string>
</property>
</item>
<item>
<property name="text">
<string>Annulus</string>
</property>
</item>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lbGeometry">
<property name="text">
<string>Geometry:</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="ckScaleCan">
<property name="text">
<string>Scale Can by factor:</string>
......@@ -147,7 +121,7 @@
</property>
</widget>
</item>
<item row="1" column="1">
<item row="0" column="1">
<layout class="QHBoxLayout" name="loScaleFactor">
<item>
<widget class="QDoubleSpinBox" name="spCanScale">
......
......@@ -14,8 +14,6 @@ ContainerSubtraction::ContainerSubtraction(QWidget *parent)
m_uiForm.setupUi(parent);
// Connect slots
connect(m_uiForm.cbGeometry, SIGNAL(currentIndexChanged(int)), this,
SLOT(handleGeometryChanged(int)));
connect(m_uiForm.dsSample, SIGNAL(dataReady(const QString &)), this,
SLOT(newData(const QString &)));
connect(m_uiForm.spPreviewSpec, SIGNAL(valueChanged(int)), this,
......@@ -93,17 +91,8 @@ void ContainerSubtraction::run() {
if (nameCutIndex == -1)
nameCutIndex = sampleWsName.length();
QString correctionType;
switch (m_uiForm.cbGeometry->currentIndex()) {
case 0:
correctionType = "flt";
break;
case 1:
correctionType = "cyl";
break;
}
const QString outputWsName =
sampleWsName.left(nameCutIndex) + +"_" + correctionType + "_Corrected";
sampleWsName.left(nameCutIndex)+"_Corrected";
applyCorrAlg->setProperty("OutputWorkspace", outputWsName.toStdString());
......@@ -192,31 +181,6 @@ void ContainerSubtraction::newData(const QString &dataName) {
m_uiForm.ppPreview->addSpectrum("Sample", sampleWs, 0, Qt::black);
}
/**
* Handles when the type of geometry changes
*
* Updates the file extension to search for
*/
void ContainerSubtraction::handleGeometryChange(int index) {
QString ext("");
switch (index) {
case 0:
// Geometry is flat
ext = "_flt_abs";
break;
case 1:
// Geometry is cylinder
ext = "_cyl_abs";
break;
case 2:
// Geometry is annulus
ext = "_ann_abs";
break;
}
/*m_uiForm.dsCorrections->setWSSuffixes(QStringList(ext));
m_uiForm.dsCorrections->setFBSuffixes(QStringList(ext + ".nxs"));*/
}
/**
* Replots the preview plot.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment