-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Functional Interface for Sliders, Buttons and other user input
Currently after all slider values are changed functions like f_resetSettings in the zero_Interface are called. The scenario button is set to custom. etc.
And we can imagine there will be other functions that are called before / after every slider. For example adding a loading screen in a new thread before.
To achieve this we want to define a functional interface that all sliders/buttons etc must implement.
This interface describes a function: execute( List<GridConnection> )
Then we must make classes for each slider function. These classes will have some arguments in the constructor such as which slider, so it can get its value. Or for example for the heating / mobility slider which other sliders are there that must add to 100% together. Maybe a pointer to the EnergyModel / zero_Interface if that is required for the slider functionality.
Then we write a simple wrapper function in the zero_Interface that does some stuff beforehand, executes the slider and then does some stuff afterwards.
Dit is redelijk stapsgewijs aan te pakken, door te beginnen met een klasse voor een slider.