Review Request: State machine architecture for PMC

Christophe Olinger olingerc at binarylooks.com
Wed Apr 7 19:30:14 CEST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3396/
-----------------------------------------------------------

(Updated 2010-04-07 17:30:14.244958)


Review request for Plasma.


Changes
-------

Removed all whitespaces and tabs (hopefully). This patch will break the functionality of PMC. It only illustrates how states could be implemented and is meant as a basis for discussing how to go on with the rearchitecturing.


Summary
-------

This is the first try to get state machines working. I will of course not forget the previous comments. It builds and runs and state switching is possible. No playbackbuttons or other useful stuff yet, but is easy to get back.

What I did:
Created a mediacenterstate class which contains info about shared (so called Main) subcomponents. subcomponents are little widgets like buttons and sliders which will appear in the control bar. I sublcassed QState for this.
Then I created a picturestate and videostate class, subclasses of the follwoing which are loaded on state switch. The containment does the state switch, the state classes do all the rest: connections, conficurations and hading out subcomponents to the controlbar.
The controlbar now has a class to add widgets to itself.


Diffs (updated)
-----

  trunk/playground/base/plasma/MediaCenterComponents/applets/mediabrowser/abstractmediaitemview.cpp 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/applets/mediabrowser/mediabrowser.h 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/applets/mediabrowser/mediabrowser.cpp 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/applets/mediacontroller/controller.h 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/applets/mediacontroller/controller.cpp 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/applets/mediabrowser/abstractmediaitemview.h 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/applets/mediaplayer/mediaplayer.h 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/applets/mediaplayer/mediaplayer.cpp 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/containments/mediacontainment/mediacontainment.h 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/containments/mediacontainment/mediacontainment.cpp 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/containments/mediacontainment/medialayout.h 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/containments/mediacontainment/medialayout.cpp 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/libs/CMakeLists.txt 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/libs/mediacenter/CMakeLists.txt 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/libs/mediacenter/browser.h 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/libs/mediacenter/browser.cpp 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/libs/mediacenter/mediacenter.h 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/libs/mediacenter/mediacenterstate.h PRE-CREATION 
  trunk/playground/base/plasma/MediaCenterComponents/libs/mediacenter/mediacenterstate.cpp PRE-CREATION 
  trunk/playground/base/plasma/MediaCenterComponents/libs/mediacenter/picturestate.h PRE-CREATION 
  trunk/playground/base/plasma/MediaCenterComponents/libs/mediacenter/picturestate.cpp PRE-CREATION 
  trunk/playground/base/plasma/MediaCenterComponents/libs/mediacenter/playbackcontrol.h 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/libs/mediacenter/playbackcontrol.cpp 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/libs/mediacenter/player.h 1112197 
  trunk/playground/base/plasma/MediaCenterComponents/libs/mediacenter/videostate.h PRE-CREATION 
  trunk/playground/base/plasma/MediaCenterComponents/libs/mediacenter/videostate.cpp PRE-CREATION 
  trunk/playground/base/plasma/MediaCenterComponents/shells/plasmediacenter/mainwindow.cpp 1112197 

Diff: http://reviewboard.kde.org/r/3396/diff


Testing
-------

State switchting works.


Thanks,

Christophe



More information about the Plasma-devel mailing list