#1373 Add context menu launcher and use from well allocation plot

This commit is contained in:
Magne Sjaastad
2017-04-19 12:14:01 +02:00
parent 0292f06aea
commit 4ac35c4e30
4 changed files with 116 additions and 0 deletions

View File

@@ -26,6 +26,7 @@
#include "RimWellLogPlot.h"
#include "RimWellLogTrack.h"
#include "RiuContextMenuLauncher.h"
#include "RiuNightchartsWidget.h"
#include "RiuPlotObjectPicker.h"
@@ -77,11 +78,16 @@ RiuWellAllocationPlot::RiuWellAllocationPlot(RimWellAllocationPlot* plotDefiniti
m_legendWidget = new RiuNightchartsWidget(this);
new RiuPlotObjectPicker(m_legendWidget, m_plotDefinition->plotLegend());
QStringList commandIds;
commandIds << "RicShowWellAllocationDataFeature";
new RiuContextMenuLauncher(m_legendWidget, commandIds);
rightColumnLayout->addWidget(m_legendWidget);
m_legendWidget->showPie(false);
QWidget* totalFlowAllocationWidget = m_plotDefinition->totalWellFlowPlot()->createViewWidget(this);
new RiuPlotObjectPicker(totalFlowAllocationWidget, m_plotDefinition->totalWellFlowPlot());
new RiuContextMenuLauncher(totalFlowAllocationWidget, commandIds);
rightColumnLayout->addWidget(totalFlowAllocationWidget);
rightColumnLayout->addStretch();