#1947 RFT/PLT Plot: Add uiordering and change Address from std to qt variables

This commit is contained in:
Unknown
2017-10-05 13:49:49 +02:00
committed by Rebecca Cox
parent b8cef666e0
commit 9c3b199e7e
5 changed files with 92 additions and 24 deletions

View File

@@ -37,6 +37,8 @@
#include "cafPdmObject.h"
#include "cvfAssert.h"
#include <QString>
CAF_PDM_SOURCE_INIT(RimWellLogRftCurve, "WellLogRftCurve");
@@ -80,14 +82,6 @@ QString RimWellLogRftCurve::wellLogChannelName() const
return m_wellLogChannelName;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RimWellLogRftCurve::currentTimeStep() const
{
return m_timeStep;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -104,6 +98,16 @@ RimEclipseResultCase* RimWellLogRftCurve::eclipseResultCase() const
return m_eclipseResultCase;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogRftCurve::setRftAddress(RifEclipseRftAddress address)
{
m_timeStep = address.timeStep();
m_wellName = address.wellName();
m_wellLogChannelName = address.wellLogChannelName();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -150,6 +154,26 @@ void RimWellLogRftCurve::onLoadDataAndUpdate(bool updateParentPlot)
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogRftCurve::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
{
RimPlotCurve::updateOptionSensitivity();
caf::PdmUiGroup* curveDataGroup = uiOrdering.addNewGroup("Curve Data");
curveDataGroup->add(&m_wellName);
curveDataGroup->add(&m_wellLogChannelName);
curveDataGroup->add(&m_timeStep);
caf::PdmUiGroup* appearanceGroup = uiOrdering.addNewGroup("Appearance");
RimPlotCurve::appearanceUiOrdering(*appearanceGroup);
caf::PdmUiGroup* nameGroup = uiOrdering.addNewGroup("Curve Name");
nameGroup->add(&m_showLegend);
RimPlotCurve::curveNameUiOrdering(*nameGroup);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -167,6 +191,20 @@ QList<caf::PdmOptionItemInfo> RimWellLogRftCurve::calculateValueOptions(const ca
options.push_front(caf::PdmOptionItemInfo("None", nullptr));
}
if (fieldNeedingOptions == &m_wellLogChannelName)
{
RimTools::caseOptionItems(&options);
options.push_front(caf::PdmOptionItemInfo("None", nullptr));
}
if (fieldNeedingOptions == &m_timeStep)
{
RimTools::caseOptionItems(&options);
options.push_front(caf::PdmOptionItemInfo("None", nullptr));
}
return options;
}
@@ -212,7 +250,7 @@ std::vector<double> RimWellLogRftCurve::xValues() const
if (!reader) return values;
RifEclipseRftAddress address(m_wellName().toStdString(), m_timeStep, m_wellLogChannelName().toStdString());
RifEclipseRftAddress address(m_wellName(), m_timeStep, m_wellLogChannelName());
reader->values(address, &values);
@@ -229,7 +267,7 @@ std::vector<double> RimWellLogRftCurve::depthValues() const
if (!reader) return values;
RifEclipseRftAddress address(m_wellName().toStdString(), m_timeStep, "DEPTH");
RifEclipseRftAddress address(m_wellName(), m_timeStep, "DEPTH");
reader->values(address, &values);