patches for custom styleelements, kcapacitybar

Thomas Lübking thomas.luebking at web.de
Sun Sep 28 00:25:39 BST 2008


Am Saturday 27 September 2008 schrieb Olivier Goffart:
> How do you want to extent QStyle enums?
as KStyle enum overlaying the QStyle enum, nevermind - it's not that important 
(and i honestly don't know whether this works will all compilers)

class KStyle  : public QStyle
{
public: stuff
enum PrimitiveElement {PE_KdeBase = 0xff0000};
...
}
-> KStyle::PrimitiveElement = QStyle::PrimitiveElement + PE_KdeBase

> You really could call KStyle::customElementId in the paintEvent.
thing's that the function performs a map (or hash: afaik - given the map is 
small - it's more or less equally fast but takes less RAM...) lookup - could 
be considered too expensive in a paint routine. (i'm a scrooge ;-)

Regards,
Thomas




More information about the kde-core-devel mailing list