[MiroDev] itemlist refactoring
Ben Dean-Kawamura
ben at pculture.org
Wed Aug 20 13:56:52 EDT 2008
While working on adding a search box to the item lists I realized the
code in itemlist.py was really hard to follow. I tried to make it
simpler by splitting it up into separate chunks, basically following
the MVC model. Here's how things are working now:
* itemlist.py -- Handles the model. It manages TableModel objects and
handles sorting things, filtering out things by search text and
filtering out things by other stuff (for example only including
downloaded items)
* itemlistwidgets.py -- Handles the View. It contains a bunch of
Widget subclasses that display things inside an item list. The
widgets are purposefully kept "dumb", meaning they don't alter things
in the outside world. All the do is send out signals which gets
picked up by...
* itemlistcontroller.py -- Handles the controller. It responds to
user input and to changes in the items coming from the backend.
I hope that this code is makes more sense for folks, although in the
sort run it might be harder since I changed a lot around. If anyone
has questions I'd love to answer them.
Ben
More information about the Develop
mailing list