#1751 Rename RimSummaryCaseCollection to RimSummaryCaseMainCollection

This commit is contained in:
Rebecca Cox 2017-09-06 16:32:46 +02:00
parent 078a84dbf4
commit dd845e3dc7
17 changed files with 76 additions and 76 deletions

View File

@ -58,7 +58,7 @@
#include "RimReservoirCellResultsStorage.h" #include "RimReservoirCellResultsStorage.h"
#include "RimScriptCollection.h" #include "RimScriptCollection.h"
#include "RimSummaryCase.h" #include "RimSummaryCase.h"
#include "RimSummaryCaseCollection.h" #include "RimSummaryCaseMainCollection.h"
#include "RimSummaryCurve.h" #include "RimSummaryCurve.h"
#include "RimSummaryCurveFilter.h" #include "RimSummaryCurveFilter.h"
#include "RimSummaryPlot.h" #include "RimSummaryPlot.h"
@ -477,12 +477,12 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi
{ {
if (oilField == NULL) continue; if (oilField == NULL) continue;
// Temporary // Temporary
if(!oilField->summaryCaseCollection()) if(!oilField->summaryCaseMainCollection())
{ {
oilField->summaryCaseCollection = new RimSummaryCaseCollection(); oilField->summaryCaseMainCollection = new RimSummaryCaseMainCollection();
} }
oilField->summaryCaseCollection()->createSummaryCasesFromRelevantEclipseResultCases(); oilField->summaryCaseMainCollection()->createSummaryCasesFromRelevantEclipseResultCases();
oilField->summaryCaseCollection()->loadAllSummaryCaseData(); oilField->summaryCaseMainCollection()->loadAllSummaryCaseData();
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES #ifdef USE_PROTOTYPE_FEATURE_FRACTURES
oilField->fractureDefinitionCollection()->loadAndUpdateData(); oilField->fractureDefinitionCollection()->loadAndUpdateData();

View File

@ -35,7 +35,7 @@
#include "RimOilField.h" #include "RimOilField.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimSummaryCase.h" #include "RimSummaryCase.h"
#include "RimSummaryCaseCollection.h" #include "RimSummaryCaseMainCollection.h"
#include "RimSummaryCurve.h" #include "RimSummaryCurve.h"
#include "RimSummaryCurveFilter.h" #include "RimSummaryCurveFilter.h"
#include "RimSummaryPlotCollection.h" #include "RimSummaryPlotCollection.h"
@ -122,7 +122,7 @@ bool RiaImportEclipseCaseTools::openEclipseCaseShowTimeStepFilterImpl(const QStr
// Add a corresponding summary case if it exists // 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) if (sumCaseColl)
{ {
{ {

View File

@ -33,7 +33,7 @@
#include "RimMainPlotCollection.h" #include "RimMainPlotCollection.h"
#include "RimOilField.h" #include "RimOilField.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimSummaryCaseCollection.h" #include "RimSummaryCaseMainCollection.h"
#include "RimSummaryCurve.h" #include "RimSummaryCurve.h"
#include "RimSummaryCurveAppearanceCalculator.h" #include "RimSummaryCurveAppearanceCalculator.h"
#include "RimSummaryPlot.h" #include "RimSummaryPlot.h"
@ -77,7 +77,7 @@ void RicPlotProductionRateFeature::onActionTriggered(bool isChecked)
RimProject* project = RiaApplication::instance()->project(); RimProject* project = RiaApplication::instance()->project();
CAF_ASSERT(project); CAF_ASSERT(project);
RimSummaryCaseCollection* sumCaseColl = project->activeOilField() ? project->activeOilField()->summaryCaseCollection() : nullptr; RimSummaryCaseMainCollection* sumCaseColl = project->activeOilField() ? project->activeOilField()->summaryCaseMainCollection() : nullptr;
if (!sumCaseColl) return; if (!sumCaseColl) return;
RimMainPlotCollection* mainPlotColl = project->mainPlotCollection(); RimMainPlotCollection* mainPlotColl = project->mainPlotCollection();
@ -220,7 +220,7 @@ RimGridSummaryCase* RicPlotProductionRateFeature::gridSummaryCaseForWell(RimEcli
RimProject* project = RiaApplication::instance()->project(); RimProject* project = RiaApplication::instance()->project();
if (!project) return nullptr; if (!project) return nullptr;
RimSummaryCaseCollection* sumCaseColl = project->activeOilField() ? project->activeOilField()->summaryCaseCollection() : nullptr; RimSummaryCaseMainCollection* sumCaseColl = project->activeOilField() ? project->activeOilField()->summaryCaseMainCollection() : nullptr;
if (!sumCaseColl) return nullptr; if (!sumCaseColl) return nullptr;
RimEclipseResultCase* eclCase = nullptr; RimEclipseResultCase* eclCase = nullptr;

View File

@ -25,7 +25,7 @@
#include "RimMainPlotCollection.h" #include "RimMainPlotCollection.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimSummaryCase.h" #include "RimSummaryCase.h"
#include "RimSummaryCaseCollection.h" #include "RimSummaryCaseMainCollection.h"
#include "RimSummaryPlot.h" #include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h" #include "RimSummaryPlotCollection.h"
@ -53,9 +53,9 @@ void RicCloseSummaryCaseCollectionFeature::setupActionLook(QAction* actionToSetu
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RicCloseSummaryCaseCollectionFeature::isCommandEnabled() bool RicCloseSummaryCaseCollectionFeature::isCommandEnabled()
{ {
std::vector<RimSummaryCaseCollection*> summaryCaseCollections; std::vector<RimSummaryCaseMainCollection*> summaryCaseMainCollections;
caf::SelectionManager::instance()->objectsByType(&summaryCaseCollections); caf::SelectionManager::instance()->objectsByType(&summaryCaseMainCollections);
return (summaryCaseCollections.size() > 0); return (summaryCaseMainCollections.size() > 0);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -63,10 +63,10 @@ bool RicCloseSummaryCaseCollectionFeature::isCommandEnabled()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicCloseSummaryCaseCollectionFeature::onActionTriggered(bool isChecked) void RicCloseSummaryCaseCollectionFeature::onActionTriggered(bool isChecked)
{ {
std::vector<RimSummaryCaseCollection*> summaryCaseCollections; std::vector<RimSummaryCaseMainCollection*> summaryCaseMainCollections;
caf::SelectionManager::instance()->objectsByType(&summaryCaseCollections); caf::SelectionManager::instance()->objectsByType(&summaryCaseMainCollections);
for (RimSummaryCaseCollection* summaryCaseCollection : summaryCaseCollections) for (RimSummaryCaseMainCollection* summaryCaseCollection : summaryCaseMainCollections)
{ {
std::vector<RimSummaryCase*> summaryCasesFromCollection; std::vector<RimSummaryCase*> summaryCasesFromCollection;

View File

@ -23,7 +23,7 @@
#include "RimMainPlotCollection.h" #include "RimMainPlotCollection.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimSummaryCase.h" #include "RimSummaryCase.h"
#include "RimSummaryCaseCollection.h" #include "RimSummaryCaseMainCollection.h"
#include "RimSummaryPlot.h" #include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h" #include "RimSummaryPlotCollection.h"
@ -69,12 +69,12 @@ void RicCloseSummaryCaseFeature::deleteSummaryCases(const std::vector<RimSummary
} }
summaryPlotColl->updateConnectedEditors(); summaryPlotColl->updateConnectedEditors();
RimSummaryCaseCollection* summaryCaseCollection = nullptr; RimSummaryCaseMainCollection* summaryCaseMainCollection = nullptr;
summaryCase->firstAncestorOrThisOfTypeAsserted(summaryCaseCollection); summaryCase->firstAncestorOrThisOfTypeAsserted(summaryCaseMainCollection);
summaryCaseCollection->deleteCase(summaryCase); summaryCaseMainCollection->deleteCase(summaryCase);
delete summaryCase; delete summaryCase;
summaryCaseCollection->updateConnectedEditors(); summaryCaseMainCollection->updateConnectedEditors();
} }
} }

View File

@ -26,7 +26,7 @@
#include "RimOilField.h" #include "RimOilField.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimSummaryCase.h" #include "RimSummaryCase.h"
#include "RimSummaryCaseCollection.h" #include "RimSummaryCaseMainCollection.h"
#include "RimSummaryPlotCollection.h" #include "RimSummaryPlotCollection.h"
#include "RiuMainWindow.h" #include "RiuMainWindow.h"
@ -62,7 +62,7 @@ void RicImportSummaryCaseFeature::onActionTriggered(bool isChecked)
RimProject* proj = app->project(); RimProject* proj = app->project();
RimSummaryCaseCollection* sumCaseColl = proj->activeOilField() ? proj->activeOilField()->summaryCaseCollection() : nullptr; RimSummaryCaseMainCollection* sumCaseColl = proj->activeOilField() ? proj->activeOilField()->summaryCaseMainCollection() : nullptr;
if (!sumCaseColl) return; if (!sumCaseColl) return;
for (auto f : fileNames) for (auto f : fileNames)
@ -97,7 +97,7 @@ bool RicImportSummaryCaseFeature::createAndAddSummaryCaseFromFile(const QString&
{ {
RiaApplication* app = RiaApplication::instance(); RiaApplication* app = RiaApplication::instance();
RimProject* proj = app->project(); RimProject* proj = app->project();
RimSummaryCaseCollection* sumCaseColl = proj->activeOilField() ? proj->activeOilField()->summaryCaseCollection() : nullptr; RimSummaryCaseMainCollection* sumCaseColl = proj->activeOilField() ? proj->activeOilField()->summaryCaseMainCollection() : nullptr;
if (!sumCaseColl) return false; if (!sumCaseColl) return false;
RimSummaryCase* newSumCase = sumCaseColl->createAndAddSummaryCaseFromFileName(fileName); RimSummaryCase* newSumCase = sumCaseColl->createAndAddSummaryCaseFromFileName(fileName);

View File

@ -24,7 +24,7 @@
#include "RimMainPlotCollection.h" #include "RimMainPlotCollection.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimSummaryCase.h" #include "RimSummaryCase.h"
#include "RimSummaryCaseCollection.h" #include "RimSummaryCaseMainCollection.h"
#include "RimSummaryPlot.h" #include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h" #include "RimSummaryPlotCollection.h"
@ -90,14 +90,14 @@ std::vector<RimSummaryCase*> RicReloadSummaryCaseFeature::selectedSummaryCases()
std::vector<RimSummaryCase*> caseSelection; std::vector<RimSummaryCase*> caseSelection;
caf::SelectionManager::instance()->objectsByType(&caseSelection); caf::SelectionManager::instance()->objectsByType(&caseSelection);
std::vector<RimSummaryCaseCollection*> collectionSelection; std::vector<RimSummaryCaseMainCollection*> mainCollectionSelection;
caf::SelectionManager::instance()->objectsByType(&collectionSelection); 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));
} }
} }

View File

@ -32,7 +32,7 @@
#include "RimGridTimeHistoryCurve.h" #include "RimGridTimeHistoryCurve.h"
#include "RimMainPlotCollection.h" #include "RimMainPlotCollection.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimSummaryCaseCollection.h" #include "RimSummaryCaseMainCollection.h"
#include "RimSummaryPlot.h" #include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h" #include "RimSummaryPlotCollection.h"

View File

@ -23,7 +23,7 @@
#include "RimMainPlotCollection.h" #include "RimMainPlotCollection.h"
#include "RimOilField.h" #include "RimOilField.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimSummaryCaseCollection.h" #include "RimSummaryCaseMainCollection.h"
#include "RimSummaryCurve.h" #include "RimSummaryCurve.h"
#include "RimSummaryPlot.h" #include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h" #include "RimSummaryPlotCollection.h"
@ -73,9 +73,9 @@ void RicNewSummaryCurveFeature::onActionTriggered(bool isChecked)
plot->addCurve(newCurve); plot->addCurve(newCurve);
RimSummaryCase* defaultCase = nullptr; 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->setSummaryCase(defaultCase);
newCurve->setSummaryAddress(RifEclipseSummaryAddress::fieldVarAddress("FOPT")); newCurve->setSummaryAddress(RifEclipseSummaryAddress::fieldVarAddress("FOPT"));

View File

@ -23,7 +23,7 @@
#include "RimMainPlotCollection.h" #include "RimMainPlotCollection.h"
#include "RimOilField.h" #include "RimOilField.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimSummaryCaseCollection.h" #include "RimSummaryCaseMainCollection.h"
#include "RimSummaryCurve.h" #include "RimSummaryCurve.h"
#include "RimSummaryCurveFilter.h" #include "RimSummaryCurveFilter.h"
#include "RimSummaryPlot.h" #include "RimSummaryPlot.h"

View File

@ -28,7 +28,7 @@
#endif // USE_PROTOTYPE_FEATURE_FRACTURES #endif // USE_PROTOTYPE_FEATURE_FRACTURES
#include "RimGeoMechModels.h" #include "RimGeoMechModels.h"
#include "RimSummaryCaseCollection.h" #include "RimSummaryCaseMainCollection.h"
#include "RimWellPathCollection.h" #include "RimWellPathCollection.h"
@ -48,7 +48,7 @@ RimOilField::RimOilField(void)
CAF_PDM_InitFieldNoDefault(&fractureDefinitionCollection, "FractureDefinitionCollection", "Defenition of fractures", "", "", ""); CAF_PDM_InitFieldNoDefault(&fractureDefinitionCollection, "FractureDefinitionCollection", "Defenition of fractures", "", "", "");
#endif // USE_PROTOTYPE_FEATURE_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","","",""); CAF_PDM_InitFieldNoDefault(&formationNamesCollection,"FormationNamesCollection","Formations","","","");
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES #ifdef USE_PROTOTYPE_FEATURE_FRACTURES
@ -57,7 +57,7 @@ RimOilField::RimOilField(void)
analysisModels = new RimEclipseCaseCollection(); analysisModels = new RimEclipseCaseCollection();
wellPathCollection = new RimWellPathCollection(); wellPathCollection = new RimWellPathCollection();
summaryCaseCollection = new RimSummaryCaseCollection(); summaryCaseMainCollection = new RimSummaryCaseMainCollection();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -73,7 +73,7 @@ RimOilField::~RimOilField(void)
if (geoMechModels()) delete geoMechModels(); if (geoMechModels()) delete geoMechModels();
if (analysisModels()) delete analysisModels(); if (analysisModels()) delete analysisModels();
if (summaryCaseCollection()) delete summaryCaseCollection(); if (summaryCaseMainCollection()) delete summaryCaseMainCollection();
if (formationNamesCollection()) delete formationNamesCollection(); if (formationNamesCollection()) delete formationNamesCollection();
} }

View File

@ -29,7 +29,7 @@ class RimEclipseCaseCollection;
class RimGeoMechModels; class RimGeoMechModels;
class RimWellPathCollection; class RimWellPathCollection;
class RimFractureTemplateCollection; class RimFractureTemplateCollection;
class RimSummaryCaseCollection; class RimSummaryCaseMainCollection;
class RimFormationNamesCollection; class RimFormationNamesCollection;
//================================================================================================== //==================================================================================================
@ -47,8 +47,8 @@ public:
caf::PdmChildField<RimEclipseCaseCollection*> analysisModels; caf::PdmChildField<RimEclipseCaseCollection*> analysisModels;
caf::PdmChildField<RimGeoMechModels*> geoMechModels; caf::PdmChildField<RimGeoMechModels*> geoMechModels;
caf::PdmChildField<RimWellPathCollection*> wellPathCollection; caf::PdmChildField<RimWellPathCollection*> wellPathCollection;
caf::PdmChildField<RimFractureTemplateCollection*> fractureDefinitionCollection; caf::PdmChildField<RimFractureTemplateCollection*> fractureDefinitionCollection;
caf::PdmChildField<RimSummaryCaseCollection*> summaryCaseCollection; caf::PdmChildField<RimSummaryCaseMainCollection*> summaryCaseMainCollection;
caf::PdmChildField<RimFormationNamesCollection*> formationNamesCollection; caf::PdmChildField<RimFormationNamesCollection*> formationNamesCollection;
}; };

View File

@ -49,7 +49,7 @@
#include "RimMultiSnapshotDefinition.h" #include "RimMultiSnapshotDefinition.h"
#include "RimOilField.h" #include "RimOilField.h"
#include "RimScriptCollection.h" #include "RimScriptCollection.h"
#include "RimSummaryCaseCollection.h" #include "RimSummaryCaseMainCollection.h"
#include "RimSummaryPlotCollection.h" #include "RimSummaryPlotCollection.h"
#include "RimView.h" #include "RimView.h"
#include "RimViewLinker.h" #include "RimViewLinker.h"
@ -439,8 +439,8 @@ void RimProject::setProjectFileNameAndUpdateDependencies(const QString& fileName
{ {
oilField->formationNamesCollection()->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath); oilField->formationNamesCollection()->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath);
} }
if (oilField->summaryCaseCollection() != NULL) { if (oilField->summaryCaseMainCollection() != NULL) {
oilField->summaryCaseCollection()->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath); oilField->summaryCaseMainCollection()->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath);
} }
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES #ifdef USE_PROTOTYPE_FEATURE_FRACTURES
@ -538,12 +538,12 @@ void RimProject::allSummaryCases(std::vector<RimSummaryCase*>& sumCases)
for (RimOilField* oilField: oilFields) for (RimOilField* oilField: oilFields)
{ {
if(!oilField) continue; if(!oilField) continue;
RimSummaryCaseCollection* sumCaseColl = oilField->summaryCaseCollection(); RimSummaryCaseMainCollection* sumCaseMainColl = oilField->summaryCaseMainCollection();
if(sumCaseColl) 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(); RimOilField* oilField = activeOilField();
if (oilField) if (oilField)
{ {
if (oilField->summaryCaseCollection()) uiTreeOrdering.add(oilField->summaryCaseCollection()); if (oilField->summaryCaseMainCollection()) uiTreeOrdering.add(oilField->summaryCaseMainCollection());
} }
if (mainPlotCollection) if (mainPlotCollection)

View File

@ -9,7 +9,7 @@ ${CEE_CURRENT_LIST_DIR}RimAsciiDataCurve.h
${CEE_CURRENT_LIST_DIR}RimFileSummaryCase.h ${CEE_CURRENT_LIST_DIR}RimFileSummaryCase.h
${CEE_CURRENT_LIST_DIR}RimGridSummaryCase.h ${CEE_CURRENT_LIST_DIR}RimGridSummaryCase.h
${CEE_CURRENT_LIST_DIR}RimSummaryCase.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}RimSummaryCurve.h
${CEE_CURRENT_LIST_DIR}RimSummaryCurveAppearanceCalculator.h ${CEE_CURRENT_LIST_DIR}RimSummaryCurveAppearanceCalculator.h
${CEE_CURRENT_LIST_DIR}RimSummaryCurveAutoName.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}RimFileSummaryCase.cpp
${CEE_CURRENT_LIST_DIR}RimGridSummaryCase.cpp ${CEE_CURRENT_LIST_DIR}RimGridSummaryCase.cpp
${CEE_CURRENT_LIST_DIR}RimSummaryCase.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}RimSummaryCurve.cpp
${CEE_CURRENT_LIST_DIR}RimSummaryCurveAppearanceCalculator.cpp ${CEE_CURRENT_LIST_DIR}RimSummaryCurveAppearanceCalculator.cpp
${CEE_CURRENT_LIST_DIR}RimSummaryCurveAutoName.cpp ${CEE_CURRENT_LIST_DIR}RimSummaryCurveAutoName.cpp

