mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#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:
parent
b3d58ed0a0
commit
f186e07742
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "qwt_plot_grid.h"
|
#include "qwt_plot_grid.h"
|
||||||
#include "qwt_scale_engine.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 = new QwtPlotGrid();
|
||||||
m_grid->attach(this);
|
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();
|
setDefaults();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user