diff --git a/ApplicationCode/Application/RiaDefines.cpp b/ApplicationCode/Application/RiaDefines.cpp index f6ff145adf..5ea0f2071d 100644 --- a/ApplicationCode/Application/RiaDefines.cpp +++ b/ApplicationCode/Application/RiaDefines.cpp @@ -60,7 +60,7 @@ namespace caf } template<> - void caf::AppEnum< RiaDefines::CompletionType >::setUp() + void caf::AppEnum< RiaDefines::WellPathComponentType >::setUp() { addItem(RiaDefines::WELL_PATH, "WELL_PATH", "Well Path"); addItem(RiaDefines::CASING, "CASING", "Casing"); diff --git a/ApplicationCode/Application/RiaDefines.h b/ApplicationCode/Application/RiaDefines.h index f0698716b0..c642221479 100644 --- a/ApplicationCode/Application/RiaDefines.h +++ b/ApplicationCode/Application/RiaDefines.h @@ -40,7 +40,7 @@ namespace RiaDefines UNDEFINED = 999 }; - enum CompletionType { + enum WellPathComponentType { // Well path construction features WELL_PATH, CASING, diff --git a/ApplicationCode/Commands/WellPathCommands/RicNewWellPathAttributeFeature.cpp b/ApplicationCode/Commands/WellPathCommands/RicNewWellPathAttributeFeature.cpp index cbed32b3c5..a8a69d0c7a 100644 --- a/ApplicationCode/Commands/WellPathCommands/RicNewWellPathAttributeFeature.cpp +++ b/ApplicationCode/Commands/WellPathCommands/RicNewWellPathAttributeFeature.cpp @@ -99,7 +99,7 @@ void RicNewWellPathAttributeFeature::setupActionLook(QAction* actionToSetup) caf::SelectionManager::instance()->objectsByType(&attributes, caf::SelectionManager::FIRST_LEVEL); if (attributes.size() == 1u) { - actionToSetup->setText(QString("Insert New Attribute before %1").arg(attributes[0]->completionTypeLabel())); + actionToSetup->setText(QString("Insert New Attribute before %1").arg(attributes[0]->componentTypeLabel())); actionToSetup->setIcon(QIcon(":/Well.png")); } else diff --git a/ApplicationCode/ProjectDataModel/Completions/CMakeLists_files.cmake b/ApplicationCode/ProjectDataModel/Completions/CMakeLists_files.cmake index cc6fb30b04..0a2b48be6e 100644 --- a/ApplicationCode/ProjectDataModel/Completions/CMakeLists_files.cmake +++ b/ApplicationCode/ProjectDataModel/Completions/CMakeLists_files.cmake @@ -24,6 +24,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RimWellPathFractureCollection.h ${CMAKE_CURRENT_LIST_DIR}/Rim3dWellLogCurveCollection.h ${CMAKE_CURRENT_LIST_DIR}/RimMswCompletionParameters.h ${CMAKE_CURRENT_LIST_DIR}/RimNonDarcyPerforationParameters.h +${CMAKE_CURRENT_LIST_DIR}/RimWellPathComponentInterface.h ) diff --git a/ApplicationCode/ProjectDataModel/Completions/RimCompletionCellIntersectionCalc.cpp b/ApplicationCode/ProjectDataModel/Completions/RimCompletionCellIntersectionCalc.cpp index aa0638dfcc..05b701dacf 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimCompletionCellIntersectionCalc.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimCompletionCellIntersectionCalc.cpp @@ -34,9 +34,9 @@ //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::vector fromCompletionData(const std::vector& data) +std::vector fromCompletionData(const std::vector& data) { - std::vector appCompletionTypes; + std::vector appCompletionTypes; for (const auto& d : data) { @@ -92,7 +92,7 @@ void RimCompletionCellIntersectionCalc::calculateCompletionTypeResult(RimEclipse { for (const auto& completionsForWell : completions->multipleCompletionsPerEclipseCell(wellPath, timeStep)) { - RiaDefines::CompletionType appCompletionType = RiaDefines::WELL_PATH; + RiaDefines::WellPathComponentType appCompletionType = RiaDefines::WELL_PATH; auto appCompletionTypes = fromCompletionData(completionsForWell.second); diff --git a/ApplicationCode/ProjectDataModel/Completions/RimFishbonesMultipleSubs.cpp b/ApplicationCode/ProjectDataModel/Completions/RimFishbonesMultipleSubs.cpp index 24eed41152..a897674d12 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimFishbonesMultipleSubs.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimFishbonesMultipleSubs.cpp @@ -403,7 +403,7 @@ void RimFishbonesMultipleSubs::setUnitSystemSpecificDefaults() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RiaDefines::CompletionType RimFishbonesMultipleSubs::type() const +RiaDefines::WellPathComponentType RimFishbonesMultipleSubs::componentType() const { return RiaDefines::FISHBONES; } @@ -439,7 +439,7 @@ double RimFishbonesMultipleSubs::endMD() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RimFishbonesMultipleSubs::completionLabel() const +QString RimFishbonesMultipleSubs::componentLabel() const { return generatedName(); } @@ -447,7 +447,7 @@ QString RimFishbonesMultipleSubs::completionLabel() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RimFishbonesMultipleSubs::completionTypeLabel() const +QString RimFishbonesMultipleSubs::componentTypeLabel() const { return "Fishbones"; } diff --git a/ApplicationCode/ProjectDataModel/Completions/RimFishbonesMultipleSubs.h b/ApplicationCode/ProjectDataModel/Completions/RimFishbonesMultipleSubs.h index a17a060440..6de03dbd6a 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimFishbonesMultipleSubs.h +++ b/ApplicationCode/ProjectDataModel/Completions/RimFishbonesMultipleSubs.h @@ -23,7 +23,7 @@ #include "RimCheckableNamedObject.h" #include "Rim3dPropertiesInterface.h" #include "RimFishbonesPipeProperties.h" -#include "RimWellPathCompletionInterface.h" +#include "RimWellPathComponentInterface.h" #include "cvfBase.h" #include "cvfVector3.h" @@ -52,7 +52,7 @@ struct SubLateralIndex { /// /// //================================================================================================== -class RimFishbonesMultipleSubs : public caf::PdmObject, public Rim3dPropertiesInterface, public RimWellPathCompletionInterface +class RimFishbonesMultipleSubs : public caf::PdmObject, public Rim3dPropertiesInterface, public RimWellPathComponentInterface { CAF_PDM_HEADER_INIT; @@ -106,11 +106,11 @@ public: virtual cvf::BoundingBox boundingBoxInDomainCoords() const override; // Overrides from RimWellPathCompletionsInterface - virtual RiaDefines::CompletionType type() const override; - virtual double startMD() const override; - virtual double endMD() const override; - virtual QString completionLabel() const override; - virtual QString completionTypeLabel() const override; + virtual RiaDefines::WellPathComponentType componentType() const override; + virtual double startMD() const override; + virtual double endMD() const override; + virtual QString componentLabel() const override; + virtual QString componentTypeLabel() const override; public: diff --git a/ApplicationCode/ProjectDataModel/Completions/RimFracture.cpp b/ApplicationCode/ProjectDataModel/Completions/RimFracture.cpp index be8add2ee5..5fd1a45093 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimFracture.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimFracture.cpp @@ -288,7 +288,7 @@ void RimFracture::clearCachedNonDarcyProperties() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RiaDefines::CompletionType RimFracture::type() const +RiaDefines::WellPathComponentType RimFracture::componentType() const { return RiaDefines::FRACTURE; } @@ -326,7 +326,7 @@ double RimFracture::endMD() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RimFracture::completionLabel() const +QString RimFracture::componentLabel() const { return name(); } @@ -334,7 +334,7 @@ QString RimFracture::completionLabel() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RimFracture::completionTypeLabel() const +QString RimFracture::componentTypeLabel() const { return "Fracture"; } diff --git a/ApplicationCode/ProjectDataModel/Completions/RimFracture.h b/ApplicationCode/ProjectDataModel/Completions/RimFracture.h index 40f32e2457..2f8aee7ab3 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimFracture.h +++ b/ApplicationCode/ProjectDataModel/Completions/RimFracture.h @@ -22,7 +22,7 @@ #include "Rim3dPropertiesInterface.h" #include "RimCheckableNamedObject.h" -#include "RimWellPathCompletionInterface.h" +#include "RimWellPathComponentInterface.h" #include "cvfBase.h" #include "cvfObject.h" @@ -74,7 +74,7 @@ public: /// /// //================================================================================================== -class RimFracture : public RimCheckableNamedObject, public Rim3dPropertiesInterface, public RimWellPathCompletionInterface +class RimFracture : public RimCheckableNamedObject, public Rim3dPropertiesInterface, public RimWellPathComponentInterface { CAF_PDM_HEADER_INIT; @@ -129,11 +129,11 @@ public: friend class RimFractureTemplate; // RimWellPathCompletionsInterface overrides. - virtual RiaDefines::CompletionType type() const override; - virtual double startMD() const override; - virtual double endMD() const override; - virtual QString completionLabel() const override; - virtual QString completionTypeLabel() const override; + virtual RiaDefines::WellPathComponentType componentType() const override; + virtual double startMD() const override; + virtual double endMD() const override; + virtual QString componentLabel() const override; + virtual QString componentTypeLabel() const override; protected: virtual QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override; diff --git a/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.cpp b/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.cpp index 89981dabe9..ce3e4415cb 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.cpp @@ -208,7 +208,7 @@ void RimPerforationInterval::setUnitSystemSpecificDefaults() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RiaDefines::CompletionType RimPerforationInterval::type() const +RiaDefines::WellPathComponentType RimPerforationInterval::componentType() const { return RiaDefines::PERFORATION_INTERVAL; } @@ -232,7 +232,7 @@ double RimPerforationInterval::endMD() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RimPerforationInterval::completionLabel() const +QString RimPerforationInterval::componentLabel() const { return QString("Perforation Interval\n%1").arg(name()); } @@ -240,7 +240,7 @@ QString RimPerforationInterval::completionLabel() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RimPerforationInterval::completionTypeLabel() const +QString RimPerforationInterval::componentTypeLabel() const { return "Perforations"; } diff --git a/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.h b/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.h index f3eb8233a6..18101976b4 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.h +++ b/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.h @@ -21,7 +21,7 @@ #include "RimCheckableNamedObject.h" #include "Rim3dPropertiesInterface.h" -#include "RimWellPathCompletionInterface.h" +#include "RimWellPathComponentInterface.h" #include "RiaEclipseUnitTools.h" @@ -33,7 +33,7 @@ //================================================================================================== /// //================================================================================================== -class RimPerforationInterval : public RimCheckableNamedObject, public Rim3dPropertiesInterface, public RimWellPathCompletionInterface +class RimPerforationInterval : public RimCheckableNamedObject, public Rim3dPropertiesInterface, public RimWellPathComponentInterface { CAF_PDM_HEADER_INIT; public: @@ -61,11 +61,11 @@ public: void setUnitSystemSpecificDefaults(); // RimWellPathCompletionInterface overrides - virtual RiaDefines::CompletionType type() const override; - virtual double startMD() const; - virtual double endMD() const; - virtual QString completionLabel() const override; - virtual QString completionTypeLabel() const override; + virtual RiaDefines::WellPathComponentType componentType() const override; + virtual double startMD() const; + virtual double endMD() const; + virtual QString componentLabel() const override; + virtual QString componentTypeLabel() const override; protected: virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; diff --git a/ApplicationCode/ProjectDataModel/Completions/RimWellPathCompletions.cpp b/ApplicationCode/ProjectDataModel/Completions/RimWellPathCompletions.cpp index e9ccb83f69..88b62155fb 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimWellPathCompletions.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimWellPathCompletions.cpp @@ -27,7 +27,7 @@ #include "RimPerforationInterval.h" #include "RimWellPathFractureCollection.h" #include "RimWellPathFracture.h" -#include "RimWellPathCompletionInterface.h" +#include "RimWellPathComponentInterface.h" #include "cvfAssert.h" @@ -172,9 +172,9 @@ RimWellPathFractureCollection* RimWellPathCompletions::fractureCollection() cons //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::vector RimWellPathCompletions::allCompletions() const +std::vector RimWellPathCompletions::allCompletions() const { - std::vector completions; + std::vector completions; for (const RimWellPathFracture* fracture : fractureCollection()->allFractures()) { diff --git a/ApplicationCode/ProjectDataModel/Completions/RimWellPathCompletions.h b/ApplicationCode/ProjectDataModel/Completions/RimWellPathCompletions.h index e116f83db7..532c3098ed 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimWellPathCompletions.h +++ b/ApplicationCode/ProjectDataModel/Completions/RimWellPathCompletions.h @@ -25,7 +25,7 @@ class RimFishbonesCollection; class RimPerforationCollection; class RimWellPathFractureCollection; -class RimWellPathCompletionInterface; +class RimWellPathComponentInterface; //================================================================================================== @@ -46,7 +46,7 @@ public: RimPerforationCollection* perforationCollection() const; RimWellPathFractureCollection* fractureCollection() const; - std::vector allCompletions() const; + std::vector allCompletions() const; void setWellNameForExport(const QString& name); QString wellNameForExport() const; diff --git a/ApplicationCode/ProjectDataModel/Completions/RimWellPathCompletionInterface.h b/ApplicationCode/ProjectDataModel/Completions/RimWellPathComponentInterface.h similarity index 68% rename from ApplicationCode/ProjectDataModel/Completions/RimWellPathCompletionInterface.h rename to ApplicationCode/ProjectDataModel/Completions/RimWellPathComponentInterface.h index fe366a8ea3..89a62f2d60 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimWellPathCompletionInterface.h +++ b/ApplicationCode/ProjectDataModel/Completions/RimWellPathComponentInterface.h @@ -21,18 +21,18 @@ #include "RiaDefines.h" //================================================================================================== -// Interface implemented by all well path completions +// Interface implemented by all well path construction components and completions // // //================================================================================================== -class RimWellPathCompletionInterface +class RimWellPathComponentInterface { public: - virtual RiaDefines::CompletionType type() const = 0; - virtual double startMD() const = 0; - virtual double endMD() const = 0; - virtual QString completionLabel() const = 0; - virtual QString completionTypeLabel() const = 0; + virtual RiaDefines::WellPathComponentType componentType() const = 0; + virtual double startMD() const = 0; + virtual double endMD() const = 0; + virtual QString componentLabel() const = 0; + virtual QString componentTypeLabel() const = 0; }; diff --git a/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp b/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp index 96b97a45bd..3b4c5fc1ac 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp @@ -395,10 +395,10 @@ void RimEclipseCellColors::updateLegendData(size_t currentTimeStep, { std::vector< std::tuple > categories; - caf::AppEnum wellPath(RiaDefines::WELL_PATH); - caf::AppEnum fishbone(RiaDefines::FISHBONES); - caf::AppEnum perforationInterval(RiaDefines::PERFORATION_INTERVAL); - caf::AppEnum fracture(RiaDefines::FRACTURE); + caf::AppEnum wellPath(RiaDefines::WELL_PATH); + caf::AppEnum fishbone(RiaDefines::FISHBONES); + caf::AppEnum perforationInterval(RiaDefines::PERFORATION_INTERVAL); + caf::AppEnum fracture(RiaDefines::FRACTURE); const std::vector& visibleCatetories = cellResultsData->uniqueCellScalarValues(this->scalarResultIndex()); diff --git a/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.cpp b/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.cpp index ec2d91f925..c657e5e347 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.cpp @@ -390,7 +390,7 @@ void RimEclipsePropertyFilter::computeResultValueRange() else if (resultDefinition->resultVariable() == RiaDefines::completionTypeResultName()) { std::vector ctNames; - for (const QString& ctName : caf::AppEnum::uiTexts()) + for (const QString& ctName : caf::AppEnum::uiTexts()) { ctNames.push_back(ctName); } diff --git a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp index 480918a846..56d0dd74e7 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp @@ -65,7 +65,7 @@ #include "RiuMainWindow.h" #include "RiuPlotAnnotationTool.h" #include "RiuPlotMainWindowTools.h" -#include "RiuWellPathAttributePlotObject.h" +#include "RiuWellPathComponentPlotItem.h" #include "RiuWellLogPlot.h" #include "RiuWellLogTrack.h" @@ -714,7 +714,7 @@ void RimWellLogTrack::availableDepthRange(double* minimumDepth, double* maximumD if (m_showWellPathAttributes) { - for (cvf::ref plotObject : m_wellPathAttributePlotObjects) + for (const std::unique_ptr& plotObject : m_wellPathAttributePlotObjects) { double minObjectDepth = HUGE_VAL; double maxObjectDepth = -HUGE_VAL; @@ -971,7 +971,7 @@ void RimWellLogTrack::detachAllCurves() { curve->detachQwtCurve(); } - for (cvf::ref plotObjects : m_wellPathAttributePlotObjects) + for (auto& plotObjects : m_wellPathAttributePlotObjects) { plotObjects->detachFromQwt(); } @@ -986,7 +986,7 @@ void RimWellLogTrack::reattachAllCurves() { curve->reattachQwtCurve(); } - for (cvf::ref plotObjects : m_wellPathAttributePlotObjects) + for (auto& plotObjects : m_wellPathAttributePlotObjects) { plotObjects->reattachToQwt(); } @@ -1815,7 +1815,7 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot() if (m_showWellPathAttributes && wellPathAttributeSource()) { - m_wellPathAttributePlotObjects.push_back(new RiuWellPathAttributePlotObject(wellPathAttributeSource())); + m_wellPathAttributePlotObjects.push_back(std::unique_ptr(new RiuWellPathComponentPlotItem(wellPathAttributeSource()))); if (m_wellPathAttributeCollection) { @@ -1827,16 +1827,16 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot() for (RimWellPathAttribute* attribute : attributes) { - m_wellPathAttributePlotObjects.push_back(new RiuWellPathAttributePlotObject(wellPathAttributeSource(), attribute)); + m_wellPathAttributePlotObjects.push_back(std::unique_ptr(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), attribute))); } } if (m_showWellPathAttributesFromCompletions()) { const RimWellPathCompletions* completionsCollection = wellPathAttributeSource()->completions(); - std::vector allCompletions = completionsCollection->allCompletions(); - for (const RimWellPathCompletionInterface* completion : allCompletions) + std::vector allCompletions = completionsCollection->allCompletions(); + for (const RimWellPathComponentInterface* completion : allCompletions) { - m_wellPathAttributePlotObjects.push_back(new RiuWellPathAttributePlotObject(wellPathAttributeSource(), completion)); + m_wellPathAttributePlotObjects.push_back(std::unique_ptr(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), completion))); } } @@ -1846,7 +1846,7 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot() int index = 0; std::set attributesAssignedToLegend; - for (cvf::ref attributePlotObject : m_wellPathAttributePlotObjects) + for (auto& attributePlotObject : m_wellPathAttributePlotObjects) { cvf::Color3f attributeColor = cvf::Color3::LIGHT_GRAY; if (attributePlotObject->completionType() != RiaDefines::WELL_PATH) diff --git a/ApplicationCode/ProjectDataModel/RimWellLogTrack.h b/ApplicationCode/ProjectDataModel/RimWellLogTrack.h index 8cf4718ce6..e166d7a446 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogTrack.h +++ b/ApplicationCode/ProjectDataModel/RimWellLogTrack.h @@ -41,7 +41,7 @@ class RimWellFlowRateCurve; class RimWellLogCurve; class RimWellPath; class RiuPlotAnnotationTool; -class RiuWellPathAttributePlotObject; +class RiuWellPathComponentPlotItem; class RiuWellLogTrack; class RigEclipseWellLogExtractor; class RimWellLogPlotCollection; @@ -220,7 +220,7 @@ private: caf::PdmPtrField m_wellPathAttributeSource; caf::PdmPtrField m_wellPathAttributeCollection; - std::vector> m_wellPathAttributePlotObjects; + std::vector> m_wellPathAttributePlotObjects; bool m_formationsForCaseWithSimWellOnly; diff --git a/ApplicationCode/ProjectDataModel/RimWellPathAttribute.cpp b/ApplicationCode/ProjectDataModel/RimWellPathAttribute.cpp index 133e869a3d..3e29c0f87d 100644 --- a/ApplicationCode/ProjectDataModel/RimWellPathAttribute.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellPathAttribute.cpp @@ -72,9 +72,9 @@ QString RimWellPathAttribute::diameterLabel() const //-------------------------------------------------------------------------------------------------- bool RimWellPathAttribute::operator<(const RimWellPathAttribute& rhs) const { - if (type() != rhs.type()) + if (componentType() != rhs.componentType()) { - return type() < rhs.type(); + return componentType() < rhs.componentType(); } return endMD() > rhs.endMD(); } @@ -91,7 +91,7 @@ void RimWellPathAttribute::setDepthsFromWellPath(const RimWellPath* wellPath) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RiaDefines::CompletionType RimWellPathAttribute::type() const +RiaDefines::WellPathComponentType RimWellPathAttribute::componentType() const { return m_type(); } @@ -115,9 +115,9 @@ double RimWellPathAttribute::endMD() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RimWellPathAttribute::completionLabel() const +QString RimWellPathAttribute::componentLabel() const { - QString fullLabel = completionTypeLabel(); + QString fullLabel = componentTypeLabel(); if (m_type() == RiaDefines::CASING || m_type() == RiaDefines::LINER) { fullLabel += QString(" %1").arg(diameterLabel()); @@ -128,7 +128,7 @@ QString RimWellPathAttribute::completionLabel() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RimWellPathAttribute::completionTypeLabel() const +QString RimWellPathAttribute::componentTypeLabel() const { return m_type().uiText(); } @@ -149,8 +149,8 @@ QList RimWellPathAttribute::calculateValueOptions(const QList options; if (fieldNeedingOptions == &m_type) { - std::set supportedTypes = { RiaDefines::CASING, RiaDefines::LINER, RiaDefines::PACKER }; - for (RiaDefines::CompletionType type : supportedTypes) + std::set supportedTypes = { RiaDefines::CASING, RiaDefines::LINER, RiaDefines::PACKER }; + for (RiaDefines::WellPathComponentType type : supportedTypes) { options.push_back(caf::PdmOptionItemInfo(CompletionTypeEnum::uiText(type), type)); } diff --git a/ApplicationCode/ProjectDataModel/RimWellPathAttribute.h b/ApplicationCode/ProjectDataModel/RimWellPathAttribute.h index c92ba19733..b911f8d4b8 100644 --- a/ApplicationCode/ProjectDataModel/RimWellPathAttribute.h +++ b/ApplicationCode/ProjectDataModel/RimWellPathAttribute.h @@ -17,7 +17,7 @@ ///////////////////////////////////////////////////////////////////////////////// #pragma once -#include "RimWellPathCompletionInterface.h" +#include "RimWellPathComponentInterface.h" #include "cafPdmObject.h" @@ -29,13 +29,13 @@ class RimWellPath; -class RimWellPathAttribute : public caf::PdmObject, public RimWellPathCompletionInterface +class RimWellPathAttribute : public caf::PdmObject, public RimWellPathComponentInterface { CAF_PDM_HEADER_INIT; public: static double MAX_DIAMETER_IN_INCHES; static double MIN_DIAMETER_IN_INCHES; - typedef caf::AppEnum CompletionTypeEnum; + typedef caf::AppEnum CompletionTypeEnum; RimWellPathAttribute(); ~RimWellPathAttribute(); @@ -46,11 +46,11 @@ public: void setDepthsFromWellPath(const RimWellPath* wellPath); // Overrides from RimWellPathCompletionInterface - virtual RiaDefines::CompletionType type() const override; - virtual double startMD() const override; - virtual double endMD() const override; - virtual QString completionLabel() const override; - virtual QString completionTypeLabel() const override; + virtual RiaDefines::WellPathComponentType componentType() const override; + virtual double startMD() const override; + virtual double endMD() const override; + virtual QString componentLabel() const override; + virtual QString componentTypeLabel() const override; private: bool isDiameterSupported() const; diff --git a/ApplicationCode/UserInterface/CMakeLists_files.cmake b/ApplicationCode/UserInterface/CMakeLists_files.cmake index 117f789930..8999464694 100644 --- a/ApplicationCode/UserInterface/CMakeLists_files.cmake +++ b/ApplicationCode/UserInterface/CMakeLists_files.cmake @@ -75,7 +75,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RiuPlotMainWindowTools.h ${CMAKE_CURRENT_LIST_DIR}/Riu3DMainWindowTools.h ${CMAKE_CURRENT_LIST_DIR}/RiuDockWidgetTools.h ${CMAKE_CURRENT_LIST_DIR}/RiuQwtPlotItemGroup.h -${CMAKE_CURRENT_LIST_DIR}/RiuWellPathAttributePlotObject.h +${CMAKE_CURRENT_LIST_DIR}/RiuWellPathComponentPlotItem.h ) set (SOURCE_GROUP_SOURCE_FILES @@ -151,7 +151,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RiuPlotMainWindowTools.cpp ${CMAKE_CURRENT_LIST_DIR}/Riu3DMainWindowTools.cpp ${CMAKE_CURRENT_LIST_DIR}/RiuDockWidgetTools.cpp ${CMAKE_CURRENT_LIST_DIR}/RiuQwtPlotItemGroup.cpp -${CMAKE_CURRENT_LIST_DIR}/RiuWellPathAttributePlotObject.cpp +${CMAKE_CURRENT_LIST_DIR}/RiuWellPathComponentPlotItem.cpp ) list(APPEND CODE_HEADER_FILES diff --git a/ApplicationCode/UserInterface/RiuQwtPlotItemGroup.h b/ApplicationCode/UserInterface/RiuQwtPlotItemGroup.h index 48d8d049f8..a727037b39 100644 --- a/ApplicationCode/UserInterface/RiuQwtPlotItemGroup.h +++ b/ApplicationCode/UserInterface/RiuQwtPlotItemGroup.h @@ -43,7 +43,6 @@ public: virtual QwtGraphic legendIcon(int index, const QSizeF &size) const override; private: - std::vector m_plotItems; std::vector m_legendItems; }; diff --git a/ApplicationCode/UserInterface/RiuWellPathAttributePlotObject.cpp b/ApplicationCode/UserInterface/RiuWellPathComponentPlotItem.cpp similarity index 88% rename from ApplicationCode/UserInterface/RiuWellPathAttributePlotObject.cpp rename to ApplicationCode/UserInterface/RiuWellPathComponentPlotItem.cpp index 9456d6d913..67ed816aba 100644 --- a/ApplicationCode/UserInterface/RiuWellPathAttributePlotObject.cpp +++ b/ApplicationCode/UserInterface/RiuWellPathComponentPlotItem.cpp @@ -16,7 +16,7 @@ // ///////////////////////////////////////////////////////////////////////////////// -#include "RiuWellPathAttributePlotObject.h" +#include "RiuWellPathComponentPlotItem.h" #include "RiaColorTools.h" @@ -42,7 +42,7 @@ //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RiuWellPathAttributePlotObject::RiuWellPathAttributePlotObject(const RimWellPath* wellPath) +RiuWellPathComponentPlotItem::RiuWellPathComponentPlotItem(const RimWellPath* wellPath) : m_wellPath(wellPath) , m_completionType(RiaDefines::WELL_PATH) , m_depthType(RimWellLogPlot::MEASURED_DEPTH) @@ -60,21 +60,21 @@ RiuWellPathAttributePlotObject::RiuWellPathAttributePlotObject(const RimWellPath //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RiuWellPathAttributePlotObject::RiuWellPathAttributePlotObject(const RimWellPath* wellPath, const RimWellPathCompletionInterface* completion) +RiuWellPathComponentPlotItem::RiuWellPathComponentPlotItem(const RimWellPath* wellPath, const RimWellPathComponentInterface* completion) { CVF_ASSERT(wellPath && completion); - m_completionType = completion->type(); + m_completionType = completion->componentType(); m_startMD = completion->startMD(); m_endMD = completion->endMD(); - m_label = completion->completionLabel(); - m_legendTitle = completion->completionTypeLabel(); + m_label = completion->componentLabel(); + m_legendTitle = completion->componentTypeLabel(); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RiuWellPathAttributePlotObject::~RiuWellPathAttributePlotObject() +RiuWellPathComponentPlotItem::~RiuWellPathComponentPlotItem() { detachFromQwt(); @@ -87,7 +87,7 @@ RiuWellPathAttributePlotObject::~RiuWellPathAttributePlotObject() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RiuWellPathAttributePlotObject::label() const +QString RiuWellPathComponentPlotItem::label() const { return m_label; } @@ -95,7 +95,7 @@ QString RiuWellPathAttributePlotObject::label() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuWellPathAttributePlotObject::loadDataAndUpdate(bool updateParentPlot) +void RiuWellPathComponentPlotItem::loadDataAndUpdate(bool updateParentPlot) { onLoadDataAndUpdate(updateParentPlot); } @@ -103,7 +103,7 @@ void RiuWellPathAttributePlotObject::loadDataAndUpdate(bool updateParentPlot) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RiaDefines::CompletionType RiuWellPathAttributePlotObject::completionType() const +RiaDefines::WellPathComponentType RiuWellPathComponentPlotItem::completionType() const { return m_completionType; } @@ -111,7 +111,7 @@ RiaDefines::CompletionType RiuWellPathAttributePlotObject::completionType() cons //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuWellPathAttributePlotObject::onLoadDataAndUpdate(bool updateParentPlot) +void RiuWellPathComponentPlotItem::onLoadDataAndUpdate(bool updateParentPlot) { double startDepth, endDepth; std::tie(startDepth, endDepth) = depthsOfDepthType(); @@ -192,7 +192,7 @@ void RiuWellPathAttributePlotObject::onLoadDataAndUpdate(bool updateParentPlot) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::pair RiuWellPathAttributePlotObject::depthsOfDepthType() const +std::pair RiuWellPathComponentPlotItem::depthsOfDepthType() const { double startDepth = m_startMD; double endDepth = m_endMD; @@ -210,7 +210,7 @@ std::pair RiuWellPathAttributePlotObject::depthsOfDepthType() co //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuWellPathAttributePlotObject::addMarker(double posX, +void RiuWellPathComponentPlotItem::addMarker(double posX, double depth, int size, RiuQwtSymbol::PointSymbolEnum symbolType, @@ -228,7 +228,7 @@ void RiuWellPathAttributePlotObject::addMarker(double posX, //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QwtPlotItem* RiuWellPathAttributePlotObject::createMarker(double posX, double depth, int size, RiuQwtSymbol::PointSymbolEnum symbolType, cvf::Color4f baseColor, QString label /*= QString("")*/, Qt::Alignment labelAlignment /*= Qt::AlignTop*/, Qt::Orientation labelOrientation /*= Qt::Vertical*/, bool drawLine /*= false*/, bool contrastTextColor /*= true*/) +QwtPlotItem* RiuWellPathComponentPlotItem::createMarker(double posX, double depth, int size, RiuQwtSymbol::PointSymbolEnum symbolType, cvf::Color4f baseColor, QString label /*= QString("")*/, Qt::Alignment labelAlignment /*= Qt::AlignTop*/, Qt::Orientation labelOrientation /*= Qt::Vertical*/, bool drawLine /*= false*/, bool contrastTextColor /*= true*/) { QColor bgColor = RiaColorTools::toQColor(baseColor); QColor textColor = RiaColorTools::toQColor(baseColor.toColor3f(), 1.0); @@ -268,7 +268,7 @@ QwtPlotItem* RiuWellPathAttributePlotObject::createMarker(double posX, double de //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuWellPathAttributePlotObject::addColumnFeature(double startX, +void RiuWellPathComponentPlotItem::addColumnFeature(double startX, double endX, double startDepth, double endDepth, @@ -298,7 +298,7 @@ void RiuWellPathAttributePlotObject::addColumnFeature(double startX, //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QwtPlotItem* RiuWellPathAttributePlotObject::createColumnShape(double startX, +QwtPlotItem* RiuWellPathComponentPlotItem::createColumnShape(double startX, double endX, double startDepth, double endDepth, @@ -325,7 +325,7 @@ QwtPlotItem* RiuWellPathAttributePlotObject::createColumnShape(double st //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RiuWellPathAttributePlotObject::xValueRange(double* minimumValue, double* maximumValue) const +bool RiuWellPathComponentPlotItem::xValueRange(double* minimumValue, double* maximumValue) const { CVF_ASSERT(minimumValue && maximumValue); *maximumValue = 1.0; @@ -336,7 +336,7 @@ bool RiuWellPathAttributePlotObject::xValueRange(double* minimumValue, double* m //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RiuWellPathAttributePlotObject::yValueRange(double* minimumValue, double* maximumValue) const +bool RiuWellPathComponentPlotItem::yValueRange(double* minimumValue, double* maximumValue) const { CVF_ASSERT(minimumValue && maximumValue); @@ -351,7 +351,7 @@ bool RiuWellPathAttributePlotObject::yValueRange(double* minimumValue, double* m //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuWellPathAttributePlotObject::setShowLabel(bool showLabel) +void RiuWellPathComponentPlotItem::setShowLabel(bool showLabel) { m_showLabel = showLabel; } @@ -359,7 +359,7 @@ void RiuWellPathAttributePlotObject::setShowLabel(bool showLabel) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuWellPathAttributePlotObject::setDepthType(RimWellLogPlot::DepthTypeEnum depthType) +void RiuWellPathComponentPlotItem::setDepthType(RimWellLogPlot::DepthTypeEnum depthType) { m_depthType = depthType; } @@ -367,7 +367,7 @@ void RiuWellPathAttributePlotObject::setDepthType(RimWellLogPlot::DepthTypeEnum //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuWellPathAttributePlotObject::setBaseColor(const cvf::Color3f& baseColor) +void RiuWellPathComponentPlotItem::setBaseColor(const cvf::Color3f& baseColor) { m_baseColor = cvf::Color4f(baseColor); } @@ -375,7 +375,7 @@ void RiuWellPathAttributePlotObject::setBaseColor(const cvf::Color3f& baseColor) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuWellPathAttributePlotObject::setBaseColor(const cvf::Color4f& baseColor) +void RiuWellPathComponentPlotItem::setBaseColor(const cvf::Color4f& baseColor) { m_baseColor = baseColor; } @@ -383,7 +383,7 @@ void RiuWellPathAttributePlotObject::setBaseColor(const cvf::Color4f& baseColor) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuWellPathAttributePlotObject::setContributeToLegend(bool contributeToLegend) +void RiuWellPathComponentPlotItem::setContributeToLegend(bool contributeToLegend) { bool actuallyContributeToLegend = contributeToLegend && (m_completionType == RiaDefines::FISHBONES || m_completionType == RiaDefines::FRACTURE || @@ -395,7 +395,7 @@ void RiuWellPathAttributePlotObject::setContributeToLegend(bool contributeToLege //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuWellPathAttributePlotObject::setParentQwtPlotAndReplot(QwtPlot* plot) +void RiuWellPathComponentPlotItem::setParentQwtPlotAndReplot(QwtPlot* plot) { setParentQwtPlotNoReplot(plot); if (m_parentQwtPlot) @@ -407,7 +407,7 @@ void RiuWellPathAttributePlotObject::setParentQwtPlotAndReplot(QwtPlot* plot) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuWellPathAttributePlotObject::setParentQwtPlotNoReplot(QwtPlot* plot) +void RiuWellPathComponentPlotItem::setParentQwtPlotNoReplot(QwtPlot* plot) { m_parentQwtPlot = plot; attachToQwt(); @@ -416,7 +416,7 @@ void RiuWellPathAttributePlotObject::setParentQwtPlotNoReplot(QwtPlot* plot) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuWellPathAttributePlotObject::attachToQwt() +void RiuWellPathComponentPlotItem::attachToQwt() { if (m_parentQwtPlot) { @@ -427,7 +427,7 @@ void RiuWellPathAttributePlotObject::attachToQwt() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuWellPathAttributePlotObject::detachFromQwt() +void RiuWellPathComponentPlotItem::detachFromQwt() { m_combinedAttributeGroup.detach(); } @@ -435,7 +435,7 @@ void RiuWellPathAttributePlotObject::detachFromQwt() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuWellPathAttributePlotObject::reattachToQwt() +void RiuWellPathComponentPlotItem::reattachToQwt() { detachFromQwt(); attachToQwt(); @@ -444,7 +444,7 @@ void RiuWellPathAttributePlotObject::reattachToQwt() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RiuWellPathAttributePlotObject::legendTitle() const +QString RiuWellPathComponentPlotItem::legendTitle() const { return m_legendTitle; } diff --git a/ApplicationCode/UserInterface/RiuWellPathAttributePlotObject.h b/ApplicationCode/UserInterface/RiuWellPathComponentPlotItem.h similarity index 90% rename from ApplicationCode/UserInterface/RiuWellPathAttributePlotObject.h rename to ApplicationCode/UserInterface/RiuWellPathComponentPlotItem.h index a7cd0da6c6..7cd715de38 100644 --- a/ApplicationCode/UserInterface/RiuWellPathAttributePlotObject.h +++ b/ApplicationCode/UserInterface/RiuWellPathComponentPlotItem.h @@ -24,7 +24,7 @@ #include "RimPlotCurve.h" #include "RimWellLogPlot.h" #include "RimWellPathAttribute.h" -#include "RimWellPathCompletionInterface.h" +#include "RimWellPathComponentInterface.h" #include "cafPdmBase.h" #include "cafPdmObject.h" @@ -46,23 +46,23 @@ class QwtPlotItem; /// /// //================================================================================================== -class RiuWellPathAttributePlotObject : public cvf::Object +class RiuWellPathComponentPlotItem { public: - RiuWellPathAttributePlotObject(const RimWellPath* wellPath); + RiuWellPathComponentPlotItem(const RimWellPath* wellPath); - RiuWellPathAttributePlotObject(const RimWellPath* wellPath, - const RimWellPathCompletionInterface* completion); + RiuWellPathComponentPlotItem(const RimWellPath* wellPath, + const RimWellPathComponentInterface* completion); - ~RiuWellPathAttributePlotObject(); + ~RiuWellPathComponentPlotItem(); QString label() const; QString legendTitle() const; void loadDataAndUpdate(bool updateParentPlot); - RiaDefines::CompletionType completionType() const; + RiaDefines::WellPathComponentType completionType() const; bool xValueRange(double* minimumValue, double* maximumValue) const; bool yValueRange(double* minimumValue, double* maximumValue) const; @@ -121,7 +121,7 @@ private: private: const RimWellPath* m_wellPath; - RiaDefines::CompletionType m_completionType; + RiaDefines::WellPathComponentType m_completionType; double m_startMD; double m_endMD; QString m_label;