View File

@ -20,7 +20,7 @@
#include "RigSummaryCaseData.h" #include "RigSummaryCaseData.h"
#include "RimEclipseCase.h" #include "RimEclipseCase.h"
#include "RimSummaryCaseCollection.h" #include "RimSummaryCaseMainCollection.h"
#include <QFileInfo> #include <QFileInfo>
#include "RimProject.h" #include "RimProject.h"
@ -147,11 +147,11 @@ void RimSummaryCase::updateAutoShortName()
{ {
if(m_useAutoShortName) if(m_useAutoShortName)
{ {
RimSummaryCaseCollection* summaryCaseCollection = NULL; RimSummaryCaseMainCollection* summaryCaseMainCollection = NULL;
this->firstAncestorOrThisOfType(summaryCaseCollection); this->firstAncestorOrThisOfType(summaryCaseMainCollection);
CVF_ASSERT(summaryCaseCollection); CVF_ASSERT(summaryCaseMainCollection);
m_shortName = summaryCaseCollection->uniqueShortNameForCase(this); m_shortName = summaryCaseMainCollection->uniqueShortNameForCase(this);
updateTreeItemName(); updateTreeItemName();
} }
else if (m_shortName() == QString("Display Name")) else if (m_shortName() == QString("Display Name"))

View File

@ -15,7 +15,7 @@
// for more details. // for more details.
// //
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
#include "RimSummaryCaseCollection.h" #include "RimSummaryCaseMainCollection.h"
#include "RifEclipseSummaryTools.h" #include "RifEclipseSummaryTools.h"
#include "RimEclipseResultCase.h" #include "RimEclipseResultCase.h"
@ -28,12 +28,12 @@
#include <QDir> #include <QDir>
CAF_PDM_SOURCE_INIT(RimSummaryCaseCollection,"SummaryCaseCollection"); CAF_PDM_SOURCE_INIT(RimSummaryCaseMainCollection,"SummaryCaseCollection");
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimSummaryCaseCollection::RimSummaryCaseCollection() RimSummaryCaseMainCollection::RimSummaryCaseMainCollection()
{ {
CAF_PDM_InitObject("Summary Cases",":/Cases16x16.png","",""); CAF_PDM_InitObject("Summary Cases",":/Cases16x16.png","","");
@ -45,7 +45,7 @@ RimSummaryCaseCollection::RimSummaryCaseCollection()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimSummaryCaseCollection::~RimSummaryCaseCollection() RimSummaryCaseMainCollection::~RimSummaryCaseMainCollection()
{ {
m_cases.deleteAllChildObjects(); m_cases.deleteAllChildObjects();
} }
@ -53,7 +53,7 @@ RimSummaryCaseCollection::~RimSummaryCaseCollection()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimSummaryCaseCollection::createSummaryCasesFromRelevantEclipseResultCases() void RimSummaryCaseMainCollection::createSummaryCasesFromRelevantEclipseResultCases()
{ {
RimProject* proj = nullptr; RimProject* proj = nullptr;
firstAncestorOrThisOfType(proj); 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) 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 \\ // 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); 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]; 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(); return m_cases.size();
} }
@ -165,7 +165,7 @@ size_t RimSummaryCaseCollection::summaryCaseCount()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimSummaryCaseCollection::loadAllSummaryCaseData() void RimSummaryCaseMainCollection::loadAllSummaryCaseData()
{ {
for (RimSummaryCase* sumCase: m_cases) 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(); QString gridFileName = eclResCase->gridFileName();
if(RifEclipseSummaryTools::hasSummaryFiles(QDir::toNativeSeparators(gridFileName).toStdString())) 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(); RimFileSummaryCase* newSumCase = new RimFileSummaryCase();
@ -207,7 +207,7 @@ RimSummaryCase* RimSummaryCaseCollection::createAndAddSummaryCaseFromFileName(co
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
QString RimSummaryCaseCollection::uniqueShortNameForCase(RimSummaryCase* summaryCase) QString RimSummaryCaseMainCollection::uniqueShortNameForCase(RimSummaryCase* summaryCase)
{ {
std::set<QString> allAutoShortNames; std::set<QString> 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) for (auto summaryCase : m_cases)
{ {

View File

@ -23,12 +23,12 @@
class RimSummaryCase; class RimSummaryCase;
class RimEclipseResultCase; class RimEclipseResultCase;
class RimSummaryCaseCollection : public caf::PdmObject class RimSummaryCaseMainCollection : public caf::PdmObject
{ {
CAF_PDM_HEADER_INIT; CAF_PDM_HEADER_INIT;
public: public:
RimSummaryCaseCollection(); RimSummaryCaseMainCollection();
virtual ~RimSummaryCaseCollection(); virtual ~RimSummaryCaseMainCollection();
RimSummaryCase* summaryCase(size_t idx); RimSummaryCase* summaryCase(size_t idx);
size_t summaryCaseCount(); size_t summaryCaseCount();