Improve curve naming for plot and use in RFT segment plots

* Improve plot naming for depth track plots
* Move template text replace to string tools
* More data available for object template text
* Set plot visible and define default object name template text
This commit is contained in:
Magne Sjaastad authored and GitHub committed 2022-10-12 12:41:08 +02:00
1 parent 5e184df670
commit e7a486c802
29 files changed
+373 -203

No files matched your search

@@ -29,6 +29,7 @@
#include "RimWbsParameters.h"
#include "RimWellLogCurveCommonDataSource.h"
#include "RimWellLogFile.h"
#include "RimWellLogPlotNameConfig.h"
#include "cafPdmBase.h"
#include "cafPdmFieldScriptingCapability.h"
@@ -173,6 +174,31 @@ void RimWellBoreStabilityPlot::initAfterRead()
applyDataSource();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QStringList RimWellBoreStabilityPlot::supportedPlotNameVariables() const
{
auto variables = RimWellLogPlot::supportedPlotNameVariables();
variables.append( RiaDefines::namingVariableWaterDepth() );
return variables;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::map<QString, QString> RimWellBoreStabilityPlot::createNameKeyValueMap() const
{
auto nameKeyValueMap = RimWellLogPlot::createNameKeyValueMap();
QString waterDepthString = QString( "Water Depth = %1 m" ).arg( m_waterDepth );
nameKeyValueMap[RiaDefines::namingVariableWaterDepth()] = waterDepthString;
return nameKeyValueMap;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -183,20 +209,3 @@ void RimWellBoreStabilityPlot::applyDataSource()
m_wbsParameters->setTimeStep( m_commonDataSource->timeStepToApply() );
this->updateConnectedEditors();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimWellBoreStabilityPlot::createAutoName() const
{
QString name = RimWellLogPlot::createAutoName();
if ( m_nameConfig->addWaterDepth() && m_waterDepth != std::numeric_limits<double>::infinity() )
{
double tvdmsl = m_waterDepth;
QString waterDepthString = QString( ", Water Depth = %1 m" ).arg( tvdmsl );
name += waterDepthString;
}
return name;
}