[Ktechlab-devel] some progress

Julian Bäume julian at svg4all.de
Mon Dec 7 12:14:39 UTC 2009


hi,
I just wanted to show some progress, I made with the kde4 port. I implemented 
basic functionality of drawing connectors (graphical representation of a 
wire), tonight. The nights before, I refactored the work I did on drawing 
components. It's now based on QGraphicsView system. I noticed some conflicts 
between the old QCanvas implementation and the new one, regarding coordinate 
systems and reference points. Therefore I'd like to slightly change the 
circuit-file format, to make it fit better to the needs of the new graphics-
system. I'm not sure, how exactly I want to change it, but I don't like it, as 
it is done, at the moment. One example I don't like is the use of different 
reference points and scales. A route in a connector is stored relatively to an 
8x8 grid, item's coordinates are stored in absolute pixel-values. I still 
don't want to break old files, so I want to provide some legacy code, to load 
old style circuit files and save them as the new version. But as I said, I 
need to clarify some things, before proceeding (i.e. implement write support).

I got some screen-shots:
First one is very old.. it shows my first tests with plasma.. but there is the 
KDE3 version of ktechlab, showing a circuit file, I use for testing:
http://nbprogs.dyndns.info/~jb/screen/ktechlab-circuit.png

Then, the same file loaded with the version from "circuit_rewrite" branch:
http://nbprogs.dyndns.info/~jb/screen/ktechlab-circuit1.png
Note, the connectors are exactly the same, the components still have got some 
scaling and minor positioning issues (due to problems, I explained earlier in 
this mail).

And the same, but with Theme::defaultTheme() set to "us" instead of "din": 
http://nbprogs.dyndns.info/~jb/screen/ktechlab-circuit2.png
Again, there's some issues with the scale of the components, but this can be 
corrected by fixing the svg-files.

Anyway, when this is ready. The whole graphical part of ktechlab will be much 
easier. A lot of messy code can be dropped (today I read through some of the 
painting-classes..... it was painful)
Well.. that's all, for now. I'll keep you posted..

bye then
julian

PS: I hope, my explanations are understandable. I'm not used to express all 
that graphics/mathematics-related stuff in English. I will setup some pages in 
the wiki explaining the use of QGraphicsView in our context. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/ktechlab-devel/attachments/20091207/9185f34c/attachment.sig>


More information about the Ktechlab-devel mailing list