Skip to content

Configurable: a group of simple classes to manage Properties and their validation. An object ConfigModel can be created#36

Open
dccote wants to merge 3 commits intomainfrom
configurable
Open

Configurable: a group of simple classes to manage Properties and their validation. An object ConfigModel can be created#36
dccote wants to merge 3 commits intomainfrom
configurable

Conversation

@dccote
Copy link
Contributor

@dccote dccote commented Aug 16, 2025

We often have to configure properties for an object. It could be the parameters for an acquisition system or the settings for an application. It can be tedious to validate the parameters and even more tedious to create an interface to let the user change them.

I created ConfigurableProperty and ConfigModel: properties are created and added to a ConfigModel. The model can validate (confirm that values are acceptable based on parameters given to ConfigurableProperty upon creation) and sanitize (try to fix the values, constrain their range or simply replace with a default value if nothing works). Finally, ConfigModel can also create a rudimentary DialogWindow to let the user edit the values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant