|
1 /* |
|
2 * Copyright (c) 2007 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: Blid application startup view's control class definition. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CBlidSatelliteControl_H__ |
|
21 #define __CBlidSatelliteControl_H__ |
|
22 |
|
23 // SYSTEM INCLUDES |
|
24 #include <alf/alfcontrol.h> |
|
25 |
|
26 // USER INCLUDE |
|
27 // INCLUDES |
|
28 //#include "CBlidBaseContainer.h" |
|
29 //#include "CBlidBaseView.h" |
|
30 |
|
31 //FORWARD DCLERATION |
|
32 class CAlfEnv; |
|
33 class CBlidBaseView; |
|
34 class MBlidLocation; |
|
35 class CAlfAnchorLayout; |
|
36 class CAlfTextVisual; |
|
37 class CAlfDeckLayout; |
|
38 class CAlfTextStyle; |
|
39 class CAknNavigationDecorator; |
|
40 class CAlfImageLoaderUtil; |
|
41 class CAlfImageVisual; |
|
42 class CAlfTexture; |
|
43 |
|
44 /*! |
|
45 @class CBlidSatelliteControl |
|
46 |
|
47 @discussion |
|
48 */ |
|
49 class CBlidSatelliteControl : public CAlfControl |
|
50 { |
|
51 public: |
|
52 /*! |
|
53 @function NewL |
|
54 |
|
55 @discussion Create a CBlidSatelliteControl object, which will draw itself to aRect |
|
56 * Two-phased constructor |
|
57 * @param aKeyProcessor |
|
58 * @param aParent |
|
59 * @param aRect A rectangle for drawing. |
|
60 * @return The newly created object. |
|
61 |
|
62 @result a pointer to the created instance of CBlidSatelliteControl |
|
63 */ |
|
64 static CBlidSatelliteControl* NewL( CAlfEnv& aEnv, |
|
65 const TRect& aRect, |
|
66 CBlidBaseView& aView ); |
|
67 |
|
68 /*! |
|
69 @function ~CBlidSatelliteControl |
|
70 |
|
71 @discussion Destroy the object and release all memory objects |
|
72 */ |
|
73 ~CBlidSatelliteControl(); |
|
74 |
|
75 |
|
76 private: |
|
77 /*! |
|
78 @function CBlidSatelliteControl |
|
79 |
|
80 @discussion Perform the first phase of two phase construction |
|
81 */ |
|
82 CBlidSatelliteControl( CAlfEnv& aEnv, |
|
83 CBlidBaseView& aView ); |
|
84 |
|
85 /*! |
|
86 @function ConstructL |
|
87 |
|
88 @discussion Perform the second phase construction of a CBlidSatelliteControl object |
|
89 */ |
|
90 void ConstructL( const TRect& aRect ); |
|
91 |
|
92 /** |
|
93 * Enumerations for signal strength |
|
94 */ |
|
95 enum TBlidSignalStrength |
|
96 { |
|
97 EBlidSignalStrengthZero, |
|
98 EBlidSignalStrengthOne, |
|
99 EBlidSignalStrengthTwo, |
|
100 EBlidSignalStrengthThree, |
|
101 EBlidSignalStrengthFour |
|
102 }; |
|
103 |
|
104 public: |
|
105 void UpdateL(); |
|
106 void MakeTitleL( TInt aResourceText ); |
|
107 void SetErrorCode( TInt aErrorCode ); |
|
108 void SetOnlineMode( TBool aOnlineMode ); |
|
109 void CreateNaviPaneL( const TDesC& aText ); |
|
110 void ChangeNavigationViewL(); |
|
111 void UpdateDisplayLayoutL(); |
|
112 |
|
113 |
|
114 private: |
|
115 void CreateGlobeVisualL( ); |
|
116 void CreateSatelliteSignalVisualsL( ); |
|
117 void CreateSignalLayoutL( CAlfTextStyle* aStyle, TRgb aRgb ); |
|
118 void DisplaySatellitesRowL( const TDesC& aSatNo, |
|
119 CAlfImageVisual* aImageVisual, |
|
120 CAlfTextVisual* aTextVisual, |
|
121 TInt aIndex ); |
|
122 |
|
123 void ChangeSoftKeyL(); |
|
124 void CalculateRects(); |
|
125 void SetAnchors(); |
|
126 static TInt Tick(TAny* aObject); // functions for TCallBack protocol |
|
127 void UpdateGlobeVisual(); |
|
128 |
|
129 private: |
|
130 CEikStatusPane* StatusPane(); |
|
131 |
|
132 private: |
|
133 /// Reference to the view to handle resource change |
|
134 CAlfEnv& iEnv; |
|
135 CBlidBaseView& iView; |
|
136 TInt iErrorCode; |
|
137 TBool iOnlineMode; |
|
138 CAlfAnchorLayout* iMainAnchorLayout; |
|
139 CAlfDeckLayout* iGlobeDeckLayout; |
|
140 CAlfDeckLayout* iSatelliteBarDeckLayout; |
|
141 CAlfDeckLayout* iFlowDeckOne; |
|
142 CAlfDeckLayout* iFlowDeckTwo; |
|
143 CAlfImageVisual* iSatelliteVisual[8]; |
|
144 CAlfImageVisual* iSignalStrengthRowOne[17]; |
|
145 CAlfTextVisual* iSatNoRowOne[17]; |
|
146 CAknNavigationDecorator* iNavimessage; |
|
147 MBlidLocation* iLocation; |
|
148 HBufC* iImagePath; |
|
149 CPeriodic* iTimer; |
|
150 HBufC* iAvailableNoteText; |
|
151 HBufC* iSearchNoteText; |
|
152 |
|
153 RArray<TRect> iSignalBarRects; |
|
154 RArray<TRect> iSatelliteNumberRects; |
|
155 |
|
156 CPeriodic* iPeriodic; // periodic timer active object |
|
157 TInt iDisplayIcon; // Current svg animation icon |
|
158 CAlfImageVisual* iAnimationVisual; |
|
159 RPointerArray<CAlfTexture> iTextures; |
|
160 |
|
161 TRect iGlobeRect; |
|
162 TRect iSatGridRect; |
|
163 }; |
|
164 |
|
165 #endif // __CBlidSatelliteControl_H__ |