[Digikam-devel] [RFC] Custom ordering of images.
Tom Albers
tomalbers at kde.nl
Mon Jul 18 16:57:55 BST 2005
Hello,
I've created a way to allow cusom ordering. The principle is simple: you drag
an image to the location where you want it to be.
Renchi requested that I posted the patch here and see if people have comments
on the design.
I have extended the images table in the database with a new field. This field
holds a number. When you set digiKam to Sort on Custom Order, the images
become sorted on that field.
When dragging the image to a new location that image gets the orderid of the
image you dragged it to and all items inbetween the two images get shifted a
number.
Because the orderid is unique for all images and not per album, it is possible
to drag in the tagview and date view.
One of the things which has not been taken care of in the right way is the
initial assignment of the orderid. I now assign it as soon as i need a
orderid and it is not there. That results in a small delay when you first ask
to sort in that way. I'm open to suggestions here. I could leave it this way,
move it to albumdb when the items get inserted, or do an integretiy check in
the scanlib. All good options imho.
Anyway suggestions are welcome. The patch is in some parts similar to one
Cedric posted earlier, which I did not had at hand while working on this, so
it convinces me the design is ok.
When you are going to try the patch, please backup your database
(digikam3.db). It is decided that this feature will not make it into 0.8.0
because it is an intrusive change.
gr.
Tom
--
http://www.kde.nl | http://www.digikam.org |irc: toma | toma at jabber.kovoks.nl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: d.custom_ordering.diff
Type: text/x-diff
Size: 14523 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20050718/f8d36220/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1930 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20050718/f8d36220/attachment.bin>
More information about the Digikam-devel
mailing list