mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
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:
committed by
GitHub
parent
d9bb82de91
commit
258fbddc10
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user