[Development] [QtContacts] Add a new contact Type

Konstantin Ritt ritt.ks at gmail.com
Fri Mar 21 21:16:24 CET 2014


IIUC, one could treat QContactCollection like an individual contacts data
source (with some differences, though).
Also note there is no such thing like "Merged contact", instead one have to
"aggregate" contacts from various sources and create a new one, linked with
a particular data source (either  QContactCollection, or contacts backend)
that represents "merged contacts source".

The only thing I'm not happy with in the current collections implementation
is that that collection isn't strictly defined (I mean fields, behavior and
so on) and looks more like a spike...look for instance at
OrganizerModel.collections and imagine all that pain required to maintain a
full-featured calendar QML app. But well, that could be improved once we
have more use-cases...


Regards,
Konstantin


2014-03-21 21:02 GMT+02:00 Renato Araujo <renatox at gmail.com>:

> Hi Guys,
>
> I was thinking about this idea of QContactCollection I am not sure if
> this will works as the same in the QtOrganizer, since we can have one
> contact with more than one collection (Ex. Merged contact). I think this
> need to be more flexible.
>
> What do you think?
>
>
> Renato Araujo Oliveira Filho
>
>
> On Wed, Mar 19, 2014 at 9:03 AM, Renato Araujo <renatox at gmail.com> wrote:
>
>> Yes I agree with you guys, the enum is not a good solution. The QContactCollection
>> is a very good and complete solution. I suggested the enum because the API
>> change is very small and I was thinking about a short term solution.
>> But anyway I have some workarounds in my code to simulate the address
>> book for now :D. I can wait for the new API (BUG 31824).
>>
>> Thanks.
>>
>>
>>
>>
>>
>>
>>
>>
>> Renato Araujo Oliveira Filho
>>
>>
>> On Wed, Mar 19, 2014 at 2:02 AM, Konstantin Ritt <ritt.ks at gmail.com>wrote:
>>
>>> Completely agree with Chris, and I'm missing this functionality, too.
>>> Does "QContactCollection" sound ok to you?
>>>
>>> Regards,
>>> Konstantin
>>>
>>>
>>> 2014-03-18 3:29 GMT+02:00 Chris Adams <chris.adams at qinetic.com.au>:
>>>
>>> Hi Renato,
>>>>
>>>> Is an address book a contactable entity?  It seems like it's just a
>>>> collection of contacts, rather than a contactable entity, in which case I
>>>> would prefer something like the QOrganizerItemCollection API to be added to
>>>> QtContacts instead, perhaps, or some other solution.
>>>>
>>>> To be more precise: a contact group may be contactable (eg, a group may
>>>> have a mailinglist, an organization headquarters, and so on), which is why
>>>> I think it still makes sense to model a group as a type of contact (with
>>>> group membership denoted by QContactRelationship between the group and its
>>>> member contacts), but an addressbook is just a logical collection of
>>>> contacts.
>>>>
>>>> In the qtcontacts-sqlite engine, we simply use different filters on the
>>>> QContactSyncTarget detail to determine which logical collection the contact
>>>> came from.  So far, that has been adequate for our purposes, but admittedly
>>>> we have some rather complex code to deal with all of the edge-cases ;-)
>>>>
>>>> Matt and I are still busy with other stuff for the next week, but
>>>> hopefully (I know I've been saying this for about a month now) after that,
>>>> we'll turn our attention to QtPIM API discussions and improvements.  I've
>>>> added this to QTBUG-31824.
>>>>
>>>> Cheers,
>>>> Chris.
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Mar 18, 2014 at 7:44 AM, Renato Araujo <renatox at gmail.com>wrote:
>>>>
>>>>> Hi guys,
>>>>>
>>>>> Today in QtContacts we can define a contact type using the enum
>>>>> QContactType::TypeValues  which have the values { TypeContact, TypeGroup },
>>>>> this allow us to create/edit/list groups using the same functions used by
>>>>> the contacts.
>>>>> But I am missing a way to retrieve the available contacts address
>>>>> books, because of that I would like to propose to create a new contact type
>>>>> which ca be "TypeSyncTarget" this could be used to retrieve/edit/update
>>>>> "address books"  and could be set as value for
>>>>> QContactSyncTarget.
>>>>>
>>>>> What do you think about that? Is that a valid solution?
>>>>>
>>>>>
>>>>> Thanks
>>>>> Renato Araujo Oliveira Filho
>>>>>
>>>>> _______________________________________________
>>>>> Development mailing list
>>>>> Development at qt-project.org
>>>>> http://lists.qt-project.org/mailman/listinfo/development
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Development mailing list
>>>> Development at qt-project.org
>>>> http://lists.qt-project.org/mailman/listinfo/development
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20140321/b6172f3a/attachment.html>


More information about the Development mailing list