Commit 916a1f5d authored by Frédéric Larue's avatar Frédéric Larue

ValueString/SetValueString functions added to UIParamSet.

parent c508d2df
......@@ -1147,10 +1147,7 @@ bool UIMainWindow::loadProjectOptions( const QString &filePath, UIProject *proje
{
if( !d->GetDisplayOptions() )
m_DisplayableFactoryByTypes[ d->GetTypeString() ]->allocateDisplayOptions( d );
UIParam *param = d->GetDisplayOptions()->Get( id );
if( param )
param->SetValueString( value );
d->GetDisplayOptions()->SetValueString( id, value );
}
break;
......@@ -1171,11 +1168,7 @@ bool UIMainWindow::loadProjectOptions( const QString &filePath, UIProject *proje
auto tool = ui->toolSelector->getToolByName( source );
if( tool )
{
UIParam *param = tool->param->Get( id );
if( param )
param->SetValueString( value );
}
tool->param->SetValueString( id, value );
break;
}
......
......@@ -105,3 +105,24 @@ bool UIParamSet::AreAllHidden() const
return true;
}
bool UIParamSet::SetValueString( const QString &paramName, const QString &valueString )
{
UIParam *param = Get(paramName);
if( param )
return param->SetValueString(valueString);
return false;
}
QString UIParamSet::ValueString( const QString &paramName )
{
QString valueString;
UIParam *param = Get(paramName);
if( param )
valueString = param->ValueString();
return valueString;
}
......@@ -96,6 +96,9 @@ public:
bool AreAllHidden() const;
bool SetValueString( const QString &paramName, const QString &valueString );
QString ValueString( const QString &paramName );
signals:
void parameterUpdated( UIParam *p );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment