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;
118 static void describe( QString type ) { addTypeDescription( type,
"Describe is missing" ); };
127 virtual void postConfigureInitialization()
150 QString paramFullPath = fullParameterDescriptionPath( type, paramName );
151 if ( !runtimeParameters.contains( paramFullPath ) ) {
155 rparam->
set(
this, newvalue );
171 QString paramFullPath = fullParameterDescriptionPath( type, paramName );
172 if ( !runtimeParameters.contains( paramFullPath ) ) {
177 rparam->
get(
this, ret );
209 static QString fullParameterDescriptionPath( QString type, QString param );
214 static QString fullSubgroupDescriptionPath( QString type, QString sub );
241 ParameterSettable::createParamDescription( paramPath,
"isRuntime",
"true" );
289 ParameterSettable::createParamDescription( paramPath,
"isRuntime",
"true" );
290 ParameterSettable::runtimeParameters[paramPath] =
new MethodSetter<T, int>( paramPath, setter, getter );
301 IntDescriptor& help( QString shortHelp, QString longHelp=QString(
"") );
337 ParameterSettable::createParamDescription( paramPath,
"isRuntime",
"true" );
338 ParameterSettable::createParamDescription( paramPath,
"precision",
"double" );
353 ParameterSettable::createParamDescription( paramPath,
"isRuntime",
"true" );
354 ParameterSettable::createParamDescription( paramPath,
"precision",
"float" );
355 ParameterSettable::runtimeParameters[paramPath] =
new MethodSetter<T, float>( paramPath, setter, getter );
366 RealDescriptor& help( QString shortHelp, QString longHelp=QString(
"") );
395 ParameterSettable::createParamDescription( paramPath,
"isRuntime",
"true" );
396 ParameterSettable::runtimeParameters[paramPath] =
new MethodSetter<T, bool>( paramPath, setter, getter );
407 BoolDescriptor& help( QString shortHelp, QString longHelp=QString(
"") );
438 ParameterSettable::createParamDescription( paramPath,
"isRuntime",
"true" );
450 EnumDescriptor& help( QString shortHelp, QString longHelp=QString(
"") );
575 QString subgroupPath;
589 Descriptor( QString type, QString shortHelp, QString longHelp );
693 static Descriptor addTypeDescription( QString type, QString shortHelp, QString longHelp=QString(
"") );
701 void setTypeName( QString type ) {
705 QList<RuntimeParameterObserver*> observers;
711 static QMap<QString, RuntimeParameterSetter*> runtimeParameters;
717 static void createParamDescription( QString paramPath, QString traitName, QString traitValue );
810 Q_DECLARE_OPERATORS_FOR_FLAGS( farsa::ParameterSettable::Properties )