MDStates - hpi-swa-teaching/MaterialDesignWidgets GitHub Wiki
Overview
In order to have unified states for all objects, there is a MDState class. The class has attributes for nearly all properties the material design standard defines. Additional information and an overview of all states can be found in the class comment of MDState.
Architecture
The base class for all widgets – the MDWidget – has a state object (instance of MDState) where the current state is stored. When the state should change, you can access state and use the given setter/toggle methods. On a change, the state calls the property-specific, pre-defined listener method (e.g. onDisabledChanged) as well as changed on the widget object. The listener methods are overwritten in the subclasses of MDWidget and implement the specific behaviour on a change of state.