#1373 Add feature ShowTotalAllocationData

This commit is contained in:
Magne Sjaastad
2017-04-19 13:44:08 +02:00
parent 58065396e7
commit 9caaeac237
9 changed files with 182 additions and 4 deletions

View File

@@ -138,6 +138,24 @@ QString RimTotalWellAllocationPlot::description() const
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimTotalWellAllocationPlot::totalAllocationAsText() const
{
QString txt;
for (auto a : m_sliceInfo)
{
txt += a.first;
txt += "\t";
txt += QString::number(a.second);
txt += "\n";
}
return txt;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -150,6 +168,8 @@ void RimTotalWellAllocationPlot::addSlice(const QString& name, const cvf::Color3
m_wellTotalAllocationPlotWidget->addItem(name, sliceColor, value);
m_wellTotalAllocationPlotWidget->update();
}
m_sliceInfo.push_back(std::make_pair(name, value));
}
@@ -163,6 +183,8 @@ void RimTotalWellAllocationPlot::clearSlices()
m_wellTotalAllocationPlotWidget->clear();
m_wellTotalAllocationPlotWidget->update();
}
m_sliceInfo.clear();
}
//--------------------------------------------------------------------------------------------------