#1835 Tof Acc Sat Plot: Add a max TOF range field

This commit is contained in:
Bjørnar Grip Fjær
2017-08-29 15:32:11 +02:00
parent d50e40854a
commit fa943226bc
4 changed files with 19 additions and 6 deletions

View File

@@ -53,6 +53,8 @@ RimTofAccumulatedPhaseFractionsPlot::RimTofAccumulatedPhaseFractionsPlot()
CAF_PDM_InitField(&m_showPlotTitle, "ShowPlotTitle", true, "Show Plot Title", "", "", "");
m_showPlotTitle.uiCapability()->setUiHidden(true);
CAF_PDM_InitField(&m_maxTof, "MaxTof", 50, "Max Time of Flight [year]", "", "", "");
m_showWindow = false;
}
@@ -148,6 +150,10 @@ void RimTofAccumulatedPhaseFractionsPlot::fieldChangedByUi(const caf::PdmFieldHa
{
updateMdiWindowTitle();
}
else if (changedField == &m_maxTof)
{
loadDataAndUpdate();
}
}
@@ -197,7 +203,7 @@ void RimTofAccumulatedPhaseFractionsPlot::loadDataAndUpdate()
const std::vector<double>& oilValues = calc.accumulatedPhaseFractionsSoil();
const std::vector<double>& gasValues = calc.accumulatedPhaseFractionsSgas();
m_tofAccumulatedPhaseFractionsPlotWidget->setSamples(xValues, watValues, oilValues, gasValues);
m_tofAccumulatedPhaseFractionsPlotWidget->setSamples(xValues, watValues, oilValues, gasValues, m_maxTof());
}
}

View File

@@ -85,6 +85,7 @@ protected:
private:
caf::PdmField<bool> m_showPlotTitle;
caf::PdmField<QString> m_userName;
caf::PdmField<int> m_maxTof;
QPointer<RiuTofAccumulatedPhaseFractionsPlot> m_tofAccumulatedPhaseFractionsPlotWidget;
};