patches for custom styleelements, kcapacitybar

Thomas L├╝bking thomas.luebking at
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 ;-)


More information about the kde-core-devel mailing list