mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Implement pdf rendering (#5250)
* First PDF creation support * Reimplement info box * Set title and make overlay frame margins more unified * Remove a style sheet that was never meant to be applied to Project Tree * Update RiuDraggableOverlayFrame when changing content * Default page layout in Preferences * undo removal of elision * Remove friend class assignment in cafCategoryMapper * the required methods have been made public * Fix up after review * Remove spurious const on by-value return * Fix compile errors on Linux * Fix size adjustment of legends with plot resizing
This commit is contained in:
@@ -33,7 +33,9 @@
|
||||
#include "RigFormationNames.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RiuCvfOverlayItemWidget.h"
|
||||
#include "RiuGridCrossQwtPlot.h"
|
||||
#include "RiuScalarMapperLegendFrame.h"
|
||||
|
||||
#include "RimCase.h"
|
||||
#include "RimEclipseCase.h"
|
||||
@@ -57,6 +59,7 @@
|
||||
#include "cafPdmUiSliderEditor.h"
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
#include "cafProgressInfo.h"
|
||||
#include "cafTitledOverlayFrame.h"
|
||||
#include "cvfScalarMapper.h"
|
||||
#include "cvfqtUtils.h"
|
||||
|
||||
@@ -133,6 +136,18 @@ RimGridCrossPlotDataSet::RimGridCrossPlotDataSet()
|
||||
setDefaults();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimGridCrossPlotDataSet::~RimGridCrossPlotDataSet()
|
||||
{
|
||||
if ( m_legendOverlayFrame )
|
||||
{
|
||||
m_legendOverlayFrame->setParent( nullptr );
|
||||
delete m_legendOverlayFrame;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1020,11 +1035,20 @@ void RimGridCrossPlotDataSet::updateLegendRange()
|
||||
m_groupingProperty->updateRangesForEmbeddedLegends( m_timeStep() );
|
||||
}
|
||||
}
|
||||
parent->addOrUpdateDataSetLegend( this );
|
||||
if ( !m_legendOverlayFrame )
|
||||
{
|
||||
m_legendOverlayFrame = new RiuDraggableOverlayFrame( parent->viewer()->canvas(),
|
||||
parent->viewer()->overlayMargins() );
|
||||
}
|
||||
m_legendOverlayFrame->setContentFrame( legendConfig()->makeLegendFrame() );
|
||||
parent->viewer()->addOverlayFrame( m_legendOverlayFrame );
|
||||
}
|
||||
else
|
||||
{
|
||||
parent->removeDataSetLegend( this );
|
||||
if ( m_legendOverlayFrame )
|
||||
{
|
||||
parent->viewer()->removeOverlayFrame( m_legendOverlayFrame );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user