Need advice for Gwenview 2 image view

Aurélien Gâteau aurelien.gateau at free.fr
Fri Mar 23 20:36:19 GMT 2007


Hello,

I have been working slowly on porting/rewriting Gwenview for KDE4. You can
find the current result in playground/graphics/gwenview. I have reached the
point where the basic application skeleton is working: you can browse
folders and view images using a proof-of-concept image KPart.

My next step is now to write a real image view, and I am currently wondering
what would be the best approach.

My options are:
- Use QScrollArea. If I understand correctly, I need to create a widget
representing my image. This means that if I want to zoom a large image, say
5000x4000 zoomed 16 times, I will end up with a widget which is
80000x64000. I guess this won't work.

- Use QAbstractScrollArea, with a custom viewport widget. This would be
quite similar to the way it works in KDE3 version of Gwenview (in KDE3,
Gwenview paints directly on the scrollview viewport).

- Use QGraphicsView. This sounds promising, but I am afraid it won't be
efficient to zoom images because it doesn't seem to be possible to
implement scaling myself (or is it?).

Before I start to explore these options myself, I would like to have your
opinion on these.

Aurélien





More information about the kde-core-devel mailing list