[Uml-devel] Building umlwidgets from textitems

Ralf Habacker ralf.habacker at freenet.de
Wed Jun 25 13:59:33 UTC 2008


Gopala Krishna schrieb:
> Hi ,
>   I have thought of a new approach for all the uml widgets.
>
> My idea is to first build a generic text item class inheriting
> QGraphicsTextItem.
> The text item supports hovering, tooltips, coloured text, alignment
> and also rich text.
>
> All the widgets , then can use these text-items as its children to
> display corresponding text.
> The main advantage of this approach is flexibility. This will easily
> help us fix lots of wishes and bugs ;)
>   
This looks as a good approach.
> Here is small program(addhoc) i wrote it for testing.
> To run it do "qmake && make && ./textitem"
> http://krishna.ggk.googlepages.com/textitem.tar.gz
>
> Here is a snapshot
> http://tinyurl.com/4fwn8a
>
>
> You may increase the number of text-items for further analysis by
> changing the for loop condition.
> The performance is quite good !
>
> My only concern is probable increase in memory usage,
> But i think this is manageable as the number of widgets on a diagram
> is usually < 50.
>   
Any idea how much more memory will be used ? That would help to estimate 
the limits.
> Any comments are appreciated. :)
>   

Ralf





More information about the umbrello-devel mailing list