#3102 Well Log Plots: optionally align legend horizontally.

This commit is contained in:
Gaute Lindkvist
2018-06-26 11:38:07 +02:00
parent e4288972de
commit ea2b64ef08
3 changed files with 35 additions and 10 deletions

View File

@@ -81,6 +81,7 @@ RimWellLogPlot::RimWellLogPlot()
m_isAutoScaleDepthEnabled.uiCapability()->setUiHidden(true);
CAF_PDM_InitField(&m_showTitleInPlot, "ShowTitleInPlot", true, "Show Title in Plot", "", "", "");
CAF_PDM_InitField(&m_showTrackLegends, "ShowTrackLegends", true, "Show Legends", "", "", "");
CAF_PDM_InitField(&m_trackLegendsHorizontal, "TrackLegendsHorizontal", false, "Horizontal Legends", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_tracks, "Tracks", "", "", "", "");
m_tracks.uiCapability()->setUiHidden(true);
@@ -115,7 +116,8 @@ void RimWellLogPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
m_isAutoScaleDepthEnabled = false;
}
else if (changedField == &m_showTitleInPlot ||
changedField == &m_showTrackLegends)
changedField == &m_showTrackLegends ||
changedField == &m_trackLegendsHorizontal)
{
updateTracks();
if (m_viewer) m_viewer->updateChildrenLayout();
@@ -585,6 +587,7 @@ void RimWellLogPlot::uiOrderingForPlot(caf::PdmUiOrdering& uiOrdering)
uiOrdering.add(&m_showTitleInPlot);
uiOrdering.add(&m_showTrackLegends);
uiOrdering.add(&m_trackLegendsHorizontal);
}
//--------------------------------------------------------------------------------------------------
@@ -846,7 +849,7 @@ bool RimWellLogPlot::isPlotTitleVisible() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimWellLogPlot::isTrackLegendsVisible() const
bool RimWellLogPlot::areTrackLegendsVisible() const
{
return m_showTrackLegends();
}
@@ -859,6 +862,14 @@ void RimWellLogPlot::setTrackLegendsVisible(bool doShow)
m_showTrackLegends = doShow;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimWellLogPlot::areTrackLegendsHorizontal() const
{
return m_trackLegendsHorizontal;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------