mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3741 Make it possible to enable/disable all well path components in plots and 3d view.
* Add check box to casing design and update of plot * Add isEnabled() method to component interface which controls plotting.
This commit is contained in:
parent
132408ab6f
commit
ae8cb9d210
@ -176,6 +176,8 @@ void RivWellPathPartMgr::appendWellPathAttributesToModel(cvf::ModelBasicList*
|
|||||||
std::vector<RimWellPathAttribute*> attributes = m_rimWellPath->attributeCollection()->attributes();
|
std::vector<RimWellPathAttribute*> attributes = m_rimWellPath->attributeCollection()->attributes();
|
||||||
|
|
||||||
for (RimWellPathAttribute* attribute : attributes)
|
for (RimWellPathAttribute* attribute : attributes)
|
||||||
|
{
|
||||||
|
if (attribute->isEnabled())
|
||||||
{
|
{
|
||||||
if (attribute->componentType() == RiaDefines::CASING)
|
if (attribute->componentType() == RiaDefines::CASING)
|
||||||
{
|
{
|
||||||
@ -234,6 +236,7 @@ void RivWellPathPartMgr::appendWellPathAttributesToModel(cvf::ModelBasicList*
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -632,6 +632,17 @@ cvf::BoundingBox RimFishbonesMultipleSubs::boundingBoxInDomainCoords() const
|
|||||||
return bb;
|
return bb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimFishbonesMultipleSubs::isEnabled() const
|
||||||
|
{
|
||||||
|
RimFishbonesCollection* collection;
|
||||||
|
this->firstAncestorOrThisOfTypeAsserted(collection);
|
||||||
|
|
||||||
|
return collection->isChecked() && isActive();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -110,6 +110,7 @@ public:
|
|||||||
cvf::BoundingBox boundingBoxInDomainCoords() const override;
|
cvf::BoundingBox boundingBoxInDomainCoords() const override;
|
||||||
|
|
||||||
// Overrides from RimWellPathCompletionsInterface
|
// Overrides from RimWellPathCompletionsInterface
|
||||||
|
bool isEnabled() const override;
|
||||||
RiaDefines::WellPathComponentType componentType() const override;
|
RiaDefines::WellPathComponentType componentType() const override;
|
||||||
QString componentLabel() const override;
|
QString componentLabel() const override;
|
||||||
QString componentTypeLabel() const override;
|
QString componentTypeLabel() const override;
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include "RimReservoirCellResultsStorage.h"
|
#include "RimReservoirCellResultsStorage.h"
|
||||||
#include "RimStimPlanColors.h"
|
#include "RimStimPlanColors.h"
|
||||||
#include "RimStimPlanFractureTemplate.h"
|
#include "RimStimPlanFractureTemplate.h"
|
||||||
|
#include "RimWellPathFractureCollection.h"
|
||||||
|
|
||||||
#include "RivWellFracturePartMgr.h"
|
#include "RivWellFracturePartMgr.h"
|
||||||
|
|
||||||
@ -286,6 +287,16 @@ void RimFracture::clearCachedNonDarcyProperties()
|
|||||||
m_cachedFractureProperties = NonDarcyData();
|
m_cachedFractureProperties = NonDarcyData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimFracture::isEnabled() const
|
||||||
|
{
|
||||||
|
RimWellPathFractureCollection* fractureCollection = nullptr;
|
||||||
|
this->firstAncestorOrThisOfTypeAsserted(fractureCollection);
|
||||||
|
return fractureCollection->isChecked() && isChecked();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -129,6 +129,7 @@ public:
|
|||||||
friend class RimFractureTemplate;
|
friend class RimFractureTemplate;
|
||||||
|
|
||||||
// RimWellPathCompletionsInterface overrides.
|
// RimWellPathCompletionsInterface overrides.
|
||||||
|
bool isEnabled() const override;
|
||||||
RiaDefines::WellPathComponentType componentType() const override;
|
RiaDefines::WellPathComponentType componentType() const override;
|
||||||
QString componentLabel() const override;
|
QString componentLabel() const override;
|
||||||
QString componentTypeLabel() const override;
|
QString componentTypeLabel() const override;
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "RigCaseCellResultsData.h"
|
#include "RigCaseCellResultsData.h"
|
||||||
#include "RigWellPath.h"
|
#include "RigWellPath.h"
|
||||||
|
|
||||||
|
#include "RimPerforationCollection.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
#include "RimWellPath.h"
|
#include "RimWellPath.h"
|
||||||
#include "RimWellPathValve.h"
|
#include "RimWellPathValve.h"
|
||||||
@ -232,6 +233,16 @@ std::vector<RimWellPathValve*> RimPerforationInterval::valves() const
|
|||||||
return allValves;
|
return allValves;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimPerforationInterval::isEnabled() const
|
||||||
|
{
|
||||||
|
RimPerforationCollection* perforationCollection;
|
||||||
|
this->firstAncestorOrThisOfTypeAsserted(perforationCollection);
|
||||||
|
return perforationCollection->isChecked() && isChecked();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -70,6 +70,7 @@ public:
|
|||||||
std::vector<RimWellPathValve*> valves() const;
|
std::vector<RimWellPathValve*> valves() const;
|
||||||
|
|
||||||
// RimWellPathCompletionInterface overrides
|
// RimWellPathCompletionInterface overrides
|
||||||
|
bool isEnabled() const override;
|
||||||
RiaDefines::WellPathComponentType componentType() const override;
|
RiaDefines::WellPathComponentType componentType() const override;
|
||||||
QString componentLabel() const override;
|
QString componentLabel() const override;
|
||||||
QString componentTypeLabel() const override;
|
QString componentTypeLabel() const override;
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
class RimWellPathComponentInterface
|
class RimWellPathComponentInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual bool isEnabled() const = 0;
|
||||||
virtual RiaDefines::WellPathComponentType componentType() const = 0;
|
virtual RiaDefines::WellPathComponentType componentType() const = 0;
|
||||||
virtual QString componentLabel() const = 0;
|
virtual QString componentLabel() const = 0;
|
||||||
virtual QString componentTypeLabel() const = 0;
|
virtual QString componentTypeLabel() const = 0;
|
||||||
|
@ -103,6 +103,16 @@ std::vector<double> RimWellPathValve::valveLocations() const
|
|||||||
return valveDepths;
|
return valveDepths;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimWellPathValve::isEnabled() const
|
||||||
|
{
|
||||||
|
RimPerforationInterval* perforationInterval = nullptr;
|
||||||
|
this->firstAncestorOrThisOfType(perforationInterval);
|
||||||
|
return perforationInterval->isEnabled() && isChecked();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -46,6 +46,7 @@ public:
|
|||||||
std::vector<double> valveLocations() const;
|
std::vector<double> valveLocations() const;
|
||||||
|
|
||||||
// Overrides from RimWellPathCompletionInterface
|
// Overrides from RimWellPathCompletionInterface
|
||||||
|
bool isEnabled() const override;
|
||||||
RiaDefines::WellPathComponentType componentType() const override;
|
RiaDefines::WellPathComponentType componentType() const override;
|
||||||
QString componentLabel() const override;
|
QString componentLabel() const override;
|
||||||
QString componentTypeLabel() const override;
|
QString componentTypeLabel() const override;
|
||||||
|
@ -1799,7 +1799,6 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
|||||||
m_wellPathAttributePlotObjects.push_back(std::unique_ptr<RiuWellPathComponentPlotItem>(new RiuWellPathComponentPlotItem(wellPathAttributeSource())));
|
m_wellPathAttributePlotObjects.push_back(std::unique_ptr<RiuWellPathComponentPlotItem>(new RiuWellPathComponentPlotItem(wellPathAttributeSource())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (m_showWellPathAttributes)
|
if (m_showWellPathAttributes)
|
||||||
{
|
{
|
||||||
if (m_wellPathAttributeCollection)
|
if (m_wellPathAttributeCollection)
|
||||||
@ -1812,6 +1811,8 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
|||||||
|
|
||||||
std::set<QString> attributesAssignedToLegend;
|
std::set<QString> attributesAssignedToLegend;
|
||||||
for (RimWellPathAttribute* attribute : attributes)
|
for (RimWellPathAttribute* attribute : attributes)
|
||||||
|
{
|
||||||
|
if (attribute->isEnabled())
|
||||||
{
|
{
|
||||||
std::unique_ptr<RiuWellPathComponentPlotItem> plotItem(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), attribute));
|
std::unique_ptr<RiuWellPathComponentPlotItem> plotItem(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), attribute));
|
||||||
QString legendTitle = plotItem->legendTitle();
|
QString legendTitle = plotItem->legendTitle();
|
||||||
@ -1823,6 +1824,7 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (m_showWellPathCompletions)
|
if (m_showWellPathCompletions)
|
||||||
{
|
{
|
||||||
const RimWellPathCompletions* completionsCollection = wellPathAttributeSource()->completions();
|
const RimWellPathCompletions* completionsCollection = wellPathAttributeSource()->completions();
|
||||||
@ -1830,6 +1832,8 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
|||||||
|
|
||||||
std::set<QString> completionsAssignedToLegend;
|
std::set<QString> completionsAssignedToLegend;
|
||||||
for (const RimWellPathComponentInterface* completion : allCompletions)
|
for (const RimWellPathComponentInterface* completion : allCompletions)
|
||||||
|
{
|
||||||
|
if (completion->isEnabled())
|
||||||
{
|
{
|
||||||
std::unique_ptr<RiuWellPathComponentPlotItem> plotItem(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), completion));
|
std::unique_ptr<RiuWellPathComponentPlotItem> plotItem(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), completion));
|
||||||
QString legendTitle = plotItem->legendTitle();
|
QString legendTitle = plotItem->legendTitle();
|
||||||
@ -1840,6 +1844,7 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
|||||||
completionsAssignedToLegend.insert(legendTitle);
|
completionsAssignedToLegend.insert(legendTitle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
RimWellLogPlot* wellLogPlot;
|
RimWellLogPlot* wellLogPlot;
|
||||||
this->firstAncestorOrThisOfTypeAsserted(wellLogPlot);
|
this->firstAncestorOrThisOfTypeAsserted(wellLogPlot);
|
||||||
|
@ -188,6 +188,14 @@ double RimWellPath::wellPathRadiusScaleFactor() const
|
|||||||
return m_wellPathRadiusScaleFactor();
|
return m_wellPathRadiusScaleFactor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimWellPath::isEnabled() const
|
||||||
|
{
|
||||||
|
return m_showWellPath;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -124,6 +124,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// RimWellPathComponentInterface overrides
|
// RimWellPathComponentInterface overrides
|
||||||
|
bool isEnabled() const override;
|
||||||
RiaDefines::WellPathComponentType componentType() const override;
|
RiaDefines::WellPathComponentType componentType() const override;
|
||||||
QString componentLabel() const override;
|
QString componentLabel() const override;
|
||||||
QString componentTypeLabel() const override;
|
QString componentTypeLabel() const override;
|
||||||
|
@ -91,6 +91,16 @@ void RimWellPathAttribute::setDepthsFromWellPath(const RimWellPath* wellPath)
|
|||||||
m_endMD = wellPath->wellPathGeometry()->measureDepths().back();
|
m_endMD = wellPath->wellPathGeometry()->measureDepths().back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimWellPathAttribute::isEnabled() const
|
||||||
|
{
|
||||||
|
RimWellPathAttributeCollection* collection = nullptr;
|
||||||
|
this->firstAncestorOrThisOfTypeAsserted(collection);
|
||||||
|
return collection->isChecked();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -46,6 +46,7 @@ public:
|
|||||||
void setDepthsFromWellPath(const RimWellPath* wellPath);
|
void setDepthsFromWellPath(const RimWellPath* wellPath);
|
||||||
|
|
||||||
// Overrides from RimWellPathCompletionInterface
|
// Overrides from RimWellPathCompletionInterface
|
||||||
|
bool isEnabled() const override;
|
||||||
RiaDefines::WellPathComponentType componentType() const override;
|
RiaDefines::WellPathComponentType componentType() const override;
|
||||||
QString componentLabel() const override;
|
QString componentLabel() const override;
|
||||||
QString componentTypeLabel() const override;
|
QString componentTypeLabel() const override;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
#include "RimWellPathAttributeCollection.h"
|
#include "RimWellPathAttributeCollection.h"
|
||||||
|
|
||||||
|
#include "RimProject.h"
|
||||||
#include "RimWellPathAttribute.h"
|
#include "RimWellPathAttribute.h"
|
||||||
#include "RimWellLogTrack.h"
|
#include "RimWellLogTrack.h"
|
||||||
|
|
||||||
@ -37,6 +38,7 @@ RimWellPathAttributeCollection::RimWellPathAttributeCollection()
|
|||||||
m_attributes.uiCapability()->setUiEditorTypeName(caf::PdmUiTableViewEditor::uiEditorTypeName());
|
m_attributes.uiCapability()->setUiEditorTypeName(caf::PdmUiTableViewEditor::uiEditorTypeName());
|
||||||
m_attributes.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::TOP);
|
m_attributes.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::TOP);
|
||||||
m_attributes.uiCapability()->setCustomContextMenuEnabled(true);
|
m_attributes.uiCapability()->setCustomContextMenuEnabled(true);
|
||||||
|
this->setName("Casing Design");
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -157,3 +159,20 @@ void RimWellPathAttributeCollection::defineUiTreeOrdering(caf::PdmUiTreeOrdering
|
|||||||
{
|
{
|
||||||
uiTreeOrdering.skipRemainingChildren(true);
|
uiTreeOrdering.skipRemainingChildren(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellPathAttributeCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||||
|
const QVariant& oldValue,
|
||||||
|
const QVariant& newValue)
|
||||||
|
{
|
||||||
|
if (changedField == this->objectToggleField())
|
||||||
|
{
|
||||||
|
RimProject* proj;
|
||||||
|
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||||
|
proj->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||||
|
this->updateAllReferringTracks();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "RimCheckableNamedObject.h"
|
||||||
|
|
||||||
#include "cafAppEnum.h"
|
#include "cafAppEnum.h"
|
||||||
#include "cvfBase.h"
|
#include "cvfBase.h"
|
||||||
#include "cafPdmChildArrayField.h"
|
#include "cafPdmChildArrayField.h"
|
||||||
@ -25,7 +27,7 @@
|
|||||||
|
|
||||||
class RimWellPathAttribute;
|
class RimWellPathAttribute;
|
||||||
|
|
||||||
class RimWellPathAttributeCollection : public caf::PdmObject
|
class RimWellPathAttributeCollection : public RimCheckableNamedObject
|
||||||
{
|
{
|
||||||
CAF_PDM_HEADER_INIT;
|
CAF_PDM_HEADER_INIT;
|
||||||
public:
|
public:
|
||||||
@ -37,11 +39,13 @@ public:
|
|||||||
void insertAttribute(RimWellPathAttribute* insertBefore, RimWellPathAttribute* attribute);
|
void insertAttribute(RimWellPathAttribute* insertBefore, RimWellPathAttribute* attribute);
|
||||||
void deleteAttribute(RimWellPathAttribute* attributeToDelete);
|
void deleteAttribute(RimWellPathAttribute* attributeToDelete);
|
||||||
void deleteAllAttributes();
|
void deleteAllAttributes();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void defineCustomContextMenu(const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget) override;
|
void defineCustomContextMenu(const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget) override;
|
||||||
void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
||||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||||
void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
||||||
|
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmChildArrayField<RimWellPathAttribute*> m_attributes;
|
caf::PdmChildArrayField<RimWellPathAttribute*> m_attributes;
|
||||||
|
Loading…
Reference in New Issue
Block a user