Merge pull request #8387 from OPM/qtcharts-summary-plots

Closes #8228 

Major refactoring of summary plotting. Now possible to create plots both with Qwt and QtChart as plotting tool.
This commit is contained in:
Kristian Bendiksen
2022-01-17 13:14:21 +01:00
committed by GitHub
parent d9bb82de91
commit 258fbddc10
145 changed files with 7245 additions and 2932 deletions

View File

@@ -230,3 +230,33 @@ QwtPlotShapeItem* RiuQwtPlotTools::createBoxShape( const QString& label,
{
return createBoxShapeT<QwtPlotShapeItem>( label, startX, endX, startY, endY, color, brushStyle );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QwtPlot::Axis RiuQwtPlotTools::toQwtPlotAxis( RiaDefines::PlotAxis axis )
{
if ( axis == RiaDefines::PlotAxis::PLOT_AXIS_LEFT )
return QwtPlot::yLeft;
else if ( axis == RiaDefines::PlotAxis::PLOT_AXIS_RIGHT )
return QwtPlot::yRight;
else if ( axis == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM )
return QwtPlot::xBottom;
return QwtPlot::xTop;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaDefines::PlotAxis RiuQwtPlotTools::fromQwtPlotAxis( QwtPlot::Axis axis )
{
if ( axis == QwtPlot::yLeft )
return RiaDefines::PlotAxis::PLOT_AXIS_LEFT;
else if ( axis == QwtPlot::yRight )
return RiaDefines::PlotAxis::PLOT_AXIS_RIGHT;
else if ( axis == QwtPlot::xBottom )
return RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM;
return RiaDefines::PlotAxis::PLOT_AXIS_TOP;
}