mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5101 clang-format: Adjusted penalties
Use lower absolute values to improve control of behavior
This commit is contained in:
@@ -144,8 +144,8 @@ void RimPlotCellPropertyFilter::updateCellVisibilityFromFilter( size_t timeStepI
|
||||
|
||||
if ( !resDef->currentGridCellResults()->hasResultEntry( resDef->eclipseResultAddress() ) ) return;
|
||||
|
||||
const std::vector<double>& cellResultValues = cellResultsData->cellScalarResults( resDef->eclipseResultAddress(),
|
||||
timeStepIndex );
|
||||
const std::vector<double>& cellResultValues =
|
||||
cellResultsData->cellScalarResults( resDef->eclipseResultAddress(), timeStepIndex );
|
||||
if ( cellResultValues.empty() ) return;
|
||||
|
||||
const RigActiveCellInfo* actCellInfo = cellResultsData->activeCellInfo();
|
||||
|
||||
@@ -921,8 +921,8 @@ void RimGridCrossPlot::updateAxisInQwt( RiaDefines::PlotAxis axisType )
|
||||
|
||||
if ( axisProperties->isLogarithmicScaleEnabled )
|
||||
{
|
||||
QwtLogScaleEngine* currentScaleEngine = dynamic_cast<QwtLogScaleEngine*>(
|
||||
m_plotWidget->axisScaleEngine( axisProperties->qwtPlotAxisType() ) );
|
||||
QwtLogScaleEngine* currentScaleEngine =
|
||||
dynamic_cast<QwtLogScaleEngine*>( m_plotWidget->axisScaleEngine( axisProperties->qwtPlotAxisType() ) );
|
||||
if ( !currentScaleEngine )
|
||||
{
|
||||
m_plotWidget->setAxisScaleEngine( axisProperties->qwtPlotAxisType(), new QwtLogScaleEngine );
|
||||
@@ -950,8 +950,8 @@ void RimGridCrossPlot::updateAxisInQwt( RiaDefines::PlotAxis axisType )
|
||||
}
|
||||
else
|
||||
{
|
||||
QwtLinearScaleEngine* currentScaleEngine = dynamic_cast<QwtLinearScaleEngine*>(
|
||||
m_plotWidget->axisScaleEngine( axisProperties->qwtPlotAxisType() ) );
|
||||
QwtLinearScaleEngine* currentScaleEngine =
|
||||
dynamic_cast<QwtLinearScaleEngine*>( m_plotWidget->axisScaleEngine( axisProperties->qwtPlotAxisType() ) );
|
||||
if ( !currentScaleEngine )
|
||||
{
|
||||
m_plotWidget->setAxisScaleEngine( axisProperties->qwtPlotAxisType(), new QwtLinearScaleEngine );
|
||||
|
||||
@@ -119,9 +119,7 @@ protected:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
void updateAxes() override;
|
||||
void updatePlot();
|
||||
|
||||
@@ -553,11 +553,10 @@ 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() )
|
||||
@@ -960,10 +959,7 @@ QList<caf::PdmOptionItemInfo>
|
||||
}
|
||||
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 );
|
||||
@@ -1035,8 +1031,8 @@ void RimGridCrossPlotDataSet::updateLegendRange()
|
||||
}
|
||||
if ( !m_legendOverlayFrame )
|
||||
{
|
||||
m_legendOverlayFrame = new RiuDraggableOverlayFrame( parent->viewer()->canvas(),
|
||||
parent->viewer()->overlayMargins() );
|
||||
m_legendOverlayFrame =
|
||||
new RiuDraggableOverlayFrame( parent->viewer()->canvas(), parent->viewer()->overlayMargins() );
|
||||
}
|
||||
m_legendOverlayFrame->setContentFrame( legendConfig()->makeLegendFrame() );
|
||||
parent->viewer()->addOverlayFrame( m_legendOverlayFrame );
|
||||
@@ -1335,8 +1331,7 @@ void RimGridCrossPlotDataSet::defineEditorAttribute( const caf::PdmFieldHandle*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridCrossPlotDataSet::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering,
|
||||
QString uiConfigName /*= ""*/ )
|
||||
void RimGridCrossPlotDataSet::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
|
||||
{
|
||||
if ( groupingEnabled() )
|
||||
{
|
||||
|
||||
@@ -152,9 +152,7 @@ protected:
|
||||
std::map<int, cvf::UByteArray> calculateCellVisibility( RimEclipseCase* eclipseCase ) const;
|
||||
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) override;
|
||||
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
|
||||
@@ -81,8 +81,8 @@ 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 );
|
||||
}
|
||||
@@ -96,8 +96,8 @@ 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 );
|
||||
|
||||
{
|
||||
@@ -112,9 +112,8 @@ void RimSaturationPressurePlot::assignCaseAndEquilibriumRegion( RiaDefines::Poro
|
||||
|
||||
maxDepth = gasOilContactDepth;
|
||||
|
||||
RimPlotCellPropertyFilter* depthCellFilter = createDepthPropertyFilter( eclipseResultCase,
|
||||
minDepth,
|
||||
maxDepth );
|
||||
RimPlotCellPropertyFilter* depthCellFilter =
|
||||
createDepthPropertyFilter( eclipseResultCase, minDepth, maxDepth );
|
||||
|
||||
curveSet->addCellFilter( depthCellFilter );
|
||||
}
|
||||
@@ -160,9 +159,8 @@ void RimSaturationPressurePlot::assignCaseAndEquilibriumRegion( RiaDefines::Poro
|
||||
minDepth = gasOilContactDepth;
|
||||
maxDepth = waterOilContactDepth;
|
||||
|
||||
RimPlotCellPropertyFilter* depthCellFilter = createDepthPropertyFilter( eclipseResultCase,
|
||||
minDepth,
|
||||
maxDepth );
|
||||
RimPlotCellPropertyFilter* depthCellFilter =
|
||||
createDepthPropertyFilter( eclipseResultCase, minDepth, maxDepth );
|
||||
|
||||
curveSet->addCellFilter( depthCellFilter );
|
||||
}
|
||||
|
||||
@@ -38,12 +38,7 @@ RimSaturationPressurePlotCollection::RimSaturationPressurePlotCollection()
|
||||
{
|
||||
CAF_PDM_InitObject( "Saturation Pressure Plots", ":/SummaryXPlotsLight16x16.png", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_saturationPressurePlots,
|
||||
"SaturationPressurePlots",
|
||||
"Saturation Pressure Plots",
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_saturationPressurePlots, "SaturationPressurePlots", "Saturation Pressure Plots", "", "", "" );
|
||||
m_saturationPressurePlots.uiCapability()->setUiHidden( true );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user