contacts_plat/contacts_ui_extensions_api/inc/cntuiactionextension.h
changeset 37 fd64c38c277d
child 61 d30183af6ca6
equal deleted inserted replaced
31:2a11b5b00470 37:fd64c38c277d
       
     1 /*
       
     2  * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description: Tags for contact card UI control. Use these in mobility plugin metaData() to specify 
       
    15  *              which action details UI should show.
       
    16  *
       
    17  */
       
    18 
       
    19 #ifndef CNTUIEXTENSIONGROUP_H
       
    20 #define CNTUIEXTENSIONGROUP_H
       
    21 
       
    22 /*
       
    23  * Tags for QContactAction metaData call. Tags describe which UI element they are affecting to.
       
    24  * Action can be visualised with UI item that has three customised areas: icon, title text and value text.
       
    25  * Icon reserves small space from left edge of item, title text fills top part of free space from item and 
       
    26  * value text fills lower part of free space from item.
       
    27  * 
       
    28  * You can create generic contact or my card action(detail independent) by checking if
       
    29  * QContactDetail in isDetailSupported is null. These items are created only once for view.
       
    30  * You cannot use KCntUiActionMetaTitleTextDetail or KCntUiActionMetaValueTextDetail with this
       
    31  * action UI item, since it's detail independent.
       
    32  * 
       
    33  * If you want to create action only to "My card" view, you have to create QContactManager instance and
       
    34  * and compare its "cm->selfContactId()" to local id of QContact parameter in isDetailSupported 
       
    35  * (contact.localId()). You cannot use KCntUiActionMetaTitleTextDetail or KCntUiActionMetaValueTextDetail
       
    36  * with this action UI item, since it's detail independent.
       
    37  */
       
    38 
       
    39 // Default Symbian database, use this as uri parameter for QContactManager::fromUri.
       
    40 const QString SYMBIAN_BACKEND = "qtcontacts:symbian:";
       
    41 
       
    42 // First line in UI item
       
    43 // This tag is used to specify localized freetext(QString) description for action, eg. "Send message". This
       
    44 // or KCntUiActionMetaTitleTextDetail tag must be specified if UI should show action. If both set
       
    45 // this is used.
       
    46 const QString KCntUiActionMetaTitleText = "titleText";
       
    47 
       
    48 // First line in UI item
       
    49 // This tag is used to specify data field to be shown from detail, eg. QContactPhoneNumber::FieldNumber. 
       
    50 // This or KCntUiActionMetaTitleText tag must be specified if UI should show action. If both set
       
    51 // KCntUiActionMetaTitleText is used.
       
    52 // Note: Does not work with general contact actions(isDetailSupported has empty detail parameter)
       
    53 const QString KCntUiActionMetaTitleTextDetail = "titleTextDetail";
       
    54 
       
    55 
       
    56 // Second line in UI item
       
    57 // This tag is used to specify which field to show from detail in UI, eg. QContactPhoneNumber::FieldNumber.
       
    58 // UI can show either this or KCntUiActionMetaValueText tag. If both set this is used.
       
    59 // Note: Does not work with general contact actions(isDetailSupported has empty detail parameter)
       
    60 const QString KCntUiActionMetaValueTextDetail = "valueTextDetail";
       
    61 
       
    62 // Second line in UI item
       
    63 // This tag can be used to specify localized freetext(QString) to UI.
       
    64 // UI can show either this or KCntUiActionMetaValueTextDetail tag. If both set KCntUiActionMetaValueTextDetail
       
    65 // is used.
       
    66 const QString KCntUiActionMetaValueText = "valueText";
       
    67 
       
    68 // Text for long press menu in UI
       
    69 // This tag can be used to specify localized freetext(QString) to UI.
       
    70 const QString KCntUiActionMetaValueTextLongPress = "longPressText";
       
    71 
       
    72 
       
    73 // This tag is used to specify custom icon for action
       
    74 // Icon must be QIcon.
       
    75 // TODO Supported icon dimension?
       
    76 const QString KCntUiActionMetaIcon = "icon";
       
    77 
       
    78 #endif