From dd845e3dc75bd769345cd1148ad2acf392420087 Mon Sep 17 00:00:00 2001 From: Rebecca Cox Date: Wed, 6 Sep 2017 16:32:46 +0200 Subject: [PATCH] #1751 Rename RimSummaryCaseCollection to RimSummaryCaseMainCollection --- .../Application/RiaApplication.cpp | 10 +++---- .../Tools/RiaImportEclipseCaseTools.cpp | 4 +-- .../RicPlotProductionRateFeature.cpp | 6 ++-- .../RicCloseSummaryCaseCollectionFeature.cpp | 14 ++++----- .../Commands/RicCloseSummaryCaseFeature.cpp | 10 +++---- .../Commands/RicImportSummaryCaseFeature.cpp | 6 ++-- .../Commands/RicReloadSummaryCaseFeature.cpp | 12 ++++---- .../RicNewGridTimeHistoryCurveFeature.cpp | 2 +- .../RicNewSummaryCurveFeature.cpp | 6 ++-- .../RicNewSummaryCurveFilterFeature.cpp | 2 +- .../ProjectDataModel/RimOilField.cpp | 8 ++--- .../ProjectDataModel/RimOilField.h | 6 ++-- .../ProjectDataModel/RimProject.cpp | 16 +++++----- .../Summary/CMakeLists_files.cmake | 4 +-- .../Summary/RimSummaryCase.cpp | 10 +++---- ...n.cpp => RimSummaryCaseMainCollection.cpp} | 30 +++++++++---------- ...ction.h => RimSummaryCaseMainCollection.h} | 6 ++-- 17 files changed, 76 insertions(+), 76 deletions(-) rename ApplicationCode/ProjectDataModel/Summary/{RimSummaryCaseCollection.cpp => RimSummaryCaseMainCollection.cpp} (86%) rename ApplicationCode/ProjectDataModel/Summary/{RimSummaryCaseCollection.h => RimSummaryCaseMainCollection.h} (93%) diff --git a/ApplicationCode/Application/RiaApplication.cpp b/ApplicationCode/Application/RiaApplication.cpp index e5652b04d1..8a4945c74c 100644 --- a/ApplicationCode/Application/RiaApplication.cpp +++ b/ApplicationCode/Application/RiaApplication.cpp @@ -58,7 +58,7 @@ #include "RimReservoirCellResultsStorage.h" #include "RimScriptCollection.h" #include "RimSummaryCase.h" -#include "RimSummaryCaseCollection.h" +#include "RimSummaryCaseMainCollection.h" #include "RimSummaryCurve.h" #include "RimSummaryCurveFilter.h" #include "RimSummaryPlot.h" @@ -477,12 +477,12 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi { if (oilField == NULL) continue; // Temporary - if(!oilField->summaryCaseCollection()) + if(!oilField->summaryCaseMainCollection()) { - oilField->summaryCaseCollection = new RimSummaryCaseCollection(); + oilField->summaryCaseMainCollection = new RimSummaryCaseMainCollection(); } - oilField->summaryCaseCollection()->createSummaryCasesFromRelevantEclipseResultCases(); - oilField->summaryCaseCollection()->loadAllSummaryCaseData(); + oilField->summaryCaseMainCollection()->createSummaryCasesFromRelevantEclipseResultCases(); + oilField->summaryCaseMainCollection()->loadAllSummaryCaseData(); #ifdef USE_PROTOTYPE_FEATURE_FRACTURES oilField->fractureDefinitionCollection()->loadAndUpdateData(); diff --git a/ApplicationCode/Application/Tools/RiaImportEclipseCaseTools.cpp b/ApplicationCode/Application/Tools/RiaImportEclipseCaseTools.cpp index f82bdb32c2..437719045e 100644 --- a/ApplicationCode/Application/Tools/RiaImportEclipseCaseTools.cpp +++ b/ApplicationCode/Application/Tools/RiaImportEclipseCaseTools.cpp @@ -35,7 +35,7 @@ #include "RimOilField.h" #include "RimProject.h" #include "RimSummaryCase.h" -#include "RimSummaryCaseCollection.h" +#include "RimSummaryCaseMainCollection.h" #include "RimSummaryCurve.h" #include "RimSummaryCurveFilter.h" #include "RimSummaryPlotCollection.h" @@ -122,7 +122,7 @@ bool RiaImportEclipseCaseTools::openEclipseCaseShowTimeStepFilterImpl(const QStr // Add a corresponding summary case if it exists { - RimSummaryCaseCollection* sumCaseColl = project->activeOilField() ? project->activeOilField()->summaryCaseCollection() : NULL; + RimSummaryCaseMainCollection* sumCaseColl = project->activeOilField() ? project->activeOilField()->summaryCaseMainCollection() : NULL; if (sumCaseColl) { { diff --git a/ApplicationCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp b/ApplicationCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp index cca2dd89cf..90c574e18a 100644 --- a/ApplicationCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp +++ b/ApplicationCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp @@ -33,7 +33,7 @@ #include "RimMainPlotCollection.h" #include "RimOilField.h" #include "RimProject.h" -#include "RimSummaryCaseCollection.h" +#include "RimSummaryCaseMainCollection.h" #include "RimSummaryCurve.h" #include "RimSummaryCurveAppearanceCalculator.h" #include "RimSummaryPlot.h" @@ -77,7 +77,7 @@ void RicPlotProductionRateFeature::onActionTriggered(bool isChecked) RimProject* project = RiaApplication::instance()->project(); CAF_ASSERT(project); - RimSummaryCaseCollection* sumCaseColl = project->activeOilField() ? project->activeOilField()->summaryCaseCollection() : nullptr; + RimSummaryCaseMainCollection* sumCaseColl = project->activeOilField() ? project->activeOilField()->summaryCaseMainCollection() : nullptr; if (!sumCaseColl) return; RimMainPlotCollection* mainPlotColl = project->mainPlotCollection(); @@ -220,7 +220,7 @@ RimGridSummaryCase* RicPlotProductionRateFeature::gridSummaryCaseForWell(RimEcli RimProject* project = RiaApplication::instance()->project(); if (!project) return nullptr; - RimSummaryCaseCollection* sumCaseColl = project->activeOilField() ? project->activeOilField()->summaryCaseCollection() : nullptr; + RimSummaryCaseMainCollection* sumCaseColl = project->activeOilField() ? project->activeOilField()->summaryCaseMainCollection() : nullptr; if (!sumCaseColl) return nullptr; RimEclipseResultCase* eclCase = nullptr; diff --git a/ApplicationCode/Commands/RicCloseSummaryCaseCollectionFeature.cpp b/ApplicationCode/Commands/RicCloseSummaryCaseCollectionFeature.cpp index afcfcb4aca..80bfbf33c1 100644 --- a/ApplicationCode/Commands/RicCloseSummaryCaseCollectionFeature.cpp +++ b/ApplicationCode/Commands/RicCloseSummaryCaseCollectionFeature.cpp @@ -25,7 +25,7 @@ #include "RimMainPlotCollection.h" #include "RimProject.h" #include "RimSummaryCase.h" -#include "RimSummaryCaseCollection.h" +#include "RimSummaryCaseMainCollection.h" #include "RimSummaryPlot.h" #include "RimSummaryPlotCollection.h" @@ -53,9 +53,9 @@ void RicCloseSummaryCaseCollectionFeature::setupActionLook(QAction* actionToSetu //-------------------------------------------------------------------------------------------------- bool RicCloseSummaryCaseCollectionFeature::isCommandEnabled() { - std::vector summaryCaseCollections; - caf::SelectionManager::instance()->objectsByType(&summaryCaseCollections); - return (summaryCaseCollections.size() > 0); + std::vector summaryCaseMainCollections; + caf::SelectionManager::instance()->objectsByType(&summaryCaseMainCollections); + return (summaryCaseMainCollections.size() > 0); } //-------------------------------------------------------------------------------------------------- @@ -63,10 +63,10 @@ bool RicCloseSummaryCaseCollectionFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicCloseSummaryCaseCollectionFeature::onActionTriggered(bool isChecked) { - std::vector summaryCaseCollections; - caf::SelectionManager::instance()->objectsByType(&summaryCaseCollections); + std::vector summaryCaseMainCollections; + caf::SelectionManager::instance()->objectsByType(&summaryCaseMainCollections); - for (RimSummaryCaseCollection* summaryCaseCollection : summaryCaseCollections) + for (RimSummaryCaseMainCollection* summaryCaseCollection : summaryCaseMainCollections) { std::vector summaryCasesFromCollection; diff --git a/ApplicationCode/Commands/RicCloseSummaryCaseFeature.cpp b/ApplicationCode/Commands/RicCloseSummaryCaseFeature.cpp index fb86743e56..43db585e8e 100644 --- a/ApplicationCode/Commands/RicCloseSummaryCaseFeature.cpp +++ b/ApplicationCode/Commands/RicCloseSummaryCaseFeature.cpp @@ -23,7 +23,7 @@ #include "RimMainPlotCollection.h" #include "RimProject.h" #include "RimSummaryCase.h" -#include "RimSummaryCaseCollection.h" +#include "RimSummaryCaseMainCollection.h" #include "RimSummaryPlot.h" #include "RimSummaryPlotCollection.h" @@ -69,12 +69,12 @@ void RicCloseSummaryCaseFeature::deleteSummaryCases(const std::vectorupdateConnectedEditors(); - RimSummaryCaseCollection* summaryCaseCollection = nullptr; - summaryCase->firstAncestorOrThisOfTypeAsserted(summaryCaseCollection); + RimSummaryCaseMainCollection* summaryCaseMainCollection = nullptr; + summaryCase->firstAncestorOrThisOfTypeAsserted(summaryCaseMainCollection); - summaryCaseCollection->deleteCase(summaryCase); + summaryCaseMainCollection->deleteCase(summaryCase); delete summaryCase; - summaryCaseCollection->updateConnectedEditors(); + summaryCaseMainCollection->updateConnectedEditors(); } } diff --git a/ApplicationCode/Commands/RicImportSummaryCaseFeature.cpp b/ApplicationCode/Commands/RicImportSummaryCaseFeature.cpp index 66ed83b6e5..cae73717b4 100644 --- a/ApplicationCode/Commands/RicImportSummaryCaseFeature.cpp +++ b/ApplicationCode/Commands/RicImportSummaryCaseFeature.cpp @@ -26,7 +26,7 @@ #include "RimOilField.h" #include "RimProject.h" #include "RimSummaryCase.h" -#include "RimSummaryCaseCollection.h" +#include "RimSummaryCaseMainCollection.h" #include "RimSummaryPlotCollection.h" #include "RiuMainWindow.h" @@ -62,7 +62,7 @@ void RicImportSummaryCaseFeature::onActionTriggered(bool isChecked) RimProject* proj = app->project(); - RimSummaryCaseCollection* sumCaseColl = proj->activeOilField() ? proj->activeOilField()->summaryCaseCollection() : nullptr; + RimSummaryCaseMainCollection* sumCaseColl = proj->activeOilField() ? proj->activeOilField()->summaryCaseMainCollection() : nullptr; if (!sumCaseColl) return; for (auto f : fileNames) @@ -97,7 +97,7 @@ bool RicImportSummaryCaseFeature::createAndAddSummaryCaseFromFile(const QString& { RiaApplication* app = RiaApplication::instance(); RimProject* proj = app->project(); - RimSummaryCaseCollection* sumCaseColl = proj->activeOilField() ? proj->activeOilField()->summaryCaseCollection() : nullptr; + RimSummaryCaseMainCollection* sumCaseColl = proj->activeOilField() ? proj->activeOilField()->summaryCaseMainCollection() : nullptr; if (!sumCaseColl) return false; RimSummaryCase* newSumCase = sumCaseColl->createAndAddSummaryCaseFromFileName(fileName); diff --git a/ApplicationCode/Commands/RicReloadSummaryCaseFeature.cpp b/ApplicationCode/Commands/RicReloadSummaryCaseFeature.cpp index 3cf8af87c6..42e564da1d 100644 --- a/ApplicationCode/Commands/RicReloadSummaryCaseFeature.cpp +++ b/ApplicationCode/Commands/RicReloadSummaryCaseFeature.cpp @@ -24,7 +24,7 @@ #include "RimMainPlotCollection.h" #include "RimProject.h" #include "RimSummaryCase.h" -#include "RimSummaryCaseCollection.h" +#include "RimSummaryCaseMainCollection.h" #include "RimSummaryPlot.h" #include "RimSummaryPlotCollection.h" @@ -90,14 +90,14 @@ std::vector RicReloadSummaryCaseFeature::selectedSummaryCases() std::vector caseSelection; caf::SelectionManager::instance()->objectsByType(&caseSelection); - std::vector collectionSelection; - caf::SelectionManager::instance()->objectsByType(&collectionSelection); + std::vector mainCollectionSelection; + caf::SelectionManager::instance()->objectsByType(&mainCollectionSelection); - for (auto sumColl : collectionSelection) + for (auto sumMainColl : mainCollectionSelection) { - for (size_t i = 0; i < sumColl->summaryCaseCount(); i++) + for (size_t i = 0; i < sumMainColl->summaryCaseCount(); i++) { - caseSelection.push_back(sumColl->summaryCase(i)); + caseSelection.push_back(sumMainColl->summaryCase(i)); } } diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.cpp index 33e218a636..8ed8c6cdbd 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.cpp +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.cpp @@ -32,7 +32,7 @@ #include "RimGridTimeHistoryCurve.h" #include "RimMainPlotCollection.h" #include "RimProject.h" -#include "RimSummaryCaseCollection.h" +#include "RimSummaryCaseMainCollection.h" #include "RimSummaryPlot.h" #include "RimSummaryPlotCollection.h" diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.cpp index 8f3c30ff21..156953ff30 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.cpp +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.cpp @@ -23,7 +23,7 @@ #include "RimMainPlotCollection.h" #include "RimOilField.h" #include "RimProject.h" -#include "RimSummaryCaseCollection.h" +#include "RimSummaryCaseMainCollection.h" #include "RimSummaryCurve.h" #include "RimSummaryPlot.h" #include "RimSummaryPlotCollection.h" @@ -73,9 +73,9 @@ void RicNewSummaryCurveFeature::onActionTriggered(bool isChecked) plot->addCurve(newCurve); RimSummaryCase* defaultCase = nullptr; - if (project->activeOilField()->summaryCaseCollection()->summaryCaseCount() > 0) + if (project->activeOilField()->summaryCaseMainCollection()->summaryCaseCount() > 0) { - defaultCase = project->activeOilField()->summaryCaseCollection()->summaryCase(0); + defaultCase = project->activeOilField()->summaryCaseMainCollection()->summaryCase(0); newCurve->setSummaryCase(defaultCase); newCurve->setSummaryAddress(RifEclipseSummaryAddress::fieldVarAddress("FOPT")); diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFilterFeature.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFilterFeature.cpp index 993895ca19..d5a294d501 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFilterFeature.cpp +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFilterFeature.cpp @@ -23,7 +23,7 @@ #include "RimMainPlotCollection.h" #include "RimOilField.h" #include "RimProject.h" -#include "RimSummaryCaseCollection.h" +#include "RimSummaryCaseMainCollection.h" #include "RimSummaryCurve.h" #include "RimSummaryCurveFilter.h" #include "RimSummaryPlot.h" diff --git a/ApplicationCode/ProjectDataModel/RimOilField.cpp b/ApplicationCode/ProjectDataModel/RimOilField.cpp index b93acecaed..07380821cd 100644 --- a/ApplicationCode/ProjectDataModel/RimOilField.cpp +++ b/ApplicationCode/ProjectDataModel/RimOilField.cpp @@ -28,7 +28,7 @@ #endif // USE_PROTOTYPE_FEATURE_FRACTURES #include "RimGeoMechModels.h" -#include "RimSummaryCaseCollection.h" +#include "RimSummaryCaseMainCollection.h" #include "RimWellPathCollection.h" @@ -48,7 +48,7 @@ RimOilField::RimOilField(void) CAF_PDM_InitFieldNoDefault(&fractureDefinitionCollection, "FractureDefinitionCollection", "Defenition of fractures", "", "", ""); #endif // USE_PROTOTYPE_FEATURE_FRACTURES - CAF_PDM_InitFieldNoDefault(&summaryCaseCollection,"SummaryCaseCollection","Summary Cases",":/GridModels.png","",""); + CAF_PDM_InitFieldNoDefault(&summaryCaseMainCollection,"SummaryCaseCollection","Summary Cases",":/GridModels.png","",""); CAF_PDM_InitFieldNoDefault(&formationNamesCollection,"FormationNamesCollection","Formations","","",""); #ifdef USE_PROTOTYPE_FEATURE_FRACTURES @@ -57,7 +57,7 @@ RimOilField::RimOilField(void) analysisModels = new RimEclipseCaseCollection(); wellPathCollection = new RimWellPathCollection(); - summaryCaseCollection = new RimSummaryCaseCollection(); + summaryCaseMainCollection = new RimSummaryCaseMainCollection(); } //-------------------------------------------------------------------------------------------------- @@ -73,7 +73,7 @@ RimOilField::~RimOilField(void) if (geoMechModels()) delete geoMechModels(); if (analysisModels()) delete analysisModels(); - if (summaryCaseCollection()) delete summaryCaseCollection(); + if (summaryCaseMainCollection()) delete summaryCaseMainCollection(); if (formationNamesCollection()) delete formationNamesCollection(); } diff --git a/ApplicationCode/ProjectDataModel/RimOilField.h b/ApplicationCode/ProjectDataModel/RimOilField.h index ff3f094d30..1ce4df751c 100644 --- a/ApplicationCode/ProjectDataModel/RimOilField.h +++ b/ApplicationCode/ProjectDataModel/RimOilField.h @@ -29,7 +29,7 @@ class RimEclipseCaseCollection; class RimGeoMechModels; class RimWellPathCollection; class RimFractureTemplateCollection; -class RimSummaryCaseCollection; +class RimSummaryCaseMainCollection; class RimFormationNamesCollection; //================================================================================================== @@ -47,8 +47,8 @@ public: caf::PdmChildField analysisModels; caf::PdmChildField geoMechModels; caf::PdmChildField wellPathCollection; - caf::PdmChildField fractureDefinitionCollection; - caf::PdmChildField summaryCaseCollection; + caf::PdmChildField fractureDefinitionCollection; + caf::PdmChildField summaryCaseMainCollection; caf::PdmChildField formationNamesCollection; }; diff --git a/ApplicationCode/ProjectDataModel/RimProject.cpp b/ApplicationCode/ProjectDataModel/RimProject.cpp index 6c289cf468..0b35296c79 100644 --- a/ApplicationCode/ProjectDataModel/RimProject.cpp +++ b/ApplicationCode/ProjectDataModel/RimProject.cpp @@ -49,7 +49,7 @@ #include "RimMultiSnapshotDefinition.h" #include "RimOilField.h" #include "RimScriptCollection.h" -#include "RimSummaryCaseCollection.h" +#include "RimSummaryCaseMainCollection.h" #include "RimSummaryPlotCollection.h" #include "RimView.h" #include "RimViewLinker.h" @@ -439,8 +439,8 @@ void RimProject::setProjectFileNameAndUpdateDependencies(const QString& fileName { oilField->formationNamesCollection()->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath); } - if (oilField->summaryCaseCollection() != NULL) { - oilField->summaryCaseCollection()->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath); + if (oilField->summaryCaseMainCollection() != NULL) { + oilField->summaryCaseMainCollection()->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath); } #ifdef USE_PROTOTYPE_FEATURE_FRACTURES @@ -538,12 +538,12 @@ void RimProject::allSummaryCases(std::vector& sumCases) for (RimOilField* oilField: oilFields) { if(!oilField) continue; - RimSummaryCaseCollection* sumCaseColl = oilField->summaryCaseCollection(); - if(sumCaseColl) + RimSummaryCaseMainCollection* sumCaseMainColl = oilField->summaryCaseMainCollection(); + if(sumCaseMainColl) { - for (size_t scIdx = 0; scIdx < sumCaseColl->summaryCaseCount(); ++scIdx) + for (size_t scIdx = 0; scIdx < sumCaseMainColl->summaryCaseCount(); ++scIdx) { - sumCases.push_back(sumCaseColl->summaryCase(scIdx)); + sumCases.push_back(sumCaseMainColl->summaryCase(scIdx)); } } } @@ -856,7 +856,7 @@ void RimProject::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QS RimOilField* oilField = activeOilField(); if (oilField) { - if (oilField->summaryCaseCollection()) uiTreeOrdering.add(oilField->summaryCaseCollection()); + if (oilField->summaryCaseMainCollection()) uiTreeOrdering.add(oilField->summaryCaseMainCollection()); } if (mainPlotCollection) diff --git a/ApplicationCode/ProjectDataModel/Summary/CMakeLists_files.cmake b/ApplicationCode/ProjectDataModel/Summary/CMakeLists_files.cmake index bca4161d18..8d0a2babc3 100644 --- a/ApplicationCode/ProjectDataModel/Summary/CMakeLists_files.cmake +++ b/ApplicationCode/ProjectDataModel/Summary/CMakeLists_files.cmake @@ -9,7 +9,7 @@ ${CEE_CURRENT_LIST_DIR}RimAsciiDataCurve.h ${CEE_CURRENT_LIST_DIR}RimFileSummaryCase.h ${CEE_CURRENT_LIST_DIR}RimGridSummaryCase.h ${CEE_CURRENT_LIST_DIR}RimSummaryCase.h -${CEE_CURRENT_LIST_DIR}RimSummaryCaseCollection.h +${CEE_CURRENT_LIST_DIR}RimSummaryCaseMainCollection.h ${CEE_CURRENT_LIST_DIR}RimSummaryCurve.h ${CEE_CURRENT_LIST_DIR}RimSummaryCurveAppearanceCalculator.h ${CEE_CURRENT_LIST_DIR}RimSummaryCurveAutoName.h @@ -27,7 +27,7 @@ ${CEE_CURRENT_LIST_DIR}RimAsciiDataCurve.cpp ${CEE_CURRENT_LIST_DIR}RimFileSummaryCase.cpp ${CEE_CURRENT_LIST_DIR}RimGridSummaryCase.cpp ${CEE_CURRENT_LIST_DIR}RimSummaryCase.cpp -${CEE_CURRENT_LIST_DIR}RimSummaryCaseCollection.cpp +${CEE_CURRENT_LIST_DIR}RimSummaryCaseMainCollection.cpp ${CEE_CURRENT_LIST_DIR}RimSummaryCurve.cpp ${CEE_CURRENT_LIST_DIR}RimSummaryCurveAppearanceCalculator.cpp ${CEE_CURRENT_LIST_DIR}RimSummaryCurveAutoName.cpp diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCase.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCase.cpp index 3692e85ce4..aec8824827 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCase.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCase.cpp @@ -20,7 +20,7 @@ #include "RigSummaryCaseData.h" #include "RimEclipseCase.h" -#include "RimSummaryCaseCollection.h" +#include "RimSummaryCaseMainCollection.h" #include #include "RimProject.h" @@ -147,11 +147,11 @@ void RimSummaryCase::updateAutoShortName() { if(m_useAutoShortName) { - RimSummaryCaseCollection* summaryCaseCollection = NULL; - this->firstAncestorOrThisOfType(summaryCaseCollection); - CVF_ASSERT(summaryCaseCollection); + RimSummaryCaseMainCollection* summaryCaseMainCollection = NULL; + this->firstAncestorOrThisOfType(summaryCaseMainCollection); + CVF_ASSERT(summaryCaseMainCollection); - m_shortName = summaryCaseCollection->uniqueShortNameForCase(this); + m_shortName = summaryCaseMainCollection->uniqueShortNameForCase(this); updateTreeItemName(); } else if (m_shortName() == QString("Display Name")) diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseCollection.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.cpp similarity index 86% rename from ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseCollection.cpp rename to ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.cpp index b9eba91efd..95c5ad3839 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseCollection.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.cpp @@ -15,7 +15,7 @@ // for more details. // ///////////////////////////////////////////////////////////////////////////////// -#include "RimSummaryCaseCollection.h" +#include "RimSummaryCaseMainCollection.h" #include "RifEclipseSummaryTools.h" #include "RimEclipseResultCase.h" @@ -28,12 +28,12 @@ #include -CAF_PDM_SOURCE_INIT(RimSummaryCaseCollection,"SummaryCaseCollection"); +CAF_PDM_SOURCE_INIT(RimSummaryCaseMainCollection,"SummaryCaseCollection"); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryCaseCollection::RimSummaryCaseCollection() +RimSummaryCaseMainCollection::RimSummaryCaseMainCollection() { CAF_PDM_InitObject("Summary Cases",":/Cases16x16.png","",""); @@ -45,7 +45,7 @@ RimSummaryCaseCollection::RimSummaryCaseCollection() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryCaseCollection::~RimSummaryCaseCollection() +RimSummaryCaseMainCollection::~RimSummaryCaseMainCollection() { m_cases.deleteAllChildObjects(); } @@ -53,7 +53,7 @@ RimSummaryCaseCollection::~RimSummaryCaseCollection() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryCaseCollection::createSummaryCasesFromRelevantEclipseResultCases() +void RimSummaryCaseMainCollection::createSummaryCasesFromRelevantEclipseResultCases() { RimProject* proj = nullptr; firstAncestorOrThisOfType(proj); @@ -96,7 +96,7 @@ void RimSummaryCaseCollection::createSummaryCasesFromRelevantEclipseResultCases( //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryCase* RimSummaryCaseCollection::findSummaryCaseFromEclipseResultCase(RimEclipseResultCase* eclipseResultCase) const +RimSummaryCase* RimSummaryCaseMainCollection::findSummaryCaseFromEclipseResultCase(RimEclipseResultCase* eclipseResultCase) const { for (RimSummaryCase* summaryCase : m_cases) { @@ -116,7 +116,7 @@ RimSummaryCase* RimSummaryCaseCollection::findSummaryCaseFromEclipseResultCase(R //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryCase* RimSummaryCaseCollection::findSummaryCaseFromFileName(const QString& fileName) const +RimSummaryCase* RimSummaryCaseMainCollection::findSummaryCaseFromFileName(const QString& fileName) const { // Use QFileInfo object to compare two file names to avoid mix of / and \\ @@ -141,7 +141,7 @@ RimSummaryCase* RimSummaryCaseCollection::findSummaryCaseFromFileName(const QStr //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryCaseCollection::deleteCase(RimSummaryCase* summaryCase) +void RimSummaryCaseMainCollection::deleteCase(RimSummaryCase* summaryCase) { m_cases.removeChildObject(summaryCase); } @@ -149,7 +149,7 @@ void RimSummaryCaseCollection::deleteCase(RimSummaryCase* summaryCase) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryCase* RimSummaryCaseCollection::summaryCase(size_t idx) +RimSummaryCase* RimSummaryCaseMainCollection::summaryCase(size_t idx) { return m_cases[idx]; } @@ -157,7 +157,7 @@ RimSummaryCase* RimSummaryCaseCollection::summaryCase(size_t idx) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -size_t RimSummaryCaseCollection::summaryCaseCount() +size_t RimSummaryCaseMainCollection::summaryCaseCount() { return m_cases.size(); } @@ -165,7 +165,7 @@ size_t RimSummaryCaseCollection::summaryCaseCount() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryCaseCollection::loadAllSummaryCaseData() +void RimSummaryCaseMainCollection::loadAllSummaryCaseData() { for (RimSummaryCase* sumCase: m_cases) { @@ -176,7 +176,7 @@ void RimSummaryCaseCollection::loadAllSummaryCaseData() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryCase* RimSummaryCaseCollection::createAndAddSummaryCaseFromEclipseResultCase(RimEclipseResultCase* eclResCase) +RimSummaryCase* RimSummaryCaseMainCollection::createAndAddSummaryCaseFromEclipseResultCase(RimEclipseResultCase* eclResCase) { QString gridFileName = eclResCase->gridFileName(); if(RifEclipseSummaryTools::hasSummaryFiles(QDir::toNativeSeparators(gridFileName).toStdString())) @@ -193,7 +193,7 @@ RimSummaryCase* RimSummaryCaseCollection::createAndAddSummaryCaseFromEclipseResu //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryCase* RimSummaryCaseCollection::createAndAddSummaryCaseFromFileName(const QString& fileName) +RimSummaryCase* RimSummaryCaseMainCollection::createAndAddSummaryCaseFromFileName(const QString& fileName) { RimFileSummaryCase* newSumCase = new RimFileSummaryCase(); @@ -207,7 +207,7 @@ RimSummaryCase* RimSummaryCaseCollection::createAndAddSummaryCaseFromFileName(co //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RimSummaryCaseCollection::uniqueShortNameForCase(RimSummaryCase* summaryCase) +QString RimSummaryCaseMainCollection::uniqueShortNameForCase(RimSummaryCase* summaryCase) { std::set allAutoShortNames; @@ -267,7 +267,7 @@ QString RimSummaryCaseCollection::uniqueShortNameForCase(RimSummaryCase* summary //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryCaseCollection::updateFilePathsFromProjectPath(const QString & newProjectPath, const QString & oldProjectPath) +void RimSummaryCaseMainCollection::updateFilePathsFromProjectPath(const QString & newProjectPath, const QString & oldProjectPath) { for (auto summaryCase : m_cases) { diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseCollection.h b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.h similarity index 93% rename from ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseCollection.h rename to ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.h index 49feaf05e6..05294055be 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseCollection.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.h @@ -23,12 +23,12 @@ class RimSummaryCase; class RimEclipseResultCase; -class RimSummaryCaseCollection : public caf::PdmObject +class RimSummaryCaseMainCollection : public caf::PdmObject { CAF_PDM_HEADER_INIT; public: - RimSummaryCaseCollection(); - virtual ~RimSummaryCaseCollection(); + RimSummaryCaseMainCollection(); + virtual ~RimSummaryCaseMainCollection(); RimSummaryCase* summaryCase(size_t idx); size_t summaryCaseCount();