mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2659 Ensemble statistics. Add labels to symbols on the statistic curves
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "RimSummaryPlot.h"
|
||||
|
||||
#include "RiuRimQwtPlotCurve.h"
|
||||
#include "RiuLineSegmentQwtPlotCurve.h"
|
||||
|
||||
#include "cafPdmUiComboBoxEditor.h"
|
||||
|
||||
@@ -421,7 +422,7 @@ void RimPlotCurve::updateCurveAppearance()
|
||||
}
|
||||
|
||||
// QwtPlotCurve will take ownership of the symbol
|
||||
symbol = new QwtSymbol(style);
|
||||
symbol = new RiuCurveQwtSymbol(style, m_symbolLabel);
|
||||
|
||||
symbol->setSize(6, 6);
|
||||
symbol->setColor(curveColor);
|
||||
@@ -545,6 +546,14 @@ void RimPlotCurve::setSymbolSkipDinstance(float distance)
|
||||
m_symbolSkipPixelDistance = distance;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCurve::setSymbolLabel(const QString& label)
|
||||
{
|
||||
m_symbolLabel = label;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -81,6 +81,7 @@ public:
|
||||
void setSymbol(PointSymbolEnum symbolStyle);
|
||||
PointSymbolEnum symbol();
|
||||
void setSymbolSkipDinstance(float distance);
|
||||
void setSymbolLabel(const QString& label);
|
||||
void setLineThickness(int thickness);
|
||||
void resetAppearance();
|
||||
|
||||
@@ -131,6 +132,7 @@ protected:
|
||||
caf::PdmField<QString> m_curveName;
|
||||
caf::PdmField<QString> m_customCurveName;
|
||||
caf::PdmField<bool> m_showLegend;
|
||||
QString m_symbolLabel;
|
||||
|
||||
caf::PdmField<bool> m_isUsingAutoName;
|
||||
caf::PdmField<cvf::Color3f> m_curveColor;
|
||||
|
||||
@@ -969,6 +969,7 @@ void RimEnsembleCurveSet::updateStatisticsCurves(bool calculate = true)
|
||||
m_curves.push_back(curve);
|
||||
curve->setSymbol(RimPlotCurve::SYMBOL_ELLIPSE);
|
||||
curve->setSymbolSkipDinstance(50);
|
||||
curve->setSymbolLabel(QString::fromStdString(address.ensembleStatisticsQuantityName()));
|
||||
curve->setLineStyle(RimPlotCurve::STYLE_SOLID);
|
||||
curve->setSummaryCaseY(m_ensembleStatCase.get());
|
||||
curve->setSummaryAddressY(address);
|
||||
|
||||
Reference in New Issue
Block a user