mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1495 Add 'Completions' folder to RimWellPath
Move perforation intervals into folder Move fishbone definitions and fishbone well paths into folder
This commit is contained in:
@@ -6,10 +6,12 @@ endif()
|
||||
|
||||
set (SOURCE_GROUP_HEADER_FILES
|
||||
${CEE_CURRENT_LIST_DIR}RimFishbonesMultipleSubs.h
|
||||
${CEE_CURRENT_LIST_DIR}RimFishbonesCollection.h
|
||||
)
|
||||
|
||||
set (SOURCE_GROUP_SOURCE_FILES
|
||||
${CEE_CURRENT_LIST_DIR}RimFishbonesMultipleSubs.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimFishbonesCollection.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017 Statoil ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimFishbonesCollection.h"
|
||||
|
||||
#include "RimEclipseWell.h"
|
||||
#include "RimPerforationInterval.h"
|
||||
#include "RimView.h"
|
||||
#include "RimProject.h"
|
||||
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include "RifWellPathImporter.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "RimFishboneWellPathCollection.h"
|
||||
#include "RimFishbonesMultipleSubs.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimFishbonesCollection, "FishbonesCollection");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFishbonesCollection::RimFishbonesCollection()
|
||||
{
|
||||
CAF_PDM_InitObject("Fishbones", ":/Folder.png", "", "");
|
||||
|
||||
m_name.uiCapability()->setUiHidden(true);
|
||||
m_name = "Fishbones";
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&fishbonesSubs, "FishbonesSubs", "fishbonesSubs", "", "", "");
|
||||
|
||||
fishbonesSubs.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_wellPathCollection, "WellPathCollection", "Well Paths", "", "", "");
|
||||
m_wellPathCollection = new RimFishboneWellPathCollection;
|
||||
m_wellPathCollection.uiCapability()->setUiHidden(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFishboneWellPathCollection* RimFishbonesCollection::wellPathCollection() const
|
||||
{
|
||||
return m_wellPathCollection();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017 Statoil ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RimCheckableNamedObject.h"
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmChildField.h"
|
||||
|
||||
class RimFishbonesMultipleSubs;
|
||||
class RimFishboneWellPathCollection;
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==================================================================================================
|
||||
class RimFishbonesCollection : public RimCheckableNamedObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
RimFishbonesCollection();
|
||||
|
||||
RimFishboneWellPathCollection* wellPathCollection() const;
|
||||
|
||||
caf::PdmChildArrayField<RimFishbonesMultipleSubs*> fishbonesSubs;
|
||||
|
||||
private:
|
||||
caf::PdmChildField<RimFishboneWellPathCollection*> m_wellPathCollection;
|
||||
};
|
||||
@@ -41,18 +41,10 @@ RimFishboneWellPathCollection::RimFishboneWellPathCollection()
|
||||
CAF_PDM_InitObject("WellPathCompletions", ":/WellCollection.png", "", "");
|
||||
|
||||
m_name.uiCapability()->setUiHidden(true);
|
||||
m_name = "Completions";
|
||||
m_name = "Well Paths";
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_completions, "Completions", "WellPathCompletions", "", "", "");
|
||||
m_completions.uiCapability()->setUiHidden(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFishboneWellPathCollection::~RimFishboneWellPathCollection()
|
||||
{
|
||||
m_completions.deleteAllChildObjects();
|
||||
CAF_PDM_InitFieldNoDefault(&m_wellPaths, "WellPaths", "Well Paths", "", "", "");
|
||||
m_wellPaths.uiCapability()->setUiHidden(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -70,7 +62,7 @@ void RimFishboneWellPathCollection::fieldChangedByUi(const caf::PdmFieldHandle*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishboneWellPathCollection::appendCompletion(RimFishboneWellPath* completion)
|
||||
{
|
||||
m_completions.push_back(completion);
|
||||
m_wellPaths.push_back(completion);
|
||||
|
||||
updateConnectedEditors();
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(completion);
|
||||
@@ -82,13 +74,13 @@ void RimFishboneWellPathCollection::appendCompletion(RimFishboneWellPath* comple
|
||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
|
||||
uiCapability()->setUiHidden(!m_completions.empty());
|
||||
uiCapability()->setUiHidden(!m_wellPaths.empty());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishboneWellPathCollection::importCompletionsFromFile(const QList<QString> filePaths)
|
||||
void RimFishboneWellPathCollection::importCompletionsFromFile(const QStringList& filePaths)
|
||||
{
|
||||
RifWellPathImporter wellPathImporter;
|
||||
|
||||
|
||||
@@ -37,12 +37,14 @@ class RimFishboneWellPathCollection : public RimCheckableNamedObject
|
||||
|
||||
public:
|
||||
RimFishboneWellPathCollection();
|
||||
~RimFishboneWellPathCollection();
|
||||
|
||||
void appendCompletion(RimFishboneWellPath* completion);
|
||||
void importCompletionsFromFile(const QList<QString> filePaths);
|
||||
void importCompletionsFromFile(const QStringList& filePaths);
|
||||
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
|
||||
caf::PdmChildArrayField<RimFishboneWellPath*> m_completions;
|
||||
private:
|
||||
void appendCompletion(RimFishboneWellPath* completion);
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimFishboneWellPath*> m_wellPaths;
|
||||
};
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
#include "RimWellLogFile.h"
|
||||
#include "RimWellLogPlotCollection.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimFishboneWellPathCollection.h"
|
||||
#include "RimPerforationCollection.h"
|
||||
|
||||
#include "RimFishbonesMultipleSubs.h"
|
||||
#include "RimWellPathCompletions.h"
|
||||
@@ -105,14 +103,6 @@ RimWellPath::RimWellPath()
|
||||
CAF_PDM_InitField(&wellPathRadiusScaleFactor, "WellPathRadiusScale", 1.0, "Well path radius scale", "", "", "");
|
||||
CAF_PDM_InitField(&wellPathColor, "WellPathColor", cvf::Color3f(0.999f, 0.333f, 0.999f), "Well path color", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_completionCollection, "Completions_to_be_moved", "Completions", "", "", "");
|
||||
m_completionCollection = new RimFishboneWellPathCollection;
|
||||
m_completionCollection.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_perforationCollection, "Perforations", "Perforations", "", "", "");
|
||||
m_perforationCollection = new RimPerforationCollection;
|
||||
m_perforationCollection.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_completions, "Completions", "Completions", "", "", "");
|
||||
m_completions = new RimWellPathCompletions;
|
||||
m_completions.uiCapability()->setUiTreeHidden(true);
|
||||
@@ -120,9 +110,6 @@ RimWellPath::RimWellPath()
|
||||
CAF_PDM_InitFieldNoDefault(&m_wellLogFile, "WellLogFile", "Well Log File", "", "", "");
|
||||
m_wellLogFile.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&fishbonesSubs, "FishbonesSubs", "fishbonesSubs", "", "", "");
|
||||
fishbonesSubs.uiCapability()->setUiHidden(true);
|
||||
|
||||
m_wellPath = NULL;
|
||||
}
|
||||
|
||||
@@ -174,6 +161,26 @@ void RimWellPath::setSurveyType(QString surveyType)
|
||||
wellPathColor = cvf::Color3f(0.0f, 0.333f, 0.999f);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFishbonesCollection* RimWellPath::fishbonesCollection()
|
||||
{
|
||||
CVF_ASSERT(m_completions);
|
||||
|
||||
return m_completions->fishbonesCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPerforationCollection* RimWellPath::perforationIntervalCollection()
|
||||
{
|
||||
CVF_ASSERT(m_completions);
|
||||
|
||||
return m_completions->perforationCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -296,16 +303,6 @@ void RimWellPath::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, Q
|
||||
uiTreeOrdering.skipRemainingChildren(true);
|
||||
uiTreeOrdering.add(&m_wellLogFile);
|
||||
uiTreeOrdering.add(&m_completions);
|
||||
|
||||
if (!m_completionCollection->m_completions.empty())
|
||||
{
|
||||
uiTreeOrdering.add(&m_completionCollection);
|
||||
}
|
||||
if (!m_perforationCollection->m_perforations.empty())
|
||||
{
|
||||
uiTreeOrdering.add(&m_perforationCollection);
|
||||
}
|
||||
uiTreeOrdering.add(&fishbonesSubs);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -39,7 +39,7 @@ class RimWellLogFile;
|
||||
class RimFishboneWellPathCollection;
|
||||
class RivWellPathPartMgr;
|
||||
|
||||
class RimFishbonesMultipleSubs;
|
||||
class RimFishbonesCollection;
|
||||
class RimPerforationCollection;
|
||||
class RimWellPathCompletions;
|
||||
|
||||
@@ -74,13 +74,11 @@ public:
|
||||
caf::PdmField<double> wellPathRadiusScaleFactor;
|
||||
|
||||
caf::PdmChildField<RimWellLogFile*> m_wellLogFile;
|
||||
caf::PdmChildField<RimFishboneWellPathCollection*> m_completionCollection;
|
||||
caf::PdmChildField<RimPerforationCollection*> m_perforationCollection;
|
||||
caf::PdmChildField<RimWellPathCompletions*> m_completions;
|
||||
|
||||
RimFishbonesCollection* fishbonesCollection();
|
||||
RimPerforationCollection* perforationIntervalCollection();
|
||||
|
||||
RigWellPath* wellPathGeometry();
|
||||
caf::PdmChildArrayField<RimFishbonesMultipleSubs*> fishbonesSubs;
|
||||
|
||||
RivWellPathPartMgr* partMgr();
|
||||
|
||||
bool readWellPathFile(QString * errorMessage, RifWellPathImporter* wellPathImporter);
|
||||
@@ -110,6 +108,8 @@ private:
|
||||
|
||||
caf::PdmField<QString> m_surveyType;
|
||||
caf::PdmField<double> m_datumElevation;
|
||||
|
||||
caf::PdmChildField<RimWellPathCompletions*> m_completions;
|
||||
|
||||
cvf::ref<RigWellPath> m_wellPath;
|
||||
cvf::ref<RivWellPathPartMgr> m_wellPathPartMgr;
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
|
||||
#include "RimWellPathCompletions.h"
|
||||
|
||||
#include "RimFishbonesCollection.h"
|
||||
#include "RimPerforationCollection.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimWellPathCompletions, "WellPathCompletions");
|
||||
|
||||
@@ -27,6 +30,29 @@ CAF_PDM_SOURCE_INIT(RimWellPathCompletions, "WellPathCompletions");
|
||||
RimWellPathCompletions::RimWellPathCompletions()
|
||||
{
|
||||
CAF_PDM_InitObject("WellPathCompletions", ":/WellCollection.png", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_perforationCollection, "Perforations", "Perforations", "", "", "");
|
||||
m_perforationCollection = new RimPerforationCollection;
|
||||
m_perforationCollection.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_fishbonesCollection, "Fishbones", "Fishbones", "", "", "");
|
||||
m_fishbonesCollection = new RimFishbonesCollection;
|
||||
m_fishbonesCollection.uiCapability()->setUiHidden(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFishbonesCollection* RimWellPathCompletions::fishbonesCollection() const
|
||||
{
|
||||
return m_fishbonesCollection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPerforationCollection* RimWellPathCompletions::perforationCollection() const
|
||||
{
|
||||
return m_perforationCollection;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmChildField.h"
|
||||
|
||||
class RimFishbonesCollection;
|
||||
class RimPerforationCollection;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@@ -31,4 +34,11 @@ class RimWellPathCompletions : public caf::PdmObject
|
||||
|
||||
public:
|
||||
RimWellPathCompletions();
|
||||
|
||||
RimFishbonesCollection* fishbonesCollection() const;
|
||||
RimPerforationCollection* perforationCollection() const;
|
||||
|
||||
private:
|
||||
caf::PdmChildField<RimFishbonesCollection*> m_fishbonesCollection;
|
||||
caf::PdmChildField<RimPerforationCollection*> m_perforationCollection;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user