Review Request: common delegate for listviews

Marco Martin notmart at gmail.com
Mon Mar 17 21:54:21 CET 2008


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://mattr.info/r/305/
-----------------------------------------------------------

Review request for Plasma.


Summary
-------

This is a preliminary version of an item delegate that lives in libs/plasma to be used for all the listviews that are used as a menu, that at the moment are kickoff and devicenotifier.
at the moment is used only by devicenotifier, maybe some changes will be needed.
if a subclass wants to paint over the item can retrieve empty aeas with rectAfterTitle, rectAfterSubTitle and emptyRect functions

some thing i'm still unsure:
at the moment the roles are mapped from the model with the function setRole(SpecificRoles role, int actual) like discussed on the ml.
i'm thinking about another way: forcing the models to use the roles defined in Plasma::Delegate and the custom roles to not conflict with them should be defined as PlasmaUserRole+1 +2 and so on. how is that?

the view of devicenotiview has become way more complex (to handle highlight on mouse over) should moved to a common view also that? (wonder if it would be useful, some will have to reimplement everything nevertheless, like flipscrollview of kickoff...)


Diffs
-----

  /trunk/KDE/kdebase/workspace/libs/plasma/CMakeLists.txt
  /trunk/KDE/kdebase/workspace/libs/plasma/delegate.h
  /trunk/KDE/kdebase/workspace/libs/plasma/delegate.cpp
  /trunk/KDE/kdebase/workspace/plasma/applets/devicenotifier/CMakeLists.txt
  /trunk/KDE/kdebase/workspace/plasma/applets/devicenotifier/devicenotifier.h
  /trunk/KDE/kdebase/workspace/plasma/applets/devicenotifier/devicenotifier.cpp
  /trunk/KDE/kdebase/workspace/plasma/applets/devicenotifier/itemdelegate.h
  /trunk/KDE/kdebase/workspace/plasma/applets/devicenotifier/itemdelegate.cpp
  /trunk/KDE/kdebase/workspace/plasma/applets/devicenotifier/notifierview.h
  /trunk/KDE/kdebase/workspace/plasma/applets/devicenotifier/notifierview.cpp

Diff: http://mattr.info/r/305/diff


Testing
-------

tested with devicenotifier applet
tested also with rtl layout, fixed some problems the kickoff has with it.


Thanks,

Marco



More information about the Panel-devel mailing list