idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/inc/xnclockcontrol.h
equal
deleted
inserted
replaced
26 |
26 |
27 // Forward declarations |
27 // Forward declarations |
28 class CWindowGc; |
28 class CWindowGc; |
29 class CXnClockAdapter; |
29 class CXnClockAdapter; |
30 class CXnClockFace; |
30 class CXnClockFace; |
|
31 class CXnNodePluginIf; |
31 |
32 |
32 // Class declaration |
33 // Class declaration |
33 /** |
34 /** |
34 * @ingroup group_xnclockfactory |
35 * @ingroup group_xnclockfactory |
35 * @lib xnclockfactory.lib |
36 * @lib xnclockfactory.lib |
42 /** |
43 /** |
43 * Two-phased constructor. |
44 * Two-phased constructor. |
44 * |
45 * |
45 * @since S60 5.1 |
46 * @since S60 5.1 |
46 * |
47 * |
47 * @param aContainerWindow Container window for the clock component. |
48 * @param aAdapter Reference to clockadapter. |
48 * |
|
49 * @param aFormatFromLocale Boolean flag to indicate whether the clock |
49 * @param aFormatFromLocale Boolean flag to indicate whether the clock |
50 * format should be updated from the locale. |
50 * format should be updated from the locale. |
51 * |
51 * @param aFormat Boolean flag that indicates whether the |
52 * @param aContextPaneClock Boolean flag that indicates whether the |
52 * clock is digital or analog. |
53 * clock is in the context pane. |
|
54 * |
53 * |
55 * @return Newly constructed object. |
54 * @return Newly constructed object. |
56 */ |
55 */ |
57 static CXnClockControl* NewL( CXnClockAdapter* aAdapter, |
56 static CXnClockControl* NewL( CXnClockAdapter& aAdapter, |
58 const TBool aFormatFromLocale, |
57 const TBool aFormatFromLocale, |
59 const TClockFormat aFormat ); |
58 const TClockFormat aFormat ); |
60 |
59 |
61 |
60 |
62 /** |
61 /** |
89 |
88 |
90 /** |
89 /** |
91 * Draws the clock |
90 * Draws the clock |
92 * |
91 * |
93 * @param aGc Context where to draw |
92 * @param aGc Context where to draw |
94 * @param aRect Rect Clock rect |
93 * @param aNode Node to draw |
|
94 * @param aAmpm Possible am/pm text to draw |
95 */ |
95 */ |
96 void Draw( CWindowGc& aGc, const TRect& aRect ); |
96 void Draw( CWindowGc& aGc, CXnNodePluginIf* aNode, CXnNodePluginIf* aAmpm ); |
97 |
97 |
98 /** |
98 /** |
99 * Starts the clock timer. |
99 * Starts the clock timer. |
100 * Used when the clock gains visibility. |
100 * Used when the clock gains visibility. |
101 */ |
101 */ |
104 /** |
104 /** |
105 * Stops the clock timer. |
105 * Stops the clock timer. |
106 * Used when the clock loses visibility. |
106 * Used when the clock loses visibility. |
107 */ |
107 */ |
108 void StopTimer(); |
108 void StopTimer(); |
|
109 |
|
110 /** |
|
111 * Checks if clock format has changed |
|
112 */ |
|
113 void CheckClockFormatL(); |
|
114 |
|
115 /** |
|
116 * Reset font and color |
|
117 */ |
|
118 void ResetFont(); |
109 |
119 |
110 private: // New functions |
120 private: // New functions |
111 |
121 |
112 /** |
122 /** |
113 * Timer callback for clock updates |
123 * Timer callback for clock updates |
121 private: |
131 private: |
122 |
132 |
123 /** |
133 /** |
124 * C++ default constructor. |
134 * C++ default constructor. |
125 */ |
135 */ |
126 CXnClockControl( CXnClockAdapter* aAdapter, |
136 CXnClockControl( CXnClockAdapter& aAdapter, |
127 const TBool aFormatFromLocale, |
137 const TBool aFormatFromLocale, |
128 const TClockFormat aFormat ); |
138 const TClockFormat aFormat ); |
129 |
139 |
130 /** |
140 /** |
131 * By default Symbian 2nd phase constructor is private. |
141 * By default Symbian 2nd phase constructor is private. |
137 // Timer, owned |
147 // Timer, owned |
138 CPeriodic* iTimer; |
148 CPeriodic* iTimer; |
139 // Clock face, owned |
149 // Clock face, owned |
140 CXnClockFace* iFace; |
150 CXnClockFace* iFace; |
141 // Clock adapter, not owned |
151 // Clock adapter, not owned |
142 CXnClockAdapter* iAdapter; |
152 CXnClockAdapter& iAdapter; |
143 // Clock format |
153 // Clock format |
144 TClockFormat iClockFormat; |
154 TClockFormat iClockFormat; |
145 // Flag indicating whetger format clock from locale |
155 // Time format |
146 TBool iFormatFromLocale; |
156 TTimeFormat iTimeFormat; |
|
157 // Flag indicating whether format clock from locale |
|
158 TBool iFormatFromLocale; |
147 }; |
159 }; |
148 |
160 |
149 #endif // _XNCLOCKCONTROL_H |
161 #endif // _XNCLOCKCONTROL_H |
150 |
162 |
151 // End of File |
163 // End of File |