(#396) Added simple zoom functionality for the depth axis

Ctrl + scroll wheel = zoom around center. Consider making a more
specialized zoom functionality for zooming around mouse cursor, and with
synchronization with other trace plots.
This commit is contained in:
Pål Hagen 2015-08-31 14:47:34 +02:00
parent b3d58ed0a0
commit f186e07742

View File

@ -21,6 +21,7 @@
#include "qwt_plot_grid.h"
#include "qwt_scale_engine.h"
#include "qwt_plot_magnifier.h"
//--------------------------------------------------------------------------------------------------
///
@ -31,6 +32,13 @@ RiuWellLogTracePlot::RiuWellLogTracePlot(QWidget* parent)
m_grid = new QwtPlotGrid();
m_grid->attach(this);
QwtPlotMagnifier* magnifierDepth = new QwtPlotMagnifier(canvas());
magnifierDepth->setWheelModifiers(Qt::ControlModifier);
magnifierDepth->setAxisEnabled(QwtPlot::yLeft, true);
magnifierDepth->setAxisEnabled(QwtPlot::yRight, false);
magnifierDepth->setAxisEnabled(QwtPlot::xTop, false);
magnifierDepth->setAxisEnabled(QwtPlot::xBottom, false);
setDefaults();
}