Review Request: State machine architecture for PMC

Christophe Olinger olingerc at binarylooks.com
Thu Apr 8 18:58:49 CEST 2010


On Thu, Apr 8, 2010 at 6:42 PM, Aaron J. Seigo <aseigo at kde.org> wrote:

> On April 8, 2010, Christophe Olinger wrote:
> > One thing missing is the layout of the actual subComponents in the
> applets.
> > Currently they are just added in a row. For this we need the API. The
> > layout should recognize which type of applet arrives and lay it out
> > accordingly. That means lots of if/thens within tha applet code. This
> also
> > means adding new states with new subcomponents would mean adding if/tehns
> > to the actual addToLayout functions in the applets.
>
> what i'd recommend is to provide a way to tag subcomponents with values
> (e.g.
> an enum) that says something about what they do.
>
> divide up each MainComponent into "zones" (navigation, media playing,
> status,
> whatever :) and then each sub component can be tagged by the creator of the
> sub component (e.g. a state) with what it is.
>
> then the main components will know which zone they belong in.
>
> from there, i'd go with a naive implementation, at least at first, that
> just
> puts things into the respective zones on a first-come-first-placed basis.
>
> this alleviates the needs for if/else and odd interactions between state
> plugins and the main components that need to lay out a plugin's custom sub
> components.
>
> --
>

Great suggestion. Exactly what I had in mind :-). I'll try to hack on that
in the coming days. First finding the cause of this stupid medialyout error
:-/ Propably some wrong includes or declarations.

I'll also apply for an SVN account. Lots of thanks to all of you for the
motivation.


Cheers,

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20100408/e5a5ab9a/attachment.htm 


More information about the Plasma-devel mailing list