mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fault React. Assessment updates, part 2 (#7735)
* Add additional parameters to postprocessing script.
This commit is contained in:
@@ -76,3 +76,11 @@ QString RimDoubleParameter::stringValue() const
|
||||
{
|
||||
return QString::number( m_value() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimDoubleParameter::value() const
|
||||
{
|
||||
return m_value();
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ public:
|
||||
QVariant variantValue() const override;
|
||||
QString stringValue() const override;
|
||||
|
||||
double value() const;
|
||||
|
||||
private:
|
||||
caf::PdmField<double> m_value;
|
||||
};
|
||||
|
||||
@@ -217,13 +217,23 @@ void RimParameterGroup::setParameterValue( QString name, double value )
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimParameterGroup::setParameterValue( QString name, QString value )
|
||||
{
|
||||
RimGenericParameter* p = parameter( name );
|
||||
if ( p != nullptr ) p->setValue( value );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimGenericParameter* RimParameterGroup::parameter( QString name ) const
|
||||
{
|
||||
for ( auto& p : m_parameters.childObjects() )
|
||||
{
|
||||
if ( p->name() == name )
|
||||
{
|
||||
p->setValue( value );
|
||||
break;
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -58,6 +58,8 @@ public:
|
||||
|
||||
std::vector<RimGenericParameter*> parameters() const;
|
||||
|
||||
RimGenericParameter* parameter( QString name ) const;
|
||||
|
||||
private:
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
|
||||
Reference in New Issue
Block a user