mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3467 Improved code using RimWellPathComponentInterface
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace RiaDefines
|
||||
UNDEFINED = 999
|
||||
};
|
||||
|
||||
enum CompletionType {
|
||||
enum WellPathComponentType {
|
||||
// Well path construction features
|
||||
WELL_PATH,
|
||||
CASING,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RiaDefines::CompletionType> fromCompletionData(const std::vector<RigCompletionData>& data)
|
||||
std::vector<RiaDefines::WellPathComponentType> fromCompletionData(const std::vector<RigCompletionData>& data)
|
||||
{
|
||||
std::vector<RiaDefines::CompletionType> appCompletionTypes;
|
||||
std::vector<RiaDefines::WellPathComponentType> 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);
|
||||
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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<const RimWellPathCompletionInterface*> RimWellPathCompletions::allCompletions() const
|
||||
std::vector<const RimWellPathComponentInterface*> RimWellPathCompletions::allCompletions() const
|
||||
{
|
||||
std::vector<const RimWellPathCompletionInterface*> completions;
|
||||
std::vector<const RimWellPathComponentInterface*> completions;
|
||||
|
||||
for (const RimWellPathFracture* fracture : fractureCollection()->allFractures())
|
||||
{
|
||||
|
||||
@@ -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<const RimWellPathCompletionInterface*> allCompletions() const;
|
||||
std::vector<const RimWellPathComponentInterface*> allCompletions() const;
|
||||
|
||||
void setWellNameForExport(const QString& name);
|
||||
QString wellNameForExport() const;
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -395,10 +395,10 @@ void RimEclipseCellColors::updateLegendData(size_t currentTimeStep,
|
||||
{
|
||||
std::vector< std::tuple<QString, int, cvf::Color3ub> > categories;
|
||||
|
||||
caf::AppEnum<RiaDefines::CompletionType> wellPath(RiaDefines::WELL_PATH);
|
||||
caf::AppEnum<RiaDefines::CompletionType> fishbone(RiaDefines::FISHBONES);
|
||||
caf::AppEnum<RiaDefines::CompletionType> perforationInterval(RiaDefines::PERFORATION_INTERVAL);
|
||||
caf::AppEnum<RiaDefines::CompletionType> fracture(RiaDefines::FRACTURE);
|
||||
caf::AppEnum<RiaDefines::WellPathComponentType> wellPath(RiaDefines::WELL_PATH);
|
||||
caf::AppEnum<RiaDefines::WellPathComponentType> fishbone(RiaDefines::FISHBONES);
|
||||
caf::AppEnum<RiaDefines::WellPathComponentType> perforationInterval(RiaDefines::PERFORATION_INTERVAL);
|
||||
caf::AppEnum<RiaDefines::WellPathComponentType> fracture(RiaDefines::FRACTURE);
|
||||
|
||||
const std::vector<int>& visibleCatetories = cellResultsData->uniqueCellScalarValues(this->scalarResultIndex());
|
||||
|
||||
|
||||
@@ -390,7 +390,7 @@ void RimEclipsePropertyFilter::computeResultValueRange()
|
||||
else if (resultDefinition->resultVariable() == RiaDefines::completionTypeResultName())
|
||||
{
|
||||
std::vector<QString> ctNames;
|
||||
for (const QString& ctName : caf::AppEnum<RiaDefines::CompletionType>::uiTexts())
|
||||
for (const QString& ctName : caf::AppEnum<RiaDefines::WellPathComponentType>::uiTexts())
|
||||
{
|
||||
ctNames.push_back(ctName);
|
||||
}
|
||||
|
||||
@@ -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<RiuWellPathAttributePlotObject> plotObject : m_wellPathAttributePlotObjects)
|
||||
for (const std::unique_ptr<RiuWellPathComponentPlotItem>& plotObject : m_wellPathAttributePlotObjects)
|
||||
{
|
||||
double minObjectDepth = HUGE_VAL;
|
||||
double maxObjectDepth = -HUGE_VAL;
|
||||
@@ -971,7 +971,7 @@ void RimWellLogTrack::detachAllCurves()
|
||||
{
|
||||
curve->detachQwtCurve();
|
||||
}
|
||||
for (cvf::ref<RiuWellPathAttributePlotObject> plotObjects : m_wellPathAttributePlotObjects)
|
||||
for (auto& plotObjects : m_wellPathAttributePlotObjects)
|
||||
{
|
||||
plotObjects->detachFromQwt();
|
||||
}
|
||||
@@ -986,7 +986,7 @@ void RimWellLogTrack::reattachAllCurves()
|
||||
{
|
||||
curve->reattachQwtCurve();
|
||||
}
|
||||
for (cvf::ref<RiuWellPathAttributePlotObject> 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<RiuWellPathComponentPlotItem>(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<RiuWellPathComponentPlotItem>(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), attribute)));
|
||||
}
|
||||
}
|
||||
if (m_showWellPathAttributesFromCompletions())
|
||||
{
|
||||
const RimWellPathCompletions* completionsCollection = wellPathAttributeSource()->completions();
|
||||
std::vector<const RimWellPathCompletionInterface*> allCompletions = completionsCollection->allCompletions();
|
||||
for (const RimWellPathCompletionInterface* completion : allCompletions)
|
||||
std::vector<const RimWellPathComponentInterface*> allCompletions = completionsCollection->allCompletions();
|
||||
for (const RimWellPathComponentInterface* completion : allCompletions)
|
||||
{
|
||||
m_wellPathAttributePlotObjects.push_back(new RiuWellPathAttributePlotObject(wellPathAttributeSource(), completion));
|
||||
m_wellPathAttributePlotObjects.push_back(std::unique_ptr<RiuWellPathComponentPlotItem>(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), completion)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1846,7 +1846,7 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
||||
|
||||
int index = 0;
|
||||
std::set<QString> attributesAssignedToLegend;
|
||||
for (cvf::ref<RiuWellPathAttributePlotObject> attributePlotObject : m_wellPathAttributePlotObjects)
|
||||
for (auto& attributePlotObject : m_wellPathAttributePlotObjects)
|
||||
{
|
||||
cvf::Color3f attributeColor = cvf::Color3::LIGHT_GRAY;
|
||||
if (attributePlotObject->completionType() != RiaDefines::WELL_PATH)
|
||||
|
||||
@@ -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<RimWellPath*> m_wellPathAttributeSource;
|
||||
caf::PdmPtrField<RimWellPathAttributeCollection*> m_wellPathAttributeCollection;
|
||||
|
||||
std::vector<cvf::ref<RiuWellPathAttributePlotObject>> m_wellPathAttributePlotObjects;
|
||||
std::vector<std::unique_ptr<RiuWellPathComponentPlotItem>> m_wellPathAttributePlotObjects;
|
||||
|
||||
bool m_formationsForCaseWithSimWellOnly;
|
||||
|
||||
|
||||
@@ -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<caf::PdmOptionItemInfo> RimWellPathAttribute::calculateValueOptions(const
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
if (fieldNeedingOptions == &m_type)
|
||||
{
|
||||
std::set<RiaDefines::CompletionType> supportedTypes = { RiaDefines::CASING, RiaDefines::LINER, RiaDefines::PACKER };
|
||||
for (RiaDefines::CompletionType type : supportedTypes)
|
||||
std::set<RiaDefines::WellPathComponentType> supportedTypes = { RiaDefines::CASING, RiaDefines::LINER, RiaDefines::PACKER };
|
||||
for (RiaDefines::WellPathComponentType type : supportedTypes)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(CompletionTypeEnum::uiText(type), type));
|
||||
}
|
||||
|
||||
@@ -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<RiaDefines::CompletionType> CompletionTypeEnum;
|
||||
typedef caf::AppEnum<RiaDefines::WellPathComponentType> 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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -43,7 +43,6 @@ public:
|
||||
virtual QwtGraphic legendIcon(int index, const QSizeF &size) const override;
|
||||
|
||||
private:
|
||||
|
||||
std::vector<QwtPlotItem*> m_plotItems;
|
||||
std::vector<QwtPlotItem*> m_legendItems;
|
||||
};
|
||||
|
||||
@@ -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<double, double> RiuWellPathAttributePlotObject::depthsOfDepthType() const
|
||||
std::pair<double, double> RiuWellPathComponentPlotItem::depthsOfDepthType() const
|
||||
{
|
||||
double startDepth = m_startMD;
|
||||
double endDepth = m_endMD;
|
||||
@@ -210,7 +210,7 @@ std::pair<double, double> 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;
|
||||
}
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user