Skip to content

Commit

Permalink
(#396) Added simple zoom functionality for the depth axis
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
palhagen committed Aug 31, 2015
1 parent b3d58ed commit f186e07
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ApplicationCode/UserInterface/RiuWellLogTracePlot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include "qwt_plot_grid.h"
#include "qwt_scale_engine.h"
#include "qwt_plot_magnifier.h"

//--------------------------------------------------------------------------------------------------
///
Expand All @@ -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();
}

Expand Down

0 comments on commit f186e07

Please sign in to comment.