#6118 Automatic red, green and blue curve colors for oil, gas and water properties when using area fill

* Also removed green, red and blue from the cycled well log colors to avoid clashes.
* Only automatic when area fill is on.
* Potential color clashes for the general case with multiple Oil-curves in the same plot.
This commit is contained in:
Gaute Lindkvist
2020-06-19 12:40:48 +02:00
parent 1d16b55fdc
commit 33fb733110
11 changed files with 156 additions and 8 deletions

View File

@@ -22,6 +22,8 @@
#include "RimSummaryCalculation.h"
#include "RimSummaryCalculationCollection.h"
#include <QRegularExpression>
namespace caf
{
template <>
@@ -153,3 +155,24 @@ void RimSummaryAddress::ensureIdIsAssigned()
}
}
}
//--------------------------------------------------------------------------------------------------
/// Return phase type if the current result is known to be of a particular
/// fluid phase type. Otherwise the method will return PHASE_NOT_APPLICABLE.
//--------------------------------------------------------------------------------------------------
RiaDefines::PhaseType RimSummaryAddress::addressPhaseType() const
{
if ( QRegularExpression( "^.OP" ).match( m_quantityName ).hasMatch() )
{
return RiaDefines::PhaseType::OIL_PHASE;
}
else if ( QRegularExpression( "^.GP" ).match( m_quantityName ).hasMatch() )
{
return RiaDefines::PhaseType::GAS_PHASE;
}
else if ( QRegularExpression( "^.WP" ).match( m_quantityName ).hasMatch() )
{
return RiaDefines::PhaseType::WATER_PHASE;
}
return RiaDefines::PhaseType::PHASE_NOT_APPLICABLE;
}