#778 Display unit on Y-Axis. Added unit to legend. Cosmetics on Curve Filter Prop-panel

This commit is contained in:
Jacob Støren
2016-06-22 14:34:56 +02:00
parent 6aa5ba9e2d
commit 27f6b980fe
10 changed files with 103 additions and 5 deletions

View File

@@ -350,6 +350,19 @@ bool RifReaderEclipseSummary::hasAddress(const RifEclipseSummaryAddress& resultA
return (it != m_resultAddressToErtNodeIdx.end());
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::string RifReaderEclipseSummary::unitName(const RifEclipseSummaryAddress& resultAddress)
{
int variableIndex = indexFromAddress(resultAddress);
if(variableIndex < 0) return "";
const smspec_node_type * ertSumVarNode = ecl_smspec_iget_node(eclSmSpec, variableIndex);
return smspec_node_get_unit(ertSumVarNode);
}
#if 0
//--------------------------------------------------------------------------------------------------
///

View File

@@ -48,6 +48,7 @@ public:
std::vector<time_t> timeSteps() const;
bool values(const RifEclipseSummaryAddress& resultAddress, std::vector<double>* values);
std::string unitName(const RifEclipseSummaryAddress& resultAddress);
// TODO: Move this to a tools class with static members
static std::vector<QDateTime> fromTimeT(const std::vector<time_t>& timeSteps);