mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1358 Added support for "Zoom All" of well alloc plots
This commit is contained in:
@@ -23,11 +23,13 @@
|
|||||||
#include "RimSummaryPlot.h"
|
#include "RimSummaryPlot.h"
|
||||||
#include "RimView.h"
|
#include "RimView.h"
|
||||||
#include "RimViewWindow.h"
|
#include "RimViewWindow.h"
|
||||||
|
#include "RimWellAllocationPlot.h"
|
||||||
#include "RimWellLogPlot.h"
|
#include "RimWellLogPlot.h"
|
||||||
|
|
||||||
#include "RiuMainPlotWindow.h"
|
#include "RiuMainPlotWindow.h"
|
||||||
#include "RiuMainWindow.h"
|
#include "RiuMainWindow.h"
|
||||||
#include "RiuSummaryQwtPlot.h"
|
#include "RiuSummaryQwtPlot.h"
|
||||||
|
#include "RiuWellAllocationPlot.h"
|
||||||
#include "RiuWellLogPlot.h"
|
#include "RiuWellLogPlot.h"
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
@@ -62,21 +64,41 @@ void RicViewZoomAllFeature::onActionTriggered(bool isChecked)
|
|||||||
QList<QMdiSubWindow*> subwindows = mainPlotWindow->subWindowList(QMdiArea::StackingOrder);
|
QList<QMdiSubWindow*> subwindows = mainPlotWindow->subWindowList(QMdiArea::StackingOrder);
|
||||||
if (subwindows.size() > 0)
|
if (subwindows.size() > 0)
|
||||||
{
|
{
|
||||||
RiuSummaryQwtPlot* summaryQwtPlot = dynamic_cast<RiuSummaryQwtPlot*>(subwindows.back()->widget());
|
|
||||||
if (summaryQwtPlot)
|
|
||||||
{
|
{
|
||||||
RimViewWindow* viewWindow = summaryQwtPlot->ownerPlotDefinition();
|
RiuSummaryQwtPlot* summaryQwtPlot = dynamic_cast<RiuSummaryQwtPlot*>(subwindows.back()->widget());
|
||||||
|
if (summaryQwtPlot)
|
||||||
|
{
|
||||||
|
RimViewWindow* viewWindow = summaryQwtPlot->ownerPlotDefinition();
|
||||||
|
|
||||||
viewWindow->zoomAll();
|
viewWindow->zoomAll();
|
||||||
summaryQwtPlot->replot();
|
summaryQwtPlot->replot();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RiuWellLogPlot* wellLogPlot = dynamic_cast<RiuWellLogPlot*>(subwindows.back()->widget());
|
|
||||||
if (wellLogPlot)
|
|
||||||
{
|
{
|
||||||
RimViewWindow* viewWindow = wellLogPlot->ownerPlotDefinition();
|
RiuWellLogPlot* wellLogPlot = dynamic_cast<RiuWellLogPlot*>(subwindows.back()->widget());
|
||||||
viewWindow->zoomAll();
|
if (wellLogPlot)
|
||||||
wellLogPlot->update();
|
{
|
||||||
|
RimViewWindow* viewWindow = wellLogPlot->ownerPlotDefinition();
|
||||||
|
viewWindow->zoomAll();
|
||||||
|
wellLogPlot->update();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
RiuWellAllocationPlot* wellAllocationPlot = dynamic_cast<RiuWellAllocationPlot*>(subwindows.back()->widget());
|
||||||
|
if (wellAllocationPlot)
|
||||||
|
{
|
||||||
|
RimWellAllocationPlot* viewWindow = wellAllocationPlot->ownerPlotDefinition();
|
||||||
|
viewWindow->zoomAll();
|
||||||
|
wellAllocationPlot->update();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -491,6 +491,7 @@ QWidget* RimWellAllocationPlot::viewWidget()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellAllocationPlot::zoomAll()
|
void RimWellAllocationPlot::zoomAll()
|
||||||
{
|
{
|
||||||
|
m_accumulatedWellFlowPlot()->zoomAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user