mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 08:25:03 -05:00
#3156 Make formation labels optional even if formation lines are shown
This commit is contained in:
1 parent
8b258d6edd
commit
f8a7ba541f
5 files changed
+45
-12
No files matched your search
@@ -158,7 +158,13 @@ void RicNewWellBoreStabilityPlotFeature::createFormationTrack(RimWellLogPlot* pl
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicNewWellBoreStabilityPlotFeature::createCasingShoeTrack(RimWellLogPlot* plot, RimWellPath* wellPath, RimGeoMechCase* geoMechCase)
|
void RicNewWellBoreStabilityPlotFeature::createCasingShoeTrack(RimWellLogPlot* plot, RimWellPath* wellPath, RimGeoMechCase* geoMechCase)
|
||||||
{
|
{
|
||||||
|
RimWellLogTrack* casingShoeTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack(false, "Casing Shoe", plot);
|
||||||
|
casingShoeTrack->setWidthScaleFactor(RimWellLogTrack::NARROW_TRACK);
|
||||||
|
casingShoeTrack->setFormationWellPath(wellPath);
|
||||||
|
casingShoeTrack->setFormationCase(geoMechCase);
|
||||||
|
casingShoeTrack->setShowFormations(true);
|
||||||
|
casingShoeTrack->setShowFormationLabels(false);
|
||||||
|
casingShoeTrack->setVisibleXRange(0.0, 0.0);
|
||||||
std::vector<RimWellLogFile*> wellLogFiles = wellPath->wellLogFiles();
|
std::vector<RimWellLogFile*> wellLogFiles = wellPath->wellLogFiles();
|
||||||
for (RimWellLogFile* logFile : wellLogFiles)
|
for (RimWellLogFile* logFile : wellLogFiles)
|
||||||
{
|
{
|
||||||
@@ -167,9 +173,6 @@ void RicNewWellBoreStabilityPlotFeature::createCasingShoeTrack(RimWellLogPlot* p
|
|||||||
{
|
{
|
||||||
if (channel->name() == "CASING_SIZE")
|
if (channel->name() == "CASING_SIZE")
|
||||||
{
|
{
|
||||||
RimWellLogTrack* casingShoeTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack(false, "Casing Shoe Depth", plot);
|
|
||||||
casingShoeTrack->setWidthScaleFactor(RimWellLogTrack::NARROW_TRACK);
|
|
||||||
casingShoeTrack->setAutoScaleXEnabled(true);
|
|
||||||
RimWellLogFileCurve* fileCurve = RicWellLogTools::addFileCurve(casingShoeTrack, false);
|
RimWellLogFileCurve* fileCurve = RicWellLogTools::addFileCurve(casingShoeTrack, false);
|
||||||
fileCurve->setWellLogFile(logFile);
|
fileCurve->setWellLogFile(logFile);
|
||||||
fileCurve->setWellPath(wellPath);
|
fileCurve->setWellPath(wellPath);
|
||||||
@@ -177,6 +180,7 @@ void RicNewWellBoreStabilityPlotFeature::createCasingShoeTrack(RimWellLogPlot* p
|
|||||||
fileCurve->setCustomName(QString("Casing size [in]"));
|
fileCurve->setCustomName(QString("Casing size [in]"));
|
||||||
fileCurve->setLineThickness(2);
|
fileCurve->setLineThickness(2);
|
||||||
fileCurve->loadDataAndUpdate(false);
|
fileCurve->loadDataAndUpdate(false);
|
||||||
|
casingShoeTrack->setAutoScaleXEnabled(true);
|
||||||
casingShoeTrack->calculateXZoomRangeAndUpdateQwt();
|
casingShoeTrack->calculateXZoomRangeAndUpdateQwt();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -194,6 +198,11 @@ void RicNewWellBoreStabilityPlotFeature::createStabilityCurvesTrack(RimWellLogPl
|
|||||||
stabilityCurvesTrack->setAutoScaleXEnabled(true);
|
stabilityCurvesTrack->setAutoScaleXEnabled(true);
|
||||||
stabilityCurvesTrack->setTickIntervals(0.5, 0.05);
|
stabilityCurvesTrack->setTickIntervals(0.5, 0.05);
|
||||||
stabilityCurvesTrack->enableGridLines(RimWellLogTrack::GRID_X_MAJOR_AND_MINOR);
|
stabilityCurvesTrack->enableGridLines(RimWellLogTrack::GRID_X_MAJOR_AND_MINOR);
|
||||||
|
stabilityCurvesTrack->setFormationWellPath(wellPath);
|
||||||
|
stabilityCurvesTrack->setFormationCase(geoMechView->geoMechCase());
|
||||||
|
stabilityCurvesTrack->setShowFormations(true);
|
||||||
|
stabilityCurvesTrack->setShowFormationLabels(false);
|
||||||
|
|
||||||
std::vector<QString> resultNames = RiaDefines::wellPathStabilityResultNames();
|
std::vector<QString> resultNames = RiaDefines::wellPathStabilityResultNames();
|
||||||
|
|
||||||
std::vector<cvf::Color3f> colors = { cvf::Color3f::RED, cvf::Color3f::PURPLE, cvf::Color3f::GREEN, cvf::Color3f::BLUE, cvf::Color3f::ORANGE };
|
std::vector<cvf::Color3f> colors = { cvf::Color3f::RED, cvf::Color3f::PURPLE, cvf::Color3f::GREEN, cvf::Color3f::BLUE, cvf::Color3f::ORANGE };
|
||||||
@@ -262,5 +271,8 @@ void RicNewWellBoreStabilityPlotFeature::createAnglesTrack(RimWellLogPlot* plot,
|
|||||||
wellPathAnglesTrack->setVisibleXRange(minValue, maxValue);
|
wellPathAnglesTrack->setVisibleXRange(minValue, maxValue);
|
||||||
wellPathAnglesTrack->setTickIntervals(90.0, 30.0);
|
wellPathAnglesTrack->setTickIntervals(90.0, 30.0);
|
||||||
wellPathAnglesTrack->enableGridLines(RimWellLogTrack::GRID_X_MAJOR_AND_MINOR);
|
wellPathAnglesTrack->enableGridLines(RimWellLogTrack::GRID_X_MAJOR_AND_MINOR);
|
||||||
|
wellPathAnglesTrack->setFormationWellPath(wellPath);
|
||||||
|
wellPathAnglesTrack->setFormationCase(geoMechView->geoMechCase());
|
||||||
|
wellPathAnglesTrack->setShowFormations(true);
|
||||||
|
wellPathAnglesTrack->setShowFormationLabels(false);
|
||||||
}
|
}
|
||||||
@@ -158,7 +158,8 @@ RimWellLogTrack::RimWellLogTrack()
|
|||||||
m_majorTickInterval.uiCapability()->setUiHidden(true);
|
m_majorTickInterval.uiCapability()->setUiHidden(true);
|
||||||
m_minorTickInterval.uiCapability()->setUiHidden(true);
|
m_minorTickInterval.uiCapability()->setUiHidden(true);
|
||||||
|
|
||||||
CAF_PDM_InitField(&m_showFormations, "ShowFormations", false, "Show", "", "", "");
|
CAF_PDM_InitField(&m_showFormations, "ShowFormations", false, "Show Lines", "", "", "");
|
||||||
|
CAF_PDM_InitField(&m_showFormationLabels, "ShowFormationLabels", true, "Show Labels", "", "", "");
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&m_formationSource, "FormationSource", "Source", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&m_formationSource, "FormationSource", "Source", "", "", "");
|
||||||
|
|
||||||
@@ -356,6 +357,10 @@ void RimWellLogTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (changedField == &m_showFormationLabels)
|
||||||
|
{
|
||||||
|
loadDataAndUpdate();
|
||||||
|
}
|
||||||
else if (changedField == &m_formationCase)
|
else if (changedField == &m_formationCase)
|
||||||
{
|
{
|
||||||
QList<caf::PdmOptionItemInfo> options;
|
QList<caf::PdmOptionItemInfo> options;
|
||||||
@@ -1037,6 +1042,14 @@ void RimWellLogTrack::setShowFormations(bool on)
|
|||||||
m_showFormations = on;
|
m_showFormations = on;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellLogTrack::setShowFormationLabels(bool on)
|
||||||
|
{
|
||||||
|
m_showFormationLabels = on;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -1062,6 +1075,7 @@ void RimWellLogTrack::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
|||||||
caf::PdmUiGroup* formationGroup = uiOrdering.addNewGroup("Zonation/Formation Names");
|
caf::PdmUiGroup* formationGroup = uiOrdering.addNewGroup("Zonation/Formation Names");
|
||||||
|
|
||||||
formationGroup->add(&m_showFormations);
|
formationGroup->add(&m_showFormations);
|
||||||
|
formationGroup->add(&m_showFormationLabels);
|
||||||
|
|
||||||
if (!m_formationsForCaseWithSimWellOnly)
|
if (!m_formationsForCaseWithSimWellOnly)
|
||||||
{
|
{
|
||||||
@@ -1439,6 +1453,7 @@ std::vector<QString> RimWellLogTrack::formationNamesVector(RimCase* rimCase)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::setFormationFieldsUiReadOnly(bool readOnly /*= true*/)
|
void RimWellLogTrack::setFormationFieldsUiReadOnly(bool readOnly /*= true*/)
|
||||||
{
|
{
|
||||||
|
m_showFormationLabels.uiCapability()->setUiReadOnly(readOnly);
|
||||||
m_formationSource.uiCapability()->setUiReadOnly(readOnly);
|
m_formationSource.uiCapability()->setUiReadOnly(readOnly);
|
||||||
m_formationTrajectoryType.uiCapability()->setUiReadOnly(readOnly);
|
m_formationTrajectoryType.uiCapability()->setUiReadOnly(readOnly);
|
||||||
m_formationSimWellName.uiCapability()->setUiReadOnly(readOnly);
|
m_formationSimWellName.uiCapability()->setUiReadOnly(readOnly);
|
||||||
@@ -1530,7 +1545,7 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
|||||||
&formationNamesToPlot,
|
&formationNamesToPlot,
|
||||||
&yValues);
|
&yValues);
|
||||||
|
|
||||||
m_annotationTool->attachFormationNames(this->viewer(), formationNamesToPlot, yValues);
|
m_annotationTool->attachFormationNames(this->viewer(), formationNamesToPlot, yValues, m_showFormationLabels());
|
||||||
}
|
}
|
||||||
else if (m_formationSource() == WELL_PICK_FILTER)
|
else if (m_formationSource() == WELL_PICK_FILTER)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ public:
|
|||||||
void setTickIntervals(double majorTickInterval, double minorTickInterval);
|
void setTickIntervals(double majorTickInterval, double minorTickInterval);
|
||||||
void enableGridLines(GridLines gridLines);
|
void enableGridLines(GridLines gridLines);
|
||||||
void setShowFormations(bool on);
|
void setShowFormations(bool on);
|
||||||
|
void setShowFormationLabels(bool on);
|
||||||
|
|
||||||
RiuWellLogTrack* viewer();
|
RiuWellLogTrack* viewer();
|
||||||
|
|
||||||
@@ -183,6 +184,7 @@ private:
|
|||||||
caf::PdmField<double> m_minorTickInterval;
|
caf::PdmField<double> m_minorTickInterval;
|
||||||
|
|
||||||
caf::PdmField<bool> m_showFormations;
|
caf::PdmField<bool> m_showFormations;
|
||||||
|
caf::PdmField<bool> m_showFormationLabels;
|
||||||
caf::PdmField<caf::AppEnum<FormationSource>> m_formationSource;
|
caf::PdmField<caf::AppEnum<FormationSource>> m_formationSource;
|
||||||
caf::PdmPtrField<RimCase*> m_formationCase;
|
caf::PdmPtrField<RimCase*> m_formationCase;
|
||||||
caf::PdmField<caf::AppEnum<TrajectoryType>> m_formationTrajectoryType;
|
caf::PdmField<caf::AppEnum<TrajectoryType>> m_formationTrajectoryType;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ RiuPlotAnnotationTool::~RiuPlotAnnotationTool()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiuPlotAnnotationTool::attachFormationNames(QwtPlot* plot, const std::vector<QString>& names, const std::vector<std::pair<double, double>> yPositions)
|
void RiuPlotAnnotationTool::attachFormationNames(QwtPlot* plot, const std::vector<QString>& names, const std::vector<std::pair<double, double>> yPositions, bool showNames)
|
||||||
{
|
{
|
||||||
detachAllAnnotations();
|
detachAllAnnotations();
|
||||||
|
|
||||||
@@ -47,10 +47,14 @@ void RiuPlotAnnotationTool::attachFormationNames(QwtPlot* plot, const std::vecto
|
|||||||
{
|
{
|
||||||
QwtPlotMarker* line(new QwtPlotMarker());
|
QwtPlotMarker* line(new QwtPlotMarker());
|
||||||
|
|
||||||
QString name = names[i];
|
QString name;
|
||||||
if (names[i].toLower().indexOf("top") == -1)
|
if (showNames)
|
||||||
{
|
{
|
||||||
name += " Top";
|
name = names[i];
|
||||||
|
if (names[i].toLower().indexOf("top") == -1)
|
||||||
|
{
|
||||||
|
name += " Top";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RiuPlotAnnotationTool::horizontalDashedLine(line, name, yPositions[i].first);
|
RiuPlotAnnotationTool::horizontalDashedLine(line, name, yPositions[i].first);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public:
|
|||||||
RiuPlotAnnotationTool() {};
|
RiuPlotAnnotationTool() {};
|
||||||
~RiuPlotAnnotationTool();
|
~RiuPlotAnnotationTool();
|
||||||
|
|
||||||
void attachFormationNames(QwtPlot* plot, const std::vector<QString>& names, const std::vector<std::pair<double, double>> yPositions);
|
void attachFormationNames(QwtPlot* plot, const std::vector<QString>& names, const std::vector<std::pair<double, double>> yPositions, bool showNames = true);
|
||||||
void attachWellPicks(QwtPlot* plot, const std::vector<QString>& names, const std::vector<double> yPositions);
|
void attachWellPicks(QwtPlot* plot, const std::vector<QString>& names, const std::vector<double> yPositions);
|
||||||
void detachAllAnnotations();
|
void detachAllAnnotations();
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user