Skip to content
Snippets Groups Projects
LineViewer.cpp 33.8 KiB
Newer Older
    MantidQwtIMDWorkspaceData curveData(m_sliceWS, false,
        VMD(), VMD(), m_lineOptions->getNormalization());
    curveData.setPreviewMode(false);
    curveData.setPlotAxisChoice(m_lineOptions->getPlotAxis());
    m_fullCurve->setData(curveData);
    m_plot->setAxisTitle( QwtPlot::xBottom, QString::fromStdString( curveData.getXAxisLabel() ));;
    m_plot->setAxisTitle( QwtPlot::yLeft, QString::fromStdString( curveData.getYAxisLabel() ));;
  }

  if (m_previewCurve->isVisible())
  {
    m_previewCurve->setVisible(false);
    m_previewCurve->detach();
    m_fullCurve->attach(m_plot);
  }
  m_fullCurve->setVisible(true);
  m_plot->replot();
  m_plot->setTitle("Integrated Line Plot");
//-----------------------------------------------------------------------------
/** Slot called when the options of the plot display change (normalization
 * or plot axis.
 * Refreshes the preview or full plot, whichever is visible.
 */
void LineViewer::refreshPlot()
{
  if (m_previewCurve->isVisible())
    showPreview();
  else
    showFull();
}