#5150 Improve wheel zoom with logarithmic axes

* Limit the amount to scroll at one time and set a fixed minimum
This commit is contained in:
Gaute Lindkvist
2019-11-30 12:08:42 +01:00
parent 538e42f278
commit 4870071b8e
5 changed files with 70 additions and 6 deletions

View File

@@ -29,6 +29,7 @@
class RimEnsembleCurveSet;
class RiuCvfOverlayItemWidget;
class RiuQwtPlotZoomer;
class RiuQwtPlotWheelZoomer;
//==================================================================================================
//
@@ -59,6 +60,8 @@ public:
void setLegendFontSize( int fontSize );
void setLegendVisible( bool visible );
void setAxisIsLogarithmic( QwtPlot::Axis axis, bool logarithmic );
protected:
void keyPressEvent( QKeyEvent* ) override;
void contextMenuEvent( QContextMenuEvent* ) override;
@@ -75,6 +78,7 @@ private:
std::map<caf::PdmPointer<RimEnsembleCurveSet>, QPointer<RiuCvfOverlayItemWidget>> m_ensembleLegendWidgets;
QPointer<RiuQwtPlotZoomer> m_zoomerLeft;
QPointer<RiuQwtPlotZoomer> m_zoomerRight;
QPointer<RiuQwtPlotZoomer> m_zoomerLeft;
QPointer<RiuQwtPlotZoomer> m_zoomerRight;
QPointer<RiuQwtPlotWheelZoomer> m_wheelZoomer;
};