layerlist widget source

Gábor Lehel illissius at gmail.com
Wed Dec 7 20:39:37 CET 2005


So, a few people were asking what I have so far with the new layers
widget, so here it is. It's not yet in krita, because krita needs some
refactoring to use it the way I'd intend, and I haven't done that yet.

random notes:

- LayerList has such an ungodly amount of slots forwarding things to
LayerItem because it's a QObject and LayerItem isn't -- I'm not sure
whether these are useful to have, or whether they're just clutter
(opinions?)

- I have similar concerns with regards to being able to use IDs for
layers instead of just LayerItem*s (adds clutter), but most likely
this is genuinely useful and I'll keep it

- I'll probably get rid of LayerFolder (or leave it purely for
convenience), and have a bool d->isFolder in LayerItem instead, so you
can inherit from it without things becoming a mess when you want to
use folders too

- I'm not sure how to handle preview images -- use setPreview(QImage*)
to set it, and then previewChanged() to notify whenever it changes (as
now); or have setPreview(const QImage&) and use that to set it /and/
every time it changes; or support both ways; or something else
entirely?

- this is, of course, a work in progress: some things (like tool tips)
just plain aren't implemented at all yet, others may not work
properly, for lack of testing -- I'm planning on stumbling upon and
fixing most of these when I integrate it with krita

Comments, advice, opinions, et al welcomed.

--
Work is punishment for failing to procrastinate effectively.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: layerlist.h
Type: application/octet-stream
Size: 8620 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20051208/1f02ec2c/layerlist-0002.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: layerlist.cpp
Type: application/octet-stream
Size: 30298 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20051208/1f02ec2c/layerlist-0003.obj


More information about the kimageshop mailing list