[Kde-pim] Handling virtual collections in applications

Ingo Klöcker kloecker at kde.org
Wed Mar 4 20:01:59 GMT 2009


On Tuesday 03 March 2009, Stephen Kelly wrote:
> Hi,
>
> Sorry, this is another in the series of 'Steve's long emails' :)
>
> Something that came to mind while implementing the models stuff is
> how the model should handle virtual collections. I think it should
> not be possible to move, or insert an entity from a virtual
> collection using regular user actions (like drag and drop). However,
> I don't think there's currently any way to know if a particular
> collection is a virtual collection. Do we need a
> Collection::isVirtual()? Does a collection know that it's virtual?
>
> It would be necessary to know that in the
> EntityTreeModel::dropMimeData method to for example stop the
> meaningless action of dropping a contact into the Search collection
> or any other virtual collection. Dragging from a virtual collection
> would have meaning, but it might also be confusing.
>
> Consider some tree like
>
> (root)
> -> Col 0
> -> -> Item 0-0
> -> Col 1
> -> -> Item 0-1
> -> Search [virtual]
> -> -> Item 0-0
>
> And imagine that the user drags Item 0-0 from Search into Col 1. That
> could behave exactly like dragging the item from Col 0 into Col 1,
> but the user might be confused that they dragged the item from the
> Search collection, but the item actually disappeared from Col 1, and
> it's still in the Search collection (because it still contains their
> search term). An option would be to disable internal moves as well
> from virtual collections, and only allow copy actions.
>
> Any thoughts on that?

It should be possible to move an item by moving it from a virtual folder 
to some other non-virtual folder. One important use case is "Move to 
Trash" applied on all messages that are in a Search collection (e.g. a 
collection showing all messages that have been marked as spam).

BTW, the current implementation of Search folders in KMail does allow 
moving a message from the Search folder to a physical folder 
effectively moving the message from its source folder to its new home.


> What else are virtual collections used for, apart from search? Are
> there any other use cases for them?

I cannot think of any use cases that cannot be solved with search 
collections.


> Virtual collections can't contain collections as far as I can see
> (there is an itemLinkJob, but not a CollectionLinkJob). Is there a
> usecase for (dis)allowing that?

On GUI level one should be able to nest virtual collections. But that 
does not mean that the collections need to be nested internally.


Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20090304/80962019/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list