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

@@ -197,7 +197,7 @@ void RimMultiPlot::insertPlot( RimPlot* plot, size_t index )
if ( m_viewer )
{
plot->createPlotWidget();
m_viewer->insertPlot( plot->viewer(), index );
m_viewer->insertPlot( plot->plotWidget(), index );
}
plot->setShowWindow( true );
plot->updateAfterInsertingIntoMultiPlot();
@@ -215,7 +215,7 @@ void RimMultiPlot::removePlot( RimPlot* plot )
{
if ( m_viewer )
{
m_viewer->removePlot( plot->viewer() );
m_viewer->removePlot( plot->plotWidget() );
}
m_plots.removeChildObject( plot );
@@ -273,7 +273,7 @@ void RimMultiPlot::insertPlots( const std::vector<RimPlot*>& plots )
if ( m_viewer )
{
plot->createPlotWidget();
m_viewer->insertPlot( plot->viewer(), -1 );
m_viewer->insertPlot( plot->plotWidget(), -1 );
}
plot->setShowWindow( true );
plot->updateAfterInsertingIntoMultiPlot();
@@ -291,7 +291,7 @@ void RimMultiPlot::deleteAllPlots()
{
if ( plot && m_viewer )
{
m_viewer->removePlot( plot->viewer() );
m_viewer->removePlot( plot->plotWidget() );
}
}
@@ -391,8 +391,8 @@ void RimMultiPlot::doRenderWindowContent( QPaintDevice* paintDevice )
void RimMultiPlot::updatePlotOrderFromGridWidget()
{
std::sort( m_plots.begin(), m_plots.end(), [this]( RimPlot* lhs, RimPlot* rhs ) {
auto indexLhs = m_viewer->indexOfPlotWidget( lhs->viewer() );
auto indexRhs = m_viewer->indexOfPlotWidget( rhs->viewer() );
auto indexLhs = m_viewer->indexOfPlotWidget( lhs->plotWidget() );
auto indexRhs = m_viewer->indexOfPlotWidget( rhs->plotWidget() );
return indexLhs < indexRhs;
} );
updateSubPlotNames();
@@ -877,7 +877,7 @@ void RimMultiPlot::updateZoom()
{
for ( RimPlot* plot : plots() )
{
plot->updateZoomInQwt();
plot->updateZoomInParentPlot();
}
}
@@ -895,7 +895,7 @@ void RimMultiPlot::recreatePlotWidgets()
for ( size_t tIdx = 0; tIdx < plotVector.size(); ++tIdx )
{
plotVector[tIdx]->createPlotWidget();
m_viewer->addPlot( plotVector[tIdx]->viewer() );
m_viewer->addPlot( plotVector[tIdx]->plotWidget() );
}
}