#1214 Implemented snapshot of well allocation plot

This commit is contained in:
Magne Sjaastad 2017-02-13 15:47:24 +01:00
parent 093e02287a
commit 92f4abe7c2
2 changed files with 13 additions and 2 deletions

View File

@ -70,6 +70,7 @@
#include "RimWellLogPlot.h"
#include "RimWellLogPlotCollection.h"
#include "RimWellPath.h"
#include "RimFlowPlotCollection.h"
#include "RimWellPathCollection.h"
#include "RiuMainPlotWindow.h"
@ -80,6 +81,7 @@
#include "RiuSummaryQwtPlot.h"
#include "RiuViewer.h"
#include "RiuWellLogPlot.h"
#include "RiuWellAllocationPlot.h"
#include "RicImportSummaryCaseFeature.h"
#include "RicSnapshotViewToClipboardFeature.h"
@ -114,7 +116,6 @@
#ifdef WIN32
#include <fcntl.h>
#endif
#include "RimFlowPlotCollection.h"
namespace caf
{
@ -1632,6 +1633,12 @@ RimViewWindow* RiaApplication::activeViewWindow()
{
viewWindow = wellLogPlot->ownerPlotDefinition();
}
RiuWellAllocationPlot* wellAllocationPlot = dynamic_cast<RiuWellAllocationPlot*>(subwindows.back()->widget());
if (wellAllocationPlot)
{
viewWindow = wellAllocationPlot->ownerPlotDefinition();
}
}
}

View File

@ -599,7 +599,11 @@ QImage RimWellAllocationPlot::snapshotWindowContent()
{
QImage image;
// TODO
if (m_wellAllocationPlotWidget)
{
QPixmap pix = QPixmap::grabWidget(m_wellAllocationPlotWidget);
image = pix.toImage();
}
return image;
}