mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#10367 Janitor: Remove unneccessary 'this' pointers
This commit is contained in:
@@ -126,15 +126,15 @@ void RimAsciiDataCurve::updateZoomInParentPlot()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimAsciiDataCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
{
|
||||
this->RimPlotCurve::updateCurvePresentation( updateParentPlot );
|
||||
RimPlotCurve::updateCurvePresentation( updateParentPlot );
|
||||
|
||||
if ( isChecked() )
|
||||
{
|
||||
std::vector<time_t> dateTimes = this->timeSteps();
|
||||
std::vector<double> values = this->yValues();
|
||||
std::vector<time_t> dateTimes = timeSteps();
|
||||
std::vector<double> values = yValues();
|
||||
|
||||
auto plot = firstAncestorOrThisOfType<RimSummaryPlot>();
|
||||
bool useLogarithmicScale = plot->isLogarithmicScaleEnabled( this->yAxis() );
|
||||
bool useLogarithmicScale = plot->isLogarithmicScaleEnabled( yAxis() );
|
||||
|
||||
if ( dateTimes.size() > 0 && dateTimes.size() == values.size() )
|
||||
{
|
||||
@@ -197,7 +197,7 @@ void RimAsciiDataCurve::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderi
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimAsciiDataCurve::updateQwtPlotAxis()
|
||||
{
|
||||
if ( m_plotCurve ) updateAxisInPlot( this->yAxis() );
|
||||
if ( m_plotCurve ) updateAxisInPlot( yAxis() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -59,7 +59,7 @@ RimCsvSummaryCase::RimCsvSummaryCase()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimCsvSummaryCase::caseName() const
|
||||
{
|
||||
QFileInfo caseFileName( this->summaryHeaderFilename() );
|
||||
QFileInfo caseFileName( summaryHeaderFilename() );
|
||||
return caseFileName.completeBaseName();
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ void RimCsvSummaryCase::createSummaryReaderInterface()
|
||||
{
|
||||
m_summaryReader = nullptr;
|
||||
|
||||
if ( caf::Utils::fileExists( this->summaryHeaderFilename() ) )
|
||||
if ( caf::Utils::fileExists( summaryHeaderFilename() ) )
|
||||
{
|
||||
if ( m_fileType == FileType::REVEAL )
|
||||
{
|
||||
|
||||
@@ -65,10 +65,10 @@ void RimCsvUserData::createSummaryReaderInterface()
|
||||
{
|
||||
m_multiSummaryReader = nullptr;
|
||||
|
||||
if ( caf::Utils::fileExists( this->summaryHeaderFilename() ) )
|
||||
if ( caf::Utils::fileExists( summaryHeaderFilename() ) )
|
||||
{
|
||||
RifCsvUserData* csvUserData = new RifCsvUserData();
|
||||
if ( csvUserData->parse( this->summaryHeaderFilename(), m_parseOptions->parseOptions(), &m_errorText ) )
|
||||
if ( csvUserData->parse( summaryHeaderFilename(), m_parseOptions->parseOptions(), &m_errorText ) )
|
||||
{
|
||||
m_summaryReader = csvUserData;
|
||||
|
||||
|
||||
@@ -394,7 +394,7 @@ void RimEnsembleCurveFilter::fieldChangedByUi( const caf::PdmFieldHandle* change
|
||||
summaryAddress->setAddress( address.summaryAddress() );
|
||||
m_objectiveValuesSummaryAddresses.push_back( summaryAddress );
|
||||
}
|
||||
this->loadDataAndUpdate();
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -745,7 +745,7 @@ void RimEnsembleCurveSet::fieldChangedByUi( const caf::PdmFieldHandle* changedFi
|
||||
{
|
||||
m_selectedTimeSteps.v().clear();
|
||||
|
||||
this->updateConnectedEditors();
|
||||
updateConnectedEditors();
|
||||
}
|
||||
else if ( changedField == &m_selectedTimeSteps )
|
||||
{
|
||||
@@ -810,7 +810,7 @@ void RimEnsembleCurveSet::fieldChangedByUi( const caf::PdmFieldHandle* changedFi
|
||||
m_yValuesSummaryCaseCollection = curveSelection[0].ensemble();
|
||||
m_yValuesSummaryAddress->setAddress( curveSelection[0].summaryAddress() );
|
||||
|
||||
this->loadDataAndUpdate( true );
|
||||
loadDataAndUpdate( true );
|
||||
|
||||
plot->updateAxes();
|
||||
plot->updatePlotTitle();
|
||||
@@ -849,7 +849,7 @@ void RimEnsembleCurveSet::fieldChangedByUi( const caf::PdmFieldHandle* changedFi
|
||||
summaryAddress->setAddress( address.summaryAddress() );
|
||||
m_objectiveValuesSummaryAddresses.push_back( summaryAddress );
|
||||
}
|
||||
this->loadDataAndUpdate( true );
|
||||
loadDataAndUpdate( true );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1142,7 +1142,7 @@ void RimEnsembleCurveSet::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOr
|
||||
|
||||
uiTreeOrdering.skipRemainingChildren( true );
|
||||
|
||||
caf::IconProvider iconProvider = this->uiIconProvider();
|
||||
caf::IconProvider iconProvider = uiIconProvider();
|
||||
if ( !iconProvider.valid() ) return;
|
||||
|
||||
auto coll = firstAncestorOrThisOfType<RimEnsembleCurveSetCollection>();
|
||||
@@ -1151,7 +1151,7 @@ void RimEnsembleCurveSet::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOr
|
||||
iconProvider.setOverlayResourceString( ":/StepUpDownCorner16x16.png" );
|
||||
}
|
||||
|
||||
this->setUiIcon( iconProvider );
|
||||
setUiIcon( iconProvider );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1391,7 +1391,7 @@ RiaSummaryCurveDefinitionAnalyser* RimEnsembleCurveSet::getOrCreateSelectedCurve
|
||||
{
|
||||
m_analyserOfSelectedCurveDefs = std::unique_ptr<RiaSummaryCurveDefinitionAnalyser>( new RiaSummaryCurveDefinitionAnalyser );
|
||||
}
|
||||
m_analyserOfSelectedCurveDefs->setCurveDefinitions( this->curveDefinitions() );
|
||||
m_analyserOfSelectedCurveDefs->setCurveDefinitions( curveDefinitions() );
|
||||
return m_analyserOfSelectedCurveDefs.get();
|
||||
}
|
||||
|
||||
@@ -1937,7 +1937,7 @@ void RimEnsembleCurveSet::updateStatisticsCurves()
|
||||
RimEnsembleCurveSet* RimEnsembleCurveSet::clone() const
|
||||
{
|
||||
RimEnsembleCurveSet* copy =
|
||||
dynamic_cast<RimEnsembleCurveSet*>( this->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
dynamic_cast<RimEnsembleCurveSet*>( xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
copy->setSummaryCaseCollection( m_yValuesSummaryCaseCollection() );
|
||||
|
||||
// Update summary case references
|
||||
|
||||
@@ -92,7 +92,7 @@ QString RimFileSummaryCase::summaryHeaderFilename() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFileSummaryCase::caseName() const
|
||||
{
|
||||
QFileInfo caseFileName( this->summaryHeaderFilename() );
|
||||
QFileInfo caseFileName( summaryHeaderFilename() );
|
||||
|
||||
return caseFileName.completeBaseName();
|
||||
}
|
||||
@@ -103,7 +103,7 @@ QString RimFileSummaryCase::caseName() const
|
||||
void RimFileSummaryCase::createSummaryReaderInterfaceThreadSafe( RiaThreadSafeLogger* threadSafeLogger )
|
||||
{
|
||||
m_fileSummaryReader =
|
||||
RimFileSummaryCase::findRelatedFilesAndCreateReader( this->summaryHeaderFilename(), m_includeRestartFiles, threadSafeLogger );
|
||||
RimFileSummaryCase::findRelatedFilesAndCreateReader( summaryHeaderFilename(), m_includeRestartFiles, threadSafeLogger );
|
||||
|
||||
m_multiSummaryReader = new RifMultipleSummaryReaders;
|
||||
m_multiSummaryReader->addReader( m_fileSummaryReader.p() );
|
||||
|
||||
@@ -103,8 +103,8 @@ void RimGridSummaryCase_obsolete::setAssociatedEclipseCase( RimEclipseCase* ecli
|
||||
m_summaryHeaderFilename = summaryHeaderFilenameFromEclipseCase( eclipseCase );
|
||||
m_cachedCaseName = caseNameFromEclipseCase( eclipseCase );
|
||||
|
||||
this->updateAutoShortName();
|
||||
this->updateTreeItemName();
|
||||
updateAutoShortName();
|
||||
updateTreeItemName();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -128,8 +128,8 @@ RimEclipseCase* RimGridSummaryCase_obsolete::associatedEclipseCase()
|
||||
if ( sumHeaderFileName == m_summaryHeaderFilename().path() )
|
||||
{
|
||||
m_eclipseCase = eclCase;
|
||||
this->updateAutoShortName();
|
||||
this->updateTreeItemName();
|
||||
updateAutoShortName();
|
||||
updateTreeItemName();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ QString RimObjectiveFunction::formulaString( std::vector<RifEclipseSummaryAddres
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimObjectiveFunction::operator<( const RimObjectiveFunction& other ) const
|
||||
{
|
||||
return this->shortName() < other.shortName();
|
||||
return shortName() < other.shortName();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -61,12 +61,12 @@ void RimObservedEclipseUserData::createSummaryReaderInterface()
|
||||
m_multiSummaryReader = nullptr;
|
||||
m_summaryReader = nullptr;
|
||||
|
||||
if ( caf::Utils::fileExists( this->summaryHeaderFilename() ) )
|
||||
if ( caf::Utils::fileExists( summaryHeaderFilename() ) )
|
||||
{
|
||||
QFile file( this->summaryHeaderFilename() );
|
||||
QFile file( summaryHeaderFilename() );
|
||||
if ( !file.open( QIODevice::ReadOnly | QIODevice::Text ) )
|
||||
{
|
||||
RiaLogging::error( QString( "Failed to open %1" ).arg( this->summaryHeaderFilename() ) );
|
||||
RiaLogging::error( QString( "Failed to open %1" ).arg( summaryHeaderFilename() ) );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ RimObservedSummaryData::RimObservedSummaryData()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimObservedSummaryData::caseName() const
|
||||
{
|
||||
QFileInfo caseFileName( this->summaryHeaderFilename() );
|
||||
QFileInfo caseFileName( summaryHeaderFilename() );
|
||||
|
||||
return caseFileName.completeBaseName();
|
||||
}
|
||||
|
||||
@@ -101,8 +101,8 @@ void RimSummaryCase::setSummaryHeaderFileName( const QString& fileName )
|
||||
{
|
||||
m_summaryHeaderFilename = fileName;
|
||||
|
||||
this->updateAutoShortName();
|
||||
this->updateTreeItemName();
|
||||
updateAutoShortName();
|
||||
updateTreeItemName();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -173,7 +173,7 @@ void RimSummaryCase::copyFrom( const RimSummaryCase& rhs )
|
||||
m_summaryHeaderFilename = rhs.m_summaryHeaderFilename;
|
||||
m_isObservedData = rhs.m_isObservedData;
|
||||
|
||||
this->updateTreeItemName();
|
||||
updateTreeItemName();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -181,7 +181,7 @@ void RimSummaryCase::copyFrom( const RimSummaryCase& rhs )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimSummaryCase::operator<( const RimSummaryCase& rhs ) const
|
||||
{
|
||||
return this->caseName() < rhs.caseName();
|
||||
return caseName() < rhs.caseName();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -280,7 +280,7 @@ void RimSummaryCase::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrderin
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCase::updateTreeItemName()
|
||||
{
|
||||
this->setUiName( displayCaseName() );
|
||||
setUiName( displayCaseName() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -422,7 +422,7 @@ std::vector<RigEnsembleParameter> RimSummaryCaseCollection::variationSortedEnsem
|
||||
if ( m_cachedSortedEnsembleParameters.empty() )
|
||||
{
|
||||
std::set<QString> paramSet;
|
||||
for ( RimSummaryCase* rimCase : this->allSummaryCases() )
|
||||
for ( RimSummaryCase* rimCase : allSummaryCases() )
|
||||
{
|
||||
if ( rimCase->caseRealizationParameters() != nullptr )
|
||||
{
|
||||
@@ -437,7 +437,7 @@ std::vector<RigEnsembleParameter> RimSummaryCaseCollection::variationSortedEnsem
|
||||
m_cachedSortedEnsembleParameters.reserve( paramSet.size() );
|
||||
for ( const QString& parameterName : paramSet )
|
||||
{
|
||||
auto ensembleParameter = this->createEnsembleParameter( parameterName );
|
||||
auto ensembleParameter = createEnsembleParameter( parameterName );
|
||||
m_cachedSortedEnsembleParameters.push_back( ensembleParameter );
|
||||
}
|
||||
RimSummaryCaseCollection::sortByBinnedVariation( m_cachedSortedEnsembleParameters );
|
||||
@@ -620,7 +620,7 @@ std::vector<std::pair<RigEnsembleParameter, double>>
|
||||
std::vector<RigEnsembleParameter> RimSummaryCaseCollection::alphabeticEnsembleParameters() const
|
||||
{
|
||||
std::set<QString> paramSet;
|
||||
for ( RimSummaryCase* rimCase : this->allSummaryCases() )
|
||||
for ( RimSummaryCase* rimCase : allSummaryCases() )
|
||||
{
|
||||
if ( rimCase->caseRealizationParameters() != nullptr )
|
||||
{
|
||||
@@ -636,7 +636,7 @@ std::vector<RigEnsembleParameter> RimSummaryCaseCollection::alphabeticEnsemblePa
|
||||
sortedEnsembleParameters.reserve( paramSet.size() );
|
||||
for ( const QString& parameterName : paramSet )
|
||||
{
|
||||
sortedEnsembleParameters.push_back( this->createEnsembleParameter( parameterName ) );
|
||||
sortedEnsembleParameters.push_back( createEnsembleParameter( parameterName ) );
|
||||
}
|
||||
return sortedEnsembleParameters;
|
||||
}
|
||||
@@ -1145,7 +1145,7 @@ int RimSummaryCaseCollection::ensembleId() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimSummaryCaseCollection::hasEnsembleParameters() const
|
||||
{
|
||||
for ( RimSummaryCase* rimCase : this->allSummaryCases() )
|
||||
for ( RimSummaryCase* rimCase : allSummaryCases() )
|
||||
{
|
||||
if ( rimCase->caseRealizationParameters() != nullptr )
|
||||
{
|
||||
|
||||
@@ -229,7 +229,7 @@ void RimSummaryCurve::setSummaryAddressY( const RifEclipseSummaryAddress& addres
|
||||
std::string RimSummaryCurve::unitNameY() const
|
||||
{
|
||||
RifSummaryReaderInterface* reader = valuesSummaryReaderY();
|
||||
if ( reader ) return reader->unitName( this->summaryAddressY() );
|
||||
if ( reader ) return reader->unitName( summaryAddressY() );
|
||||
|
||||
return "";
|
||||
}
|
||||
@@ -240,7 +240,7 @@ std::string RimSummaryCurve::unitNameY() const
|
||||
std::string RimSummaryCurve::unitNameX() const
|
||||
{
|
||||
RifSummaryReaderInterface* reader = valuesSummaryReaderX();
|
||||
if ( reader ) return reader->unitName( this->summaryAddressX() );
|
||||
if ( reader ) return reader->unitName( summaryAddressX() );
|
||||
|
||||
return "";
|
||||
}
|
||||
@@ -467,7 +467,7 @@ void RimSummaryCurve::setIsEnsembleCurve( bool isEnsembleCurve )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimSummaryCurve::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions )
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options = this->RimPlotCurve::calculateValueOptions( fieldNeedingOptions );
|
||||
QList<caf::PdmOptionItemInfo> options = RimPlotCurve::calculateValueOptions( fieldNeedingOptions );
|
||||
if ( !options.isEmpty() ) return options;
|
||||
|
||||
auto createOptionsForSummaryCase = []( RimSummaryCase* summaryCase, QList<caf::PdmOptionItemInfo>& options )
|
||||
@@ -594,16 +594,16 @@ void RimSummaryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
|
||||
if ( isChecked() )
|
||||
{
|
||||
std::vector<double> curveValuesY = this->valuesY();
|
||||
std::vector<double> curveValuesY = valuesY();
|
||||
|
||||
auto plot = firstAncestorOrThisOfTypeAsserted<RimSummaryPlot>();
|
||||
bool useLogarithmicScale = plot->isLogarithmicScaleEnabled( this->axisY() );
|
||||
bool useLogarithmicScale = plot->isLogarithmicScaleEnabled( axisY() );
|
||||
|
||||
bool shouldPopulateViewWithEmptyData = false;
|
||||
|
||||
if ( isCrossPlotCurve() )
|
||||
{
|
||||
auto curveValuesX = this->valuesX();
|
||||
auto curveValuesX = valuesX();
|
||||
auto curveTimeStepsX = timeStepsX();
|
||||
|
||||
auto curveTimeStepsY = timeStepsY();
|
||||
@@ -621,9 +621,9 @@ void RimSummaryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
|
||||
if ( curveMerger.allXValues().size() > 0 )
|
||||
{
|
||||
this->setSamplesFromXYValues( curveMerger.interpolatedYValuesForAllXValues( 0 ),
|
||||
curveMerger.interpolatedYValuesForAllXValues( 1 ),
|
||||
useLogarithmicScale );
|
||||
setSamplesFromXYValues( curveMerger.interpolatedYValuesForAllXValues( 0 ),
|
||||
curveMerger.interpolatedYValuesForAllXValues( 1 ),
|
||||
useLogarithmicScale );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -633,7 +633,7 @@ void RimSummaryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<time_t> curveTimeStepsY = this->timeStepsY();
|
||||
std::vector<time_t> curveTimeStepsY = timeStepsY();
|
||||
if ( curveTimeStepsY.size() > 0 && curveTimeStepsY.size() == curveValuesY.size() )
|
||||
{
|
||||
if ( plot->timeAxisProperties()->timeMode() == RimSummaryTimeAxisProperties::DATE )
|
||||
@@ -651,11 +651,11 @@ void RimSummaryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
|
||||
if ( !errValues.empty() )
|
||||
{
|
||||
this->setSamplesFromXYErrorValues( timeSteps, curveValuesY, errValues, useLogarithmicScale );
|
||||
setSamplesFromXYErrorValues( timeSteps, curveValuesY, errValues, useLogarithmicScale );
|
||||
}
|
||||
else
|
||||
{
|
||||
this->setSamplesFromXYValues( timeSteps, curveValuesY, useLogarithmicScale );
|
||||
setSamplesFromXYValues( timeSteps, curveValuesY, useLogarithmicScale );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -677,12 +677,12 @@ void RimSummaryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
resampledTimeSteps.insert( resampledTimeSteps.begin(), curveTimeStepsY.front() );
|
||||
resampledValues.insert( resampledValues.begin(), resampledValues.front() );
|
||||
|
||||
this->setSamplesFromTimeTAndYValues( resampledTimeSteps, resampledValues, useLogarithmicScale );
|
||||
setSamplesFromTimeTAndYValues( resampledTimeSteps, resampledValues, useLogarithmicScale );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this->setSamplesFromTimeTAndYValues( curveTimeStepsY, curveValuesY, useLogarithmicScale );
|
||||
setSamplesFromTimeTAndYValues( curveTimeStepsY, curveValuesY, useLogarithmicScale );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -701,7 +701,7 @@ void RimSummaryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
}
|
||||
}
|
||||
|
||||
this->setSamplesFromXYValues( timeFromSimulationStart, curveValuesY, useLogarithmicScale );
|
||||
setSamplesFromXYValues( timeFromSimulationStart, curveValuesY, useLogarithmicScale );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -714,7 +714,7 @@ void RimSummaryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
|
||||
if ( shouldPopulateViewWithEmptyData )
|
||||
{
|
||||
this->setSamplesFromXYValues( std::vector<double>(), std::vector<double>(), useLogarithmicScale );
|
||||
setSamplesFromXYValues( std::vector<double>(), std::vector<double>(), useLogarithmicScale );
|
||||
}
|
||||
|
||||
if ( updateParentPlot && hasParentPlot() )
|
||||
@@ -747,7 +747,7 @@ void RimSummaryCurve::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrderi
|
||||
{
|
||||
RimPlotCurve::defineUiTreeOrdering( uiTreeOrdering, uiConfigName );
|
||||
|
||||
caf::IconProvider iconProvider = this->uiIconProvider();
|
||||
caf::IconProvider iconProvider = uiIconProvider();
|
||||
if ( !iconProvider.valid() ) return;
|
||||
|
||||
RimSummaryCurveCollection* coll = firstAncestorOrThisOfType<RimSummaryCurveCollection>();
|
||||
@@ -1055,7 +1055,7 @@ void RimSummaryCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
{
|
||||
m_yValuesSummaryAddress->setAddress( m_yValuesSummaryAddressUiField() );
|
||||
|
||||
this->calculateCurveInterpolationFromAddress();
|
||||
calculateCurveInterpolationFromAddress();
|
||||
|
||||
loadAndUpdate = true;
|
||||
}
|
||||
@@ -1063,7 +1063,7 @@ void RimSummaryCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
{
|
||||
m_xValuesSummaryAddress->setAddress( m_xValuesSummaryAddressUiField() );
|
||||
|
||||
this->calculateCurveInterpolationFromAddress();
|
||||
calculateCurveInterpolationFromAddress();
|
||||
|
||||
loadAndUpdate = true;
|
||||
}
|
||||
@@ -1097,7 +1097,7 @@ void RimSummaryCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
plot->updateCaseNameHasChanged();
|
||||
|
||||
// TODO: is it not ok to just set loadAndUpdate = true?
|
||||
this->onLoadDataAndUpdate( true );
|
||||
onLoadDataAndUpdate( true );
|
||||
dataChanged.send();
|
||||
}
|
||||
else if ( changedField == &m_yPushButtonSelectSummaryAddress )
|
||||
@@ -1171,10 +1171,10 @@ void RimSummaryCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
|
||||
if ( crossPlotTestForMatchingTimeSteps )
|
||||
{
|
||||
auto curveValuesX = this->valuesX();
|
||||
auto curveValuesX = valuesX();
|
||||
auto curveTimeStepsX = timeStepsX();
|
||||
|
||||
auto curveValuesY = this->valuesY();
|
||||
auto curveValuesY = valuesY();
|
||||
auto curveTimeStepsY = timeStepsY();
|
||||
|
||||
if ( !curveValuesX.empty() && !curveValuesY.empty() )
|
||||
@@ -1233,7 +1233,7 @@ void RimSummaryCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCurve::loadAndUpdateDataAndPlot()
|
||||
{
|
||||
this->loadDataAndUpdate( true );
|
||||
loadDataAndUpdate( true );
|
||||
|
||||
auto plot = firstAncestorOrThisOfTypeAsserted<RimSummaryPlot>();
|
||||
|
||||
|
||||
@@ -410,7 +410,7 @@ void RimSummaryCurveAutoName::fieldChangedByUi( const caf::PdmFieldHandle* chang
|
||||
// NOTE: The curve filter is parent object of a summary curve, and the update is supposed to update
|
||||
// the first parent, not the grandparent. This is the reason for not using firstAncestorOrThisOfType()
|
||||
|
||||
RimSummaryCurve* summaryCurve = dynamic_cast<RimSummaryCurve*>( this->parentField()->ownerObject() );
|
||||
RimSummaryCurve* summaryCurve = dynamic_cast<RimSummaryCurve*>( parentField()->ownerObject() );
|
||||
if ( summaryCurve )
|
||||
{
|
||||
summaryCurve->updateCurveNameAndUpdatePlotLegendAndTitle();
|
||||
@@ -419,7 +419,7 @@ void RimSummaryCurveAutoName::fieldChangedByUi( const caf::PdmFieldHandle* chang
|
||||
return;
|
||||
}
|
||||
|
||||
RicSummaryPlotEditorUi* curveCreator = dynamic_cast<RicSummaryPlotEditorUi*>( this->parentField()->ownerObject() );
|
||||
RicSummaryPlotEditorUi* curveCreator = dynamic_cast<RicSummaryPlotEditorUi*>( parentField()->ownerObject() );
|
||||
if ( curveCreator )
|
||||
{
|
||||
curveCreator->updateCurveNames();
|
||||
@@ -429,7 +429,7 @@ void RimSummaryCurveAutoName::fieldChangedByUi( const caf::PdmFieldHandle* chang
|
||||
}
|
||||
|
||||
{
|
||||
auto ensembleCurveSet = dynamic_cast<RimEnsembleCurveSet*>( this->parentField()->ownerObject() );
|
||||
auto ensembleCurveSet = dynamic_cast<RimEnsembleCurveSet*>( parentField()->ownerObject() );
|
||||
if ( ensembleCurveSet )
|
||||
{
|
||||
ensembleCurveSet->updateAllTextInPlot();
|
||||
|
||||
@@ -108,7 +108,7 @@ RimSummaryMultiPlot::RimSummaryMultiPlot()
|
||||
: duplicatePlot( this )
|
||||
{
|
||||
CAF_PDM_InitObject( "Multi Summary Plot", ":/SummaryPlotLight16x16.png" );
|
||||
this->setDeletable( true );
|
||||
setDeletable( true );
|
||||
|
||||
CAF_PDM_InitField( &m_autoPlotTitle, "AutoPlotTitle", true, "Auto Plot Title" );
|
||||
CAF_PDM_InitField( &m_autoSubPlotTitle, "AutoSubPlotTitle", true, "Auto Sub Plot Title" );
|
||||
|
||||
@@ -28,7 +28,7 @@ QString RimSummaryNameHelper::aggregatedPlotTitle( const RimSummaryNameHelper& o
|
||||
{
|
||||
QString title;
|
||||
|
||||
auto titleCaseName = this->caseName();
|
||||
auto titleCaseName = caseName();
|
||||
if ( !other.isCaseInTitle() && !titleCaseName.isEmpty() )
|
||||
{
|
||||
if ( !title.isEmpty() ) title += ", ";
|
||||
@@ -36,50 +36,50 @@ QString RimSummaryNameHelper::aggregatedPlotTitle( const RimSummaryNameHelper& o
|
||||
title += titleCaseName;
|
||||
}
|
||||
|
||||
auto wellName = this->titleWellName();
|
||||
auto wellName = titleWellName();
|
||||
if ( !other.isWellNameInTitle() && !wellName.empty() )
|
||||
{
|
||||
if ( !title.isEmpty() ) title += ", ";
|
||||
title += QString::fromStdString( wellName );
|
||||
}
|
||||
|
||||
auto groupName = this->titleGroupName();
|
||||
auto groupName = titleGroupName();
|
||||
if ( !other.isGroupNameInTitle() && !groupName.empty() )
|
||||
{
|
||||
if ( !title.isEmpty() ) title += ", ";
|
||||
title += QString::fromStdString( groupName );
|
||||
}
|
||||
|
||||
auto region = this->titleRegion();
|
||||
auto region = titleRegion();
|
||||
if ( !other.isRegionInTitle() && !region.empty() )
|
||||
{
|
||||
if ( !title.isEmpty() ) title += ", ";
|
||||
title += "Region : " + QString::fromStdString( region );
|
||||
}
|
||||
|
||||
auto block = this->titleBlock();
|
||||
auto block = titleBlock();
|
||||
if ( !other.isBlockInTitle() && !block.empty() )
|
||||
{
|
||||
if ( !title.isEmpty() ) title += ", ";
|
||||
title += "Block : " + QString::fromStdString( block );
|
||||
}
|
||||
|
||||
auto segment = this->titleSegment();
|
||||
auto segment = titleSegment();
|
||||
if ( !other.isSegmentInTitle() && !segment.empty() )
|
||||
{
|
||||
if ( !title.isEmpty() ) title += ", ";
|
||||
title += "Segment : " + QString::fromStdString( segment );
|
||||
}
|
||||
|
||||
auto completion = this->titleCompletion();
|
||||
auto completion = titleCompletion();
|
||||
if ( !other.isCompletionInTitle() && !completion.empty() )
|
||||
{
|
||||
if ( !title.isEmpty() ) title += ", ";
|
||||
title += "Completion : " + QString::fromStdString( completion );
|
||||
}
|
||||
|
||||
auto vectorName = this->titleVectorName();
|
||||
if ( ( other.titleVectorName() != this->titleVectorName() ) && ( !vectorName.empty() ) )
|
||||
auto vectorName = titleVectorName();
|
||||
if ( ( other.titleVectorName() != titleVectorName() ) && ( !vectorName.empty() ) )
|
||||
{
|
||||
if ( !title.isEmpty() ) title += ", ";
|
||||
title += QString::fromStdString( RiuSummaryQuantityNameInfoProvider::instance()->longNameFromVectorName( vectorName, true ) );
|
||||
|
||||
@@ -49,7 +49,7 @@ void RimSummaryObservedDataFile::createSummaryReaderInterface()
|
||||
{
|
||||
m_summaryReader = new RifReaderObservedData;
|
||||
|
||||
if ( !m_summaryReader->open( this->summaryHeaderFilename(), identifierName(), summaryCategory() ) )
|
||||
if ( !m_summaryReader->open( summaryHeaderFilename(), identifierName(), summaryCategory() ) )
|
||||
{
|
||||
m_summaryReader = nullptr;
|
||||
}
|
||||
|
||||
@@ -530,7 +530,7 @@ std::set<RiaSummaryCurveDefinition> RimSummaryPlot::summaryAndEnsembleCurveDefin
|
||||
{
|
||||
std::set<RiaSummaryCurveDefinition> allCurveDefs;
|
||||
|
||||
for ( const auto& curve : this->summaryAndEnsembleCurves() )
|
||||
for ( const auto& curve : summaryAndEnsembleCurves() )
|
||||
{
|
||||
allCurveDefs.insert( RiaSummaryCurveDefinition( curve->summaryCaseY(), curve->summaryAddressY(), curve->isEnsembleCurve() ) );
|
||||
}
|
||||
@@ -813,7 +813,7 @@ void RimSummaryPlot::applyDefaultCurveAppearances()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlot::applyDefaultCurveAppearances( std::vector<RimSummaryCurve*> curvesToUpdate )
|
||||
{
|
||||
std::set<RiaSummaryCurveDefinition> allCurveDefs = this->summaryAndEnsembleCurveDefinitions();
|
||||
std::set<RiaSummaryCurveDefinition> allCurveDefs = summaryAndEnsembleCurveDefinitions();
|
||||
RimSummaryCurveAppearanceCalculator curveLookCalc( allCurveDefs );
|
||||
|
||||
for ( auto& curve : curvesToUpdate )
|
||||
@@ -1454,7 +1454,7 @@ void RimSummaryPlot::connectCurveToPlot( RimSummaryCurve* curve, bool update, bo
|
||||
if ( update )
|
||||
{
|
||||
curve->setParentPlotAndReplot( plotWidget() );
|
||||
this->updateAxes();
|
||||
updateAxes();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1560,7 +1560,7 @@ void RimSummaryPlot::addGridTimeHistoryCurve( RimGridTimeHistoryCurve* curve )
|
||||
if ( plotWidget() )
|
||||
{
|
||||
curve->setParentPlotAndReplot( plotWidget() );
|
||||
this->updateAxes();
|
||||
updateAxes();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1661,7 +1661,7 @@ void RimSummaryPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
c->detach( true );
|
||||
}
|
||||
|
||||
for ( auto& curveSet : this->ensembleCurveSetCollection()->curveSets() )
|
||||
for ( auto& curveSet : ensembleCurveSetCollection()->curveSets() )
|
||||
{
|
||||
curveSet->deletePlotCurves();
|
||||
}
|
||||
@@ -1674,7 +1674,7 @@ void RimSummaryPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
|
||||
if ( changedField == &m_normalizeCurveYValues )
|
||||
{
|
||||
this->loadDataAndUpdate();
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1866,7 +1866,7 @@ void RimSummaryPlot::onLoadDataAndUpdate()
|
||||
plotWidget()->setLegendFontSize( legendFontSize() );
|
||||
plotWidget()->updateLegend();
|
||||
}
|
||||
this->updateAxes();
|
||||
updateAxes();
|
||||
|
||||
updateStackedCurveData();
|
||||
}
|
||||
@@ -2690,7 +2690,7 @@ RiuPlotWidget* RimSummaryPlot::doCreatePlotViewWidget( QWidget* mainWindowParent
|
||||
m_ensembleCurveSetCollection->setParentPlotNoReplot( plotWidget() );
|
||||
}
|
||||
|
||||
this->connect( plotWidget(), SIGNAL( plotZoomed() ), SLOT( onPlotZoomed() ) );
|
||||
connect( plotWidget(), SIGNAL( plotZoomed() ), SLOT( onPlotZoomed() ) );
|
||||
|
||||
updatePlotTitle();
|
||||
}
|
||||
@@ -2825,7 +2825,7 @@ void RimSummaryPlot::doUpdateLayout()
|
||||
{
|
||||
updateFonts();
|
||||
|
||||
this->loadDataAndUpdate();
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -259,7 +259,7 @@ QString RimSummaryPlotAxisFormatter::autoAxisTitle() const
|
||||
sumAddress = rimCurve->summaryAddressX();
|
||||
unitText = rimCurve->unitNameX();
|
||||
}
|
||||
else if ( rimCurve->axisY() == this->m_axisProperties->plotAxisType() )
|
||||
else if ( rimCurve->axisY() == m_axisProperties->plotAxisType() )
|
||||
{
|
||||
sumAddress = rimCurve->summaryAddressY();
|
||||
unitText = rimCurve->unitNameY();
|
||||
@@ -374,7 +374,7 @@ QString RimSummaryPlotAxisFormatter::createAxisObjectName() const
|
||||
{
|
||||
sumAddress = rimCurve->summaryAddressX();
|
||||
}
|
||||
else if ( rimCurve->axisY() == this->m_axisProperties->plotAxisType() )
|
||||
else if ( rimCurve->axisY() == m_axisProperties->plotAxisType() )
|
||||
{
|
||||
sumAddress = rimCurve->summaryAddressY();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user