43 ~CntStringMapper() {} |
43 ~CntStringMapper() {} |
44 |
44 |
45 public: |
45 public: |
46 void initMappings() |
46 void initMappings() |
47 { |
47 { |
48 // init stringmap for string localization |
48 //editor icons |
49 mStringMap.insert(QContactPhoneNumber::DefinitionName, hbTrId("Phone number")); |
49 mContactEditorIconList.append(Loc(QContactPhoneNumber::DefinitionName, "", "qtg_small_mobile")); |
50 mStringMap.insert(QContactPhoneNumber::SubTypeAssistant, hbTrId("Assistant number")); |
50 mContactEditorIconList.append(Loc(QContactPhoneNumber::DefinitionName, QContactDetail::ContextHome, "qtg_small_mobile_home")); |
51 mStringMap.insert(QContactPhoneNumber::SubTypeCar, hbTrId("Car phone")); |
51 mContactEditorIconList.append(Loc(QContactPhoneNumber::DefinitionName, QContactDetail::ContextWork, "qtg_small_mobile_work")); |
52 mStringMap.insert(QContactPhoneNumber::SubTypeMobile, hbTrId("Mobile")); |
52 mContactEditorIconList.append(Loc(QContactPhoneNumber::SubTypeMobile, "", "qtg_small_mobile")); |
53 mStringMap.insert(QContactPhoneNumber::SubTypeLandline, hbTrId("Phone")); |
53 mContactEditorIconList.append(Loc(QContactPhoneNumber::SubTypeMobile, QContactDetail::ContextHome, "qtg_small_mobile_home")); |
54 mStringMap.insert(QContactPhoneNumber::SubTypeDtmfMenu, hbTrId("DTMF")); |
54 mContactEditorIconList.append(Loc(QContactPhoneNumber::SubTypeMobile, QContactDetail::ContextWork, "qtg_small_mobile_work")); |
55 mStringMap.insert(QContactPhoneNumber::SubTypeFacsimile, hbTrId("Fax")); |
55 mContactEditorIconList.append(Loc(QContactPhoneNumber::SubTypeLandline, "", "qtg_small_landline")); |
56 mStringMap.insert(QContactPhoneNumber::SubTypePager, hbTrId("Pager number")); |
56 mContactEditorIconList.append(Loc(QContactPhoneNumber::SubTypeLandline, QContactDetail::ContextHome, "qtg_small_landline_home")); |
57 |
57 mContactEditorIconList.append(Loc(QContactPhoneNumber::SubTypeLandline, QContactDetail::ContextWork, "qtg_small_landline_work")); |
58 mStringMap.insert(QContactEmailAddress::DefinitionName, hbTrId("Email")); |
58 mContactEditorIconList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, "", "qtg_small_fax")); |
59 |
59 mContactEditorIconList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, QContactDetail::ContextHome, "qtg_small_fax_home")); |
60 mStringMap.insert(QContactAddress::DefinitionName, hbTrId("Address")); |
60 mContactEditorIconList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, QContactDetail::ContextWork, "qtg_small_fax_work")); |
61 |
61 mContactEditorIconList.append(Loc(QContactPhoneNumber::SubTypePager, "", "qtg_small_pager")); |
62 mStringMap.insert(QContactOnlineAccount::DefinitionName, hbTrId("Chat")); |
62 mContactEditorIconList.append(Loc(QContactPhoneNumber::SubTypeCar, "", "qtg_small_car")); |
63 mStringMap.insert(QContactOnlineAccount::SubTypeSipVoip, hbTrId("Internet call")); |
63 mContactEditorIconList.append(Loc(QContactPhoneNumber::SubTypeAssistant, "", "qtg_small_assistant")); |
64 mStringMap.insert(QContactOnlineAccount::SubTypeSip, hbTrId("SIP")); |
64 mContactEditorIconList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, "", "qtg_small_voip")); |
65 mStringMap.insert(QContactOnlineAccount::SubTypeVideoShare, hbTrId("Share Video")); |
65 mContactEditorIconList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, QContactDetail::ContextHome, "qtg_small_voip_home")); |
66 |
66 mContactEditorIconList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, QContactDetail::ContextWork, "qtg_small_voip_work")); |
67 mStringMap.insert(QContactUrl::DefinitionName, hbTrId("URL")); |
67 mContactEditorIconList.append(Loc(QContactOnlineAccount::SubTypeSip, "", "qtg_small_internet")); |
68 |
68 mContactEditorIconList.append(Loc(QContactEmailAddress::DefinitionName, "", "qtg_small_email")); |
69 mStringMap.insert(QContactOrganization::DefinitionName, hbTrId("Company details")); |
69 mContactEditorIconList.append(Loc(QContactEmailAddress::DefinitionName, QContactDetail::ContextHome, "qtg_small_email_home")); |
70 mStringMap.insert(QContactOrganization::FieldAssistantName, hbTrId("Assistant name")); |
70 mContactEditorIconList.append(Loc(QContactEmailAddress::DefinitionName, QContactDetail::ContextWork, "qtg_small_email_work")); |
71 |
71 mContactEditorIconList.append(Loc(QContactUrl::DefinitionName, "", "qtg_small_url_address")); |
72 mStringMap.insert(QContactBirthday::DefinitionName, hbTrId("Birthday")); |
72 mContactEditorIconList.append(Loc(QContactUrl::DefinitionName, QContactDetail::ContextHome, "qtg_small_url_address_home")); |
73 mStringMap.insert(QContactAnniversary::DefinitionName, hbTrId("Anniversary")); |
73 mContactEditorIconList.append(Loc(QContactUrl::DefinitionName, QContactDetail::ContextWork, "qtg_small_url_address_work")); |
74 |
74 mContactEditorIconList.append(Loc(QContactAddress::DefinitionName, "", "qtg_small_location")); |
75 mStringMap.insert(QContactAvatar::SubTypeAudioRingtone, hbTrId("Ringtone")); |
75 |
76 |
76 //editor list items |
77 mStringMap.insert(QContactNote::DefinitionName, hbTrId("Note")); |
77 mContactEditorLocList.append(Loc(QContactPhoneNumber::SubTypeMobile, "", hbTrId("txt_phob_dblist_mobile"))); |
78 |
78 mContactEditorLocList.append(Loc(QContactPhoneNumber::SubTypeMobile, QContactDetail::ContextHome, hbTrId("txt_phob_dblist_mobile_home"))); |
79 mStringMap.insert(QContactFamily::FieldSpouse, hbTrId("Spouse")); |
79 mContactEditorLocList.append(Loc(QContactPhoneNumber::SubTypeMobile, QContactDetail::ContextWork, hbTrId("txt_phob_dblist_mobile_work"))); |
80 mStringMap.insert(QContactFamily::FieldChildren, hbTrId("Children")); |
80 mContactEditorLocList.append(Loc(QContactPhoneNumber::SubTypeLandline, "", hbTrId("txt_phob_dblist_phone"))); |
81 |
81 mContactEditorLocList.append(Loc(QContactPhoneNumber::SubTypeLandline, QContactDetail::ContextHome, hbTrId("txt_phob_dblist_phone_home"))); |
82 mStringMap.insert(QContactDetail::ContextHome, hbTrId("(home)")); |
82 mContactEditorLocList.append(Loc(QContactPhoneNumber::SubTypeLandline, QContactDetail::ContextWork, hbTrId("txt_phob_dblist_phone_work"))); |
83 mStringMap.insert(QContactDetail::ContextWork, hbTrId("(work)")); |
83 mContactEditorLocList.append(Loc(QContactPhoneNumber::SubTypePager, "", hbTrId("txt_phob_dblist_pager"))); |
84 |
84 mContactEditorLocList.append(Loc(QContactPhoneNumber::SubTypeAssistant, "", hbTrId("txt_phob_dblist_assistant"))); |
85 // init mapping of editor icons |
85 mContactEditorLocList.append(Loc(QContactPhoneNumber::SubTypeCar, "", hbTrId("txt_phob_dblist_car"))); |
86 mEditorIconMap.insert(QContactPhoneNumber::DefinitionName, "qtg_small_mobile"); |
86 mContactEditorLocList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, "", hbTrId("txt_phob_dblist_internet_telephone"))); |
87 mEditorIconMap.insert(QContactPhoneNumber::SubTypeAssistant, "qtg_small_assistant"); |
87 mContactEditorLocList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, QContactDetail::ContextHome, hbTrId("txt_phob_dblist_internet_telephone_home"))); |
88 mEditorIconMap.insert(QContactPhoneNumber::SubTypeCar, "qtg_small_car"); |
88 mContactEditorLocList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, QContactDetail::ContextWork, hbTrId("txt_phob_dblist_internet_telephone_work"))); |
89 mEditorIconMap.insert(QContactPhoneNumber::SubTypeMobile, "qtg_small_mobile"); |
89 mContactEditorLocList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, "", hbTrId("txt_phob_dblist_fax"))); |
90 mEditorIconMap.insert(QContactPhoneNumber::SubTypeLandline, "qtg_small_landline"); |
90 mContactEditorLocList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, QContactDetail::ContextHome, hbTrId("txt_phob_dblist_fax_home"))); |
91 mEditorIconMap.insert(QContactPhoneNumber::SubTypeDtmfMenu, "qgn_prop_empty"); |
91 mContactEditorLocList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, QContactDetail::ContextWork, hbTrId("txt_phob_dblist_fax_work"))); |
92 mEditorIconMap.insert(QContactPhoneNumber::SubTypeFacsimile, "qtg_small_fax"); |
92 mContactEditorLocList.append(Loc(QContactOnlineAccount::SubTypeSip, "", hbTrId("txt_phob_dblist_ptt"))); |
93 mEditorIconMap.insert(QContactPhoneNumber::SubTypePager, "qtg_small_pagerg"); |
93 |
94 |
94 //editor list item specific menu items |
95 mEditorIconMap.insert(QContactEmailAddress::DefinitionName, "qtg_small_email"); |
95 mContactEditorAddLocList.append(Loc(QContactAddress::DefinitionName, "", hbTrId("txt_phob_menu_add_address"))); |
96 |
96 mContactEditorAddLocList.append(Loc(QContactOrganization::DefinitionName, "", hbTrId("txt_phob_menu_add_company_details"))); |
97 mEditorIconMap.insert(QContactAddress::DefinitionName, "qtg_small_location"); |
97 mContactEditorAddLocList.append(Loc(QContactEmailAddress::DefinitionName, "", hbTrId("txt_phob_menu_add_email"))); |
98 |
98 mContactEditorAddLocList.append(Loc(QContactFamily::DefinitionName, "", hbTrId("txt_phob_menu_add_family_details"))); |
99 mEditorIconMap.insert(QContactOnlineAccount::DefinitionName, "qtg_small_internet"); |
99 mContactEditorAddLocList.append(Loc(QContactPhoneNumber::DefinitionName, "", hbTrId("txt_phob_menu_add_number"))); |
100 mEditorIconMap.insert(QContactOnlineAccount::SubTypeSipVoip, "qtg_small_internet"); |
100 mContactEditorAddLocList.append(Loc(QContactUrl::DefinitionName, "", hbTrId("txt_phob_menu_add_url"))); |
101 mEditorIconMap.insert(QContactOnlineAccount::SubTypeSip, "qtg_small_internet"); |
|
102 mEditorIconMap.insert(QContactOnlineAccount::SubTypeVideoShare, "qtg_small_internet"); |
|
103 mEditorIconMap.insert(QContactUrl::DefinitionName, "qtg_small_url_address.svg"); |
|
104 |
101 |
105 mLocList.append(Loc(QContactPhoneNumber::SubTypeMobile, "", hbTrId("txt_phob_dblist_mobile"))); |
102 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::DefinitionName, "", hbTrId("txt_phob_menu_edit_mobile"))); |
106 mLocList.append(Loc(QContactPhoneNumber::SubTypeMobile, QContactDetail::ContextHome,hbTrId("txt_phob_dblist_mobile_home"))); |
103 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::DefinitionName, QContactDetail::ContextHome, hbTrId("txt_phob_menu_edit_mobile_home"))); |
107 mLocList.append(Loc(QContactPhoneNumber::SubTypeMobile, QContactDetail::ContextWork,hbTrId("txt_phob_dblist_mobile_work"))); |
104 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::DefinitionName, QContactDetail::ContextWork, hbTrId("txt_phob_menu_edit_mobile_work"))); |
108 mLocList.append(Loc(QContactPhoneNumber::SubTypeLandline, "",hbTrId("txt_phob_dblist_phone"))); |
105 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::SubTypeAssistant, "", hbTrId("txt_phob_menu_call_assistant"))); |
109 mLocList.append(Loc(QContactPhoneNumber::SubTypeLandline, QContactDetail::ContextHome, hbTrId("txt_phob_dblist_phone_home"))); |
106 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::SubTypeAssistant, QContactDetail::ContextHome, hbTrId("txt_phob_menu_edit_assistant"))); |
110 mLocList.append(Loc(QContactPhoneNumber::SubTypeLandline, QContactDetail::ContextWork, hbTrId("txt_phob_dblist_phone_work"))); |
107 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::SubTypeAssistant, QContactDetail::ContextWork, hbTrId("txt_phob_menu_edit_assistant"))); |
111 mLocList.append(Loc(QContactPhoneNumber::SubTypePager, "", hbTrId("txt_phob_dblist_pager"))); |
108 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::SubTypeCar, "", hbTrId("txt_phob_menu_edit_car"))); |
112 mLocList.append(Loc(QContactPhoneNumber::SubTypeAssistant, "", hbTrId("txt_phob_dblist_assistant"))); |
109 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::SubTypeCar, QContactDetail::ContextHome, hbTrId("txt_phob_menu_edit_car"))); |
113 mLocList.append(Loc(QContactPhoneNumber::SubTypeCar, "", hbTrId("txt_phob_dblist_car"))); |
110 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::SubTypeCar, QContactDetail::ContextWork, hbTrId("txt_phob_menu_edit_car"))); |
114 mLocList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, "", hbTrId("txt_phob_dblist_internet_telephone"))); |
111 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::SubTypeMobile, QContactDetail::ContextHome,hbTrId("txt_phob_menu_edit_mobile"))); |
115 mLocList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, QContactDetail::ContextHome, hbTrId("txt_phob_dblist_internet_telephone_home"))); |
112 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::SubTypeMobile, QContactDetail::ContextWork,hbTrId("txt_phob_menu_edit_mobile_home"))); |
116 mLocList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, QContactDetail::ContextWork, hbTrId("txt_phob_dblist_internet_telephone_work"))); |
113 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::SubTypeMobile, "", hbTrId("txt_phob_menu_edit_mobile_work"))); |
117 mLocList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, "", hbTrId("txt_phob_dblist_fax"))); |
114 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::SubTypeLandline, "",hbTrId("txt_phob_menu_edit_phone"))); |
118 mLocList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, QContactDetail::ContextHome, hbTrId("txt_phob_dblist_fax_home"))); |
115 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::SubTypeLandline, QContactDetail::ContextHome, hbTrId("txt_phob_menu_edit_phone_home"))); |
119 mLocList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, QContactDetail::ContextWork, hbTrId("txt_phob_dblist_fax_work"))); |
116 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::SubTypeLandline, QContactDetail::ContextWork, hbTrId("txt_phob_menu_edit_phone_work"))); |
120 mLocList.append(Loc(QContactOnlineAccount::SubTypeSip, "", hbTrId("txt_phob_dblist_ptt"))); |
117 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, "", hbTrId("txt_phob_menu_edit_fax"))); |
121 |
118 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, QContactDetail::ContextHome, hbTrId("txt_phob_menu_edit_fax_home"))); |
122 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::DefinitionName, "", hbTrId("txt_phob_menu_call_mobile"))); |
119 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, QContactDetail::ContextWork, hbTrId("txt_phob_menu_edit_fax_work"))); |
123 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::DefinitionName, QContactDetail::ContextHome, hbTrId("txt_phob_menu_call_mobile_home"))); |
120 mContactEditorEditLocList.append(Loc(QContactPhoneNumber::SubTypePager, "", hbTrId("txt_phob_menu_edit_pager"))); |
124 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::DefinitionName, QContactDetail::ContextWork, hbTrId("txt_phob_menu_call_mobile_work"))); |
121 mContactEditorEditLocList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, "", hbTrId("txt_phob_menu_edit_internet_telephone"))); |
125 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::SubTypeAssistant, "", hbTrId("txt_phob_menu_call_assistant"))); |
122 mContactEditorEditLocList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, QContactDetail::ContextHome, hbTrId("txt_phob_menu_edit_internet_telephone_home"))); |
126 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::SubTypeAssistant, QContactDetail::ContextHome, hbTrId("txt_phob_menu_call_assistant"))); |
123 mContactEditorEditLocList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, QContactDetail::ContextWork, hbTrId("txt_phob_menu_edit_internet_telephone_work"))); |
127 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::SubTypeAssistant, QContactDetail::ContextWork, hbTrId("txt_phob_menu_call_assistant"))); |
124 mContactEditorEditLocList.append(Loc(QContactOnlineAccount::SubTypeSip, "", hbTrId("txt_phob_menu_edit_sip"))); |
128 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::SubTypeCar, "", hbTrId("txt_phob_menu_call_car_phone"))); |
125 mContactEditorEditLocList.append(Loc(QContactEmailAddress::DefinitionName, "", hbTrId("txt_phob_menu_edit_email"))); |
129 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::SubTypeCar, QContactDetail::ContextHome, hbTrId("txt_phob_menu_call_car_phone"))); |
126 mContactEditorEditLocList.append(Loc(QContactEmailAddress::DefinitionName, QContactDetail::ContextHome, hbTrId("txt_phob_menu_edit_email_home"))); |
130 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::SubTypeCar, QContactDetail::ContextWork, hbTrId("txt_phob_menu_call_car_phone"))); |
127 mContactEditorEditLocList.append(Loc(QContactEmailAddress::DefinitionName, QContactDetail::ContextWork, hbTrId("txt_phob_menu_edit_email_work"))); |
131 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::SubTypeMobile, QContactDetail::ContextHome,hbTrId("txt_phob_menu_call_mobile_home"))); |
128 mContactEditorEditLocList.append(Loc(QContactAddress::DefinitionName, "", hbTrId("txt_phob_menu_edit_address"))); |
132 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::SubTypeMobile, QContactDetail::ContextWork,hbTrId("txt_phob_menu_call_mobile_work"))); |
129 mContactEditorEditLocList.append(Loc(QContactAddress::DefinitionName, QContactDetail::ContextHome, hbTrId("txt_phob_menu_edit_address_home"))); |
133 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::SubTypeMobile, "", hbTrId("txt_phob_menu_call_mobile"))); |
130 mContactEditorEditLocList.append(Loc(QContactAddress::DefinitionName, QContactDetail::ContextWork, hbTrId("txt_phob_menu_edit_address_work"))); |
134 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::SubTypeLandline, "",hbTrId("txt_phob_menu_call_phone"))); |
131 mContactEditorEditLocList.append(Loc(QContactAnniversary::DefinitionName, "", hbTrId("txt_phob_menu_edit_anniversary"))); |
135 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::SubTypeLandline, QContactDetail::ContextHome, hbTrId("txt_phob_menu_call_phone_home"))); |
132 mContactEditorEditLocList.append(Loc(QContactBirthday::DefinitionName, "", hbTrId("txt_phob_menu_edit_birthday"))); |
136 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::SubTypeLandline, QContactDetail::ContextWork, hbTrId("txt_phob_menu_call_phone_work"))); |
133 mContactEditorEditLocList.append(Loc(QContactNote::DefinitionName, "", hbTrId("txt_phob_menu_edit_note"))); |
137 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, "", hbTrId("txt_phob_menu_fax"))); |
134 mContactEditorEditLocList.append(Loc(QContactFamily::FieldSpouse, "", hbTrId("txt_phob_menu_edit_children"))); |
138 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, QContactDetail::ContextHome, hbTrId("txt_phob_menu_fax_home"))); |
135 mContactEditorEditLocList.append(Loc(QContactFamily::FieldChildren, "", hbTrId("txt_phob_menu_edit_spouse"))); |
139 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, QContactDetail::ContextWork, hbTrId("txt_phob_menu_fax_work"))); |
136 |
140 mContactCardMenuLocList.append(Loc(QContactPhoneNumber::SubTypePager, "", hbTrId("txt_phob_menu_call_pager"))); |
137 |
141 mContactCardMenuLocList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, "", hbTrId("txt_phob_menu_call_internet_call"))); |
138 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::DefinitionName, "", hbTrId("txt_phob_menu_delete_mobile"))); |
142 mContactCardMenuLocList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, QContactDetail::ContextHome, hbTrId("txt_phob_menu_call_internet_call_home"))); |
139 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::DefinitionName, QContactDetail::ContextHome, hbTrId("txt_phob_menu_delete_mobile_home"))); |
143 mContactCardMenuLocList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, QContactDetail::ContextWork, hbTrId("txt_phob_menu_call_internet_call_work"))); |
140 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::DefinitionName, QContactDetail::ContextWork, hbTrId("txt_phob_menu_delete_mobile_work"))); |
144 mContactCardMenuLocList.append(Loc(QContactOnlineAccount::SubTypeSip, "", hbTrId("txt_phob_menu_sip"))); |
141 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::SubTypeAssistant, "", hbTrId("txt_phob_menu_call_assistant"))); |
145 mContactCardMenuLocList.append(Loc(QContactEmailAddress::DefinitionName, "", hbTrId("txt_phob_menu_email"))); |
142 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::SubTypeAssistant, QContactDetail::ContextHome, hbTrId("txt_phob_menu_delete_assistant"))); |
146 mContactCardMenuLocList.append(Loc(QContactEmailAddress::DefinitionName, QContactDetail::ContextHome, hbTrId("txt_phob_menu_email_home"))); |
143 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::SubTypeAssistant, QContactDetail::ContextWork, hbTrId("txt_phob_menu_delete_assistant"))); |
147 mContactCardMenuLocList.append(Loc(QContactEmailAddress::DefinitionName, QContactDetail::ContextWork, hbTrId("txt_phob_menu_email_work"))); |
144 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::SubTypeCar, "", hbTrId("txt_phob_menu_delete_car"))); |
|
145 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::SubTypeCar, QContactDetail::ContextHome, hbTrId("txt_phob_menu_delete_car"))); |
|
146 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::SubTypeCar, QContactDetail::ContextWork, hbTrId("txt_phob_menu_delete_car"))); |
|
147 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::SubTypeMobile, QContactDetail::ContextHome,hbTrId("txt_phob_menu_delete_mobile"))); |
|
148 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::SubTypeMobile, QContactDetail::ContextWork,hbTrId("txt_phob_menu_delete_mobile_home"))); |
|
149 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::SubTypeMobile, "", hbTrId("txt_phob_menu_delete_mobile_work"))); |
|
150 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::SubTypeLandline, "",hbTrId("txt_phob_menu_delete_phone"))); |
|
151 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::SubTypeLandline, QContactDetail::ContextHome, hbTrId("txt_phob_menu_delete_phone_home"))); |
|
152 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::SubTypeLandline, QContactDetail::ContextWork, hbTrId("txt_phob_menu_delete_phone_work"))); |
|
153 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, "", hbTrId("txt_phob_menu_delete_fax"))); |
|
154 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, QContactDetail::ContextHome, hbTrId("txt_phob_menu_delete_fax_home"))); |
|
155 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, QContactDetail::ContextWork, hbTrId("txt_phob_menu_delete_fax_work"))); |
|
156 mContactEditorDelLocList.append(Loc(QContactPhoneNumber::SubTypePager, "", hbTrId("txt_phob_menu_delete_pager"))); |
|
157 mContactEditorDelLocList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, "", hbTrId("txt_phob_menu_delete_internet_telephone"))); |
|
158 mContactEditorDelLocList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, QContactDetail::ContextHome, hbTrId("txt_phob_menu_delete_internet_telephone_home"))); |
|
159 mContactEditorDelLocList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, QContactDetail::ContextWork, hbTrId("txt_phob_menu_delete_internet_telephone_work"))); |
|
160 mContactEditorDelLocList.append(Loc(QContactOnlineAccount::SubTypeSip, "", hbTrId("txt_phob_menu_delete_sip"))); |
|
161 mContactEditorDelLocList.append(Loc(QContactEmailAddress::DefinitionName, "", hbTrId("txt_phob_menu_delete_email"))); |
|
162 mContactEditorDelLocList.append(Loc(QContactEmailAddress::DefinitionName, QContactDetail::ContextHome, hbTrId("txt_phob_menu_delete_email_home"))); |
|
163 mContactEditorDelLocList.append(Loc(QContactEmailAddress::DefinitionName, QContactDetail::ContextWork, hbTrId("txt_phob_menu_delete_email_work"))); |
|
164 mContactEditorDelLocList.append(Loc(QContactAddress::DefinitionName, "", hbTrId("txt_phob_menu_delete_address"))); |
|
165 mContactEditorDelLocList.append(Loc(QContactAddress::DefinitionName, QContactDetail::ContextHome, hbTrId("txt_phob_menu_delete_address_home"))); |
|
166 mContactEditorDelLocList.append(Loc(QContactAddress::DefinitionName, QContactDetail::ContextWork, hbTrId("txt_phob_menu_delete_address_work"))); |
|
167 mContactEditorDelLocList.append(Loc(QContactAnniversary::DefinitionName, "", hbTrId("txt_phob_menu_delete_anniversary"))); |
|
168 mContactEditorDelLocList.append(Loc(QContactBirthday::DefinitionName, "", hbTrId("txt_phob_menu_delete_birthday"))); |
|
169 mContactEditorDelLocList.append(Loc(QContactNote::DefinitionName, "", hbTrId("txt_phob_menu_delete_note"))); |
|
170 mContactEditorDelLocList.append(Loc(QContactFamily::FieldSpouse, "", hbTrId("txt_phob_menu_delete_children"))); |
|
171 mContactEditorDelLocList.append(Loc(QContactFamily::FieldChildren, "", hbTrId("txt_phob_menu_delete_spouse"))); |
|
172 |
|
173 //contact card item specific menu |
|
174 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::DefinitionName, "", hbTrId("txt_phob_menu_call_mobile"))); |
|
175 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::DefinitionName, QContactDetail::ContextHome, hbTrId("txt_phob_menu_call_mobile_home"))); |
|
176 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::DefinitionName, QContactDetail::ContextWork, hbTrId("txt_phob_menu_call_mobile_work"))); |
|
177 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::SubTypeAssistant, "", hbTrId("txt_phob_menu_call_assistant"))); |
|
178 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::SubTypeAssistant, QContactDetail::ContextHome, hbTrId("txt_phob_menu_call_assistant"))); |
|
179 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::SubTypeAssistant, QContactDetail::ContextWork, hbTrId("txt_phob_menu_call_assistant"))); |
|
180 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::SubTypeCar, "", hbTrId("txt_phob_menu_call_car_phone"))); |
|
181 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::SubTypeCar, QContactDetail::ContextHome, hbTrId("txt_phob_menu_call_car_phone"))); |
|
182 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::SubTypeCar, QContactDetail::ContextWork, hbTrId("txt_phob_menu_call_car_phone"))); |
|
183 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::SubTypeMobile, QContactDetail::ContextHome,hbTrId("txt_phob_menu_call_mobile_home"))); |
|
184 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::SubTypeMobile, QContactDetail::ContextWork,hbTrId("txt_phob_menu_call_mobile_work"))); |
|
185 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::SubTypeMobile, "", hbTrId("txt_phob_menu_call_mobile"))); |
|
186 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::SubTypeLandline, "",hbTrId("txt_phob_menu_call_phone"))); |
|
187 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::SubTypeLandline, QContactDetail::ContextHome, hbTrId("txt_phob_menu_call_phone_home"))); |
|
188 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::SubTypeLandline, QContactDetail::ContextWork, hbTrId("txt_phob_menu_call_phone_work"))); |
|
189 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, "", hbTrId("txt_phob_menu_fax"))); |
|
190 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, QContactDetail::ContextHome, hbTrId("txt_phob_menu_fax_home"))); |
|
191 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::SubTypeFacsimile, QContactDetail::ContextWork, hbTrId("txt_phob_menu_fax_work"))); |
|
192 mItemSpecificMenuLocList.append(Loc(QContactPhoneNumber::SubTypePager, "", hbTrId("txt_phob_menu_call_pager"))); |
|
193 mItemSpecificMenuLocList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, "", hbTrId("txt_phob_menu_call_internet_call"))); |
|
194 mItemSpecificMenuLocList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, QContactDetail::ContextHome, hbTrId("txt_phob_menu_call_internet_call_home"))); |
|
195 mItemSpecificMenuLocList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, QContactDetail::ContextWork, hbTrId("txt_phob_menu_call_internet_call_work"))); |
|
196 mItemSpecificMenuLocList.append(Loc(QContactOnlineAccount::SubTypeSip, "", hbTrId("txt_phob_menu_sip"))); |
|
197 mItemSpecificMenuLocList.append(Loc(QContactEmailAddress::DefinitionName, "", hbTrId("txt_phob_menu_email"))); |
|
198 mItemSpecificMenuLocList.append(Loc(QContactEmailAddress::DefinitionName, QContactDetail::ContextHome, hbTrId("txt_phob_menu_email_home"))); |
|
199 mItemSpecificMenuLocList.append(Loc(QContactEmailAddress::DefinitionName, QContactDetail::ContextWork, hbTrId("txt_phob_menu_email_work"))); |
148 |
200 |
|
201 //contact card list items |
149 mContactCardLocList.append(Loc(QContactPhoneNumber::DefinitionName, "", hbTrId("txt_phob_dblist_call_mobile"))); |
202 mContactCardLocList.append(Loc(QContactPhoneNumber::DefinitionName, "", hbTrId("txt_phob_dblist_call_mobile"))); |
150 mContactCardLocList.append(Loc(QContactPhoneNumber::DefinitionName, QContactDetail::ContextHome, hbTrId("txt_phob_dblist_call_mobile_home"))); |
203 mContactCardLocList.append(Loc(QContactPhoneNumber::DefinitionName, QContactDetail::ContextHome, hbTrId("txt_phob_dblist_call_mobile_home"))); |
151 mContactCardLocList.append(Loc(QContactPhoneNumber::DefinitionName, QContactDetail::ContextWork, hbTrId("txt_phob_dblist_call_mobile_work"))); |
204 mContactCardLocList.append(Loc(QContactPhoneNumber::DefinitionName, QContactDetail::ContextWork, hbTrId("txt_phob_dblist_call_mobile_work"))); |
152 mContactCardLocList.append(Loc(QContactPhoneNumber::SubTypeAssistant, "", hbTrId("txt_phob_dblist_call_assistant"))); |
205 mContactCardLocList.append(Loc(QContactPhoneNumber::SubTypeAssistant, "", hbTrId("txt_phob_dblist_call_assistant"))); |
153 mContactCardLocList.append(Loc(QContactPhoneNumber::SubTypeAssistant, QContactDetail::ContextHome, hbTrId("txt_phob_dblist_call_assistant"))); |
206 mContactCardLocList.append(Loc(QContactPhoneNumber::SubTypeAssistant, QContactDetail::ContextHome, hbTrId("txt_phob_dblist_call_assistant"))); |
195 mContactCardIconList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, QContactDetail::ContextWork, "qtg_large_call_voip_work")); |
251 mContactCardIconList.append(Loc(QContactOnlineAccount::SubTypeSipVoip, QContactDetail::ContextWork, "qtg_large_call_voip_work")); |
196 mContactCardIconList.append(Loc(QContactOnlineAccount::SubTypeSip, "", "")); |
252 mContactCardIconList.append(Loc(QContactOnlineAccount::SubTypeSip, "", "")); |
197 mContactCardIconList.append(Loc(QContactEmailAddress::DefinitionName, "", "qtg_large_email")); |
253 mContactCardIconList.append(Loc(QContactEmailAddress::DefinitionName, "", "qtg_large_email")); |
198 mContactCardIconList.append(Loc(QContactEmailAddress::DefinitionName, QContactDetail::ContextHome, "qtg_large_email_home")); |
254 mContactCardIconList.append(Loc(QContactEmailAddress::DefinitionName, QContactDetail::ContextHome, "qtg_large_email_home")); |
199 mContactCardIconList.append(Loc(QContactEmailAddress::DefinitionName, QContactDetail::ContextWork, "qtg_large_email_work")); |
255 mContactCardIconList.append(Loc(QContactEmailAddress::DefinitionName, QContactDetail::ContextWork, "qtg_large_email_work")); |
200 } |
256 mContactCardIconList.append(Loc(QContactUrl::DefinitionName, "", "qtg_large_url_address")); |
201 |
257 mContactCardIconList.append(Loc(QContactUrl::DefinitionName, QContactDetail::ContextHome, "qtg_large_url_address_home")); |
202 QString getMappedDetail(const QString &string) { return mStringMap.value(string); } |
258 mContactCardIconList.append(Loc(QContactUrl::DefinitionName, QContactDetail::ContextWork, "qtg_large_url_address_work")); |
203 QString getMappedIcon(const QString &string) { return mEditorIconMap.value(string); } |
259 } |
204 |
260 |
205 QString getLocString( QString aDefId, QString aContext ) |
261 //helper function to get string from list |
206 { |
262 QString getLocString( QString aDefId, QString aContext, QList<Loc> list) |
207 QString str = aDefId; |
263 { |
208 foreach ( Loc loc, mLocList ) |
264 QString str; |
|
265 foreach ( Loc loc, list ) |
209 { |
266 { |
210 if ( loc.mId == aDefId && loc.mContext == aContext ) |
267 if ( loc.mId == aDefId && loc.mContext == aContext ) |
211 { |
268 { |
212 str = loc.mLoc; |
269 str = loc.mLoc; |
213 break; |
270 break; |
214 } |
271 } |
215 } |
272 } |
216 return str; |
273 return str; |
217 } |
274 } |
218 |
275 |
219 QString getContactCardMenuLocString( QString aDefId, QString aContext ) |
276 //get string of editor view item |
220 { |
277 QString getContactEditorLocString( QString aDefId, QString aContext ) |
221 QString str; |
278 { |
222 foreach ( Loc loc, mContactCardMenuLocList ) |
279 return getLocString( aDefId, aContext, mContactEditorLocList ); |
223 { |
280 } |
224 if ( loc.mId == aDefId && loc.mContext == aContext ) |
281 |
225 { |
282 //get add string of contect editor |
226 str = loc.mLoc; |
283 QString getContactEditorAddLocString( QString aDefId, QString aContext ) |
227 break; |
284 { |
228 } |
285 return getLocString( aDefId, aContext, mContactEditorAddLocList ); |
229 } |
286 } |
230 return str; |
287 |
231 } |
288 //get edit string of contect editor |
|
289 QString getContactEditorEditLocString( QString aDefId, QString aContext ) |
|
290 { |
|
291 return getLocString( aDefId, aContext, mContactEditorEditLocList ); |
|
292 } |
|
293 |
|
294 |
|
295 //get delete string of contect editor |
|
296 QString getContactEditorDelLocString( QString aDefId, QString aContext ) |
|
297 { |
|
298 return getLocString( aDefId, aContext, mContactEditorDelLocList ); |
|
299 } |
|
300 |
|
301 //get string of item specific menu of contact card and editor view |
|
302 QString getItemSpecificMenuLocString( QString aDefId, QString aContext ) |
|
303 { |
|
304 return getLocString( aDefId, aContext, mItemSpecificMenuLocList ); |
|
305 } |
|
306 |
|
307 //get string of contact card list item |
232 QString getContactCardListLocString( QString aDefId, QString aContext ) |
308 QString getContactCardListLocString( QString aDefId, QString aContext ) |
233 { |
309 { |
234 QString str; |
310 return getLocString( aDefId, aContext, mContactCardLocList ); |
235 foreach ( Loc loc, mContactCardLocList ) |
311 } |
236 { |
312 |
237 if ( loc.mId == aDefId && loc.mContext == aContext ) |
313 //get string of editor view icon |
238 { |
314 QString getContactEditorIconString( QString aDefId, QString aContext ) |
239 str = loc.mLoc; |
315 { |
240 break; |
316 return getLocString( aDefId, aContext, mContactEditorIconList ); |
241 } |
317 } |
242 } |
318 |
243 return str; |
319 //get string of contact card icon |
244 } |
|
245 QString getContactCardIconString( QString aDefId, QString aContext ) |
320 QString getContactCardIconString( QString aDefId, QString aContext ) |
246 { |
321 { |
247 QString str; |
322 return getLocString( aDefId, aContext, mContactCardIconList ); |
248 foreach ( Loc loc, mContactCardIconList ) |
323 } |
249 { |
324 |
250 if ( loc.mId == aDefId && loc.mContext == aContext ) |
|
251 { |
|
252 str = loc.mLoc; |
|
253 break; |
|
254 } |
|
255 } |
|
256 return str; |
|
257 } |
|
258 |
|
259 private: |
325 private: |
260 QMap<QString, QString> mStringMap; |
326 QList<Loc> mContactEditorIconList; |
261 QMap<QString, QString> mEditorIconMap; |
327 QList<Loc> mContactEditorLocList; |
262 QMap<QString, QString> mLauncherIconMap; |
328 QList<Loc> mContactEditorAddLocList; |
263 |
329 QList<Loc> mContactEditorEditLocList; |
264 QList<Loc> mLocList; |
330 QList<Loc> mContactEditorDelLocList; |
265 QList<Loc> mContactCardMenuLocList; |
331 QList<Loc> mItemSpecificMenuLocList; |
266 QList<Loc> mContactCardLocList; |
332 QList<Loc> mContactCardLocList; |
267 QList<Loc> mContactCardIconList; |
333 QList<Loc> mContactCardIconList; |
268 }; |
334 }; |
269 |
335 |
270 inline Loc::Loc(QString aId, QString aContext, QString aLoc ) : |
336 inline Loc::Loc(QString aId, QString aContext, QString aLoc ) : |