#1165 Added title to well allocation plot

This commit is contained in:
Magne Sjaastad
2017-02-02 14:17:36 +01:00
parent f3a4242826
commit 40dbf78aa9
4 changed files with 72 additions and 11 deletions

View File

@@ -312,6 +312,26 @@ void RimWellAllocationPlot::addStackedCurve(const QString& tracerName,
curve->loadDataAndUpdate();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellAllocationPlot::updateWidgetTitleWindowTitle()
{
updateMdiWindowTitle();
if (m_wellAllocationPlotWidget)
{
if (m_showPlotTitle)
{
m_wellAllocationPlotWidget->showTitle(m_userName);
}
else
{
m_wellAllocationPlotWidget->hideTitle();
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -446,7 +466,7 @@ void RimWellAllocationPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedF
if (changedField == &m_userName ||
changedField == &m_showPlotTitle)
{
updateMdiWindowTitle();
updateWidgetTitleWindowTitle();
}
else if ( changedField == &m_wellName
|| changedField == &m_case
@@ -474,7 +494,8 @@ QImage RimWellAllocationPlot::snapshotWindowContent()
void RimWellAllocationPlot::setDescription(const QString& description)
{
m_userName = description;
this->updateMdiWindowTitle();
updateWidgetTitleWindowTitle();
}
//--------------------------------------------------------------------------------------------------

View File

@@ -85,6 +85,8 @@ private:
const std::vector<double>& connNumbers,
const std::vector<double>& accFlow,
RimWellLogTrack* plotTrack);
void updateWidgetTitleWindowTitle();
// RimViewWindow overrides