20 #ifndef PARAMETER_SETTABLE_H
21 #define PARAMETER_SETTABLE_H
24 #include "configurationexceptions.h"
25 #include "runtimeparametersetters.h"
32 class ConfigurationHelper;
33 class ConfigurationParameters;
35 class ParameterSettableUI;
71 AllowMultiple = 0x0004
73 Q_DECLARE_FLAGS( Properties, Property )
76 static const
double Infinity;
78 static const
int MaxInteger;
80 static const
int MinInteger;
114 static
void describe( QString type ) { addTypeDescription( type,
"Describe is missing" ); };
123 virtual void postConfigureInitialization()
146 QString paramFullPath = fullParameterDescriptionPath( type, paramName );
147 if ( !runtimeParameters.contains( paramFullPath ) ) {
151 rparam->
set(
this, newvalue );
167 QString paramFullPath = fullParameterDescriptionPath( type, paramName );
168 if ( !runtimeParameters.contains( paramFullPath ) ) {
173 rparam->
get(
this, ret );
205 static QString fullParameterDescriptionPath( QString type, QString param );
210 static QString fullSubgroupDescriptionPath( QString type, QString sub );
219 void notifyChangesToParam( QString paramName );
244 ParameterSettable::createParamDescription( paramPath,
"isRuntime",
"true" );
292 ParameterSettable::createParamDescription( paramPath,
"isRuntime",
"true" );
293 ParameterSettable::runtimeParameters[paramPath] =
new MethodSetter<T, int>( paramPath, setter, getter );
304 IntDescriptor& help( QString shortHelp, QString longHelp=QString(
"") );
340 ParameterSettable::createParamDescription( paramPath,
"isRuntime",
"true" );
341 ParameterSettable::createParamDescription( paramPath,
"precision",
"double" );
356 ParameterSettable::createParamDescription( paramPath,
"isRuntime",
"true" );
357 ParameterSettable::createParamDescription( paramPath,
"precision",
"float" );
358 ParameterSettable::runtimeParameters[paramPath] =
new MethodSetter<T, float>( paramPath, setter, getter );
369 RealDescriptor& help( QString shortHelp, QString longHelp=QString(
"") );
398 ParameterSettable::createParamDescription( paramPath,
"isRuntime",
"true" );
399 ParameterSettable::runtimeParameters[paramPath] =
new MethodSetter<T, bool>( paramPath, setter, getter );
410 BoolDescriptor& help( QString shortHelp, QString longHelp=QString(
"") );
441 ParameterSettable::createParamDescription( paramPath,
"isRuntime",
"true" );
453 EnumDescriptor& help( QString shortHelp, QString longHelp=QString(
"") );
578 QString subgroupPath;
592 Descriptor( QString type, QString shortHelp, QString longHelp );
696 static Descriptor addTypeDescription( QString type, QString shortHelp, QString longHelp=QString(
"") );
704 void setTypeName( QString type ) {
708 QList<RuntimeParameterObserver*> observers;
714 static QMap<QString, RuntimeParameterSetter*> runtimeParameters;
720 static void createParamDescription( QString paramPath, QString traitName, QString traitValue );
813 Q_DECLARE_OPERATORS_FOR_FLAGS( farsa::ParameterSettable::Properties )