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

@@ -396,7 +396,7 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
if ( values.empty() || values.size() != tvDepthVector.size() )
{
this->detachQwtCurve();
this->detach();
return;
}
@@ -466,7 +466,7 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
if ( wellLogPlot->depthType() == RiaDefines::DepthTypeEnum::MEASURED_DEPTH )
{
m_qwtPlotCurve->setPerPointLabels( perPointLabels );
m_plotCurve->setPerPointLabels( perPointLabels );
auto xValues = this->curveData()->xPlotValues();
auto yValues = this->curveData()->depthPlotValues( RiaDefines::DepthTypeEnum::MEASURED_DEPTH, displayUnit );
@@ -482,7 +482,7 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
}
else
{
m_qwtPlotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, keepOnlyPositiveValues );
m_plotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, keepOnlyPositiveValues );
}
RimWellLogTrack* wellLogTrack;
@@ -496,22 +496,24 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
{
if ( derivedMDSource == WELL_PATH )
{
viewer->setAxisTitleText( QwtPlot::yLeft, "WELL/" + wellLogPlot->depthAxisTitle() );
viewer->setAxisTitleText( RiaDefines::PlotAxis::PLOT_AXIS_LEFT,
"WELL/" + wellLogPlot->depthAxisTitle() );
}
else
{
viewer->setAxisTitleText( QwtPlot::yLeft, "OBS/" + wellLogPlot->depthAxisTitle() );
viewer->setAxisTitleText( RiaDefines::PlotAxis::PLOT_AXIS_LEFT,
"OBS/" + wellLogPlot->depthAxisTitle() );
}
}
else // Standard depth title set from plot
{
viewer->setAxisTitleText( QwtPlot::yLeft, wellLogPlot->depthAxisTitle() );
viewer->setAxisTitleText( RiaDefines::PlotAxis::PLOT_AXIS_LEFT, wellLogPlot->depthAxisTitle() );
}
}
}
else
{
m_qwtPlotCurve->setPerPointLabels( perPointLabels );
m_plotCurve->setPerPointLabels( perPointLabels );
auto xValues = this->curveData()->xPlotValues();
auto yValues =
@@ -528,20 +530,20 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
}
else
{
m_qwtPlotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, isLogCurve );
m_plotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, isLogCurve );
}
}
m_qwtPlotCurve->setLineSegmentStartStopIndices( this->curveData()->polylineStartStopIndices() );
m_plotCurve->setLineSegmentStartStopIndices( this->curveData()->polylineStartStopIndices() );
if ( updateParentPlot )
{
updateZoomInParentPlot();
}
if ( m_parentQwtPlot )
if ( m_parentPlot )
{
m_parentQwtPlot->replot();
m_parentPlot->replot();
}
}
}