mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7329 Report MD and formation dip from StimPlan template XML.
This commit is contained in:
parent
f2c25a5f13
commit
4d49302e82
@ -47,6 +47,7 @@
|
|||||||
#include "cafPdmObject.h"
|
#include "cafPdmObject.h"
|
||||||
#include "cafPdmUiDoubleSliderEditor.h"
|
#include "cafPdmUiDoubleSliderEditor.h"
|
||||||
#include "cafPdmUiFilePathEditor.h"
|
#include "cafPdmUiFilePathEditor.h"
|
||||||
|
#include "cafPdmUiTextEditor.h"
|
||||||
|
|
||||||
#include "cvfMath.h"
|
#include "cvfMath.h"
|
||||||
#include "cvfVector3.h"
|
#include "cvfVector3.h"
|
||||||
@ -91,6 +92,12 @@ RimStimPlanFractureTemplate::RimStimPlanFractureTemplate()
|
|||||||
"",
|
"",
|
||||||
"" );
|
"" );
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault( &m_propertiesTable, "PropertiesTable", "Properties Table", "", "", "" );
|
||||||
|
m_propertiesTable.uiCapability()->setUiEditorTypeName( caf::PdmUiTextEditor::uiEditorTypeName() );
|
||||||
|
m_propertiesTable.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||||
|
m_propertiesTable.uiCapability()->setUiReadOnly( true );
|
||||||
|
m_propertiesTable.xmlCapability()->disableIO();
|
||||||
|
|
||||||
CAF_PDM_InitField( &m_showStimPlanMesh_OBSOLETE, "ShowStimPlanMesh", true, "", "", "", "" );
|
CAF_PDM_InitField( &m_showStimPlanMesh_OBSOLETE, "ShowStimPlanMesh", true, "", "", "", "" );
|
||||||
m_showStimPlanMesh_OBSOLETE.uiCapability()->setUiHidden( true );
|
m_showStimPlanMesh_OBSOLETE.uiCapability()->setUiHidden( true );
|
||||||
|
|
||||||
@ -231,6 +238,8 @@ void RimStimPlanFractureTemplate::setDefaultsBasedOnXMLfile()
|
|||||||
{
|
{
|
||||||
m_conductivityResultNameOnFile = m_stimPlanFractureDefinitionData->conductivityResultNames().front();
|
m_conductivityResultNameOnFile = m_stimPlanFractureDefinitionData->conductivityResultNames().front();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_propertiesTable = generatePropertiesTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -1058,6 +1067,8 @@ void RimStimPlanFractureTemplate::defineUiOrdering( QString uiConfigName, caf::P
|
|||||||
group->add( &m_wellDiameter );
|
group->add( &m_wellDiameter );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uiOrdering.add( &m_propertiesTable );
|
||||||
|
|
||||||
if ( widthResultValues().empty() )
|
if ( widthResultValues().empty() )
|
||||||
{
|
{
|
||||||
m_fractureWidthType = USER_DEFINED_WIDTH;
|
m_fractureWidthType = USER_DEFINED_WIDTH;
|
||||||
@ -1083,6 +1094,16 @@ void RimStimPlanFractureTemplate::defineEditorAttribute( const caf::PdmFieldHand
|
|||||||
myAttr->m_fileSelectionFilter = "StimPlan Xml Files(*.xml);;All Files (*.*)";
|
myAttr->m_fileSelectionFilter = "StimPlan Xml Files(*.xml);;All Files (*.*)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( field == &m_propertiesTable )
|
||||||
|
{
|
||||||
|
auto myAttr = dynamic_cast<caf::PdmUiTextEditorAttribute*>( attribute );
|
||||||
|
if ( myAttr )
|
||||||
|
{
|
||||||
|
myAttr->wrapMode = caf::PdmUiTextEditorAttribute::NoWrap;
|
||||||
|
myAttr->textMode = caf::PdmUiTextEditorAttribute::HTML;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -1141,3 +1162,31 @@ double RimStimPlanFractureTemplate::formationDip() const
|
|||||||
|
|
||||||
return m_stimPlanFractureDefinitionData->formationDip();
|
return m_stimPlanFractureDefinitionData->formationDip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RimStimPlanFractureTemplate::generatePropertiesTable() const
|
||||||
|
{
|
||||||
|
QString body;
|
||||||
|
|
||||||
|
if ( formationDip() != HUGE_VAL )
|
||||||
|
{
|
||||||
|
body += QString( "Formation Dip: %1<br>" ).arg( formationDip() );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !m_stimPlanFractureDefinitionData.isNull() )
|
||||||
|
{
|
||||||
|
if ( m_stimPlanFractureDefinitionData->topPerfMd() != HUGE_VAL )
|
||||||
|
{
|
||||||
|
body += QString( "Top MD: %1<br>" ).arg( m_stimPlanFractureDefinitionData->topPerfMd() );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( m_stimPlanFractureDefinitionData->bottomPerfMd() != HUGE_VAL )
|
||||||
|
{
|
||||||
|
body += QString( "Bottom MD: %1<br>" ).arg( m_stimPlanFractureDefinitionData->bottomPerfMd() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return body;
|
||||||
|
}
|
||||||
|
@ -133,6 +133,8 @@ private:
|
|||||||
|
|
||||||
double conversionFactorForBetaValues() const;
|
double conversionFactorForBetaValues() const;
|
||||||
|
|
||||||
|
QString generatePropertiesTable() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmField<int> m_activeTimeStepIndex;
|
caf::PdmField<int> m_activeTimeStepIndex;
|
||||||
caf::PdmField<QString> m_conductivityResultNameOnFile;
|
caf::PdmField<QString> m_conductivityResultNameOnFile;
|
||||||
@ -144,5 +146,7 @@ private:
|
|||||||
cvf::ref<RigStimPlanFractureDefinition> m_stimPlanFractureDefinitionData;
|
cvf::ref<RigStimPlanFractureDefinition> m_stimPlanFractureDefinitionData;
|
||||||
bool m_readError;
|
bool m_readError;
|
||||||
|
|
||||||
|
caf::PdmField<QString> m_propertiesTable;
|
||||||
|
|
||||||
caf::PdmField<bool> m_showStimPlanMesh_OBSOLETE;
|
caf::PdmField<bool> m_showStimPlanMesh_OBSOLETE;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user