mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3102 Well Log Plots: optionally align legend horizontally.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -71,8 +71,9 @@ public:
|
||||
|
||||
QString depthPlotTitle() const;
|
||||
bool isPlotTitleVisible() const;
|
||||
bool isTrackLegendsVisible() const;
|
||||
bool areTrackLegendsVisible() const;
|
||||
void setTrackLegendsVisible(bool doShow);
|
||||
bool areTrackLegendsHorizontal() const;
|
||||
|
||||
void addTrack(RimWellLogTrack* track);
|
||||
void insertTrack(RimWellLogTrack* track, size_t index);
|
||||
@@ -153,6 +154,7 @@ private:
|
||||
caf::PdmField<bool> m_isAutoScaleDepthEnabled;
|
||||
caf::PdmField<bool> m_showTitleInPlot;
|
||||
caf::PdmField<bool> m_showTrackLegends;
|
||||
caf::PdmField<bool> m_trackLegendsHorizontal;
|
||||
|
||||
double m_minAvailableDepth;
|
||||
double m_maxAvailableDepth;
|
||||
|
||||
Reference in New Issue
Block a user