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

@@ -109,7 +109,7 @@ void RimSummaryCurveCollection::loadDataAndUpdate( bool updateParentPlot )
for ( RimSummaryCurve* curve : m_curves )
{
curve->loadDataAndUpdate( false );
curve->updateQwtPlotAxis();
curve->updatePlotAxis();
}
if ( updateParentPlot )
@@ -123,11 +123,11 @@ void RimSummaryCurveCollection::loadDataAndUpdate( bool updateParentPlot )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryCurveCollection::setParentQwtPlotAndReplot( QwtPlot* plot )
void RimSummaryCurveCollection::setParentPlotAndReplot( RiuPlotWidget* plot )
{
for ( RimSummaryCurve* curve : m_curves )
{
curve->setParentQwtPlotNoReplot( plot );
curve->setParentPlotNoReplot( plot );
}
if ( plot ) plot->replot();
@@ -136,33 +136,33 @@ void RimSummaryCurveCollection::setParentQwtPlotAndReplot( QwtPlot* plot )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryCurveCollection::detachQwtCurves()
void RimSummaryCurveCollection::detachPlotCurves()
{
for ( RimSummaryCurve* curve : m_curves )
{
curve->detachQwtCurve();
curve->detach();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryCurveCollection::reattachQwtCurves()
void RimSummaryCurveCollection::reattachPlotCurves()
{
for ( RimSummaryCurve* curve : m_curves )
{
curve->reattachQwtCurve();
curve->reattach();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSummaryCurve* RimSummaryCurveCollection::findRimCurveFromQwtCurve( const QwtPlotCurve* qwtCurve ) const
RimSummaryCurve* RimSummaryCurveCollection::findRimCurveFromPlotCurve( const RiuPlotCurve* curve ) const
{
for ( RimSummaryCurve* rimCurve : m_curves )
{
if ( rimCurve->qwtPlotCurve() == qwtCurve )
if ( rimCurve->isSameCurve( curve ) )
{
return rimCurve;
}
@@ -342,7 +342,7 @@ void RimSummaryCurveCollection::updateCaseNameHasChanged()
firstAncestorOrThisOfTypeAsserted( parentPlot );
parentPlot->updatePlotTitle();
if ( parentPlot->viewer() ) parentPlot->viewer()->updateLegend();
if ( parentPlot->plotWidget() ) parentPlot->plotWidget()->updateLegend();
}
//--------------------------------------------------------------------------------------------------