Skip to content

Commit

Permalink
Refs #5421 Updated documentation for interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Jackson committed Sep 23, 2013
1 parent cc7a0ac commit 316b206
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace MantidQt
void updateProperties(QtProperty* prop, double val);

private:
/// Inherited methods from IndirectBayesTab
virtual QString help() { return "JumpFit"; };
virtual bool validate();
virtual void run();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace MantidQt
void handleSampleInputReady(const QString& filename);

private:
/// Inherited methods from IndirectBayesTab
virtual QString help() { return "Quasi"; };
virtual bool validate();
virtual void run();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace MantidQt
void handleSampleInputReady(const QString& filename);

private:
/// Inherited methods from IndirectBayesTab
virtual QString help() { return "Stretch"; };
virtual bool validate();
virtual void run();
Expand Down
31 changes: 31 additions & 0 deletions Code/Mantid/MantidQt/CustomInterfaces/src/JumpFit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ namespace MantidQt
connect(m_uiForm.dsSample, SIGNAL(dataReady(const QString&)), this, SLOT(handleSampleInputReady(const QString&)));
}

/**
* Validate the form to check the program can be run
*
* @return :: Whether the form was valid
*/
bool JumpFit::validate()
{
//check that the sample file is loaded
Expand All @@ -41,6 +46,10 @@ namespace MantidQt
return true;
}

/**
* Collect the settings on the GUI and build a python
* script that runs JumpFit
*/
void JumpFit::run()
{
QString verbose("False");
Expand Down Expand Up @@ -83,6 +92,12 @@ namespace MantidQt
runPythonScript(pyInput);
}

/**
* Plots the loaded file to the miniplot and sets the guides
* and the range
*
* @param filename :: The name of the workspace to plot
*/
void JumpFit::handleSampleInputReady(const QString& filename)
{
plotMiniPlot(filename, 0);
Expand All @@ -102,16 +117,32 @@ namespace MantidQt
setPlotRange(m_properties["QMin"], m_properties["QMax"], range);
}

/**
* Updates the property manager when the lower guide is moved on the mini plot
*
* @param min :: The new value of the lower guide
*/
void JumpFit::minValueChanged(double min)
{
m_dblManager->setValue(m_properties["QMin"], min);
}

/**
* Updates the property manager when the upper guide is moved on the mini plot
*
* @param max :: The new value of the upper guide
*/
void JumpFit::maxValueChanged(double max)
{
m_dblManager->setValue(m_properties["QMax"], max);
}

/**
* Handles when properties in the property manager are updated.
*
* @param prop :: The property being updated
* @param val :: The new value for the property
*/
void JumpFit::updateProperties(QtProperty* prop, double val)
{
if(prop == m_properties["QMin"])
Expand Down
31 changes: 31 additions & 0 deletions Code/Mantid/MantidQt/CustomInterfaces/src/Quasi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ namespace MantidQt
connect(m_uiForm.dsSample, SIGNAL(dataReady(const QString&)), this, SLOT(handleSampleInputReady(const QString&)));
}

/**
* Validate the form to check the program can be run
*
* @return :: Whether the form was valid
*/
bool Quasi::validate()
{
//check that the sample file exists
Expand Down Expand Up @@ -78,6 +83,10 @@ namespace MantidQt
return true;
}

/**
* Collect the settings on the GUI and build a python
* script that runs Quasi
*/
void Quasi::run()
{
// Using 1/0 instead of True/False for compatibility with underlying Fortran code
Expand Down Expand Up @@ -161,6 +170,12 @@ namespace MantidQt
runPythonScript(pyInput);
}

/**
* Plots the loaded file to the miniplot and sets the guides
* and the range
*
* @param filename :: The name of the workspace to plot
*/
void Quasi::handleSampleInputReady(const QString& filename)
{
plotMiniPlot(filename, 0);
Expand All @@ -169,16 +184,32 @@ namespace MantidQt
setPlotRange(m_properties["EMin"], m_properties["EMax"], range);
}

/**
* Updates the property manager when the lower guide is moved on the mini plot
*
* @param min :: The new value of the lower guide
*/
void Quasi::minValueChanged(double min)
{
m_dblManager->setValue(m_properties["EMin"], min);
}

/**
* Updates the property manager when the upper guide is moved on the mini plot
*
* @param max :: The new value of the upper guide
*/
void Quasi::maxValueChanged(double max)
{
m_dblManager->setValue(m_properties["EMax"], max);
}

/**
* Handles when properties in the property manager are updated.
*
* @param prop :: The property being updated
* @param val :: The new value for the property
*/
void Quasi::updateProperties(QtProperty* prop, double val)
{
if(prop == m_properties["EMin"])
Expand Down
7 changes: 5 additions & 2 deletions Code/Mantid/MantidQt/CustomInterfaces/src/ResNorm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ namespace MantidQt
}

/**
* Validate the form to check we can run the program
* Validate the form to check the program can be run
*
* @return :: Whether the form was valid
*/
bool ResNorm::validate()
{
Expand Down Expand Up @@ -89,7 +91,8 @@ namespace MantidQt
}

/**
* Plots the loaded file to the miniplot
* Plots the loaded file to the miniplot and sets the guides
* and the range
*
* @param filename :: The name of the workspace to plot
*/
Expand Down
31 changes: 31 additions & 0 deletions Code/Mantid/MantidQt/CustomInterfaces/src/Stretch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ namespace MantidQt
connect(m_uiForm.dsSample, SIGNAL(dataReady(const QString&)), this, SLOT(handleSampleInputReady(const QString&)));
}

/**
* Validate the form to check the program can be run
*
* @return :: Whether the form was valid
*/
bool Stretch::validate()
{
//check that the sample file exists
Expand All @@ -63,6 +68,10 @@ namespace MantidQt
return true;
}

/**
* Collect the settings on the GUI and build a python
* script that runs Stretch
*/
void Stretch::run()
{
QString save("False");
Expand Down Expand Up @@ -117,6 +126,12 @@ namespace MantidQt
runPythonScript(pyInput);
}

/**
* Plots the loaded file to the miniplot and sets the guides
* and the range
*
* @param filename :: The name of the workspace to plot
*/
void Stretch::handleSampleInputReady(const QString& filename)
{
plotMiniPlot(filename, 0);
Expand All @@ -125,16 +140,32 @@ namespace MantidQt
setPlotRange(m_properties["EMin"], m_properties["EMax"], range);
}

/**
* Updates the property manager when the lower guide is moved on the mini plot
*
* @param min :: The new value of the lower guide
*/
void Stretch::minValueChanged(double min)
{
m_dblManager->setValue(m_properties["EMin"], min);
}

/**
* Updates the property manager when the upper guide is moved on the mini plot
*
* @param max :: The new value of the upper guide
*/
void Stretch::maxValueChanged(double max)
{
m_dblManager->setValue(m_properties["EMax"], max);
}

/**
* Handles when properties in the property manager are updated.
*
* @param prop :: The property being updated
* @param val :: The new value for the property
*/
void Stretch::updateProperties(QtProperty* prop, double val)
{
if(prop == m_properties["EMin"])
Expand Down

0 comments on commit 316b206

Please sign in to comment.