Unifying listviews appearance

Aaron J. Seigo aseigo at kde.org
Fri Mar 14 16:18:28 CET 2008


On Friday 14 March 2008, Marco Martin wrote:
> i'd like some input on the idea i had before i start trying to implement it
> making a common item delegate that delegates of the various applets
> inherits it couldn't implement paint itself because the various models all
> have their custom roles, but it could provide some common functions like
> drawHighlight, drawText and so on

we very much need this .. thanks for looking into it.

as for the custom roles thing .. i wonder if we couldn't have some sort of 
internal role mapper, so that the delegate has defined things it can do (main 
text, sub text, main icon, action icons, etc) and the model (or user of the 
model) can do things like:

setRole(Plasma::Delegate::MainText, MyFunkyRole);

and internally Plasma::Delegate (or whatever it's called) would do sth like:

QMap<int, int> roles;

void setRole(Role role, int actual) {
     d->roles[role] = actual;
}

might that work?

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080314/82532b57/attachment.pgp 


More information about the Panel-devel mailing list