Skip to content

Commit

Permalink
Refs #8585 Update interface with correct plot options.
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Jackson committed Jan 7, 2014
1 parent f2e7360 commit 2a74342
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
Expand Up @@ -31,6 +31,8 @@ namespace MantidQt
void updateProperties(QtProperty* prop, double val);
/// Slot to handle when a new sample file is available
void handleSampleInputReady(const QString& filename);
/// slot to handle when the user changes the program to be used
void handleProgramChange(int index);

private:

Expand Down
Expand Up @@ -313,12 +313,12 @@
</item>
<item>
<property name="text">
<string>ProbBeta</string>
<string>All</string>
</property>
</item>
<item>
<property name="text">
<string>Intensity</string>
<string>Amplitude</string>
</property>
</item>
<item>
Expand All @@ -333,7 +333,7 @@
</item>
<item>
<property name="text">
<string>All</string>
<string>Prob</string>
</property>
</item>
</widget>
Expand Down
22 changes: 22 additions & 0 deletions Code/Mantid/MantidQt/CustomInterfaces/src/Quasi.cpp
Expand Up @@ -42,6 +42,8 @@ namespace MantidQt

//Connect the data selector for the sample to the mini plot
connect(m_uiForm.dsSample, SIGNAL(dataReady(const QString&)), this, SLOT(handleSampleInputReady(const QString&)));

connect(m_uiForm.cbProgram, SIGNAL(currentIndexChanged(int)), this, SLOT(handleProgramChange(int)));
}

/**
Expand Down Expand Up @@ -225,5 +227,25 @@ namespace MantidQt
updateUpperGuide(m_properties["EMin"], m_properties["EMax"], val);
}
}

/**
* Handles when the slected item in the program combobox
* is changed
*
* @param index :: The current index of the combobox
*/
void Quasi::handleProgramChange(int index)
{
int numberOptions = m_uiForm.cbPlot->count();
switch(index)
{
case 0:
m_uiForm.cbPlot->setItemText(numberOptions-1, "Prob");
break;
case 1:
m_uiForm.cbPlot->setItemText(numberOptions-1, "Beta");
break;
}
}
} // namespace CustomInterfaces
} // namespace MantidQt

0 comments on commit 2a74342

Please sign in to comment.