mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6597: Propagate changed signals from scaling to fracture model plot.
This commit is contained in:
parent
f4eefc3e08
commit
bcc35ee82e
@ -306,7 +306,17 @@ RimElasticProperties* RimFractureModelTemplate::elasticProperties() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureModelTemplate::setElasticProperties( RimElasticProperties* elasticProperties )
|
||||
{
|
||||
if ( m_elasticProperties )
|
||||
{
|
||||
m_elasticProperties->changed.disconnect( this );
|
||||
}
|
||||
|
||||
m_elasticProperties = elasticProperties;
|
||||
|
||||
if ( m_elasticProperties )
|
||||
{
|
||||
m_elasticProperties->changed.connect( this, &RimFractureModelTemplate::elasticPropertiesChanged );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -361,6 +371,14 @@ void RimFractureModelTemplate::faciesPropertiesChanged( const caf::SignalEmitter
|
||||
changed.send();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureModelTemplate::elasticPropertiesChanged( const caf::SignalEmitter* emitter )
|
||||
{
|
||||
changed.send();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -106,6 +106,7 @@ private:
|
||||
static RigEclipseCaseData* getEclipseCaseData();
|
||||
|
||||
void faciesPropertiesChanged( const caf::SignalEmitter* emitter );
|
||||
void elasticPropertiesChanged( const caf::SignalEmitter* emitter );
|
||||
|
||||
static double computeDefaultStressDepth();
|
||||
|
||||
|
@ -34,6 +34,7 @@ CAF_PDM_SOURCE_INIT( RimElasticProperties, "ElasticProperties" );
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimElasticProperties::RimElasticProperties()
|
||||
: changed( this )
|
||||
{
|
||||
CAF_PDM_InitScriptableObject( "RimElasticProperties", "", "", "" );
|
||||
|
||||
@ -53,6 +54,7 @@ RimElasticProperties::RimElasticProperties()
|
||||
m_scalings.uiCapability()->setUiHidden( true );
|
||||
m_scalings.uiCapability()->setUiTreeHidden( true );
|
||||
m_scalings = new RimElasticPropertyScalingCollection;
|
||||
m_scalings->changed.connect( this, &RimElasticProperties::elasticPropertyScalingCollectionChanged );
|
||||
|
||||
setUiName( "Elastic Properties" );
|
||||
}
|
||||
@ -283,3 +285,12 @@ double RimElasticProperties::getPropertyScaling( const QString& forma
|
||||
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimElasticProperties::elasticPropertyScalingCollectionChanged( const caf::SignalEmitter* emitter )
|
||||
{
|
||||
m_propertiesTable = generatePropertiesTable();
|
||||
changed.send();
|
||||
}
|
||||
|
@ -44,6 +44,8 @@ public:
|
||||
RimElasticProperties();
|
||||
~RimElasticProperties() override;
|
||||
|
||||
caf::Signal<> changed;
|
||||
|
||||
QString filePath() const;
|
||||
void setFilePath( const QString& filePath );
|
||||
|
||||
@ -70,6 +72,7 @@ protected:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
private:
|
||||
void elasticPropertyScalingCollectionChanged( const caf::SignalEmitter* emitter );
|
||||
QString generatePropertiesTable();
|
||||
|
||||
caf::PdmField<caf::FilePath> m_filePath;
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "RimColorLegend.h"
|
||||
#include "RimColorLegendItem.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimElasticProperties.h"
|
||||
#include "RimFaciesProperties.h"
|
||||
#include "RimFractureModelTemplate.h"
|
||||
#include "RimProject.h"
|
||||
@ -47,6 +48,7 @@ RimElasticPropertyScaling::RimElasticPropertyScaling()
|
||||
CAF_PDM_InitScriptableField( &m_scale, "Scale", 1.0, "Scale", "", "", "" );
|
||||
|
||||
setUiName( "Property Scaling" );
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -93,8 +95,7 @@ QList<caf::PdmOptionItemInfo>
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_property )
|
||||
{
|
||||
std::vector<RiaDefines::CurveProperty> properties = {RiaDefines::CurveProperty::YOUNGS_MODULUS,
|
||||
RiaDefines::CurveProperty::POISSONS_RATIO};
|
||||
std::vector<RiaDefines::CurveProperty> properties = RimElasticProperties::scalableProperties();
|
||||
for ( auto property : properties )
|
||||
{
|
||||
options.push_back(
|
||||
|
@ -30,6 +30,7 @@ CAF_PDM_SOURCE_INIT( RimElasticPropertyScalingCollection, "ElasticPropertyScalin
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimElasticPropertyScalingCollection::RimElasticPropertyScalingCollection()
|
||||
: changed( this )
|
||||
{
|
||||
CAF_PDM_InitScriptableObject( "Elastic Property Scalings", "", "", "" );
|
||||
|
||||
@ -67,9 +68,18 @@ std::vector<RimElasticPropertyScaling*> RimElasticPropertyScalingCollection::ela
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimElasticPropertyScalingCollection::addElasticPropertyScaling( RimElasticPropertyScaling* templ )
|
||||
void RimElasticPropertyScalingCollection::addElasticPropertyScaling( RimElasticPropertyScaling* scaling )
|
||||
{
|
||||
m_elasticPropertyScalings.push_back( templ );
|
||||
scaling->changed.connect( this, &RimElasticPropertyScalingCollection::elasticPropertyScalingChanged );
|
||||
m_elasticPropertyScalings.push_back( scaling );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimElasticPropertyScalingCollection::elasticPropertyScalingChanged( const caf::SignalEmitter* emitter )
|
||||
{
|
||||
changed.send();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -78,6 +88,7 @@ void RimElasticPropertyScalingCollection::addElasticPropertyScaling( RimElasticP
|
||||
void RimElasticPropertyScalingCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
changed.send();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -38,6 +38,8 @@ public:
|
||||
RimElasticPropertyScalingCollection();
|
||||
~RimElasticPropertyScalingCollection() override;
|
||||
|
||||
caf::Signal<> changed;
|
||||
|
||||
std::vector<RimElasticPropertyScaling*> elasticPropertyScalings() const;
|
||||
void addElasticPropertyScaling( RimElasticPropertyScaling* templ );
|
||||
|
||||
@ -47,5 +49,6 @@ public:
|
||||
double getScaling( const QString& formationName, const QString& faciesName, RiaDefines::CurveProperty property ) const;
|
||||
|
||||
private:
|
||||
void elasticPropertyScalingChanged( const caf::SignalEmitter* emitter );
|
||||
caf::PdmChildArrayField<RimElasticPropertyScaling*> m_elasticPropertyScalings;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user