Hi all,
In the QtGallery module (QtMobility 1.1) there's the QGalleryProperty
class that represents - ta-da! - a given gallery item property like
"path", "title", "author", "year". This class also allows the
programmer to create some filters for searching items, implementing
them in C++ with operator overloading. Something like this:
filter = gallery.year <= "2010"
or even
request.setFilter(gallery.year <= "2010")
request.setFilter(gallery.author == "James Joyce")
So, IMHO this scheme doesn't seem to be suitable for PySide in terms
of a "pythonic" API as changing the return type of operators is kinda
confusing.
My proposal is to replace the operators by plain methods like
filterEqual, filterLessThan, etc. Originally I was thinking about
using just equal, lessThan, etc, but Hugo pointed that adding a
"filter" prefix or suffix would be better.
request.setFilter(gallery.year.filterLessOrEqual("2010"))
request.setFilter(gallery.author.filterEqual("James Joyce"))
Any comments?
--
Lauro Moura
INdT - Instituto Nokia de Tecnologia
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside