mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
7147 vfp show plot data (#7154)
* #7147 VFP plots: refactor to separate data extraction and display. * #7147 VFP Plots: Add "Show Plot Data" functionality. * #7147 VFP plots: Move defines to separate file * #7147 VFP plots: Minor adjustments * #7147 VFP Plot: Show table number in title and auto-generated name. * #7147 VFP Plot: Add "Show Plot Data" to context menu. * Remove unused member. * #7147 VFP Plot: Disable broken curve selection. * Revert "#7147 VFP Plot: Add "Show Plot Data" to context menu." This reverts commit 5f3b2f362fcea7fc6de5fd2c614919079629bf1c. * #7147 VFP Plot: Use event filter to show context menu * Janitor : Use context menu launcher for WellAllocationPlot and CrossPlot Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
This commit is contained in:
committed by
GitHub
parent
7b5bc5c2cd
commit
1f7cb2b973
@@ -27,6 +27,7 @@
|
||||
#include "RimPlotAxisPropertiesInterface.h"
|
||||
#include "RimRegularLegendConfig.h"
|
||||
|
||||
#include "RiuContextMenuLauncher.h"
|
||||
#include "RiuGuiTheme.h"
|
||||
#include "RiuPlotAnnotationTool.h"
|
||||
#include "RiuQwtCurvePointTracker.h"
|
||||
@@ -105,6 +106,16 @@ RiuGridCrossQwtPlot::RiuGridCrossQwtPlot( RimGridCrossPlot* plot, QWidget* paren
|
||||
this->canvas()->installEventFilter( this );
|
||||
|
||||
setInternalQwtLegendVisible( true );
|
||||
|
||||
{
|
||||
caf::CmdFeatureMenuBuilder menuBuilder;
|
||||
|
||||
menuBuilder << "RicSwapGridCrossPlotDataSetAxesFeature";
|
||||
menuBuilder << "Separator";
|
||||
menuBuilder << "RicShowPlotDataFeature";
|
||||
|
||||
new RiuContextMenuLauncher( this, menuBuilder );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -170,28 +181,6 @@ void RiuGridCrossQwtPlot::setInternalQwtLegendVisible( bool visible )
|
||||
this->insertLegend( nullptr );
|
||||
}
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridCrossQwtPlot::contextMenuEvent( QContextMenuEvent* event )
|
||||
{
|
||||
QMenu menu;
|
||||
caf::CmdFeatureMenuBuilder menuBuilder;
|
||||
|
||||
emit plotSelected( false );
|
||||
|
||||
menuBuilder << "RicSwapGridCrossPlotDataSetAxesFeature";
|
||||
menuBuilder << "Separator";
|
||||
menuBuilder << "RicShowPlotDataFeature";
|
||||
|
||||
menuBuilder.appendToMenu( &menu );
|
||||
|
||||
if ( menu.actions().size() > 0 )
|
||||
{
|
||||
menu.exec( event->globalPos() );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user