mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
clang-format: Set column width to 140
* Set column width to 140 * Use c++20 * Remove redundant virtual
This commit is contained in:
@@ -161,7 +161,7 @@ void RimPlotCellPropertyFilter::updateCellVisibilityFromFilter( size_t timeStepI
|
||||
|
||||
if ( !resDef->currentGridCellResults()->hasResultEntry( rigEclipseAddress ) ) return;
|
||||
|
||||
size_t clampedIndex = std::min( timeStepIndex, cellResultsData->timeStepCount( rigEclipseAddress ) - 1 );
|
||||
size_t clampedIndex = std::min( timeStepIndex, cellResultsData->timeStepCount( rigEclipseAddress ) - 1 );
|
||||
const std::vector<double>& cellResultValues = cellResultsData->cellScalarResults( rigEclipseAddress, clampedIndex );
|
||||
if ( cellResultValues.empty() ) return;
|
||||
|
||||
@@ -170,9 +170,8 @@ void RimPlotCellPropertyFilter::updateCellVisibilityFromFilter( size_t timeStepI
|
||||
|
||||
if ( visibleCells->size() < totalReservoirCellCount )
|
||||
{
|
||||
QString message = QString( "Size of visible Cells (%1) is less than total cell count (%2)" )
|
||||
.arg( visibleCells->size() )
|
||||
.arg( totalReservoirCellCount );
|
||||
QString message =
|
||||
QString( "Size of visible Cells (%1) is less than total cell count (%2)" ).arg( visibleCells->size() ).arg( totalReservoirCellCount );
|
||||
|
||||
RiaLogging::error( message );
|
||||
|
||||
@@ -224,9 +223,7 @@ void RimPlotCellPropertyFilter::updateCellVisibilityFromFilter( size_t timeStepI
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCellPropertyFilter::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
void RimPlotCellPropertyFilter::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
if ( field == &m_lowerBound || field == &m_upperBound )
|
||||
{
|
||||
|
||||
@@ -47,9 +47,7 @@ public:
|
||||
|
||||
protected:
|
||||
void updateCellVisibilityFromFilter( size_t timeStepIndex, cvf::UByteArray* visibleCells ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
|
||||
private:
|
||||
RimEclipseResultDefinition* eclipseResultDefinition();
|
||||
|
||||
@@ -295,8 +295,7 @@ void RimGridCrossPlot::updateInfoBox()
|
||||
{
|
||||
if ( !m_infoBox )
|
||||
{
|
||||
m_infoBox =
|
||||
new RiuDraggableOverlayFrame( m_plotWidget->getParentForOverlay(), m_plotWidget->overlayMargins() );
|
||||
m_infoBox = new RiuDraggableOverlayFrame( m_plotWidget->getParentForOverlay(), m_plotWidget->overlayMargins() );
|
||||
m_infoBox->setAnchorCorner( RiuDraggableOverlayFrame::AnchorCorner::TopRight );
|
||||
RiuTextOverlayContentFrame* textFrame = new RiuTextOverlayContentFrame( m_infoBox );
|
||||
m_infoBox->setContentFrame( textFrame );
|
||||
@@ -549,9 +548,7 @@ void RimGridCrossPlot::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrder
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridCrossPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RimGridCrossPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
RimPlot::fieldChangedByUi( changedField, oldValue, newValue );
|
||||
if ( changedField == &m_colSpan || changedField == &m_rowSpan )
|
||||
@@ -643,9 +640,7 @@ void RimGridCrossPlot::swapAxes()
|
||||
QString tmpName = xAxisProperties->objectName();
|
||||
QString tmpTitle = xAxisProperties->axisTitleText();
|
||||
RiuPlotAxis tmpAxis = xAxisProperties->plotAxisType();
|
||||
xAxisProperties->setNameAndAxis( yAxisProperties->objectName(),
|
||||
yAxisProperties->axisTitleText(),
|
||||
yAxisProperties->plotAxisType().axis() );
|
||||
xAxisProperties->setNameAndAxis( yAxisProperties->objectName(), yAxisProperties->axisTitleText(), yAxisProperties->plotAxisType().axis() );
|
||||
yAxisProperties->setNameAndAxis( tmpName, tmpTitle, tmpAxis.axis() );
|
||||
|
||||
m_xAxisProperties.removeChild( xAxisProperties );
|
||||
|
||||
@@ -576,10 +576,9 @@ void RimGridCrossPlotDataSet::assignCurveDataGroups( const RigEclipseCrossPlotRe
|
||||
{
|
||||
for ( size_t i = 0; i < result.xValues.size(); ++i )
|
||||
{
|
||||
auto upperBoundIt =
|
||||
std::lower_bound( tickValues.begin(), tickValues.end(), result.groupValuesContinuous[i] );
|
||||
int upperBoundIndex = static_cast<int>( upperBoundIt - tickValues.begin() );
|
||||
int categoryNum = std::min( (int)tickValues.size() - 2, std::max( 0, upperBoundIndex - 1 ) );
|
||||
auto upperBoundIt = std::lower_bound( tickValues.begin(), tickValues.end(), result.groupValuesContinuous[i] );
|
||||
int upperBoundIndex = static_cast<int>( upperBoundIt - tickValues.begin() );
|
||||
int categoryNum = std::min( (int)tickValues.size() - 2, std::max( 0, upperBoundIndex - 1 ) );
|
||||
m_groupedResults[categoryNum].xValues.push_back( result.xValues[i] );
|
||||
m_groupedResults[categoryNum].yValues.push_back( result.yValues[i] );
|
||||
if ( !result.groupValuesContinuous.empty() )
|
||||
@@ -830,11 +829,9 @@ void RimGridCrossPlotDataSet::defineUiOrdering( QString uiConfigName, caf::PdmUi
|
||||
uiOrdering.add( &m_cellFilterView );
|
||||
uiOrdering.add( &m_grouping );
|
||||
|
||||
CVF_ASSERT( m_xAxisProperty && m_yAxisProperty && m_groupingProperty &&
|
||||
"All property objects should always be created" );
|
||||
CVF_ASSERT( m_xAxisProperty && m_yAxisProperty && m_groupingProperty && "All property objects should always be created" );
|
||||
|
||||
if ( m_grouping() == GROUP_BY_TIME &&
|
||||
!( m_xAxisProperty->hasDynamicResult() || m_yAxisProperty->hasDynamicResult() ) )
|
||||
if ( m_grouping() == GROUP_BY_TIME && !( m_xAxisProperty->hasDynamicResult() || m_yAxisProperty->hasDynamicResult() ) )
|
||||
{
|
||||
m_grouping = NO_GROUPING;
|
||||
}
|
||||
@@ -864,9 +861,7 @@ void RimGridCrossPlotDataSet::defineUiOrdering( QString uiConfigName, caf::PdmUi
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridCrossPlotDataSet::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RimGridCrossPlotDataSet::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
if ( changedField == &m_case )
|
||||
{
|
||||
@@ -904,20 +899,17 @@ void RimGridCrossPlotDataSet::fieldChangedByUi( const caf::PdmFieldHandle* chang
|
||||
{
|
||||
if ( m_grouping == GROUP_BY_TIME )
|
||||
{
|
||||
legendConfig()->setColorLegend(
|
||||
RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::NORMAL ) );
|
||||
legendConfig()->setColorLegend( RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::NORMAL ) );
|
||||
legendConfig()->setMappingMode( RimRegularLegendConfig::MappingType::CATEGORY_INTEGER );
|
||||
}
|
||||
else if ( groupingByCategoryResult() )
|
||||
{
|
||||
legendConfig()->setColorLegend(
|
||||
RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::CATEGORY ) );
|
||||
legendConfig()->setColorLegend( RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::CATEGORY ) );
|
||||
legendConfig()->setMappingMode( RimRegularLegendConfig::MappingType::CATEGORY_INTEGER );
|
||||
}
|
||||
else
|
||||
{
|
||||
legendConfig()->setColorLegend(
|
||||
RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::NORMAL ) );
|
||||
legendConfig()->setColorLegend( RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::NORMAL ) );
|
||||
legendConfig()->setMappingMode( RimRegularLegendConfig::MappingType::LINEAR_DISCRETE );
|
||||
}
|
||||
|
||||
@@ -994,10 +986,7 @@ QList<caf::PdmOptionItemInfo> RimGridCrossPlotDataSet::calculateValueOptions( co
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_grouping )
|
||||
{
|
||||
std::set<RigGridCrossPlotCurveGrouping> validOptions = { NO_GROUPING,
|
||||
GROUP_BY_TIME,
|
||||
GROUP_BY_FORMATION,
|
||||
GROUP_BY_RESULT };
|
||||
std::set<RigGridCrossPlotCurveGrouping> validOptions = { NO_GROUPING, GROUP_BY_TIME, GROUP_BY_FORMATION, GROUP_BY_RESULT };
|
||||
if ( !hasMultipleTimeSteps() )
|
||||
{
|
||||
validOptions.erase( GROUP_BY_TIME );
|
||||
@@ -1069,8 +1058,8 @@ void RimGridCrossPlotDataSet::updateLegendRange()
|
||||
}
|
||||
if ( !m_legendOverlayFrame )
|
||||
{
|
||||
m_legendOverlayFrame = new RiuDraggableOverlayFrame( parent->plotWidget()->getParentForOverlay(),
|
||||
parent->plotWidget()->overlayMargins() );
|
||||
m_legendOverlayFrame =
|
||||
new RiuDraggableOverlayFrame( parent->plotWidget()->getParentForOverlay(), parent->plotWidget()->overlayMargins() );
|
||||
}
|
||||
m_legendOverlayFrame->setContentFrame( legendConfig()->makeLegendFrame() );
|
||||
parent->plotWidget()->addOverlayFrame( m_legendOverlayFrame );
|
||||
@@ -1363,9 +1352,7 @@ void RimGridCrossPlotDataSet::setDefaults()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridCrossPlotDataSet::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
void RimGridCrossPlotDataSet::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -133,9 +133,7 @@ public:
|
||||
bool isXAxisLogarithmic() const;
|
||||
bool isYAxisLogarithmic() const;
|
||||
|
||||
void configureForPressureSaturationCurves( RimEclipseResultCase* eclipseResultCase,
|
||||
const QString& dynamicResultName,
|
||||
int timeStep );
|
||||
void configureForPressureSaturationCurves( RimEclipseResultCase* eclipseResultCase, const QString& dynamicResultName, int timeStep );
|
||||
void addCellFilter( RimPlotCellFilter* cellFilter );
|
||||
void setCustomColor( const cvf::Color3f color );
|
||||
void destroyCurves();
|
||||
@@ -163,9 +161,7 @@ protected:
|
||||
void updateDataSetName();
|
||||
void performAutoNameUpdate() override;
|
||||
void setDefaults();
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
|
||||
|
||||
@@ -82,8 +82,7 @@ void RimSaturationPressurePlot::assignCaseAndEquilibriumRegion( RiaDefines::Poro
|
||||
cvf::Color3f curveColor = RiaColorTables::summaryCurveBluePaletteColors().cycledColor3f( 0 );
|
||||
curveSet->setCustomColor( curveColor );
|
||||
|
||||
RimPlotCellPropertyFilter* cellFilter =
|
||||
createEquilibriumRegionPropertyFilter( eclipseResultCase, zeroBasedEquilRegionIndex );
|
||||
RimPlotCellPropertyFilter* cellFilter = createEquilibriumRegionPropertyFilter( eclipseResultCase, zeroBasedEquilRegionIndex );
|
||||
|
||||
curveSet->addCellFilter( cellFilter );
|
||||
}
|
||||
@@ -97,8 +96,7 @@ void RimSaturationPressurePlot::assignCaseAndEquilibriumRegion( RiaDefines::Poro
|
||||
cvf::Color3f curveColor = RiaColorTables::summaryCurveRedPaletteColors().cycledColor3f( 0 );
|
||||
curveSet->setCustomColor( curveColor );
|
||||
|
||||
RimPlotCellPropertyFilter* cellFilter =
|
||||
createEquilibriumRegionPropertyFilter( eclipseResultCase, zeroBasedEquilRegionIndex );
|
||||
RimPlotCellPropertyFilter* cellFilter = createEquilibriumRegionPropertyFilter( eclipseResultCase, zeroBasedEquilRegionIndex );
|
||||
curveSet->addCellFilter( cellFilter );
|
||||
|
||||
{
|
||||
@@ -113,8 +111,7 @@ void RimSaturationPressurePlot::assignCaseAndEquilibriumRegion( RiaDefines::Poro
|
||||
|
||||
maxDepth = gasOilContactDepth;
|
||||
|
||||
RimPlotCellPropertyFilter* depthCellFilter =
|
||||
createDepthPropertyFilter( eclipseResultCase, minDepth, maxDepth );
|
||||
RimPlotCellPropertyFilter* depthCellFilter = createDepthPropertyFilter( eclipseResultCase, minDepth, maxDepth );
|
||||
|
||||
curveSet->addCellFilter( depthCellFilter );
|
||||
}
|
||||
@@ -160,8 +157,7 @@ void RimSaturationPressurePlot::assignCaseAndEquilibriumRegion( RiaDefines::Poro
|
||||
minDepth = gasOilContactDepth;
|
||||
maxDepth = waterOilContactDepth;
|
||||
|
||||
RimPlotCellPropertyFilter* depthCellFilter =
|
||||
createDepthPropertyFilter( eclipseResultCase, minDepth, maxDepth );
|
||||
RimPlotCellPropertyFilter* depthCellFilter = createDepthPropertyFilter( eclipseResultCase, minDepth, maxDepth );
|
||||
|
||||
curveSet->addCellFilter( depthCellFilter );
|
||||
}
|
||||
@@ -235,9 +231,8 @@ QString RimSaturationPressurePlot::xAxisParameterString() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPlotCellPropertyFilter*
|
||||
RimSaturationPressurePlot::createEquilibriumRegionPropertyFilter( RimEclipseResultCase* eclipseResultCase,
|
||||
int zeroBasedEquilRegionIndex )
|
||||
RimPlotCellPropertyFilter* RimSaturationPressurePlot::createEquilibriumRegionPropertyFilter( RimEclipseResultCase* eclipseResultCase,
|
||||
int zeroBasedEquilRegionIndex )
|
||||
{
|
||||
RimPlotCellPropertyFilter* cellFilter = new RimPlotCellPropertyFilter();
|
||||
|
||||
@@ -256,9 +251,8 @@ RimPlotCellPropertyFilter*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPlotCellPropertyFilter* RimSaturationPressurePlot::createDepthPropertyFilter( RimEclipseResultCase* eclipseResultCase,
|
||||
double minDepth,
|
||||
double maxDepth )
|
||||
RimPlotCellPropertyFilter*
|
||||
RimSaturationPressurePlot::createDepthPropertyFilter( RimEclipseResultCase* eclipseResultCase, double minDepth, double maxDepth )
|
||||
{
|
||||
RimPlotCellPropertyFilter* depthCellFilter = new RimPlotCellPropertyFilter();
|
||||
|
||||
|
||||
@@ -47,9 +47,7 @@ protected:
|
||||
QString xAxisParameterString() const override;
|
||||
|
||||
private:
|
||||
RimPlotCellPropertyFilter* createEquilibriumRegionPropertyFilter( RimEclipseResultCase* eclipseResultCase,
|
||||
int zeroBasedEquilRegionIndex );
|
||||
RimPlotCellPropertyFilter* createEquilibriumRegionPropertyFilter( RimEclipseResultCase* eclipseResultCase, int zeroBasedEquilRegionIndex );
|
||||
|
||||
RimPlotCellPropertyFilter*
|
||||
createDepthPropertyFilter( RimEclipseResultCase* eclipseResultCase, double minDepth, double maxDepth );
|
||||
RimPlotCellPropertyFilter* createDepthPropertyFilter( RimEclipseResultCase* eclipseResultCase, double minDepth, double maxDepth );
|
||||
};
|
||||
|
||||
@@ -51,8 +51,7 @@ RimSaturationPressurePlotCollection::~RimSaturationPressurePlotCollection()
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimSaturationPressurePlot*>
|
||||
RimSaturationPressurePlotCollection::createSaturationPressurePlots( RimEclipseResultCase* eclipseResultCase,
|
||||
int timeStep )
|
||||
RimSaturationPressurePlotCollection::createSaturationPressurePlots( RimEclipseResultCase* eclipseResultCase, int timeStep )
|
||||
{
|
||||
std::vector<RimSaturationPressurePlot*> generatedPlots;
|
||||
|
||||
|
||||
@@ -37,8 +37,7 @@ public:
|
||||
RimSaturationPressurePlotCollection();
|
||||
~RimSaturationPressurePlotCollection() override;
|
||||
|
||||
std::vector<RimSaturationPressurePlot*> createSaturationPressurePlots( RimEclipseResultCase* eclipseResultCase,
|
||||
int timeStep );
|
||||
std::vector<RimSaturationPressurePlot*> createSaturationPressurePlots( RimEclipseResultCase* eclipseResultCase, int timeStep );
|
||||
|
||||
std::vector<RimSaturationPressurePlot*> plots() const;
|
||||
size_t plotCount() const override;
|
||||
|
||||
Reference in New Issue
Block a user