#2020 Move LAS files. Support for submenus and command features with custom name and user data

This commit is contained in:
Bjørn Erik Jensen
2017-11-19 01:12:39 +01:00
parent f032a3eb9f
commit 31a84181e6
25 changed files with 920 additions and 457 deletions

View File

@@ -79,16 +79,16 @@ RiuWellAllocationPlot::RiuWellAllocationPlot(RimWellAllocationPlot* plotDefiniti
m_legendWidget = new RiuNightchartsWidget(this);
new RiuPlotObjectPicker(m_legendWidget, m_plotDefinition->plotLegend());
QStringList commandIds;
commandIds << "RicShowTotalAllocationDataFeature";
new RiuContextMenuLauncher(m_legendWidget, commandIds);
caf::CmdFeatureMenuBuilder menuBuilder;
menuBuilder << "RicShowTotalAllocationDataFeature";
new RiuContextMenuLauncher(m_legendWidget, menuBuilder);
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);
new RiuContextMenuLauncher(totalFlowAllocationWidget, menuBuilder);
rightColumnLayout->addWidget(totalFlowAllocationWidget, Qt::AlignTop);
rightColumnLayout->addWidget(m_plotDefinition->tofAccumulatedPhaseFractionsPlot()->createViewWidget(this), Qt::AlignTop);
@@ -193,11 +193,11 @@ QSize RiuWellAllocationPlot::minimumSizeHint() const
void RiuWellAllocationPlot::contextMenuEvent(QContextMenuEvent* event)
{
QMenu menu;
QStringList commandIds;
caf::CmdFeatureMenuBuilder menuBuilder;
commandIds << "RicShowContributingWellsFromPlotFeature";
menuBuilder << "RicShowContributingWellsFromPlotFeature";
RimContextCommandBuilder::appendCommandsToMenu(commandIds, &menu);
menuBuilder.appendToMenu(&menu);
if (menu.actions().size() > 0)
{