mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2002 RFT Plot: Move settings and hide track and plot
This commit is contained in:
@@ -78,6 +78,8 @@ RimWellRftPlot::RimWellRftPlot()
|
|||||||
m_wellLogPlot.uiCapability()->setUiHidden(true);
|
m_wellLogPlot.uiCapability()->setUiHidden(true);
|
||||||
m_wellLogPlot = new RimWellLogPlot();
|
m_wellLogPlot = new RimWellLogPlot();
|
||||||
m_wellLogPlot->setDepthType(RimWellLogPlot::TRUE_VERTICAL_DEPTH);
|
m_wellLogPlot->setDepthType(RimWellLogPlot::TRUE_VERTICAL_DEPTH);
|
||||||
|
m_wellLogPlot.uiCapability()->setUiTreeHidden(true);
|
||||||
|
m_wellLogPlot.uiCapability()->setUiTreeChildrenHidden(true);
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&m_wellName, "WellName", "WellName", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&m_wellName, "WellName", "WellName", "", "", "");
|
||||||
CAF_PDM_InitField(&m_branchIndex, "BranchIndex", 0, "BranchIndex", "", "", "");
|
CAF_PDM_InitField(&m_branchIndex, "BranchIndex", 0, "BranchIndex", "", "", "");
|
||||||
@@ -1173,8 +1175,17 @@ void RimWellRftPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
|||||||
if (m_wellLogPlot && m_wellLogPlot->trackCount() > 0)
|
if (m_wellLogPlot && m_wellLogPlot->trackCount() > 0)
|
||||||
{
|
{
|
||||||
RimWellLogTrack* track = m_wellLogPlot->trackByIndex(0);
|
RimWellLogTrack* track = m_wellLogPlot->trackByIndex(0);
|
||||||
|
|
||||||
track->uiOrderingForShowFormationNamesAndCase(uiConfigName, uiOrdering);
|
track->uiOrderingForShowFormationNamesAndCase(uiConfigName, uiOrdering);
|
||||||
track->uiOrderingForVisibleXRange(uiConfigName, uiOrdering);
|
|
||||||
|
caf::PdmUiGroup* legendAndAxisGroup = uiOrdering.addNewGroup("Legend and Axis");
|
||||||
|
legendAndAxisGroup->setCollapsedByDefault(true);
|
||||||
|
|
||||||
|
m_wellLogPlot->uiOrderingForPlot(uiConfigName, *legendAndAxisGroup);
|
||||||
|
|
||||||
|
track->uiOrderingForVisibleXRange(uiConfigName, *legendAndAxisGroup);
|
||||||
|
|
||||||
|
m_wellLogPlot->uiOrderingForVisibleDepthRange(uiConfigName, *legendAndAxisGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
uiOrdering.skipRemainingFields(true);
|
uiOrdering.skipRemainingFields(true);
|
||||||
|
|||||||
@@ -522,6 +522,41 @@ bool RimWellLogPlot::isPltPlotChild() const
|
|||||||
return pltPlot() != nullptr;
|
return pltPlot() != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellLogPlot::uiOrderingForVisibleDepthRange(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||||
|
{
|
||||||
|
caf::PdmUiGroup* gridGroup = uiOrdering.addNewGroup("Visible Depth Range");
|
||||||
|
gridGroup->add(&m_isAutoScaleDepthEnabled);
|
||||||
|
gridGroup->add(&m_minVisibleDepth);
|
||||||
|
gridGroup->add(&m_maxVisibleDepth);
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellLogPlot::uiOrderingForPlot(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||||
|
{
|
||||||
|
RimWellRftPlot* rftp;
|
||||||
|
firstAncestorOrThisOfType(rftp);
|
||||||
|
|
||||||
|
if (!rftp)
|
||||||
|
{
|
||||||
|
uiOrdering.add(&m_depthType);
|
||||||
|
}
|
||||||
|
|
||||||
|
RimWellAllocationPlot* wap;
|
||||||
|
firstAncestorOrThisOfType(wap);
|
||||||
|
|
||||||
|
if (!(wap || rftp))
|
||||||
|
{
|
||||||
|
uiOrdering.add(&m_depthUnit);
|
||||||
|
}
|
||||||
|
|
||||||
|
uiOrdering.add(&m_showTrackLegends);
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -538,22 +573,8 @@ void RimWellLogPlot::depthZoomMinMax(double* minimumDepth, double* maximumDepth)
|
|||||||
void RimWellLogPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
void RimWellLogPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||||
{
|
{
|
||||||
uiOrdering.add(&m_userName);
|
uiOrdering.add(&m_userName);
|
||||||
uiOrdering.add(&m_depthType);
|
uiOrderingForPlot(uiConfigName, uiOrdering);
|
||||||
|
uiOrderingForVisibleDepthRange(uiConfigName, uiOrdering);
|
||||||
RimWellAllocationPlot* wap;
|
|
||||||
firstAncestorOrThisOfType(wap);
|
|
||||||
if (!wap)
|
|
||||||
{
|
|
||||||
uiOrdering.add(&m_depthUnit);
|
|
||||||
}
|
|
||||||
|
|
||||||
uiOrdering.add(&m_showTrackLegends);
|
|
||||||
|
|
||||||
caf::PdmUiGroup* gridGroup = uiOrdering.addNewGroup("Visible Depth Range");
|
|
||||||
gridGroup->add(&m_isAutoScaleDepthEnabled);
|
|
||||||
gridGroup->add(&m_minVisibleDepth);
|
|
||||||
gridGroup->add(&m_maxVisibleDepth);
|
|
||||||
|
|
||||||
|
|
||||||
uiOrdering.skipRemainingFields(true);
|
uiOrdering.skipRemainingFields(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,12 +107,15 @@ public:
|
|||||||
RimWellPltPlot* pltPlot() const;
|
RimWellPltPlot* pltPlot() const;
|
||||||
bool isPltPlotChild() const;
|
bool isPltPlotChild() const;
|
||||||
|
|
||||||
|
void uiOrderingForVisibleDepthRange(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
||||||
|
void uiOrderingForPlot(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Overridden PDM methods
|
// Overridden PDM methods
|
||||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||||
virtual caf::PdmFieldHandle* userDescriptionField() { return &m_userName; }
|
virtual caf::PdmFieldHandle* userDescriptionField() override { return &m_userName; }
|
||||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
||||||
virtual void onLoadDataAndUpdate() override;
|
virtual void onLoadDataAndUpdate() override;
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
#include "RimWellLogPlot.h"
|
#include "RimWellLogPlot.h"
|
||||||
#include "RimWellLogPlotCollection.h"
|
#include "RimWellLogPlotCollection.h"
|
||||||
#include "RimWellPath.h"
|
#include "RimWellPath.h"
|
||||||
|
#include "RimWellRftPlot.h"
|
||||||
|
|
||||||
#include "RiuMainWindow.h"
|
#include "RiuMainWindow.h"
|
||||||
#include "RiuPlotAnnotationTool.h"
|
#include "RiuPlotAnnotationTool.h"
|
||||||
@@ -107,8 +108,8 @@ RimWellLogTrack::RimWellLogTrack()
|
|||||||
CAF_PDM_InitField(&m_simWellName, "SimulationWellName", QString("None"), " ", "", "", "");
|
CAF_PDM_InitField(&m_simWellName, "SimulationWellName", QString("None"), " ", "", "", "");
|
||||||
CAF_PDM_InitField(&m_branchIndex, "Branch", 0, " ", "", "", "");
|
CAF_PDM_InitField(&m_branchIndex, "Branch", 0, " ", "", "", "");
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&m_case, "CurveCase", "Formation Case", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&m_formationCase, "CurveCase", "Formation Case", "", "", "");
|
||||||
m_case.uiCapability()->setUiTreeChildrenHidden(true);
|
m_formationCase.uiCapability()->setUiTreeChildrenHidden(true);
|
||||||
|
|
||||||
m_simulationWellChosen = false;
|
m_simulationWellChosen = false;
|
||||||
}
|
}
|
||||||
@@ -244,11 +245,18 @@ void RimWellLogTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
|||||||
else if (changedField == &m_showFormations)
|
else if (changedField == &m_showFormations)
|
||||||
{
|
{
|
||||||
loadDataAndUpdate();
|
loadDataAndUpdate();
|
||||||
|
RimWellRftPlot* rftPlot;
|
||||||
|
this->firstAncestorOrThisOfType(rftPlot);
|
||||||
|
|
||||||
|
if (rftPlot)
|
||||||
|
{
|
||||||
|
rftPlot->updateConnectedEditors();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (changedField == &m_case)
|
else if (changedField == &m_formationCase)
|
||||||
{
|
{
|
||||||
QList<caf::PdmOptionItemInfo> options;
|
QList<caf::PdmOptionItemInfo> options;
|
||||||
RimWellLogTrack::simWellOptionItems(&options, m_case);
|
RimWellLogTrack::simWellOptionItems(&options, m_formationCase);
|
||||||
|
|
||||||
if (options.isEmpty())
|
if (options.isEmpty())
|
||||||
{
|
{
|
||||||
@@ -296,7 +304,7 @@ QList<caf::PdmOptionItemInfo> RimWellLogTrack::calculateValueOptions(const caf::
|
|||||||
|
|
||||||
options.push_front(caf::PdmOptionItemInfo("None", nullptr));
|
options.push_front(caf::PdmOptionItemInfo("None", nullptr));
|
||||||
}
|
}
|
||||||
else if (fieldNeedingOptions == &m_case)
|
else if (fieldNeedingOptions == &m_formationCase)
|
||||||
{
|
{
|
||||||
RimTools::caseOptionItems(&options);
|
RimTools::caseOptionItems(&options);
|
||||||
|
|
||||||
@@ -304,11 +312,11 @@ QList<caf::PdmOptionItemInfo> RimWellLogTrack::calculateValueOptions(const caf::
|
|||||||
}
|
}
|
||||||
else if (fieldNeedingOptions == &m_simWellName)
|
else if (fieldNeedingOptions == &m_simWellName)
|
||||||
{
|
{
|
||||||
RimWellLogTrack::simWellOptionItems(&options, m_case);
|
RimWellLogTrack::simWellOptionItems(&options, m_formationCase);
|
||||||
}
|
}
|
||||||
else if (fieldNeedingOptions == &m_branchIndex)
|
else if (fieldNeedingOptions == &m_branchIndex)
|
||||||
{
|
{
|
||||||
updateGeneratedSimulationWellpath(&m_generatedSimulationWellPathBranches, m_simWellName(), m_case);
|
updateGeneratedSimulationWellpath(&m_generatedSimulationWellPathBranches, m_simWellName(), m_formationCase);
|
||||||
|
|
||||||
size_t branchCount = m_generatedSimulationWellPathBranches.size();
|
size_t branchCount = m_generatedSimulationWellPathBranches.size();
|
||||||
|
|
||||||
@@ -450,14 +458,14 @@ void RimWellLogTrack::loadDataAndUpdate()
|
|||||||
{
|
{
|
||||||
m_trajectoryType.uiCapability()->setUiReadOnly(false);
|
m_trajectoryType.uiCapability()->setUiReadOnly(false);
|
||||||
m_simWellName.uiCapability()->setUiReadOnly(false);
|
m_simWellName.uiCapability()->setUiReadOnly(false);
|
||||||
m_case.uiCapability()->setUiReadOnly(false);
|
m_formationCase.uiCapability()->setUiReadOnly(false);
|
||||||
m_wellPath.uiCapability()->setUiReadOnly(false);
|
m_wellPath.uiCapability()->setUiReadOnly(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_trajectoryType.uiCapability()->setUiReadOnly(true);
|
m_trajectoryType.uiCapability()->setUiReadOnly(true);
|
||||||
m_simWellName.uiCapability()->setUiReadOnly(true);
|
m_simWellName.uiCapability()->setUiReadOnly(true);
|
||||||
m_case.uiCapability()->setUiReadOnly(true);
|
m_formationCase.uiCapability()->setUiReadOnly(true);
|
||||||
m_wellPath.uiCapability()->setUiReadOnly(true);
|
m_wellPath.uiCapability()->setUiReadOnly(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -648,7 +656,7 @@ void RimWellLogTrack::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
|||||||
|
|
||||||
formationGroup->add(&m_showFormations);
|
formationGroup->add(&m_showFormations);
|
||||||
|
|
||||||
formationGroup->add(&m_case);
|
formationGroup->add(&m_formationCase);
|
||||||
|
|
||||||
formationGroup->add(&m_trajectoryType);
|
formationGroup->add(&m_trajectoryType);
|
||||||
if (m_trajectoryType() == WELL_PATH)
|
if (m_trajectoryType() == WELL_PATH)
|
||||||
@@ -657,7 +665,7 @@ void RimWellLogTrack::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
updateGeneratedSimulationWellpath(&m_generatedSimulationWellPathBranches, m_simWellName(), m_case);
|
updateGeneratedSimulationWellpath(&m_generatedSimulationWellPathBranches, m_simWellName(), m_formationCase);
|
||||||
|
|
||||||
formationGroup->add(&m_simWellName);
|
formationGroup->add(&m_simWellName);
|
||||||
if (m_generatedSimulationWellPathBranches.size() > 1)
|
if (m_generatedSimulationWellPathBranches.size() > 1)
|
||||||
@@ -799,8 +807,9 @@ std::vector<RimWellLogCurve* > RimWellLogTrack::curvesVector()
|
|||||||
void RimWellLogTrack::uiOrderingForShowFormationNamesAndCase(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
void RimWellLogTrack::uiOrderingForShowFormationNamesAndCase(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||||
{
|
{
|
||||||
caf::PdmUiGroup* formationGroup = uiOrdering.addNewGroup("Formation Names");
|
caf::PdmUiGroup* formationGroup = uiOrdering.addNewGroup("Formation Names");
|
||||||
|
formationGroup->setCollapsedByDefault(true);
|
||||||
formationGroup->add(&m_showFormations);
|
formationGroup->add(&m_showFormations);
|
||||||
formationGroup->add(&m_case);
|
formationGroup->add(&m_formationCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -991,7 +1000,7 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
|||||||
|
|
||||||
if (m_showFormations == false) return;
|
if (m_showFormations == false) return;
|
||||||
|
|
||||||
if ((m_simWellName == QString("None") && m_wellPath == nullptr) || m_case == nullptr) return;
|
if ((m_simWellName == QString("None") && m_wellPath == nullptr) || m_formationCase == nullptr) return;
|
||||||
|
|
||||||
if (m_annotationTool == nullptr)
|
if (m_annotationTool == nullptr)
|
||||||
{
|
{
|
||||||
@@ -1011,16 +1020,16 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
|||||||
|
|
||||||
if (m_simulationWellChosen)
|
if (m_simulationWellChosen)
|
||||||
{
|
{
|
||||||
eclWellLogExtractor = RimWellLogTrack::createSimWellExtractor(wellLogCollection, m_case, m_simWellName, m_branchIndex);
|
eclWellLogExtractor = RimWellLogTrack::createSimWellExtractor(wellLogCollection, m_formationCase, m_simWellName, m_branchIndex);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
eclWellLogExtractor = RimWellLogTrack::createWellPathExtractor(wellLogCollection, m_case, m_wellPath);
|
eclWellLogExtractor = RimWellLogTrack::createWellPathExtractor(wellLogCollection, m_formationCase, m_wellPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eclWellLogExtractor)
|
if (eclWellLogExtractor)
|
||||||
{
|
{
|
||||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(m_case());
|
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(m_formationCase());
|
||||||
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromNameAndType(eclipseCase->eclipseCaseData(),
|
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromNameAndType(eclipseCase->eclipseCaseData(),
|
||||||
0,
|
0,
|
||||||
RiaDefines::PorosityModelType::MATRIX_MODEL,
|
RiaDefines::PorosityModelType::MATRIX_MODEL,
|
||||||
@@ -1032,7 +1041,7 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
geoMechWellLogExtractor = RimWellLogTrack::createGeoMechExtractor(wellLogCollection, m_case, m_wellPath);
|
geoMechWellLogExtractor = RimWellLogTrack::createGeoMechExtractor(wellLogCollection, m_formationCase, m_wellPath);
|
||||||
if (!geoMechWellLogExtractor) return;
|
if (!geoMechWellLogExtractor) return;
|
||||||
curveData = RimWellLogTrack::curveSamplingPointData(geoMechWellLogExtractor, RigFemResultAddress(RIG_FORMATION_NAMES, RiaDefines::activeFormationNamesResultName().toStdString(), ""));
|
curveData = RimWellLogTrack::curveSamplingPointData(geoMechWellLogExtractor, RigFemResultAddress(RIG_FORMATION_NAMES, RiaDefines::activeFormationNamesResultName().toStdString(), ""));
|
||||||
}
|
}
|
||||||
@@ -1040,7 +1049,7 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
|||||||
RimWellLogPlot* plot;
|
RimWellLogPlot* plot;
|
||||||
firstAncestorOrThisOfTypeAsserted(plot);
|
firstAncestorOrThisOfTypeAsserted(plot);
|
||||||
|
|
||||||
std::vector<QString> formationNamesVector = RimWellLogTrack::formationNamesVector(m_case);
|
std::vector<QString> formationNamesVector = RimWellLogTrack::formationNamesVector(m_formationCase);
|
||||||
std::vector<QString> formationNamesToPlot;
|
std::vector<QString> formationNamesToPlot;
|
||||||
std::vector<std::pair<double, double>> yValues;
|
std::vector<std::pair<double, double>> yValues;
|
||||||
|
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ private:
|
|||||||
caf::PdmField<bool> m_isLogarithmicScaleEnabled;
|
caf::PdmField<bool> m_isLogarithmicScaleEnabled;
|
||||||
|
|
||||||
caf::PdmField<bool> m_showFormations;
|
caf::PdmField<bool> m_showFormations;
|
||||||
caf::PdmPtrField<RimCase*> m_case;
|
caf::PdmPtrField<RimCase*> m_formationCase;
|
||||||
caf::PdmField<caf::AppEnum<TrajectoryType> > m_trajectoryType;
|
caf::PdmField<caf::AppEnum<TrajectoryType> > m_trajectoryType;
|
||||||
caf::PdmPtrField<RimWellPath*> m_wellPath;
|
caf::PdmPtrField<RimWellPath*> m_wellPath;
|
||||||
caf::PdmField<QString> m_simWellName;
|
caf::PdmField<QString> m_simWellName;
|
||||||
|
|||||||
Reference in New Issue
Block a user