[Uml-devel] u2 user interface

Luis De la Parra Blum lparrab at gmx.net
Tue Apr 1 11:31:45 UTC 2003


On Tuesday 01 April 2003 17:18, Andrew Sutton wrote:
>
> hmm... so in otherwords, we'd have to provide the rendering surface for
> ksvg - which would be some diagram editor view. right? that doesn't sound
> overly complicated. okay, well it doesn't really sound easy either :)

no.. they provide the rendering, we'd have to provide the user interaction ( 
react to user events )
for example, you have a DOM containing a parsed SVG file, and KSVG will render 
it for you. We'd have to derive from their widget, and reimplement 
"contentsMouseMoveEvent" , in that method you have to check if the mouse 
button is down and something is selected, and if yes, call a 
DomNode->setAttribute( "position" , position )  , then KSVG would repaint the 
element in the new position, and is as if you'd move the shape with your 
mouse.

but it is not so easy as it sounds.. specially since you have to modify the 
DOM instead of just calling a method on a Widget/CanvasItem

>
> where can i find the k2b project site? i can't seem to find it anywhere.
> more importantly, can we find other svg editors that we can borrow from.

my mistake, I'm sorry.
the project is called k2d ( D istead of B ). you can find it at 
http://k2d.sourceforge.net/

> i was totally prepared to do so... in my mind, i want the best possible
> graphical notation and whatever canvas 1.x is using isn't cutting it (for
> me). it's not bad, but it doesn't look great.

the thing that I dont like about the u1 series, is not the QCanvas itself, but 
the way the layer  above is implemented (the relationship between the 
Uml::Class and the ClassWidget is not exactly clean.. and if you add the 
WidgetDatas to that, you get really a not so encouraging thing.

I've been playing with a new implementation of the diagramming stuff, based on 
U1 and using QCanvas and friends. I've been doing it mostly just for fun and 
of course is not nearly complete, but I think it's *much* cleaner than the 
current code.  
The way it's implemented, porting it to use the "real" UML implementation 
(OMG's / U2 ) should be really fast, so we can consider it as an alternative 
in case the SVG proves to bee to complicated. ( in case you are interested,  
its the diagram folder in U1's CVS - right now only the drawing routines for 
ClassWidgets is implemented )
I've also made a plug in for the widgets, so that you can load the "widgets" 
at run time and select the appropiate based on several criterias... for 
example, you could install a "Web UML" plug in, and all your UMLClasses that 
have a sterotype " WebPage", will be drawn by that plug in (maybe like a 
small web page, or a normal UML class with a web-icon on the top) all other 
elements get rendered by the "default uml" plug in.   If you install a new 
metamodel, you'd have to install a new widgets-plug in to render it... 

 if you use SVG, you'd have to install SVG files containing the instructions 
to render the new elements... would be much more flexible, and the "plug ins" 
would be extrem small (only a text file, wich can even be compressed) in 
comparison with a widget-plug in (dll) at the price of some performance, of 
course.

I havent commited that work because I can't get it to build as a stand-alone 
library, and a quick scan over the autobook didn't bring me too far =(

...
man.. this thing takes really long to build!

saludos,

luis





More information about the umbrello-devel mailing list