Review Request: State machine architecture for PMC

Marco Martin notmart at gmail.com
Thu Apr 8 12:09:19 CEST 2010


On Thursday 08 April 2010, Christophe Olinger wrote:
> > I like the idea of the state machine and how it could help us correctly
> > managing the workflow of the mediacenter. Unfortunately i feel something
> > in the current implementation lacks of robustness (does this word
> > exist?).
> > 
> > As Aaron pointed out, we need to understend whether we are aproaching
> > this the right way.
> > 
> > The mistake with the MediaLayout in this patch well shows that we should
> > probably re-design something. The need for states is due to the fact that
> > we want PMC to know the current media in order to differently behave and
> > interact with the user. This way we could give the best set of actions
> > for each kind of media chosen by the user.
> > The first clear issue was the lack for a way of changing the UI
> > accordingly to the chosen media.
> 
> Here is a list of the issues we need to tackle correctly and agree on where
> to do it
> Things that change on a state switch:
> 
> * The applets (called UIComponents) get a new set of widgets. Some widgets
> are always the same. These I called MainSubComponents and are only added
> once at PMC initialization. Others change with each state, these are
> shown/hidden on each state switch.

those can be added by the applet itself and the outside world isn't required 
to eve know they exists

> ->adding MainSubcomponents is currently handled by the MediaCenterState
> class, adding subcomponents is handled by the different state classes.

probably should all be done by the MediaCenterState class. all that subclasses 
should do is to give the list of what they want enabled

but again, should be committed then experiments can be made

Cheers,
Marco Martin


More information about the Plasma-devel mailing list