Well Allocation over time adjustements (#9738)

- Add font size settings
- Move legend to right side of plot
- Set default selected time steps to time step count = 10
- When excluding time steps, duplicates rates from next valid time step onto excluded time steps
- Allow time step selection "Show all time steps" or "Time step count" for subset of time steps
- Allow excluding on the active set, i.e. all or subset, of time steps
This commit is contained in:
Jørgen Herje
2023-01-26 10:56:42 +01:00
committed by GitHub
parent 1f901a5ea5
commit 8aff5b4694
5 changed files with 294 additions and 43 deletions

View File

@@ -290,10 +290,24 @@ void RiuQwtPlotWidget::setInternalLegendVisible( bool visible )
//--------------------------------------------------------------------------------------------------
void RiuQwtPlotWidget::insertLegend( RiuPlotWidget::Legend legendPosition )
{
CAF_ASSERT( legendPosition == RiuPlotWidget::Legend::BOTTOM );
CAF_ASSERT( legendPosition == RiuPlotWidget::Legend::BOTTOM || legendPosition == RiuPlotWidget::Legend::TOP ||
legendPosition == RiuPlotWidget::Legend::LEFT || legendPosition == RiuPlotWidget::Legend::RIGHT );
QwtPlot::LegendPosition pos = QwtPlot::LegendPosition::BottomLegend;
if ( legendPosition == RiuPlotWidget::Legend::TOP )
{
pos = QwtPlot::LegendPosition::TopLegend;
}
else if ( legendPosition == RiuPlotWidget::Legend::LEFT )
{
pos = QwtPlot::LegendPosition::LeftLegend;
}
else if ( legendPosition == RiuPlotWidget::Legend::RIGHT )
{
pos = QwtPlot::LegendPosition::RightLegend;
}
auto* legend = new QwtLegend( this );
m_plot->insertLegend( legend, QwtPlot::BottomLegend );
m_plot->insertLegend( legend, pos );
}
//--------------------------------------------------------------------------------------------------
@@ -581,7 +595,11 @@ bool RiuQwtPlotWidget::eventFilter( QObject* watched, QEvent* event )
auto* scaleWidget = qobject_cast<QwtScaleWidget*>( childClicked );
if ( scaleWidget )
{
onAxisSelected( scaleWidget, toggleItemInSelection );
if ( m_plotDefinition && m_plotDefinition->isCurveHighlightSupported() )
{
onAxisSelected( scaleWidget, toggleItemInSelection );
}
m_clickPosition = QPoint();
return true;
}