From f3f2cf15901b0d3d55ae7edfdab5670e5848c799 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Mon, 26 Oct 2015 10:16:27 +0100 Subject: [PATCH] System : Removed unused functions --- .../RimWellLogPlotCollection.cpp | 19 ----------- .../RimWellLogPlotCollection.h | 2 -- .../RigCaseCellResultsData.cpp | 19 ----------- .../RigCaseCellResultsData.h | 1 - .../RigCaseToCaseCellMapper.cpp | 16 --------- .../RigCaseToCaseCellMapper.h | 1 - .../UserInterface/RiuMainWindow.cpp | 34 +------------------ ApplicationCode/UserInterface/RiuMainWindow.h | 1 - 8 files changed, 1 insertion(+), 92 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimWellLogPlotCollection.cpp b/ApplicationCode/ProjectDataModel/RimWellLogPlotCollection.cpp index c5ad814ff0..2b9d42d520 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogPlotCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogPlotCollection.cpp @@ -108,25 +108,6 @@ RigGeoMechWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor(RimW return extractor.p(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimWellLogPlot* RimWellLogPlotCollection::wellLogPlotFromViewer(RiuWellLogPlot* viewer) const -{ - CVF_ASSERT(viewer); - - for (size_t pIdx = 0; pIdx < wellLogPlots.size(); pIdx++) - { - RimWellLogPlot* wellLogPlot = wellLogPlots[pIdx]; - if (wellLogPlot->viewer() == viewer) - { - return wellLogPlot; - } - } - - return NULL; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimWellLogPlotCollection.h b/ApplicationCode/ProjectDataModel/RimWellLogPlotCollection.h index 5510f5fe33..dbd475c392 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogPlotCollection.h +++ b/ApplicationCode/ProjectDataModel/RimWellLogPlotCollection.h @@ -53,8 +53,6 @@ public: void removeExtractors(const RigCaseData* caseData); void removeExtractors(const RigGeoMechCaseData* caseData); - RimWellLogPlot* wellLogPlotFromViewer(RiuWellLogPlot* viewer) const; - caf::PdmChildArrayField wellLogPlots; private: cvf::Collection m_extractors; diff --git a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp index 4496cfe77e..10e2a61c47 100644 --- a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp +++ b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp @@ -152,25 +152,6 @@ std::vector& RigCaseCellResultsData::cellScalarResults(size_t scalarResu return m_cellScalarResults[scalarResultIndex][timeStepIndex]; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -double RigCaseCellResultsData::cellScalarResult( size_t scalarResultIndex, size_t timeStepIndex, size_t resultValueIndex) -{ - if (scalarResultIndex < resultCount() && - timeStepIndex < m_cellScalarResults[scalarResultIndex].size() && - resultValueIndex != cvf::UNDEFINED_SIZE_T && - resultValueIndex < m_cellScalarResults[scalarResultIndex][timeStepIndex].size()) - { - return m_cellScalarResults[scalarResultIndex][timeStepIndex][resultValueIndex]; - } - else - { - return HUGE_VAL; - } -} - - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h index 461339bc77..a772be7f47 100644 --- a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h +++ b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h @@ -87,7 +87,6 @@ public: const std::vector< std::vector > & cellScalarResults(size_t scalarResultIndex) const; std::vector< std::vector > & cellScalarResults(size_t scalarResultIndex); std::vector& cellScalarResults(size_t scalarResultIndex, size_t timeStepIndex); - double cellScalarResult(size_t scalarResultIndex, size_t timeStepIndex, size_t resultValueIndex); static RifReaderInterface::PorosityModelResultType convertFromProjectModelPorosityModel(RimDefines::PorosityModelType porosityModel); diff --git a/ApplicationCode/ReservoirDataModel/RigCaseToCaseCellMapper.cpp b/ApplicationCode/ReservoirDataModel/RigCaseToCaseCellMapper.cpp index 3c5c9bece9..2bdf14543f 100644 --- a/ApplicationCode/ReservoirDataModel/RigCaseToCaseCellMapper.cpp +++ b/ApplicationCode/ReservoirDataModel/RigCaseToCaseCellMapper.cpp @@ -102,22 +102,6 @@ const int * RigCaseToCaseCellMapper::masterCaseCellIndices(int dependentCaseRese } } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigCaseToCaseCellMapper::storeMapping(int depCaseCellIdx, const std::vector& masterCaseMatchingCells) -{ - if (masterCaseMatchingCells.size() == 1) - { - m_masterCellOrIntervalIndex[depCaseCellIdx] = masterCaseMatchingCells[0]; - } - else if (masterCaseMatchingCells.size() > 1) - { - m_masterCellOrIntervalIndex[depCaseCellIdx] = -((int)(m_masterCellIndexSeries.size())); - m_masterCellIndexSeries.push_back(masterCaseMatchingCells); - } -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ReservoirDataModel/RigCaseToCaseCellMapper.h b/ApplicationCode/ReservoirDataModel/RigCaseToCaseCellMapper.h index 52371bb56b..b81bc1c03a 100644 --- a/ApplicationCode/ReservoirDataModel/RigCaseToCaseCellMapper.h +++ b/ApplicationCode/ReservoirDataModel/RigCaseToCaseCellMapper.h @@ -50,7 +50,6 @@ public: private: - void storeMapping(int depCaseCellIdx, const std::vector& masterCaseMatchingCells); void addMapping(int depCaseCellIdx, int masterCaseMatchingCell); void calculateEclToGeomCellMapping(RigMainGrid* masterEclGrid, RigFemPart* dependentFemPart, bool eclipseIsMaster); diff --git a/ApplicationCode/UserInterface/RiuMainWindow.cpp b/ApplicationCode/UserInterface/RiuMainWindow.cpp index 2e18de7375..7b0e31a19a 100644 --- a/ApplicationCode/UserInterface/RiuMainWindow.cpp +++ b/ApplicationCode/UserInterface/RiuMainWindow.cpp @@ -1057,7 +1057,7 @@ bool RiuMainWindow::checkForDocumentModifications() void RiuMainWindow::slotCloseProject() { RiaApplication* app = RiaApplication::instance(); - bool ret = app->closeProject(true); + app->closeProject(true); } //-------------------------------------------------------------------------------------------------- @@ -2165,38 +2165,6 @@ void RiuMainWindow::slotOpenUsersGuideInBrowserAction() } } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuMainWindow::appendActionsContextMenuForPdmObject(caf::PdmObjectHandle* pdmObject, QMenu* menu) -{ - if (!menu) - { - return; - } - - caf::CmdFeatureManager* cmdFeatureMgr = caf::CmdFeatureManager::instance(); - CVF_ASSERT(cmdFeatureMgr); - - if (dynamic_cast(pdmObject)) - { - menu->addAction(cmdFeatureMgr->action("RicWellPathsImportFileFeature")); - menu->addAction(cmdFeatureMgr->action("RicWellPathsImportSsihubFeature")); - } - else if (dynamic_cast(pdmObject)) - { - menu->addAction(cmdFeatureMgr->action("RicImportEclipseCaseFeature")); - menu->addAction(cmdFeatureMgr->action("RicImportInputEclipseCaseFeature")); - menu->addAction(cmdFeatureMgr->action("RicCreateGridCaseGroupFeature")); - } - else if (dynamic_cast(pdmObject)) - { - #ifdef USE_ODB_API - menu->addAction(m_importGeoMechCaseAction); - #endif - } -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/UserInterface/RiuMainWindow.h b/ApplicationCode/UserInterface/RiuMainWindow.h index 970d3b39cb..5c77f77aa8 100644 --- a/ApplicationCode/UserInterface/RiuMainWindow.h +++ b/ApplicationCode/UserInterface/RiuMainWindow.h @@ -102,7 +102,6 @@ public: void setDefaultWindowSize(); - void appendActionsContextMenuForPdmObject(caf::PdmObjectHandle* pdmObject, QMenu* menu); void refreshDrawStyleActions(); void setExpanded(const caf::PdmUiItem* uiItem, bool expanded);