mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#396) Added fields for minimum and maximum X-axis values
This commit is contained in:
parent
c7f9716468
commit
8fa2701415
@ -46,6 +46,9 @@ RimWellLogPlotTrace::RimWellLogPlotTrace()
|
||||
CAF_PDM_InitFieldNoDefault(&curves, "Curves", "", "", "", "");
|
||||
curves.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitField(&m_minimumValue, "MinimumValue", -10.0, "Minimum value", "", "", "");
|
||||
CAF_PDM_InitField(&m_maximumValue, "MaximumValue", 100.0, "Maximum value", "", "", "");
|
||||
|
||||
m_viewer = new RiuWellLogTracePlot;
|
||||
}
|
||||
|
||||
@ -66,6 +69,11 @@ void RimWellLogPlotTrace::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
||||
{
|
||||
m_viewer->setVisible(show());
|
||||
}
|
||||
else if (changedField == &m_minimumValue || changedField == &m_maximumValue)
|
||||
{
|
||||
m_viewer->setAxisScale(QwtPlot::xTop, m_minimumValue, m_maximumValue);
|
||||
m_viewer->replot();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -60,6 +60,8 @@ protected:
|
||||
private:
|
||||
caf::PdmField<bool> show;
|
||||
caf::PdmChildArrayField<RimWellLogPlotCurve*> curves;
|
||||
caf::PdmField<double> m_minimumValue;
|
||||
caf::PdmField<double> m_maximumValue;
|
||||
|
||||
QPointer<RiuWellLogTracePlot> m_viewer;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user