mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Rename to plotAxis()
This commit is contained in:
@@ -49,7 +49,7 @@ void RicNewPlotAxisPropertiesFeature::onActionTriggered( bool isChecked )
|
|||||||
if ( !summaryPlot ) return;
|
if ( !summaryPlot ) return;
|
||||||
|
|
||||||
RimPlotAxisProperties* newPlotAxisProperties = summaryPlot->addNewAxisProperties( RiaDefines::PlotAxis::PLOT_AXIS_LEFT, "New Axis" );
|
RimPlotAxisProperties* newPlotAxisProperties = summaryPlot->addNewAxisProperties( RiaDefines::PlotAxis::PLOT_AXIS_LEFT, "New Axis" );
|
||||||
summaryPlot->plotWidget()->ensureAxisIsCreated( newPlotAxisProperties->plotAxisType() );
|
summaryPlot->plotWidget()->ensureAxisIsCreated( newPlotAxisProperties->plotAxis() );
|
||||||
newPlotAxisProperties->setNameForUnusedAxis();
|
newPlotAxisProperties->setNameForUnusedAxis();
|
||||||
|
|
||||||
summaryPlot->updateConnectedEditors();
|
summaryPlot->updateConnectedEditors();
|
||||||
|
@@ -641,8 +641,8 @@ void RimGridCrossPlot::swapAxes()
|
|||||||
|
|
||||||
QString tmpName = xAxisProperties->objectName();
|
QString tmpName = xAxisProperties->objectName();
|
||||||
QString tmpTitle = xAxisProperties->axisTitleText();
|
QString tmpTitle = xAxisProperties->axisTitleText();
|
||||||
RiuPlotAxis tmpAxis = xAxisProperties->plotAxisType();
|
RiuPlotAxis tmpAxis = xAxisProperties->plotAxis();
|
||||||
xAxisProperties->setNameAndAxis( yAxisProperties->objectName(), yAxisProperties->axisTitleText(), yAxisProperties->plotAxisType().axis() );
|
xAxisProperties->setNameAndAxis( yAxisProperties->objectName(), yAxisProperties->axisTitleText(), yAxisProperties->plotAxis().axis() );
|
||||||
yAxisProperties->setNameAndAxis( tmpName, tmpTitle, tmpAxis.axis() );
|
yAxisProperties->setNameAndAxis( tmpName, tmpTitle, tmpAxis.axis() );
|
||||||
|
|
||||||
m_xAxisProperties.removeChild( xAxisProperties );
|
m_xAxisProperties.removeChild( xAxisProperties );
|
||||||
@@ -855,7 +855,7 @@ void RimGridCrossPlot::updateAxisInQwt( RiaDefines::PlotAxis axisType )
|
|||||||
axisParameterString = yAxisParameterString();
|
axisParameterString = yAxisParameterString();
|
||||||
}
|
}
|
||||||
|
|
||||||
RiuPlotAxis axis = axisProperties->plotAxisType();
|
RiuPlotAxis axis = axisProperties->plotAxis();
|
||||||
if ( axisProperties->isActive() )
|
if ( axisProperties->isActive() )
|
||||||
{
|
{
|
||||||
m_plotWidget->enableAxis( axis, true );
|
m_plotWidget->enableAxis( axis, true );
|
||||||
|
@@ -327,7 +327,7 @@ const QString RimPlotAxisProperties::axisTitleText() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RiuPlotAxis RimPlotAxisProperties::plotAxisType() const
|
RiuPlotAxis RimPlotAxisProperties::plotAxis() const
|
||||||
{
|
{
|
||||||
return RiuPlotAxis( m_plotAxis.value(), m_plotAxisIndex );
|
return RiuPlotAxis( m_plotAxis.value(), m_plotAxisIndex );
|
||||||
}
|
}
|
||||||
@@ -712,7 +712,7 @@ void RimPlotAxisProperties::fieldChangedByUi( const caf::PdmFieldHandle* changed
|
|||||||
else if ( changedField == &m_plotAxis )
|
else if ( changedField == &m_plotAxis )
|
||||||
{
|
{
|
||||||
RiuPlotAxis oldPlotAxis = RiuPlotAxis( (RiaDefines::PlotAxis)oldValue.toInt(), m_plotAxisIndex );
|
RiuPlotAxis oldPlotAxis = RiuPlotAxis( (RiaDefines::PlotAxis)oldValue.toInt(), m_plotAxisIndex );
|
||||||
axisPositionChanged.send( this, oldPlotAxis, plotAxisType() );
|
axisPositionChanged.send( this, oldPlotAxis, plotAxis() );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -73,7 +73,7 @@ public:
|
|||||||
const QString objectName() const override;
|
const QString objectName() const override;
|
||||||
const QString axisTitleText() const override;
|
const QString axisTitleText() const override;
|
||||||
|
|
||||||
RiuPlotAxis plotAxisType() const override;
|
RiuPlotAxis plotAxis() const override;
|
||||||
bool useAutoTitle() const;
|
bool useAutoTitle() const;
|
||||||
|
|
||||||
void setShowDescription( bool enable );
|
void setShowDescription( bool enable );
|
||||||
|
@@ -56,7 +56,7 @@ public:
|
|||||||
virtual std::vector<RimPlotAxisAnnotation*> annotations() const = 0;
|
virtual std::vector<RimPlotAxisAnnotation*> annotations() const = 0;
|
||||||
virtual void appendAnnotation( RimPlotAxisAnnotation* annotation ) = 0;
|
virtual void appendAnnotation( RimPlotAxisAnnotation* annotation ) = 0;
|
||||||
virtual void removeAllAnnotations() = 0;
|
virtual void removeAllAnnotations() = 0;
|
||||||
virtual RiuPlotAxis plotAxisType() const = 0;
|
virtual RiuPlotAxis plotAxis() const = 0;
|
||||||
|
|
||||||
virtual double visibleRangeMin() const = 0;
|
virtual double visibleRangeMin() const = 0;
|
||||||
virtual double visibleRangeMax() const = 0;
|
virtual double visibleRangeMax() const = 0;
|
||||||
|
@@ -2211,7 +2211,7 @@ int statisticsCurveSymbolSize( RiuPlotCurveSymbol::PointSymbolEnum symbol )
|
|||||||
RiuPlotAxis RimEnsembleCurveSet::axisY() const
|
RiuPlotAxis RimEnsembleCurveSet::axisY() const
|
||||||
{
|
{
|
||||||
if ( m_plotAxisProperties )
|
if ( m_plotAxisProperties )
|
||||||
return m_plotAxisProperties->plotAxisType();
|
return m_plotAxisProperties->plotAxis();
|
||||||
else
|
else
|
||||||
return RiuPlotAxis::defaultLeft();
|
return RiuPlotAxis::defaultLeft();
|
||||||
}
|
}
|
||||||
|
@@ -441,7 +441,7 @@ void RimSummaryCurve::setLeftOrRightAxisY( RiuPlotAxis plotAxis )
|
|||||||
RiuPlotAxis RimSummaryCurve::axisY() const
|
RiuPlotAxis RimSummaryCurve::axisY() const
|
||||||
{
|
{
|
||||||
if ( m_plotAxisProperties )
|
if ( m_plotAxisProperties )
|
||||||
return m_plotAxisProperties->plotAxisType();
|
return m_plotAxisProperties->plotAxis();
|
||||||
else
|
else
|
||||||
return RiuPlotAxis::defaultLeft();
|
return RiuPlotAxis::defaultLeft();
|
||||||
}
|
}
|
||||||
|
@@ -1084,7 +1084,7 @@ void RimSummaryMultiPlot::computeAggregatedAxisRange()
|
|||||||
{
|
{
|
||||||
for ( auto curve : plot->summaryCurves() )
|
for ( auto curve : plot->summaryCurves() )
|
||||||
{
|
{
|
||||||
if ( curve->axisY() == axis->plotAxisType() )
|
if ( curve->axisY() == axis->plotAxis() )
|
||||||
{
|
{
|
||||||
std::vector<RimSummaryCase*> summaryCases = summaryCasesForCurve( curve, m_axisRangeAggregation() );
|
std::vector<RimSummaryCase*> summaryCases = summaryCasesForCurve( curve, m_axisRangeAggregation() );
|
||||||
std::vector<RifEclipseSummaryAddress> addresses = addressesForCurve( curve, m_axisRangeAggregation() );
|
std::vector<RifEclipseSummaryAddress> addresses = addressesForCurve( curve, m_axisRangeAggregation() );
|
||||||
@@ -1093,14 +1093,14 @@ void RimSummaryMultiPlot::computeAggregatedAxisRange()
|
|||||||
|
|
||||||
auto [minimum, maximum] = findMinMaxForAddressesInSummaryCases( addresses, summaryCases, onlyPositiveValues );
|
auto [minimum, maximum] = findMinMaxForAddressesInSummaryCases( addresses, summaryCases, onlyPositiveValues );
|
||||||
|
|
||||||
if ( axisRanges.count( axis->plotAxisType() ) == 0 )
|
if ( axisRanges.count( axis->plotAxis() ) == 0 )
|
||||||
{
|
{
|
||||||
axisRanges[axis->plotAxisType()] = std::make_pair( minimum, maximum );
|
axisRanges[axis->plotAxis()] = std::make_pair( minimum, maximum );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto& [currentMin, currentMax] = axisRanges[axis->plotAxisType()];
|
auto& [currentMin, currentMax] = axisRanges[axis->plotAxis()];
|
||||||
axisRanges[axis->plotAxisType()] = std::make_pair( std::min( currentMin, minimum ), std::max( currentMax, maximum ) );
|
axisRanges[axis->plotAxis()] = std::make_pair( std::min( currentMin, minimum ), std::max( currentMax, maximum ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1109,7 +1109,7 @@ void RimSummaryMultiPlot::computeAggregatedAxisRange()
|
|||||||
{
|
{
|
||||||
if ( !curveSet->summaryCaseCollection() ) continue;
|
if ( !curveSet->summaryCaseCollection() ) continue;
|
||||||
|
|
||||||
if ( curveSet->axisY() == axis->plotAxisType() )
|
if ( curveSet->axisY() == axis->plotAxis() )
|
||||||
{
|
{
|
||||||
double minimum( std::numeric_limits<double>::infinity() );
|
double minimum( std::numeric_limits<double>::infinity() );
|
||||||
double maximum( -std::numeric_limits<double>::infinity() );
|
double maximum( -std::numeric_limits<double>::infinity() );
|
||||||
@@ -1132,14 +1132,14 @@ void RimSummaryMultiPlot::computeAggregatedAxisRange()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( axisRanges.count( axis->plotAxisType() ) == 0 )
|
if ( axisRanges.count( axis->plotAxis() ) == 0 )
|
||||||
{
|
{
|
||||||
axisRanges[axis->plotAxisType()] = std::make_pair( minimum, maximum );
|
axisRanges[axis->plotAxis()] = std::make_pair( minimum, maximum );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto& [currentMin, currentMax] = axisRanges[axis->plotAxisType()];
|
auto& [currentMin, currentMax] = axisRanges[axis->plotAxis()];
|
||||||
axisRanges[axis->plotAxisType()] = std::make_pair( std::min( currentMin, minimum ), std::max( currentMax, maximum ) );
|
axisRanges[axis->plotAxis()] = std::make_pair( std::min( currentMin, minimum ), std::max( currentMax, maximum ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1148,8 +1148,8 @@ void RimSummaryMultiPlot::computeAggregatedAxisRange()
|
|||||||
// set all plots to use the global min/max values for each category
|
// set all plots to use the global min/max values for each category
|
||||||
for ( auto axis : plot->plotYAxes() )
|
for ( auto axis : plot->plotYAxes() )
|
||||||
{
|
{
|
||||||
auto [minVal, maxVal] = axisRanges[axis->plotAxisType()];
|
auto [minVal, maxVal] = axisRanges[axis->plotAxis()];
|
||||||
if ( RiaDefines::isVertical( axis->plotAxisType().axis() ) && !std::isinf( minVal ) && !std::isinf( maxVal ) )
|
if ( RiaDefines::isVertical( axis->plotAxis().axis() ) && !std::isinf( minVal ) && !std::isinf( maxVal ) )
|
||||||
{
|
{
|
||||||
axis->setAutoZoom( false );
|
axis->setAutoZoom( false );
|
||||||
|
|
||||||
|
@@ -643,7 +643,7 @@ void RimSummaryPlot::copyAxisPropertiesFromOther( const RimSummaryPlot& sourceSu
|
|||||||
{
|
{
|
||||||
QString data = ap->writeObjectToXmlString();
|
QString data = ap->writeObjectToXmlString();
|
||||||
|
|
||||||
auto axisProperty = axisPropertiesForPlotAxis( ap->plotAxisType() );
|
auto axisProperty = axisPropertiesForPlotAxis( ap->plotAxis() );
|
||||||
if ( axisProperty )
|
if ( axisProperty )
|
||||||
{
|
{
|
||||||
axisProperty->readObjectFromXmlString( data, caf::PdmDefaultObjectFactory::instance() );
|
axisProperty->readObjectFromXmlString( data, caf::PdmDefaultObjectFactory::instance() );
|
||||||
@@ -658,11 +658,11 @@ void RimSummaryPlot::copyAxisPropertiesFromOther( RiaDefines::PlotAxis plotAxisT
|
|||||||
{
|
{
|
||||||
for ( auto ap : sourceSummaryPlot.plotAxes() )
|
for ( auto ap : sourceSummaryPlot.plotAxes() )
|
||||||
{
|
{
|
||||||
if ( ap->plotAxisType().axis() != plotAxisType ) continue;
|
if ( ap->plotAxis().axis() != plotAxisType ) continue;
|
||||||
|
|
||||||
QString data = ap->writeObjectToXmlString();
|
QString data = ap->writeObjectToXmlString();
|
||||||
|
|
||||||
axisPropertiesForPlotAxis( ap->plotAxisType() )->readObjectFromXmlString( data, caf::PdmDefaultObjectFactory::instance() );
|
axisPropertiesForPlotAxis( ap->plotAxis() )->readObjectFromXmlString( data, caf::PdmDefaultObjectFactory::instance() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -908,7 +908,7 @@ void RimSummaryPlot::updateNumericalAxis( RiaDefines::PlotAxis plotAxis )
|
|||||||
|
|
||||||
for ( RimPlotAxisPropertiesInterface* axisProperties : m_axisPropertiesArray )
|
for ( RimPlotAxisPropertiesInterface* axisProperties : m_axisPropertiesArray )
|
||||||
{
|
{
|
||||||
RiuPlotAxis riuPlotAxis = axisProperties->plotAxisType();
|
RiuPlotAxis riuPlotAxis = axisProperties->plotAxis();
|
||||||
if ( riuPlotAxis.axis() == plotAxis )
|
if ( riuPlotAxis.axis() == plotAxis )
|
||||||
{
|
{
|
||||||
auto* axisProps = dynamic_cast<RimPlotAxisProperties*>( axisProperties );
|
auto* axisProps = dynamic_cast<RimPlotAxisProperties*>( axisProperties );
|
||||||
@@ -1054,7 +1054,7 @@ void RimSummaryPlot::updateZoomForNumericalAxis( RimPlotAxisProperties* axisProp
|
|||||||
{
|
{
|
||||||
if ( !axisProperties ) return;
|
if ( !axisProperties ) return;
|
||||||
|
|
||||||
const auto plotAxis = axisProperties->plotAxisType();
|
const auto plotAxis = axisProperties->plotAxis();
|
||||||
if ( axisProperties->isAutoZoom() )
|
if ( axisProperties->isAutoZoom() )
|
||||||
{
|
{
|
||||||
if ( axisProperties->isLogarithmicScaleEnabled() )
|
if ( axisProperties->isLogarithmicScaleEnabled() )
|
||||||
@@ -1086,16 +1086,16 @@ void RimSummaryPlot::updateZoomForNumericalAxis( RimPlotAxisProperties* axisProp
|
|||||||
std::swap( min, max );
|
std::swap( min, max );
|
||||||
}
|
}
|
||||||
|
|
||||||
plotWidget()->setAxisScale( axisProperties->plotAxisType(), min, max );
|
plotWidget()->setAxisScale( axisProperties->plotAxis(), min, max );
|
||||||
}
|
}
|
||||||
else if ( ( plotAxis.axis() == RiaDefines::PlotAxis::PLOT_AXIS_LEFT || plotAxis.axis() == RiaDefines::PlotAxis::PLOT_AXIS_RIGHT ) &&
|
else if ( ( plotAxis.axis() == RiaDefines::PlotAxis::PLOT_AXIS_LEFT || plotAxis.axis() == RiaDefines::PlotAxis::PLOT_AXIS_RIGHT ) &&
|
||||||
isOnlyWaterCutCurvesVisible( plotAxis ) )
|
isOnlyWaterCutCurvesVisible( plotAxis ) )
|
||||||
{
|
{
|
||||||
plotWidget()->setAxisScale( axisProperties->plotAxisType(), 0.0, 1.0 );
|
plotWidget()->setAxisScale( axisProperties->plotAxis(), 0.0, 1.0 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
plotWidget()->setAxisAutoScale( axisProperties->plotAxisType(), true );
|
plotWidget()->setAxisAutoScale( axisProperties->plotAxis(), true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1103,10 +1103,10 @@ void RimSummaryPlot::updateZoomForNumericalAxis( RimPlotAxisProperties* axisProp
|
|||||||
double min = axisProperties->visibleRangeMin();
|
double min = axisProperties->visibleRangeMin();
|
||||||
double max = axisProperties->visibleRangeMax();
|
double max = axisProperties->visibleRangeMax();
|
||||||
if ( axisProperties->isAxisInverted() ) std::swap( min, max );
|
if ( axisProperties->isAxisInverted() ) std::swap( min, max );
|
||||||
plotWidget()->setAxisScale( axisProperties->plotAxisType(), min, max );
|
plotWidget()->setAxisScale( axisProperties->plotAxis(), min, max );
|
||||||
}
|
}
|
||||||
|
|
||||||
plotWidget()->setAxisInverted( axisProperties->plotAxisType(), axisProperties->isAxisInverted() );
|
plotWidget()->setAxisInverted( axisProperties->plotAxis(), axisProperties->isAxisInverted() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -1118,13 +1118,13 @@ void RimSummaryPlot::updateZoomForTimeAxis( RimSummaryTimeAxisProperties* timeAx
|
|||||||
|
|
||||||
if ( timeAxisProperties->isAutoZoom() )
|
if ( timeAxisProperties->isAutoZoom() )
|
||||||
{
|
{
|
||||||
plotWidget()->setAxisAutoScale( timeAxisProperties->plotAxisType(), true );
|
plotWidget()->setAxisAutoScale( timeAxisProperties->plotAxis(), true );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
double min = timeAxisProperties->visibleRangeMin();
|
double min = timeAxisProperties->visibleRangeMin();
|
||||||
double max = timeAxisProperties->visibleRangeMax();
|
double max = timeAxisProperties->visibleRangeMax();
|
||||||
plotWidget()->setAxisScale( timeAxisProperties->plotAxisType(), min, max );
|
plotWidget()->setAxisScale( timeAxisProperties->plotAxis(), min, max );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1284,7 +1284,7 @@ RimPlotAxisPropertiesInterface* RimSummaryPlot::axisPropertiesForPlotAxis( RiuPl
|
|||||||
{
|
{
|
||||||
for ( RimPlotAxisPropertiesInterface* axisProperties : m_axisPropertiesArray )
|
for ( RimPlotAxisPropertiesInterface* axisProperties : m_axisPropertiesArray )
|
||||||
{
|
{
|
||||||
if ( axisProperties->plotAxisType() == plotAxis ) return axisProperties;
|
if ( axisProperties->plotAxis() == plotAxis ) return axisProperties;
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@@ -1708,10 +1708,10 @@ bool RimSummaryPlot::updateStackedCurveDataForRelevantAxes()
|
|||||||
bool anyStackedCurvesPresent = false;
|
bool anyStackedCurvesPresent = false;
|
||||||
for ( RimPlotAxisPropertiesInterface* axisProperties : m_axisPropertiesArray )
|
for ( RimPlotAxisPropertiesInterface* axisProperties : m_axisPropertiesArray )
|
||||||
{
|
{
|
||||||
if ( axisProperties->plotAxisType().axis() == RiaDefines::PlotAxis::PLOT_AXIS_LEFT ||
|
if ( axisProperties->plotAxis().axis() == RiaDefines::PlotAxis::PLOT_AXIS_LEFT ||
|
||||||
axisProperties->plotAxisType().axis() == RiaDefines::PlotAxis::PLOT_AXIS_RIGHT )
|
axisProperties->plotAxis().axis() == RiaDefines::PlotAxis::PLOT_AXIS_RIGHT )
|
||||||
{
|
{
|
||||||
anyStackedCurvesPresent |= updateStackedCurveDataForAxis( axisProperties->plotAxisType() );
|
anyStackedCurvesPresent |= updateStackedCurveDataForAxis( axisProperties->plotAxis() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1913,7 +1913,7 @@ void RimSummaryPlot::updateZoomFromParentPlot()
|
|||||||
{
|
{
|
||||||
if ( !axisProperties ) continue;
|
if ( !axisProperties ) continue;
|
||||||
|
|
||||||
auto [axisMin, axisMax] = plotWidget()->axisRange( axisProperties->plotAxisType() );
|
auto [axisMin, axisMax] = plotWidget()->axisRange( axisProperties->plotAxis() );
|
||||||
if ( axisProperties->isAxisInverted() ) std::swap( axisMin, axisMax );
|
if ( axisProperties->isAxisInverted() ) std::swap( axisMin, axisMax );
|
||||||
|
|
||||||
if ( auto propertyAxis = dynamic_cast<RimPlotAxisProperties*>( axisProperties ) )
|
if ( auto propertyAxis = dynamic_cast<RimPlotAxisProperties*>( axisProperties ) )
|
||||||
@@ -2672,7 +2672,7 @@ RiuPlotWidget* RimSummaryPlot::doCreatePlotViewWidget( QWidget* mainWindowParent
|
|||||||
|
|
||||||
for ( const auto& axisProperties : m_axisPropertiesArray )
|
for ( const auto& axisProperties : m_axisPropertiesArray )
|
||||||
{
|
{
|
||||||
plotWidget()->ensureAxisIsCreated( axisProperties->plotAxisType() );
|
plotWidget()->ensureAxisIsCreated( axisProperties->plotAxis() );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( RimGridTimeHistoryCurve* curve : m_gridTimeHistoryCurves )
|
for ( RimGridTimeHistoryCurve* curve : m_gridTimeHistoryCurves )
|
||||||
@@ -2980,8 +2980,8 @@ void RimSummaryPlot::setAutoScaleXEnabled( bool enabled )
|
|||||||
{
|
{
|
||||||
for ( const auto& ap : m_axisPropertiesArray )
|
for ( const auto& ap : m_axisPropertiesArray )
|
||||||
{
|
{
|
||||||
if ( ap->plotAxisType().axis() == RiaDefines::PlotAxis::PLOT_AXIS_TOP ||
|
if ( ap->plotAxis().axis() == RiaDefines::PlotAxis::PLOT_AXIS_TOP ||
|
||||||
ap->plotAxisType().axis() == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM )
|
ap->plotAxis().axis() == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM )
|
||||||
{
|
{
|
||||||
ap->setAutoZoom( enabled );
|
ap->setAutoZoom( enabled );
|
||||||
}
|
}
|
||||||
@@ -2995,8 +2995,8 @@ void RimSummaryPlot::setAutoScaleYEnabled( bool enabled )
|
|||||||
{
|
{
|
||||||
for ( const auto& ap : m_axisPropertiesArray )
|
for ( const auto& ap : m_axisPropertiesArray )
|
||||||
{
|
{
|
||||||
if ( ap->plotAxisType().axis() == RiaDefines::PlotAxis::PLOT_AXIS_LEFT ||
|
if ( ap->plotAxis().axis() == RiaDefines::PlotAxis::PLOT_AXIS_LEFT ||
|
||||||
ap->plotAxisType().axis() == RiaDefines::PlotAxis::PLOT_AXIS_RIGHT )
|
ap->plotAxis().axis() == RiaDefines::PlotAxis::PLOT_AXIS_RIGHT )
|
||||||
{
|
{
|
||||||
ap->setAutoZoom( enabled );
|
ap->setAutoZoom( enabled );
|
||||||
}
|
}
|
||||||
@@ -3115,8 +3115,8 @@ void RimSummaryPlot::assignPlotAxis( RimSummaryCurve* destinationCurve )
|
|||||||
{
|
{
|
||||||
for ( RimPlotAxisPropertiesInterface* axisProperties : m_axisPropertiesArray )
|
for ( RimPlotAxisPropertiesInterface* axisProperties : m_axisPropertiesArray )
|
||||||
{
|
{
|
||||||
if ( axisProperties->plotAxisType().axis() == RiaDefines::PlotAxis::PLOT_AXIS_LEFT ||
|
if ( axisProperties->plotAxis().axis() == RiaDefines::PlotAxis::PLOT_AXIS_LEFT ||
|
||||||
axisProperties->plotAxisType().axis() == RiaDefines::PlotAxis::PLOT_AXIS_RIGHT )
|
axisProperties->plotAxis().axis() == RiaDefines::PlotAxis::PLOT_AXIS_RIGHT )
|
||||||
{
|
{
|
||||||
destinationCurve->setLeftOrRightAxisY( c->axisY() );
|
destinationCurve->setLeftOrRightAxisY( c->axisY() );
|
||||||
|
|
||||||
@@ -3149,9 +3149,9 @@ void RimSummaryPlot::assignPlotAxis( RimSummaryCurve* destinationCurve )
|
|||||||
size_t axisCountRight = 0;
|
size_t axisCountRight = 0;
|
||||||
for ( const auto& ap : m_axisPropertiesArray )
|
for ( const auto& ap : m_axisPropertiesArray )
|
||||||
{
|
{
|
||||||
if ( ap->plotAxisType().axis() == RiaDefines::PlotAxis::PLOT_AXIS_LEFT )
|
if ( ap->plotAxis().axis() == RiaDefines::PlotAxis::PLOT_AXIS_LEFT )
|
||||||
axisCountLeft++;
|
axisCountLeft++;
|
||||||
else if ( ap->plotAxisType().axis() == RiaDefines::PlotAxis::PLOT_AXIS_RIGHT )
|
else if ( ap->plotAxis().axis() == RiaDefines::PlotAxis::PLOT_AXIS_RIGHT )
|
||||||
axisCountRight++;
|
axisCountRight++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3206,7 +3206,7 @@ void RimSummaryPlot::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
|||||||
std::set<RiuPlotAxis> usedPlotAxis;
|
std::set<RiuPlotAxis> usedPlotAxis;
|
||||||
for ( const auto& axisProperties : m_axisPropertiesArray )
|
for ( const auto& axisProperties : m_axisPropertiesArray )
|
||||||
{
|
{
|
||||||
usedPlotAxis.insert( axisProperties->plotAxisType() );
|
usedPlotAxis.insert( axisProperties->plotAxis() );
|
||||||
}
|
}
|
||||||
|
|
||||||
plotWidget()->pruneAxes( usedPlotAxis );
|
plotWidget()->pruneAxes( usedPlotAxis );
|
||||||
|
@@ -119,7 +119,7 @@ void RimSummaryPlotAxisFormatter::applyAxisPropertiesToPlot( RiuPlotWidget* plot
|
|||||||
{
|
{
|
||||||
if ( !plotWidget ) return;
|
if ( !plotWidget ) return;
|
||||||
|
|
||||||
RiuPlotAxis axis = m_axisProperties->plotAxisType();
|
RiuPlotAxis axis = m_axisProperties->plotAxis();
|
||||||
{
|
{
|
||||||
QString axisTitle = m_axisProperties->customTitle();
|
QString axisTitle = m_axisProperties->customTitle();
|
||||||
if ( m_axisProperties->useAutoTitle() ) axisTitle = autoAxisTitle();
|
if ( m_axisProperties->useAutoTitle() ) axisTitle = autoAxisTitle();
|
||||||
@@ -254,12 +254,12 @@ QString RimSummaryPlotAxisFormatter::autoAxisTitle() const
|
|||||||
RifEclipseSummaryAddress sumAddress;
|
RifEclipseSummaryAddress sumAddress;
|
||||||
std::string unitText;
|
std::string unitText;
|
||||||
|
|
||||||
if ( m_axisProperties->plotAxisType().axis() == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM )
|
if ( m_axisProperties->plotAxis().axis() == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM )
|
||||||
{
|
{
|
||||||
sumAddress = rimCurve->summaryAddressX();
|
sumAddress = rimCurve->summaryAddressX();
|
||||||
unitText = rimCurve->unitNameX();
|
unitText = rimCurve->unitNameX();
|
||||||
}
|
}
|
||||||
else if ( rimCurve->axisY() == m_axisProperties->plotAxisType() )
|
else if ( rimCurve->axisY() == m_axisProperties->plotAxis() )
|
||||||
{
|
{
|
||||||
sumAddress = rimCurve->summaryAddressY();
|
sumAddress = rimCurve->summaryAddressY();
|
||||||
unitText = rimCurve->unitNameY();
|
unitText = rimCurve->unitNameY();
|
||||||
@@ -370,11 +370,11 @@ QString RimSummaryPlotAxisFormatter::createAxisObjectName() const
|
|||||||
{
|
{
|
||||||
RifEclipseSummaryAddress sumAddress;
|
RifEclipseSummaryAddress sumAddress;
|
||||||
|
|
||||||
if ( m_axisProperties->plotAxisType().axis() == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM )
|
if ( m_axisProperties->plotAxis().axis() == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM )
|
||||||
{
|
{
|
||||||
sumAddress = rimCurve->summaryAddressX();
|
sumAddress = rimCurve->summaryAddressX();
|
||||||
}
|
}
|
||||||
else if ( rimCurve->axisY() == m_axisProperties->plotAxisType() )
|
else if ( rimCurve->axisY() == m_axisProperties->plotAxis() )
|
||||||
{
|
{
|
||||||
sumAddress = rimCurve->summaryAddressY();
|
sumAddress = rimCurve->summaryAddressY();
|
||||||
}
|
}
|
||||||
|
@@ -164,7 +164,7 @@ RimPlotAxisPropertiesInterface::AxisTitlePositionType RimSummaryTimeAxisProperti
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RiuPlotAxis RimSummaryTimeAxisProperties::plotAxisType() const
|
RiuPlotAxis RimSummaryTimeAxisProperties::plotAxis() const
|
||||||
{
|
{
|
||||||
return RiuPlotAxis::defaultBottom();
|
return RiuPlotAxis::defaultBottom();
|
||||||
}
|
}
|
||||||
|
@@ -85,7 +85,7 @@ public:
|
|||||||
caf::PdmField<QString> title;
|
caf::PdmField<QString> title;
|
||||||
caf::PdmField<bool> showTitle;
|
caf::PdmField<bool> showTitle;
|
||||||
|
|
||||||
RiuPlotAxis plotAxisType() const override;
|
RiuPlotAxis plotAxis() const override;
|
||||||
AxisTitlePositionType titlePosition() const override;
|
AxisTitlePositionType titlePosition() const override;
|
||||||
int titleFontSize() const override;
|
int titleFontSize() const override;
|
||||||
int valuesFontSize() const override;
|
int valuesFontSize() const override;
|
||||||
|
@@ -143,7 +143,7 @@ void RiuSummaryQwtPlot::useTimeBasedTimeAxis()
|
|||||||
void RiuSummaryQwtPlot::updateAnnotationObjects( RimPlotAxisPropertiesInterface* axisProperties )
|
void RiuSummaryQwtPlot::updateAnnotationObjects( RimPlotAxisPropertiesInterface* axisProperties )
|
||||||
{
|
{
|
||||||
RiaDefines::Orientation orientation = RiaDefines::Orientation::HORIZONTAL;
|
RiaDefines::Orientation orientation = RiaDefines::Orientation::HORIZONTAL;
|
||||||
if ( axisProperties->plotAxisType().axis() == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM )
|
if ( axisProperties->plotAxis().axis() == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM )
|
||||||
{
|
{
|
||||||
orientation = RiaDefines::Orientation::VERTICAL;
|
orientation = RiaDefines::Orientation::VERTICAL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user