mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3108 Ensemble statistics curves. Some curve symbols are now slightly bigger
This commit is contained in:
@@ -112,6 +112,8 @@ RimPlotCurve::RimPlotCurve()
|
||||
|
||||
CAF_PDM_InitField(&m_showLegend, "ShowLegend", true, "Contribute To Legend", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_symbolSize, "SymbolSize", 6, "Symbol Size", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_showErrorBars, "ShowErrorBars", true, "Show Error Bars", "", "", "");
|
||||
|
||||
m_qwtPlotCurve = new RiuRimQwtPlotCurve(this);
|
||||
@@ -427,7 +429,7 @@ void RimPlotCurve::updateCurveAppearance()
|
||||
// QwtPlotCurve will take ownership of the symbol
|
||||
symbol = new RiuCurveQwtSymbol(style, m_symbolLabel);
|
||||
|
||||
symbol->setSize(6, 6);
|
||||
symbol->setSize(m_symbolSize, m_symbolSize);
|
||||
symbol->setColor(curveColor);
|
||||
}
|
||||
|
||||
@@ -557,6 +559,14 @@ void RimPlotCurve::setSymbolLabel(const QString& label)
|
||||
m_symbolLabel = label;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCurve::setSymbolSize(int sizeInPixels)
|
||||
{
|
||||
m_symbolSize = sizeInPixels;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -83,6 +83,7 @@ public:
|
||||
PointSymbolEnum symbol();
|
||||
void setSymbolSkipDistance(float distance);
|
||||
void setSymbolLabel(const QString& label);
|
||||
void setSymbolSize(int sizeInPixels);
|
||||
void setLineThickness(int thickness);
|
||||
void resetAppearance();
|
||||
|
||||
@@ -134,6 +135,7 @@ protected:
|
||||
caf::PdmField<QString> m_customCurveName;
|
||||
caf::PdmField<bool> m_showLegend;
|
||||
QString m_symbolLabel;
|
||||
caf::PdmField<int> m_symbolSize;
|
||||
|
||||
caf::PdmField<bool> m_isUsingAutoName;
|
||||
caf::PdmField<cvf::Color3f> m_curveColor;
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
/// Internal functions
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPlotCurve::PointSymbolEnum statisticsCurveSymbolFromAddress(const RifEclipseSummaryAddress& address);
|
||||
int statisticsCurveSymbolSize(RimPlotCurve::PointSymbolEnum symbol);
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -999,7 +1000,10 @@ void RimEnsembleCurveSet::updateStatisticsCurves(bool calculate = true)
|
||||
m_curves.push_back(curve);
|
||||
curve->setColor(m_statistics->color());
|
||||
curve->setColor(m_statistics->color());
|
||||
curve->setSymbol(statisticsCurveSymbolFromAddress(address));
|
||||
|
||||
auto symbol = statisticsCurveSymbolFromAddress(address);
|
||||
curve->setSymbol(symbol);
|
||||
curve->setSymbolSize(statisticsCurveSymbolSize(symbol));
|
||||
curve->setSymbolSkipDistance(150);
|
||||
if (m_statistics->showCurveLabels())
|
||||
{
|
||||
@@ -1249,3 +1253,14 @@ RimPlotCurve::PointSymbolEnum statisticsCurveSymbolFromAddress(const RifEclipseS
|
||||
if (qName.contains(ENSEMBLE_STAT_P50_QUANTITY_NAME)) return RimPlotCurve::SYMBOL_DIAMOND;
|
||||
return RimPlotCurve::SYMBOL_ELLIPSE;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int statisticsCurveSymbolSize(RimPlotCurve::PointSymbolEnum symbol)
|
||||
{
|
||||
if (symbol == RimPlotCurve::SYMBOL_DIAMOND) return 8;
|
||||
if (symbol == RimPlotCurve::SYMBOL_TRIANGLE) return 7;
|
||||
if (symbol == RimPlotCurve::SYMBOL_DOWN_TRIANGLE) return 7;
|
||||
return 6;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user