PDA

View Full Version : CAD application??



honza
25th May 2008, 13:47
hallo everyone.

i need some help. i'm trying to make application to manipulate drawings from file like DXF.
the class for parsing input file i've done.
as component for viewing i used QWidget, with reimplemened paintEvent(..) method.

in all requests for painting, resizing, updating, etc. i draw all arcs and lines.. so this take a while (if the input file is huge).

now i have pixmap, as resize event is occured, then size of pixmap is updated and all arcs and lines are drawn into it. in paintEvent(..) i'm then drawing this pixmap into displaying widget.

i want to implement movement and turning (of parts of drawing) with mouse, but 1st and 2nd way is too slow....

my question is: how should this be done? need i draw lines and arcs in all paintEvent(..) loops, or draw pixmap, where complete drawing is done, or.. is another way to do this?

thanks

honza

ps: sorry for my english

jpn
25th May 2008, 13:58
Take a look at The Graphics View Framework (http://doc.trolltech.com/4.4/graphicsview.html).

honza
25th May 2008, 14:27
thanks JPN