[Uml-devel] GraphicsView port: Approach
kleag at free.fr
Tue Apr 29 06:57:05 UTC 2008
On Tuesday 29 April 2008 02:24:16 Gopala Krishna wrote:
> I think it is better to have uniform code through out, and hence
> make UMLWidget inherit QGraphicsItem (not QG*RectItem)
> In the implementation for association widgets, we can use some methods
> like QGraphicsItem::shape() to implement the line properties. Thus we
> don't actually have to separate the rectangular and the line widgets
> in the topmost hierarchy.
A lot of the display features of umbrello are common with a generic graph
display. And what you suggest up to now confirm this feeling. So, if you want
to have a look to and grab some code from kgraphviewer (in
extragear/graphics), feel free to do so. It is not necessary perfectly adapted
to the umbrello situation but it could maybe save some time.
> > > (6) Try to remove signals, slots and finally QObject base for
> > > UMLWidget and also UMLObject if possible.
> > Well, a few of the signals/slots are really okay.
> > For example, on renaming a class in the list view, all widget
> > representations of the class should be updated to the new name
> > (this may affect multiple diagrams.)
> Yes you are right. Qt code without signal-slot doesn't sound great ;)
> But what I actually want to do is keep signal-slot number in minimum
> which is very much possible due the GraphicsView framework goodies.
I suppose that the graphics items would be really views of an abstract model ?
KsirK - a turn-based strategy game for KDE
KGraphViewer - a GraphViz dot graphs viewer
More information about the umbrello-devel