Enable reordering of plots within a multiplot

This commit is contained in:
Gaute Lindkvist
2020-09-16 13:10:37 +02:00
committed by Magne Sjaastad
parent a3161047af
commit ab3e43d8fb
4 changed files with 32 additions and 0 deletions

View File

@@ -186,6 +186,18 @@ void RiuMultiPlotBook::removePlot( RiuQwtPlotWidget* plotWidget )
scheduleUpdate();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuMultiPlotBook::removeAllPlots()
{
auto plotWidgets = m_plotWidgets;
for ( RiuQwtPlotWidget* plotWidget : plotWidgets )
{
removePlot( plotWidget );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -67,6 +67,7 @@ public:
void addPlot( RiuQwtPlotWidget* plotWidget );
void insertPlot( RiuQwtPlotWidget* plotWidget, size_t index );
void removePlot( RiuQwtPlotWidget* plotWidget );
void removeAllPlots();
void setPlotTitle( const QString& plotTitle );