#1174 Added context menu to WellAllocationPlot and added feature

This commit is contained in:
Magne Sjaastad
2017-02-13 13:28:56 +01:00
parent 9aa98a3895
commit 45f3240932
7 changed files with 175 additions and 4 deletions

View File

@@ -20,15 +20,20 @@
#include "RiaApplication.h"
#include "RimContextCommandBuilder.h"
#include "RimTotalWellAllocationPlot.h"
#include "RimWellAllocationPlot.h"
#include "RimWellLogPlot.h"
#include "RimWellLogTrack.h"
#include "RimTotalWellAllocationPlot.h"
#include "RiuNightchartsWidget.h"
#include "cvfColor3.h"
#include <QBoxLayout>
#include <QContextMenuEvent>
#include <QLabel>
#include "RiuNightchartsWidget.h"
#include "cvfColor3.h"
#include <QMenu>
@@ -157,6 +162,24 @@ QSize RiuWellAllocationPlot::minimumSizeHint() const
return QSize(0, 100);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellAllocationPlot::contextMenuEvent(QContextMenuEvent* event)
{
QMenu menu;
QStringList commandIds;
commandIds << "RicShowContributingWellsFeature";
RimContextCommandBuilder::appendCommandsToMenu(commandIds, &menu);
if (menu.actions().size() > 0)
{
menu.exec(event->globalPos());
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------