mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8761 Multiplot template support
This commit is contained in:
@@ -119,6 +119,7 @@
|
||||
#include "RimStimPlanModelTemplateCollection.h"
|
||||
#include "RimStreamlineInViewCollection.h"
|
||||
#include "RimSummaryAddress.h"
|
||||
#include "RimSummaryAddressCollection.h"
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimSummaryCaseMainCollection.h"
|
||||
@@ -1036,6 +1037,7 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
||||
menuBuilder << "RicNewDefaultSummaryPlotFeature";
|
||||
menuBuilder << "Separator";
|
||||
menuBuilder << "RicSnapshotViewToPdfFeature";
|
||||
menuBuilder << "RicSaveMultiPlotTemplateFeature";
|
||||
}
|
||||
else if ( dynamic_cast<RimMultiPlot*>( firstUiItem ) )
|
||||
{
|
||||
@@ -1045,6 +1047,10 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
||||
{
|
||||
menuBuilder << "RicNewStreamlineFeature";
|
||||
}
|
||||
else if ( dynamic_cast<RimSummaryAddressCollection*>( firstUiItem ) )
|
||||
{
|
||||
menuBuilder << "RicCreateMultiPlotFromSelectionFeature";
|
||||
}
|
||||
|
||||
if ( dynamic_cast<Rim3dView*>( firstUiItem ) )
|
||||
{
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaPreferencesSummary.h"
|
||||
#include "RiaVersionInfo.h"
|
||||
|
||||
#include "RimPlot.h"
|
||||
#include "RimProject.h"
|
||||
@@ -47,6 +48,9 @@ RimMultiPlot::RimMultiPlot()
|
||||
{
|
||||
CAF_PDM_InitObject( "Multi Plot", ":/MultiPlot16x16.png" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_projectFileVersionString, "ProjectFileVersionString", "" );
|
||||
m_projectFileVersionString.uiCapability()->setUiHidden( true );
|
||||
|
||||
CAF_PDM_InitField( &m_showPlotWindowTitle, "ShowTitleInPlot", true, "Show Title" );
|
||||
CAF_PDM_InitField( &m_plotWindowTitle, "PlotDescription", QString( "" ), "Name" );
|
||||
|
||||
@@ -131,6 +135,14 @@ QString RimMultiPlot::description() const
|
||||
return multiPlotTitle();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimMultiPlot::projectFileVersionString() const
|
||||
{
|
||||
return m_projectFileVersionString();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -863,6 +875,14 @@ void RimMultiPlot::cleanupBeforeClose()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimMultiPlot::setupBeforeSave()
|
||||
{
|
||||
m_projectFileVersionString = STRPRODUCTVER;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -58,6 +58,7 @@ public:
|
||||
QWidget* viewWidget() override;
|
||||
|
||||
QString description() const override;
|
||||
QString projectFileVersionString() const;
|
||||
|
||||
bool isMultiPlotTitleVisible() const;
|
||||
void setMultiPlotTitleVisible( bool visible );
|
||||
@@ -135,6 +136,7 @@ protected:
|
||||
|
||||
private:
|
||||
void cleanupBeforeClose();
|
||||
void setupBeforeSave() override;
|
||||
void doUpdateLayout() override;
|
||||
void updateSubPlotNames();
|
||||
void doRenderWindowContent( QPaintDevice* paintDevice ) override;
|
||||
@@ -146,6 +148,7 @@ private:
|
||||
static void setTickmarkCount( RimPlot* plot, RimPlotAxisPropertiesInterface::LegendTickmarkCountEnum tickmarkCount );
|
||||
|
||||
protected:
|
||||
caf::PdmField<QString> m_projectFileVersionString;
|
||||
caf::PdmField<bool> m_showPlotWindowTitle;
|
||||
caf::PdmField<QString> m_plotWindowTitle;
|
||||
caf::PdmField<ColumnCountEnum> m_columnCount;
|
||||
|
||||
@@ -198,6 +198,20 @@ RiaDefines::PhaseType RimSummaryAddress::addressPhaseType() const
|
||||
return RiaDefines::PhaseType::PHASE_NOT_APPLICABLE;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimSummaryAddress::keywordForCategory( RifEclipseSummaryAddress::SummaryVarCategory category ) const
|
||||
{
|
||||
// Return the keyword text for supported field replacement in plot templates
|
||||
|
||||
if ( category == RifEclipseSummaryAddress::SUMMARY_WELL ) return m_wellName.keyword();
|
||||
if ( category == RifEclipseSummaryAddress::SUMMARY_WELL_GROUP ) return m_wellGroupName.keyword();
|
||||
if ( category == RifEclipseSummaryAddress::SUMMARY_REGION ) return m_regionNumber.keyword();
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -63,6 +63,8 @@ public:
|
||||
|
||||
RiaDefines::PhaseType addressPhaseType() const;
|
||||
|
||||
QString keywordForCategory( RifEclipseSummaryAddress::SummaryVarCategory category ) const;
|
||||
|
||||
protected:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user