mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1605 Add Well Name for Completion Export field
This commit is contained in:
parent
c4172d4c19
commit
8fceb8c74f
@ -112,7 +112,7 @@ void RicNewWellPathIntersectionFeatureCmd::redo()
|
|||||||
CVF_ASSERT(m_wellPath);
|
CVF_ASSERT(m_wellPath);
|
||||||
|
|
||||||
RimIntersection* intersection = new RimIntersection();
|
RimIntersection* intersection = new RimIntersection();
|
||||||
intersection->name = m_wellPath->name;
|
intersection->name = m_wellPath->name();
|
||||||
intersection->type = RimIntersection::CS_WELL_PATH;
|
intersection->type = RimIntersection::CS_WELL_PATH;
|
||||||
intersection->wellPath = m_wellPath;
|
intersection->wellPath = m_wellPath;
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ bool RicWellPathViewerEventHandler::handleEvent(cvf::Object* eventObject)
|
|||||||
cvf::Vec3d trueVerticalDepth = wellPathSourceInfo->trueVerticalDepth(uiEvent->firstPartTriangleIndex, domainCoord);
|
cvf::Vec3d trueVerticalDepth = wellPathSourceInfo->trueVerticalDepth(uiEvent->firstPartTriangleIndex, domainCoord);
|
||||||
|
|
||||||
QString wellPathText;
|
QString wellPathText;
|
||||||
wellPathText += QString("Well path name : %1\n").arg(wellPathSourceInfo->wellPath()->name);
|
wellPathText += QString("Well path name : %1\n").arg(wellPathSourceInfo->wellPath()->name());
|
||||||
wellPathText += QString("Measured depth : %1\n").arg(measuredDepth);
|
wellPathText += QString("Measured depth : %1\n").arg(measuredDepth);
|
||||||
|
|
||||||
QString formattedText;
|
QString formattedText;
|
||||||
|
@ -40,6 +40,8 @@ RimWellPathCompletions::RimWellPathCompletions()
|
|||||||
CAF_PDM_InitFieldNoDefault(&m_fishbonesCollection, "Fishbones", "Fishbones", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&m_fishbonesCollection, "Fishbones", "Fishbones", "", "", "");
|
||||||
m_fishbonesCollection = new RimFishbonesCollection;
|
m_fishbonesCollection = new RimFishbonesCollection;
|
||||||
m_fishbonesCollection.uiCapability()->setUiHidden(true);
|
m_fishbonesCollection.uiCapability()->setUiHidden(true);
|
||||||
|
|
||||||
|
CAF_PDM_InitField(&m_wellNameForExport, "WellNameForExport", QString(), "Well Name for Completion Export", "", "", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -62,3 +64,19 @@ RimPerforationCollection* RimWellPathCompletions::perforationCollection() const
|
|||||||
return m_perforationCollection;
|
return m_perforationCollection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellPathCompletions::setWellNameForExport(const QString& name)
|
||||||
|
{
|
||||||
|
m_wellNameForExport = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RimWellPathCompletions::wellNameForExport() const
|
||||||
|
{
|
||||||
|
return m_wellNameForExport();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "cafPdmObject.h"
|
#include "cafPdmObject.h"
|
||||||
|
#include "cafPdmField.h"
|
||||||
#include "cafPdmChildField.h"
|
#include "cafPdmChildField.h"
|
||||||
|
|
||||||
class RimFishbonesCollection;
|
class RimFishbonesCollection;
|
||||||
@ -38,7 +39,11 @@ public:
|
|||||||
RimFishbonesCollection* fishbonesCollection() const;
|
RimFishbonesCollection* fishbonesCollection() const;
|
||||||
RimPerforationCollection* perforationCollection() const;
|
RimPerforationCollection* perforationCollection() const;
|
||||||
|
|
||||||
|
void setWellNameForExport(const QString& name);
|
||||||
|
QString wellNameForExport() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmChildField<RimFishbonesCollection*> m_fishbonesCollection;
|
caf::PdmChildField<RimFishbonesCollection*> m_fishbonesCollection;
|
||||||
caf::PdmChildField<RimPerforationCollection*> m_perforationCollection;
|
caf::PdmChildField<RimPerforationCollection*> m_perforationCollection;
|
||||||
|
caf::PdmField<QString> m_wellNameForExport;
|
||||||
};
|
};
|
||||||
|
@ -148,7 +148,7 @@ bool RimWellLogFile::readFile(QString* errorMessage)
|
|||||||
{
|
{
|
||||||
if (wellPath->filepath().isEmpty())
|
if (wellPath->filepath().isEmpty())
|
||||||
{
|
{
|
||||||
wellPath->name = m_wellName;
|
wellPath->setName(m_wellName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,11 +55,11 @@ RimWellPath::RimWellPath()
|
|||||||
{
|
{
|
||||||
CAF_PDM_InitObject("WellPath", ":/Well.png", "", "");
|
CAF_PDM_InitObject("WellPath", ":/Well.png", "", "");
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&name, "WellPathName", "Name", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&m_name, "WellPathName", "Name", "", "", "");
|
||||||
name.uiCapability()->setUiReadOnly(true);
|
m_name.uiCapability()->setUiReadOnly(true);
|
||||||
name.xmlCapability()->setIOWritable(false);
|
m_name.xmlCapability()->setIOWritable(false);
|
||||||
name.xmlCapability()->setIOReadable(false);
|
m_name.xmlCapability()->setIOReadable(false);
|
||||||
name.uiCapability()->setUiHidden(true);
|
m_name.uiCapability()->setUiHidden(true);
|
||||||
CAF_PDM_InitFieldNoDefault(&id, "WellPathId", "Id", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&id, "WellPathId", "Id", "", "", "");
|
||||||
id.uiCapability()->setUiReadOnly(true);
|
id.uiCapability()->setUiReadOnly(true);
|
||||||
id.xmlCapability()->setIOWritable(false);
|
id.xmlCapability()->setIOWritable(false);
|
||||||
@ -149,7 +149,7 @@ RimWellPath::~RimWellPath()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
caf::PdmFieldHandle* RimWellPath::userDescriptionField()
|
caf::PdmFieldHandle* RimWellPath::userDescriptionField()
|
||||||
{
|
{
|
||||||
return &name;
|
return &m_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -254,6 +254,23 @@ void RimWellPath::fieldChangedByUi(const caf::PdmFieldHandle* changedField, cons
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RimWellPath::name() const
|
||||||
|
{
|
||||||
|
return m_name();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellPath::setName(const QString& name)
|
||||||
|
{
|
||||||
|
m_name = name;
|
||||||
|
m_completions->setWellNameForExport(name);
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -273,7 +290,7 @@ bool RimWellPath::readWellPathFile(QString* errorMessage, RifWellPathImporter* w
|
|||||||
RifWellPathImporter::WellMetaData wellMetaData = wellPathImporter->readWellMetaData(filepath(), wellPathIndexInFile());
|
RifWellPathImporter::WellMetaData wellMetaData = wellPathImporter->readWellMetaData(filepath(), wellPathIndexInFile());
|
||||||
// General well info
|
// General well info
|
||||||
|
|
||||||
name = wellData.m_name;
|
setName(wellData.m_name);
|
||||||
id = wellMetaData.m_id;
|
id = wellMetaData.m_id;
|
||||||
sourceSystem = wellMetaData.m_sourceSystem;
|
sourceSystem = wellMetaData.m_sourceSystem;
|
||||||
utmZone = wellMetaData.m_utmZone;
|
utmZone = wellMetaData.m_utmZone;
|
||||||
@ -477,5 +494,5 @@ void RimWellPath::setLogFileInfo(RimWellLogFile* logFileInfo)
|
|||||||
m_wellLogFile = logFileInfo;
|
m_wellLogFile = logFileInfo;
|
||||||
m_wellLogFile->uiCapability()->setUiHidden(true);
|
m_wellLogFile->uiCapability()->setUiHidden(true);
|
||||||
|
|
||||||
this->name = m_wellLogFile->wellName();
|
setName(m_wellLogFile->wellName());
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,8 @@ public:
|
|||||||
|
|
||||||
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 );
|
||||||
|
|
||||||
caf::PdmField<QString> name;
|
QString name() const;
|
||||||
|
void setName(const QString& name);
|
||||||
|
|
||||||
caf::PdmField<QString> filepath;
|
caf::PdmField<QString> filepath;
|
||||||
caf::PdmField<int> wellPathIndexInFile; // -1 means none.
|
caf::PdmField<int> wellPathIndexInFile; // -1 means none.
|
||||||
@ -123,4 +124,5 @@ private:
|
|||||||
|
|
||||||
cvf::ref<RigWellPath> m_wellPath;
|
cvf::ref<RigWellPath> m_wellPath;
|
||||||
cvf::ref<RivWellPathPartMgr> m_wellPathPartMgr;
|
cvf::ref<RivWellPathPartMgr> m_wellPathPartMgr;
|
||||||
|
caf::PdmField<QString> m_name;
|
||||||
};
|
};
|
||||||
|
@ -158,7 +158,7 @@ void RimWellPathCollection::readWellPathFiles()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
progress.setProgressDescription(QString("Reading file %1").arg(wellPaths[wpIdx]->name));
|
progress.setProgressDescription(QString("Reading file %1").arg(wellPaths[wpIdx]->name()));
|
||||||
progress.incrementProgress();
|
progress.incrementProgress();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,10 +247,10 @@ void RimWellPathCollection::readAndAddWellPaths(std::vector<RimWellPath*>& wellP
|
|||||||
RimWellPath* wellPath = wellPathArray[wpIdx];
|
RimWellPath* wellPath = wellPathArray[wpIdx];
|
||||||
wellPath->readWellPathFile(NULL, m_wellPathImporter);
|
wellPath->readWellPathFile(NULL, m_wellPathImporter);
|
||||||
|
|
||||||
progress.setProgressDescription(QString("Reading file %1").arg(wellPath->name));
|
progress.setProgressDescription(QString("Reading file %1").arg(wellPath->name()));
|
||||||
|
|
||||||
// If a well path with this name exists already, make it read the well path file
|
// If a well path with this name exists already, make it read the well path file
|
||||||
RimWellPath* existingWellPath = wellPathByName(wellPath->name);
|
RimWellPath* existingWellPath = wellPathByName(wellPath->name());
|
||||||
if (existingWellPath)
|
if (existingWellPath)
|
||||||
{
|
{
|
||||||
existingWellPath->filepath = wellPath->filepath;
|
existingWellPath->filepath = wellPath->filepath;
|
||||||
|
Loading…
Reference in New Issue
Block a user