#1667 MSW Export : Move parameters from export dialog to project

This commit is contained in:
Bjørnar Grip Fjær
2017-06-28 20:51:16 +02:00
parent 6dac618af0
commit 03aa6c8eb7
7 changed files with 59 additions and 120 deletions

View File

@@ -31,6 +31,25 @@
#include <algorithm>
namespace caf {
template<>
void RimFishbonesCollection::PressureDropEnum::setUp()
{
addItem(RimFishbonesCollection::HYDROSTATIC, "H--", "Hydrostatic");
addItem(RimFishbonesCollection::HYDROSTATIC_FRICTION, "HF-", "Hydrostatic + Friction");
addItem(RimFishbonesCollection::HYDROSTATIC_FRICTION_ACCELERATION, "HFA", "Hydrostatic + Friction + Acceleration");
setDefault(RimFishbonesCollection::HYDROSTATIC);
}
template<>
void RimFishbonesCollection::LengthAndDepthEnum::setUp()
{
addItem(RimFishbonesCollection::INC, "INC", "Incremental");
addItem(RimFishbonesCollection::ABS, "ABS", "Absolute");
setDefault(RimFishbonesCollection::INC);
}
}
CAF_PDM_SOURCE_INIT(RimFishbonesCollection, "FishbonesCollection");
//--------------------------------------------------------------------------------------------------
@@ -56,6 +75,9 @@ RimFishbonesCollection::RimFishbonesCollection()
CAF_PDM_InitField(&m_linerDiameter, "LinerDiameter", 0.152, "Liner Inner Diameter", "", "", "");
CAF_PDM_InitField(&m_roughnessFactor, "RoughnessFactor", 1e-05, "Roughness Factor", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_pressureDrop, "PressureDrop", "Pressure Drop", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_lengthAndDepth, "LengthAndDepth", "Length and Depth", "", "", "");
manuallyModifiedStartMD = false;
}
@@ -118,6 +140,8 @@ void RimFishbonesCollection::defineUiOrdering(QString uiConfigName, caf::PdmUiOr
caf::PdmUiGroup* mswGroup = uiOrdering.addNewGroup("Multi Segment Wells");
mswGroup->add(&m_linerDiameter);
mswGroup->add(&m_roughnessFactor);
mswGroup->add(&m_pressureDrop);
mswGroup->add(&m_lengthAndDepth);
}
//--------------------------------------------------------------------------------------------------

View File

@@ -41,6 +41,21 @@ class RimFishbonesCollection : public RimCheckableNamedObject
CAF_PDM_HEADER_INIT;
public:
enum PressureDropType {
HYDROSTATIC,
HYDROSTATIC_FRICTION,
HYDROSTATIC_FRICTION_ACCELERATION
};
typedef caf::AppEnum<PressureDropType> PressureDropEnum;
enum LengthAndDepthType {
ABS,
INC
};
typedef caf::AppEnum<LengthAndDepthType> LengthAndDepthEnum;
RimFishbonesCollection();
RimFishboneWellPathCollection* wellPathCollection() const;
@@ -54,6 +69,9 @@ public:
double linerDiameter(RiaEclipseUnitTools::UnitSystem unitSystem) const;
double roughnessFactor(RiaEclipseUnitTools::UnitSystem unitSystem) const;
PressureDropEnum pressureDrop() const { return m_pressureDrop(); }
LengthAndDepthEnum lengthAndDepth() const { return m_lengthAndDepth(); }
void setUnitSystemSpecificDefaults();
protected:
@@ -71,5 +89,8 @@ private:
caf::PdmField<double> m_linerDiameter;
caf::PdmField<double> m_roughnessFactor;
caf::PdmField<PressureDropEnum> m_pressureDrop;
caf::PdmField<LengthAndDepthEnum> m_lengthAndDepth;
bool manuallyModifiedStartMD;
};