mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1722 Completion Export : Use RimTools::wellPathCollection
This commit is contained in:
parent
7347e0ecc3
commit
4ae3290e3c
@ -19,22 +19,21 @@
|
||||
|
||||
#include "RicNewWellLogFileCurveFeature.h"
|
||||
|
||||
#include "RicWellLogPlotCurveFeatureImpl.h"
|
||||
#include "RicNewWellLogPlotFeatureImpl.h"
|
||||
#include "RicWellLogPlotCurveFeatureImpl.h"
|
||||
#include "RicWellLogTools.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimWellLogFile.h"
|
||||
#include "RimWellLogFileChannel.h"
|
||||
#include "RimWellLogFileCurve.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RiuPlotMainWindow.h"
|
||||
|
||||
#include "RicWellLogTools.h"
|
||||
#include "RiuPlotMainWindow.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@ -96,10 +95,10 @@ void RicNewWellLogFileCurveFeature::setupActionLook(QAction* actionToSetup)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewWellLogFileCurveFeature::wellLogFilesAvailable()
|
||||
{
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
if (project->activeOilField()->wellPathCollection())
|
||||
auto wellPathCollection = RimTools::wellPathCollection();
|
||||
if (wellPathCollection)
|
||||
{
|
||||
caf::PdmChildArrayField<RimWellPath*>& wellPaths = project->activeOilField()->wellPathCollection()->wellPaths;
|
||||
caf::PdmChildArrayField<RimWellPath*>& wellPaths = wellPathCollection->wellPaths;
|
||||
|
||||
for (size_t i = 0; i < wellPaths.size(); i++)
|
||||
{
|
||||
|
@ -606,7 +606,7 @@ void RivWellPathPartMgr::clearAllBranchData()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPathCollection* RivWellPathPartMgr::wellPathCollection()
|
||||
RimWellPathCollection* RivWellPathPartMgr::wellPathCollection() const
|
||||
{
|
||||
if (!m_rimWellPath) return nullptr;
|
||||
|
||||
|
@ -110,7 +110,7 @@ private:
|
||||
|
||||
|
||||
void clearAllBranchData();
|
||||
inline RimWellPathCollection* wellPathCollection();
|
||||
inline RimWellPathCollection* wellPathCollection() const;
|
||||
inline double wellPathRadius(double characteristicCellSize, RimWellPathCollection* wellPathCollection);
|
||||
|
||||
bool isWellPathWithinBoundingBox(const cvf::BoundingBox& wellPathClipBoundingBox) const;
|
||||
|
@ -21,8 +21,8 @@
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "RivWellPathPartMgr.h"
|
||||
@ -129,22 +129,12 @@ void RivWellPathsPartMgr::createPartManagersIfRequired()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPathCollection* RivWellPathsPartMgr::wellPathCollection() const
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
|
||||
return proj->activeOilField()->wellPathCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RivWellPathsPartMgr::isWellPathVisible() const
|
||||
{
|
||||
auto wellPathColl = wellPathCollection();
|
||||
auto wellPathColl = RimTools::wellPathCollection();
|
||||
|
||||
if (!wellPathColl->isActive()) return false;
|
||||
if (wellPathColl->wellPathVisibility() == RimWellPathCollection::FORCE_ALL_OFF) return false;
|
||||
|
@ -42,7 +42,6 @@ class DisplayCoordTransform;
|
||||
|
||||
class Rim3dView;
|
||||
class RivWellPathPartMgr;
|
||||
class RimWellPathCollection;
|
||||
class RimWellPath;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -72,7 +71,6 @@ private:
|
||||
void clearGeometryCache();
|
||||
void scheduleGeometryRegen();
|
||||
void createPartManagersIfRequired();
|
||||
RimWellPathCollection* wellPathCollection() const;
|
||||
bool isWellPathVisible() const;
|
||||
|
||||
private:
|
||||
|
@ -30,11 +30,11 @@
|
||||
#include "RimEllipseFractureTemplate.h"
|
||||
#include "RimFracture.h"
|
||||
#include "RimFractureTemplate.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSimWellInViewCollection.h"
|
||||
#include "RimStimPlanColors.h"
|
||||
#include "RimStimPlanFractureTemplate.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimWellPathFracture.h"
|
||||
@ -329,7 +329,7 @@ void RimFractureTemplateCollection::initAfterRead()
|
||||
bool setAllShowMeshToFalseOnAllEclipseViews = false;
|
||||
|
||||
std::vector<RimWellPathFracture*> wellPathFractures;
|
||||
RimWellPathCollection* wellPathCollection = proj->activeOilField()->wellPathCollection();
|
||||
RimWellPathCollection* wellPathCollection = RimTools::wellPathCollection();
|
||||
wellPathCollection->descendantsIncludingThisOfType(wellPathFractures);
|
||||
|
||||
for (RimWellPathFracture* fracture : wellPathFractures)
|
||||
|
@ -26,8 +26,8 @@
|
||||
#include "RimCase.h"
|
||||
#include "RimGridView.h"
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimViewController.h"
|
||||
#include "RimViewLinker.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
@ -407,11 +407,7 @@ void Rim3dView::endAnimation()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPathCollection* Rim3dView::wellPathCollection() const
|
||||
{
|
||||
RimProject* proj = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
CVF_ASSERT(proj && proj->activeOilField() && proj->activeOilField()->wellPathCollection());
|
||||
|
||||
return proj->activeOilField()->wellPathCollection();
|
||||
return RimTools::wellPathCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -227,10 +227,10 @@ void RimTools::wellPathOptionItems(QList<caf::PdmOptionItemInfo>* options)
|
||||
CVF_ASSERT(options);
|
||||
if (!options) return;
|
||||
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
if (proj && proj->activeOilField() && proj->activeOilField()->wellPathCollection())
|
||||
auto wellPathColl = RimTools::wellPathCollection();
|
||||
if (wellPathColl)
|
||||
{
|
||||
caf::PdmChildArrayField<RimWellPath*>& wellPaths = proj->activeOilField()->wellPathCollection()->wellPaths;
|
||||
caf::PdmChildArrayField<RimWellPath*>& wellPaths = wellPathColl->wellPaths;
|
||||
|
||||
QIcon wellIcon(":/Well.png");
|
||||
for (RimWellPath* wellPath : wellPaths)
|
||||
@ -263,10 +263,10 @@ void RimTools::wellPathWithFormationsOptionItems(QList<caf::PdmOptionItemInfo>*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimTools::wellPathWithFormations(std::vector<RimWellPath*>* wellPaths)
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
if (proj && proj->activeOilField() && proj->activeOilField()->wellPathCollection())
|
||||
auto wellPathColl = RimTools::wellPathCollection();
|
||||
if (wellPathColl)
|
||||
{
|
||||
caf::PdmChildArrayField<RimWellPath*>& allWellPaths = proj->activeOilField()->wellPathCollection()->wellPaths;
|
||||
caf::PdmChildArrayField<RimWellPath*>& allWellPaths = wellPathColl->wellPaths;
|
||||
|
||||
for (RimWellPath* wellPath : allWellPaths)
|
||||
{
|
||||
@ -352,3 +352,17 @@ QString RimTools::dateFormatString()
|
||||
{
|
||||
return "dd.MMM yyyy";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPathCollection* RimTools::wellPathCollection()
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
if (proj && proj->activeOilField())
|
||||
{
|
||||
return proj->activeOilField()->wellPathCollection();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -33,6 +33,8 @@ namespace caf {
|
||||
class PdmOptionItemInfo;
|
||||
}
|
||||
|
||||
class RimWellPathCollection;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -51,4 +53,6 @@ public:
|
||||
static QString createTimeFormatStringFromDates(const std::vector<QDateTime>& dates);
|
||||
|
||||
static QString dateFormatString();
|
||||
|
||||
static RimWellPathCollection* wellPathCollection();
|
||||
};
|
||||
|
@ -22,16 +22,16 @@
|
||||
#include "RigWellLogCurveData.h"
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimWellLogFile.h"
|
||||
#include "RimWellLogFileChannel.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimWellRftPlot.h"
|
||||
#include "RimWellPlotTools.h"
|
||||
#include "RimWellRftPlot.h"
|
||||
|
||||
#include "RiuLineSegmentQwtPlotCurve.h"
|
||||
#include "RiuWellLogTrack.h"
|
||||
@ -275,10 +275,10 @@ QList<caf::PdmOptionItemInfo> RimWellLogFileCurve::calculateValueOptions(const c
|
||||
|
||||
if (fieldNeedingOptions == &m_wellPath)
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
if (proj->activeOilField()->wellPathCollection())
|
||||
auto wellPathColl = RimTools::wellPathCollection();
|
||||
if (wellPathColl)
|
||||
{
|
||||
caf::PdmChildArrayField<RimWellPath*>& wellPaths = proj->activeOilField()->wellPathCollection()->wellPaths;
|
||||
caf::PdmChildArrayField<RimWellPath*>& wellPaths = wellPathColl->wellPaths;
|
||||
|
||||
for (size_t i = 0; i < wellPaths.size(); i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user