mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2123 Formation/Well Path: Add func to find well paths with formations
This commit is contained in:
@@ -240,6 +240,30 @@ void RimTools::wellPathOptionItems(QList<caf::PdmOptionItemInfo>* options)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimTools::wellPathWithFormationsOptionItems(QList<caf::PdmOptionItemInfo>* options)
|
||||||
|
{
|
||||||
|
CVF_ASSERT(options);
|
||||||
|
if (!options) return;
|
||||||
|
|
||||||
|
RimProject* proj = RiaApplication::instance()->project();
|
||||||
|
if (proj && proj->activeOilField() && proj->activeOilField()->wellPathCollection())
|
||||||
|
{
|
||||||
|
caf::PdmChildArrayField<RimWellPath*>& wellPaths = proj->activeOilField()->wellPathCollection()->wellPaths;
|
||||||
|
|
||||||
|
QIcon wellIcon(":/Well.png");
|
||||||
|
for (RimWellPath* wellPath : wellPaths)
|
||||||
|
{
|
||||||
|
if (wellPath->hasFormations())
|
||||||
|
{
|
||||||
|
options->push_back(caf::PdmOptionItemInfo(wellPath->name(), wellPath, false, wellIcon));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ public:
|
|||||||
static QString relocateFile(const QString& fileName, const QString& newProjectPath, const QString& oldProjectPath, bool* foundFile, std::vector<QString>* searchedPaths);
|
static QString relocateFile(const QString& fileName, const QString& newProjectPath, const QString& oldProjectPath, bool* foundFile, std::vector<QString>* searchedPaths);
|
||||||
|
|
||||||
static void wellPathOptionItems(QList<caf::PdmOptionItemInfo>* options);
|
static void wellPathOptionItems(QList<caf::PdmOptionItemInfo>* options);
|
||||||
|
static void wellPathWithFormationsOptionItems(QList<caf::PdmOptionItemInfo>* options);
|
||||||
static void caseOptionItems(QList<caf::PdmOptionItemInfo>* options);
|
static void caseOptionItems(QList<caf::PdmOptionItemInfo>* options);
|
||||||
|
|
||||||
static QString createTimeFormatStringFromDates(const std::vector<QDateTime>& dates);
|
static QString createTimeFormatStringFromDates(const std::vector<QDateTime>& dates);
|
||||||
|
|||||||
@@ -726,6 +726,27 @@ bool RimWellPath::readWellPathFormationsFile(QString* errorMessage, RifWellPathF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimWellPath::hasFormations() const
|
||||||
|
{
|
||||||
|
if (m_wellPathFormations.isNull())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
const RigWellPathFormations* RimWellPath::formationsGeometry() const
|
||||||
|
{
|
||||||
|
return m_wellPathFormations.p();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -74,6 +74,8 @@ public:
|
|||||||
|
|
||||||
void setFormationsGeometry(cvf::ref<RigWellPathFormations> wellPathFormations);
|
void setFormationsGeometry(cvf::ref<RigWellPathFormations> wellPathFormations);
|
||||||
bool readWellPathFormationsFile(QString* errorMessage, RifWellPathFormationsImporter* wellPathFormationsImporter);
|
bool readWellPathFormationsFile(QString* errorMessage, RifWellPathFormationsImporter* wellPathFormationsImporter);
|
||||||
|
bool hasFormations() const;
|
||||||
|
const RigWellPathFormations* formationsGeometry() const;
|
||||||
|
|
||||||
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
||||||
virtual caf::PdmFieldHandle* objectToggleField() override;
|
virtual caf::PdmFieldHandle* objectToggleField() override;
|
||||||
|
|||||||
Reference in New Issue
Block a user