mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4134 #4124 Refactor RiuSummaryQwtPlot on top of a base RiuQwtPlot class and use this for Cross Plots
* Get a lot of functionality included: zoom, panning, etc.
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#include "RiuQwtPlotTools.h"
|
||||
|
||||
#include "qwt_date_scale_draw.h"
|
||||
#include "qwt_date_scale_engine.h"
|
||||
#include "qwt_plot.h"
|
||||
#include "qwt_plot_grid.h"
|
||||
#include "qwt_plot_layout.h"
|
||||
@@ -100,3 +102,16 @@ void RiuQwtPlotTools::setDefaultAxes(QwtPlot* plot)
|
||||
plot->setAxisMaxMinor(QwtPlot::xBottom, 2);
|
||||
plot->setAxisMaxMinor(QwtPlot::yLeft, 3);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuQwtPlotTools::enableDateBasedBottomXAxis(QwtPlot* plot)
|
||||
{
|
||||
QwtDateScaleDraw* scaleDraw = new QwtDateScaleDraw(Qt::UTC);
|
||||
scaleDraw->setDateFormat(QwtDate::Year, QString("dd-MM-yyyy"));
|
||||
|
||||
QwtDateScaleEngine* scaleEngine = new QwtDateScaleEngine(Qt::UTC);
|
||||
plot->setAxisScaleEngine(QwtPlot::xBottom, scaleEngine);
|
||||
plot->setAxisScaleDraw(QwtPlot::xBottom, scaleDraw);
|
||||
}
|
||||
Reference in New Issue
Block a user