mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1523 Completions : Import perforation intervals from file
This commit is contained in:
@@ -400,6 +400,7 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
|
||||
commandIds << "RicEditPerforationCollectionFeature";
|
||||
commandIds << "RicExportFishbonesLateralsFeature";
|
||||
commandIds << "RicExportFishbonesWellSegmentsFeature";
|
||||
commandIds << "RicWellPathImportPerforationIntervalsFeature";
|
||||
commandIds << "RicWellPathExportCompletionDataFeature";
|
||||
commandIds << "RicWellPathImportCompletionsFileFeature";
|
||||
commandIds << "RicFlyToObjectFeature";
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#include "cafPdmUiListEditor.h"
|
||||
#include "cafPdmUiTextEditor.h"
|
||||
#include "cafPdmUiLineEditor.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimPerforationInterval, "Perforation");
|
||||
|
||||
@@ -40,6 +41,9 @@ RimPerforationInterval::RimPerforationInterval()
|
||||
CAF_PDM_InitField(&m_endMD, "EndMeasuredDepth", 0.0, "End MD [m]", "", "", "");
|
||||
CAF_PDM_InitField(&m_diameter, "Diameter", 0.0, "Diameter [m]", "", "", "");
|
||||
CAF_PDM_InitField(&m_skinFactor, "SkinFactor", 0.0, "Skin Factor", "", "", "");
|
||||
CAF_PDM_InitField(&m_startOfHistory, "StartOfHistory", true, "Start of History", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_date, "StartDate", "Start Date", "", "", "");
|
||||
m_date.uiCapability()->setUiEditorTypeName(caf::PdmUiLineEditor::uiEditorTypeName());
|
||||
|
||||
m_name.uiCapability()->setUiReadOnly(true);
|
||||
}
|
||||
@@ -60,6 +64,41 @@ void RimPerforationInterval::setStartAndEndMD(double startMD, double endMD)
|
||||
m_endMD = endMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPerforationInterval::setStartOfHistory()
|
||||
{
|
||||
m_startOfHistory = true;
|
||||
|
||||
m_date.uiCapability()->setUiReadOnly(m_startOfHistory());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPerforationInterval::setDate(const QDate& date)
|
||||
{
|
||||
m_startOfHistory = false;
|
||||
m_date = QDateTime(date);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPerforationInterval::setDiameter(double diameter)
|
||||
{
|
||||
m_diameter = diameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPerforationInterval::setSkinFactor(double skinFactor)
|
||||
{
|
||||
m_skinFactor = skinFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -88,6 +127,11 @@ void RimPerforationInterval::fieldChangedByUi(const caf::PdmFieldHandle* changed
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->createDisplayModelAndRedrawAllViews();
|
||||
|
||||
if (changedField == &m_startOfHistory)
|
||||
{
|
||||
m_date.uiCapability()->setUiReadOnly(m_startOfHistory());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -107,6 +151,8 @@ void RimPerforationInterval::defineUiOrdering(QString uiConfigName, caf::PdmUiOr
|
||||
uiOrdering.add(&m_endMD);
|
||||
uiOrdering.add(&m_diameter);
|
||||
uiOrdering.add(&m_skinFactor);
|
||||
uiOrdering.add(&m_startOfHistory);
|
||||
uiOrdering.add(&m_date);
|
||||
|
||||
uiOrdering.skipRemainingFields();
|
||||
}
|
||||
|
||||
@@ -25,9 +25,10 @@
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
#include <QDate>
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimPerforationInterval : public RimCheckableNamedObject, public Rim3dPropertiesInterface
|
||||
{
|
||||
@@ -38,6 +39,10 @@ public:
|
||||
virtual ~RimPerforationInterval();
|
||||
|
||||
void setStartAndEndMD(double startMD, double endMD);
|
||||
void setStartOfHistory();
|
||||
void setDate(const QDate& date);
|
||||
void setDiameter(double diameter);
|
||||
void setSkinFactor(double skinFactor);
|
||||
double startMD() const { return m_startMD(); }
|
||||
double endMD() const { return m_endMD(); }
|
||||
double diameter() const { return m_diameter(); }
|
||||
@@ -55,4 +60,6 @@ private:
|
||||
caf::PdmField< double > m_endMD;
|
||||
caf::PdmField< double > m_diameter;
|
||||
caf::PdmField< double > m_skinFactor;
|
||||
caf::PdmField< bool > m_startOfHistory;
|
||||
caf::PdmField< QDateTime > m_date;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user