mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Clang-format changed files
This commit is contained in:
@@ -24,37 +24,37 @@
|
||||
|
||||
#include "RigWellLogCurveData.h"
|
||||
|
||||
#include "RimWellLogRftCurveNameConfig.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellLogCurve.h"
|
||||
#include "RimWellLogRftCurveNameConfig.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
|
||||
CAF_PDM_SOURCE_INIT(Rim3dWellLogRftCurve, "Rim3dWellLogRftCurve");
|
||||
CAF_PDM_SOURCE_INIT( Rim3dWellLogRftCurve, "Rim3dWellLogRftCurve" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
Rim3dWellLogRftCurve::Rim3dWellLogRftCurve()
|
||||
{
|
||||
CAF_PDM_InitObject("3d Well Log RFT Curve", ":/WellLogCurve16x16.png", "", "");
|
||||
CAF_PDM_InitObject( "3d Well Log RFT Curve", ":/WellLogCurve16x16.png", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_eclipseResultCase, "eclipseResultCase", "", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_timeStep, "timeStep", "", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault( &m_eclipseResultCase, "eclipseResultCase", "", "", "", "" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_timeStep, "timeStep", "", "", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_wellLogChannelName, "wellLogChannelName", "", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault( &m_wellLogChannelName, "wellLogChannelName", "", "", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_2dWellLogRftCurve, "my2dWellLogRftCurve", "", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault( &m_2dWellLogRftCurve, "my2dWellLogRftCurve", "", "", "", "" );
|
||||
|
||||
m_2dWellLogRftCurve = new RimWellLogRftCurve();
|
||||
m_2dWellLogRftCurve.xmlCapability()->disableIO();
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_nameConfig, "NameConfig", "", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault( &m_nameConfig, "NameConfig", "", "", "", "" );
|
||||
m_nameConfig = new RimWellLogRftCurveNameConfig();
|
||||
}
|
||||
|
||||
@@ -67,19 +67,19 @@ Rim3dWellLogRftCurve::~Rim3dWellLogRftCurve()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dWellLogRftCurve::curveValuesAndMds(std::vector<double>* values, std::vector<double>* measuredDepthValues) const
|
||||
void Rim3dWellLogRftCurve::curveValuesAndMds( std::vector<double>* values, std::vector<double>* measuredDepthValues ) const
|
||||
{
|
||||
if (m_2dWellLogRftCurve->wellName() == QString())
|
||||
if ( m_2dWellLogRftCurve->wellName() == QString() )
|
||||
{
|
||||
m_2dWellLogRftCurve->setDefaultAddress(wellName());
|
||||
m_2dWellLogRftCurve->setDefaultAddress( wellName() );
|
||||
}
|
||||
|
||||
const RigWellLogCurveData* curveData = m_2dWellLogRftCurve->curveData();
|
||||
|
||||
//These values are for a simulation well
|
||||
*values = curveData->xValues();
|
||||
// These values are for a simulation well
|
||||
*values = curveData->xValues();
|
||||
*measuredDepthValues = curveData->measuredDepths();
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ void Rim3dWellLogRftCurve::curveValuesAndMds(std::vector<double>* values, std::v
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString Rim3dWellLogRftCurve::resultPropertyString() const
|
||||
{
|
||||
return caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText(m_wellLogChannelName());
|
||||
return caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText( m_wellLogChannelName() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -106,28 +106,29 @@ QString Rim3dWellLogRftCurve::createAutoName() const
|
||||
{
|
||||
QStringList name;
|
||||
|
||||
if (!wellName().isEmpty())
|
||||
if ( !wellName().isEmpty() )
|
||||
{
|
||||
name.push_back(wellName());
|
||||
name.push_back( wellName() );
|
||||
}
|
||||
|
||||
name.push_back("RFT");
|
||||
name.push_back( "RFT" );
|
||||
|
||||
if (m_eclipseResultCase)
|
||||
if ( m_eclipseResultCase )
|
||||
{
|
||||
name.push_back(m_eclipseResultCase->caseUserDescription());
|
||||
name.push_back( m_eclipseResultCase->caseUserDescription() );
|
||||
}
|
||||
if (m_wellLogChannelName().text() != caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::text(RifEclipseRftAddress::NONE))
|
||||
if ( m_wellLogChannelName().text() !=
|
||||
caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::text( RifEclipseRftAddress::NONE ) )
|
||||
{
|
||||
RifEclipseRftAddress::RftWellLogChannelType channelNameEnum = m_wellLogChannelName();
|
||||
name.push_back(caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText(channelNameEnum));
|
||||
name.push_back( caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText( channelNameEnum ) );
|
||||
}
|
||||
if (!m_timeStep().isNull())
|
||||
if ( !m_timeStep().isNull() )
|
||||
{
|
||||
name.push_back(m_timeStep().toString(RiaQDateTimeTools::dateFormatString()));
|
||||
name.push_back( m_timeStep().toString( RiaQDateTimeTools::dateFormatString() ) );
|
||||
}
|
||||
|
||||
return name.join(", ");
|
||||
return name.join( ", " );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -141,96 +142,104 @@ caf::PdmFieldHandle* Rim3dWellLogRftCurve::userDescriptionField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dWellLogRftCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue)
|
||||
void Rim3dWellLogRftCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
{
|
||||
if (changedField == &m_wellLogChannelName || changedField == &m_timeStep)
|
||||
if ( changedField == &m_wellLogChannelName || changedField == &m_timeStep )
|
||||
{
|
||||
this->resetMinMaxValuesAndUpdateUI();
|
||||
}
|
||||
Rim3dWellLogCurve::fieldChangedByUi(changedField, oldValue, newValue);
|
||||
Rim3dWellLogCurve::fieldChangedByUi( changedField, oldValue, newValue );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> Rim3dWellLogRftCurve::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
|
||||
QList<caf::PdmOptionItemInfo> Rim3dWellLogRftCurve::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly )
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
if (fieldNeedingOptions == &m_eclipseResultCase)
|
||||
if ( fieldNeedingOptions == &m_eclipseResultCase )
|
||||
{
|
||||
RimTools::caseOptionItems(&options);
|
||||
RimTools::caseOptionItems( &options );
|
||||
|
||||
options.push_front(caf::PdmOptionItemInfo("None", nullptr));
|
||||
options.push_front( caf::PdmOptionItemInfo( "None", nullptr ) );
|
||||
}
|
||||
else if (fieldNeedingOptions == &m_wellLogChannelName)
|
||||
else if ( fieldNeedingOptions == &m_wellLogChannelName )
|
||||
{
|
||||
if (m_eclipseResultCase)
|
||||
if ( m_eclipseResultCase )
|
||||
{
|
||||
RifReaderEclipseRft* reader = m_eclipseResultCase()->rftReader();
|
||||
if (reader)
|
||||
if ( reader )
|
||||
{
|
||||
for (const RifEclipseRftAddress::RftWellLogChannelType& channelName : reader->availableWellLogChannels(wellName()))
|
||||
for ( const RifEclipseRftAddress::RftWellLogChannelType& channelName :
|
||||
reader->availableWellLogChannels( wellName() ) )
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText(channelName), channelName));
|
||||
options.push_back(
|
||||
caf::PdmOptionItemInfo( caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText(
|
||||
channelName ),
|
||||
channelName ) );
|
||||
}
|
||||
}
|
||||
if (options.empty())
|
||||
if ( options.empty() )
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText(RifEclipseRftAddress::NONE), RifEclipseRftAddress::NONE));
|
||||
options.push_back(
|
||||
caf::PdmOptionItemInfo( caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText(
|
||||
RifEclipseRftAddress::NONE ),
|
||||
RifEclipseRftAddress::NONE ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (fieldNeedingOptions == &m_timeStep)
|
||||
else if ( fieldNeedingOptions == &m_timeStep )
|
||||
{
|
||||
if (m_eclipseResultCase)
|
||||
if ( m_eclipseResultCase )
|
||||
{
|
||||
RifReaderEclipseRft* reader = m_eclipseResultCase()->rftReader();
|
||||
if (reader)
|
||||
if ( reader )
|
||||
{
|
||||
QString dateFormat = "dd MMM yyyy";
|
||||
std::set<QDateTime> timeStamps = reader->availableTimeSteps(wellName(), m_wellLogChannelName());
|
||||
for (const QDateTime& dt : timeStamps)
|
||||
QString dateFormat = "dd MMM yyyy";
|
||||
std::set<QDateTime> timeStamps = reader->availableTimeSteps( wellName(), m_wellLogChannelName() );
|
||||
for ( const QDateTime& dt : timeStamps )
|
||||
{
|
||||
QString dateString = RiaQDateTimeTools::toStringUsingApplicationLocale(dt, dateFormat);
|
||||
QString dateString = RiaQDateTimeTools::toStringUsingApplicationLocale( dt, dateFormat );
|
||||
|
||||
options.push_back(caf::PdmOptionItemInfo(dateString, dt));
|
||||
options.push_back( caf::PdmOptionItemInfo( dateString, dt ) );
|
||||
}
|
||||
}
|
||||
|
||||
options.push_back(caf::PdmOptionItemInfo("None", QDateTime()));
|
||||
options.push_back( caf::PdmOptionItemInfo( "None", QDateTime() ) );
|
||||
}
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dWellLogRftCurve::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
void Rim3dWellLogRftCurve::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
caf::PdmUiGroup* curveDataGroup = uiOrdering.addNewGroup("Curve Data");
|
||||
curveDataGroup->add(&m_eclipseResultCase);
|
||||
curveDataGroup->add(&m_wellLogChannelName);
|
||||
curveDataGroup->add(&m_timeStep);
|
||||
caf::PdmUiGroup* curveDataGroup = uiOrdering.addNewGroup( "Curve Data" );
|
||||
curveDataGroup->add( &m_eclipseResultCase );
|
||||
curveDataGroup->add( &m_wellLogChannelName );
|
||||
curveDataGroup->add( &m_timeStep );
|
||||
|
||||
Rim3dWellLogCurve::configurationUiOrdering(uiOrdering);
|
||||
Rim3dWellLogCurve::configurationUiOrdering( uiOrdering );
|
||||
|
||||
caf::PdmUiGroup* nameGroup = uiOrdering.addNewGroup("Curve Name");
|
||||
m_nameConfig->uiOrdering(uiConfigName, *nameGroup);
|
||||
caf::PdmUiGroup* nameGroup = uiOrdering.addNewGroup( "Curve Name" );
|
||||
m_nameConfig->uiOrdering( uiConfigName, *nameGroup );
|
||||
|
||||
uiOrdering.skipRemainingFields(true);
|
||||
uiOrdering.skipRemainingFields( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString Rim3dWellLogRftCurve::wellName() const
|
||||
{
|
||||
RimWellPath* wellPath = nullptr;
|
||||
firstAncestorOrThisOfType(wellPath);
|
||||
firstAncestorOrThisOfType( wellPath );
|
||||
|
||||
return wellPath->name();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user