mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#792 Summary: Added storing of visible display window based on zoom and pan
This commit is contained in:
@@ -50,7 +50,6 @@
|
||||
#include "RimTools.h"
|
||||
#include "RimTreeViewStateSerializer.h"
|
||||
#include "RimViewWindow.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimWellPathImport.h"
|
||||
|
||||
#include "RiuDragDrop.h"
|
||||
@@ -60,7 +59,6 @@
|
||||
#include "RiuProjectPropertyView.h"
|
||||
#include "RiuResultInfoPanel.h"
|
||||
#include "RiuResultQwtPlot.h"
|
||||
#include "RiuSummaryQwtPlot.h"
|
||||
#include "RiuToolTipMenu.h"
|
||||
#include "RiuTreeViewEventFilter.h"
|
||||
#include "RiuViewer.h"
|
||||
|
||||
@@ -106,6 +106,29 @@ void RiuSummaryQwtPlot::zoomAll()
|
||||
zoomer->setZoomBase(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QRectF RiuSummaryQwtPlot::currentVisibleWindow() const
|
||||
{
|
||||
QRectF scaleRect;
|
||||
scaleRect.setLeft(axisScaleDiv(xBottom).lowerBound());
|
||||
scaleRect.setRight(axisScaleDiv(xBottom).upperBound());
|
||||
|
||||
scaleRect.setBottom(axisScaleDiv(yLeft).upperBound());
|
||||
scaleRect.setTop(axisScaleDiv(yLeft).lowerBound());
|
||||
|
||||
return scaleRect;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuSummaryQwtPlot::setZoomWindow(const QRectF& zoomWindow)
|
||||
{
|
||||
zoomer->zoom(zoomWindow);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -44,6 +44,9 @@ public:
|
||||
void setYAxisTitle(const QString& title);
|
||||
void zoomAll();
|
||||
|
||||
QRectF currentVisibleWindow() const;
|
||||
void setZoomWindow(const QRectF& zoomWindow);
|
||||
|
||||
protected:
|
||||
virtual bool eventFilter(QObject* watched, QEvent* event);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user