mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2002 RFT Plot: Add formation name properties
This commit is contained in:
@@ -21,11 +21,14 @@
|
|||||||
#include "RiaApplication.h"
|
#include "RiaApplication.h"
|
||||||
#include "RiaColorTables.h"
|
#include "RiaColorTables.h"
|
||||||
#include "RiaDateStringParser.h"
|
#include "RiaDateStringParser.h"
|
||||||
|
|
||||||
#include "RifReaderEclipseRft.h"
|
#include "RifReaderEclipseRft.h"
|
||||||
|
|
||||||
#include "RigCaseCellResultsData.h"
|
#include "RigCaseCellResultsData.h"
|
||||||
#include "RigEclipseCaseData.h"
|
#include "RigEclipseCaseData.h"
|
||||||
#include "RigSimWellData.h"
|
#include "RigSimWellData.h"
|
||||||
#include "RigWellPath.h"
|
#include "RigWellPath.h"
|
||||||
|
|
||||||
#include "RimEclipseCase.h"
|
#include "RimEclipseCase.h"
|
||||||
#include "RimEclipseCaseCollection.h"
|
#include "RimEclipseCaseCollection.h"
|
||||||
#include "RimEclipseResultCase.h"
|
#include "RimEclipseResultCase.h"
|
||||||
@@ -42,11 +45,14 @@
|
|||||||
#include "RimWellLogTrack.h"
|
#include "RimWellLogTrack.h"
|
||||||
#include "RimWellPath.h"
|
#include "RimWellPath.h"
|
||||||
#include "RimWellPathCollection.h"
|
#include "RimWellPathCollection.h"
|
||||||
|
|
||||||
#include "RiuWellRftPlot.h"
|
#include "RiuWellRftPlot.h"
|
||||||
|
|
||||||
#include "cafPdmUiTreeSelectionEditor.h"
|
#include "cafPdmUiTreeSelectionEditor.h"
|
||||||
#include <tuple>
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
#include <tuple>
|
||||||
|
|
||||||
CAF_PDM_SOURCE_INIT(RimWellRftPlot, "WellRftPlot");
|
CAF_PDM_SOURCE_INIT(RimWellRftPlot, "WellRftPlot");
|
||||||
|
|
||||||
@@ -88,6 +94,9 @@ RimWellRftPlot::RimWellRftPlot()
|
|||||||
m_selectedTimeSteps.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN);
|
m_selectedTimeSteps.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN);
|
||||||
m_selectedTimeSteps.uiCapability()->setAutoAddingOptionFromValue(false);
|
m_selectedTimeSteps.uiCapability()->setAutoAddingOptionFromValue(false);
|
||||||
|
|
||||||
|
CAF_PDM_InitField(&m_showFormations, "ShowFormations", false, "Show Formations", "", "", "");
|
||||||
|
CAF_PDM_InitFieldNoDefault(&m_formationCase, "FormationCase", "Formation Case", "", "", "");
|
||||||
|
|
||||||
this->setAsPlotMdiWindow();
|
this->setAsPlotMdiWindow();
|
||||||
m_selectedSourcesOrTimeStepsFieldsChanged = false;
|
m_selectedSourcesOrTimeStepsFieldsChanged = false;
|
||||||
}
|
}
|
||||||
@@ -1076,6 +1085,15 @@ QList<caf::PdmOptionItemInfo> RimWellRftPlot::calculateValueOptions(const caf::P
|
|||||||
options.push_front(caf::PdmOptionItemInfo("None", -1));
|
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;
|
return options;
|
||||||
}
|
}
|
||||||
@@ -1118,6 +1136,39 @@ void RimWellRftPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
|||||||
{
|
{
|
||||||
//m_wellLogPlot->setShowDescription(m_showPlotTitle);
|
//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();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -1164,6 +1215,11 @@ void RimWellRftPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
|||||||
|
|
||||||
//uiOrdering.add(&m_showPlotTitle);
|
//uiOrdering.add(&m_showPlotTitle);
|
||||||
|
|
||||||
|
caf::PdmUiGroup* formationGroup = uiOrdering.addNewGroup("Formation Names Properties");
|
||||||
|
|
||||||
|
formationGroup->add(&m_showFormations);
|
||||||
|
formationGroup->add(&m_formationCase);
|
||||||
|
|
||||||
uiOrdering.skipRemainingFields(true);
|
uiOrdering.skipRemainingFields(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,19 +21,21 @@
|
|||||||
|
|
||||||
#include "RimViewWindow.h"
|
#include "RimViewWindow.h"
|
||||||
|
|
||||||
#include "cafPdmField.h"
|
#include "RimCase.h"
|
||||||
#include "cafPdmObject.h"
|
|
||||||
#include "cafPdmPtrField.h"
|
|
||||||
#include "cvfCollection.h"
|
|
||||||
#include "RimPlotCurve.h"
|
#include "RimPlotCurve.h"
|
||||||
|
|
||||||
#include "RifWellRftAddressQMetaType.h"
|
#include "RifWellRftAddressQMetaType.h"
|
||||||
|
|
||||||
#include <QPointer>
|
#include "cafPdmField.h"
|
||||||
|
#include "cafPdmObject.h"
|
||||||
|
#include "cafPdmPtrField.h"
|
||||||
|
#include "cvfCollection.h"
|
||||||
|
|
||||||
#include <QDate>
|
#include <QDate>
|
||||||
#include <QMetaType>
|
#include <QMetaType>
|
||||||
#include <set>
|
#include <QPointer>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <set>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
class RimEclipseCase;
|
class RimEclipseCase;
|
||||||
@@ -91,7 +93,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Overridden PDM methods
|
// Overridden PDM methods
|
||||||
virtual caf::PdmFieldHandle* userDescriptionField() { return &m_userName; }
|
virtual caf::PdmFieldHandle* userDescriptionField() override { return &m_userName; }
|
||||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
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;
|
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
||||||
@@ -164,5 +166,8 @@ private:
|
|||||||
|
|
||||||
std::map<QDateTime, std::set<RifWellRftAddress>> m_timeStepsToAddresses;
|
std::map<QDateTime, std::set<RifWellRftAddress>> m_timeStepsToAddresses;
|
||||||
|
|
||||||
|
caf::PdmField<bool> m_showFormations;
|
||||||
|
caf::PdmPtrField<RimCase*> m_formationCase;
|
||||||
|
|
||||||
bool m_selectedSourcesOrTimeStepsFieldsChanged;
|
bool m_selectedSourcesOrTimeStepsFieldsChanged;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user