37 #include <MVPbkFieldType.h> |
37 #include <MVPbkFieldType.h> |
38 #include <MVPbkContactFieldBinaryData.h> |
38 #include <MVPbkContactFieldBinaryData.h> |
39 #include <VPbkEng.rsg> |
39 #include <VPbkEng.rsg> |
40 #include <MVPbkStoreContact.h> |
40 #include <MVPbkStoreContact.h> |
41 |
41 |
|
42 #include "uiservicetabtracer.h" |
42 // constants declaration |
43 // constants declaration |
43 const TInt KLabelLineCount = 3; |
44 const TInt KLabelLineCount = 3; |
44 |
45 |
45 // Size of thumbnail images stored to contacts |
46 // Size of thumbnail images stored to contacts |
46 #define KPbkPersonalImageSize TSize(80,96) |
47 #define KPbkPersonalImageSize TSize(80,96) |
75 // ConstructL, second phase constructor |
76 // ConstructL, second phase constructor |
76 // --------------------------------------------------------------------------- |
77 // --------------------------------------------------------------------------- |
77 // |
78 // |
78 void CVIMPSTDetailsHeaderControl::ConstructL() |
79 void CVIMPSTDetailsHeaderControl::ConstructL() |
79 { |
80 { |
|
81 TRACER_AUTO; |
80 // Create the header image |
82 // Create the header image |
81 iImage = new (ELeave) CEikImage(); |
83 iImage = new (ELeave) CEikImage(); |
82 iImage->SetPictureOwnedExternally(ETrue); //EHLeftVCenter |
84 iImage->SetPictureOwnedExternally(ETrue); //EHLeftVCenter |
83 iImage->SetAlignment(EHCenterVCenter); |
85 iImage->SetAlignment(EHCenterVCenter); |
84 // Create the header labels |
86 // Create the header labels |
85 for (TInt i=0; i < KLabelLineCount; i++) |
87 for (TInt i=0; i < KLabelLineCount; i++) |
86 { |
88 { |
87 CEikLabel* label = new(ELeave) CEikLabel; |
89 CEikLabel* label = new(ELeave) CEikLabel; |
88 CleanupStack::PushL(label); |
90 CleanupStack::PushL(label); |
89 label->SetTextL(KNullDesC()); |
91 label->SetTextL(KNullDesC()); |
90 label->SetAlignment(EHLeftVCenter);// EHCenterVCenter, EHLeftVCenter |
92 label->SetAlignment(EHLeftVCenter);// EHCenterVCenter, EHLeftVCenter |
91 label->CropText(); |
|
92 iLabels.AppendL(label); |
93 iLabels.AppendL(label); |
93 CleanupStack::Pop(label); |
94 CleanupStack::Pop(label); |
94 } |
95 } |
95 iContactImageSize = KPbkPersonalImageSize; |
96 iContactImageSize = KPbkPersonalImageSize; |
96 } |
97 } |
202 |
203 |
203 AknLayoutUtils::LayoutLabel(iLabels[0], labelsRect.Rect(), AknLayoutScalable_Apps::cl_header_name_pane_t1(2)); |
204 AknLayoutUtils::LayoutLabel(iLabels[0], labelsRect.Rect(), AknLayoutScalable_Apps::cl_header_name_pane_t1(2)); |
204 AknLayoutUtils::LayoutLabel(iLabels[1], labelsRect.Rect(), AknLayoutScalable_Apps::cl_header_name_pane_t2(2)); |
205 AknLayoutUtils::LayoutLabel(iLabels[1], labelsRect.Rect(), AknLayoutScalable_Apps::cl_header_name_pane_t2(2)); |
205 |
206 |
206 AknLayoutUtils::LayoutLabel(iLabels[2], labelsRect.Rect(), AknLayoutScalable_Apps::cl_header_name_pane_t3(2)); |
207 AknLayoutUtils::LayoutLabel(iLabels[2], labelsRect.Rect(), AknLayoutScalable_Apps::cl_header_name_pane_t3(2)); |
|
208 |
|
209 TRAP_IGNORE(LabelsSizeChangedL()); |
207 } |
210 } |
208 |
211 |
209 // --------------------------------------------------------------------------- |
212 // --------------------------------------------------------------------------- |
210 // CVIMPSTDetailsHeaderControl::LabelsSizeChangedL() |
213 // CVIMPSTDetailsHeaderControl::LabelsSizeChangedL() |
211 // --------------------------------------------------------------------------- |
214 // --------------------------------------------------------------------------- |
219 if (iLabels.Count() > 0) |
222 if (iLabels.Count() > 0) |
220 { |
223 { |
221 for (TInt i=0; i < iLabels.Count(); i++) |
224 for (TInt i=0; i < iLabels.Count(); i++) |
222 { |
225 { |
223 iLabels[i]->SetTextL( iPresenceHandler.GetHeaderLabelDataL(i) ); |
226 iLabels[i]->SetTextL( iPresenceHandler.GetHeaderLabelDataL(i) ); |
|
227 iLabels[i]->CropText(); |
224 iLabels[i]->OverrideColorL( EColorLabelText, color ); |
228 iLabels[i]->OverrideColorL( EColorLabelText, color ); |
225 iLabels[i]->DrawDeferred(); |
229 iLabels[i]->DrawDeferred(); |
226 } |
230 } |
227 } |
231 } |
228 } |
232 } |