mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Missing legend (#9095)
* Make sure ensemble curveset legends are shown in multiplot legend. * Remove information already shown in title from curve legend. * Fix missing legend when creating curve plot from ensemble curves * Show actual curve color in legend
This commit is contained in:
@@ -94,6 +94,7 @@ public:
|
||||
const QBrush& fillBrush = QBrush( Qt::NoBrush ) ) = 0;
|
||||
|
||||
virtual void setBrush( const QBrush& brush ) = 0;
|
||||
virtual void setColor( const QColor& color ) = 0;
|
||||
|
||||
void setBlackAndWhiteLegendIcon( bool blackAndWhite );
|
||||
virtual void setVisibleInLegend( bool isVisibleInLegend ) = 0;
|
||||
|
||||
@@ -164,6 +164,20 @@ void RiuQtChartsPlotCurve::setBrush( const QBrush& brush )
|
||||
areaSeries()->setBrush( brush );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuQtChartsPlotCurve::setColor( const QColor& color )
|
||||
{
|
||||
QPen curvePen = lineSeries()->pen();
|
||||
curvePen.setColor( color );
|
||||
lineSeries()->setPen( curvePen );
|
||||
|
||||
curvePen = areaSeries()->pen();
|
||||
curvePen.setColor( color );
|
||||
areaSeries()->setPen( curvePen );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -49,6 +49,7 @@ public:
|
||||
const QBrush& fillBrush = QBrush( Qt::NoBrush ) ) override;
|
||||
|
||||
void setBrush( const QBrush& brush ) override;
|
||||
void setColor( const QColor& color ) override;
|
||||
|
||||
void setLegendIconSize( const QSize& iconSize ) override;
|
||||
QSize legendIconSize() const override;
|
||||
|
||||
@@ -263,6 +263,16 @@ void RiuQwtPlotCurve::setBrush( const QBrush& brush )
|
||||
QwtPlotCurve::setBrush( brush );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuQwtPlotCurve::setColor( const QColor& color )
|
||||
{
|
||||
QPen curvePen = pen();
|
||||
curvePen.setColor( color );
|
||||
setPen( curvePen );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -45,6 +45,7 @@ public:
|
||||
const QBrush& fillBrush = QBrush( Qt::NoBrush ) ) override;
|
||||
|
||||
void setBrush( const QBrush& brush ) override;
|
||||
void setColor( const QColor& color ) override;
|
||||
|
||||
void setLegendIconSize( const QSize& iconSize ) override;
|
||||
QSize legendIconSize() const override;
|
||||
|
||||
Reference in New Issue
Block a user