[Kde-pim] Propossal: Akonadi::Model::ItemCreateJob
Eduardo Robles Elvira
edulix at gmail.com
Fri Jun 19 10:32:32 BST 2009
>From Stephen Kelly <steveire () gmail ! com>:
> I counter-propose that the existing ItemCreateJob get a newItem() method, which would \
> allow using it in a similar way to the ItemFetchJob::items() method. That way we \
> don't have to create new jobs and wrappers, you'd just connect the finished signal to \
> a slot where you call newItem and display that in your dialog.
>
>http://api.kde.org/4.x-api/kdepimlibs-apidocs/akonadi/html/classAkonadi_1_1ItemCreateJ \
> ob.html
>
> http://api.kde.org/4.x-api/kdepimlibs-apidocs/akonadi/html/classAkonadi_1_1ItemFetchJo \
b.html
>
> I think this solves your open issues too.
But how does that solve the problem of knowing the index of the item
in the model when it's being inserted? I already have a reference to
the item being inserted, I inserted it. What I need is to have that
item actually in the model and to be able to refer to it with a
QModelIndex in order to make it the selected item. Sorry if my email
was not enough clear in that part. That's why the new ItemCreateJob
I suggested has a reference to the model and why it has a method
called itemIndex() which returns the QModelIndex in the model. I need
a Model-aware ItemCreateJob.
I miss how can I do that with just a reference to the item
(ItemCreateJob::item() method) but if it's doable please tell me how
:P Again, any other suggestions will be welcomed hehe
Thanks for your time,
Eduardo Robles Elvira.
_______________________________________________
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