Umbrello gets gradient support!

krishna_ggk's picture

Groovy!

I just committed the new version of base widget classes (not QWidget but QGraphicsItem) into my soc branch which enables gradients to be used with umbrello widgets like EnumWidget and it already works :) I tested this change by creating a NewEnumWidget class, and it already makes the old enum widget feel as second class citizen :)

Here is a screenshot.

To be technically honest, i just had to make QPen and QBrush as widget members rather than QColors.
But designing the base classes is not that easy as I need to keep in my mind about all possible usages by the subclasses. I have spent lot of time on the design. I was in a dilemma whether to inherit QGraphicsItem or QGraphicsWidget, but later settled onto the former as it is not heavy. So i had to duplicate a bit of functionality of QGraphicsWidget like sizeHint.
/me is happy with the design so far :)

Also i did a dired-do-query-replace-regexp (yeah i am emacsean ;) ) on the source directory to convert all widget::draw methods to its equivalent widget::paint method, which means almost all widgets are now shown on diagram as and when dropped. The widgets can be moved around. Also the AssociationWidgets show up, but are static i.e they don’t update when any connected widget moves.

I should now better study for my exam. I’ll get back to work after July 5th.
Until then bbye!!

Organization: KDE Original: Source