mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2002 RFT Plot: Add visible x range and new logic for formations
This commit is contained in:
parent
40b7f99de3
commit
95f7f40b15
@ -94,9 +94,6 @@ RimWellRftPlot::RimWellRftPlot()
|
||||
m_selectedTimeSteps.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN);
|
||||
m_selectedTimeSteps.uiCapability()->setAutoAddingOptionFromValue(false);
|
||||
|
||||
CAF_PDM_InitField(&m_showFormations, "ShowFormations", false, "Show Formations", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_formationCase, "FormationCase", "Formation Case", "", "", "");
|
||||
|
||||
this->setAsPlotMdiWindow();
|
||||
m_selectedSourcesOrTimeStepsFieldsChanged = false;
|
||||
}
|
||||
@ -1085,15 +1082,6 @@ QList<caf::PdmOptionItemInfo> RimWellRftPlot::calculateValueOptions(const caf::P
|
||||
options.push_front(caf::PdmOptionItemInfo("None", -1));
|
||||
}
|
||||
}
|
||||
else if (fieldNeedingOptions == &m_formationCase)
|
||||
{
|
||||
for (RifWellRftAddress source : selectedSources())
|
||||
{
|
||||
RifWellRftAddress addr = RifWellRftAddress(RifWellRftAddress::RFT, source.eclCase());
|
||||
//caf::PdmOptionItemInfo item = caf::PdmOptionItemInfo(source.eclCase()->caseUserDescription(), QVariant::fromValue(addr));
|
||||
options.push_back(caf::PdmOptionItemInfo(source.eclCase()->caseUserDescription(), source.eclCase(), false, source.eclCase()->uiIcon()));
|
||||
}
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
@ -1136,39 +1124,6 @@ void RimWellRftPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
||||
{
|
||||
//m_wellLogPlot->setShowDescription(m_showPlotTitle);
|
||||
}
|
||||
else if (changedField == &m_showFormations)
|
||||
{
|
||||
if (m_wellLogPlot->trackCount())
|
||||
{
|
||||
RimWellLogTrack* track = m_wellLogPlot->trackByIndex(0);
|
||||
if (m_formationCase != nullptr)
|
||||
{
|
||||
track->setCase(m_formationCase());
|
||||
}
|
||||
else if (!m_selectedSources().empty())
|
||||
{
|
||||
m_formationCase = m_selectedSources().at(0).eclCase();
|
||||
track->setCase(m_formationCase);
|
||||
}
|
||||
|
||||
if (!m_wellName().isEmpty())
|
||||
{
|
||||
track->setSimWellName(m_wellName);
|
||||
}
|
||||
|
||||
track->setBranchIndex(m_branchIndex());
|
||||
track->setShowFormations(m_showFormations());
|
||||
}
|
||||
|
||||
}
|
||||
else if (changedField == &m_formationCase)
|
||||
{
|
||||
if (m_wellLogPlot->trackCount())
|
||||
{
|
||||
RimWellLogTrack* track = m_wellLogPlot->trackByIndex(0);
|
||||
updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1215,10 +1170,12 @@ void RimWellRftPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
||||
|
||||
//uiOrdering.add(&m_showPlotTitle);
|
||||
|
||||
caf::PdmUiGroup* formationGroup = uiOrdering.addNewGroup("Formation Names Properties");
|
||||
|
||||
formationGroup->add(&m_showFormations);
|
||||
formationGroup->add(&m_formationCase);
|
||||
if (m_wellLogPlot && m_wellLogPlot->trackCount() > 0)
|
||||
{
|
||||
RimWellLogTrack* track = m_wellLogPlot->trackByIndex(0);
|
||||
track->uiOrderingForShowFormationNamesAndCase(uiConfigName, uiOrdering);
|
||||
track->uiOrderingForVisibleXRange(uiConfigName, uiOrdering);
|
||||
}
|
||||
|
||||
uiOrdering.skipRemainingFields(true);
|
||||
}
|
||||
|
@ -166,8 +166,5 @@ private:
|
||||
|
||||
std::map<QDateTime, std::set<RifWellRftAddress>> m_timeStepsToAddresses;
|
||||
|
||||
caf::PdmField<bool> m_showFormations;
|
||||
caf::PdmPtrField<RimCase*> m_formationCase;
|
||||
|
||||
bool m_selectedSourcesOrTimeStepsFieldsChanged;
|
||||
};
|
||||
|
@ -107,7 +107,7 @@ RimWellLogTrack::RimWellLogTrack()
|
||||
CAF_PDM_InitField(&m_simWellName, "SimulationWellName", QString("None"), " ", "", "", "");
|
||||
CAF_PDM_InitField(&m_branchIndex, "Branch", 0, " ", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_case, "CurveCase", "Case", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_case, "CurveCase", "Formation Case", "", "", "");
|
||||
m_case.uiCapability()->setUiTreeChildrenHidden(true);
|
||||
|
||||
m_simulationWellChosen = false;
|
||||
@ -464,42 +464,6 @@ void RimWellLogTrack::loadDataAndUpdate()
|
||||
updateFormationNamesOnPlot();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::setShowFormations(bool show /*= true*/)
|
||||
{
|
||||
m_showFormations = show;
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::setCase(RimCase* rimCase)
|
||||
{
|
||||
m_case = rimCase;
|
||||
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::setSimWellName(const QString& simWellName)
|
||||
{
|
||||
m_simWellName = simWellName;
|
||||
m_trajectoryType = RimWellLogTrack::SIMULATION_WELL;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::setBranchIndex(int branchIndex)
|
||||
{
|
||||
m_branchIndex = branchIndex;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -702,11 +666,7 @@ void RimWellLogTrack::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
||||
}
|
||||
}
|
||||
|
||||
caf::PdmUiGroup* gridGroup = uiOrdering.addNewGroup("Visible X Axis Range");
|
||||
gridGroup->add(&m_isAutoScaleXEnabled);
|
||||
gridGroup->add(&m_isLogarithmicScaleEnabled);
|
||||
gridGroup->add(&m_visibleXRangeMin);
|
||||
gridGroup->add(&m_visibleXRangeMax);
|
||||
uiOrderingForVisibleXRange(uiConfigName, uiOrdering);
|
||||
|
||||
uiOrdering.skipRemainingFields(true);
|
||||
}
|
||||
@ -833,6 +793,28 @@ std::vector<RimWellLogCurve* > RimWellLogTrack::curvesVector()
|
||||
return curvesVector;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::uiOrderingForShowFormationNamesAndCase(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
caf::PdmUiGroup* formationGroup = uiOrdering.addNewGroup("Formation Names Properties");
|
||||
formationGroup->add(&m_showFormations);
|
||||
formationGroup->add(&m_case);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::uiOrderingForVisibleXRange(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
caf::PdmUiGroup* gridGroup = uiOrdering.addNewGroup("Visible X Axis Range");
|
||||
gridGroup->add(&m_isAutoScaleXEnabled);
|
||||
gridGroup->add(&m_isLogarithmicScaleEnabled);
|
||||
gridGroup->add(&m_visibleXRangeMin);
|
||||
gridGroup->add(&m_visibleXRangeMax);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -83,11 +83,6 @@ public:
|
||||
|
||||
void loadDataAndUpdate();
|
||||
|
||||
void setShowFormations(bool show = true);
|
||||
void setCase(RimCase* rimCase);
|
||||
void setSimWellName(const QString& simWellName);
|
||||
void setBranchIndex(int branchIndex);
|
||||
|
||||
void availableDepthRange(double* minimumDepth, double* maximumDepth);
|
||||
void updateXZoomAndParentPlotDepthZoom();
|
||||
void updateXZoom();
|
||||
@ -103,6 +98,9 @@ public:
|
||||
QString description();
|
||||
std::vector<RimWellLogCurve* > curvesVector();
|
||||
|
||||
void uiOrderingForShowFormationNamesAndCase(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
||||
void uiOrderingForVisibleXRange(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
||||
|
||||
private:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
||||
|
Loading…
Reference in New Issue
Block a user