|
1 /* |
|
2 * Copyright (c) 2008 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __ALFPERFAPPSUITEPEOPLECONTROL_H__ |
|
19 #define __ALFPERFAPPSUITEPEOPLECONTROL_H__ |
|
20 |
|
21 // INCLUDES |
|
22 #include <alf/alfcontrol.h> |
|
23 #include "alfperfappsuiteflags.h" |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CAlfLayout; |
|
27 class CAlfGridLayout; |
|
28 class TAlfImage; |
|
29 class CAlfPerfAppSuiteTestCaseScroll; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 class CAlfPerfAppSuitePeopleControl : public CAlfControl, public MAlfTextureLoadingCompletedObserver |
|
33 { |
|
34 private: // Enums |
|
35 |
|
36 /** |
|
37 * Textstyles used in people-suite. |
|
38 */ |
|
39 enum TTextStyle |
|
40 { |
|
41 ETextStyleHeader = 0, |
|
42 ETextStyleBig, |
|
43 ETextStyleSmall, |
|
44 ENumberOfTextStyles |
|
45 }; |
|
46 |
|
47 public: // Construction and destruction |
|
48 |
|
49 /** |
|
50 * C++ constructor. |
|
51 * @param aScrollControl is used as observer |
|
52 */ |
|
53 CAlfPerfAppSuitePeopleControl(CAlfPerfAppSuiteTestCaseScroll* aScrollControl); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 ~CAlfPerfAppSuitePeopleControl(); |
|
59 |
|
60 /** |
|
61 * Second-phase constructor. |
|
62 * @param aEnv Alf environment. |
|
63 * @param aVisibleArea Visible screen area. |
|
64 * @param aParentLayout Parent layout. |
|
65 */ |
|
66 virtual void ConstructL( |
|
67 CAlfEnv& aEnv, |
|
68 const TSize& aVisibleArea, |
|
69 CAlfLayout* aParentLayout ); |
|
70 |
|
71 private: // New functions |
|
72 |
|
73 #ifdef ENABLE_TEXTSTYLES |
|
74 void CreateTextStylesL(); |
|
75 #endif |
|
76 |
|
77 CAlfGridLayout* ConstructListItemLayoutL( |
|
78 CAlfLayout* aParentLayout, |
|
79 TInt aHeight, |
|
80 TBool aSelected = EFalse, |
|
81 TBool aBorders = ETrue ); |
|
82 |
|
83 CAlfGridLayout* ConstructListItemTextLayoutL( |
|
84 CAlfLayout* aParentLayout ); |
|
85 |
|
86 void ConstructListHeaderL( |
|
87 CAlfLayout* aParentLayout, |
|
88 const TAlfImage& aImage, |
|
89 const TDesC& aText, |
|
90 TInt aHeight ); |
|
91 |
|
92 void ConstructListItemL( |
|
93 CAlfLayout* aParentLayout, |
|
94 const TDesC& aName, |
|
95 const TDesC& aDescription, |
|
96 TInt aHeight, |
|
97 TBool aSelected = EFalse ); |
|
98 |
|
99 // From base class MAlfTextureLoadingCompletedObserver |
|
100 void TextureLoadingCompleted( |
|
101 CAlfTexture& aTexture, |
|
102 TInt aTextureId, |
|
103 TInt aErrorCode ); |
|
104 |
|
105 private: |
|
106 TSize iVisibleArea; |
|
107 |
|
108 /** |
|
109 * count of the number of loaded textures |
|
110 */ |
|
111 TInt iLoadedImages; |
|
112 |
|
113 /** |
|
114 * Used for callback. |
|
115 * Not owned. |
|
116 */ |
|
117 CAlfPerfAppSuiteTestCaseScroll* iScrollControl; |
|
118 |
|
119 #ifdef ENABLE_TEXTSTYLES |
|
120 RArray<TInt> iTextStyles; |
|
121 #endif |
|
122 |
|
123 }; |
|
124 |
|
125 #endif // __ALFPERFAPPSUITEPEOPLECONTROL_H__ |
|
126 |
|
127 // end of file |