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 ...@@ -1147,10 +1147,7 @@ bool UIMainWindow::loadProjectOptions( const QString &filePath, UIProject *proje
{ {
if( !d->GetDisplayOptions() ) if( !d->GetDisplayOptions() )
m_DisplayableFactoryByTypes[ d->GetTypeString() ]->allocateDisplayOptions( d ); m_DisplayableFactoryByTypes[ d->GetTypeString() ]->allocateDisplayOptions( d );
d->GetDisplayOptions()->SetValueString( id, value );
UIParam *param = d->GetDisplayOptions()->Get( id );
if( param )
param->SetValueString( value );
} }
break; break;
...@@ -1171,11 +1168,7 @@ bool UIMainWindow::loadProjectOptions( const QString &filePath, UIProject *proje ...@@ -1171,11 +1168,7 @@ bool UIMainWindow::loadProjectOptions( const QString &filePath, UIProject *proje
auto tool = ui->toolSelector->getToolByName( source ); auto tool = ui->toolSelector->getToolByName( source );
if( tool ) if( tool )
{ tool->param->SetValueString( id, value );
UIParam *param = tool->param->Get( id );
if( param )
param->SetValueString( value );
}
break; break;
} }
......
...@@ -105,3 +105,24 @@ bool UIParamSet::AreAllHidden() const ...@@ -105,3 +105,24 @@ bool UIParamSet::AreAllHidden() const
return true; 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: ...@@ -96,6 +96,9 @@ public:
bool AreAllHidden() const; bool AreAllHidden() const;
bool SetValueString( const QString &paramName, const QString &valueString );
QString ValueString( const QString &paramName );
signals: signals:
void parameterUpdated( UIParam *p ); 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